@rsbuild/core 0.7.8 → 0.7.9

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,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { logger } from '@rsbuild/shared';
3
- import { __internalHelper } from '../dist/index.js';
2
+ import { __internalHelper, logger } from '../dist/index.js';
4
3
 
5
4
  const { runCli, prepareCli } = __internalHelper;
6
5
 
@@ -1,19 +1,19 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 3998:
4
+ /***/ 3369:
5
5
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
6
6
 
7
7
  "use strict";
8
8
 
9
9
 
10
- const loader = __nccwpck_require__(5296);
10
+ const loader = __nccwpck_require__(4911);
11
11
  module.exports = loader.default;
12
- module.exports.defaultGetLocalIdent = __nccwpck_require__(466).defaultGetLocalIdent;
12
+ module.exports.defaultGetLocalIdent = __nccwpck_require__(4227).defaultGetLocalIdent;
13
13
 
14
14
  /***/ }),
15
15
 
16
- /***/ 5296:
16
+ /***/ 4911:
17
17
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
18
18
 
19
19
  "use strict";
@@ -26,9 +26,9 @@ exports["default"] = loader;
26
26
  var _postcss = _interopRequireDefault(__nccwpck_require__(977));
27
27
  var _package = _interopRequireDefault(__nccwpck_require__(5446));
28
28
  var _semver = __nccwpck_require__(5204);
29
- var _options = _interopRequireDefault(__nccwpck_require__(890));
30
- var _plugins = __nccwpck_require__(5472);
31
- var _utils = __nccwpck_require__(466);
29
+ var _options = _interopRequireDefault(__nccwpck_require__(309));
30
+ var _plugins = __nccwpck_require__(9092);
31
+ var _utils = __nccwpck_require__(4227);
32
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
33
  /*
34
34
  MIT License http://www.opensource.org/licenses/mit-license.php
@@ -198,7 +198,7 @@ async function loader(content, map, meta) {
198
198
 
199
199
  /***/ }),
200
200
 
201
- /***/ 5472:
201
+ /***/ 9092:
202
202
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
203
203
 
204
204
  "use strict";
@@ -225,14 +225,14 @@ Object.defineProperty(exports, "urlParser", ({
225
225
  return _postcssUrlParser.default;
226
226
  }
227
227
  }));
228
- var _postcssImportParser = _interopRequireDefault(__nccwpck_require__(6065));
229
- var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(4659));
230
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(9633));
228
+ var _postcssImportParser = _interopRequireDefault(__nccwpck_require__(7415));
229
+ var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(9388));
230
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(9265));
231
231
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
232
232
 
233
233
  /***/ }),
234
234
 
235
- /***/ 4659:
235
+ /***/ 9388:
236
236
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
237
237
 
238
238
  "use strict";
@@ -243,7 +243,7 @@ Object.defineProperty(exports, "__esModule", ({
243
243
  }));
244
244
  exports["default"] = void 0;
245
245
  var _icssUtils = __nccwpck_require__(3275);
246
- var _utils = __nccwpck_require__(466);
246
+ var _utils = __nccwpck_require__(4227);
247
247
  const plugin = (options = {}) => {
248
248
  return {
249
249
  postcssPlugin: "postcss-icss-parser",
@@ -352,7 +352,7 @@ var _default = exports["default"] = plugin;
352
352
 
353
353
  /***/ }),
354
354
 
355
- /***/ 6065:
355
+ /***/ 7415:
356
356
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
357
357
 
358
358
  "use strict";
@@ -363,7 +363,7 @@ Object.defineProperty(exports, "__esModule", ({
363
363
  }));
364
364
  exports["default"] = void 0;
365
365
  var _postcssValueParser = _interopRequireDefault(__nccwpck_require__(1036));
366
- var _utils = __nccwpck_require__(466);
366
+ var _utils = __nccwpck_require__(4227);
367
367
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
368
368
  function isIgnoredAfterName(atRule) {
369
369
  if (atRule.raws && atRule.raws.afterName && atRule.raws.afterName.trim().length > 0) {
@@ -652,7 +652,7 @@ var _default = exports["default"] = plugin;
652
652
 
653
653
  /***/ }),
