@rspack/dev-server 2.0.2 → 2.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.
Files changed (43) hide show
  1. package/client/clients/WebSocketClient.d.ts +17 -0
  2. package/client/clients/WebSocketClient.js +32 -0
  3. package/client/index.d.ts +17 -0
  4. package/client/index.js +356 -0
  5. package/client/modules/logger/Logger.d.ts +39 -0
  6. package/client/modules/logger/Logger.js +121 -0
  7. package/client/modules/logger/createConsoleLogger.d.ts +12 -0
  8. package/client/modules/logger/createConsoleLogger.js +119 -0
  9. package/client/modules/logger/index.d.ts +26 -0
  10. package/client/modules/logger/index.js +32 -0
  11. package/client/modules/types.d.ts +45 -0
  12. package/client/modules/types.js +17 -0
  13. package/client/overlay.d.ts +47 -0
  14. package/client/overlay.js +455 -0
  15. package/client/progress.d.ts +11 -0
  16. package/client/progress.js +197 -0
  17. package/client/socket.d.ts +15 -0
  18. package/client/socket.js +34 -0
  19. package/client/type.d.ts +15 -0
  20. package/client/type.js +1 -0
  21. package/client/utils/ansiHTML.d.ts +30 -0
  22. package/client/utils/ansiHTML.js +195 -0
  23. package/client/utils/log.d.ts +13 -0
  24. package/client/utils/log.js +11 -0
  25. package/client/utils/sendMessage.d.ts +11 -0
  26. package/client/utils/sendMessage.js +8 -0
  27. package/dist/0~chokidar.js +1476 -0
  28. package/dist/0~chokidar.js.LICENSE.txt +1 -0
  29. package/dist/0~connect-history-api-fallback.js +76 -0
  30. package/dist/0~connect-next.js +1249 -0
  31. package/dist/0~connect-next.js.LICENSE.txt +57 -0
  32. package/dist/0~debug.js +621 -0
  33. package/dist/0~http-proxy-middleware.js +3862 -0
  34. package/dist/0~http-proxy-middleware.js.LICENSE.txt +34 -0
  35. package/dist/0~launch-editor.js +649 -0
  36. package/dist/0~open.js +555 -0
  37. package/dist/0~p-retry.js +161 -0
  38. package/dist/0~serve-static.js +1595 -0
  39. package/dist/0~serve-static.js.LICENSE.txt +108 -0
  40. package/dist/944.js +5183 -0
  41. package/dist/index.d.ts +1008 -0
  42. package/dist/index.js +1 -0
  43. package/package.json +16 -17
