@rsdoctor/core 2.0.2 → 2.0.4
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/dist/e.js +3087 -83
- package/dist/e.js.LICENSE.txt +1 -1
- package/dist/index.js +13 -7
- package/dist/r.js +48 -34
- package/package.json +10 -16
package/dist/e.js.LICENSE.txt
CHANGED
package/dist/index.js
CHANGED
|
@@ -3172,8 +3172,9 @@ function build(dir, opts = {}) {
|
|
|
3172
3172
|
}));
|
|
3173
3173
|
let cc = null != opts.maxAge && `public,max-age=${opts.maxAge}`;
|
|
3174
3174
|
cc && opts.immutable ? cc += ',immutable' : cc && 0 === opts.maxAge && (cc += ',must-revalidate'), opts.dev || function totalist(dir, callback, pre = '') {
|
|
3175
|
-
|
|
3176
|
-
|
|
3175
|
+
dir = external_path_resolve('.', dir);
|
|
3176
|
+
let arr = readdirSync(dir), i = 0, abs, stats;
|
|
3177
|
+
for(; i < arr.length; i++)abs = external_path_join(dir, arr[i]), (stats = statSync(abs)).isDirectory() ? totalist(abs, callback, external_path_join(pre, arr[i])) : callback(external_path_join(pre, arr[i]), abs, stats);
|
|
3177
3178
|
}(dir, (name, abs, stats)=>{
|
|
3178
3179
|
if (/\.well-known[\\+\/]/.test(name)) ;
|
|
3179
3180
|
else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
|
|
@@ -3696,9 +3697,10 @@ class GraphAPI extends BaseAPI {
|
|
|
3696
3697
|
});
|
|
3697
3698
|
}
|
|
3698
3699
|
async getModuleGraphForAsset() {
|
|
3699
|
-
let { req } = this.ctx, { assetPath } = req.body;
|
|
3700
|
+
let { req } = this.ctx, { assetPath, withFileContent } = req.body;
|
|
3700
3701
|
return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetAssetDetails, {
|
|
3701
|
-
assetPath
|
|
3702
|
+
assetPath,
|
|
3703
|
+
withFileContent
|
|
3702
3704
|
});
|
|
3703
3705
|
}
|
|
3704
3706
|
async getChunksByModuleId() {
|
|
@@ -4071,7 +4073,10 @@ function getContentType(req) {
|
|
|
4071
4073
|
function normalizeReadError(error, charset) {
|
|
4072
4074
|
return error instanceof Error && 'status' in error && 'number' == typeof error.status ? charset && 'type' in error && 'encoding.unsupported' === error.type ? createHttpError(415, `unsupported charset "${charset.toUpperCase()}"`, 'charset.unsupported') : error : createHttpError(400, error instanceof Error ? error.message : 'failed to read request body', 'request.invalid');
|
|
4073
4075
|
}
|
|
4074
|
-
|
|
4076
|
+
let lib = rspackRequire("../../node_modules/.pnpm/cors@2.8.6/node_modules/cors/lib/index.js");
|
|
4077
|
+
var lib_default = compatGetDefaultExport(lib);
|
|
4078
|
+
let launch_editor = rspackRequire("../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/index.js");
|
|
4079
|
+
var launch_editor_default = compatGetDefaultExport(launch_editor);
|
|
4075
4080
|
let server_require = createRequire(import.meta.url), OPEN_IN_EDITOR_EDITORS = new Set(SDK.OPEN_IN_EDITOR_EDITORS), LARGE_JSON_BODY_ROUTES = new Set([
|
|
4076
4081
|
SDK.ServerAPI.API.ReportLoader,
|
|
4077
4082
|
SDK.ServerAPI.API.ReportSourceMap
|
|
@@ -4627,7 +4632,8 @@ function findRoot(startDir = process.cwd()) {
|
|
|
4627
4632
|
return firstPkgDir || null;
|
|
4628
4633
|
}
|
|
4629
4634
|
String((date = new Date()).getMonth() + 1).padStart(2, '0'), String(date.getDate()).padStart(2, '0'), date.getFullYear();
|
|
4630
|
-
|
|
4635
|
+
let lib_0 = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js");
|
|
4636
|
+
var lib_0_default = compatGetDefaultExport(lib_0);
|
|
4631
4637
|
class SDKCore {
|
|
4632
4638
|
constructor({ name, root }){
|
|
4633
4639
|
this.hooks = {
|
|
@@ -5311,7 +5317,7 @@ class RsdoctorSDKController {
|
|
|
5311
5317
|
return this.slaves.filter((item)=>this.activeSlaves.has(item));
|
|
5312
5318
|
}
|
|
5313
5319
|
}
|
|
5314
|
-
var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/core","version":"2.0.
|
|
5320
|
+
var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/core","version":"2.0.4","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/core"},"license":"MIT","type":"module","exports":{".":"./dist/index.js","./proxy-loader":"./dist/proxy-loader.js"},"main":"dist/index.js","types":"dist/index.d.ts","typesVersions":{"*":{".":["./dist/index.d.ts"],"proxy-loader":["./dist/proxy-loader.d.ts"]}},"files":["dist","static"],"scripts":{"build":"rs lib","dev":"npm run start","start":"rs lib -w","test":"rs test"},"dependencies":{"@rsdoctor/client":"workspace:*","@rsdoctor/shared":"workspace:*","@swc-next/parser":"0.6.1","caniuse-lite":"^1.0.30001826","sirv":"catalog:","source-map":"catalog:"},"devDependencies":{"@babel/code-frame":"7.26.2","@rsbuild/plugin-check-syntax":"catalog:","@rspack/core":"catalog:","@rspack/lite-tapable":"catalog:","@scripts/test-helper":"workspace:*","@swc-next/walker":"0.6.1","@types/babel__code-frame":"7.27.0","@types/cors":"2.8.19","@types/envinfo":"7.8.4","@types/estree":"catalog:","@types/fs-extra":"catalog:","@types/node":"catalog:","@types/semver":"^7.8.0","@types/ws":"^8.18.2","babel-loader":"10.1.1","browserslist-load-config":"^1.0.4","connect-next":"catalog:","cors":"2.8.6","envinfo":"7.21.0","filesize":"catalog:","fs-extra":"catalog:","get-port":"5.1.1","json-stream-stringify":"3.0.1","launch-editor":"^2.14.2","lines-and-columns":"2.0.4","open":"^11.0.4","raw-body":"4.0.0","rslog":"^2.3.0","semver":"^7.8.6","string-loader":"0.0.1","ts-loader":"^9.6.2","typescript":"catalog:","ws":"8.22.1"},"peerDependencies":{"@rspack/core":"^2.0.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"engines":{"node":"^20.19.0 || >=22.12.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
5315
5321
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
5316
5322
|
name: pluginTapName,
|
|
5317
5323
|
stage: 999
|
package/dist/r.js
CHANGED
|
@@ -10,7 +10,7 @@ import { EventEmitter } from "node:events";
|
|
|
10
10
|
import http from "http";
|
|
11
11
|
import os_0 from "os";
|
|
12
12
|
import { execFileSync as external_child_process_execFileSync } from "child_process";
|
|
13
|
-
import { Algorithm, Fetch, Graph, Loader, Lodash, Summary, Time } from "@rsdoctor/shared/common-browser";
|
|
13
|
+
import { Algorithm, Fetch, Graph, Loader, Lodash, Summary, Time, decycle } from "@rsdoctor/shared/common-browser";
|
|
14
14
|
import "process";
|
|
15
15
|
import { Asset, Chunk, ChunkGraph, Chunks, Dependency, EntryPoint, Module, extractCodeFromSourceLines, parseLocation } from "@rsdoctor/shared/graph";
|
|
16
16
|
import { Err, Linter, Manifest, Rule, SDK } from "@rsdoctor/shared/types";
|
|
@@ -39,7 +39,7 @@ moduleFactories.add({
|
|
|
39
39
|
BrowserslistError.prototype = Error.prototype, module.exports = BrowserslistError;
|
|
40
40
|
},
|
|
41
41
|
"../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/index.js" (module) {
|
|
42
|
-
var bbm = rspackRequire("../../node_modules/.pnpm/baseline-browser-mapping@2.10.29/node_modules/baseline-browser-mapping/dist/index.cjs"), jsReleases = rspackRequire("../../node_modules/.pnpm/node-releases@2.0.38/node_modules/node-releases/data/processed/envs.json"), agents = __rspack_createRequire_require("caniuse-lite/dist/unpacker/agents").agents, e2c = rspackRequire("../../node_modules/.pnpm/electron-to-chromium@1.5.353/node_modules/electron-to-chromium/versions.js"), jsEOL = rspackRequire("../../node_modules/.pnpm/node-releases@2.0.38/node_modules/node-releases/data/release-schedule/release-schedule.json"), path = __rspack_createRequire_require("path"), BrowserslistError = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/error.js"), env = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/node.js"), parseWithoutCache = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/parse.js"), YEAR = 365.259641 *
|
|
42
|
+
var bbm = rspackRequire("../../node_modules/.pnpm/baseline-browser-mapping@2.10.29/node_modules/baseline-browser-mapping/dist/index.cjs"), jsReleases = rspackRequire("../../node_modules/.pnpm/node-releases@2.0.38/node_modules/node-releases/data/processed/envs.json"), agents = __rspack_createRequire_require("caniuse-lite/dist/unpacker/agents").agents, e2c = rspackRequire("../../node_modules/.pnpm/electron-to-chromium@1.5.353/node_modules/electron-to-chromium/versions.js"), jsEOL = rspackRequire("../../node_modules/.pnpm/node-releases@2.0.38/node_modules/node-releases/data/release-schedule/release-schedule.json"), path = __rspack_createRequire_require("path"), BrowserslistError = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/error.js"), env = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/node.js"), parseWithoutCache = rspackRequire("../../node_modules/.pnpm/browserslist@4.28.2/node_modules/browserslist/parse.js"), YEAR = 365.259641 * 24 * 60 * 60 * 1000;
|
|
43
43
|
function isVersionsMatch(versionA, versionB) {
|
|
44
44
|
return 0 === (versionA + '.').indexOf(versionB + '.');
|
|
45
45
|
}
|
|
@@ -31832,16 +31832,16 @@ makeNamespaceObject(duplicate_package_types_namespaceObject), definePropertyGett
|
|
|
31832
31832
|
J: ()=>types_CheckVersionMap
|
|
31833
31833
|
});
|
|
31834
31834
|
let dist_rspack_createRequire_require = createRequire(import.meta.url);
|
|
31835
|
-
var
|
|
31835
|
+
var dist_webpack_modules_ = {}, dist_webpack_module_cache_ = {};
|
|
31836
31836
|
function dist_webpack_require_(moduleId) {
|
|
31837
|
-
var cachedModule =
|
|
31837
|
+
var cachedModule = dist_webpack_module_cache_[moduleId];
|
|
31838
31838
|
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
31839
|
-
var module =
|
|
31839
|
+
var module = dist_webpack_module_cache_[moduleId] = {
|
|
31840
31840
|
exports: {}
|
|
31841
31841
|
};
|
|
31842
|
-
return
|
|
31842
|
+
return dist_webpack_modules_[moduleId](module, module.exports, dist_webpack_require_), module.exports;
|
|
31843
31843
|
}
|
|
31844
|
-
dist_webpack_require_.m =
|
|
31844
|
+
dist_webpack_require_.m = dist_webpack_modules_, dist_webpack_require_.n = (module)=>{
|
|
31845
31845
|
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
31846
31846
|
return dist_webpack_require_.d(getter, {
|
|
31847
31847
|
a: getter
|
|
@@ -32663,17 +32663,31 @@ function getPort(expectPort, host) {
|
|
|
32663
32663
|
|
|
32664
32664
|
async function getAvailablePort(expectPort) {
|
|
32665
32665
|
let port = expectPort;
|
|
32666
|
+
let attempts = 0;
|
|
32666
32667
|
while (true) {
|
|
32667
32668
|
try {
|
|
32668
|
-
|
|
32669
|
-
return res;
|
|
32669
|
+
return await getPort(port, ${JSON.stringify(host)});
|
|
32670
32670
|
} catch (error) {
|
|
32671
|
-
port
|
|
32671
|
+
if (port === 0) throw error;
|
|
32672
|
+
if (error.code === 'EACCES') {
|
|
32673
|
+
port = 0;
|
|
32674
|
+
} else if (error.code === 'EADDRINUSE') {
|
|
32675
|
+
attempts++;
|
|
32676
|
+
port = attempts >= 20 || port === 65_535 ? 0 : port + 1;
|
|
32677
|
+
} else {
|
|
32678
|
+
throw error;
|
|
32679
|
+
}
|
|
32672
32680
|
}
|
|
32673
32681
|
}
|
|
32674
32682
|
}
|
|
32675
32683
|
|
|
32676
|
-
getAvailablePort(${port}).then(
|
|
32684
|
+
getAvailablePort(${port}).then(
|
|
32685
|
+
port => process.stdout.write(port.toString()),
|
|
32686
|
+
error => {
|
|
32687
|
+
process.stderr.write(String(error.code || error.message));
|
|
32688
|
+
process.exit(1);
|
|
32689
|
+
},
|
|
32690
|
+
);
|
|
32677
32691
|
})();
|
|
32678
32692
|
`.trim();
|
|
32679
32693
|
};
|
|
@@ -32708,7 +32722,8 @@ async function createServer(port, host = defaultHost) {
|
|
|
32708
32722
|
});
|
|
32709
32723
|
});
|
|
32710
32724
|
}
|
|
32711
|
-
|
|
32725
|
+
let envinfo = rspackRequire("../../node_modules/.pnpm/envinfo@7.21.0/node_modules/envinfo/dist/envinfo.js");
|
|
32726
|
+
var envinfo_default = compatGetDefaultExport(envinfo);
|
|
32712
32727
|
let helpers = envinfo_default().helpers;
|
|
32713
32728
|
envinfo_default().run;
|
|
32714
32729
|
let getCPUInfo = ()=>helpers.getCPUInfo().then((res)=>res[1]), getMemoryInfo = ()=>helpers.getMemoryInfo().then((res)=>res[1]), getNodeVersion = ()=>helpers.getNodeInfo().then((res)=>res[1]), getYarnVersion = ()=>helpers.getYarnInfo().then((res)=>res[1]), getNpmVersion = ()=>helpers.getnpmInfo().then((res)=>res[1]), getPnpmVersion = ()=>helpers.getpnpmInfo().then((res)=>res[1]);
|
|
@@ -32768,8 +32783,9 @@ function transformEsbuildError(err, opt) {
|
|
|
32768
32783
|
}
|
|
32769
32784
|
}
|
|
32770
32785
|
function transformBabelError(err, opt) {
|
|
32786
|
+
var input;
|
|
32771
32787
|
if ('code' in err && 'reasonCode' in err) {
|
|
32772
|
-
let lines, filePath, errorCode = opt?.code ?? err.code ?? 'BABEL', title = err.reasonCode, errorParsed = (filePath = (lines = stripVTControlCharacters(truncateMessage(
|
|
32788
|
+
let lines, filePath, errorCode = opt?.code ?? err.code ?? 'BABEL', title = err.reasonCode, errorParsed = (input = err.message, filePath = (lines = stripVTControlCharacters(truncateMessage(input)).split('\n'))[0].replace(/^([^:]+):.*/, '$1'), {
|
|
32773
32789
|
message: lines[0].replace(/.*: (.*) \(\d+:\d+\)*/, '$1'),
|
|
32774
32790
|
filePath,
|
|
32775
32791
|
lineText: lines.find((line)=>line.startsWith('> '))?.replace(/> \d+ \| /, '') ?? ''
|
|
@@ -33149,11 +33165,11 @@ let normalizeRspackUserOptions = function(config = {}) {
|
|
|
33149
33165
|
output: outputConfig
|
|
33150
33166
|
}, supports = {
|
|
33151
33167
|
parseBundle: defaultBoolean(userSupports.parseBundle, !0),
|
|
33152
|
-
gzip: (assert(void 0 ===
|
|
33153
|
-
gzipLevel: (
|
|
33168
|
+
gzip: (value = userSupports.gzip, assert(void 0 === value || 'boolean' == typeof value || 'object' == typeof value && null !== value && !Array.isArray(value), '`supports.gzip` must be a boolean or an object.'), !1 !== value && {
|
|
33169
|
+
gzipLevel: (gzipLevel = void 0 === (value1 = 'object' == typeof value && null !== value ? value.gzipLevel : void 0) ? 6 : value1, assert('number' == typeof gzipLevel && Number.isInteger(gzipLevel) && gzipLevel >= 0 && gzipLevel <= 9, '`supports.gzip.gzipLevel` must be an integer between 0 and 9.'), gzipLevel)
|
|
33154
33170
|
}),
|
|
33155
|
-
brotli: (assert(void 0 ===
|
|
33156
|
-
brotliLevel: (
|
|
33171
|
+
brotli: (value2 = userSupports.brotli, assert(void 0 === value2 || 'boolean' == typeof value2 || 'object' == typeof value2 && null !== value2 && !Array.isArray(value2), '`supports.brotli` must be a boolean or an object.'), !1 !== value2 && void 0 !== value2 && {
|
|
33172
|
+
brotliLevel: (brotliLevel = void 0 === (value3 = 'object' == typeof value2 && null !== value2 ? value2.brotliLevel : void 0) ? 6 : value3, assert('number' == typeof brotliLevel && Number.isInteger(brotliLevel) && brotliLevel >= 0 && brotliLevel <= 11, '`supports.brotli.brotliLevel` must be an integer between 0 and 11.'), brotliLevel)
|
|
33157
33173
|
})
|
|
33158
33174
|
}, disableClientServer = !!process.env.CI && 'true' !== process.env.RSTEST || userDisableClientServer;
|
|
33159
33175
|
assert('object' == typeof linter), assert('object' == typeof features || Array.isArray(features)), assert('object' == typeof loaderInterceptorOptions), assert('boolean' == typeof disableClientServer), assert('object' == typeof userServer && null !== userServer);
|
|
@@ -33744,7 +33760,7 @@ function safeCloneDeep(value, visited = new WeakMap()) {
|
|
|
33744
33760
|
function processCompilerConfig(config) {
|
|
33745
33761
|
let { plugins, infrastructureLogging: _infrastructureLogging, ...rest } = config, _rest = safeCloneDeep(rest);
|
|
33746
33762
|
return _rest.module?.defaultRules && makeRulesSerializable(_rest.module.defaultRules), _rest.module?.rules && makeRulesSerializable(_rest.module.rules), {
|
|
33747
|
-
..._rest,
|
|
33763
|
+
...decycle(_rest),
|
|
33748
33764
|
plugins: plugins.map((e)=>e?.constructor.name)
|
|
33749
33765
|
};
|
|
33750
33766
|
}
|
|
@@ -33829,8 +33845,8 @@ class InternalLoaderPlugin extends InternalBasePlugin {
|
|
|
33829
33845
|
try {
|
|
33830
33846
|
if (compilation.compiler && compilation.compiler !== compiler) return;
|
|
33831
33847
|
let wrapper = (callback)=>(loaderContext, module)=>{
|
|
33832
|
-
let
|
|
33833
|
-
let rawOptions = loader.options, opts = 'object' == typeof rawOptions && null !== rawOptions ? rawOptions : {};
|
|
33848
|
+
let proxyLoaders = module?.loaders || loaderContext?.loaders || [], contextLoaders = loaderContext?.loaders ?? [], originLoaders = proxyLoaders.map((loader, index)=>{
|
|
33849
|
+
let contextLoader = contextLoaders[index], rawOptions = loader.options ?? (contextLoader?.request === loader.loader ? contextLoader.options : void 0), opts = 'object' == typeof rawOptions && null !== rawOptions ? rawOptions : {};
|
|
33834
33850
|
return opts[Loader.LoaderInternalPropertyName] ? {
|
|
33835
33851
|
...loader,
|
|
33836
33852
|
loader: opts[Loader.LoaderInternalPropertyName].loader,
|
|
@@ -33839,17 +33855,12 @@ class InternalLoaderPlugin extends InternalBasePlugin {
|
|
|
33839
33855
|
}), newLoaders = safeCloneDeep(originLoaders);
|
|
33840
33856
|
if ('object' == typeof compiler.options.cache && 'version' in compiler.options.cache && 'string' == typeof compiler.options.cache.version && compiler.options.cache.version.indexOf('next/dist/build') > -1) callback(loaderContext, module || {});
|
|
33841
33857
|
else {
|
|
33842
|
-
let
|
|
33843
|
-
|
|
33844
|
-
|
|
33845
|
-
|
|
33846
|
-
|
|
33847
|
-
|
|
33848
|
-
})), Reflect.set(target, p, _newValue, receiver);
|
|
33849
|
-
},
|
|
33850
|
-
deleteProperty: (target, p)=>Reflect.deleteProperty(target, p)
|
|
33851
|
-
});
|
|
33852
|
-
callback(loaderContext, proxyModule);
|
|
33858
|
+
let hookModule = module || {}, savedLoaders = hookModule.loaders;
|
|
33859
|
+
try {
|
|
33860
|
+
hookModule.loaders = newLoaders, callback(loaderContext, hookModule), Array.isArray(hookModule.loaders) && (newLoaders = hookModule.loaders);
|
|
33861
|
+
} finally{
|
|
33862
|
+
hookModule.loaders = savedLoaders;
|
|
33863
|
+
}
|
|
33853
33864
|
}
|
|
33854
33865
|
isEqual(originLoaders, newLoaders) || (module.loaders = this.getInterceptRules(compiler, newLoaders.map((e)=>({
|
|
33855
33866
|
loader: e.loader,
|
|
@@ -34402,7 +34413,10 @@ let hasConsole = !1, ensureModulesChunksGraphFn = (compiler, _this)=>{
|
|
|
34402
34413
|
}(asset, assets, 'js/css'), map = mapFromAsset;
|
|
34403
34414
|
if (map) {
|
|
34404
34415
|
let outputPath = compilation.options.output?.path;
|
|
34405
|
-
outputPath && 'string' == typeof outputPath && assetName
|
|
34416
|
+
if (outputPath && 'string' == typeof outputPath && assetName) {
|
|
34417
|
+
let mapFileName = assetName.endsWith('.map') ? assetName : `${assetName}.map`;
|
|
34418
|
+
sourceMapPath = external_path_resolve(outputPath, mapFileName);
|
|
34419
|
+
}
|
|
34406
34420
|
} else {
|
|
34407
34421
|
let sourceMapFile = asset.info.related?.sourceMap, sourceMapFileAssetName = sourceMapFile?.replace(/(\.[^.]+)(\.[^.]+)?$/, '$1');
|
|
34408
34422
|
if (sourceMapFile) {
|
|
@@ -34759,12 +34773,12 @@ let loader_performance_optimization_rule = defineRule(()=>({
|
|
|
34759
34773
|
config: void 0
|
|
34760
34774
|
};
|
|
34761
34775
|
if (!config) return;
|
|
34762
|
-
let cwd = config.context || root, nodeModulesPathRegexp = /\/node_modules\//, resultMap = new Map(), loaders = loader.flatMap((el)=>el.loaders);
|
|
34776
|
+
let cwd = config.context || root, nodeModulesPathRegexp = /\/node_modules\//, resultMap = new Map(), loaders = loader.flatMap((el)=>el.loaders), getLoaderCosts = Loader.createLoaderCostsCalculator(loaders);
|
|
34763
34777
|
for (let item of loader){
|
|
34764
34778
|
let { path, ext } = item.resource;
|
|
34765
34779
|
utils_match(ext, extensions) && (nodeModulesPathRegexp.test(path) || !path.startsWith(cwd)) && item.loaders.forEach((el)=>{
|
|
34766
34780
|
if (utils_match(el.loader, ignore)) return;
|
|
34767
|
-
let costs =
|
|
34781
|
+
let costs = getLoaderCosts(el), v = {
|
|
34768
34782
|
...el,
|
|
34769
34783
|
__resource__: item.resource,
|
|
34770
34784
|
__costs__: costs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -9,14 +9,8 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
|
-
".":
|
|
13
|
-
|
|
14
|
-
"default": "./dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./proxy-loader": {
|
|
17
|
-
"types": "./dist/proxy-loader.d.ts",
|
|
18
|
-
"default": "./dist/proxy-loader.js"
|
|
19
|
-
}
|
|
12
|
+
".": "./dist/index.js",
|
|
13
|
+
"./proxy-loader": "./dist/proxy-loader.js"
|
|
20
14
|
},
|
|
21
15
|
"main": "dist/index.js",
|
|
22
16
|
"types": "dist/index.d.ts",
|
|
@@ -35,19 +29,20 @@
|
|
|
35
29
|
"static"
|
|
36
30
|
],
|
|
37
31
|
"dependencies": {
|
|
38
|
-
"@rsdoctor/client": "2.0.
|
|
39
|
-
"@rsdoctor/shared": "2.0.
|
|
40
|
-
"@swc-next/parser": "0.
|
|
41
|
-
"caniuse-lite": "^1.0.
|
|
32
|
+
"@rsdoctor/client": "2.0.4",
|
|
33
|
+
"@rsdoctor/shared": "2.0.4",
|
|
34
|
+
"@swc-next/parser": "0.6.1",
|
|
35
|
+
"caniuse-lite": "^1.0.30001826",
|
|
42
36
|
"sirv": "3.0.2",
|
|
43
37
|
"source-map": "^0.8.0"
|
|
44
38
|
},
|
|
45
39
|
"devDependencies": {
|
|
46
40
|
"@babel/code-frame": "7.26.2",
|
|
47
41
|
"@rsbuild/plugin-check-syntax": "^2.1.0",
|
|
48
|
-
"@rspack/core": "^2.3.
|
|
42
|
+
"@rspack/core": "^2.3.2",
|
|
49
43
|
"@rspack/lite-tapable": "^1.3.0",
|
|
50
44
|
"@scripts/test-helper": "0.1.1",
|
|
45
|
+
"@swc-next/walker": "0.6.1",
|
|
51
46
|
"@types/babel__code-frame": "7.27.0",
|
|
52
47
|
"@types/cors": "2.8.19",
|
|
53
48
|
"@types/envinfo": "7.8.4",
|
|
@@ -61,8 +56,7 @@
|
|
|
61
56
|
"connect-next": "5.0.0",
|
|
62
57
|
"cors": "2.8.6",
|
|
63
58
|
"envinfo": "7.21.0",
|
|
64
|
-
"
|
|
65
|
-
"filesize": "^11.0.29",
|
|
59
|
+
"filesize": "^11.0.32",
|
|
66
60
|
"fs-extra": "^11.1.1",
|
|
67
61
|
"get-port": "5.1.1",
|
|
68
62
|
"json-stream-stringify": "3.0.1",
|