654
654
 
655
- /***/ 9633:
655
+ /***/ 9265:
656
656
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
657
657
 
658
658
  "use strict";
@@ -663,7 +663,7 @@ Object.defineProperty(exports, "__esModule", ({
663
663
  }));
664
664
  exports["default"] = void 0;
665
665
  var _postcssValueParser = _interopRequireDefault(__nccwpck_require__(1036));
666
- var _utils = __nccwpck_require__(466);
666
+ var _utils = __nccwpck_require__(4227);
667
667
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
668
668
  const isUrlFunc = /url/i;
669
669
  const isImageSetFunc = /^(?:-webkit-)?image-set$/i;
@@ -1015,7 +1015,7 @@ var _default = exports["default"] = plugin;
1015
1015
 
1016
1016
  /***/ }),
1017
1017
 
1018
- /***/ 466:
1018
+ /***/ 4227:
1019
1019
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
1020
1020
 
1021
1021
  "use strict";
@@ -7318,7 +7318,7 @@ module.exports = require("util");
7318
7318
 
7319
7319
  /***/ }),
7320
7320
 
7321
- /***/ 890:
7321
+ /***/ 309:
7322
7322
  /***/ ((module) => {
7323
7323
 
7324
7324
  "use strict";
@@ -7376,7 +7376,7 @@ module.exports = JSON.parse('{"name":"postcss","version":"8.4.38","description":
7376
7376
  /******/ // startup
7377
7377
  /******/ // Load entry module and return exports
7378
7378
  /******/ // This entry module is referenced by other modules so it can't be inlined
7379
- /******/ var __webpack_exports__ = __nccwpck_require__(3998);
7379
+ /******/ var __webpack_exports__ = __nccwpck_require__(3369);
7380
7380
  /******/ module.exports = __webpack_exports__;
7381
7381
  /******/
7382
7382
  /******/ })()
@@ -1,12 +1,12 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 426:
4
+ /***/ 648:
5
5
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
6
6
 
7
7
  const url = __nccwpck_require__(310)
8
8
  const path = __nccwpck_require__(17)
9
- const launch = __nccwpck_require__(80)
9
+ const launch = __nccwpck_require__(309)
10
10
 
11
11
  module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
12
12
  if (typeof specifiedEditor === 'function') {
@@ -36,7 +36,7 @@ module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
36
36
 
37
37
  /***/ }),
38
38
 