@@ -0,0 +1,649 @@
1
+ import { __webpack_require__ } from "./944.js";
2
+ import "./944.js";
3
+ __webpack_require__.add({
4
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js" (module) {
5
+ module.exports = {
6
+ atom: 'atom',
7
+ Brackets: 'brackets',
8
+ 'code-insiders': 'code-insiders',
9
+ code: 'code',
10
+ vscodium: 'vscodium',
11
+ codium: 'codium',
12
+ cursor: 'cursor',
13
+ trae: 'trae',
14
+ antigravity: 'antigravity',
15
+ emacs: 'emacs',
16
+ gvim: 'gvim',
17
+ idea: 'idea',
18
+ 'idea.sh': 'idea',
19
+ phpstorm: 'phpstorm',
20
+ 'phpstorm.sh': 'phpstorm',
21
+ pycharm: 'pycharm',
22
+ 'pycharm.sh': 'pycharm',
23
+ rubymine: 'rubymine',
24
+ 'rubymine.sh': 'rubymine',
25
+ sublime_text: 'subl',
26
+ vim: 'vim',
27
+ webstorm: 'webstorm',
28
+ 'webstorm.sh': 'webstorm',
29
+ goland: 'goland',
30
+ 'goland.sh': 'goland',
31
+ rider: 'rider',
32
+ 'rider.sh': 'rider',
33
+ zed: 'zed'
34
+ };
35
+ },
36
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js" (module) {
37
+ module.exports = {
38
+ '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
39
+ '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
40
+ '/Applications/Brackets.app/Contents/MacOS/Brackets': 'brackets',
41
+ '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
42
+ '/Applications/Sublime Text.app/Contents/MacOS/sublime_text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
43
+ '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
44
+ '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
45
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Code': 'code',
46
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
47
+ '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders': 'code-insiders',
48
+ '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': 'code-insiders',
49
+ '/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium',
50
+ '/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor',
51
+ '/Applications/Trae.app/Contents/MacOS/Electron': 'trae',
52
+ '/Applications/Antigravity.app/Contents/MacOS/Electron': 'antigravity',
53
+ '/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode',
54
+ '/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion',
55
+ '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
56
+ '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea',
57
+ '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea',
58
+ '/Applications/PhpStorm.app/Contents/MacOS/phpstorm': '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
59
+ '/Applications/PyCharm.app/Contents/MacOS/pycharm': '/Applications/PyCharm.app/Contents/MacOS/pycharm',
60
+ '/Applications/PyCharm CE.app/Contents/MacOS/pycharm': '/Applications/PyCharm CE.app/Contents/MacOS/pycharm',
61
+ '/Applications/RubyMine.app/Contents/MacOS/rubymine': '/Applications/RubyMine.app/Contents/MacOS/rubymine',
62
+ '/Applications/WebStorm.app/Contents/MacOS/webstorm': '/Applications/WebStorm.app/Contents/MacOS/webstorm',
63
+ '/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
64
+ '/Applications/GoLand.app/Contents/MacOS/goland': '/Applications/GoLand.app/Contents/MacOS/goland',
65
+ '/Applications/Rider.app/Contents/MacOS/rider': '/Applications/Rider.app/Contents/MacOS/rider',
66
+ '/Applications/Zed.app/Contents/MacOS/zed': 'zed'
67
+ };
68
+ },
69
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js" (module) {
70
+ module.exports = [
71
+ 'Brackets.exe',
72
+ 'Code.exe',
73
+ 'Code - Insiders.exe',
74
+ 'VSCodium.exe',
75
+ 'Cursor.exe',
76
+ 'atom.exe',
77
+ 'sublime_text.exe',
78
+ 'notepad++.exe',
79
+ 'clion.exe',
80
+ 'clion64.exe',
81
+ 'idea.exe',
82
+ 'idea64.exe',
83
+ 'phpstorm.exe',
84
+ 'phpstorm64.exe',
85
+ 'pycharm.exe',
86
+ 'pycharm64.exe',
87
+ 'rubymine.exe',
88
+ 'rubymine64.exe',
89
+ 'webstorm.exe',
90
+ 'webstorm64.exe',
91
+ 'goland.exe',
92
+ 'goland64.exe',
93
+ 'rider.exe',
94
+ 'rider64.exe',
95
+ 'Trae.exe',
96
+ 'zed.exe',
97
+ 'Antigravity.exe'
98
+ ];
99
+ },
100
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
101
+ const path = __webpack_require__("path");
102
+ module.exports = function(editor, fileName, lineNumber, columnNumber = 1) {
103
+ const editorBasename = path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '');
104
+ switch(editorBasename){
105
+ case 'atom':
106
+ case 'Atom':
107
+ case 'Atom Beta':
108
+ case 'subl':
109
+ case 'sublime':
110
+ case 'sublime_text':
111
+ case 'wstorm':
112
+ case 'charm':
113
+ case 'zed':
114
+ return [
115
+ `${fileName}:${lineNumber}:${columnNumber}`
116
+ ];
117
+ case 'notepad++':
118
+ return [
119
+ '-n' + lineNumber,
120
+ '-c' + columnNumber,
121
+ fileName
122
+ ];
123
+ case 'vim':
124
+ case 'mvim':
125
+ return [
126
+ `+call cursor(${lineNumber}, ${columnNumber})`,
127
+ fileName
128
+ ];
129
+ case 'joe':
130
+ case 'gvim':
131
+ return [
132
+ `+${lineNumber}`,
133
+ fileName
134
+ ];
135
+ case 'emacs':
136
+ case 'emacsclient':
137
+ return [
138
+ `+${lineNumber}:${columnNumber}`,
139
+ fileName
140
+ ];
141
+ case 'rmate':
142
+ case 'mate':
143
+ case 'mine':
144
+ return [
145
+ '--line',
146
+ lineNumber,
147
+ fileName
148
+ ];
149
+ case 'code':
150
+ case 'Code':
151
+ case 'code-insiders':
152
+ case 'Code - Insiders':
153
+ case 'codium':
154
+ case 'trae':
155
+ case 'antigravity':
156
+ case 'cursor':
157
+ case 'vscodium':
158
+ case 'VSCodium':
159
+ return [
160
+ '-r',
161
+ '-g',
162
+ `${fileName}:${lineNumber}:${columnNumber}`
163
+ ];
164
+ case 'appcode':
165
+ case 'clion':
166
+ case 'clion64':
167
+ case 'idea':
168
+ case 'idea64':
169
+ case 'phpstorm':
170
+ case 'phpstorm64':
171
+ case 'pycharm':
172
+ case 'pycharm64':
173
+ case 'rubymine':
174
+ case 'rubymine64':
175
+ case 'webstorm':
176
+ case 'webstorm64':
177
+ case 'goland':
178
+ case 'goland64':
179
+ case 'rider':
180
+ case 'rider64':
181
+ return [
182
+ '--line',
183
+ lineNumber,
184
+ '--column',
185
+ columnNumber,
186
+ fileName
187
+ ];
188
+ }
189
+ if (process.env.LAUNCH_EDITOR) return [
190
+ fileName,
191
+ lineNumber,
192
+ columnNumber
193
+ ];
194
+ return [
195
+ fileName
196
+ ];
197
+ };
198
+ },
199
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
200
+ const path = __webpack_require__("path");
201
+ const shellQuote = __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js");
202
+ const childProcess = __webpack_require__("child_process");
203
+ const COMMON_EDITORS_MACOS = __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js");
204
+ const COMMON_EDITORS_LINUX = __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js");
205
+ const COMMON_EDITORS_WIN = __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js");
206
+ function getEditorFromMacProcesses(output) {
207
+ const processNames = Object.keys(COMMON_EDITORS_MACOS);
208
+ const processList = output.split('\n');
209
+ for(let i = 0; i < processNames.length; i++){
210
+ const processName = processNames[i];
211
+ if (processList.includes(processName)) return COMMON_EDITORS_MACOS[processName];
212
+ const processNameWithoutApplications = processName.replace('/Applications', '');
213
+ if (-1 !== output.indexOf(processNameWithoutApplications)) {
214
+ if (processName !== COMMON_EDITORS_MACOS[processName]) return COMMON_EDITORS_MACOS[processName];
215
+ const runningProcess = processList.find((procName)=>procName.endsWith(processNameWithoutApplications));
216
+ if (void 0 !== runningProcess) return runningProcess;
217
+ }
218
+ }
219
+ }
220
+ function getEditorFromWindowsProcesses(output) {
221
+ const runningProcesses = output.split('\r\n');
222
+ for(let i = 0; i < runningProcesses.length; i++){
223
+ const fullProcessPath = runningProcesses[i].trim();
224
+ const shortProcessName = path.win32.basename(fullProcessPath);
225
+ if (-1 !== COMMON_EDITORS_WIN.indexOf(shortProcessName)) return fullProcessPath;
226
+ }
227
+ }
228
+ function getEditorFromLinuxProcesses(output) {
229
+ const processNames = Object.keys(COMMON_EDITORS_LINUX);
230
+ for(let i = 0; i < processNames.length; i++){
231
+ const processName = processNames[i];
232
+ if (-1 !== output.indexOf(processName)) return COMMON_EDITORS_LINUX[processName];
233
+ }
234
+ }
235
+ function guessEditor(specifiedEditor) {
236
+ if (specifiedEditor) return shellQuote.parse(specifiedEditor);
237
+ if (process.env.LAUNCH_EDITOR) return [
238
+ process.env.LAUNCH_EDITOR
239
+ ];
240
+ if (process.versions.webcontainer) return [
241
+ process.env.EDITOR || 'code'
242
+ ];
243
+ try {
244
+ if ('darwin' === process.platform) {
245
+ const output = childProcess.execSync('ps x -o comm=', {
246
+ stdio: [
247
+ 'pipe',
248
+ 'pipe',
249
+ 'ignore'
250
+ ]
251
+ }).toString();
252
+ const editor = getEditorFromMacProcesses(output);
253
+ if (void 0 !== editor) return [
254
+ editor
255
+ ];
256
+ } else if ('win32' === process.platform) {
257
+ const output = childProcess.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"', {
258
+ stdio: [
259
+ 'pipe',
260
+ 'pipe',
261
+ 'ignore'
262
+ ]
263
+ }).toString();
264
+ const editor = getEditorFromWindowsProcesses(output);
265
+ if (void 0 !== editor) return [
266
+ editor
267
+ ];
268
+ } else if ('linux' === process.platform) {
269
+ const output = childProcess.execSync('ps x --no-heading -o comm --sort=comm', {
270
+ stdio: [
271
+ 'pipe',
272
+ 'pipe',
273
+ 'ignore'
274
+ ]
275
+ }).toString();
276
+ const editor = getEditorFromLinuxProcesses(output);
277
+ if (void 0 !== editor) return [
278
+ editor
279
+ ];
280
+ }
281
+ } catch (ignoreError) {}
282
+ if (process.env.VISUAL) return [
283
+ process.env.VISUAL
284
+ ];
285
+ if (process.env.EDITOR) return [
286
+ process.env.EDITOR
287
+ ];
288
+ return [
289
+ null
290
+ ];
291
+ }
292
+ module.exports = guessEditor;
293
+ module.exports.getEditorFromMacProcesses = getEditorFromMacProcesses;
294
+ module.exports.getEditorFromWindowsProcesses = getEditorFromWindowsProcesses;
295
+ module.exports.getEditorFromLinuxProcesses = getEditorFromLinuxProcesses;
296
+ },
297
+ "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
298
+ const fs = __webpack_require__("fs");
299
+ const os = __webpack_require__("os");
300
+ const path = __webpack_require__("path");
301
+ const colors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
302
+ const childProcess = __webpack_require__("child_process");
303
+ const guessEditor = __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js");
304
+ const getArgumentsForPosition = __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js");
305
+ function wrapErrorCallback(cb) {
306
+ return (fileName, errorMessage)=>{
307
+ console.log();
308
+ console.log(colors.red('Could not open ' + path.basename(fileName) + ' in the editor.'));
309
+ if (errorMessage) {
310
+ if ('.' !== errorMessage[errorMessage.length - 1]) errorMessage += '.';
311
+ console.log(colors.red('The editor process exited with an error: ' + errorMessage));
312
+ }
313
+ console.log();
314
+ if (cb) cb(fileName, errorMessage);
315
+ };
316
+ }
317
+ function isTerminalEditor(editor) {
318
+ switch(editor){
319
+ case 'vim':
320
+ case 'emacs':
321
+ case 'nano':
322
+ return true;
323
+ }
324
+ return false;
325
+ }
326
+ const positionRE = /:(\d+)(:(\d+))?$/;
327
+ function parseFile(file) {
328
+ if (file.startsWith('file://')) file = __webpack_require__("url?b918").fileURLToPath(file);
329
+ const fileName = file.replace(positionRE, '');
330
+ const match = file.match(positionRE);
331
+ const lineNumber = match && match[1];
332
+ const columnNumber = match && match[3];
333
+ return {
334
+ fileName,
335
+ lineNumber,
336
+ columnNumber
337
+ };
338
+ }
339
+ let currentChildProcess = null;
340
+ function launchEditor(file, specifiedEditor, onErrorCallback) {
341
+ const parsed = parseFile(file);
342
+ let { fileName } = parsed;
343
+ const { lineNumber, columnNumber } = parsed;
344
+ if ('win32' === process.platform && path.resolve(fileName).startsWith('\\\\')) return onErrorCallback(fileName, "UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");
345
+ if (!fs.existsSync(fileName)) return;
346
+ if ('function' == typeof specifiedEditor) {
347
+ onErrorCallback = specifiedEditor;
348
+ specifiedEditor = void 0;
349
+ }
350
+ onErrorCallback = wrapErrorCallback(onErrorCallback);
351
+ const [editor, ...args] = guessEditor(specifiedEditor);
352
+ if (!editor) return void onErrorCallback(fileName, null);
353
+ if ('linux' === process.platform && fileName.startsWith('/mnt/') && /Microsoft/i.test(os.release())) fileName = path.relative('', fileName);
354
+ if (lineNumber) {
355
+ const extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
356
+ args.push.apply(args, extraArgs);
357
+ } else args.push(fileName);
358
+ if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill('SIGKILL');
359
+ if ('win32' === process.platform) {
360
+ function escapeCmdArgs(cmdArgs) {
361
+ return cmdArgs.replace(/([&|<>,;=^])/g, '^$1');
362
+ }
363
+ function doubleQuoteIfNeeded(str) {
364
+ if (str.includes('^')) return `^"${str}^"`;
365
+ if (str.includes(' ')) return `"${str}"`;
366
+ return str;
367
+ }
368
+ const launchCommand = [
369
+ editor,
370
+ ...args.map(escapeCmdArgs)
371
+ ].map(doubleQuoteIfNeeded).join(' ');
372
+ currentChildProcess = childProcess.exec(launchCommand, {
373
+ stdio: 'inherit',
374
+ shell: true
375
+ });
376
+ } else currentChildProcess = childProcess.spawn(editor, args, {
377
+ stdio: 'inherit'
378
+ });
379
+ currentChildProcess.on('exit', function(errorCode) {
380
+ currentChildProcess = null;
381
+ if (errorCode) onErrorCallback(fileName, '(code ' + errorCode + ')');
382
+ });
383
+ currentChildProcess.on('error', function(error) {
384
+ let { code, message } = error;
385
+ if ('ENOENT' === code) message = `${message} ('${editor}' command does not exist in 'PATH')`;
386
+ onErrorCallback(fileName, message);
387
+ });
388
+ }
389
+ module.exports = launchEditor;
390
+ },
391
+ "./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
392
+ let p = process || {}, argv = p.argv || [], env = p.env || {};
393
+ let 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);
394
+ let formatter = (open, close, replace = open)=>(input)=>{
395
+ let string = "" + input, index = string.indexOf(close, open.length);
396
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
397
+ };
398
+ let replaceClose = (string, close, replace, index)=>{
399
+ let result = "", cursor = 0;
400
+ do {
401
+ result += string.substring(cursor, index) + replace;
402
+ cursor = index + close.length;
403
+ index = string.indexOf(close, cursor);
404
+ }while (~index);
405
+ return result + string.substring(cursor);
406
+ };
407
+ let createColors = (enabled = isColorSupported)=>{
408
+ let f = enabled ? formatter : ()=>String;
409
+ return {
410
+ isColorSupported: enabled,
411
+ reset: f("\x1b[0m", "\x1b[0m"),
412
+ bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
413
+ dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
414
+ italic: f("\x1b[3m", "\x1b[23m"),
415
+ underline: f("\x1b[4m", "\x1b[24m"),
416
+ inverse: f("\x1b[7m", "\x1b[27m"),
417
+ hidden: f("\x1b[8m", "\x1b[28m"),
418
+ strikethrough: f("\x1b[9m", "\x1b[29m"),
419
+ black: f("\x1b[30m", "\x1b[39m"),
420
+ red: f("\x1b[31m", "\x1b[39m"),
421
+ green: f("\x1b[32m", "\x1b[39m"),
422
+ yellow: f("\x1b[33m", "\x1b[39m"),
423
+ blue: f("\x1b[34m", "\x1b[39m"),
424
+ magenta: f("\x1b[35m", "\x1b[39m"),
425
+ cyan: f("\x1b[36m", "\x1b[39m"),
426
+ white: f("\x1b[37m", "\x1b[39m"),
427
+ gray: f("\x1b[90m", "\x1b[39m"),
428
+ bgBlack: f("\x1b[40m", "\x1b[49m"),
429
+ bgRed: f("\x1b[41m", "\x1b[49m"),
430
+ bgGreen: f("\x1b[42m", "\x1b[49m"),
431
+ bgYellow: f("\x1b[43m", "\x1b[49m"),
432
+ bgBlue: f("\x1b[44m", "\x1b[49m"),
433
+ bgMagenta: f("\x1b[45m", "\x1b[49m"),
434
+ bgCyan: f("\x1b[46m", "\x1b[49m"),
435
+ bgWhite: f("\x1b[47m", "\x1b[49m"),
436
+ blackBright: f("\x1b[90m", "\x1b[39m"),
437
+ redBright: f("\x1b[91m", "\x1b[39m"),
438
+ greenBright: f("\x1b[92m", "\x1b[39m"),
439
+ yellowBright: f("\x1b[93m", "\x1b[39m"),
440
+ blueBright: f("\x1b[94m", "\x1b[39m"),
441
+ magentaBright: f("\x1b[95m", "\x1b[39m"),
442
+ cyanBright: f("\x1b[96m", "\x1b[39m"),
443
+ whiteBright: f("\x1b[97m", "\x1b[39m"),
444
+ bgBlackBright: f("\x1b[100m", "\x1b[49m"),
445
+ bgRedBright: f("\x1b[101m", "\x1b[49m"),
446
+ bgGreenBright: f("\x1b[102m", "\x1b[49m"),
447
+ bgYellowBright: f("\x1b[103m", "\x1b[49m"),
448
+ bgBlueBright: f("\x1b[104m", "\x1b[49m"),
449
+ bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
450
+ bgCyanBright: f("\x1b[106m", "\x1b[49m"),
451
+ bgWhiteBright: f("\x1b[107m", "\x1b[49m")
452
+ };
453
+ };
454
+ module.exports = createColors();
455
+ module.exports.createColors = createColors;
456
+ },
457
+ "./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js" (__unused_rspack_module, exports, __webpack_require__) {
458
+ __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js");
459
+ exports.parse = __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js");
460
+ },
461
+ "./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js" (module) {
462
+ var CONTROL = "(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])";
463
+ var controlRE = new RegExp('^' + CONTROL + '$');
464
+ var META = '|&;()<> \\t';
465
+ var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
466
+ var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\'';
467
+ var hash = /^#$/;
468
+ var SQ = "'";
469
+ var DQ = '"';
470
+ var DS = '$';
471
+ var TOKEN = '';
472
+ var mult = 0x100000000;
473
+ for(var i = 0; i < 4; i++)TOKEN += (mult * Math.random()).toString(16);
474
+ var startsWithToken = new RegExp('^' + TOKEN);
475
+ function matchAll(s, r) {
476
+ var origIndex = r.lastIndex;
477
+ var matches = [];
478
+ var matchObj;
479
+ while(matchObj = r.exec(s)){
480
+ matches.push(matchObj);
481
+ if (r.lastIndex === matchObj.index) r.lastIndex += 1;
482
+ }
483
+ r.lastIndex = origIndex;
484
+ return matches;
485
+ }
486
+ function getVar(env, pre, key) {
487
+ var r = 'function' == typeof env ? env(key) : env[key];
488
+ if (void 0 === r && '' != key) r = '';
489
+ else if (void 0 === r) r = '$';
490
+ if ('object' == typeof r) return pre + TOKEN + JSON.stringify(r) + TOKEN;
491
+ return pre + r;
492
+ }
493
+ function parseInternal(string, env, opts) {
494
+ if (!opts) opts = {};
495
+ var BS = opts.escape || '\\';
496
+ var BAREWORD = '(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META + '])+';
497
+ var chunker = new RegExp([
498
+ '(' + CONTROL + ')',
499
+ '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')+'
500
+ ].join('|'), 'g');
501
+ var matches = matchAll(string, chunker);
502
+ if (0 === matches.length) return [];
503
+ if (!env) env = {};
504
+ var commented = false;
505
+ return matches.map(function(match) {
506
+ var s = match[0];
507
+ if (!s || commented) return;
508
+ if (controlRE.test(s)) return {
509
+ op: s
510
+ };
511
+ var quote = false;
512
+ var esc = false;
513
+ var out = '';
514
+ var isGlob = false;
515
+ var i;
516
+ function parseEnvVar() {
517
+ i += 1;
518
+ var varend;
519
+ var varname;
520
+ var char = s.charAt(i);
521
+ if ('{' === char) {
522
+ i += 1;
523
+ if ('}' === s.charAt(i)) throw new Error('Bad substitution: ' + s.slice(i - 2, i + 1));
524
+ varend = s.indexOf('}', i);
525
+ if (varend < 0) throw new Error('Bad substitution: ' + s.slice(i));
526
+ varname = s.slice(i, varend);
527
+ i = varend;
528
+ } else if (/[*@#?$!_-]/.test(char)) {
529
+ varname = char;
530
+ i += 1;
531
+ } else {
532
+ var slicedFromI = s.slice(i);
533
+ varend = slicedFromI.match(/[^\w\d_]/);
534
+ if (varend) {
535
+ varname = slicedFromI.slice(0, varend.index);
536
+ i += varend.index - 1;
537
+ } else {
538
+ varname = slicedFromI;
539
+ i = s.length;
540
+ }
541
+ }
542
+ return getVar(env, '', varname);
543
+ }
544
+ for(i = 0; i < s.length; i++){
545
+ var c = s.charAt(i);
546
+ isGlob = isGlob || !quote && ('*' === c || '?' === c);
547
+ if (esc) {
548
+ out += c;
549
+ esc = false;
550
+ } else if (quote) if (c === quote) quote = false;
551
+ else if (quote == SQ) out += c;
552
+ else if (c === BS) {
553
+ i += 1;
554
+ c = s.charAt(i);
555
+ if (c === DQ || c === BS || c === DS) out += c;
556
+ else out += BS + c;
557
+ } else if (c === DS) out += parseEnvVar();
558
+ else out += c;
559
+ else if (c === DQ || c === SQ) quote = c;
560
+ else if (controlRE.test(c)) return {
561
+ op: s
562
+ };
563
+ else if (hash.test(c)) {
564
+ commented = true;
565
+ var commentObj = {
566
+ comment: string.slice(match.index + i + 1)
567
+ };
568
+ if (out.length) return [
569
+ out,
570
+ commentObj
571
+ ];
572
+ return [
573
+ commentObj
574
+ ];
575
+ } else if (c === BS) esc = true;
576
+ else if (c === DS) out += parseEnvVar();
577
+ else out += c;
578
+ }
579
+ if (isGlob) return {
580
+ op: 'glob',
581
+ pattern: out
582
+ };
583
+ return out;
584
+ }).reduce(function(prev, arg) {
585
+ return void 0 === arg ? prev : prev.concat(arg);
586
+ }, []);
587
+ }
588
+ module.exports = function(s, env, opts) {
589
+ var mapped = parseInternal(s, env, opts);
590
+ if ('function' != typeof env) return mapped;
591
+ return mapped.reduce(function(acc, s) {
592
+ if ('object' == typeof s) return acc.concat(s);
593
+ var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));
594
+ if (1 === xs.length) return acc.concat(xs[0]);
595
+ return acc.concat(xs.filter(Boolean).map(function(x) {
596
+ if (startsWithToken.test(x)) return JSON.parse(x.split(TOKEN)[1]);
597
+ return x;
598
+ }));
599
+ }, []);
600
+ };
601
+ },
602
+ "./node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js" (module) {
603
+ var OPS = [
604
+ '||',
605
+ '&&',
606
+ ';;',
607
+ '|&',
608
+ '<(',
609
+ '<<<',
610
+ '>>',
611
+ '>&',
612
+ '<&',
613
+ '&',
614
+ ';',
615
+ '(',
616
+ ')',
617
+ '|',
618
+ '<',
619
+ '>'
620
+ ];
621
+ var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
622
+ var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|]/g;
623
+ module.exports = function(xs) {
624
+ return xs.map(function(s) {
625
+ if ('' === s) return '\'\'';
626
+ if (s && 'object' == typeof s) {
627
+ if ('glob' === s.op) {
628
+ if ('string' != typeof s.pattern) throw new TypeError('glob token requires a string `pattern`');
629
+ if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError('glob `pattern` must not contain line terminators');
630
+ return s.pattern.replace(GLOB_SHELL_SPECIAL, '\\$&');
631
+ }
632
+ if ('string' == typeof s.op) {
633
+ if (OPS.indexOf(s.op) < 0) throw new TypeError('invalid `op` value: ' + JSON.stringify(s.op));
634
+ return s.op.replace(/[\s\S]/g, '\\$&');
635
+ }
636
+ if ('string' == typeof s.comment) {
637
+ if (LINE_TERMINATORS.test(s.comment)) throw new TypeError('`comment` must not contain line terminators');
638
+ return '#' + s.comment;
639
+ }
640
+ throw new TypeError('unrecognized object token shape');
641
+ }
642
+ if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['])/g, '\\$1') + "'";
643
+ if (/["'\s]/.test(s)) return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
644
+ return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
645
+ }).join(' ');
646
+ };
647
+ }
648
+ });
649
+ __webpack_require__("./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js");