@rsbuild/core 1.1.0-beta.1 → 1.1.0

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/bin/rsbuild.js CHANGED
@@ -1,9 +1,21 @@
1
1
  #!/usr/bin/env node
2
- import { __internalHelper, logger } from '../dist/index.js';
2
+ import nodeModule from 'node:module';
3
3
 
4
- const { runCli, prepareCli } = __internalHelper;
4
+ // enable on-disk code caching of all modules loaded by Node.js
5
+ // requires Nodejs >= 22.8.0
6
+ const { enableCompileCache } = nodeModule;
7
+ if (enableCompileCache) {
8
+ try {
9
+ enableCompileCache();
10
+ } catch {
11
+ // ignore errors
12
+ }
13
+ }
5
14
 
6
15
  async function main() {
16
+ const { __internalHelper, logger } = await import('../dist/index.js');
17
+ const { runCli, prepareCli } = __internalHelper;
18
+
7
19
  prepareCli();
8
20
 
9
21
  try {
@@ -1,22 +1,22 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 3038: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 9284: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(2919);
5
+ const loader = __nccwpck_require__(5760);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(3789).defaultGetLocalIdent;
8
+ __nccwpck_require__(9178).defaultGetLocalIdent;
9
9
  },
10
- 2919: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 5760: (__unused_webpack_module, exports, __nccwpck_require__) => {
11
11
  "use strict";
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports["default"] = loader;
14
14
  var _postcss = _interopRequireDefault(__nccwpck_require__(9961));
15
15
  var _package = _interopRequireDefault(__nccwpck_require__(3360));
16
16
  var _semver = { satisfies: () => true };
17
- var _options = _interopRequireDefault(__nccwpck_require__(1519));
18
- var _plugins = __nccwpck_require__(8042);
19
- var _utils = __nccwpck_require__(3789);
17
+ var _options = _interopRequireDefault(__nccwpck_require__(7377));
18
+ var _plugins = __nccwpck_require__(2750);
19
+ var _utils = __nccwpck_require__(9178);
20
20
  function _interopRequireDefault(obj) {
21
21
  return obj && obj.__esModule ? obj : { default: obj };
22
22
  }
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 8042: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 2750: (__unused_webpack_module, exports, __nccwpck_require__) => {
247
247
  "use strict";
248
248
  Object.defineProperty(exports, "__esModule", { value: true });
249
249
  Object.defineProperty(exports, "icssParser", {
@@ -265,22 +265,22 @@
265
265
  },
266
266
  });
267
267
  var _postcssImportParser = _interopRequireDefault(
268
- __nccwpck_require__(1805),
268
+ __nccwpck_require__(2468),
269
269
  );
270
270
  var _postcssIcssParser = _interopRequireDefault(
271
- __nccwpck_require__(4968),
271
+ __nccwpck_require__(7024),
272
272
  );
273
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(7749));
273
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(5670));
274
274
  function _interopRequireDefault(obj) {
275
275
  return obj && obj.__esModule ? obj : { default: obj };
276
276
  }
277
277
  },
