@rsdoctor/core 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/axios/index.d.ts +5 -2
- package/compiled/axios/index.js +19 -21
- package/compiled/axios/package.json +1 -1
- package/dist/build-utils/build/utils/loader.cjs +4 -4
- package/dist/build-utils/build/utils/loader.js +3 -3
- package/dist/inner-plugins/loaders/proxy.cjs +11 -3
- package/dist/inner-plugins/loaders/proxy.d.ts +3 -0
- package/dist/inner-plugins/loaders/proxy.js +4 -2
- package/dist/inner-plugins/plugins/loader.cjs +9 -1
- package/dist/inner-plugins/plugins/loader.js +9 -1
- package/dist/rules/rules/ecma-version-check/index.cjs +2 -2
- package/dist/rules/rules/ecma-version-check/index.js +1 -1
- package/package.json +11 -11
- package/compiled/@rsbuild/plugin-check-syntax/index.js +0 -18008
- package/compiled/@rsbuild/plugin-check-syntax/license +0 -21
- package/compiled/@rsbuild/plugin-check-syntax/mappings.wasm +0 -0
- package/compiled/@rsbuild/plugin-check-syntax/package.json +0 -1
|
@@ -356,8 +356,11 @@ interface AxiosRequestConfig<D = any> {
|
|
|
356
356
|
env?: {
|
|
357
357
|
FormData?: new (...args: any[]) => object;
|
|
358
358
|
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
|
|
359
|
-
Request?: new (input:
|
|
360
|
-
Response?: new (
|
|
359
|
+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
|
|
360
|
+
Response?: new (
|
|
361
|
+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
|
|
362
|
+
init?: ResponseInit
|
|
363
|
+
) => Response;
|
|
361
364
|
};
|
|
362
365
|
formSerializer?: FormSerializerOptions;
|
|
363
366
|
family?: AddressFamily;
|
package/compiled/axios/index.js
CHANGED
|
@@ -4348,11 +4348,11 @@ module.exports = require("zlib");
|
|
|
4348
4348
|
|
|
4349
4349
|
/***/ }),
|
|
4350
4350
|
|
|
4351
|
-
/***/
|
|
4351
|
+
/***/ 5849:
|
|
4352
4352
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4353
4353
|
|
|
4354
4354
|
"use strict";
|
|
4355
|
-
/*! Axios v1.12.
|
|
4355
|
+
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
4356
4356
|
|
|
4357
4357
|
|
|
4358
4358
|
const FormData$1 = __nccwpck_require__(931);
|
|
@@ -4735,10 +4735,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
4735
4735
|
result[targetKey] = merge({}, val);
|
|
4736
4736
|
} else if (isArray(val)) {
|
|
4737
4737
|
result[targetKey] = val.slice();
|
|
4738
|
-
} else {
|
|
4739
|
-
|
|
4740
|
-
result[targetKey] = val;
|
|
4741
|
-
}
|
|
4738
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
4739
|
+
result[targetKey] = val;
|
|
4742
4740
|
}
|
|
4743
4741
|
};
|
|
4744
4742
|
|
|
@@ -6506,7 +6504,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
6506
6504
|
return requestedURL;
|
|
6507
6505
|
}
|
|
6508
6506
|
|
|
6509
|
-
const VERSION = "1.12.
|
|
6507
|
+
const VERSION = "1.12.2";
|
|
6510
6508
|
|
|
6511
6509
|
function parseProtocol(url) {
|
|
6512
6510
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -8286,9 +8284,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
|
8286
8284
|
|
|
8287
8285
|
const {isFunction} = utils$1;
|
|
8288
8286
|
|
|
8289
|
-
const globalFetchAPI = (({
|
|
8290
|
-
|
|
8291
|
-
|
|
8287
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
8288
|
+
Request, Response
|
|
8289
|
+
}))(utils$1.global);
|
|
8292
8290
|
|
|
8293
8291
|
const {
|
|
8294
8292
|
ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1
|
|
@@ -8304,8 +8302,12 @@ const test = (fn, ...args) => {
|
|
|
8304
8302
|
};
|
|
8305
8303
|
|
|
8306
8304
|
const factory = (env) => {
|
|
8307
|
-
|
|
8308
|
-
|
|
8305
|
+
env = utils$1.merge.call({
|
|
8306
|
+
skipUndefined: true
|
|
8307
|
+
}, globalFetchAPI, env);
|
|
8308
|
+
|
|
8309
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
8310
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
8309
8311
|
const isRequestSupported = isFunction(Request);
|
|
8310
8312
|
const isResponseSupported = isFunction(Response);
|
|
8311
8313
|
|
|
@@ -8408,6 +8410,8 @@ const factory = (env) => {
|
|
|
8408
8410
|
fetchOptions
|
|
8409
8411
|
} = resolveConfig(config);
|
|
8410
8412
|
|
|
8413
|
+
let _fetch = envFetch || fetch;
|
|
8414
|
+
|
|
8411
8415
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
8412
8416
|
|
|
8413
8417
|
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -8467,7 +8471,7 @@ const factory = (env) => {
|
|
|
8467
8471
|
|
|
8468
8472
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
8469
8473
|
|
|
8470
|
-
let response = await (isRequestSupported ?
|
|
8474
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
8471
8475
|
|
|
8472
8476
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
8473
8477
|
|
|
@@ -8530,12 +8534,8 @@ const factory = (env) => {
|
|
|
8530
8534
|
const seedCache = new Map();
|
|
8531
8535
|
|
|
8532
8536
|
const getFetch = (config) => {
|
|
8533
|
-
let env =
|
|
8534
|
-
skipUndefined: true
|
|
8535
|
-
}, globalFetchAPI, config ? config.env : null);
|
|
8536
|
-
|
|
8537
|
+
let env = config ? config.env : {};
|
|
8537
8538
|
const {fetch, Request, Response} = env;
|
|
8538
|
-
|
|
8539
8539
|
const seeds = [
|
|
8540
8540
|
Request, Response, fetch
|
|
8541
8541
|
];
|
|
@@ -8960,8 +8960,6 @@ class Axios {
|
|
|
8960
8960
|
|
|
8961
8961
|
let newConfig = config;
|
|
8962
8962
|
|
|
8963
|
-
i = 0;
|
|
8964
|
-
|
|
8965
8963
|
while (i < len) {
|
|
8966
8964
|
const onFulfilled = requestInterceptorChain[i++];
|
|
8967
8965
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -9396,7 +9394,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
|
|
|
9396
9394
|
/******/ // startup
|
|
9397
9395
|
/******/ // Load entry module and return exports
|
|
9398
9396
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
9399
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
9397
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(5849);
|
|
9400
9398
|
/******/ module.exports = __webpack_exports__;
|
|
9401
9399
|
/******/
|
|
9402
9400
|
/******/ })()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"axios","author":"Matt Zabriskie","version":"1.12.
|
|
1
|
+
{"name":"axios","author":"Matt Zabriskie","version":"1.12.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -64,8 +64,8 @@ var __webpack_exports__ = {};
|
|
|
64
64
|
const external_node_path_namespaceObject = require("node:path");
|
|
65
65
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
66
66
|
const external_node_url_namespaceObject = require("node:url");
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const external_fs_extra_namespaceObject = require("fs-extra");
|
|
68
|
+
var external_fs_extra_default = /*#__PURE__*/ __webpack_require__.n(external_fs_extra_namespaceObject);
|
|
69
69
|
const external_lodash_es_namespaceObject = require("lodash-es");
|
|
70
70
|
const common_namespaceObject = require("@rsdoctor/utils/common");
|
|
71
71
|
const graph_namespaceObject = require("@rsdoctor/graph");
|
|
@@ -175,11 +175,11 @@ var __webpack_exports__ = {};
|
|
|
175
175
|
if (isPath) {
|
|
176
176
|
const packageJsonData = (0, graph_namespaceObject.readPackageJson)(_loaderName, (file)=>{
|
|
177
177
|
try {
|
|
178
|
-
return
|
|
178
|
+
return external_fs_extra_default().readJsonSync(file, {
|
|
179
179
|
encoding: 'utf8'
|
|
180
180
|
});
|
|
181
181
|
} catch (e) {
|
|
182
|
-
logger_namespaceObject.logger.debug(`isESMLoader function error
|
|
182
|
+
logger_namespaceObject.logger.debug(`isESMLoader function error:${e}`);
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
if ((null == packageJsonData ? void 0 : packageJsonData.type) === 'module' && !(null == packageJsonData ? void 0 : packageJsonData.name.includes('@rsdoctor/'))) return true;
|
|
@@ -3,7 +3,7 @@ const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.ur
|
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_module__ from "module";
|
|
4
4
|
import node_path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import
|
|
6
|
+
import fs_extra from "fs-extra";
|
|
7
7
|
import { omit } from "lodash-es";
|
|
8
8
|
import { Loader } from "@rsdoctor/utils/common";
|
|
9
9
|
import { readPackageJson } from "@rsdoctor/graph";
|
|
@@ -128,11 +128,11 @@ function isESMLoader(r) {
|
|
|
128
128
|
if (isPath) {
|
|
129
129
|
const packageJsonData = readPackageJson(_loaderName, (file)=>{
|
|
130
130
|
try {
|
|
131
|
-
return
|
|
131
|
+
return fs_extra.readJsonSync(file, {
|
|
132
132
|
encoding: 'utf8'
|
|
133
133
|
});
|
|
134
134
|
} catch (e) {
|
|
135
|
-
logger.debug(`isESMLoader function error
|
|
135
|
+
logger.debug(`isESMLoader function error:${e}`);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
if ((null == packageJsonData ? void 0 : packageJsonData.type) === 'module' && !(null == packageJsonData ? void 0 : packageJsonData.name.includes('@rsdoctor/'))) return true;
|
|
@@ -24,7 +24,9 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
raw: ()=>raw,
|
|
28
|
+
default: ()=>proxy,
|
|
29
|
+
pitch: ()=>pitch
|
|
28
30
|
});
|
|
29
31
|
const index_cjs_namespaceObject = require("../../build-utils/build/index.cjs");
|
|
30
32
|
const external_utils_index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
@@ -54,7 +56,7 @@ const loaderModule = function(...args) {
|
|
|
54
56
|
}
|
|
55
57
|
this.callback(null, ...args);
|
|
56
58
|
};
|
|
57
|
-
|
|
59
|
+
const pitch = function() {
|
|
58
60
|
if ((0, external_utils_index_cjs_namespaceObject.shouldSkipLoader)(this)) return;
|
|
59
61
|
this.cacheable(false);
|
|
60
62
|
const mod = (0, external_utils_index_cjs_namespaceObject.getOriginLoaderModule)(this);
|
|
@@ -79,10 +81,16 @@ loaderModule.pitch = function() {
|
|
|
79
81
|
}
|
|
80
82
|
};
|
|
81
83
|
loaderModule.raw = true;
|
|
84
|
+
loaderModule.pitch = pitch;
|
|
85
|
+
const raw = true;
|
|
82
86
|
const proxy = loaderModule;
|
|
83
87
|
exports["default"] = __webpack_exports__["default"];
|
|
88
|
+
exports.pitch = __webpack_exports__.pitch;
|
|
89
|
+
exports.raw = __webpack_exports__.raw;
|
|
84
90
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
85
|
-
"default"
|
|
91
|
+
"default",
|
|
92
|
+
"pitch",
|
|
93
|
+
"raw"
|
|
86
94
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
87
95
|
Object.defineProperty(exports, '__esModule', {
|
|
88
96
|
value: true
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { Plugin as PluginType } from '@rsdoctor/types';
|
|
1
2
|
import { Plugin } from '@rsdoctor/types';
|
|
2
3
|
import type { ProxyLoaderOptions } from '../../types';
|
|
3
4
|
declare const loaderModule: Plugin.LoaderDefinition<ProxyLoaderOptions, {}>;
|
|
5
|
+
export declare const pitch: (this: PluginType.LoaderContext<ProxyLoaderOptions>) => string | void | Buffer<ArrayBufferLike> | Promise<string | Buffer<ArrayBufferLike>>;
|
|
6
|
+
export declare const raw = true;
|
|
4
7
|
export default loaderModule;
|
|
@@ -28,7 +28,7 @@ const loaderModule = function(...args) {
|
|
|
28
28
|
}
|
|
29
29
|
this.callback(null, ...args);
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
const pitch = function() {
|
|
32
32
|
if (shouldSkipLoader(this)) return;
|
|
33
33
|
this.cacheable(false);
|
|
34
34
|
const mod = getOriginLoaderModule(this);
|
|
@@ -53,5 +53,7 @@ loaderModule.pitch = function() {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
loaderModule.raw = true;
|
|
56
|
+
loaderModule.pitch = pitch;
|
|
57
|
+
const raw = true;
|
|
56
58
|
const proxy = loaderModule;
|
|
57
|
-
export { proxy as default };
|
|
59
|
+
export { proxy as default, pitch, raw };
|
|
@@ -132,7 +132,15 @@ class InternalLoaderPlugin extends external_base_cjs_namespaceObject.InternalBas
|
|
|
132
132
|
}, this.sdk.root, 'resolveLoader' in compiler.options ? compiler.options.resolveLoader : {});
|
|
133
133
|
}
|
|
134
134
|
constructor(...args){
|
|
135
|
-
super(...args), this.name = 'loader', this.internalLoaderPath =
|
|
135
|
+
super(...args), this.name = 'loader', this.internalLoaderPath = (()=>{
|
|
136
|
+
const isCJS = loader_filename.endsWith('.cjs');
|
|
137
|
+
if (isCJS) return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.cjs"));
|
|
138
|
+
try {
|
|
139
|
+
return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.js"));
|
|
140
|
+
} catch {
|
|
141
|
+
return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.cjs"));
|
|
142
|
+
}
|
|
143
|
+
})(), this.afterPlugins = (compiler)=>{
|
|
136
144
|
(0, logger_namespaceObject.time)('InternalLoaderPlugin.afterPlugins');
|
|
137
145
|
try {
|
|
138
146
|
if (compiler.isChild()) return;
|
|
@@ -93,7 +93,15 @@ class InternalLoaderPlugin extends InternalBasePlugin {
|
|
|
93
93
|
}, this.sdk.root, 'resolveLoader' in compiler.options ? compiler.options.resolveLoader : {});
|
|
94
94
|
}
|
|
95
95
|
constructor(...args){
|
|
96
|
-
super(...args), this.name = 'loader', this.internalLoaderPath =
|
|
96
|
+
super(...args), this.name = 'loader', this.internalLoaderPath = (()=>{
|
|
97
|
+
const isCJS = loader_filename.endsWith('.cjs');
|
|
98
|
+
if (isCJS) return require.resolve(path.join(loader_dirname, "../loaders/proxy.cjs"));
|
|
99
|
+
try {
|
|
100
|
+
return require.resolve(path.join(loader_dirname, "../loaders/proxy.js"));
|
|
101
|
+
} catch {
|
|
102
|
+
return require.resolve(path.join(loader_dirname, "../loaders/proxy.cjs"));
|
|
103
|
+
}
|
|
104
|
+
})(), this.afterPlugins = (compiler)=>{
|
|
97
105
|
time('InternalLoaderPlugin.afterPlugins');
|
|
98
106
|
try {
|
|
99
107
|
if (compiler.isChild()) return;
|
|
@@ -37,7 +37,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
});
|
|
38
38
|
const external_path_namespaceObject = require("path");
|
|
39
39
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
40
|
-
const
|
|
40
|
+
const plugin_check_syntax_namespaceObject = require("@rsbuild/plugin-check-syntax");
|
|
41
41
|
const external_browserslist_load_config_namespaceObject = require("browserslist-load-config");
|
|
42
42
|
const external_rule_cjs_namespaceObject = require("../../rule.cjs");
|
|
43
43
|
const types_namespaceObject = require("@rsdoctor/types");
|
|
@@ -66,7 +66,7 @@ const rule = (0, external_rule_cjs_namespaceObject.defineRule)(()=>({
|
|
|
66
66
|
if (!finalTargets.length && !ecmaVersion) return;
|
|
67
67
|
const buildConfig = null == (_configs_ = configs[0]) ? void 0 : _configs_.config;
|
|
68
68
|
const context = (null == buildConfig ? void 0 : buildConfig.context) || root;
|
|
69
|
-
const checkSyntax = new
|
|
69
|
+
const checkSyntax = new plugin_check_syntax_namespaceObject.CheckSyntax({
|
|
70
70
|
exclude,
|
|
71
71
|
excludeOutput,
|
|
72
72
|
ecmaVersion,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { CheckSyntax } from "
|
|
4
|
+
import { CheckSyntax } from "@rsbuild/plugin-check-syntax";
|
|
5
5
|
import { loadConfig } from "browserslist-load-config";
|
|
6
6
|
import { defineRule } from "../../rule.js";
|
|
7
7
|
import { Linter } from "@rsdoctor/types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -62,26 +62,26 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"browserslist-load-config": "^1.0.1",
|
|
65
|
+
"@rsbuild/plugin-check-syntax": "1.4.0",
|
|
65
66
|
"enhanced-resolve": "5.12.0",
|
|
66
67
|
"filesize": "^10.1.6",
|
|
67
68
|
"fs-extra": "^11.1.1",
|
|
68
69
|
"lodash-es": "^4.17.21",
|
|
69
|
-
"semver": "^7.7.
|
|
70
|
+
"semver": "^7.7.3",
|
|
70
71
|
"source-map": "^0.7.6",
|
|
71
|
-
"@rsdoctor/
|
|
72
|
-
"@rsdoctor/
|
|
73
|
-
"@rsdoctor/
|
|
74
|
-
"@rsdoctor/
|
|
72
|
+
"@rsdoctor/sdk": "1.3.2",
|
|
73
|
+
"@rsdoctor/types": "1.3.2",
|
|
74
|
+
"@rsdoctor/utils": "1.3.2",
|
|
75
|
+
"@rsdoctor/graph": "1.3.2"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"@rspack/core": "1.5.2",
|
|
78
|
+
"axios": "^1.12.2",
|
|
79
|
+
"@rspack/core": "1.5.8",
|
|
80
80
|
"@types/fs-extra": "^11.0.4",
|
|
81
81
|
"@types/lodash-es": "^4.17.12",
|
|
82
82
|
"@types/node": "^22.8.1",
|
|
83
|
-
"@types/node-fetch": "^2.6.
|
|
84
|
-
"@types/semver": "^7.7.
|
|
83
|
+
"@types/node-fetch": "^2.6.13",
|
|
84
|
+
"@types/semver": "^7.7.1",
|
|
85
85
|
"@types/tapable": "2.2.7",
|
|
86
86
|
"babel-loader": "10.0.0",
|
|
87
87
|
"prebundle": "1.4.2",
|