39
- /***/ 881:
39
+ /***/ 330:
40
40
  /***/ ((module) => {
41
41
 
42
42
  module.exports = {
@@ -62,7 +62,7 @@ module.exports = {
62
62
 
63
63
  /***/ }),
64
64
 
65
- /***/ 341:
65
+ /***/ 723:
66
66
  /***/ ((module) => {
67
67
 
68
68
  module.exports = {
@@ -82,12 +82,17 @@ module.exports = {
82
82
  '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron':
83
83
  'code-insiders',
84
84
  '/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium',
85
+ '/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor',
85
86
  '/Applications/AppCode.app/Contents/MacOS/appcode':
86
87
  '/Applications/AppCode.app/Contents/MacOS/appcode',
87
88
  '/Applications/CLion.app/Contents/MacOS/clion':
88
89
  '/Applications/CLion.app/Contents/MacOS/clion',
89
90
  '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea':
90
91
  '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
92
+ '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea':
93
+ '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea',
94
+ '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea':
95
+ '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea',
91
96
  '/Applications/PhpStorm.app/Contents/MacOS/phpstorm':
92
97
  '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
93
98
  '/Applications/PyCharm.app/Contents/MacOS/pycharm':
@@ -108,7 +113,7 @@ module.exports = {
108
113
 
109
114
  /***/ }),
110
115
 
111
- /***/ 3:
116
+ /***/ 957:
112
117
  /***/ ((module) => {
113
118
 
114
119
  module.exports = [
@@ -140,7 +145,7 @@ module.exports = [
140
145
 
141
146
  /***/ }),
142
147
 
143
- /***/ 417:
148
+ /***/ 714:
144
149
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
145
150
 
146
151
  const path = __nccwpck_require__(17)
@@ -183,6 +188,7 @@ module.exports = function getArgumentsForPosition (
183
188
  case 'code-insiders':
184
189
  case 'Code - Insiders':
185
190
  case 'codium':
191
+ case 'cursor':
186
192
  case 'vscodium':
187
193
  case 'VSCodium':
188
194
  return ['-r', '-g', `${fileName}:${lineNumber}:${columnNumber}`]
@@ -219,7 +225,7 @@ module.exports = function getArgumentsForPosition (
219
225
 
220
226
  /***/ }),
221
227
 
222
- /***/ 841:
228
+ /***/ 962:
223
229
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
224
230
 
225
231
  const path = __nccwpck_require__(17)
@@ -229,9 +235,9 @@ const childProcess = __nccwpck_require__(81)
229
235
  // Map from full process name to binary that starts the process
230
236
  // We can't just re-use full process name, because it will spawn a new instance
231
237
  // of the app every time
232
- const COMMON_EDITORS_OSX = __nccwpck_require__(341)
233
- const COMMON_EDITORS_LINUX = __nccwpck_require__(881)
234
- const COMMON_EDITORS_WIN = __nccwpck_require__(3)
238
+ const COMMON_EDITORS_OSX = __nccwpck_require__(723)
239
+ const COMMON_EDITORS_LINUX = __nccwpck_require__(330)
240
+ const COMMON_EDITORS_WIN = __nccwpck_require__(957)
235
241
 
236
242
  module.exports = function guessEditor (specifiedEditor) {
237
243
  if (specifiedEditor) {
@@ -261,7 +267,7 @@ module.exports = function guessEditor (specifiedEditor) {
261
267
  for (let i = 0; i < processNames.length; i++) {
262
268
  const processName = processNames[i]
263
269
  // Find editor by exact match.
264
- if (output.indexOf(processName) !== -1) {
270
+ if (processList.includes(processName)) {
265
271
  return [COMMON_EDITORS_OSX[processName]]
266
272
  }
267
273
  const processNameWithoutApplications = processName.replace('/Applications', '')
@@ -331,7 +337,7 @@ module.exports = function guessEditor (specifiedEditor) {
331
337
 
332
338
  /***/ }),
333
339
 
334
- /***/ 80:
340
+ /***/ 309:
335
341
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
336
342
 
337
343
  /**
@@ -350,8 +356,8 @@ const path = __nccwpck_require__(17)
350
356
  const colors = __nccwpck_require__(802)
351
357
  const childProcess = __nccwpck_require__(81)
352
358
 
353
- const guessEditor = __nccwpck_require__(841)
354
- const getArgumentsForPosition = __nccwpck_require__(417)
359
+ const guessEditor = __nccwpck_require__(962)
360
+ const getArgumentsForPosition = __nccwpck_require__(714)
355
361
 
356
362
  function wrapErrorCallback (cb) {
357
363
  return (fileName, errorMessage) => {
@@ -836,7 +842,7 @@ module.exports = require("url");
836
842
  /******/ // startup
837
843
  /******/ // Load entry module and return exports
838
844
  /******/ // This entry module is referenced by other modules so it can't be inlined
839
- /******/ var __webpack_exports__ = __nccwpck_require__(426);
845
+ /******/ var __webpack_exports__ = __nccwpck_require__(648);
840
846
  /******/ module.exports = __webpack_exports__;
841
847
  /******/
842
848
  /******/ })()
@@ -1 +1 @@
1
- {"name":"launch-editor-middleware","author":"Evan You","version":"2.6.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"launch-editor-middleware","author":"Evan You","version":"2.7.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -7709,17 +7709,17 @@ module.exports.createColors = createColors
7709
7709
 
7710
7710
  /***/ }),
7711
7711
 
7712
- /***/ 1928:
7712
+ /***/ 7377:
7713
7713
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7714
7714
 
7715
7715
  "use strict";
7716
7716
 
7717
7717
 
7718
- module.exports = __nccwpck_require__(491)["default"];
7718
+ module.exports = __nccwpck_require__(5106)["default"];
7719
7719
 
7720
7720
  /***/ }),
7721
7721
 
7722
- /***/ 491:
7722
+ /***/ 5106:
7723
7723
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
7724
7724
 
7725
7725
  "use strict";
@@ -7732,8 +7732,8 @@ __webpack_unused_export__ = ({
7732
7732
  exports["default"] = loader;
7733
7733
  var _path = _interopRequireDefault(__nccwpck_require__(1017));
7734
7734
  var _package = _interopRequireDefault(__nccwpck_require__(5446));
7735
- var _options = _interopRequireDefault(__nccwpck_require__(2598));
7736
- var _utils = __nccwpck_require__(4911);
7735
+ var _options = _interopRequireDefault(__nccwpck_require__(2739));
7736
+ var _utils = __nccwpck_require__(7741);
7737
7737
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7738
7738
  let hasExplicitDependencyOnPostCSS = false;
7739
7739
 
@@ -7899,7 +7899,7 @@ async function loader(content, sourceMap, meta) {
7899
7899
 
7900
7900
  /***/ }),
7901
7901
 
7902
- /***/ 4911:
7902
+ /***/ 7741:
7903
7903
  /***/ ((module, exports, __nccwpck_require__) => {
7904
7904
 
7905
7905
  "use strict";
@@ -9150,7 +9150,7 @@ function highlight(code, options = {}) {
9150
9150
 
9151
9151
  /***/ }),
9152
9152
 
9153
- /***/ 2598:
9153
+ /***/ 2739:
9154
9154
  /***/ ((module) => {
9155
9155
 
9156
9156
  "use strict";
@@ -9278,7 +9278,7 @@ module.exports = JSON.parse('{"name":"postcss","version":"8.4.38","description":
9278
9278
  /******/ // startup
9279
9279
  /******/ // Load entry module and return exports
9280
9280
  /******/ // This entry module used 'module' so it can't be inlined
9281
- /******/ var __webpack_exports__ = __nccwpck_require__(1928);
9281
+ /******/ var __webpack_exports__ = __nccwpck_require__(7377);
9282
9282
  /******/ module.exports = __webpack_exports__;
9283
9283
  /******/
9284
9284
  /******/ })()
@@ -0,0 +1,66 @@
1
+ type ColorFn = (input: string | number | null | undefined) => string;
2
+
3
+ declare let LOG_TYPES: {
4
+ error: {
5
+ label: string;
6
+ level: "error";
7
+ color: ColorFn;
8
+ };
9
+ warn: {
10
+ label: string;
11
+ level: "warn";
12
+ color: ColorFn;
13
+ };
14
+ info: {
15
+ label: string;
16
+ level: "info";
17
+ color: ColorFn;
18
+ };
19
+ start: {
20
+ label: string;
21
+ level: "info";
22
+ color: ColorFn;
23
+ };
24
+ ready: {
25
+ label: string;
26
+ level: "info";
27
+ color: ColorFn;
28
+ };
29
+ success: {
30
+ label: string;
31
+ level: "info";
32
+ color: ColorFn;
33
+ };
34
+ log: {
35
+ level: "log";
36
+ };
37
+ debug: {
38
+ label: string;
39
+ level: "verbose";
40
+ color: ColorFn;
41
+ };
42
+ };
43
+
44
+ type LogLevel = 'error' | 'warn' | 'info' | 'log' | 'verbose';
45
+ type LogMessage = unknown;
46
+ interface LogType {
47
+ label?: string;
48
+ level: LogLevel;
49
+ color?: ColorFn;
50
+ }
51
+ type LogFunction = (message?: LogMessage, ...args: any[]) => void;
52
+ interface Options {
53
+ level?: LogLevel;
54
+ }
55
+ type LogMethods = keyof typeof LOG_TYPES;
56
+ type Logger = Record<LogMethods, LogFunction> & {
57
+ greet: (message: string) => void;
58
+ level: LogLevel;
59
+ override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
60
+ };
61
+
62
+ declare let createLogger: (options?: Options) => Logger;
63
+
64
+ declare let logger: Logger;
65
+
66
+ export { type LogFunction, type LogLevel, type LogMessage, type LogType, type Logger, type Options, createLogger, logger };