278
- 4968: (__unused_webpack_module, exports, __nccwpck_require__) => {
278
+ 7024: (__unused_webpack_module, exports, __nccwpck_require__) => {
279
279
  "use strict";
280
280
  Object.defineProperty(exports, "__esModule", { value: true });
281
281
  exports["default"] = void 0;
282
282
  var _icssUtils = __nccwpck_require__(8406);
283
- var _utils = __nccwpck_require__(3789);
283
+ var _utils = __nccwpck_require__(9178);
284
284
  const plugin = (options = {}) => ({
285
285
  postcssPlugin: "postcss-icss-parser",
286
286
  async OnceExit(root) {
@@ -379,14 +379,14 @@
379
379
  plugin.postcss = true;
380
380
  var _default = (exports["default"] = plugin);
381
381
  },
382
- 1805: (__unused_webpack_module, exports, __nccwpck_require__) => {
382
+ 2468: (__unused_webpack_module, exports, __nccwpck_require__) => {
383
383
  "use strict";
384
384
  Object.defineProperty(exports, "__esModule", { value: true });
385
385
  exports["default"] = void 0;
386
386
  var _postcssValueParser = _interopRequireDefault(
387
387
  __nccwpck_require__(7555),
388
388
  );
389
- var _utils = __nccwpck_require__(3789);
389
+ var _utils = __nccwpck_require__(9178);
390
390
  function _interopRequireDefault(obj) {
391
391
  return obj && obj.__esModule ? obj : { default: obj };
392
392
  }
@@ -691,14 +691,14 @@
691
691
  plugin.postcss = true;
692
692
  var _default = (exports["default"] = plugin);
693
693
  },
694
- 7749: (__unused_webpack_module, exports, __nccwpck_require__) => {
694
+ 5670: (__unused_webpack_module, exports, __nccwpck_require__) => {
695
695
  "use strict";
696
696
  Object.defineProperty(exports, "__esModule", { value: true });
697
697
  exports["default"] = void 0;
698
698
  var _postcssValueParser = _interopRequireDefault(
699
699
  __nccwpck_require__(7555),
700
700
  );
701
- var _utils = __nccwpck_require__(3789);
701
+ var _utils = __nccwpck_require__(9178);
702
702
  function _interopRequireDefault(obj) {
703
703
  return obj && obj.__esModule ? obj : { default: obj };
704
704
  }
@@ -1041,7 +1041,7 @@
1041
1041
  plugin.postcss = true;
1042
1042
  var _default = (exports["default"] = plugin);
1043
1043
  },
1044
- 3789: (__unused_webpack_module, exports, __nccwpck_require__) => {
1044
+ 9178: (__unused_webpack_module, exports, __nccwpck_require__) => {
1045
1045
  "use strict";
1046
1046
  Object.defineProperty(exports, "__esModule", { value: true });
1047
1047
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -7968,7 +7968,7 @@
7968
7968
  "use strict";
7969
7969
  module.exports = require("util");
7970
7970
  },
7971
- 1519: (module) => {
7971
+ 7377: (module) => {
7972
7972
  "use strict";
7973
7973
  module.exports = JSON.parse(
7974
7974
  '{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
@@ -8003,6 +8003,6 @@
8003
8003
  }
8004
8004
  if (typeof __nccwpck_require__ !== "undefined")
8005
8005
  __nccwpck_require__.ab = __dirname + "/";
8006
- var __webpack_exports__ = __nccwpck_require__(3038);
8006
+ var __webpack_exports__ = __nccwpck_require__(9284);
8007
8007
  module.exports = __webpack_exports__;
8008
8008
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 261: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 937: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(117);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(107);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -304,7 +304,7 @@
304
304
  }
305
305
  module.exports = { CachedChildCompilation };
306
306
  },
307
- 117: (module) => {
307
+ 107: (module) => {
308
308
  "use strict";
309
309
  class HtmlWebpackChildCompiler {
310
310
  constructor(templates) {
@@ -473,7 +473,7 @@
473
473
  }
474
474
  module.exports = { HtmlWebpackChildCompiler };
475
475
  },
476
- 673: (module) => {
476
+ 501: (module) => {
477
477
  "use strict";
478
478
  module.exports = {};
479
479
  module.exports.none = (chunks) => chunks;
@@ -492,7 +492,7 @@
492
492
  };
493
493
  module.exports.auto = module.exports.none;
494
494
  },
495
- 740: (module) => {
495
+ 364: (module) => {
496
496
  "use strict";
497
497
  module.exports = function (err) {
498
498
  return {
@@ -513,7 +513,7 @@
513
513
  };
514
514
  };
515
515
  },
516
- 865: (module, __unused_webpack_exports, __nccwpck_require__) => {
516
+ 620: (module, __unused_webpack_exports, __nccwpck_require__) => {
517
517
  "use strict";
518
518
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(348);
519
519
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -539,7 +539,7 @@
539
539
  }
540
540
  module.exports = { getHtmlRspackPluginHooks };
541
541
  },
542
- 154: (module) => {
542
+ 446: (module) => {
543
543
  const voidTags = [
544
544
  "area",
545
545
  "base",
@@ -607,19 +607,19 @@
607
607
  htmlTagObjectToString,
608
608
  };
609
609
  },
610
- 761: (module, __unused_webpack_exports, __nccwpck_require__) => {
610
+ 611: (module, __unused_webpack_exports, __nccwpck_require__) => {
611
611
  "use strict";
612
612
  const promisify = __nccwpck_require__(837).promisify;
613
613
  const vm = __nccwpck_require__(144);
614
614
  const fs = __nccwpck_require__(147);
615
615
  const path = __nccwpck_require__(17);
616
- const { CachedChildCompilation } = __nccwpck_require__(261);
616
+ const { CachedChildCompilation } = __nccwpck_require__(937);
617
617
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
618
- __nccwpck_require__(154);
619
- const prettyError = __nccwpck_require__(740);
620
- const chunkSorter = __nccwpck_require__(673);
618
+ __nccwpck_require__(446);
619
+ const prettyError = __nccwpck_require__(364);
620
+ const chunkSorter = __nccwpck_require__(501);
621
621
  const getHtmlRspackPluginHooks =
622
- __nccwpck_require__(865).getHtmlRspackPluginHooks;
622
+ __nccwpck_require__(620).getHtmlRspackPluginHooks;
623
623
  class HtmlRspackPlugin {
624
624
  constructor(userOptions = {}) {
625
625
  this.version = HtmlRspackPlugin.version;
@@ -1578,6 +1578,6 @@
1578
1578
  }
1579
1579
  if (typeof __nccwpck_require__ !== "undefined")
1580
1580
  __nccwpck_require__.ab = __dirname + "/";
1581
- var __webpack_exports__ = __nccwpck_require__(761);
1581
+ var __webpack_exports__ = __nccwpck_require__(611);
1582
1582
  module.exports = __webpack_exports__;
1583
1583
  })();
@@ -1 +1,153 @@
1
- export = any;
1
+ import { ChildProcess } from 'child_process';
2
+
3
+ declare namespace open {
4
+ interface Options {
5
+ /**
6
+ Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app.
7
+
8
+ Note that it waits for the app to exit, not just for the window to close.
9
+
10
+ On Windows, you have to explicitly specify an app for it to be able to wait.
11
+
12
+ @default false
13
+ */
14
+ readonly wait?: boolean;
15
+
16
+ /**
17
+ __macOS only__
18
+
19
+ Do not bring the app to the foreground.
20
+
21
+ @default false
22
+ */
23
+ readonly background?: boolean;
24
+
25
+ /**
26
+ __macOS only__
27
+
28
+ Open a new instance of the app even it's already running.
29
+
30
+ A new instance is always opened on other platforms.
31
+
32
+ @default false
33
+ */
34
+ readonly newInstance?: boolean;
35
+
36
+ /**
37
+ Specify the `name` of the app to open the `target` with, and optionally, app `arguments`. `app` can be an array of apps to try to open and `name` can be an array of app names to try. If each app fails, the last error will be thrown.
38
+
39
+ The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. If possible, use [`open.apps`](#openapps) which auto-detects the correct binary to use.
40
+
41
+ You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome.
42
+
43
+ The app `arguments` are app dependent. Check the app's documentation for what arguments it accepts.
44
+ */
45
+ readonly app?: App | readonly App[];
46
+
47
+ /**
48
+ Allow the opened app to exit with nonzero exit code when the `wait` option is `true`.
49
+
50
+ We do not recommend setting this option. The convention for success is exit code zero.
51
+
52
+ @default false
53
+ */
54
+ readonly allowNonzeroExitCode?: boolean;
55
+ }
56
+
57
+ interface OpenAppOptions extends Omit<Options, 'app'> {
58
+ /**
59
+ Arguments passed to the app.
60
+
61
+ These arguments are app dependent. Check the app's documentation for what arguments it accepts.
62
+ */
63
+ readonly arguments?: readonly string[];
64
+ }
65
+
66
+ type AppName =
67
+ | 'chrome'
68
+ | 'firefox'
69
+ | 'edge';
70
+
71
+ type App = {
72
+ name: string | readonly string[];
73
+ arguments?: readonly string[];
74
+ };
75
+ }
76
+
77
+ // eslint-disable-next-line no-redeclare
78
+ declare const open: {
79
+ /**
80
+ Open stuff like URLs, files, executables. Cross-platform.
81
+
82
+ Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms.
83
+
84
+ There is a caveat for [double-quotes on Windows](https://github.com/sindresorhus/open#double-quotes-on-windows) where all double-quotes are stripped from the `target`.
85
+
86
+ @param target - The thing you want to open. Can be a URL, file, or executable. Opens in the default app for the file type. For example, URLs open in your default browser.
87
+ @returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process.
88
+
89
+ @example
90
+ ```
91
+ import open = require('open');
92
+
93
+ // Opens the image in the default image viewer
94
+ await open('unicorn.png', {wait: true});
95
+ console.log('The image viewer app closed');
96
+
97
+ // Opens the url in the default browser
98
+ await open('https://sindresorhus.com');
99
+
100
+ // Opens the URL in a specified browser.
101
+ await open('https://sindresorhus.com', {app: {name: 'firefox'}});
102
+
103
+ // Specify app arguments.
104
+ await open('https://sindresorhus.com', {app: {name: 'google chrome', arguments: ['--incognito']}});
105
+ ```
106
+ */
107
+ (
108
+ target: string,
109
+ options?: open.Options
110
+ ): Promise<ChildProcess>;
111
+
112
+ /**
113
+ An object containing auto-detected binary names for common apps. Useful to work around cross-platform differences.
114
+
115
+ @example
116
+ ```
117
+ import open = require('open');
118
+
119
+ await open('https://google.com', {
120
+ app: {
121
+ name: open.apps.chrome
122
+ }
123
+ });
124
+ ```
125
+ */
126
+ apps: Record<open.AppName, string | readonly string[]>;
127
+
128
+ /**
129
+ Open an app. Cross-platform.
130
+
131
+ Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms.
132
+
133
+ @param name - The app you want to open. Can be either builtin supported `open.apps` names or other name supported in platform.
134
+ @returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process.
135
+
136
+ @example
137
+ ```
138
+ const {apps, openApp} = require('open');
139
+
140
+ // Open Firefox
141
+ await openApp(apps.firefox);
142
+
143
+ // Open Chrome incognito mode
144
+ await openApp(apps.chrome, {arguments: ['--incognito']});
145
+
146
+ // Open Xcode
147
+ await openApp('xcode');
148
+ ```
149
+ */
150
+ openApp: (name: open.App['name'], options?: open.OpenAppOptions) => Promise<ChildProcess>;
151
+ };
152
+
153
+ export { open as default };
@@ -1,17 +1,17 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 540: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(784)["default"];
4
+ 879: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(177)["default"];
6
6
  },
7
- 784: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 177: (__unused_webpack_module, exports, __nccwpck_require__) => {
8
8
  var __webpack_unused_export__;
9
9
  __webpack_unused_export__ = { value: true };
10
10
  exports["default"] = loader;
11
11
  var _path = _interopRequireDefault(__nccwpck_require__(17));
12
12
  var _package = _interopRequireDefault(__nccwpck_require__(360));
13
- var _options = _interopRequireDefault(__nccwpck_require__(357));
14
- var _utils = __nccwpck_require__(382);
13
+ var _options = _interopRequireDefault(__nccwpck_require__(866));
14
+ var _utils = __nccwpck_require__(280);
15
15
  function _interopRequireDefault(obj) {
16
16
  return obj && obj.__esModule ? obj : { default: obj };
17
17
  }
@@ -189,7 +189,7 @@
189
189
  callback(null, result.css, map, { ast });
190
190
  }
191
191
  },
192
- 382: (module, exports, __nccwpck_require__) => {
192
+ 280: (module, exports, __nccwpck_require__) => {
193
193
  module = __nccwpck_require__.nmd(module);
194
194
  Object.defineProperty(exports, "__esModule", { value: true });
195
195
  exports.exec = exec;
@@ -691,7 +691,7 @@
691
691
  310: (module) => {
692
692
  module.exports = require("url");
693
693
  },
694
- 357: (module) => {
694
+ 866: (module) => {
695
695
  module.exports = JSON.parse(
696
696
  '{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack-contrib/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack-contrib/postcss-loader#config","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\'.","link":"https://github.com/webpack-contrib/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack-contrib/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
697
697
  );
@@ -736,6 +736,6 @@
736
736
  })();
737
737
  if (typeof __nccwpck_require__ !== "undefined")
738
738
  __nccwpck_require__.ab = __dirname + "/";
739
- var __webpack_exports__ = __nccwpck_require__(540);
739
+ var __webpack_exports__ = __nccwpck_require__(879);
740
740
  module.exports = __webpack_exports__;
741
741
  })();
@@ -4417,14 +4417,14 @@
4417
4417
  return a.start - b.start;
4418
4418
  }
4419
4419
  },
4420
- 3925: (module, __unused_webpack_exports, __nccwpck_require__) => {
4420
+ 3280: (module, __unused_webpack_exports, __nccwpck_require__) => {
4421
4421
  "use strict";
4422
- const middleware = __nccwpck_require__(7275);
4423
- const getFilenameFromUrl = __nccwpck_require__(2665);
4424
- const setupHooks = __nccwpck_require__(4909);
4425
- const setupWriteToDisk = __nccwpck_require__(3353);
4426
- const setupOutputFileSystem = __nccwpck_require__(4641);
4427
- const ready = __nccwpck_require__(5744);
4422
+ const middleware = __nccwpck_require__(3856);
4423
+ const getFilenameFromUrl = __nccwpck_require__(641);
4424
+ const setupHooks = __nccwpck_require__(8357);
4425
+ const setupWriteToDisk = __nccwpck_require__(4191);
4426
+ const setupOutputFileSystem = __nccwpck_require__(7332);
4427
+ const ready = __nccwpck_require__(4662);
4428
4428
  const noop = () => {};
4429
4429
  function wdm(compiler, options = {}) {
4430
4430
  const context = {
@@ -4479,16 +4479,16 @@
4479
4479
  }
4480
4480
  module.exports = wdm;
4481
4481
  },
4482
- 7275: (module, __unused_webpack_exports, __nccwpck_require__) => {
4482
+ 3856: (module, __unused_webpack_exports, __nccwpck_require__) => {
4483
4483
  "use strict";
4484
4484
  const mrmime = __nccwpck_require__(802);
4485
4485
  const onFinishedStream = __nccwpck_require__(8772);
4486
- const getFilenameFromUrl = __nccwpck_require__(2665);
4486
+ const getFilenameFromUrl = __nccwpck_require__(641);
4487
4487
  const { setStatusCode, send, pipe, createReadStreamOrReadFileSync } =
4488
- __nccwpck_require__(1880);
4489
- const ready = __nccwpck_require__(5744);
4490
- const parseTokenList = __nccwpck_require__(2832);
4491
- const memorize = __nccwpck_require__(4634);
4488
+ __nccwpck_require__(7833);
4489
+ const ready = __nccwpck_require__(4662);
4490
+ const parseTokenList = __nccwpck_require__(2518);
4491
+ const memorize = __nccwpck_require__(4781);
4492
4492
  async function getEtag(stat) {
4493
4493
  const mtime = stat.mtime.getTime().toString(16);
4494
4494
  const size = stat.size.toString(16);
@@ -4567,7 +4567,7 @@
4567
4567
  return;
4568
4568
  }
4569
4569
  function sendError(status, options) {
4570
- const escapeHtml = __nccwpck_require__(665);
4570
+ const escapeHtml = __nccwpck_require__(9896);
4571
4571
  const content = statuses[status] || String(status);
4572
4572
  const document = Buffer.from(
4573
4573
  `<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>${escapeHtml(content)}</pre>\n</body>\n</html>`,
@@ -4869,7 +4869,7 @@
4869
4869
  }
4870
4870
  module.exports = wrapper;
4871
4871
  },
4872
- 1880: (module) => {
4872
+ 7833: (module) => {
4873
4873
  "use strict";
4874
4874
  function setStatusCode(res, code) {
4875
4875
  if (typeof res.status === "function") {
@@ -4921,7 +4921,7 @@
4921
4921
  createReadStreamOrReadFileSync,
4922
4922
  };
4923
4923
  },
4924
- 665: (module) => {
4924
+ 9896: (module) => {
4925
4925
  "use strict";
4926
4926
  const matchHtmlRegExp = /["'&<>]/;
4927
4927
  function escapeHtml(string) {
@@ -4966,13 +4966,13 @@
4966
4966
  }
4967
4967
  module.exports = escapeHtml;
4968
4968
  },
4969
- 2665: (module, __unused_webpack_exports, __nccwpck_require__) => {
4969
+ 641: (module, __unused_webpack_exports, __nccwpck_require__) => {
4970
4970
  "use strict";
4971
4971
  const path = __nccwpck_require__(1017);
4972
4972
  const { parse } = __nccwpck_require__(7310);
4973
4973
  const querystring = __nccwpck_require__(3477);
4974
- const getPaths = __nccwpck_require__(5058);
4975
- const memorize = __nccwpck_require__(4634);
4974
+ const getPaths = __nccwpck_require__(8318);
4975
+ const memorize = __nccwpck_require__(4781);
4976
4976
  const memoizedParse = memorize(parse, undefined, (value) => {
4977
4977
  if (value.pathname) {
4978
4978
  value.pathname = decode(value.pathname);
@@ -5054,7 +5054,7 @@
5054
5054
  }
5055
5055
  module.exports = getFilenameFromUrl;
5056
5056
  },
5057
- 5058: (module) => {
5057
+ 8318: (module) => {
5058
5058
  "use strict";
5059
5059
  function getPaths(context) {
5060
5060
  const { stats, options } = context;
@@ -5075,7 +5075,7 @@
5075
5075
  }
5076
5076
  module.exports = getPaths;
5077
5077
  },
5078
- 4634: (module) => {
5078
+ 4781: (module) => {
5079
5079
  "use strict";
5080
5080
  const cacheStore = new WeakMap();
5081
5081
  function memorize(fn, { cache = new Map() } = {}, callback) {
@@ -5097,7 +5097,7 @@
5097
5097
  }
5098
5098
  module.exports = memorize;
5099
5099
  },
5100
- 2832: (module) => {
5100
+ 2518: (module) => {
5101
5101
  "use strict";
5102
5102
  function parseTokenList(str) {
5103
5103
  let end = 0;
@@ -5130,7 +5130,7 @@
5130
5130
  }
5131
5131
  module.exports = parseTokenList;
5132
5132
  },
5133
- 5744: (module) => {
5133
+ 4662: (module) => {
5134
5134
  "use strict";
5135
5135
  function ready(context, callback, req) {
5136
5136
  if (context.state) {
@@ -5145,7 +5145,7 @@
5145
5145
  }
5146
5146
  module.exports = ready;
5147
5147
  },
5148
- 4909: (module) => {
5148
+ 8357: (module) => {
5149
5149
  "use strict";
5150
5150
  function setupHooks(context) {
5151
5151
  function invalid() {
@@ -5177,7 +5177,7 @@
5177
5177
  }
5178
5178
  module.exports = setupHooks;
5179
5179
  },
5180
- 4641: (module, __unused_webpack_exports, __nccwpck_require__) => {
5180
+ 7332: (module, __unused_webpack_exports, __nccwpck_require__) => {
5181
5181
  "use strict";
5182
5182
  const memfs = __nccwpck_require__(5953);
5183
5183
  function setupOutputFileSystem(context) {
@@ -5204,7 +5204,7 @@
5204
5204
  }
5205
5205
  module.exports = setupOutputFileSystem;
5206
5206
  },
5207
- 3353: (module, __unused_webpack_exports, __nccwpck_require__) => {
5207
+ 4191: (module, __unused_webpack_exports, __nccwpck_require__) => {
5208
5208
  "use strict";
5209
5209
  const fs = __nccwpck_require__(7147);
5210
5210
  const path = __nccwpck_require__(1017);
@@ -6190,6 +6190,6 @@
6190
6190
  }
6191
6191
  if (typeof __nccwpck_require__ !== "undefined")
6192
6192
  __nccwpck_require__.ab = __dirname + "/";
6193
- var __webpack_exports__ = __nccwpck_require__(3925);
6193
+ var __webpack_exports__ = __nccwpck_require__(3280);
6194
6194
  module.exports = __webpack_exports__;
6195
6195
  })();
@@ -1 +1,44 @@
1
- export = any;
1
+ import { Chunk, Compiler, RspackPluginInstance } from '@rspack/core';
2
+
3
+ interface FileDescriptor {
4
+ chunk?: Chunk;
5
+ isAsset: boolean;
6
+ isChunk: boolean;
7
+ isInitial: boolean;
8
+ isModuleAsset: boolean;
9
+ name: string;
10
+ path: string;
11
+ }
12
+
13
+ declare const getCompilerHooks: (compiler: Compiler) => any;
14
+
15
+ type Manifest = Record<string, any>;
16
+ interface InternalOptions {
17
+ [key: string]: any;
18
+ assetHookStage: number;
19
+ basePath: string;
20
+ fileName: string;
21
+ filter: (file: FileDescriptor) => boolean;
22
+ generate: (seed: Record<any, any>, files: FileDescriptor[], entries: Record<string, string[]>) => Manifest;
23
+ map: (file: FileDescriptor) => FileDescriptor;
24
+ publicPath: string;
25
+ removeKeyHash: RegExp | false;
26
+ seed: Record<any, any>;
27
+ serialize: (manifest: Manifest) => string;
28
+ sort: (fileA: FileDescriptor, fileB: FileDescriptor) => Number;
29
+ transformExtensions: RegExp;
30
+ useEntryKeys: boolean;
31
+ useLegacyEmit: boolean;
32
+ writeToFileEmit: boolean;
33
+ }
34
+ type ManifestPluginOptions = Partial<InternalOptions>;
35
+ type EmitCountMap = Map<any, any>;
36
+ declare class WebpackManifestPlugin implements RspackPluginInstance {
37
+ private options;
38
+ constructor(opts: ManifestPluginOptions);
39
+ apply(compiler: Compiler): void;
40
+ }
41
+
42
+ declare const RspackManifestPlugin: typeof WebpackManifestPlugin;
43
+
44
+ export { type EmitCountMap, type InternalOptions, type Manifest, type ManifestPluginOptions, RspackManifestPlugin, WebpackManifestPlugin, getCompilerHooks };