@rsbuild/core 2.1.4 → 2.1.6

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 (38) hide show
  1. package/compiled/@rstackjs/load-config/index.d.ts +66 -0
  2. package/compiled/@rstackjs/load-config/license +21 -0
  3. package/compiled/@rstackjs/load-config/package.json +1 -0
  4. package/compiled/css-loader/index.js +2 -2
  5. package/compiled/html-rspack-plugin/index.d.ts +4 -4
  6. package/compiled/html-rspack-plugin/index.js +53 -48
  7. package/compiled/http-proxy-middleware/index.d.ts +2 -1
  8. package/compiled/http-proxy-middleware/package.json +1 -1
  9. package/compiled/jiti/dist/babel.cjs +49 -2
  10. package/compiled/postcss/index.js +1 -1
  11. package/compiled/postcss/package.json +1 -1
  12. package/compiled/postcss-loader/index.js +6 -6
  13. package/compiled/rslog/index.d.ts +7 -14
  14. package/compiled/rslog/package.json +1 -1
  15. package/dist/{756.js → 711.js} +162 -237
  16. package/dist/chokidar.js +33 -33
  17. package/dist/client/hmr.js +1 -1
  18. package/dist/client/overlay.js +1 -1
  19. package/dist/connect-next.js +3 -3
  20. package/dist/cssUrlLoader.mjs +1 -1
  21. package/dist/http-proxy-middleware.js +29 -10
  22. package/dist/ignoreCssLoader.mjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/launch-editor-middleware.js +1 -1
  25. package/dist/manifest-plugin.js +38 -34
  26. package/dist/memfs.js +370 -202
  27. package/dist/sirv.js +7 -7
  28. package/dist/ws.js +1 -1
  29. package/dist-types/configChain.d.ts +1 -0
  30. package/dist-types/constants.d.ts +2 -0
  31. package/dist-types/loadConfig.d.ts +4 -39
  32. package/dist-types/types/config.d.ts +7 -5
  33. package/package.json +9 -8
  34. package/types.d.ts +24 -0
  35. /package/dist/{349.js → 252.js} +0 -0
  36. /package/dist/{756.js.LICENSE.txt → 711.js.LICENSE.txt} +0 -0
  37. /package/dist/client/{60.js → 307.js} +0 -0
  38. /package/dist/{fresh-import.js → freshImport.js} +0 -0
@@ -20,9 +20,9 @@ type AsArray<T> = T extends any[] ? T : [T];
20
20
  type Fn<T, R> = (...args: AsArray<T>) => R;
21
21
  type FnAsync<T, R> = (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void;
22
22
  type FnPromise<T, R> = (...args: AsArray<T>) => Promise<R>;
23
- declare class UnsetAdditionalOptions {
23
+ type UnsetAdditionalOptions = {
24
24
  _UnsetAdditionalOptions: true;
25
- }
25
+ };
26
26
  type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
27
27
  type Callback<E, T> = (error: E | null, result?: T) => void;
28
28
  type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
@@ -38,7 +38,7 @@ type TapOptions = {
38
38
  stage?: number;
39
39
  };
40
40
  type Options<AdditionalOptions = UnsetAdditionalOptions> = string | (Tap & IfSet<AdditionalOptions>);
41
- interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
41
+ interface HookInterceptor<_T, R, AdditionalOptions = UnsetAdditionalOptions> {
42
42
  name?: string;
43
43
  tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
44
44
  call?: (...args: any[]) => void;
@@ -75,7 +75,7 @@ declare class HookBase<T, R, AdditionalOptions = UnsetAdditionalOptions> impleme
75
75
  withOptions(options: TapOptions & IfSet<AdditionalOptions>): Hook<T, R, AdditionalOptions>;
76
76
  isUsed(): boolean;
77
77
  queryStageRange(stageRange: StageRange): QueriedHook<T, R, AdditionalOptions>;
78
- callAsyncStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: Append<AsArray<T>, Callback<Error, R>>): void;
78
+ callAsyncStageRange(_queried: QueriedHook<T, R, AdditionalOptions>, ..._args: Append<AsArray<T>, Callback<Error, R>>): void;
79
79
  callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
80
80
  promiseStageRange(queried: QueriedHook<T, R, AdditionalOptions>, ...args: AsArray<T>): Promise<R>;
81
81
  promise(...args: AsArray<T>): Promise<R>;
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 776: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 54: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(469);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(567);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -311,7 +311,7 @@
311
311
  }
