@rsbuild/core 2.0.0-beta.0 → 2.0.0-beta.10
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/compiled/chokidar/index.d.ts +197 -29
- package/compiled/chokidar/package.json +1 -1
- package/compiled/connect-next/index.d.ts +56 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/cors/index.d.ts +56 -0
- package/compiled/cors/license +22 -0
- package/compiled/cors/package.json +1 -0
- package/compiled/css-loader/index.js +2 -2
- package/compiled/css-loader/package.json +1 -1
- package/compiled/html-rspack-plugin/index.d.ts +102 -1
- package/compiled/html-rspack-plugin/index.js +863 -20
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/http-proxy-middleware/index.d.ts +268 -43
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/jiti/LICENSE +21 -0
- package/compiled/jiti/README.md +243 -0
- package/compiled/jiti/dist/babel.cjs +46699 -0
- package/compiled/jiti/dist/jiti.cjs +4842 -0
- package/compiled/jiti/lib/jiti-cli.mjs +19 -0
- package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
- package/compiled/jiti/lib/jiti-native.mjs +76 -0
- package/compiled/jiti/lib/jiti-register.d.mts +1 -0
- package/compiled/jiti/lib/jiti-register.mjs +2 -0
- package/compiled/jiti/lib/jiti.cjs +24 -0
- package/compiled/jiti/lib/jiti.d.cts +8 -0
- package/compiled/jiti/lib/jiti.d.mts +8 -0
- package/compiled/jiti/lib/jiti.mjs +23 -0
- package/compiled/jiti/lib/types.d.ts +363 -0
- package/compiled/jiti/package.json +133 -0
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/postcss/lib/comment.d.ts +1 -1
- package/compiled/postcss/lib/container.d.ts +1 -1
- package/compiled/postcss/lib/css-syntax-error.d.ts +1 -1
- package/compiled/postcss/lib/declaration.d.ts +1 -1
- package/compiled/postcss/lib/document.d.ts +1 -1
- package/compiled/postcss/lib/input.d.ts +1 -1
- package/compiled/postcss/lib/lazy-result.d.ts +1 -1
- package/compiled/postcss/lib/no-work-result.d.ts +1 -1
- package/compiled/postcss/lib/node.d.ts +1 -1
- package/compiled/postcss/lib/previous-map.d.ts +1 -1
- package/compiled/postcss/lib/processor.d.ts +1 -1
- package/compiled/postcss/lib/result.d.ts +1 -1
- package/compiled/postcss/lib/root.d.ts +1 -1
- package/compiled/postcss/lib/rule.d.ts +1 -1
- package/compiled/postcss/lib/stringifier.d.ts +1 -1
- package/compiled/postcss/lib/warning.d.ts +1 -1
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +10 -9
- package/compiled/postcss-loader/package.json +1 -1
- package/compiled/rslog/index.d.ts +33 -2
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +0 -5
- package/compiled/rspack-manifest-plugin/index.d.ts +48 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/style-loader/index.js +37 -94
- package/compiled/style-loader/package.json +1 -1
- package/dist/{131.js → 958.js} +1706 -1655
- package/dist/chokidar.js +59 -57
- package/dist/client/hmr.js +3 -3
- package/dist/client/overlay.js +2 -2
- package/dist/connect-next.js +268 -0
- package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
- package/dist/cors.js +2 -2
- package/dist/http-proxy-middleware.js +2985 -0
- package/dist/http-proxy-middleware.js.LICENSE.txt +69 -0
- package/dist/index.js +1 -1
- package/dist/launch-editor-middleware.js +96 -16
- package/dist/manifest-plugin.js +543 -21
- package/dist/memfs.js +241 -776
- package/dist/{710.js → mrmime.js} +2 -1
- package/dist/open.js +32 -28
- package/dist/range-parser.js +2 -2
- package/dist/remapping.js +2 -2
- package/dist/rslib-runtime.js +4 -4
- package/dist/sirv.js +14 -14
- package/dist/src.js +510 -0
- package/dist/tinyglobby.js +114 -69
- package/dist/transformLoader.mjs +38 -1
- package/dist/transformRawLoader.mjs +1 -1
- package/dist/ws.js +1549 -0
- package/dist-types/createContext.d.ts +3 -2
- package/dist-types/helpers/format.d.ts +2 -1
- package/dist-types/helpers/fs.d.ts +2 -1
- package/dist-types/helpers/index.d.ts +1 -1
- package/dist-types/helpers/stats.d.ts +4 -3
- package/dist-types/helpers/vendors.d.ts +0 -2
- package/dist-types/hooks.d.ts +3 -3
- package/dist-types/index.d.ts +4 -3
- package/dist-types/initPlugins.d.ts +2 -1
- package/dist-types/logger.d.ts +9 -3
- package/dist-types/pluginManager.d.ts +2 -1
- package/dist-types/restart.d.ts +4 -2
- package/dist-types/server/assets-middleware/index.d.ts +3 -2
- package/dist-types/server/assets-middleware/setupWriteToDisk.d.ts +2 -1
- package/dist-types/server/cliShortcuts.d.ts +4 -1
- package/dist-types/server/devMiddlewares.d.ts +4 -6
- package/dist-types/server/devServer.d.ts +8 -42
- package/dist-types/server/helper.d.ts +50 -16
- package/dist-types/server/historyApiFallback.d.ts +2 -1
- package/dist-types/server/middlewares.d.ts +5 -3
- package/dist-types/server/open.d.ts +4 -2
- package/dist-types/server/previewServer.d.ts +4 -0
- package/dist-types/server/proxy.d.ts +3 -2
- package/dist-types/server/runner/asModule.d.ts +1 -1
- package/dist-types/server/serverSetup.d.ts +2 -0
- package/dist-types/server/socketServer.d.ts +4 -1
- package/dist-types/server/watchFiles.d.ts +1 -1
- package/dist-types/types/config.d.ts +123 -25
- package/dist-types/types/context.d.ts +3 -0
- package/dist-types/types/hooks.d.ts +17 -15
- package/dist-types/types/plugin.d.ts +14 -11
- package/dist-types/types/rsbuild.d.ts +11 -4
- package/dist-types/types/thirdParty.d.ts +15 -6
- package/package.json +23 -26
- package/compiled/chokidar/handler.d.ts +0 -90
- package/compiled/http-proxy-middleware/index.js +0 -5284
- package/compiled/ws/index.d.ts +0 -437
- package/compiled/ws/index.js +0 -3166
- package/compiled/ws/license +0 -20
- package/compiled/ws/package.json +0 -1
- package/dist/397.js +0 -11
- package/dist/7.js +0 -1
- package/dist/743.js +0 -7
- package/dist/88.js +0 -40
- package/dist/connect.js +0 -581
- package/dist-types/server/prodServer.d.ts +0 -24
- /package/compiled/html-rspack-plugin/{loader.js → htmlLoader.js} +0 -0
- /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
- /package/dist/client/{59.js → 797.js} +0 -0
- /package/dist/{31.js → trace-mapping.js} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Array of passes.
|
|
3
|
+
*
|
|
4
|
+
* A `pass` is just a function that is executed on `req, res, options`
|
|
5
|
+
* so that you can easily add new checks while still keeping the base
|
|
6
|
+
* flexible.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
* Array of passes.
|
|
11
|
+
*
|
|
12
|
+
* A `pass` is just a function that is executed on `req, socket, options`
|
|
13
|
+
* so that you can easily add new checks while still keeping the base
|
|
14
|
+
* flexible.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/*!
|
|
18
|
+
* Caron dimonio, con occhi di bragia
|
|
19
|
+
* loro accennando, tutte le raccoglie;
|
|
20
|
+
* batte col remo qualunque s’adagia
|
|
21
|
+
*
|
|
22
|
+
* Charon the demon, with the eyes of glede,
|
|
23
|
+
* Beckoning to them, collects them all together,
|
|
24
|
+
* Beats with his oar whoever lags behind
|
|
25
|
+
*
|
|
26
|
+
* Dante - The Divine Comedy (Canto III)
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/*!
|
|
30
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/*!
|
|
37
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
40
|
+
* Licensed under the MIT License.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/*!
|
|
44
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
47
|
+
* Released under the MIT License.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/*!
|
|
51
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
54
|
+
* Released under the MIT License.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
61
|
+
* Released under the MIT License.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/*!
|
|
65
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
66
|
+
*
|
|
67
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
68
|
+
* Released under the MIT License.
|
|
69
|
+
*/
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./
|
|
1
|
+
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createLogger, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./958.js";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as __rspack_external_child_process from "child_process";
|
|
2
|
+
import * as __rspack_external_fs from "fs";
|
|
3
|
+
import * as __rspack_external_os from "os";
|
|
4
|
+
import * as __rspack_external_path from "path";
|
|
5
|
+
import * as __rspack_external_url from "url";
|
|
2
6
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
|
-
import "./131.js";
|
|
4
7
|
__webpack_require__.add({
|
|
5
|
-
"../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
6
|
-
let path = __webpack_require__("path"), launch = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.
|
|
8
|
+
"../../node_modules/.pnpm/launch-editor-middleware@2.13.2/node_modules/launch-editor-middleware/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
9
|
+
let path = __webpack_require__("path?940c"), launch = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/index.js");
|
|
7
10
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback)=>('function' == typeof specifiedEditor && (onErrorCallback = specifiedEditor, specifiedEditor = void 0), 'function' == typeof srcRoot && (onErrorCallback = srcRoot, srcRoot = void 0), srcRoot = srcRoot || process.cwd(), function launchEditorMiddleware(req, res) {
|
|
8
11
|
let url;
|
|
9
12
|
try {
|
|
@@ -17,7 +20,7 @@ __webpack_require__.add({
|
|
|
17
20
|
file ? (launch(file.startsWith('file://') ? file : path.resolve(srcRoot, file), specifiedEditor, onErrorCallback), res.end()) : (res.statusCode = 500, res.end('launch-editor-middleware: required query param "file" is missing.'));
|
|
18
21
|
});
|
|
19
22
|
},
|
|
20
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
23
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js" (module) {
|
|
21
24
|
module.exports = {
|
|
22
25
|
atom: 'atom',
|
|
23
26
|
Brackets: 'brackets',
|
|
@@ -27,6 +30,7 @@ __webpack_require__.add({
|
|
|
27
30
|
codium: 'codium',
|
|
28
31
|
cursor: 'cursor',
|
|
29
32
|
trae: 'trae',
|
|
33
|
+
antigravity: 'antigravity',
|
|
30
34
|
emacs: 'emacs',
|
|
31
35
|
gvim: 'gvim',
|
|
32
36
|
idea: 'idea',
|
|
@@ -48,7 +52,7 @@ __webpack_require__.add({
|
|
|
48
52
|
zed: 'zed'
|
|
49
53
|
};
|
|
50
54
|
},
|
|
51
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
55
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js" (module) {
|
|
52
56
|
module.exports = {
|
|
53
57
|
'/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
|
|
54
58
|
'/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
|
|
@@ -57,11 +61,14 @@ __webpack_require__.add({
|
|
|
57
61
|
'/Applications/Sublime Text.app/Contents/MacOS/sublime_text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
|
|
58
62
|
'/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
|
|
59
63
|
'/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
|
|
64
|
+
'/Applications/Visual Studio Code.app/Contents/MacOS/Code': 'code',
|
|
60
65
|
'/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
|
|
66
|
+
'/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders': 'code-insiders',
|
|
61
67
|
'/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': 'code-insiders',
|
|
62
68
|
'/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium',
|
|
63
69
|
'/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor',
|
|
64
70
|
'/Applications/Trae.app/Contents/MacOS/Electron': 'trae',
|
|
71
|
+
'/Applications/Antigravity.app/Contents/MacOS/Electron': 'antigravity',
|
|
65
72
|
'/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode',
|
|
66
73
|
'/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion',
|
|
67
74
|
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
|
|
@@ -78,7 +85,7 @@ __webpack_require__.add({
|
|
|
78
85
|
'/Applications/Zed.app/Contents/MacOS/zed': 'zed'
|
|
79
86
|
};
|
|
80
87
|
},
|
|
81
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
88
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js" (module) {
|
|
82
89
|
module.exports = [
|
|
83
90
|
'Brackets.exe',
|
|
84
91
|
'Code.exe',
|
|
@@ -104,11 +111,13 @@ __webpack_require__.add({
|
|
|
104
111
|
'goland64.exe',
|
|
105
112
|
'rider.exe',
|
|
106
113
|
'rider64.exe',
|
|
107
|
-
'
|
|
114
|
+
'Trae.exe',
|
|
115
|
+
'zed.exe',
|
|
116
|
+
'Antigravity.exe'
|
|
108
117
|
];
|
|
109
118
|
},
|
|
110
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
111
|
-
let path = __webpack_require__("path");
|
|
119
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
120
|
+
let path = __webpack_require__("path?940c");
|
|
112
121
|
module.exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
|
|
113
122
|
switch(path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '')){
|
|
114
123
|
case 'atom':
|
|
@@ -161,6 +170,7 @@ __webpack_require__.add({
|
|
|
161
170
|
case 'Code - Insiders':
|
|
162
171
|
case 'codium':
|
|
163
172
|
case 'trae':
|
|
173
|
+
case 'antigravity':
|
|
164
174
|
case 'cursor':
|
|
165
175
|
case 'vscodium':
|
|
166
176
|
case 'VSCodium':
|
|
@@ -203,8 +213,8 @@ __webpack_require__.add({
|
|
|
203
213
|
];
|
|
204
214
|
};
|
|
205
215
|
},
|
|
206
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
207
|
-
let path = __webpack_require__("path"), shellQuote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js"), childProcess = __webpack_require__("child_process"), COMMON_EDITORS_MACOS = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.
|
|
216
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
217
|
+
let path = __webpack_require__("path?940c"), shellQuote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js"), childProcess = __webpack_require__("child_process"), COMMON_EDITORS_MACOS = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js"), COMMON_EDITORS_LINUX = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js"), COMMON_EDITORS_WIN = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js");
|
|
208
218
|
module.exports = function guessEditor(specifiedEditor) {
|
|
209
219
|
if (specifiedEditor) return shellQuote.parse(specifiedEditor);
|
|
210
220
|
if (process.env.LAUNCH_EDITOR) return [
|
|
@@ -277,8 +287,8 @@ __webpack_require__.add({
|
|
|
277
287
|
];
|
|
278
288
|
};
|
|
279
289
|
},
|
|
280
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
281
|
-
let fs = __webpack_require__("fs"), os = __webpack_require__("os"), path = __webpack_require__("path"), colors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"), childProcess = __webpack_require__("child_process"), guessEditor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.
|
|
290
|
+
"../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
291
|
+
let fs = __webpack_require__("fs?8256"), os = __webpack_require__("os?58cf"), path = __webpack_require__("path?940c"), colors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"), childProcess = __webpack_require__("child_process"), guessEditor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js"), getArgumentsForPosition = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js");
|
|
282
292
|
function wrapErrorCallback(cb) {
|
|
283
293
|
return (fileName, errorMessage)=>{
|
|
284
294
|
console.log(), console.log(colors.red('Could not open ' + path.basename(fileName) + ' in the editor.')), errorMessage && ('.' !== errorMessage[errorMessage.length - 1] && (errorMessage += '.'), console.log(colors.red('The editor process exited with an error: ' + errorMessage))), console.log(), cb && cb(fileName, errorMessage);
|
|
@@ -295,7 +305,7 @@ __webpack_require__.add({
|
|
|
295
305
|
}
|
|
296
306
|
let positionRE = /:(\d+)(:(\d+))?$/;
|
|
297
307
|
function parseFile(file) {
|
|
298
|
-
file.startsWith('file://') && (file = __webpack_require__("url").fileURLToPath(file));
|
|
308
|
+
file.startsWith('file://') && (file = __webpack_require__("url?62de").fileURLToPath(file));
|
|
299
309
|
let fileName = file.replace(positionRE, ''), match = file.match(positionRE);
|
|
300
310
|
return {
|
|
301
311
|
fileName,
|
|
@@ -340,8 +350,66 @@ __webpack_require__.add({
|
|
|
340
350
|
});
|
|
341
351
|
};
|
|
342
352
|
},
|
|
353
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
354
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {}, isColorSupported = !(env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI), formatter = (open, close, replace = open)=>(input)=>{
|
|
355
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
356
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
357
|
+
}, replaceClose = (string, close, replace, index)=>{
|
|
358
|
+
let result = "", cursor = 0;
|
|
359
|
+
do result += string.substring(cursor, index) + replace, cursor = index + close.length, index = string.indexOf(close, cursor);
|
|
360
|
+
while (~index);
|
|
361
|
+
return result + string.substring(cursor);
|
|
362
|
+
}, createColors = (enabled = isColorSupported)=>{
|
|
363
|
+
let f = enabled ? formatter : ()=>String;
|
|
364
|
+
return {
|
|
365
|
+
isColorSupported: enabled,
|
|
366
|
+
reset: f("\x1b[0m", "\x1b[0m"),
|
|
367
|
+
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
|
368
|
+
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
|
369
|
+
italic: f("\x1b[3m", "\x1b[23m"),
|
|
370
|
+
underline: f("\x1b[4m", "\x1b[24m"),
|
|
371
|
+
inverse: f("\x1b[7m", "\x1b[27m"),
|
|
372
|
+
hidden: f("\x1b[8m", "\x1b[28m"),
|
|
373
|
+
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
|
374
|
+
black: f("\x1b[30m", "\x1b[39m"),
|
|
375
|
+
red: f("\x1b[31m", "\x1b[39m"),
|
|
376
|
+
green: f("\x1b[32m", "\x1b[39m"),
|
|
377
|
+
yellow: f("\x1b[33m", "\x1b[39m"),
|
|
378
|
+
blue: f("\x1b[34m", "\x1b[39m"),
|
|
379
|
+
magenta: f("\x1b[35m", "\x1b[39m"),
|
|
380
|
+
cyan: f("\x1b[36m", "\x1b[39m"),
|
|
381
|
+
white: f("\x1b[37m", "\x1b[39m"),
|
|
382
|
+
gray: f("\x1b[90m", "\x1b[39m"),
|
|
383
|
+
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
|
384
|
+
bgRed: f("\x1b[41m", "\x1b[49m"),
|
|
385
|
+
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
|
386
|
+
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
|
387
|
+
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
|
388
|
+
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
|
389
|
+
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
|
390
|
+
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
|
391
|
+
blackBright: f("\x1b[90m", "\x1b[39m"),
|
|
392
|
+
redBright: f("\x1b[91m", "\x1b[39m"),
|
|
393
|
+
greenBright: f("\x1b[92m", "\x1b[39m"),
|
|
394
|
+
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
|
395
|
+
blueBright: f("\x1b[94m", "\x1b[39m"),
|
|
396
|
+
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
|
397
|
+
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
|
398
|
+
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
|
399
|
+
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
|
400
|
+
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
|
401
|
+
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
|
402
|
+
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
|
403
|
+
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
|
404
|
+
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
|
405
|
+
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
|
406
|
+
bgWhiteBright: f("\x1b[107m", "\x1b[49m")
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
module.exports = createColors(), module.exports.createColors = createColors;
|
|
410
|
+
},
|
|
343
411
|
"../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
344
|
-
|
|
412
|
+
__webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js"), exports.parse = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js");
|
|
345
413
|
},
|
|
346
414
|
"../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js" (module) {
|
|
347
415
|
for(var CONTROL = "(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])", controlRE = RegExp('^' + CONTROL + '$'), META = '|&;()<> \\t', hash = /^#$/, TOKEN = '', i = 0; i < 4; i++)TOKEN += (0x100000000 * Math.random()).toString(16);
|
|
@@ -435,5 +503,17 @@ __webpack_require__.add({
|
|
|
435
503
|
},
|
|
436
504
|
child_process (module) {
|
|
437
505
|
module.exports = __rspack_external_child_process;
|
|
506
|
+
},
|
|
507
|
+
"fs?8256" (module) {
|
|
508
|
+
module.exports = __rspack_external_fs;
|
|
509
|
+
},
|
|
510
|
+
"os?58cf" (module) {
|
|
511
|
+
module.exports = __rspack_external_os;
|
|
512
|
+
},
|
|
513
|
+
"path?940c" (module) {
|
|
514
|
+
module.exports = __rspack_external_path;
|
|
515
|
+
},
|
|
516
|
+
"url?62de" (module) {
|
|
517
|
+
module.exports = __rspack_external_url;
|
|
438
518
|
}
|
|
439
|
-
});
|
|
519
|
+
}), __webpack_require__("../../node_modules/.pnpm/launch-editor-middleware@2.13.2/node_modules/launch-editor-middleware/index.js");
|