@rsdoctor/core 1.3.1 → 1.3.3

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/compiled/axios/index.d.ts +5 -2
  3. package/compiled/axios/index.js +19 -21
  4. package/compiled/axios/package.json +1 -1
  5. package/dist/build-utils/build/loader/probeLoader.cjs +3 -2
  6. package/dist/build-utils/build/loader/probeLoader.js +1 -1
  7. package/dist/build-utils/build/module-graph/utils.cjs +12 -2
  8. package/dist/build-utils/build/module-graph/utils.js +1 -1
  9. package/dist/build-utils/build/module-graph/webpack/transform.cjs +3 -2
  10. package/dist/build-utils/build/module-graph/webpack/transform.js +1 -1
  11. package/dist/build-utils/build/utils/loader.cjs +8 -7
  12. package/dist/build-utils/build/utils/loader.js +4 -4
  13. package/dist/build-utils/build/utils/parseBundle.cjs +6 -3
  14. package/dist/build-utils/build/utils/parseBundle.js +2 -1
  15. package/dist/inner-plugins/loaders/proxy.cjs +11 -3
  16. package/dist/inner-plugins/loaders/proxy.d.ts +3 -0
  17. package/dist/inner-plugins/loaders/proxy.js +4 -2
  18. package/dist/inner-plugins/plugins/loader.cjs +19 -6
  19. package/dist/inner-plugins/plugins/loader.js +12 -2
  20. package/dist/inner-plugins/plugins/rules.cjs +13 -3
  21. package/dist/inner-plugins/plugins/rules.js +1 -1
  22. package/dist/inner-plugins/plugins/summary.cjs +15 -3
  23. package/dist/inner-plugins/plugins/summary.js +2 -1
  24. package/dist/inner-plugins/utils/loader.cjs +3 -2
  25. package/dist/inner-plugins/utils/loader.js +1 -1
  26. package/dist/inner-plugins/utils/plugin-common.cjs +3 -2
  27. package/dist/inner-plugins/utils/plugin-common.js +1 -1
  28. package/dist/rules/rules/cross-chunks-package/index.cjs +12 -2
  29. package/dist/rules/rules/cross-chunks-package/index.js +1 -1
  30. package/dist/rules/rules/ecma-version-check/index.cjs +2 -2
  31. package/dist/rules/rules/ecma-version-check/index.js +1 -1
  32. package/package.json +13 -13
  33. package/compiled/@rsbuild/plugin-check-syntax/index.js +0 -18008
  34. package/compiled/@rsbuild/plugin-check-syntax/license +0 -21
  35. package/compiled/@rsbuild/plugin-check-syntax/mappings.wasm +0 -0
  36. package/compiled/@rsbuild/plugin-check-syntax/package.json +0 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ This is the core package of Rsdoctor, providing core tools and analysis capabili
4
4
 
5
5
  ## Documentation
6
6
 
7
- https://rsdoctor.rs/
7
+ https://rsdoctor.rs/.
8
8
 
9
9
  ## Contributing
10
10
 
@@ -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: (RequestInfo | URL), init?: RequestInit) => Request;
360
- Response?: new (body?: (BodyInit | null), init?: ResponseInit) => Response;
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;
@@ -4348,11 +4348,11 @@ module.exports = require("zlib");
4348
4348
 
4349
4349
  /***/ }),
4350
4350
 
4351
- /***/ 1991:
4351
+ /***/ 5849:
4352
4352
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
4353
4353
 
4354
4354
  "use strict";
