mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
Update checked-in dependencies
This commit is contained in:
27
node_modules/.package-lock.json
generated
vendored
27
node_modules/.package-lock.json
generated
vendored
@@ -920,9 +920,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "9.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.23.0.tgz",
|
||||
"integrity": "sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==",
|
||||
"version": "9.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.24.0.tgz",
|
||||
"integrity": "sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -1075,9 +1075,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mswjs/interceptors": {
|
||||
"version": "0.38.0",
|
||||
"resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.38.0.tgz",
|
||||
"integrity": "sha512-nPHVM+LUl4V1kXPXuTcNN5OMD//ltCQ0lccuEagvidJdpbig3hP3W6/ctWHx6mee7vZIWE0L+Mqj3vx0ASlm/w==",
|
||||
"version": "0.38.1",
|
||||
"resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.38.1.tgz",
|
||||
"integrity": "sha512-JWLtvwpj2aCk2UvLlSQ12BFF/wBJJd0NhhYf7cz4k+tMhymmLn8ss3irznjWPvOsASV2raqb5EjTw+NRoeVDag==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@open-draft/deferred-promise": "^2.2.0",
|
||||
@@ -6540,12 +6540,12 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nock": {
|
||||
"version": "14.0.2",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-14.0.2.tgz",
|
||||
"integrity": "sha512-jDUBpCNY7KLyOF2FTiT4mLRxV2kpjo4YrcGtv3IMCIwqFKxOQFrmeXefvuEiWvS3ApPWQHAkakkkVpoOrDNCVg==",
|
||||
"version": "14.0.3",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-14.0.3.tgz",
|
||||
"integrity": "sha512-sJ9RNmCuYBqXDmGZZHgZ1D1441MqFOU4T5aeLGVGEB4OWI/2LM0mZlkfBQzQKdOfJypL+2nPPBugXKjixBn4kQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@mswjs/interceptors": "^0.38.0",
|
||||
"@mswjs/interceptors": "^0.38.1",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"propagate": "^2.0.0"
|
||||
},
|
||||
@@ -8334,11 +8334,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
|
||||
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
||||
2
node_modules/@eslint/js/package.json
generated
vendored
2
node_modules/@eslint/js/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@eslint/js",
|
||||
"version": "9.23.0",
|
||||
"version": "9.24.0",
|
||||
"description": "ESLint JavaScript language implementation",
|
||||
"main": "./src/index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
|
||||
@@ -5,8 +5,9 @@ import {
|
||||
} from "./chunk-H5O73WD2.mjs";
|
||||
import {
|
||||
FetchResponse,
|
||||
IS_PATCHED_MODULE
|
||||
} from "./chunk-5UK33FSU.mjs";
|
||||
IS_PATCHED_MODULE,
|
||||
canParseUrl
|
||||
} from "./chunk-FK37CTPH.mjs";
|
||||
import {
|
||||
hasConfigurableGlobal
|
||||
} from "./chunk-TX5GBTFY.mjs";
|
||||
@@ -19,16 +20,6 @@ import {
|
||||
import { invariant } from "outvariant";
|
||||
import { DeferredPromise } from "@open-draft/deferred-promise";
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/interceptors/fetch/utils/createNetworkError.ts
|
||||
function createNetworkError(cause) {
|
||||
return Object.assign(new TypeError("Failed to fetch"), {
|
||||
@@ -293,4 +284,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
||||
export {
|
||||
FetchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-PBC2PID2.mjs.map
|
||||
//# sourceMappingURL=chunk-3NVFHQ5L.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/browser/chunk-3NVFHQ5L.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/browser/chunk-3NVFHQ5L.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/browser/chunk-5UK33FSU.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/browser/chunk-5UK33FSU.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/browser/chunk-BC2BLJQN.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/browser/chunk-BC2BLJQN.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ import {
|
||||
import {
|
||||
FetchResponse,
|
||||
IS_PATCHED_MODULE
|
||||
} from "./chunk-5UK33FSU.mjs";
|
||||
} from "./chunk-FK37CTPH.mjs";
|
||||
import {
|
||||
hasConfigurableGlobal
|
||||
} from "./chunk-TX5GBTFY.mjs";
|
||||
@@ -841,4 +841,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
||||
export {
|
||||
XMLHttpRequestInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-DODHRDV6.mjs.map
|
||||
//# sourceMappingURL=chunk-E2WFHJX6.mjs.map
|
||||
@@ -1,6 +1,28 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/glossary.ts
|
||||
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/utils/getValueBySymbol.ts
|
||||
function getValueBySymbol(symbolName, source) {
|
||||
const ownSymbols = Object.getOwnPropertySymbols(source);
|
||||
const symbol = ownSymbols.find((symbol2) => {
|
||||
return symbol2.description === symbolName;
|
||||
});
|
||||
if (symbol) {
|
||||
return Reflect.get(source, symbol);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// src/utils/fetchUtils.ts
|
||||
var _FetchResponse = class extends Response {
|
||||
static isConfigurableStatusCode(status) {
|
||||
@@ -17,18 +39,20 @@ var _FetchResponse = class extends Response {
|
||||
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status);
|
||||
}
|
||||
static setUrl(url, response) {
|
||||
if (!url) {
|
||||
if (!url || url === "about:" || !canParseUrl(url)) {
|
||||
return;
|
||||
}
|
||||
if (response.url != "") {
|
||||
return;
|
||||
const state = getValueBySymbol("state", response);
|
||||
if (state) {
|
||||
state.urlList.push(new URL(url));
|
||||
} else {
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
|
||||
@@ -50,12 +74,9 @@ var _FetchResponse = class extends Response {
|
||||
status: safeStatus
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const stateSymbol = Object.getOwnPropertySymbols(this).find(
|
||||
(symbol) => symbol.description === "state"
|
||||
);
|
||||
if (stateSymbol) {
|
||||
const state = Reflect.get(this, stateSymbol);
|
||||
Reflect.set(state, "status", status);
|
||||
const state = getValueBySymbol("state", this);
|
||||
if (state) {
|
||||
state.status = status;
|
||||
} else {
|
||||
Object.defineProperty(this, "status", {
|
||||
value: status,
|
||||
@@ -79,5 +100,6 @@ FetchResponse.STATUS_CODES_WITH_REDIRECT = [301, 302, 303, 307, 308];
|
||||
|
||||
|
||||
|
||||
exports.IS_PATCHED_MODULE = IS_PATCHED_MODULE; exports.FetchResponse = FetchResponse;
|
||||
//# sourceMappingURL=chunk-BC2BLJQN.js.map
|
||||
|
||||
exports.IS_PATCHED_MODULE = IS_PATCHED_MODULE; exports.canParseUrl = canParseUrl; exports.FetchResponse = FetchResponse;
|
||||
//# sourceMappingURL=chunk-F7RG3QQH.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/browser/chunk-F7RG3QQH.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/browser/chunk-F7RG3QQH.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,6 +1,28 @@
|
||||
// src/glossary.ts
|
||||
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/utils/getValueBySymbol.ts
|
||||
function getValueBySymbol(symbolName, source) {
|
||||
const ownSymbols = Object.getOwnPropertySymbols(source);
|
||||
const symbol = ownSymbols.find((symbol2) => {
|
||||
return symbol2.description === symbolName;
|
||||
});
|
||||
if (symbol) {
|
||||
return Reflect.get(source, symbol);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// src/utils/fetchUtils.ts
|
||||
var _FetchResponse = class extends Response {
|
||||
static isConfigurableStatusCode(status) {
|
||||
@@ -17,18 +39,20 @@ var _FetchResponse = class extends Response {
|
||||
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status);
|
||||
}
|
||||
static setUrl(url, response) {
|
||||
if (!url) {
|
||||
if (!url || url === "about:" || !canParseUrl(url)) {
|
||||
return;
|
||||
}
|
||||
if (response.url != "") {
|
||||
return;
|
||||
const state = getValueBySymbol("state", response);
|
||||
if (state) {
|
||||
state.urlList.push(new URL(url));
|
||||
} else {
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
|
||||
@@ -50,12 +74,9 @@ var _FetchResponse = class extends Response {
|
||||
status: safeStatus
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const stateSymbol = Object.getOwnPropertySymbols(this).find(
|
||||
(symbol) => symbol.description === "state"
|
||||
);
|
||||
if (stateSymbol) {
|
||||
const state = Reflect.get(this, stateSymbol);
|
||||
Reflect.set(state, "status", status);
|
||||
const state = getValueBySymbol("state", this);
|
||||
if (state) {
|
||||
state.status = status;
|
||||
} else {
|
||||
Object.defineProperty(this, "status", {
|
||||
value: status,
|
||||
@@ -78,6 +99,7 @@ FetchResponse.STATUS_CODES_WITH_REDIRECT = [301, 302, 303, 307, 308];
|
||||
|
||||
export {
|
||||
IS_PATCHED_MODULE,
|
||||
canParseUrl,
|
||||
FetchResponse
|
||||
};
|
||||
//# sourceMappingURL=chunk-5UK33FSU.mjs.map
|
||||
//# sourceMappingURL=chunk-FK37CTPH.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/browser/chunk-FK37CTPH.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/browser/chunk-FK37CTPH.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -6,7 +6,8 @@ var _chunkFGSEOIC4js = require('./chunk-FGSEOIC4.js');
|
||||
|
||||
|
||||
|
||||
var _chunkBC2BLJQNjs = require('./chunk-BC2BLJQN.js');
|
||||
|
||||
var _chunkF7RG3QQHjs = require('./chunk-F7RG3QQH.js');
|
||||
|
||||
|
||||
var _chunkPFGO5BSMjs = require('./chunk-PFGO5BSM.js');
|
||||
@@ -19,16 +20,6 @@ var _chunkTIPR373Rjs = require('./chunk-TIPR373R.js');
|
||||
var _outvariant = require('outvariant');
|
||||
var _deferredpromise = require('@open-draft/deferred-promise');
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/interceptors/fetch/utils/createNetworkError.ts
|
||||
function createNetworkError(cause) {
|
||||
return Object.assign(new TypeError("Failed to fetch"), {
|
||||
@@ -180,12 +171,12 @@ var _FetchInterceptor = class extends _chunkTIPR373Rjs.Interceptor {
|
||||
async setup() {
|
||||
const pureFetch = globalThis.fetch;
|
||||
_outvariant.invariant.call(void 0,
|
||||
!pureFetch[_chunkBC2BLJQNjs.IS_PATCHED_MODULE],
|
||||
!pureFetch[_chunkF7RG3QQHjs.IS_PATCHED_MODULE],
|
||||
'Failed to patch the "fetch" module: already patched.'
|
||||
);
|
||||
globalThis.fetch = async (input, init) => {
|
||||
const requestId = _chunkTIPR373Rjs.createRequestId.call(void 0, );
|
||||
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !canParseUrl(input) ? new URL(input, location.origin) : input;
|
||||
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !_chunkF7RG3QQHjs.canParseUrl.call(void 0, input) ? new URL(input, location.origin) : input;
|
||||
const request = new Request(resolvedInput, init);
|
||||
const responsePromise = new (0, _deferredpromise.DeferredPromise)();
|
||||
const controller = new (0, _chunkFGSEOIC4js.RequestController)(request);
|
||||
@@ -205,9 +196,9 @@ var _FetchInterceptor = class extends _chunkTIPR373Rjs.Interceptor {
|
||||
rawResponse
|
||||
});
|
||||
const decompressedStream = decompressResponse(rawResponse);
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkBC2BLJQNjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkBC2BLJQNjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkBC2BLJQNjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkF7RG3QQHjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkF7RG3QQHjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkF7RG3QQHjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
if (request.redirect === "error") {
|
||||
responsePromise.reject(createNetworkError("unexpected redirect"));
|
||||
return;
|
||||
@@ -270,13 +261,13 @@ var _FetchInterceptor = class extends _chunkTIPR373Rjs.Interceptor {
|
||||
return response;
|
||||
});
|
||||
};
|
||||
Object.defineProperty(globalThis.fetch, _chunkBC2BLJQNjs.IS_PATCHED_MODULE, {
|
||||
Object.defineProperty(globalThis.fetch, _chunkF7RG3QQHjs.IS_PATCHED_MODULE, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
value: true
|
||||
});
|
||||
this.subscriptions.push(() => {
|
||||
Object.defineProperty(globalThis.fetch, _chunkBC2BLJQNjs.IS_PATCHED_MODULE, {
|
||||
Object.defineProperty(globalThis.fetch, _chunkF7RG3QQHjs.IS_PATCHED_MODULE, {
|
||||
value: void 0
|
||||
});
|
||||
globalThis.fetch = pureFetch;
|
||||
@@ -293,4 +284,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
||||
|
||||
|
||||
exports.FetchInterceptor = FetchInterceptor;
|
||||
//# sourceMappingURL=chunk-P3AXGLYB.js.map
|
||||
//# sourceMappingURL=chunk-H4LFCCBA.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/browser/chunk-H4LFCCBA.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/browser/chunk-H4LFCCBA.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ var _chunkFGSEOIC4js = require('./chunk-FGSEOIC4.js');
|
||||
|
||||
|
||||
|
||||
var _chunkBC2BLJQNjs = require('./chunk-BC2BLJQN.js');
|
||||
var _chunkF7RG3QQHjs = require('./chunk-F7RG3QQH.js');
|
||||
|
||||
|
||||
var _chunkPFGO5BSMjs = require('./chunk-PFGO5BSM.js');
|
||||
@@ -206,8 +206,8 @@ function parseJson(data) {
|
||||
|
||||
// src/interceptors/XMLHttpRequest/utils/createResponse.ts
|
||||
function createResponse(request, body) {
|
||||
const responseBodyOrNull = _chunkBC2BLJQNjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkBC2BLJQNjs.FetchResponse)(responseBodyOrNull, {
|
||||
const responseBodyOrNull = _chunkF7RG3QQHjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkF7RG3QQHjs.FetchResponse)(responseBodyOrNull, {
|
||||
url: request.responseURL,
|
||||
status: request.status,
|
||||
statusText: request.statusText,
|
||||
@@ -807,7 +807,7 @@ var _XMLHttpRequestInterceptor = class extends _chunkTIPR373Rjs.Interceptor {
|
||||
logger.info('patching "XMLHttpRequest" module...');
|
||||
const PureXMLHttpRequest = globalThis.XMLHttpRequest;
|
||||
_outvariant.invariant.call(void 0,
|
||||
!PureXMLHttpRequest[_chunkBC2BLJQNjs.IS_PATCHED_MODULE],
|
||||
!PureXMLHttpRequest[_chunkF7RG3QQHjs.IS_PATCHED_MODULE],
|
||||
'Failed to patch the "XMLHttpRequest" module: already patched.'
|
||||
);
|
||||
globalThis.XMLHttpRequest = createXMLHttpRequestProxy({
|
||||
@@ -818,13 +818,13 @@ var _XMLHttpRequestInterceptor = class extends _chunkTIPR373Rjs.Interceptor {
|
||||
'native "XMLHttpRequest" module patched!',
|
||||
globalThis.XMLHttpRequest.name
|
||||
);
|
||||
Object.defineProperty(globalThis.XMLHttpRequest, _chunkBC2BLJQNjs.IS_PATCHED_MODULE, {
|
||||
Object.defineProperty(globalThis.XMLHttpRequest, _chunkF7RG3QQHjs.IS_PATCHED_MODULE, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
value: true
|
||||
});
|
||||
this.subscriptions.push(() => {
|
||||
Object.defineProperty(globalThis.XMLHttpRequest, _chunkBC2BLJQNjs.IS_PATCHED_MODULE, {
|
||||
Object.defineProperty(globalThis.XMLHttpRequest, _chunkF7RG3QQHjs.IS_PATCHED_MODULE, {
|
||||
value: void 0
|
||||
});
|
||||
globalThis.XMLHttpRequest = PureXMLHttpRequest;
|
||||
@@ -841,4 +841,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
||||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = XMLHttpRequestInterceptor;
|
||||
//# sourceMappingURL=chunk-ZIT2QX7D.js.map
|
||||
//# sourceMappingURL=chunk-J2HDR5D7.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/browser/chunk-P3AXGLYB.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/browser/chunk-P3AXGLYB.js.map
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/browser/chunk-PBC2PID2.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/browser/chunk-PBC2PID2.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/@mswjs/interceptors/lib/browser/index.js
generated
vendored
4
node_modules/@mswjs/interceptors/lib/browser/index.js
generated
vendored
@@ -5,7 +5,7 @@ var _chunkLK6DILFKjs = require('./chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
|
||||
var _chunkBC2BLJQNjs = require('./chunk-BC2BLJQN.js');
|
||||
var _chunkF7RG3QQHjs = require('./chunk-F7RG3QQH.js');
|
||||
|
||||
|
||||
|
||||
@@ -75,5 +75,5 @@ function getCleanUrl(url, isAbsolute = true) {
|
||||
|
||||
|
||||
|
||||
exports.BatchInterceptor = BatchInterceptor; exports.FetchResponse = _chunkBC2BLJQNjs.FetchResponse; exports.INTERNAL_REQUEST_ID_HEADER_NAME = _chunkTIPR373Rjs.INTERNAL_REQUEST_ID_HEADER_NAME; exports.IS_PATCHED_MODULE = _chunkBC2BLJQNjs.IS_PATCHED_MODULE; exports.Interceptor = _chunkTIPR373Rjs.Interceptor; exports.InterceptorReadyState = _chunkTIPR373Rjs.InterceptorReadyState; exports.createRequestId = _chunkTIPR373Rjs.createRequestId; exports.decodeBuffer = _chunkLK6DILFKjs.decodeBuffer; exports.deleteGlobalSymbol = _chunkTIPR373Rjs.deleteGlobalSymbol; exports.encodeBuffer = _chunkLK6DILFKjs.encodeBuffer; exports.getCleanUrl = getCleanUrl; exports.getGlobalSymbol = _chunkTIPR373Rjs.getGlobalSymbol;
|
||||
exports.BatchInterceptor = BatchInterceptor; exports.FetchResponse = _chunkF7RG3QQHjs.FetchResponse; exports.INTERNAL_REQUEST_ID_HEADER_NAME = _chunkTIPR373Rjs.INTERNAL_REQUEST_ID_HEADER_NAME; exports.IS_PATCHED_MODULE = _chunkF7RG3QQHjs.IS_PATCHED_MODULE; exports.Interceptor = _chunkTIPR373Rjs.Interceptor; exports.InterceptorReadyState = _chunkTIPR373Rjs.InterceptorReadyState; exports.createRequestId = _chunkTIPR373Rjs.createRequestId; exports.decodeBuffer = _chunkLK6DILFKjs.decodeBuffer; exports.deleteGlobalSymbol = _chunkTIPR373Rjs.deleteGlobalSymbol; exports.encodeBuffer = _chunkLK6DILFKjs.encodeBuffer; exports.getCleanUrl = getCleanUrl; exports.getGlobalSymbol = _chunkTIPR373Rjs.getGlobalSymbol;
|
||||
//# sourceMappingURL=index.js.map
|
||||
2
node_modules/@mswjs/interceptors/lib/browser/index.mjs
generated
vendored
2
node_modules/@mswjs/interceptors/lib/browser/index.mjs
generated
vendored
@@ -5,7 +5,7 @@ import {
|
||||
import {
|
||||
FetchResponse,
|
||||
IS_PATCHED_MODULE
|
||||
} from "./chunk-5UK33FSU.mjs";
|
||||
} from "./chunk-FK37CTPH.mjs";
|
||||
import {
|
||||
INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
Interceptor,
|
||||
|
||||
6
node_modules/@mswjs/interceptors/lib/browser/interceptors/XMLHttpRequest/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/browser/interceptors/XMLHttpRequest/index.js
generated
vendored
@@ -1,12 +1,12 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkZIT2QX7Djs = require('../../chunk-ZIT2QX7D.js');
|
||||
var _chunkJ2HDR5D7js = require('../../chunk-J2HDR5D7.js');
|
||||
require('../../chunk-LK6DILFK.js');
|
||||
require('../../chunk-FGSEOIC4.js');
|
||||
require('../../chunk-BC2BLJQN.js');
|
||||
require('../../chunk-F7RG3QQH.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-TIPR373R.js');
|
||||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = _chunkZIT2QX7Djs.XMLHttpRequestInterceptor;
|
||||
exports.XMLHttpRequestInterceptor = _chunkJ2HDR5D7js.XMLHttpRequestInterceptor;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/browser/interceptors/XMLHttpRequest/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/browser/interceptors/XMLHttpRequest/index.mjs
generated
vendored
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "../../chunk-DODHRDV6.mjs";
|
||||
} from "../../chunk-E2WFHJX6.mjs";
|
||||
import "../../chunk-6HYIRFX2.mjs";
|
||||
import "../../chunk-H5O73WD2.mjs";
|
||||
import "../../chunk-5UK33FSU.mjs";
|
||||
import "../../chunk-FK37CTPH.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-QED3Q6Z2.mjs";
|
||||
export {
|
||||
|
||||
6
node_modules/@mswjs/interceptors/lib/browser/interceptors/fetch/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/browser/interceptors/fetch/index.js
generated
vendored
@@ -1,11 +1,11 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkP3AXGLYBjs = require('../../chunk-P3AXGLYB.js');
|
||||
var _chunkH4LFCCBAjs = require('../../chunk-H4LFCCBA.js');
|
||||
require('../../chunk-FGSEOIC4.js');
|
||||
require('../../chunk-BC2BLJQN.js');
|
||||
require('../../chunk-F7RG3QQH.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-TIPR373R.js');
|
||||
|
||||
|
||||
exports.FetchInterceptor = _chunkP3AXGLYBjs.FetchInterceptor;
|
||||
exports.FetchInterceptor = _chunkH4LFCCBAjs.FetchInterceptor;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/browser/interceptors/fetch/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/browser/interceptors/fetch/index.mjs
generated
vendored
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "../../chunk-PBC2PID2.mjs";
|
||||
} from "../../chunk-3NVFHQ5L.mjs";
|
||||
import "../../chunk-H5O73WD2.mjs";
|
||||
import "../../chunk-5UK33FSU.mjs";
|
||||
import "../../chunk-FK37CTPH.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-QED3Q6Z2.mjs";
|
||||
export {
|
||||
|
||||
10
node_modules/@mswjs/interceptors/lib/browser/presets/browser.js
generated
vendored
10
node_modules/@mswjs/interceptors/lib/browser/presets/browser.js
generated
vendored
@@ -1,19 +1,19 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkZIT2QX7Djs = require('../chunk-ZIT2QX7D.js');
|
||||
var _chunkJ2HDR5D7js = require('../chunk-J2HDR5D7.js');
|
||||
require('../chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
var _chunkP3AXGLYBjs = require('../chunk-P3AXGLYB.js');
|
||||
var _chunkH4LFCCBAjs = require('../chunk-H4LFCCBA.js');
|
||||
require('../chunk-FGSEOIC4.js');
|
||||
require('../chunk-BC2BLJQN.js');
|
||||
require('../chunk-F7RG3QQH.js');
|
||||
require('../chunk-PFGO5BSM.js');
|
||||
require('../chunk-TIPR373R.js');
|
||||
|
||||
// src/presets/browser.ts
|
||||
var browser_default = [
|
||||
new (0, _chunkP3AXGLYBjs.FetchInterceptor)(),
|
||||
new (0, _chunkZIT2QX7Djs.XMLHttpRequestInterceptor)()
|
||||
new (0, _chunkH4LFCCBAjs.FetchInterceptor)(),
|
||||
new (0, _chunkJ2HDR5D7js.XMLHttpRequestInterceptor)()
|
||||
];
|
||||
|
||||
|
||||
|
||||
6
node_modules/@mswjs/interceptors/lib/browser/presets/browser.mjs
generated
vendored
6
node_modules/@mswjs/interceptors/lib/browser/presets/browser.mjs
generated
vendored
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "../chunk-DODHRDV6.mjs";
|
||||
} from "../chunk-E2WFHJX6.mjs";
|
||||
import "../chunk-6HYIRFX2.mjs";
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "../chunk-PBC2PID2.mjs";
|
||||
} from "../chunk-3NVFHQ5L.mjs";
|
||||
import "../chunk-H5O73WD2.mjs";
|
||||
import "../chunk-5UK33FSU.mjs";
|
||||
import "../chunk-FK37CTPH.mjs";
|
||||
import "../chunk-TX5GBTFY.mjs";
|
||||
import "../chunk-QED3Q6Z2.mjs";
|
||||
|
||||
|
||||
22
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.js
generated
vendored
22
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.js
generated
vendored
@@ -1,16 +1,16 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkYBN5MFAPjs = require('./chunk-YBN5MFAP.js');
|
||||
var _chunkMCB574K6js = require('./chunk-MCB574K6.js');
|
||||
|
||||
|
||||
var _chunk3HCE66HZjs = require('./chunk-3HCE66HZ.js');
|
||||
var _chunkGO7ZOUKBjs = require('./chunk-GO7ZOUKB.js');
|
||||
|
||||
|
||||
var _chunkLCA4FKWYjs = require('./chunk-LCA4FKWY.js');
|
||||
var _chunk2R5JZR3Ljs = require('./chunk-2R5JZR3L.js');
|
||||
require('./chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
var _chunkCF5C3K5Ujs = require('./chunk-CF5C3K5U.js');
|
||||
var _chunkDPVSIR6Jjs = require('./chunk-DPVSIR6J.js');
|
||||
require('./chunk-PFGO5BSM.js');
|
||||
require('./chunk-73NOP3T5.js');
|
||||
|
||||
@@ -20,17 +20,17 @@ var _chunk6L3PFBGTjs = require('./chunk-6L3PFBGT.js');
|
||||
|
||||
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/RemoteHttpInterceptor.ts
|
||||
var RemoteHttpInterceptor = class extends _chunkYBN5MFAPjs.BatchInterceptor {
|
||||
var RemoteHttpInterceptor = class extends _chunkMCB574K6js.BatchInterceptor {
|
||||
constructor() {
|
||||
super({
|
||||
name: "remote-interceptor",
|
||||
interceptors: [
|
||||
new (0, _chunk3HCE66HZjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunkLCA4FKWYjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkCF5C3K5Ujs.FetchInterceptor)()
|
||||
new (0, _chunkGO7ZOUKBjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunk2R5JZR3Ljs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkDPVSIR6Jjs.FetchInterceptor)()
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -65,7 +65,7 @@ var RemoteHttpInterceptor = class extends _chunkYBN5MFAPjs.BatchInterceptor {
|
||||
const responseInit = JSON.parse(
|
||||
serializedResponse
|
||||
);
|
||||
const mockedResponse = new (0, _chunkWZTE4PCOjs.FetchResponse)(responseInit.body, {
|
||||
const mockedResponse = new (0, _chunkDLID3GDGjs.FetchResponse)(responseInit.body, {
|
||||
url: request.url,
|
||||
status: responseInit.status,
|
||||
statusText: responseInit.statusText,
|
||||
@@ -98,7 +98,7 @@ function requestReviver(key, value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
var _RemoteHttpResolver = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
var _RemoteHttpResolver = class extends _chunkDLID3GDGjs.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,16 +1,16 @@
|
||||
import {
|
||||
BatchInterceptor
|
||||
} from "./chunk-PJA4E426.mjs";
|
||||
} from "./chunk-TBU3WLO3.mjs";
|
||||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "./chunk-FWJSC2QD.mjs";
|
||||
} from "./chunk-JDAAQ7RU.mjs";
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "./chunk-OMWE7UVM.mjs";
|
||||
} from "./chunk-RXMZLFWG.mjs";
|
||||
import "./chunk-6HYIRFX2.mjs";
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "./chunk-ZSYLU3GR.mjs";
|
||||
} from "./chunk-NIASNH2Q.mjs";
|
||||
import "./chunk-TX5GBTFY.mjs";
|
||||
import "./chunk-6YM4PLBI.mjs";
|
||||
import {
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
import {
|
||||
FetchResponse,
|
||||
Interceptor
|
||||
} from "./chunk-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/RemoteHttpInterceptor.ts
|
||||
var RemoteHttpInterceptor = class extends BatchInterceptor {
|
||||
|
||||
@@ -18,7 +18,7 @@ var _chunk6L3PFBGTjs = require('./chunk-6L3PFBGT.js');
|
||||
|
||||
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/interceptors/XMLHttpRequest/index.ts
|
||||
var _outvariant = require('outvariant');
|
||||
@@ -206,8 +206,8 @@ function parseJson(data) {
|
||||
|
||||
// src/interceptors/XMLHttpRequest/utils/createResponse.ts
|
||||
function createResponse(request, body) {
|
||||
const responseBodyOrNull = _chunkWZTE4PCOjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkWZTE4PCOjs.FetchResponse)(responseBodyOrNull, {
|
||||
const responseBodyOrNull = _chunkDLID3GDGjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkDLID3GDGjs.FetchResponse)(responseBodyOrNull, {
|
||||
url: request.responseURL,
|
||||
status: request.status,
|
||||
statusText: request.statusText,
|
||||
@@ -253,7 +253,7 @@ var XMLHttpRequestController = class {
|
||||
this[kIsRequestHandled] = false;
|
||||
this.events = /* @__PURE__ */ new Map();
|
||||
this.uploadEvents = /* @__PURE__ */ new Map();
|
||||
this.requestId = _chunkWZTE4PCOjs.createRequestId.call(void 0, );
|
||||
this.requestId = _chunkDLID3GDGjs.createRequestId.call(void 0, );
|
||||
this.requestHeaders = new Headers();
|
||||
this.responseBuffer = new Uint8Array();
|
||||
this.request = createProxy(initialRequest, {
|
||||
@@ -335,7 +335,7 @@ var XMLHttpRequestController = class {
|
||||
);
|
||||
if (IS_NODE) {
|
||||
this.request.setRequestHeader(
|
||||
_chunkWZTE4PCOjs.INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
this.requestId
|
||||
);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ function createXMLHttpRequestProxy({
|
||||
}
|
||||
|
||||
// src/interceptors/XMLHttpRequest/index.ts
|
||||
var _XMLHttpRequestInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
var _XMLHttpRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
constructor() {
|
||||
super(_XMLHttpRequestInterceptor.interceptorSymbol);
|
||||
}
|
||||
@@ -841,4 +841,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
||||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = XMLHttpRequestInterceptor;
|
||||
//# sourceMappingURL=chunk-LCA4FKWY.js.map
|
||||
//# sourceMappingURL=chunk-2R5JZR3L.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-3HCE66HZ.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-3HCE66HZ.js.map
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/node/chunk-CF5C3K5U.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-CF5C3K5U.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -158,6 +158,28 @@ function createRequestId() {
|
||||
return Math.random().toString(16).slice(2);
|
||||
}
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/utils/getValueBySymbol.ts
|
||||
function getValueBySymbol(symbolName, source) {
|
||||
const ownSymbols = Object.getOwnPropertySymbols(source);
|
||||
const symbol = ownSymbols.find((symbol2) => {
|
||||
return symbol2.description === symbolName;
|
||||
});
|
||||
if (symbol) {
|
||||
return Reflect.get(source, symbol);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// src/utils/fetchUtils.ts
|
||||
var _FetchResponse = class extends Response {
|
||||
static isConfigurableStatusCode(status) {
|
||||
@@ -174,18 +196,20 @@ var _FetchResponse = class extends Response {
|
||||
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status);
|
||||
}
|
||||
static setUrl(url, response) {
|
||||
if (!url) {
|
||||
if (!url || url === "about:" || !canParseUrl(url)) {
|
||||
return;
|
||||
}
|
||||
if (response.url != "") {
|
||||
return;
|
||||
const state = getValueBySymbol("state", response);
|
||||
if (state) {
|
||||
state.urlList.push(new URL(url));
|
||||
} else {
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
|
||||
@@ -207,12 +231,9 @@ var _FetchResponse = class extends Response {
|
||||
status: safeStatus
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const stateSymbol = Object.getOwnPropertySymbols(this).find(
|
||||
(symbol) => symbol.description === "state"
|
||||
);
|
||||
if (stateSymbol) {
|
||||
const state = Reflect.get(this, stateSymbol);
|
||||
Reflect.set(state, "status", status);
|
||||
const state = getValueBySymbol("state", this);
|
||||
if (state) {
|
||||
state.status = status;
|
||||
} else {
|
||||
Object.defineProperty(this, "status", {
|
||||
value: status,
|
||||
@@ -241,5 +262,6 @@ 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.FetchResponse = FetchResponse;
|
||||
//# sourceMappingURL=chunk-WZTE4PCO.js.map
|
||||
|
||||
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
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-DLID3GDG.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-DLID3GDG.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -13,22 +13,13 @@ var _chunk6L3PFBGTjs = require('./chunk-6L3PFBGT.js');
|
||||
|
||||
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/interceptors/fetch/index.ts
|
||||
var _outvariant = require('outvariant');
|
||||
var _deferredpromise = require('@open-draft/deferred-promise');
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/interceptors/fetch/utils/createNetworkError.ts
|
||||
function createNetworkError(cause) {
|
||||
return Object.assign(new TypeError("Failed to fetch"), {
|
||||
@@ -185,7 +176,7 @@ function decompressResponse(response) {
|
||||
}
|
||||
|
||||
// src/interceptors/fetch/index.ts
|
||||
var _FetchInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
var _FetchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
constructor() {
|
||||
super(_FetchInterceptor.symbol);
|
||||
}
|
||||
@@ -199,8 +190,8 @@ var _FetchInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
'Failed to patch the "fetch" module: already patched.'
|
||||
);
|
||||
globalThis.fetch = async (input, init) => {
|
||||
const requestId = _chunkWZTE4PCOjs.createRequestId.call(void 0, );
|
||||
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !canParseUrl(input) ? new URL(input, location.origin) : input;
|
||||
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.origin) : input;
|
||||
const request = new Request(resolvedInput, init);
|
||||
const responsePromise = new (0, _deferredpromise.DeferredPromise)();
|
||||
const controller = new (0, _chunk6L3PFBGTjs.RequestController)(request);
|
||||
@@ -220,9 +211,9 @@ var _FetchInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
rawResponse
|
||||
});
|
||||
const decompressedStream = decompressResponse(rawResponse);
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkWZTE4PCOjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkWZTE4PCOjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkWZTE4PCOjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkDLID3GDGjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkDLID3GDGjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkDLID3GDGjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
if (request.redirect === "error") {
|
||||
responsePromise.reject(createNetworkError("unexpected redirect"));
|
||||
return;
|
||||
@@ -308,4 +299,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
||||
|
||||
|
||||
exports.FetchInterceptor = FetchInterceptor;
|
||||
//# sourceMappingURL=chunk-CF5C3K5U.js.map
|
||||
//# sourceMappingURL=chunk-DPVSIR6J.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-DPVSIR6J.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-DPVSIR6J.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-FWJSC2QD.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-FWJSC2QD.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ var _chunk6L3PFBGTjs = require('./chunk-6L3PFBGT.js');
|
||||
|
||||
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/interceptors/ClientRequest/index.ts
|
||||
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
||||
@@ -304,7 +304,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 = _chunkWZTE4PCOjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const headers = _chunkDLID3GDGjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const canHaveBody = method !== "GET" && method !== "HEAD";
|
||||
if (url.username || url.password) {
|
||||
if (!headers.has("authorization")) {
|
||||
@@ -325,7 +325,7 @@ var MockHttpSocket = class extends MockSocket {
|
||||
}
|
||||
});
|
||||
}
|
||||
const requestId = _chunkWZTE4PCOjs.createRequestId.call(void 0, );
|
||||
const requestId = _chunkDLID3GDGjs.createRequestId.call(void 0, );
|
||||
this.request = new Request(url, {
|
||||
method,
|
||||
headers,
|
||||
@@ -335,7 +335,7 @@ var MockHttpSocket = class extends MockSocket {
|
||||
body: canHaveBody ? _stream.Readable.toWeb(this.requestStream) : null
|
||||
});
|
||||
Reflect.set(this.request, kRequestId, requestId);
|
||||
if (this.request.headers.has(_chunkWZTE4PCOjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
if (this.request.headers.has(_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
this.passthrough();
|
||||
return;
|
||||
}
|
||||
@@ -346,8 +346,8 @@ var MockHttpSocket = class extends MockSocket {
|
||||
});
|
||||
};
|
||||
this.onResponseStart = (versionMajor, versionMinor, rawHeaders, method, url, status, statusText) => {
|
||||
const headers = _chunkWZTE4PCOjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const response = new (0, _chunkWZTE4PCOjs.FetchResponse)(
|
||||
const headers = _chunkDLID3GDGjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const response = new (0, _chunkDLID3GDGjs.FetchResponse)(
|
||||
/**
|
||||
* @note The Fetch API response instance exposed to the consumer
|
||||
* is created over the response stream of the HTTP parser. It is NOT
|
||||
@@ -355,7 +355,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.
|
||||
*/
|
||||
_chunkWZTE4PCOjs.FetchResponse.isResponseWithBody(status) ? _stream.Readable.toWeb(
|
||||
_chunkDLID3GDGjs.FetchResponse.isResponseWithBody(status) ? _stream.Readable.toWeb(
|
||||
this.responseStream = new (0, _stream.Readable)({ read() {
|
||||
} })
|
||||
) : null,
|
||||
@@ -370,7 +370,8 @@ var MockHttpSocket = class extends MockSocket {
|
||||
this.request,
|
||||
"Failed to handle a response: request does not exist"
|
||||
);
|
||||
if (this.request.headers.has(_chunkWZTE4PCOjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
_chunkDLID3GDGjs.FetchResponse.setUrl(this.request.url, response);
|
||||
if (this.request.headers.has(_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
return;
|
||||
}
|
||||
this.responseListenersPromise = this.onResponse({
|
||||
@@ -451,7 +452,7 @@ var MockHttpSocket = class extends MockSocket {
|
||||
);
|
||||
const rawRequestHeaders = getRawFetchHeaders(this.request.headers);
|
||||
const requestHeadersString = rawRequestHeaders.filter(([name]) => {
|
||||
return name.toLowerCase() !== _chunkWZTE4PCOjs.INTERNAL_REQUEST_ID_HEADER_NAME;
|
||||
return name.toLowerCase() !== _chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME;
|
||||
}).map(([name, value]) => `${name}: ${value}`).join("\r\n");
|
||||
const headersChunk = `${chunkBeforeRequestHeaders}${requestHeadersString}${chunkAfterRequestHeaders}`;
|
||||
socket.write(headersChunk, encoding, callback);
|
||||
@@ -936,7 +937,7 @@ function normalizeClientRequestArgs(defaultProtocol, args) {
|
||||
}
|
||||
|
||||
// src/interceptors/ClientRequest/index.ts
|
||||
var _ClientRequestInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
var _ClientRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
constructor() {
|
||||
super(_ClientRequestInterceptor.symbol);
|
||||
this.onRequest = async ({
|
||||
@@ -1061,4 +1062,4 @@ ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
||||
|
||||
|
||||
exports.ClientRequestInterceptor = ClientRequestInterceptor;
|
||||
//# sourceMappingURL=chunk-3HCE66HZ.js.map
|
||||
//# sourceMappingURL=chunk-GO7ZOUKB.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-GO7ZOUKB.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-GO7ZOUKB.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-I7HQIBT7.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-I7HQIBT7.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ import {
|
||||
INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
Interceptor,
|
||||
createRequestId
|
||||
} from "./chunk-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/interceptors/ClientRequest/index.ts
|
||||
import http2 from "http";
|
||||
@@ -370,6 +370,7 @@ var MockHttpSocket = class extends MockSocket {
|
||||
this.request,
|
||||
"Failed to handle a response: request does not exist"
|
||||
);
|
||||
FetchResponse.setUrl(this.request.url, response);
|
||||
if (this.request.headers.has(INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
return;
|
||||
}
|
||||
@@ -1061,4 +1062,4 @@ ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
||||
export {
|
||||
ClientRequestInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-FWJSC2QD.mjs.map
|
||||
//# sourceMappingURL=chunk-JDAAQ7RU.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-JDAAQ7RU.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-JDAAQ7RU.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/BatchInterceptor.ts
|
||||
var BatchInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
var BatchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
constructor(options) {
|
||||
BatchInterceptor.symbol = Symbol(options.name);
|
||||
super(BatchInterceptor.symbol);
|
||||
@@ -48,4 +48,4 @@ var BatchInterceptor = class extends _chunkWZTE4PCOjs.Interceptor {
|
||||
|
||||
|
||||
exports.BatchInterceptor = BatchInterceptor;
|
||||
//# sourceMappingURL=chunk-YBN5MFAP.js.map
|
||||
//# sourceMappingURL=chunk-MCB574K6.js.map
|
||||
@@ -12,23 +12,14 @@ import {
|
||||
import {
|
||||
FetchResponse,
|
||||
Interceptor,
|
||||
canParseUrl,
|
||||
createRequestId
|
||||
} from "./chunk-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/interceptors/fetch/index.ts
|
||||
import { invariant } from "outvariant";
|
||||
import { DeferredPromise } from "@open-draft/deferred-promise";
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/interceptors/fetch/utils/createNetworkError.ts
|
||||
function createNetworkError(cause) {
|
||||
return Object.assign(new TypeError("Failed to fetch"), {
|
||||
@@ -308,4 +299,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
||||
export {
|
||||
FetchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-ZSYLU3GR.mjs.map
|
||||
//# sourceMappingURL=chunk-NIASNH2Q.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-NIASNH2Q.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-NIASNH2Q.mjs.map
generated
vendored
Normal file
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-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/interceptors/XMLHttpRequest/index.ts
|
||||
import { invariant as invariant2 } from "outvariant";
|
||||
@@ -841,4 +841,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
||||
export {
|
||||
XMLHttpRequestInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-OMWE7UVM.mjs.map
|
||||
//# sourceMappingURL=chunk-RXMZLFWG.mjs.map
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
Interceptor
|
||||
} from "./chunk-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/BatchInterceptor.ts
|
||||
var BatchInterceptor = class extends Interceptor {
|
||||
@@ -48,4 +48,4 @@ var BatchInterceptor = class extends Interceptor {
|
||||
export {
|
||||
BatchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-PJA4E426.mjs.map
|
||||
//# sourceMappingURL=chunk-TBU3WLO3.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-WZTE4PCO.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-WZTE4PCO.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -158,6 +158,28 @@ function createRequestId() {
|
||||
return Math.random().toString(16).slice(2);
|
||||
}
|
||||
|
||||
// src/utils/canParseUrl.ts
|
||||
function canParseUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// src/utils/getValueBySymbol.ts
|
||||
function getValueBySymbol(symbolName, source) {
|
||||
const ownSymbols = Object.getOwnPropertySymbols(source);
|
||||
const symbol = ownSymbols.find((symbol2) => {
|
||||
return symbol2.description === symbolName;
|
||||
});
|
||||
if (symbol) {
|
||||
return Reflect.get(source, symbol);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// src/utils/fetchUtils.ts
|
||||
var _FetchResponse = class extends Response {
|
||||
static isConfigurableStatusCode(status) {
|
||||
@@ -174,18 +196,20 @@ var _FetchResponse = class extends Response {
|
||||
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status);
|
||||
}
|
||||
static setUrl(url, response) {
|
||||
if (!url) {
|
||||
if (!url || url === "about:" || !canParseUrl(url)) {
|
||||
return;
|
||||
}
|
||||
if (response.url != "") {
|
||||
return;
|
||||
const state = getValueBySymbol("state", response);
|
||||
if (state) {
|
||||
state.urlList.push(new URL(url));
|
||||
} else {
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
Object.defineProperty(response, "url", {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
|
||||
@@ -207,12 +231,9 @@ var _FetchResponse = class extends Response {
|
||||
status: safeStatus
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const stateSymbol = Object.getOwnPropertySymbols(this).find(
|
||||
(symbol) => symbol.description === "state"
|
||||
);
|
||||
if (stateSymbol) {
|
||||
const state = Reflect.get(this, stateSymbol);
|
||||
Reflect.set(state, "status", status);
|
||||
const state = getValueBySymbol("state", this);
|
||||
if (state) {
|
||||
state.status = status;
|
||||
} else {
|
||||
Object.defineProperty(this, "status", {
|
||||
value: status,
|
||||
@@ -240,6 +261,7 @@ export {
|
||||
InterceptorReadyState,
|
||||
Interceptor,
|
||||
createRequestId,
|
||||
canParseUrl,
|
||||
FetchResponse
|
||||
};
|
||||
//# sourceMappingURL=chunk-I7HQIBT7.mjs.map
|
||||
//# sourceMappingURL=chunk-YM42IU6M.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-YM42IU6M.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-YM42IU6M.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/node/chunk-ZSYLU3GR.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-ZSYLU3GR.mjs.map
generated
vendored
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 _chunkYBN5MFAPjs = require('./chunk-YBN5MFAP.js');
|
||||
var _chunkMCB574K6js = require('./chunk-MCB574K6.js');
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ var _chunk73NOP3T5js = require('./chunk-73NOP3T5.js');
|
||||
|
||||
|
||||
|
||||
var _chunkWZTE4PCOjs = require('./chunk-WZTE4PCO.js');
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
|
||||
// src/utils/getCleanUrl.ts
|
||||
function getCleanUrl(url, isAbsolute = true) {
|
||||
@@ -35,5 +35,5 @@ function getCleanUrl(url, isAbsolute = true) {
|
||||
|
||||
|
||||
|
||||
exports.BatchInterceptor = _chunkYBN5MFAPjs.BatchInterceptor; exports.FetchResponse = _chunkWZTE4PCOjs.FetchResponse; exports.INTERNAL_REQUEST_ID_HEADER_NAME = _chunkWZTE4PCOjs.INTERNAL_REQUEST_ID_HEADER_NAME; exports.IS_PATCHED_MODULE = _chunk73NOP3T5js.IS_PATCHED_MODULE; exports.Interceptor = _chunkWZTE4PCOjs.Interceptor; exports.InterceptorReadyState = _chunkWZTE4PCOjs.InterceptorReadyState; exports.createRequestId = _chunkWZTE4PCOjs.createRequestId; exports.decodeBuffer = _chunkLK6DILFKjs.decodeBuffer; exports.deleteGlobalSymbol = _chunkWZTE4PCOjs.deleteGlobalSymbol; exports.encodeBuffer = _chunkLK6DILFKjs.encodeBuffer; exports.getCleanUrl = getCleanUrl; exports.getGlobalSymbol = _chunkWZTE4PCOjs.getGlobalSymbol;
|
||||
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;
|
||||
//# 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-PJA4E426.mjs";
|
||||
} from "./chunk-TBU3WLO3.mjs";
|
||||
import {
|
||||
decodeBuffer,
|
||||
encodeBuffer
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
createRequestId,
|
||||
deleteGlobalSymbol,
|
||||
getGlobalSymbol
|
||||
} from "./chunk-I7HQIBT7.mjs";
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/utils/getCleanUrl.ts
|
||||
function getCleanUrl(url, isAbsolute = true) {
|
||||
|
||||
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,9 +1,9 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunk3HCE66HZjs = require('../../chunk-3HCE66HZ.js');
|
||||
var _chunkGO7ZOUKBjs = require('../../chunk-GO7ZOUKB.js');
|
||||
require('../../chunk-6L3PFBGT.js');
|
||||
require('../../chunk-WZTE4PCO.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
|
||||
|
||||
exports.ClientRequestInterceptor = _chunk3HCE66HZjs.ClientRequestInterceptor;
|
||||
exports.ClientRequestInterceptor = _chunkGO7ZOUKBjs.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,8 +1,8 @@
|
||||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "../../chunk-FWJSC2QD.mjs";
|
||||
} from "../../chunk-JDAAQ7RU.mjs";
|
||||
import "../../chunk-5KMS5CTP.mjs";
|
||||
import "../../chunk-I7HQIBT7.mjs";
|
||||
import "../../chunk-YM42IU6M.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,12 +1,12 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkLCA4FKWYjs = require('../../chunk-LCA4FKWY.js');
|
||||
var _chunk2R5JZR3Ljs = require('../../chunk-2R5JZR3L.js');
|
||||
require('../../chunk-LK6DILFK.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-73NOP3T5.js');
|
||||
require('../../chunk-6L3PFBGT.js');
|
||||
require('../../chunk-WZTE4PCO.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = _chunkLCA4FKWYjs.XMLHttpRequestInterceptor;
|
||||
exports.XMLHttpRequestInterceptor = _chunk2R5JZR3Ljs.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-OMWE7UVM.mjs";
|
||||
} from "../../chunk-RXMZLFWG.mjs";
|
||||
import "../../chunk-6HYIRFX2.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-6YM4PLBI.mjs";
|
||||
import "../../chunk-5KMS5CTP.mjs";
|
||||
import "../../chunk-I7HQIBT7.mjs";
|
||||
import "../../chunk-YM42IU6M.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,11 +1,11 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkCF5C3K5Ujs = require('../../chunk-CF5C3K5U.js');
|
||||
var _chunkDPVSIR6Jjs = require('../../chunk-DPVSIR6J.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-73NOP3T5.js');
|
||||
require('../../chunk-6L3PFBGT.js');
|
||||
require('../../chunk-WZTE4PCO.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
|
||||
|
||||
exports.FetchInterceptor = _chunkCF5C3K5Ujs.FetchInterceptor;
|
||||
exports.FetchInterceptor = _chunkDPVSIR6Jjs.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-ZSYLU3GR.mjs";
|
||||
} from "../../chunk-NIASNH2Q.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-6YM4PLBI.mjs";
|
||||
import "../../chunk-5KMS5CTP.mjs";
|
||||
import "../../chunk-I7HQIBT7.mjs";
|
||||
import "../../chunk-YM42IU6M.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,23 +1,23 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunk3HCE66HZjs = require('../chunk-3HCE66HZ.js');
|
||||
var _chunkGO7ZOUKBjs = require('../chunk-GO7ZOUKB.js');
|
||||
|
||||
|
||||
var _chunkLCA4FKWYjs = require('../chunk-LCA4FKWY.js');
|
||||
var _chunk2R5JZR3Ljs = require('../chunk-2R5JZR3L.js');
|
||||
require('../chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
var _chunkCF5C3K5Ujs = require('../chunk-CF5C3K5U.js');
|
||||
var _chunkDPVSIR6Jjs = require('../chunk-DPVSIR6J.js');
|
||||
require('../chunk-PFGO5BSM.js');
|
||||
require('../chunk-73NOP3T5.js');
|
||||
require('../chunk-6L3PFBGT.js');
|
||||
require('../chunk-WZTE4PCO.js');
|
||||
require('../chunk-DLID3GDG.js');
|
||||
|
||||
// src/presets/node.ts
|
||||
var node_default = [
|
||||
new (0, _chunk3HCE66HZjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunkLCA4FKWYjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkCF5C3K5Ujs.FetchInterceptor)()
|
||||
new (0, _chunkGO7ZOUKBjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunk2R5JZR3Ljs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkDPVSIR6Jjs.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,17 +1,17 @@
|
||||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "../chunk-FWJSC2QD.mjs";
|
||||
} from "../chunk-JDAAQ7RU.mjs";
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "../chunk-OMWE7UVM.mjs";
|
||||
} from "../chunk-RXMZLFWG.mjs";
|
||||
import "../chunk-6HYIRFX2.mjs";
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "../chunk-ZSYLU3GR.mjs";
|
||||
} from "../chunk-NIASNH2Q.mjs";
|
||||
import "../chunk-TX5GBTFY.mjs";
|
||||
import "../chunk-6YM4PLBI.mjs";
|
||||
import "../chunk-5KMS5CTP.mjs";
|
||||
import "../chunk-I7HQIBT7.mjs";
|
||||
import "../chunk-YM42IU6M.mjs";
|
||||
|
||||
// src/presets/node.ts
|
||||
var node_default = [
|
||||
|
||||
2
node_modules/@mswjs/interceptors/package.json
generated
vendored
2
node_modules/@mswjs/interceptors/package.json
generated
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mswjs/interceptors",
|
||||
"description": "Low-level HTTP/HTTPS/XHR/fetch request interception library.",
|
||||
"version": "0.38.0",
|
||||
"version": "0.38.1",
|
||||
"main": "./lib/node/index.js",
|
||||
"module": "./lib/node/index.mjs",
|
||||
"types": "./lib/node/index.d.ts",
|
||||
|
||||
2
node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/MockHttpSocket.ts
generated
vendored
2
node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/MockHttpSocket.ts
generated
vendored
@@ -592,6 +592,8 @@ export class MockHttpSocket extends MockSocket {
|
||||
'Failed to handle a response: request does not exist'
|
||||
)
|
||||
|
||||
FetchResponse.setUrl(this.request.url, response)
|
||||
|
||||
/**
|
||||
* @fixme Stop relying on the "X-Request-Id" request header
|
||||
* to figure out if one interceptor has been invoked within another.
|
||||
|
||||
57
node_modules/@mswjs/interceptors/src/utils/fetchUtils.ts
generated
vendored
57
node_modules/@mswjs/interceptors/src/utils/fetchUtils.ts
generated
vendored
@@ -1,7 +1,29 @@
|
||||
import { canParseUrl } from './canParseUrl'
|
||||
import { getValueBySymbol } from './getValueBySymbol'
|
||||
|
||||
export interface FetchResponseInit extends ResponseInit {
|
||||
url?: string
|
||||
}
|
||||
|
||||
interface UndiciFetchInternalState {
|
||||
aborted: boolean
|
||||
rangeRequested: boolean
|
||||
timingAllowPassed: boolean
|
||||
requestIncludesCredentials: boolean
|
||||
type: ResponseType
|
||||
status: number
|
||||
statusText: string
|
||||
timingInfo: unknown
|
||||
cacheState: unknown
|
||||
headersList: Record<symbol, Map<string, unknown>>
|
||||
urlList: Array<URL>
|
||||
body?: {
|
||||
stream: ReadableStream
|
||||
source: unknown
|
||||
length: number
|
||||
}
|
||||
}
|
||||
|
||||
export class FetchResponse extends Response {
|
||||
/**
|
||||
* Response status codes for responses that cannot have body.
|
||||
@@ -28,20 +50,25 @@ export class FetchResponse extends Response {
|
||||
}
|
||||
|
||||
static setUrl(url: string | undefined, response: Response): void {
|
||||
if (!url) {
|
||||
if (!url || url === 'about:' || !canParseUrl(url)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (response.url != '') {
|
||||
return
|
||||
}
|
||||
const state = getValueBySymbol<UndiciFetchInternalState>('state', response)
|
||||
|
||||
Object.defineProperty(response, 'url', {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false,
|
||||
})
|
||||
if (state) {
|
||||
// In Undici, push the URL to the internal list of URLs.
|
||||
// This will respect the `response.url` getter logic correctly.
|
||||
state.urlList.push(new URL(url))
|
||||
} else {
|
||||
// In other libraries, redefine the `url` property directly.
|
||||
Object.defineProperty(response, 'url', {
|
||||
value: url,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,12 +99,10 @@ export class FetchResponse extends Response {
|
||||
* @note Undici keeps an internal "Symbol(state)" that holds
|
||||
* the actual value of response status. Update that in Node.js.
|
||||
*/
|
||||
const stateSymbol = Object.getOwnPropertySymbols(this).find(
|
||||
(symbol) => symbol.description === 'state'
|
||||
)
|
||||
if (stateSymbol) {
|
||||
const state = Reflect.get(this, stateSymbol) as object
|
||||
Reflect.set(state, 'status', status)
|
||||
const state = getValueBySymbol<UndiciFetchInternalState>('state', this)
|
||||
|
||||
if (state) {
|
||||
state.status = status
|
||||
} else {
|
||||
Object.defineProperty(this, 'status', {
|
||||
value: status,
|
||||
|
||||
4
node_modules/nock/package.json
generated
vendored
4
node_modules/nock/package.json
generated
vendored
@@ -7,7 +7,7 @@
|
||||
"testing",
|
||||
"isolation"
|
||||
],
|
||||
"version": "14.0.2",
|
||||
"version": "14.0.3",
|
||||
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -22,7 +22,7 @@
|
||||
"main": "./index.js",
|
||||
"types": "types",
|
||||
"dependencies": {
|
||||
"@mswjs/interceptors": "^0.38.0",
|
||||
"@mswjs/interceptors": "^0.38.1",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"propagate": "^2.0.0"
|
||||
},
|
||||
|
||||
78
node_modules/typescript/lib/_tsc.js
generated
vendored
78
node_modules/typescript/lib/_tsc.js
generated
vendored
@@ -18,7 +18,7 @@ and limitations under the License.
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.8";
|
||||
var version = "5.8.2";
|
||||
var version = "5.8.3";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
@@ -50405,10 +50405,11 @@ function createTypeChecker(host) {
|
||||
serializeExistingTypeNode(context, typeNode, addUndefined) {
|
||||
return serializeExistingTypeNode(context, typeNode, !!addUndefined);
|
||||
},
|
||||
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration) {
|
||||
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration, symbol) {
|
||||
const context = syntacticContext;
|
||||
const signature = getSignatureFromDeclaration(signatureDeclaration);
|
||||
const returnType = context.enclosingSymbolTypes.get(getSymbolId(getSymbolOfDeclaration(signatureDeclaration))) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);
|
||||
symbol ?? (symbol = getSymbolOfDeclaration(signatureDeclaration));
|
||||
const returnType = context.enclosingSymbolTypes.get(getSymbolId(symbol)) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);
|
||||
return serializeInferredReturnTypeForSignature(context, signature, returnType);
|
||||
},
|
||||
serializeTypeOfExpression(syntacticContext, expr) {
|
||||
@@ -50422,7 +50423,7 @@ function createTypeChecker(host) {
|
||||
symbol ?? (symbol = getSymbolOfDeclaration(declaration));
|
||||
let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol));
|
||||
if (type === void 0) {
|
||||
type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType;
|
||||
type = symbol.flags & 98304 /* Accessor */ && declaration.kind === 178 /* SetAccessor */ ? instantiateType(getWriteTypeOfSymbol(symbol), context.mapper) : symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType;
|
||||
}
|
||||
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);
|
||||
if (addUndefinedForParameter) {
|
||||
@@ -50482,6 +50483,7 @@ function createTypeChecker(host) {
|
||||
const context = syntacticContext;
|
||||
if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) {
|
||||
let name = lit.text;
|
||||
const originalName = name;
|
||||
const nodeSymbol = getNodeLinks(parent).resolvedSymbol;
|
||||
const meaning = parent.isTypeOf ? 111551 /* Value */ : 788968 /* Type */;
|
||||
const parentSymbol = nodeSymbol && isSymbolAccessible(
|
||||
@@ -50511,7 +50513,9 @@ function createTypeChecker(host) {
|
||||
context.tracker.reportLikelyUnsafeImportRequiredError(name);
|
||||
}
|
||||
}
|
||||
return name;
|
||||
if (name !== originalName) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
},
|
||||
canReuseTypeNode(context, typeNode) {
|
||||
@@ -51568,12 +51572,13 @@ function createTypeChecker(host) {
|
||||
if (propertySymbol.flags & 98304 /* Accessor */) {
|
||||
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
||||
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
||||
const symbolMapper = getSymbolLinks(propertySymbol).mapper;
|
||||
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
||||
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
||||
typeElements.push(
|
||||
setCommentRange2(
|
||||
context,
|
||||
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
||||
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
||||
getterDeclaration
|
||||
)
|
||||
);
|
||||
@@ -51582,7 +51587,7 @@ function createTypeChecker(host) {
|
||||
typeElements.push(
|
||||
setCommentRange2(
|
||||
context,
|
||||
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
||||
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
||||
setterDeclaration
|
||||
)
|
||||
);
|
||||
@@ -52725,13 +52730,13 @@ function createTypeChecker(host) {
|
||||
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);
|
||||
const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
||||
if (decl) {
|
||||
const restore = addSymbolTypeToContext(context, symbol, type);
|
||||
if (isAccessor(decl)) {
|
||||
result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context);
|
||||
} else if (hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608 /* RequiresWidening */)) {
|
||||
const restore = addSymbolTypeToContext(context, symbol, type);
|
||||
result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context);
|
||||
restore();
|
||||
}
|
||||
restore();
|
||||
}
|
||||
if (!result) {
|
||||
if (addUndefinedForParameter) {
|
||||
@@ -52885,10 +52890,7 @@ function createTypeChecker(host) {
|
||||
/*context*/
|
||||
void 0
|
||||
);
|
||||
if (updated !== node2) {
|
||||
setTextRange2(context, updated, node2);
|
||||
}
|
||||
return updated;
|
||||
return setTextRange2(context, updated, node2);
|
||||
}
|
||||
}
|
||||
function serializeTypeName(context, node, isTypeOf, typeArguments) {
|
||||
@@ -76781,6 +76783,11 @@ function createTypeChecker(host) {
|
||||
if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) {
|
||||
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
||||
}
|
||||
if (compilerOptions.erasableSyntaxOnly) {
|
||||
const start = skipTrivia(file.text, node.pos);
|
||||
const end = node.expression.pos;
|
||||
diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled));
|
||||
}
|
||||
}
|
||||
return checkAssertionWorker(node, checkMode);
|
||||
}
|
||||
@@ -131862,9 +131869,11 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
if (!resolver.canReuseTypeNode(context, node)) {
|
||||
return resolver.serializeExistingTypeNode(context, node);
|
||||
}
|
||||
const specifier = rewriteModuleSpecifier2(node, node.argument.literal);
|
||||
const literal = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier;
|
||||
return factory.updateImportTypeNode(
|
||||
node,
|
||||
factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier2(node, node.argument.literal)),
|
||||
literal === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal),
|
||||
visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes),
|
||||
visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName),
|
||||
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
||||
@@ -132019,10 +132028,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
}
|
||||
function rewriteModuleSpecifier2(parent, lit) {
|
||||
const newName = resolver.getModuleSpecifierOverride(context, parent, lit);
|
||||
if (newName) {
|
||||
return setOriginalNode(factory.createStringLiteral(newName), lit);
|
||||
}
|
||||
return visitNode(lit, visitExistingNodeTreeSymbols, isStringLiteral);
|
||||
return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132189,12 +132195,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context));
|
||||
}
|
||||
if (accessorDeclarations.getAccessor) {
|
||||
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(
|
||||
accessorDeclarations.getAccessor,
|
||||
/*symbol*/
|
||||
void 0,
|
||||
context
|
||||
));
|
||||
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor, symbol, context));
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
@@ -132304,14 +132305,14 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
}
|
||||
return resolver.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
function inferReturnTypeOfSignatureSignature(node, context, reportFallback) {
|
||||
function inferReturnTypeOfSignatureSignature(node, context, symbol, reportFallback) {
|
||||
if (reportFallback) {
|
||||
context.tracker.reportInferenceFallback(node);
|
||||
}
|
||||
if (context.noInferenceFallback === true) {
|
||||
return factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
return resolver.serializeReturnTypeForSignature(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
return resolver.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
function inferAccessorType(node, allAccessors, context, symbol, reportFallback = true) {
|
||||
if (node.kind === 177 /* GetAccessor */) {
|
||||
@@ -132601,18 +132602,17 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
);
|
||||
}
|
||||
function reuseTypeParameters(typeParameters, context) {
|
||||
return typeParameters == null ? void 0 : typeParameters.map(
|
||||
(tp) => {
|
||||
var _a;
|
||||
return factory.updateTypeParameterDeclaration(
|
||||
tp,
|
||||
(_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),
|
||||
reuseNode(context, tp.name),
|
||||
serializeExistingTypeNodeWithFallback(tp.constraint, context),
|
||||
serializeExistingTypeNodeWithFallback(tp.default, context)
|
||||
);
|
||||
}
|
||||
);
|
||||
return typeParameters == null ? void 0 : typeParameters.map((tp) => {
|
||||
var _a;
|
||||
const { node: tpName } = resolver.trackExistingEntityName(context, tp.name);
|
||||
return factory.updateTypeParameterDeclaration(
|
||||
tp,
|
||||
(_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),
|
||||
tpName,
|
||||
serializeExistingTypeNodeWithFallback(tp.constraint, context),
|
||||
serializeExistingTypeNodeWithFallback(tp.default, context)
|
||||
);
|
||||
});
|
||||
}
|
||||
function typeFromObjectLiteralMethod(method, name, context, isConstContext) {
|
||||
const returnType = createReturnFromSignature(
|
||||
@@ -132747,7 +132747,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
} else if (isValueSignatureDeclaration(fn)) {
|
||||
returnType = typeFromSingleReturnExpression(fn, context);
|
||||
}
|
||||
return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, reportFallback && returnType.reportFallback && !returnTypeNode);
|
||||
return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, symbol, reportFallback && returnType.reportFallback && !returnTypeNode);
|
||||
}
|
||||
function typeFromSingleReturnExpression(declaration, context) {
|
||||
let candidateExpr;
|
||||
|
||||
78
node_modules/typescript/lib/typescript.js
generated
vendored
78
node_modules/typescript/lib/typescript.js
generated
vendored
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.8";
|
||||
var version = "5.8.2";
|
||||
var version = "5.8.3";
|
||||
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
@@ -55015,10 +55015,11 @@ function createTypeChecker(host) {
|
||||
serializeExistingTypeNode(context, typeNode, addUndefined) {
|
||||
return serializeExistingTypeNode(context, typeNode, !!addUndefined);
|
||||
},
|
||||
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration) {
|
||||
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration, symbol) {
|
||||
const context = syntacticContext;
|
||||
const signature = getSignatureFromDeclaration(signatureDeclaration);
|
||||
const returnType = context.enclosingSymbolTypes.get(getSymbolId(getSymbolOfDeclaration(signatureDeclaration))) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);
|
||||
symbol ?? (symbol = getSymbolOfDeclaration(signatureDeclaration));
|
||||
const returnType = context.enclosingSymbolTypes.get(getSymbolId(symbol)) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);
|
||||
return serializeInferredReturnTypeForSignature(context, signature, returnType);
|
||||
},
|
||||
serializeTypeOfExpression(syntacticContext, expr) {
|
||||
@@ -55032,7 +55033,7 @@ function createTypeChecker(host) {
|
||||
symbol ?? (symbol = getSymbolOfDeclaration(declaration));
|
||||
let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol));
|
||||
if (type === void 0) {
|
||||
type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType;
|
||||
type = symbol.flags & 98304 /* Accessor */ && declaration.kind === 178 /* SetAccessor */ ? instantiateType(getWriteTypeOfSymbol(symbol), context.mapper) : symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType;
|
||||
}
|
||||
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);
|
||||
if (addUndefinedForParameter) {
|
||||
@@ -55092,6 +55093,7 @@ function createTypeChecker(host) {
|
||||
const context = syntacticContext;
|
||||
if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) {
|
||||
let name = lit.text;
|
||||
const originalName = name;
|
||||
const nodeSymbol = getNodeLinks(parent2).resolvedSymbol;
|
||||
const meaning = parent2.isTypeOf ? 111551 /* Value */ : 788968 /* Type */;
|
||||
const parentSymbol = nodeSymbol && isSymbolAccessible(
|
||||
@@ -55121,7 +55123,9 @@ function createTypeChecker(host) {
|
||||
context.tracker.reportLikelyUnsafeImportRequiredError(name);
|
||||
}
|
||||
}
|
||||
return name;
|
||||
if (name !== originalName) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
},
|
||||
canReuseTypeNode(context, typeNode) {
|
||||
@@ -56178,12 +56182,13 @@ function createTypeChecker(host) {
|
||||
if (propertySymbol.flags & 98304 /* Accessor */) {
|
||||
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
||||
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
||||
const symbolMapper = getSymbolLinks(propertySymbol).mapper;
|
||||
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
||||
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
||||
typeElements.push(
|
||||
setCommentRange2(
|
||||
context,
|
||||
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
||||
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
||||
getterDeclaration
|
||||
)
|
||||
);
|
||||
@@ -56192,7 +56197,7 @@ function createTypeChecker(host) {
|
||||
typeElements.push(
|
||||
setCommentRange2(
|
||||
context,
|
||||
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
||||
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
||||
setterDeclaration
|
||||
)
|
||||
);
|
||||
@@ -57335,13 +57340,13 @@ function createTypeChecker(host) {
|
||||
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);
|
||||
const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
||||
if (decl) {
|
||||
const restore = addSymbolTypeToContext(context, symbol, type);
|
||||
if (isAccessor(decl)) {
|
||||
result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context);
|
||||
} else if (hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608 /* RequiresWidening */)) {
|
||||
const restore = addSymbolTypeToContext(context, symbol, type);
|
||||
result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context);
|
||||
restore();
|
||||
}
|
||||
restore();
|
||||
}
|
||||
if (!result) {
|
||||
if (addUndefinedForParameter) {
|
||||
@@ -57495,10 +57500,7 @@ function createTypeChecker(host) {
|
||||
/*context*/
|
||||
void 0
|
||||
);
|
||||
if (updated !== node2) {
|
||||
setTextRange2(context, updated, node2);
|
||||
}
|
||||
return updated;
|
||||
return setTextRange2(context, updated, node2);
|
||||
}
|
||||
}
|
||||
function serializeTypeName(context, node, isTypeOf, typeArguments) {
|
||||
@@ -81391,6 +81393,11 @@ function createTypeChecker(host) {
|
||||
if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) {
|
||||
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
||||
}
|
||||
if (compilerOptions.erasableSyntaxOnly) {
|
||||
const start = skipTrivia(file.text, node.pos);
|
||||
const end = node.expression.pos;
|
||||
diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled));
|
||||
}
|
||||
}
|
||||
return checkAssertionWorker(node, checkMode);
|
||||
}
|
||||
@@ -136829,9 +136836,11 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
if (!resolver.canReuseTypeNode(context, node)) {
|
||||
return resolver.serializeExistingTypeNode(context, node);
|
||||
}
|
||||
const specifier = rewriteModuleSpecifier2(node, node.argument.literal);
|
||||
const literal = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier;
|
||||
return factory.updateImportTypeNode(
|
||||
node,
|
||||
factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier2(node, node.argument.literal)),
|
||||
literal === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal),
|
||||
visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes),
|
||||
visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName),
|
||||
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
||||
@@ -136986,10 +136995,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
}
|
||||
function rewriteModuleSpecifier2(parent2, lit) {
|
||||
const newName = resolver.getModuleSpecifierOverride(context, parent2, lit);
|
||||
if (newName) {
|
||||
return setOriginalNode(factory.createStringLiteral(newName), lit);
|
||||
}
|
||||
return visitNode(lit, visitExistingNodeTreeSymbols, isStringLiteral);
|
||||
return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137156,12 +137162,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context));
|
||||
}
|
||||
if (accessorDeclarations.getAccessor) {
|
||||
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(
|
||||
accessorDeclarations.getAccessor,
|
||||
/*symbol*/
|
||||
void 0,
|
||||
context
|
||||
));
|
||||
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor, symbol, context));
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
@@ -137271,14 +137272,14 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
}
|
||||
return resolver.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
function inferReturnTypeOfSignatureSignature(node, context, reportFallback) {
|
||||
function inferReturnTypeOfSignatureSignature(node, context, symbol, reportFallback) {
|
||||
if (reportFallback) {
|
||||
context.tracker.reportInferenceFallback(node);
|
||||
}
|
||||
if (context.noInferenceFallback === true) {
|
||||
return factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
return resolver.serializeReturnTypeForSignature(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
return resolver.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
||||
}
|
||||
function inferAccessorType(node, allAccessors, context, symbol, reportFallback = true) {
|
||||
if (node.kind === 177 /* GetAccessor */) {
|
||||
@@ -137568,18 +137569,17 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
);
|
||||
}
|
||||
function reuseTypeParameters(typeParameters, context) {
|
||||
return typeParameters == null ? void 0 : typeParameters.map(
|
||||
(tp) => {
|
||||
var _a;
|
||||
return factory.updateTypeParameterDeclaration(
|
||||
tp,
|
||||
(_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),
|
||||
reuseNode(context, tp.name),
|
||||
serializeExistingTypeNodeWithFallback(tp.constraint, context),
|
||||
serializeExistingTypeNodeWithFallback(tp.default, context)
|
||||
);
|
||||
}
|
||||
);
|
||||
return typeParameters == null ? void 0 : typeParameters.map((tp) => {
|
||||
var _a;
|
||||
const { node: tpName } = resolver.trackExistingEntityName(context, tp.name);
|
||||
return factory.updateTypeParameterDeclaration(
|
||||
tp,
|
||||
(_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),
|
||||
tpName,
|
||||
serializeExistingTypeNodeWithFallback(tp.constraint, context),
|
||||
serializeExistingTypeNodeWithFallback(tp.default, context)
|
||||
);
|
||||
});
|
||||
}
|
||||
function typeFromObjectLiteralMethod(method, name, context, isConstContext) {
|
||||
const returnType = createReturnFromSignature(
|
||||
@@ -137714,7 +137714,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||
} else if (isValueSignatureDeclaration(fn)) {
|
||||
returnType = typeFromSingleReturnExpression(fn, context);
|
||||
}
|
||||
return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, reportFallback && returnType.reportFallback && !returnTypeNode);
|
||||
return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, symbol, reportFallback && returnType.reportFallback && !returnTypeNode);
|
||||
}
|
||||
function typeFromSingleReturnExpression(declaration, context) {
|
||||
let candidateExpr;
|
||||
|
||||
4
node_modules/typescript/package.json
generated
vendored
4
node_modules/typescript/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "5.8.2",
|
||||
"version": "5.8.3",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
@@ -116,5 +116,5 @@
|
||||
"node": "20.1.0",
|
||||
"npm": "8.19.4"
|
||||
},
|
||||
"gitHead": "beb69e4cdd61b1a0fd9ae21ae58bd4bd409d7217"
|
||||
"gitHead": "68cead182cc24afdc3f1ce7c8ff5853aba14b65a"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user