312
312
  module.exports = { CachedChildCompilation };
313
313
  },
314
- 469: (module) => {
314
+ 567: (module) => {
315
315
  "use strict";
316
316
  class HtmlWebpackChildCompiler {
317
317
  constructor(templates) {
@@ -480,7 +480,7 @@
480
480
  }
481
481
  module.exports = { HtmlWebpackChildCompiler };
482
482
  },
483
- 67: (module) => {
483
+ 525: (module) => {
484
484
  "use strict";
485
485
  module.exports = {};
486
486
  module.exports.none = (chunks) => chunks;
@@ -499,7 +499,7 @@
499
499
  };
500
500
  module.exports.auto = module.exports.none;
501
501
  },
502
- 262: (module) => {
502
+ 468: (module) => {
503
503
  "use strict";
504
504
  module.exports = function (err) {
505
505
  return {
@@ -523,9 +523,9 @@
523
523
  };
524
524
  };
525
525
  },
526
- 917: (module, __unused_webpack_exports, __nccwpck_require__) => {
526
+ 627: (module, __unused_webpack_exports, __nccwpck_require__) => {
527
527
  "use strict";
528
- const { AsyncSeriesWaterfallHook } = __nccwpck_require__(159);
528
+ const { AsyncSeriesWaterfallHook } = __nccwpck_require__(517);
529
529
  const htmlWebpackPluginHooksMap = new WeakMap();
530
530
  function getHtmlRspackPluginHooks(compilation) {
531
531
  let hooks = htmlWebpackPluginHooksMap.get(compilation);
@@ -549,7 +549,7 @@
549
549
  }
550
550
  module.exports = { getHtmlRspackPluginHooks };
551
551
  },
552
- 492: (module) => {
552
+ 773: (module) => {
553
553
  const voidTags = [
554
554
  "area",
555
555
  "base",
@@ -617,19 +617,19 @@
617
617
  htmlTagObjectToString,
618
618
  };
619
619
  },
620
- 345: (module, __unused_webpack_exports, __nccwpck_require__) => {
620
+ 403: (module, __unused_webpack_exports, __nccwpck_require__) => {
621
621
  "use strict";
622
622
  const promisify = __nccwpck_require__(23).promisify;
623
623
  const vm = __nccwpck_require__(154);
624
624
  const fs = __nccwpck_require__(896);
625
625
  const path = __nccwpck_require__(928);
626
- const { CachedChildCompilation } = __nccwpck_require__(776);
626
+ const { CachedChildCompilation } = __nccwpck_require__(54);
627
627
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
628
- __nccwpck_require__(492);
629
- const prettyError = __nccwpck_require__(262);
630
- const chunkSorter = __nccwpck_require__(67);
628
+ __nccwpck_require__(773);
629
+ const prettyError = __nccwpck_require__(468);
630
+ const chunkSorter = __nccwpck_require__(525);
631
631
  const getHtmlRspackPluginHooks =
632
- __nccwpck_require__(917).getHtmlRspackPluginHooks;
632
+ __nccwpck_require__(627).getHtmlRspackPluginHooks;
633
633
  const WITH_PLACEHOLDER = "function __with_placeholder__";
634
634
  class HtmlRspackPlugin {
635
635
  constructor(userOptions = {}) {
@@ -1528,20 +1528,24 @@
1528
1528
  "use strict";
1529
1529
  module.exports = require("vm");
1530
1530
  },
1531
- 159: (__unused_webpack_module, exports) => {
1531
+ 517: (__unused_webpack_module, exports) => {
1532
1532
  "use strict";
1533
1533
  var __nested_webpack_require_18__ = {};
1534
1534
  (() => {
1535
- __nested_webpack_require_18__.d = (exports1, definition) => {
1536
- for (var key in definition)
1537
- if (
1538
- __nested_webpack_require_18__.o(definition, key) &&
1539
- !__nested_webpack_require_18__.o(exports1, key)
1540
- )
1541
- Object.defineProperty(exports1, key, {
1542
- enumerable: true,
1543
- get: definition[key],
1544
- });
1535
+ __nested_webpack_require_18__.d = (exports1, getters, values) => {
1536
+ var define = (defs, kind) => {
1537
+ for (var key in defs)
1538
+ if (
1539
+ __nested_webpack_require_18__.o(defs, key) &&
1540
+ !__nested_webpack_require_18__.o(exports1, key)
1541
+ )
1542
+ Object.defineProperty(exports1, key, {
1543
+ enumerable: true,
1544
+ [kind]: defs[key],
1545
+ });
1546
+ };
1547
+ define(getters, "get");
1548
+ define(values, "value");
1545
1549
  };
1546
1550
  })();
1547
1551
  (() => {
@@ -1550,7 +1554,7 @@
1550
1554
  })();
1551
1555
  (() => {
1552
1556
  __nested_webpack_require_18__.r = (exports1) => {
1553
- if ("undefined" != typeof Symbol && Symbol.toStringTag)
1557
+ if ("u" > typeof Symbol && Symbol.toStringTag)
1554
1558
  Object.defineProperty(exports1, Symbol.toStringTag, {
1555
1559
  value: "Module",
1556
1560
  });
@@ -1559,23 +1563,6 @@
1559
1563
  })();
1560
1564
  var __nested_webpack_exports__ = {};
1561
1565
  __nested_webpack_require_18__.r(__nested_webpack_exports__);
1562
- __nested_webpack_require_18__.d(__nested_webpack_exports__, {
1563
- AsyncParallelHook: () => AsyncParallelHook,
1564
- AsyncSeriesBailHook: () => AsyncSeriesBailHook,
1565
- AsyncSeriesHook: () => AsyncSeriesHook,
1566
- AsyncSeriesWaterfallHook: () => AsyncSeriesWaterfallHook,
1567
- HookBase: () => HookBase,
1568
- HookMap: () => HookMap,
1569
- MultiHook: () => MultiHook,
1570
- QueriedHook: () => QueriedHook,
1571
- QueriedHookMap: () => QueriedHookMap,
1572
- SyncBailHook: () => SyncBailHook,
1573
- SyncHook: () => SyncHook,
1574
- SyncWaterfallHook: () => SyncWaterfallHook,
1575
- maxStage: () => maxStage,
1576
- minStage: () => minStage,
1577
- safeStage: () => safeStage,
1578
- });
1579
1566
  function _define_property(obj, key, value) {
1580
1567
  if (key in obj)
1581
1568
  Object.defineProperty(obj, key, {
@@ -1645,7 +1632,7 @@
1645
1632
  queryStageRange(stageRange) {
1646
1633
  return new QueriedHook(stageRange, this);
1647
1634
  }
1648
- callAsyncStageRange(queried) {
1635
+ callAsyncStageRange(_queried) {
1649
1636
  throw new Error(
1650
1637
  "Hook should implement there own _callAsyncStageRange",
1651
1638
  );
@@ -2334,6 +2321,24 @@
2334
2321
  this.name = name;
2335
2322
  }
2336
2323
  }
2324
+ __nested_webpack_require_18__.d(
2325
+ __nested_webpack_exports__,
2326
+ {
2327
+ AsyncParallelHook: () => AsyncParallelHook,
2328
+ AsyncSeriesBailHook: () => AsyncSeriesBailHook,
2329
+ AsyncSeriesHook: () => AsyncSeriesHook,
2330
+ AsyncSeriesWaterfallHook: () => AsyncSeriesWaterfallHook,
2331
+ HookBase: () => HookBase,
2332
+ HookMap: () => HookMap,
2333
+ MultiHook: () => MultiHook,
2334
+ QueriedHook: () => QueriedHook,
2335
+ QueriedHookMap: () => QueriedHookMap,
2336
+ SyncBailHook: () => SyncBailHook,
2337
+ SyncHook: () => SyncHook,
2338
+ SyncWaterfallHook: () => SyncWaterfallHook,
2339
+ },
2340
+ { maxStage, minStage, safeStage },
2341
+ );
2337
2342
  exports.AsyncParallelHook = __nested_webpack_exports__.AsyncParallelHook;
2338
2343
  exports.AsyncSeriesBailHook =
2339
2344
  __nested_webpack_exports__.AsyncSeriesBailHook;
@@ -2351,7 +2356,7 @@
2351
2356
  exports.maxStage = __nested_webpack_exports__.maxStage;
2352
2357
  exports.minStage = __nested_webpack_exports__.minStage;
2353
2358
  exports.safeStage = __nested_webpack_exports__.safeStage;
2354
- for (var __webpack_i__ in __nested_webpack_exports__)
2359
+ for (var __rspack_i in __nested_webpack_exports__)
2355
2360
  if (
2356
2361
  -1 ===
2357
2362
  [
@@ -2370,9 +2375,9 @@
2370
2375
  "maxStage",
2371
2376
  "minStage",
2372
2377
  "safeStage",
2373
- ].indexOf(__webpack_i__)
2378
+ ].indexOf(__rspack_i)
2374
2379
  )
2375
- exports[__webpack_i__] = __nested_webpack_exports__[__webpack_i__];
2380
+ exports[__rspack_i] = __nested_webpack_exports__[__rspack_i];
2376
2381
  Object.defineProperty(exports, "__esModule", { value: true });
2377
2382
  },
2378
2383
  };
@@ -2398,6 +2403,6 @@
2398
2403
  }
2399
2404
  if (typeof __nccwpck_require__ !== "undefined")
2400
2405
  __nccwpck_require__.ab = __dirname + "/";
2401
- var __webpack_exports__ = __nccwpck_require__(345);
2406
+ var __webpack_exports__ = __nccwpck_require__(403);
2402
2407
  module.exports = __webpack_exports__;
2403
2408
  })();
@@ -11,6 +11,7 @@ interface ProxyTargetDetailed {
11
11
  port?: number | string;
12
12
  protocol?: string;
13
13
  hostname?: string;
14
+ pathname?: string;
14
15
  socketPath?: string;
15
16
  key?: string;
16
17
  passphrase?: string;
@@ -451,4 +452,4 @@ declare const loggerPlugin: Plugin;
451
452
  declare const proxyEventsPlugin: Plugin;
452
453
 
453
454
  export { createProxyMiddleware, debugProxyErrorsPlugin, definePlugin, errorResponsePlugin, fixRequestBody, loggerPlugin, proxyEventsPlugin, responseInterceptor };
454
- export type { Filter, Options, Plugin, RequestHandler };
455
+ export type { Filter, OnProxyEvent, Options, Plugin, RequestHandler };
@@ -1 +1 @@
1
- {"name":"http-proxy-middleware","author":"Steven Chim","version":"4.1.1","license":"MIT","types":"index.d.ts","type":"module"}
1
+ {"name":"http-proxy-middleware","author":"Steven Chim","version":"4.2.0","license":"MIT","types":"index.d.ts","type":"module"}
@@ -28309,8 +28309,7 @@
28309
28309
  n
28310
28310
  ])[0]);
28311
28311
  }, t.getFirstIdentifier = getFirstIdentifier;
28312
- var n = r("./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/index.js"), s = r("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.6_@babel+core@7.29.0/node_modules/@babel/plugin-transform-typescript/lib/global-types.js");
28313
- r("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.6_@babel+core@7.29.0/node_modules/@babel/plugin-transform-typescript/lib/const-enum.js");
28312
+ var n = r("./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/index.js"), s = r("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.6_@babel+core@7.29.0/node_modules/@babel/plugin-transform-typescript/lib/global-types.js"), i = r("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.6_@babel+core@7.29.0/node_modules/@babel/plugin-transform-typescript/lib/const-enum.js");
28314
28313
  function getFirstIdentifier(e1) {
28315
28314
  return n.types.isIdentifier(e1) ? e1 : getFirstIdentifier(e1.left);
28316
28315
  }
@@ -28319,6 +28318,25 @@
28319
28318
  n.types.variableDeclarator(n.types.identifier(e1))
28320
28319
  ]);
28321
28320
  }
28321
+ function getMemberExpression(e1, t) {
28322
+ return n.types.memberExpression(n.types.identifier(e1), n.types.identifier(t));
28323
+ }
28324
+ function handleVariableDeclaration(e1, t, r) {
28325
+ if ("const" !== e1.kind) throw r.file.buildCodeFrameError(e1, "Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");
28326
+ const { declarations: s } = e1;
28327
+ if (s.every((e1)=>n.types.isIdentifier(e1.id))) {
28328
+ for (const e1 of s)e1.init = n.types.assignmentExpression("=", getMemberExpression(t, e1.id.name), e1.init);
28329
+ return [
28330
+ e1
28331
+ ];
28332
+ }
28333
+ const i = n.types.getBindingIdentifiers(e1), o = [];
28334
+ for(const e1 in i)o.push(n.types.assignmentExpression("=", getMemberExpression(t, e1), n.types.cloneNode(i[e1])));
28335
+ return [
28336
+ e1,
28337
+ n.types.expressionStatement(n.types.sequenceExpression(o))
28338
+ ];
28339
+ }
28322
28340
  function buildNestedAmbientModuleError(e1, t) {
28323
28341
  return e1.hub.buildError(t, "Ambient modules cannot be nested in other modules or namespaces.", Error);
28324
28342
  }
@@ -28358,6 +28376,35 @@
28358
28376
  continue;
28359
28377
  case "ExportNamedDeclaration":
28360
28378
  }
28379
+ if (!("declare" in r.declaration) || !r.declaration.declare) switch(r.declaration.type){
28380
+ case "TSEnumDeclaration":
28381
+ i.EXPORTED_CONST_ENUMS_IN_NAMESPACE.add(r.declaration);
28382
+ case "FunctionDeclaration":
28383
+ case "ClassDeclaration":
28384
+ {
28385
+ c = !1;
28386
+ const e1 = r.declaration.id.name;
28387
+ s.add(e1), p.splice(t++, 1, r.declaration, n.types.expressionStatement(n.types.assignmentExpression("=", getMemberExpression(a, e1), n.types.identifier(e1))));
28388
+ break;
28389
+ }
28390
+ case "VariableDeclaration":
28391
+ {
28392
+ c = !1;
28393
+ const n = handleVariableDeclaration(r.declaration, a, e1.hub);
28394
+ p.splice(t, n.length, ...n), t += n.length - 1;
28395
+ break;
28396
+ }
28397
+ case "TSModuleDeclaration":
28398
+ {
28399
+ if (!n.types.isIdentifier(r.declaration.id)) throw buildNestedAmbientModuleError(e1, r.declaration);
28400
+ const i = handleNested(e1, r.declaration, n.types.identifier(a));
28401
+ if (null !== i) {
28402
+ c = !1;
28403
+ const e1 = r.declaration.id.name;
28404
+ s.has(e1) ? p[t] = i : (s.add(e1), p.splice(t++, 1, getDeclaration(e1), i));
28405
+ } else p.splice(t, 1), t--;
28406
+ }
28407
+ }
28361
28408
  }
28362
28409
  if (c) return null;
28363
28410
  let u = n.types.objectExpression([]);