4355
- /*! Axios v1.12.0 Copyright (c) 2025 Matt Zabriskie and contributors */
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
- if (!skipUndefined || !isUndefined(val)) {
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.0";
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 = (({fetch, Request, Response}) => ({
8290
- fetch, Request, Response
8291
- }))(utils$1.global);
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
- const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
8308
- const isFetchSupported = isFunction(fetch);
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 ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
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 = utils$1.merge.call({
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__(1991);
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.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"axios","author":"Matt Zabriskie","version":"1.12.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -38,7 +38,8 @@ __webpack_require__.d(__webpack_exports__, {
38
38
  });
39
39
  const external_index_cjs_namespaceObject = require("../../index.cjs");
40
40
  const index_cjs_namespaceObject = require("../../../inner-plugins/index.cjs");
41
- const external_lodash_es_namespaceObject = require("lodash-es");
41
+ const omit_js_namespaceObject = require("lodash/omit.js");
42
+ var omit_js_default = /*#__PURE__*/ __webpack_require__.n(omit_js_namespaceObject);
42
43
  const external_path_namespaceObject = require("path");
43
44
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
44
45
  const loaderModule = function(...args) {
@@ -66,7 +67,7 @@ const loaderModule = function(...args) {
66
67
  result: 'end' === _options.type ? code : null,
67
68
  startAt: 'start' === _options.type ? time : 0,
68
69
  endAt: 'end' === _options.type ? time : 0,
69
- options: (0, external_lodash_es_namespaceObject.omit)(_options.options, 'type'),
70
+ options: omit_js_default()(_options.options, 'type'),
70
71
  isPitch: false,
71
72
  sync: false,
72
73
  errors: [],
@@ -2,7 +2,7 @@ import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import { Build } from "../../index.js";
4
4
  import { getSDK } from "../../../inner-plugins/index.js";
5
- import { omit } from "lodash-es";
5
+ import omit from "lodash/omit.js";
6
6
  import path from "path";
7
7
  const loaderModule = function(...args) {
8
8
  var _this__module, _this__module1;
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
3
12
  (()=>{
4
13
  __webpack_require__.d = (exports1, definition)=>{
5
14
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -27,7 +36,8 @@ __webpack_require__.d(__webpack_exports__, {
27
36
  getDeclarationIdentifier: ()=>getDeclarationIdentifier,
28
37
  getExportIdentifierStatement: ()=>getExportIdentifierStatement
29
38
  });
30
- const external_lodash_es_namespaceObject = require("lodash-es");
39
+ const isNumber_js_namespaceObject = require("lodash/isNumber.js");
40
+ var isNumber_js_default = /*#__PURE__*/ __webpack_require__.n(isNumber_js_namespaceObject);
31
41
  const ruleUtils_namespaceObject = require("@rsdoctor/utils/ruleUtils");
32
42
  function getDefaultExportIdentifier(node, module, searchId) {
33
43
  var _node_declaration_loc;
@@ -44,7 +54,7 @@ function getDefaultExportIdentifier(node, module, searchId) {
44
54
  if (null == (_declaration_id = declaration.id) ? void 0 : _declaration_id.loc) return module.getStatement(declaration.id.loc);
45
55
  }
46
56
  const startLine = null == (_node_declaration_loc = node.declaration.loc) ? void 0 : _node_declaration_loc.start.line;
47
- if (!(0, external_lodash_es_namespaceObject.isNumber)(startLine)) return;
57
+ if (!isNumber_js_default()(startLine)) return;
48
58
  const { transformed } = module.getSource();
49
59
  const endColumn = transformed.split('\n')[startLine - 1].length - 1;
50
60
  return module.getStatement({
@@ -1,6 +1,6 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
- import { isNumber } from "lodash-es";
3
+ import isNumber from "lodash/isNumber.js";
4
4
  import { parser } from "@rsdoctor/utils/ruleUtils";
5
5
  function getDefaultExportIdentifier(node, module, searchId) {
6
6
  var _node_declaration_loc;
@@ -40,7 +40,8 @@ const external_node_fs_namespaceObject = require("node:fs");
40
40
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
41
41
  const graph_namespaceObject = require("@rsdoctor/graph");
42
42
  const external_parser_cjs_namespaceObject = require("../parser.cjs");
43
- const external_lodash_es_namespaceObject = require("lodash-es");
43
+ const isFunction_js_namespaceObject = require("lodash/isFunction.js");
44
+ var isFunction_js_default = /*#__PURE__*/ __webpack_require__.n(isFunction_js_namespaceObject);
44
45
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
45
46
  async function readFile(target, wbFs) {
46
47
  var _wbFs_fs;
@@ -112,7 +113,7 @@ async function appendModuleData(origin, webpackGraph, graph, wbFs, features, con
112
113
  module.setProgram(program);
113
114
  module.meta.hasSetEsModuleStatement = (0, external_parser_cjs_namespaceObject.hasSetEsModuleStatement)(program);
114
115
  }
115
- const transformed = graph_namespaceObject.Webpack.isExternalModule(origin) ? '' : module.getSource().transformed.length > 0 ? module.getSource().transformed : (0, external_lodash_es_namespaceObject.isFunction)(null == origin ? void 0 : origin.originalSource) ? (null == (_origin_originalSource = origin.originalSource()) ? void 0 : null == (_origin_originalSource_source = _origin_originalSource.source()) ? void 0 : _origin_originalSource_source.toString()) ?? '' : '';
116
+ const transformed = graph_namespaceObject.Webpack.isExternalModule(origin) ? '' : module.getSource().transformed.length > 0 ? module.getSource().transformed : isFunction_js_default()(null == origin ? void 0 : origin.originalSource) ? (null == (_origin_originalSource = origin.originalSource()) ? void 0 : null == (_origin_originalSource_source = _origin_originalSource.source()) ? void 0 : _origin_originalSource_source.toString()) ?? '' : '';
116
117
  const transformedSize = graph_namespaceObject.Webpack.isExternalModule(origin) ? 0 : module.getSize().transformedSize > 0 ? module.getSize().transformedSize : Buffer.from(transformed).byteLength;
117
118
  module.setSource({
118
119
  transformed,
@@ -3,7 +3,7 @@ import 'module';
3
3
  import node_fs from "node:fs";
4
4
  import { ModuleGraphTrans, Webpack } from "@rsdoctor/graph";
5
5
  import { hasSetEsModuleStatement } from "../parser.js";
6
- import { isFunction } from "lodash-es";
6
+ import isFunction from "lodash/isFunction.js";
7
7
  import { logger } from "@rsdoctor/utils/logger";
8
8
  async function readFile(target, wbFs) {
9
9
  var _wbFs_fs;
@@ -64,9 +64,10 @@ 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 esm_namespaceObject = require("fs-extra/esm");
68
- var esm_default = /*#__PURE__*/ __webpack_require__.n(esm_namespaceObject);
69
- const external_lodash_es_namespaceObject = require("lodash-es");
67
+ const external_fs_extra_namespaceObject = require("fs-extra");
68
+ var external_fs_extra_default = /*#__PURE__*/ __webpack_require__.n(external_fs_extra_namespaceObject);
69
+ const omit_js_namespaceObject = require("lodash/omit.js");
70
+ var omit_js_default = /*#__PURE__*/ __webpack_require__.n(omit_js_namespaceObject);
70
71
  const common_namespaceObject = require("@rsdoctor/utils/common");
71
72
  const graph_namespaceObject = require("@rsdoctor/graph");
72
73
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
@@ -175,11 +176,11 @@ var __webpack_exports__ = {};
175
176
  if (isPath) {
176
177
  const packageJsonData = (0, graph_namespaceObject.readPackageJson)(_loaderName, (file)=>{
177
178
  try {
178
- return esm_default().readJsonSync(file, {
179
+ return external_fs_extra_default().readJsonSync(file, {
179
180
  encoding: 'utf8'
180
181
  });
181
182
  } catch (e) {
182
- logger_namespaceObject.logger.debug(`isESMLoader function error\u{FF1A}${e}`);
183
+ logger_namespaceObject.logger.debug(`isESMLoader function error:${e}`);
183
184
  }
184
185
  });
185
186
  if ((null == packageJsonData ? void 0 : packageJsonData.type) === 'module' && !(null == packageJsonData ? void 0 : packageJsonData.name.includes('@rsdoctor/'))) return true;
@@ -289,7 +290,7 @@ var __webpack_exports__ = {};
289
290
  }
290
291
  if ('object' == typeof target.query) {
291
292
  const options = target.query[common_namespaceObject.Loader.LoaderInternalPropertyName];
292
- if (options.hasOptions) return (0, external_lodash_es_namespaceObject.omit)(target.query, [
293
+ if (options.hasOptions) return omit_js_default()(target.query, [
293
294
  common_namespaceObject.Loader.LoaderInternalPropertyName
294
295
  ]);
295
296
  const innerLoaderPath = null == options ? void 0 : options.loader;
@@ -299,7 +300,7 @@ var __webpack_exports__ = {};
299
300
  }
300
301
  return Reflect.get(target, key, receiver);
301
302
  case 'getOptions':
302
- return 'function' == typeof target.getOptions ? ()=>(0, external_lodash_es_namespaceObject.omit)(target.getOptions(), [
303
+ return 'function' == typeof target.getOptions ? ()=>omit_js_default()(target.getOptions(), [
303
304
  common_namespaceObject.Loader.LoaderInternalPropertyName
304
305
  ]) : Reflect.get(target, key, receiver);
305
306
  default:
@@ -3,8 +3,8 @@ 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 esm from "fs-extra/esm";
7
- import { omit } from "lodash-es";
6
+ import fs_extra from "fs-extra";
7
+ import omit from "lodash/omit.js";
8
8
  import { Loader } from "@rsdoctor/utils/common";
9
9
  import { readPackageJson } from "@rsdoctor/graph";
10
10
  import { logger } from "@rsdoctor/utils/logger";
@@ -128,11 +128,11 @@ function isESMLoader(r) {
128
128
  if (isPath) {
129
129
  const packageJsonData = readPackageJson(_loaderName, (file)=>{
130
130
  try {
131
- return esm.readJsonSync(file, {
131
+ return fs_extra.readJsonSync(file, {
132
132
  encoding: 'utf8'
133
133
  });
134
134
  } catch (e) {
135
- logger.debug(`isESMLoader function error\u{FF1A}${e}`);
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;
@@ -37,7 +37,10 @@ __webpack_require__.d(__webpack_exports__, {
37
37
  });
38
38
  const external_fs_namespaceObject = require("fs");
39
39
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
40
- const external_lodash_es_namespaceObject = require("lodash-es");
40
+ const find_js_namespaceObject = require("lodash/find.js");
41
+ var find_js_default = /*#__PURE__*/ __webpack_require__.n(find_js_namespaceObject);
42
+ const mapValues_js_namespaceObject = require("lodash/mapValues.js");
43
+ var mapValues_js_default = /*#__PURE__*/ __webpack_require__.n(mapValues_js_namespaceObject);
41
44
  const external_filesize_namespaceObject = require("filesize");
42
45
  const ruleUtils_namespaceObject = require("@rsdoctor/utils/ruleUtils");
43
46
  const external_path_namespaceObject = require("path");
@@ -139,14 +142,14 @@ const parseBundle = (bundlePath, modulesData)=>{
139
142
  }
140
143
  });
141
144
  let modules;
142
- modules = walkState.locations ? (0, external_lodash_es_namespaceObject.mapValues)(walkState.locations, (loc)=>content.slice(loc.start, loc.end)) : {};
145
+ modules = walkState.locations ? mapValues_js_default()(walkState.locations, (loc)=>content.slice(loc.start, loc.end)) : {};
143
146
  const modulesObj = {};
144
147
  for(const module in modules){
145
148
  var _find;
146
149
  if (!module) return {};
147
150
  const moduleContent = modules[module];
148
151
  const size = moduleContent && Buffer.byteLength(moduleContent);
149
- const identifier = (null == (_find = (0, external_lodash_es_namespaceObject.find)(modulesData, {
152
+ const identifier = (null == (_find = find_js_default()(modulesData, {
150
153
  renderId: module
151
154
  })) ? void 0 : _find.webpackId) || '';
152
155
  modulesObj[identifier] = {
@@ -1,7 +1,8 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import fs from "fs";
4
- import { find, mapValues } from "lodash-es";
4
+ import find from "lodash/find.js";
5
+ import mapValues from "lodash/mapValues.js";
5
6
  import { filesize } from "filesize";
6
7
  import { parser } from "@rsdoctor/utils/ruleUtils";
7
8
  import { extname } from "path";
@@ -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
- default: ()=>proxy
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
- loaderModule.pitch = function() {
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
- loaderModule.pitch = function() {
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 };
@@ -40,7 +40,12 @@ __webpack_require__.d(__webpack_exports__, {
40
40
  });
41
41
  const types_namespaceObject = require("@rsdoctor/types");
42
42
  const common_namespaceObject = require("@rsdoctor/utils/common");
43
- const external_lodash_es_namespaceObject = require("lodash-es");
43
+ const cloneDeep_js_namespaceObject = require("lodash/cloneDeep.js");
44
+ var cloneDeep_js_default = /*#__PURE__*/ __webpack_require__.n(cloneDeep_js_namespaceObject);
45
+ const isEqual_js_namespaceObject = require("lodash/isEqual.js");
46
+ var isEqual_js_default = /*#__PURE__*/ __webpack_require__.n(isEqual_js_namespaceObject);
47
+ const omit_js_namespaceObject = require("lodash/omit.js");
48
+ var omit_js_default = /*#__PURE__*/ __webpack_require__.n(omit_js_namespaceObject);
44
49
  const index_cjs_namespaceObject = require("../utils/index.cjs");
45
50
  const external_base_cjs_namespaceObject = require("./base.cjs");
46
51
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
@@ -70,11 +75,11 @@ class InternalLoaderPlugin extends external_base_cjs_namespaceObject.InternalBas
70
75
  if (opts[common_namespaceObject.Loader.LoaderInternalPropertyName]) return {
71
76
  ...loader,
72
77
  loader: opts[common_namespaceObject.Loader.LoaderInternalPropertyName].loader,
73
- options: (0, external_lodash_es_namespaceObject.omit)(opts, common_namespaceObject.Loader.LoaderInternalPropertyName)
78
+ options: omit_js_default()(opts, common_namespaceObject.Loader.LoaderInternalPropertyName)
74
79
  };
75
80
  return loader;
76
81
  });
77
- const newLoaders = (0, external_lodash_es_namespaceObject.cloneDeep)(originLoaders);
82
+ const newLoaders = cloneDeep_js_default()(originLoaders);
78
83
  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 || {});
79
84
  else {
80
85
  const proxyModule = new Proxy(module || {}, {
@@ -83,7 +88,7 @@ class InternalLoaderPlugin extends external_base_cjs_namespaceObject.InternalBas
83
88
  return Reflect.get(target, p, receiver);
84
89
  },
85
90
  set (target, p, newValue, receiver) {
86
- const _newValue = (0, external_lodash_es_namespaceObject.cloneDeep)(newValue);
91
+ const _newValue = cloneDeep_js_default()(newValue);
87
92
  if ('loaders' === p) {
88
93
  if (Array.isArray(_newValue)) {
89
94
  newLoaders.length = 0;
@@ -100,7 +105,7 @@ class InternalLoaderPlugin extends external_base_cjs_namespaceObject.InternalBas
100
105
  });
101
106
  callback(loaderContext, proxyModule);
102
107
  }
103
- if (!(0, external_lodash_es_namespaceObject.isEqual)(originLoaders, newLoaders)) {
108
+ if (!isEqual_js_default()(originLoaders, newLoaders)) {
104
109
  const rules = this.getInterceptRules(compiler, newLoaders.map((e)=>({
105
110
  loader: e.loader,
106
111
  options: e.options
@@ -132,7 +137,15 @@ class InternalLoaderPlugin extends external_base_cjs_namespaceObject.InternalBas
132
137
  }, this.sdk.root, 'resolveLoader' in compiler.options ? compiler.options.resolveLoader : {});
133
138
  }
134
139
  constructor(...args){
135
- super(...args), this.name = 'loader', this.internalLoaderPath = require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.cjs")), this.afterPlugins = (compiler)=>{
140
+ super(...args), this.name = 'loader', this.internalLoaderPath = (()=>{
141
+ const isCJS = loader_filename.endsWith('.cjs');
142
+ if (isCJS) return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.cjs"));
143
+ try {
144
+ return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.js"));
145
+ } catch {
146
+ return require.resolve(external_path_default().join(loader_dirname, "../loaders/proxy.cjs"));
147
+ }
148
+ })(), this.afterPlugins = (compiler)=>{
136
149
  (0, logger_namespaceObject.time)('InternalLoaderPlugin.afterPlugins');
137
150
  try {
138
151
  if (compiler.isChild()) return;
@@ -2,7 +2,9 @@ import __rslib_shim_module__ from 'module';
2
2
  const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
3
3
  import { Manifest } from "@rsdoctor/types";
4
4
  import { Loader } from "@rsdoctor/utils/common";
5
- import { cloneDeep, isEqual, omit } from "lodash-es";
5
+ import cloneDeep from "lodash/cloneDeep.js";
6
+ import isEqual from "lodash/isEqual.js";
7
+ import omit from "lodash/omit.js";
6
8
  import { interceptLoader } from "../utils/index.js";
7
9
  import { InternalBasePlugin } from "./base.js";
8
10
  import { time, timeEnd } from "@rsdoctor/utils/logger";
@@ -93,7 +95,15 @@ class InternalLoaderPlugin extends InternalBasePlugin {
93
95
  }, this.sdk.root, 'resolveLoader' in compiler.options ? compiler.options.resolveLoader : {});
94
96
  }
95
97
  constructor(...args){
96
- super(...args), this.name = 'loader', this.internalLoaderPath = require.resolve(path.join(loader_dirname, "../loaders/proxy.cjs")), this.afterPlugins = (compiler)=>{
98
+ super(...args), this.name = 'loader', this.internalLoaderPath = (()=>{
99
+ const isCJS = loader_filename.endsWith('.cjs');
100
+ if (isCJS) return require.resolve(path.join(loader_dirname, "../loaders/proxy.cjs"));
101
+ try {
102
+ return require.resolve(path.join(loader_dirname, "../loaders/proxy.js"));
103
+ } catch {
104
+ return require.resolve(path.join(loader_dirname, "../loaders/proxy.cjs"));
105
+ }
106
+ })(), this.afterPlugins = (compiler)=>{
97
107
  time('InternalLoaderPlugin.afterPlugins');
98
108
  try {
99
109
  if (compiler.isChild()) return;
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
3
12
  (()=>{
4
13
  __webpack_require__.d = (exports1, definition)=>{
5
14
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -29,7 +38,8 @@ __webpack_require__.d(__webpack_exports__, {
29
38
  const external_base_cjs_namespaceObject = require("./base.cjs");
30
39
  const index_cjs_namespaceObject = require("../../rules/index.cjs");
31
40
  const error_namespaceObject = require("@rsdoctor/utils/error");
32
- const external_lodash_es_namespaceObject = require("lodash-es");
41
+ const pull_js_namespaceObject = require("lodash/pull.js");
42
+ var pull_js_default = /*#__PURE__*/ __webpack_require__.n(pull_js_namespaceObject);
33
43
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
34
44
  class InternalRulesPlugin extends external_base_cjs_namespaceObject.InternalBasePlugin {
35
45
  apply(compiler) {
@@ -56,8 +66,8 @@ class InternalRulesPlugin extends external_base_cjs_namespaceObject.InternalBase
56
66
  const warnings = validateErrors.filter((item)=>'Warn' === item.level);
57
67
  const toWebpackError = (err)=>err.toError();
58
68
  result.replace.forEach((item)=>{
59
- if (Array.isArray(compilation.errors) && compilation.errors.includes(item)) (0, external_lodash_es_namespaceObject.pull)(compilation.errors, item);
60
- if (Array.isArray(compilation.warnings) && compilation.warnings.includes(item)) (0, external_lodash_es_namespaceObject.pull)(compilation.warnings, item);
69
+ if (Array.isArray(compilation.errors) && compilation.errors.includes(item)) pull_js_default()(compilation.errors, item);
70
+ if (Array.isArray(compilation.warnings) && compilation.warnings.includes(item)) pull_js_default()(compilation.warnings, item);
61
71
  });
62
72
  if (Array.isArray(compilation.errors)) errors.forEach((err)=>{
63
73
  compilation.warnings.push(toWebpackError(err));
@@ -3,7 +3,7 @@ import 'module';
3
3
  import { InternalBasePlugin } from "./base.js";
4
4
  import { Linter } from "../../rules/index.js";
5
5
  import { DevToolError } from "@rsdoctor/utils/error";
6
- import { pull } from "lodash-es";
6
+ import pull from "lodash/pull.js";
7
7
  import { time, timeEnd } from "@rsdoctor/utils/logger";
8
8
  class InternalRulesPlugin extends InternalBasePlugin {
9
9
  apply(compiler) {
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
3
12
  (()=>{
4
13
  __webpack_require__.d = (exports1, definition)=>{
5
14
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -27,7 +36,10 @@ __webpack_require__.d(__webpack_exports__, {
27
36
  InternalSummaryPlugin: ()=>InternalSummaryPlugin
28
37
  });
29
38
  const common_namespaceObject = require("@rsdoctor/utils/common");
30
- const external_lodash_es_namespaceObject = require("lodash-es");
39
+ const minBy_js_namespaceObject = require("lodash/minBy.js");
40
+ var minBy_js_default = /*#__PURE__*/ __webpack_require__.n(minBy_js_namespaceObject);
41
+ const sumBy_js_namespaceObject = require("lodash/sumBy.js");
42
+ var sumBy_js_default = /*#__PURE__*/ __webpack_require__.n(sumBy_js_namespaceObject);
31
43
  const external_base_cjs_namespaceObject = require("./base.cjs");
32
44
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
33
45
  class InternalSummaryPlugin extends external_base_cjs_namespaceObject.InternalBasePlugin {
@@ -104,8 +116,8 @@ class InternalSummaryPlugin extends external_base_cjs_namespaceObject.InternalBa
104
116
  costs: [
105
117
  {
106
118
  name: common_namespaceObject.Summary.SummaryCostsDataName.Minify,
107
- startAt: (0, external_lodash_es_namespaceObject.minBy)(minifyHookData, (e)=>e.startAt).startAt,
108
- costs: (0, external_lodash_es_namespaceObject.sumBy)(minifyHookData, (e)=>e.costs)
119
+ startAt: minBy_js_default()(minifyHookData, (e)=>e.startAt).startAt,
120
+ costs: sumBy_js_default()(minifyHookData, (e)=>e.costs)
109
121
  }
110
122
  ]
111
123
  });
@@ -1,7 +1,8 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import { Summary } from "@rsdoctor/utils/common";
4
- import { minBy, sumBy } from "lodash-es";
4
+ import minBy from "lodash/minBy.js";
5
+ import sumBy from "lodash/sumBy.js";
5
6
  import { InternalBasePlugin } from "./base.js";
6
7
  import { time, timeEnd } from "@rsdoctor/utils/logger";
7
8
  class InternalSummaryPlugin extends InternalBasePlugin {
@@ -46,7 +46,8 @@ const external_enhanced_resolve_namespaceObject = require("enhanced-resolve");
46
46
  var external_enhanced_resolve_default = /*#__PURE__*/ __webpack_require__.n(external_enhanced_resolve_namespaceObject);
47
47
  const external_fs_namespaceObject = require("fs");
48
48
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
49
- const external_lodash_es_namespaceObject = require("lodash-es");
49
+ const omit_js_namespaceObject = require("lodash/omit.js");
50
+ var omit_js_default = /*#__PURE__*/ __webpack_require__.n(omit_js_namespaceObject);
50
51
  const external_path_namespaceObject = require("path");
51
52
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
52
53
  const logger_namespaceObject = require("@rsdoctor/utils/logger");
@@ -65,7 +66,7 @@ function getInternalLoaderOptions(loaderContext) {
65
66
  function getLoaderOptionsWithoutInternalKeys(loaderContext) {
66
67
  const options = loaderContext.getOptions();
67
68
  const circlePaths = [];
68
- const loaderOptions = (0, external_lodash_es_namespaceObject.omit)(options, [
69
+ const loaderOptions = omit_js_default()(options, [
69
70
  common_namespaceObject.Loader.LoaderInternalPropertyName
70
71
  ]);
71
72
  (0, external_circleDetect_cjs_namespaceObject.checkCirclePath)(loaderOptions, [], circlePaths, 0);