@rsbuild/core 2.1.8 → 2.1.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.
@@ -31,12 +31,12 @@ declare namespace Node {
31
31
 
32
32
  export interface Position {
33
33
  /**
34
- * Source line in file. In contrast to `offset` it starts from 1.
34
+ * Source column in file. It starts from 1.
35
35
  */
36
36
  column: number
37
37
 
38
38
  /**
39
- * Source column in file.
39
+ * Source line in file. It starts from 1.
40
40
  */
41
41
  line: number
42
42
 
@@ -1 +1 @@
1
- {"name":"postcss","author":"Andrey Sitnik <andrey@sitnik.es>","version":"8.5.19","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"./lib/postcss.d.ts","type":"commonjs"}
1
+ {"name":"postcss","author":"Andrey Sitnik <andrey@sitnik.es>","version":"8.5.25","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"./lib/postcss.d.ts","type":"commonjs"}
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 86: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(116)["default"];
4
+ 391: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(545)["default"];
6
6
  },
7
- 116: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 545: (__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 _nodePath = _interopRequireDefault(__nccwpck_require__(760));
12
- var _utils = __nccwpck_require__(205);
12
+ var _utils = __nccwpck_require__(452);
13
13
  function _interopRequireDefault(e) {
14
14
  return e && e.__esModule ? e : { default: e };
15
15
  }
@@ -179,7 +179,7 @@
179
179
  callback(null, result.css, map, { ast });
180
180
  }
181
181
  },
182
- 205: (module, exports, __nccwpck_require__) => {
182
+ 452: (module, exports, __nccwpck_require__) => {
183
183
  module = __nccwpck_require__.nmd(module);
184
184
  Object.defineProperty(exports, "__esModule", { value: true });
185
185
  exports.exec = exec;
@@ -716,6 +716,6 @@
716
716
  })();
717
717
  if (typeof __nccwpck_require__ !== "undefined")
718
718
  __nccwpck_require__.ab = __dirname + "/";
719
- var __webpack_exports__ = __nccwpck_require__(86);
719
+ var __webpack_exports__ = __nccwpck_require__(391);
720
720
  module.exports = __webpack_exports__;
721
721
  })();
@@ -1 +1 @@
1
- {"name":"rspack-chain","version":"2.1.1","license":"MIT","types":"types/index.d.ts","type":"module"}
1
+ {"name":"rspack-chain","version":"2.1.2","license":"MIT","types":"types/index.d.ts","type":"module"}
@@ -63,13 +63,13 @@ export declare class RspackChain extends __Config.ChainedMap<void> {
63
63
  >;
64
64
  output: RspackChain.Output;
65
65
  module: RspackChain.Module;
66
- node: RspackChain.ChainedMap<this> & ((value: boolean) => this);
66
+ node: RspackChain.ChainedMap<this> & ((value: false) => this);
67
67
  optimization: RspackChain.Optimization;
68
- performance: RspackChain.Performance & ((value: boolean) => this);
68
+ performance: RspackChain.Performance & ((value: false) => this);
69
69
  plugins: RspackChain.Plugins<this, PluginInstance>;
70
70
  resolve: RspackChain.Resolve;
71
71
  resolveLoader: RspackChain.ResolveLoader;
72
- devServer: RspackChain.DevServer;
72
+ devServer: RspackChain.DevServer & ((value: false) => this);
73
73
 
74
74
  context(value: RspackConfig['context']): this;
75
75
  mode(value: RspackConfig['mode']): this;
@@ -272,8 +272,9 @@ export declare namespace RspackChain {
272
272
  }
273
273
 
274
274
  type RspackResolve = Required<NonNullable<Configuration['resolve']>>;
275
+ type RspackResolveAlias = Exclude<RspackResolve['alias'], false>;
275
276
  class Resolve<T = RspackChain> extends ChainedMap<T> {
276
- alias: TypedChainedMap<this, { [key: string]: string | false | string[] }>;
277
+ alias: TypedChainedMap<this, RspackResolveAlias>;
277
278
  aliasFields: TypedChainedSet<this, RspackResolve['aliasFields'][number]>;
278
279
  conditionNames: TypedChainedSet<
279
280
  this,
@@ -298,10 +299,7 @@ export declare namespace RspackChain {
298
299
  restrictions: TypedChainedSet<this, RspackResolve['restrictions'][number]>;
299
300
  roots: TypedChainedSet<this, RspackResolve['roots'][number]>;
300
301
  modules: TypedChainedSet<this, RspackResolve['modules'][number]>;
301
- fallback: TypedChainedMap<
302
- this,
303
- { [key: string]: string | false | string[] }
304
- >;
302
+ fallback: TypedChainedMap<this, RspackResolveAlias>;
305
303
  byDependency: TypedChainedMap<this, RspackResolve['byDependency']>;
306
304
  enforceExtension(value: RspackResolve['enforceExtension']): this;
307
305
  fullySpecified(value: RspackResolve['fullySpecified']): this;
@@ -400,9 +398,7 @@ export declare namespace RspackChain {
400
398
  [name: string]: any;
401
399
  }
402
400
 
403
- interface LoaderOptions {
404
- [name: string]: any;
405
- }
401
+ type LoaderOptions = NonNullable<RuleSetLoaderWithOptions['options']>;
406
402
 
407
403
  type LoaderParallelOptions = NonNullable<
408
404
  RuleSetLoaderWithOptions['parallel']
package/dist/626.js CHANGED
@@ -386,8 +386,8 @@ __webpack_require__.add({
386
386
  return (asyncHooks.AsyncResource && (res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn')), res && res.runInAsyncScope) ? res.runInAsyncScope.bind(res, fn, null) : fn;
387
387
  }
388
388
  },
389
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
390
- let yaml, { resolve } = __webpack_require__("node:path?815c"), config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/options.js"), loadPlugins = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/plugins.js"), req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/req.js");
389
+ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
390
+ let yaml, { resolve } = __webpack_require__("node:path?815c"), config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/options.js"), loadPlugins = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/plugins.js"), req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/req.js");
391
391
  async function processResult(ctx, result) {
392
392
  let obj, file = result.filepath || '', projectConfig = ((obj = result.config) && obj.__esModule ? obj : {
393
393
  default: obj
@@ -460,8 +460,8 @@ __webpack_require__.add({
460
460
  });
461
461
  };
462
462
  },
463
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/options.js" (module, __unused_rspack_exports, __webpack_require__) {
464
- let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/req.js");
463
+ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/options.js" (module, __unused_rspack_exports, __webpack_require__) {
464
+ let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/req.js");
465
465
  module.exports = async function options(config, file) {
466
466
  if (config.parser && 'string' == typeof config.parser) try {
467
467
  config.parser = await req(config.parser, file);
@@ -481,8 +481,8 @@ __webpack_require__.add({
481
481
  return config;
482
482
  };
483
483
  },
484
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/plugins.js" (module, __unused_rspack_exports, __webpack_require__) {
485
- let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/req.js");
484
+ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/plugins.js" (module, __unused_rspack_exports, __webpack_require__) {
485
+ let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/req.js");
486
486
  async function load(plugin, options, file) {
487
487
  try {
488
488
  if (null == options || 0 === Object.keys(options).length) return await req(plugin, file);
@@ -498,7 +498,7 @@ __webpack_require__.add({
498
498
  }), list;
499
499
  };
500
500
  },
501
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
501
+ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
502
502
  let tsx, jiti, { createRequire } = __webpack_require__("node:module?f56b"), { pathToFileURL } = __webpack_require__("node:url?5295"), TS_EXT_RE = /\.[mc]?ts$/, importError = [];
503
503
  module.exports = async function req(name, rootFile = __rspack_import_meta_filename__) {
504
504
  let url = createRequire(rootFile).resolve(name);
@@ -1798,7 +1798,7 @@ let ChainedMap = createMap(createChainable(Object)), ChainedValueMap = (superCla
1798
1798
  'clean'
1799
1799
  ]);
1800
1800
  }
1801
- }, DevServer = class extends ChainedMap {
1801
+ }, DevServer = class extends ChainedValueMap {
1802
1802
  constructor(parent){
1803
1803
  super(parent), this.extend([
1804
1804
  'allowedHosts',
@@ -1825,7 +1825,8 @@ let ChainedMap = createMap(createChainable(Object)), ChainedValueMap = (superCla
1825
1825
  ]);
1826
1826
  }
1827
1827
  toConfig() {
1828
- return this.clean(this.entries() || {});
1828
+ let config = this.entries();
1829
+ return !1 !== config && this.clean(config || {});
1829
1830
  }
1830
1831
  }, Orderable = (Class)=>class extends Class {
1831
1832
  before(name) {
@@ -2152,6 +2153,10 @@ class RspackChain extends ChainedMap {
2152
2153
  entryImport.push(item);
2153
2154
  continue;
2154
2155
  }
2156
+ if (Array.isArray(item)) {
2157
+ entryImport.push(...item);
2158
+ continue;
2159
+ }
2155
2160
  item.import && entryImport.push(...castArray(item.import)), entryDescription ? Object.assign(entryDescription, item) : entryDescription = item;
2156
2161
  }
2157
2162
  formattedEntry[entryName] = entryDescription ? {
@@ -3407,7 +3412,7 @@ function createPublicContext(context) {
3407
3412
  async function createContext(options, userConfig, logger, loadConfigResult) {
3408
3413
  let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = join(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, hooks = initHooks();
3409
3414
  return {
3410
- version: "2.1.8",
3415
+ version: "2.1.10",
3411
3416
  rootPath,
3412
3417
  configFile: loadConfigResult?.filePath ?? userConfig._privateMeta?.configFilePath,
3413
3418
  configFileDependencies: loadConfigResult?.dependencies ?? userConfig._privateMeta?.configFileDependencies ?? [],
@@ -3507,7 +3512,6 @@ function stringifyConfig(config, verbose) {
3507
3512
  });
3508
3513
  }
3509
3514
  async function inspectConfig_inspectConfig({ context, pluginManager, bundlerConfigs, inspectOptions = {} }) {
3510
- inspectOptions.mode ? setNodeEnv(inspectOptions.mode) : process.env.NODE_ENV || setNodeEnv('development');
3511
3515
  let stringifiedBundlerConfigs = bundlerConfigs.map((config, index)=>({
3512
3516
  name: config.name || String(index),
3513
3517
  content: stringifyConfig(config, inspectOptions.verbose)
@@ -5029,7 +5033,7 @@ function parseMinifyOptions(config) {
5029
5033
  cssOptions: minify.cssOptions
5030
5034
  };
5031
5035
  }
5032
- let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.19/node_modules/postcss-load-config/src/index.js");
5036
+ let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25/node_modules/postcss-load-config/src/index.js");
5033
5037
  var postcss_load_config_src_default = __webpack_require__.n(postcss_load_config_src);
5034
5038
  async function getLightningCSSLoaderOptions(config, targets, minify) {
5035
5039
  let userOptions = 'object' == typeof config.tools.lightningcssLoader ? config.tools.lightningcssLoader : {}, initialOptions = {
@@ -5317,9 +5321,9 @@ async function printFileSizes(options, stats, rootPath, distPath, environmentNam
5317
5321
  }, getAssets = async ()=>{
5318
5322
  let { exclude, include } = options, formattedAssets = [], compilationAssets = stats.compilation.assets;
5319
5323
  for (let assetName of Object.keys(compilationAssets)){
5320
- let value = compilationAssets[assetName], filePath = getFilePath(assetName);
5324
+ let filePath = getFilePath(assetName);
5321
5325
  if (!exclude && EXCLUDE_ASSET_REGEX.test(filePath)) continue;
5322
- let content = options.compressed && isCompressible(filePath) ? value.source() : void 0, size = void 0 === content ? value.size() : Buffer.byteLength(content);
5326
+ let value = compilationAssets[assetName], content = options.compressed && isCompressible(filePath) ? value.source() : void 0, size = void 0 === content ? value.size() : Buffer.byteLength(content);
5323
5327
  if (exclude || include) {
5324
5328
  let publicAsset = {
5325
5329
  name: filePath,
@@ -5468,8 +5472,8 @@ class RsbuildHtmlPlugin {
5468
5472
  }
5469
5473
  apply(compiler) {
5470
5474
  let emitFavicon = async ({ compilation, favicon, faviconDistPath, logger })=>{
5471
- let fileContent, name = node_path.basename(favicon);
5472
- if (compilation.assets[name]) return name;
5475
+ let fileContent, name = node_path.basename(favicon), outputFilename = node_path.posix.join(faviconDistPath, name);
5476
+ if (outputFilename in compilation.assets) return outputFilename;
5473
5477
  let inputFs = compilation.inputFileSystem;
5474
5478
  if (!inputFs) return addCompilationError(compilation, `${color.dim('[rsbuild:html]')} Failed to read the favicon file as ${color.yellow('compilation.inputFileSystem')} is not available.`), null;
5475
5479
  let inputFilename = node_path.isAbsolute(favicon) ? favicon : node_path.join(compilation.compiler.context, favicon);
@@ -5478,7 +5482,7 @@ class RsbuildHtmlPlugin {
5478
5482
  } catch (error) {
5479
5483
  return logger.debug(`read favicon error: ${error}`), addCompilationError(compilation, `${color.dim('[rsbuild:html]')} Failed to read the favicon file at ${color.yellow(inputFilename)}.`), null;
5480
5484
  }
5481
- let source = new core_rspack.sources.RawSource(fileContent, !1), outputFilename = node_path.posix.join(faviconDistPath, name);
5485
+ let source = new core_rspack.sources.RawSource(fileContent, !1);
5482
5486
  return compilation.emitAsset(outputFilename, source), outputFilename;
5483
5487
  }, addFavicon = async ({ headTags, favicon, faviconDistPath, compilation, publicPath, logger })=>{
5484
5488
  let href = favicon;
@@ -5714,11 +5718,12 @@ function updateSourceMappingURL({ source, compilation, publicPath, type, config
5714
5718
  }
5715
5719
  return source;
5716
5720
  }
5717
- function matchTests(name, asset, tests) {
5718
- return tests.some((test)=>isFunction(test) ? test({
5721
+ function getMatchedAsset(name, assets, tests) {
5722
+ let asset;
5723
+ if (tests.some((test)=>isFunction(test) ? !!(asset ??= assets[name]) && test({
5719
5724
  name,
5720
5725
  size: asset.size()
5721
- }) : test.exec(name));
5726
+ }) : test.exec(name))) return asset ?? assets[name];
5722
5727
  }
5723
5728
  function getInlineTests(config) {
5724
5729
  let isProd = 'production' === config.mode, { inlineStyles, inlineScripts } = config.output, scriptTests = [], styleTests = [];
@@ -5754,19 +5759,31 @@ let normalizeUrl = (url)=>url.replace(/([^:]\/)\/+/g, '$1'), formatPrefix = (inp
5754
5759
  entryName,
5755
5760
  pathname: prefix + ('index' === entryName && 'nested' !== outputStructure ? '' : entryName)
5756
5761
  })).sort((a)=>'index' === a.entryName ? -1 : 1);
5757
- };
5762
+ }, formatName = (name)=>name ? `(${name.length > 20 ? `${name.slice(0, 19)}…` : name})` : name;
5758
5763
  function getURLMessages(urls, routes, { maxRoutes = 10, showAllRoutes, cliShortcutsEnabled }) {
5759
- let routeLimit = showAllRoutes ? 1 / 0 : void 0 === maxRoutes ? 10 : maxRoutes === 1 / 0 ? maxRoutes : Math.max(0, Math.floor(maxRoutes)), printableRoutes = 0 === routeLimit ? [] : routes.slice(0, routeLimit), moreEntries = routeLimit > 0 ? routes.length - printableRoutes.length : 0;
5764
+ let prevName, routeLimit = showAllRoutes ? 1 / 0 : void 0 === maxRoutes ? 10 : maxRoutes === 1 / 0 ? maxRoutes : Math.max(0, Math.floor(maxRoutes)), printableRoutes = 0 === routeLimit ? [] : routes.slice(0, routeLimit), moreEntries = routeLimit > 0 ? routes.length - printableRoutes.length : 0, nameCount = 0;
5765
+ for (let { name } of urls)if (name && ++nameCount > 1) break;
5766
+ let showNames = nameCount > 1;
5760
5767
  if (routes.length <= 1 || 0 === printableRoutes.length) {
5761
- let pathname = printableRoutes.length ? printableRoutes[0].pathname : '', padWidth = Math.max(Math.max(...urls.map((u)=>u.label.trimEnd().length)) + 2, 10), message = urls.map(({ label, url })=>{
5762
- let normalizedPathname = normalizeUrl(`${url}${pathname}`), prefix = `➜ ${color.dim(label.trimEnd().padEnd(padWidth))}`;
5763
- return ` ${prefix}${color.cyan(normalizedPathname)}\n`;
5768
+ let pathname = printableRoutes[0]?.pathname ?? '', items = urls.map(({ label, name, url })=>({
5769
+ label,
5770
+ name: showNames ? formatName(name) : void 0,
5771
+ url: normalizeUrl(`${url}${pathname}`)
5772
+ })), labelWidth = Math.max(10, ...items.map((item)=>item.label.trimEnd().length + 2)), urlWidth = Math.max(0, ...items.map((item)=>item.name ? item.url.length : 0)), message = items.map(({ label, name, url })=>{
5773
+ let prefix = `➜ ${color.dim(label.trimEnd().padEnd(labelWidth))}`, suffix = name ? `${' '.repeat(urlWidth - url.length + 2)}${color.dim(name)}` : '';
5774
+ return ` ${prefix}${color.cyan(url)}${suffix}\n`;
5764
5775
  }).join('');
5765
5776
  return moreEntries > 0 && (message += getMoreEntriesMessage(moreEntries, cliShortcutsEnabled)), message;
5766
5777
  }
5767
- let message = '', prevLabel = '', maxNameLength = Math.max(...printableRoutes.map((r)=>r.entryName.length));
5768
- return urls.forEach(({ label, url }, index)=>{
5769
- for (let { entryName, pathname } of (prevLabel !== label && (index > 0 && (message += '\n'), message += ` ➜ ${label}\n`, prevLabel = label), printableRoutes))message += ` ${color.dim('-')} ${color.dim(entryName.padEnd(maxNameLength + 4))}${color.cyan(normalizeUrl(`${url}${pathname}`))}\n`;
5778
+ let message = '', prevLabel = '', entryWidth = Math.max(...printableRoutes.map((route)=>route.entryName.length));
5779
+ return urls.forEach(({ label, name, url }, index)=>{
5780
+ let shortName = showNames ? formatName(name) : void 0;
5781
+ if (prevLabel !== label || prevName !== shortName) {
5782
+ index > 0 && (message += '\n');
5783
+ let title = shortName ? `${label.trimEnd().slice(0, -1)} ${color.dim(shortName)}:` : label;
5784
+ message += ` ➜ ${title}\n`, prevLabel = label, prevName = shortName;
5785
+ }
5786
+ for (let { entryName, pathname } of printableRoutes)message += ` ${color.dim('-')} ${color.dim(entryName.padEnd(entryWidth + 4))}${color.cyan(normalizeUrl(`${url}${pathname}`))}\n`;
5770
5787
  }), moreEntries > 0 && (message += getMoreEntriesMessage(moreEntries, cliShortcutsEnabled)), message;
5771
5788
  }
5772
5789
  function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, fallbackPathname, showAllRoutes, cliShortcutsEnabled, originalConfig, logger }) {
@@ -5836,12 +5853,16 @@ let getPort = async ({ host, port, strictPort, tryLimits = 20 })=>{
5836
5853
  port,
5837
5854
  portTip
5838
5855
  };
5839
- }, isLoopbackHost = (host)=>new Set([
5840
- LOCALHOST,
5841
- '127.0.0.1',
5842
- '::1',
5843
- '0000:0000:0000:0000:0000:0000:0000:0001'
5844
- ]).has(host), getHostInUrl = async (host)=>{
5856
+ }, WILDCARD_HOSTS = new Set([
5857
+ ALL_INTERFACES_IPV4,
5858
+ '::',
5859
+ '0000:0000:0000:0000:0000:0000:0000:0000'
5860
+ ]), LOOPBACK_HOSTS = new Set([
5861
+ LOCALHOST,
5862
+ '127.0.0.1',
5863
+ '::1',
5864
+ '0000:0000:0000:0000:0000:0000:0000:0001'
5865
+ ]), isLoopbackHost = (host)=>LOOPBACK_HOSTS.has(host), getHostInUrl = async (host)=>{
5845
5866
  if (host === ALL_INTERFACES_IPV4 || host === LOCALHOST) return LOCALHOST;
5846
5867
  let { isIPv6 } = await import("node:net");
5847
5868
  return isIPv6(host) ? '::' === host ? '[::1]' : `[${host}]` : host;
@@ -5866,33 +5887,27 @@ let getPort = async ({ host, port, strictPort, tryLimits = 20 })=>{
5866
5887
  }
5867
5888
  ];
5868
5889
  }
5869
- let ipv4Interfaces = (()=>{
5870
- let interfaces = node_os.networkInterfaces(), ipv4Interfaces = new Map();
5871
- for (let key of Object.keys(interfaces))for (let detail of interfaces[key]){
5872
- let familyV4Value = 'string' == typeof detail.family ? 'IPv4' : 4;
5873
- detail.family !== familyV4Value || ipv4Interfaces.has(detail.address) || ipv4Interfaces.set(detail.address, detail);
5874
- }
5875
- return Array.from(ipv4Interfaces.values());
5876
- })(), addressUrls = [], hasLocalUrl = !1;
5877
- for (let detail of ipv4Interfaces)if (isLoopbackHost(detail.address) || detail.internal) {
5878
- if (hasLocalUrl) continue;
5879
- addressUrls.push({
5890
+ let urls = [], seen = new Set(), hasLocal = !1;
5891
+ for (let [name, infos] of Object.entries(node_os.networkInterfaces()))for (let info of infos ?? []){
5892
+ let family = info.family;
5893
+ !('IPv4' !== family && 4 !== family || seen.has(info.address)) && (seen.add(info.address), isLoopbackHost(info.address) || info.internal ? hasLocal || (urls.push({
5880
5894
  label: LOCAL_LABEL,
5881
5895
  url: concatUrl({
5882
5896
  host: LOCALHOST,
5883
5897
  port,
5884
5898
  protocol
5885
5899
  })
5886
- }), hasLocalUrl = !0;
5887
- } else addressUrls.push({
5888
- label: NETWORK_LABEL,
5889
- url: concatUrl({
5890
- host: detail.address,
5891
- port,
5892
- protocol
5893
- })
5894
- });
5895
- return addressUrls;
5900
+ }), hasLocal = !0) : urls.push({
5901
+ label: NETWORK_LABEL,
5902
+ name,
5903
+ url: concatUrl({
5904
+ host: info.address,
5905
+ port,
5906
+ protocol
5907
+ })
5908
+ }));
5909
+ }
5910
+ return urls;
5896
5911
  };
5897
5912
  function getServerTerminator(server) {
5898
5913
  let listened = !1, pendingSockets = new Set(), onConnection = (socket)=>{
@@ -6513,11 +6528,7 @@ async function resolveHostname(host = LOCALHOST) {
6513
6528
  let resolvedAddress = await getLocalhostResolvedAddress();
6514
6529
  if (resolvedAddress) return resolvedAddress;
6515
6530
  }
6516
- return void 0 === host || new Set([
6517
- ALL_INTERFACES_IPV4,
6518
- '::',
6519
- '0000:0000:0000:0000:0000:0000:0000:0000'
6520
- ]).has(host) ? LOCALHOST : host;
6531
+ return void 0 === host || WILDCARD_HOSTS.has(host) ? LOCALHOST : host;
6521
6532
  }
6522
6533
  let UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
6523
6534
  async function getFileFromUrl(url, outputFileSystem, context) {
@@ -9026,14 +9037,14 @@ function applyDefaultPlugins(pluginManager, context) {
9026
9037
  'node'
9027
9038
  ],
9028
9039
  raw: !0
9029
- }, ({ code, emitFile, resourcePath })=>{
9040
+ }, ({ code, emitFile, environment, resourcePath })=>{
9030
9041
  let name, filename = (name = resourcePath && node_path.parse(resourcePath).name) ? `${name}.node` : null;
9031
9042
  if (null === filename) throw Error(`${color.dim('[rsbuild:nodeAddons]')} Failed to load Node.js addon: ${color.yellow(resourcePath)}`);
9032
9043
  emitFile(filename, code);
9033
- let config = api.getNormalizedConfig(), handleErrorSnippet = `throw new Error('Failed to load Node.js addon: "${filename}"', {
9044
+ let handleErrorSnippet = `throw new Error('Failed to load Node.js addon: "${filename}"', {
9034
9045
  cause: error,
9035
9046
  });`;
9036
- return config.output.module ? `
9047
+ return environment.config.output.module ? `
9037
9048
  import path from "node:path";
9038
9049
  import { createRequire } from "node:module";
9039
9050
  import { fileURLToPath } from "node:url";
@@ -9356,12 +9367,16 @@ try {
9356
9367
  if (!inlinedAssets || 0 === inlinedAssets.size) return;
9357
9368
  let { devtool } = compiler.options, hasSourceMap = 'hidden-source-map' !== devtool && !1 !== devtool;
9358
9369
  for (let name of inlinedAssets){
9359
- let asset = compilation.assets[name];
9360
- asset && (hasSourceMap && compilation.updateAsset(name, asset, {
9361
- related: {
9362
- sourceMap: null
9363
- }
9364
- }), compilation.deleteAsset(name));
9370
+ if (hasSourceMap) {
9371
+ let asset = compilation.assets[name];
9372
+ if (!asset) continue;
9373
+ compilation.updateAsset(name, asset, {
9374
+ related: {
9375
+ sourceMap: null
9376
+ }
9377
+ });
9378
+ } else if (!(name in compilation.assets)) continue;
9379
+ compilation.deleteAsset(name);
9365
9380
  }
9366
9381
  inlinedAssets.clear();
9367
9382
  }), api.modifyHTMLTags(({ headTags, bodyTags }, { compiler, compilation, environment })=>{
@@ -9381,8 +9396,8 @@ try {
9381
9396
  return config = environment.config, "script" === tag.tag ? ((publicPath, tag, compilation, inlinedAssets, scriptTests, config)=>{
9382
9397
  let { assets } = compilation;
9383
9398
  if (!(tag.attrs?.src && 'string' == typeof tag.attrs.src)) return tag;
9384
- let { src, ...otherAttrs } = tag.attrs, scriptName = publicPath ? src.replace(publicPath, '') : src, asset = assets[scriptName];
9385
- if (null == asset || !matchTests(scriptName, asset, scriptTests)) return tag;
9399
+ let { src, ...otherAttrs } = tag.attrs, scriptName = publicPath ? src.replace(publicPath, '') : src, asset = getMatchedAsset(scriptName, assets, scriptTests);
9400
+ if (!asset) return tag;
9386
9401
  let ret = {
9387
9402
  tag: "script",
9388
9403
  children: updateSourceMappingURL({
@@ -9400,8 +9415,8 @@ try {
9400
9415
  })(publicPath, tag, compilation, inlinedAssets, scriptTests, config) : 'link' === tag.tag && tag.attrs && 'stylesheet' === tag.attrs.rel ? ((publicPath, tag, compilation, inlinedAssets, styleTests, config)=>{
9401
9416
  let { assets } = compilation;
9402
9417
  if (!(tag.attrs?.href && 'string' == typeof tag.attrs.href)) return tag;
9403
- let linkName = publicPath ? tag.attrs.href.replace(publicPath, '') : tag.attrs.href, asset = assets[linkName];
9404
- if (null == asset || !matchTests(linkName, asset, styleTests)) return tag;
9418
+ let linkName = publicPath ? tag.attrs.href.replace(publicPath, '') : tag.attrs.href, asset = getMatchedAsset(linkName, assets, styleTests);
9419
+ if (!asset) return tag;
9405
9420
  let ret = {
9406
9421
  tag: 'style',
9407
9422
  children: updateSourceMappingURL({
@@ -9572,7 +9587,7 @@ try {
9572
9587
  api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
9573
9588
  let { output: { manifest }, dev: { writeToDisk } } = environment.config;
9574
9589
  if (!1 === manifest) return;
9575
- let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
9590
+ let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.8/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
9576
9591
  manifestFilenames.set(environment.name, manifestOptions.filename);
9577
9592
  let pluginOptions = {
9578
9593
  fileName: manifestOptions.filename,
@@ -9776,8 +9791,8 @@ async function createRsbuild(options = {}) {
9776
9791
  cwd: options.cwd,
9777
9792
  ...'boolean' == typeof options.loadEnv ? {} : options.loadEnv
9778
9793
  }) : null, configOrFactory = options.config ?? options.rsbuildConfig, config = isFunction(configOrFactory) ? await configOrFactory() : configOrFactory;
9779
- isLoadConfigResult(config) && (loadConfigResult = config, config = config.content);
9780
- let logger = (config ||= {}).customLogger ?? logger_createLogger({
9794
+ isLoadConfigResult(config) && (loadConfigResult = config, config = config.content), config ||= {};
9795
+ let logger = config.customLogger ?? logger_createLogger({
9781
9796
  ...src_logger.options,
9782
9797
  level: src_logger.level
9783
9798
  });
@@ -9839,10 +9854,10 @@ async function createRsbuild(options = {}) {
9839
9854
  pluginManager,
9840
9855
  rsbuildOptions: resolvedOptions
9841
9856
  }, createCompiler, config, options);
9842
- }, initAction = ()=>{
9843
- context.action || (context.action = 'development' === config.mode ? 'dev' : 'build');
9844
- }, inspectConfig = async (inspectOptions)=>{
9845
- initAction();
9857
+ }, initAction = (mode = config.mode)=>{
9858
+ context.action || (context.action = 'development' === mode ? 'dev' : 'build');
9859
+ }, inspectConfig = async (inspectOptions = {})=>{
9860
+ inspectOptions.mode ? setNodeEnv(inspectOptions.mode) : process.env.NODE_ENV || setNodeEnv('development'), initAction(config.mode ?? (process.env.NODE_ENV || ''));
9846
9861
  let { rspackConfigs } = await initConfigs_initConfigs({
9847
9862
  context,
9848
9863
  pluginManager,
@@ -10115,7 +10130,7 @@ let applyServerOptions = (command)=>{
10115
10130
  };
10116
10131
  function setupCommands(argv) {
10117
10132
  let cli = ((name = "")=>new CAC(name))('rsbuild');
10118
- cli.version("2.1.8"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
10133
+ cli.version("2.1.10"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
10119
10134
  default: 'auto'
10120
10135
  }).option('--dist-path <dir>', 'Set the root directory of output files').option('--source-map', 'Enable source map').option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
10121
10136
  type: [
@@ -10180,7 +10195,7 @@ function setupCommands(argv) {
10180
10195
  }
10181
10196
  function showGreeting() {
10182
10197
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
10183
- src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.1.8\n`);
10198
+ src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.1.10\n`);
10184
10199
  }
10185
10200
  function setupLogLevel(argv) {
10186
10201
  if (argv.length <= 3) return;
@@ -10202,5 +10217,5 @@ function runCLI({ argv = process.argv } = {}) {
10202
10217
  src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
10203
10218
  }
10204
10219
  }
10205
- let src_version = "2.1.8";
10220
+ let src_version = "2.1.10";
10206
10221
  export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, core_rspack as rspack, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig_loadConfig as loadConfig, loadEnv, logger_createLogger as createLogger, mergeRsbuildConfig, mrmime_lookup, runCLI, src_logger as logger, src_version as version };
@@ -1 +1 @@
1
- import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js");e.exports=(e,t,o)=>("function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),t=t||process.cwd(),function(s,r){let a;try{let e=s.url.startsWith("http")?s.url:`http://localhost${s.url}`;a=new URL(e)}catch(e){r.statusCode=500,r.end("launch-editor-middleware: invalid URL.");return}let p=a.searchParams.get("file");p?(i(p.startsWith("file://")?p:n.resolve(t,p),e,o),r.end()):(r.statusCode=500,r.end('launch-editor-middleware: required query param "file" is missing.'))})},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"(e){e.exports={atom:"atom",Brackets:"brackets","code-insiders":"code-insiders",code:"code",vscodium:"vscodium",codium:"codium",cursor:"cursor",trae:"trae",antigravity:"antigravity",emacs:"emacs",gvim:"gvim",idea:"idea","idea.sh":"idea",phpstorm:"phpstorm","phpstorm.sh":"phpstorm",pycharm:"pycharm","pycharm.sh":"pycharm",rubymine:"rubymine","rubymine.sh":"rubymine",sublime_text:"subl",vim:"vim",webstorm:"webstorm","webstorm.sh":"webstorm",goland:"goland","goland.sh":"goland",rider:"rider","rider.sh":"rider",zed:"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"(e){e.exports={"/Applications/Atom.app/Contents/MacOS/Atom":"atom","/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta","/Applications/Brackets.app/Contents/MacOS/Brackets":"brackets","/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text.app/Contents/MacOS/sublime_text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl","/Applications/Visual Studio Code.app/Contents/MacOS/Code":"code","/Applications/Visual Studio Code.app/Contents/MacOS/Electron":"code","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders":"code-insiders","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":"code-insiders","/Applications/VSCodium.app/Contents/MacOS/Electron":"codium","/Applications/Cursor.app/Contents/MacOS/Cursor":"cursor","/Applications/Trae.app/Contents/MacOS/Electron":"trae","/Applications/Antigravity.app/Contents/MacOS/Electron":"antigravity","/Applications/AppCode.app/Contents/MacOS/appcode":"/Applications/AppCode.app/Contents/MacOS/appcode","/Applications/CLion.app/Contents/MacOS/clion":"/Applications/CLion.app/Contents/MacOS/clion","/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea","/Applications/PhpStorm.app/Contents/MacOS/phpstorm":"/Applications/PhpStorm.app/Contents/MacOS/phpstorm","/Applications/PyCharm.app/Contents/MacOS/pycharm":"/Applications/PyCharm.app/Contents/MacOS/pycharm","/Applications/PyCharm CE.app/Contents/MacOS/pycharm":"/Applications/PyCharm CE.app/Contents/MacOS/pycharm","/Applications/RubyMine.app/Contents/MacOS/rubymine":"/Applications/RubyMine.app/Contents/MacOS/rubymine","/Applications/WebStorm.app/Contents/MacOS/webstorm":"/Applications/WebStorm.app/Contents/MacOS/webstorm","/Applications/MacVim.app/Contents/MacOS/MacVim":"mvim","/Applications/GoLand.app/Contents/MacOS/goland":"/Applications/GoLand.app/Contents/MacOS/goland","/Applications/Rider.app/Contents/MacOS/rider":"/Applications/Rider.app/Contents/MacOS/rider","/Applications/Zed.app/Contents/MacOS/zed":"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js"(e){e.exports=["Brackets.exe","Code.exe","Code - Insiders.exe","VSCodium.exe","Cursor.exe","atom.exe","sublime_text.exe","notepad++.exe","clion.exe","clion64.exe","idea.exe","idea64.exe","phpstorm.exe","phpstorm64.exe","pycharm.exe","pycharm64.exe","rubymine.exe","rubymine64.exe","webstorm.exe","webstorm64.exe","goland.exe","goland64.exe","rider.exe","rider64.exe","Trae.exe","zed.exe","Antigravity.exe"]},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"(e,t,o){let n=o("path?37f5");e.exports=function(e,t,o,i=1){switch(n.basename(e).replace(/\.(exe|cmd|bat)$/i,"")){case"atom":case"Atom":case"Atom Beta":case"subl":case"sublime":case"sublime_text":case"wstorm":case"charm":case"zed":return[`${t}:${o}:${i}`];case"notepad++":return["-n"+o,"-c"+i,t];case"vim":case"mvim":return[`+call cursor(${o}, ${i})`,t];case"joe":case"gvim":return[`+${o}`,t];case"emacs":case"emacsclient":return[`+${o}:${i}`,t];case"rmate":case"mate":case"mine":return["--line",o,t];case"code":case"Code":case"code-insiders":case"Code - Insiders":case"codium":case"trae":case"antigravity":case"cursor":case"vscodium":case"VSCodium":return["-r","-g",`${t}:${o}:${i}`];case"appcode":case"clion":case"clion64":case"idea":case"idea64":case"phpstorm":case"phpstorm64":case"pycharm":case"pycharm64":case"rubymine":case"rubymine64":case"webstorm":case"webstorm64":case"goland":case"goland64":case"rider":case"rider64":return["--line",o,"--column",i,t]}return process.env.LAUNCH_EDITOR?[t,o,i]:[t]}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js"),s=o("child_process"),r=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"),a=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js");function c(e){let t=Object.keys(r),o=e.split("\n");for(let n=0;n<t.length;n++){let i=t[n];if(o.includes(i))return r[i];let s=i.replace("/Applications","");if(-1!==e.indexOf(s)){if(i!==r[i])return r[i];let e=o.find(e=>e.endsWith(s));if(void 0!==e)return e}}}function l(e){let t=e.split("\r\n");for(let e=0;e<t.length;e++){let o=t[e].trim(),i=n.win32.basename(o);if(-1!==p.indexOf(i))return o}}function d(e){let t=Object.keys(a);for(let o=0;o<t.length;o++){let n=t[o];if(-1!==e.indexOf(n))return a[n]}}e.exports=function(e){if(e)return i.parse(e);if(process.env.LAUNCH_EDITOR)return[process.env.LAUNCH_EDITOR];if(process.versions.webcontainer)return[process.env.EDITOR||"code"];try{if("darwin"===process.platform){let e=s.execSync("ps x -o comm=",{stdio:["pipe","pipe","ignore"]}).toString(),t=c(e);if(void 0!==t)return[t]}else if("win32"===process.platform){let e=s.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',{stdio:["pipe","pipe","ignore"]}).toString(),t=l(e);if(void 0!==t)return[t]}else if("linux"===process.platform){let e=s.execSync("ps x --no-heading -o comm --sort=comm",{stdio:["pipe","pipe","ignore"]}).toString(),t=d(e);if(void 0!==t)return[t]}}catch(e){}return process.env.VISUAL?[process.env.VISUAL]:process.env.EDITOR?[process.env.EDITOR]:[null]},e.exports.getEditorFromMacProcesses=c,e.exports.getEditorFromWindowsProcesses=l,e.exports.getEditorFromLinuxProcesses=d},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js"(e,t,o){let n=o("fs?cdbd"),i=o("os"),s=o("path?37f5"),r=o("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"),a=o("child_process"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"),c=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"),l=/:(\d+)(:(\d+))?$/,d=null;e.exports=function(e,t,m){var u,x;let b,h,f=((u=e).startsWith("file://")&&(u=o("url?5f07").fileURLToPath(u)),b=u.replace(l,""),{fileName:b,lineNumber:(h=u.match(l))&&h[1],columnNumber:h&&h[3]}),{fileName:g}=f,{lineNumber:C,columnNumber:S}=f;if("win32"===process.platform&&s.resolve(g).startsWith("\\\\"))return m(g,"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.");if(!n.existsSync(g))return;"function"==typeof t&&(m=t,t=void 0),x=m,m=(e,t)=>{console.log(),console.log(r.red("Could not open "+s.basename(e)+" in the editor.")),t&&("."!==t[t.length-1]&&(t+="."),console.log(r.red("The editor process exited with an error: "+t))),console.log(),x&&x(e,t)};let[A,...y]=p(t);if(!A)return void m(g,null);if("linux"===process.platform&&g.startsWith("/mnt/")&&/Microsoft/i.test(i.release())&&(g=s.relative("",g)),C){let e=c(A,g,C,S);y.push.apply(y,e)}else y.push(g);if(d&&function(e){switch(e){case"vim":case"emacs":case"nano":return!0}return!1}(A)&&d.kill("SIGKILL"),"win32"===process.platform){let e=[A,...y.map(function(e){return e.replace(/([&|<>,;=^])/g,"^$1")})].map(function(e){return e.includes("^")?`^"${e}^"`:e.includes(" ")?`"${e}"`:e}).join(" ");d=a.exec(e,{stdio:"inherit",shell:!0})}else d=a.spawn(A,y,{stdio:"inherit"});d.on("exit",function(e){d=null,e&&m(g,"(code "+e+")")}),d.on("error",function(e){let{code:t,message:o}=e;"ENOENT"===t&&(o=`${o} ('${A}' command does not exist in 'PATH')`),m(g,o)})}},"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(e){let t=process||{},o=t.argv||[],n=t.env||{},i=!(n.NO_COLOR||o.includes("--no-color"))&&(!!n.FORCE_COLOR||o.includes("--color")||"win32"===t.platform||(t.stdout||{}).isTTY&&"dumb"!==n.TERM||!!n.CI),s=(e,t,o=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+r(i,t,o,s)+t:e+i+t},r=(e,t,o,n)=>{let i="",s=0;do i+=e.substring(s,n)+o,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},a=(e=i)=>{let t=e?s:()=>String;return{isColorSupported:e,reset:t("\x1b[0m","\x1b[0m"),bold:t("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"),dim:t("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),italic:t("\x1b[3m","\x1b[23m"),underline:t("\x1b[4m","\x1b[24m"),inverse:t("\x1b[7m","\x1b[27m"),hidden:t("\x1b[8m","\x1b[28m"),strikethrough:t("\x1b[9m","\x1b[29m"),black:t("\x1b[30m","\x1b[39m"),red:t("\x1b[31m","\x1b[39m"),green:t("\x1b[32m","\x1b[39m"),yellow:t("\x1b[33m","\x1b[39m"),blue:t("\x1b[34m","\x1b[39m"),magenta:t("\x1b[35m","\x1b[39m"),cyan:t("\x1b[36m","\x1b[39m"),white:t("\x1b[37m","\x1b[39m"),gray:t("\x1b[90m","\x1b[39m"),bgBlack:t("\x1b[40m","\x1b[49m"),bgRed:t("\x1b[41m","\x1b[49m"),bgGreen:t("\x1b[42m","\x1b[49m"),bgYellow:t("\x1b[43m","\x1b[49m"),bgBlue:t("\x1b[44m","\x1b[49m"),bgMagenta:t("\x1b[45m","\x1b[49m"),bgCyan:t("\x1b[46m","\x1b[49m"),bgWhite:t("\x1b[47m","\x1b[49m"),blackBright:t("\x1b[90m","\x1b[39m"),redBright:t("\x1b[91m","\x1b[39m"),greenBright:t("\x1b[92m","\x1b[39m"),yellowBright:t("\x1b[93m","\x1b[39m"),blueBright:t("\x1b[94m","\x1b[39m"),magentaBright:t("\x1b[95m","\x1b[39m"),cyanBright:t("\x1b[96m","\x1b[39m"),whiteBright:t("\x1b[97m","\x1b[39m"),bgBlackBright:t("\x1b[100m","\x1b[49m"),bgRedBright:t("\x1b[101m","\x1b[49m"),bgGreenBright:t("\x1b[102m","\x1b[49m"),bgYellowBright:t("\x1b[103m","\x1b[49m"),bgBlueBright:t("\x1b[104m","\x1b[49m"),bgMagentaBright:t("\x1b[105m","\x1b[49m"),bgCyanBright:t("\x1b[106m","\x1b[49m"),bgWhiteBright:t("\x1b[107m","\x1b[49m")}};e.exports=a(),e.exports.createColors=a},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js"(e,t,o){o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js"),t.parse=o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js")},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js"(e){for(var t="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])",o=RegExp("^"+t+"$"),n="|&;()<> \\t",i=/^#$/,s="",r=0;r<4;r++)s+=(0x100000000*Math.random()).toString(16);var a=RegExp("^"+s);e.exports=function(e,r,p){var c=function(e,r,a){a||(a={});var p=a.escape||"\\",c=function(e,t){for(var o,n=t.lastIndex,i=[];o=t.exec(e);)i.push(o),t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,i}(e,RegExp(["("+t+")","("+("(\\"+p+"['\""+n+"]|[^\\s'\""+n)+"])+|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')+"].join("|"),"g"));if(0===c.length)return[];r||(r={});var l=!1;return c.map(function(t){var n,a=t[0];if(a&&!l){if(o.test(a))return{op:a};var c=!1,d=!1,m="",u=!1;for(n=0;n<a.length;n++){var x=a.charAt(n);if(u=u||!c&&("*"===x||"?"===x),d)m+=x,d=!1;else if(c)x===c?c=!1:"'"==c?m+=x:x===p?(n+=1,'"'===(x=a.charAt(n))||x===p||"$"===x?m+=x:m+=p+x):"$"===x?m+=h():m+=x;else if('"'===x||"'"===x)c=x;else if(o.test(x))return{op:a};else if(i.test(x)){l=!0;var b={comment:e.slice(t.index+n+1)};if(m.length)return[m,b];return[b]}else x===p?d=!0:"$"===x?m+=h():m+=x}return u?{op:"glob",pattern:m}:m}function h(){n+=1;var e,t,o,i,p,c=a.charAt(n);if("{"===c){if(n+=1,"}"===a.charAt(n))throw Error("Bad substitution: "+a.slice(n-2,n+1));if((i=a.indexOf("}",n))<0)throw Error("Bad substitution: "+a.slice(n));p=a.slice(n,i),n=i}else if(/[*@#?$!_-]/.test(c))p=c,n+=1;else{var l=a.slice(n);(i=l.match(/[^\w\d_]/))?(p=l.slice(0,i.index),n+=i.index-1):(p=l,n=a.length)}return e=r,t=p,(void 0===(o="function"==typeof e?e(t):e[t])&&""!=t?o="":void 0===o&&(o="$"),"object"==typeof o)?""+s+JSON.stringify(o)+s:""+o}}).reduce(function(e,t){return void 0===t?e:e.concat(t)},[])}(e,r,p);return"function"!=typeof r?c:c.reduce(function(e,t){if("object"==typeof t)return e.concat(t);var o=t.split(RegExp("("+s+".*?"+s+")","g"));return 1===o.length?e.concat(o[0]):e.concat(o.filter(Boolean).map(function(e){return a.test(e)?JSON.parse(e.split(s)[1]):e}))},[])}},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js"(e){var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],o=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("glob"===e.op){if("string"!=typeof e.pattern)throw TypeError("glob token requires a string `pattern`");if(o.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("string"==typeof e.op){if(0>t.indexOf(e.op))throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("string"==typeof e.comment){if(o.test(e.comment))throw TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}}}),e("../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js");
1
+ import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js");e.exports=(e,t,o)=>("function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),t=t||process.cwd(),function(r,s){let a;try{let e=r.url.startsWith("http")?r.url:`http://localhost${r.url}`;a=new URL(e)}catch(e){s.statusCode=500,s.end("launch-editor-middleware: invalid URL.");return}let p=a.searchParams.get("file");p?(i(p.startsWith("file://")?p:n.resolve(t,p),e,o),s.end()):(s.statusCode=500,s.end('launch-editor-middleware: required query param "file" is missing.'))})},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"(e){e.exports={atom:"atom",Brackets:"brackets","code-insiders":"code-insiders",code:"code",vscodium:"vscodium",codium:"codium",cursor:"cursor",trae:"trae",antigravity:"antigravity",emacs:"emacs",gvim:"gvim",idea:"idea","idea.sh":"idea",phpstorm:"phpstorm","phpstorm.sh":"phpstorm",pycharm:"pycharm","pycharm.sh":"pycharm",rubymine:"rubymine","rubymine.sh":"rubymine",sublime_text:"subl",vim:"vim",webstorm:"webstorm","webstorm.sh":"webstorm",goland:"goland","goland.sh":"goland",rider:"rider","rider.sh":"rider",zed:"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"(e){e.exports={"/Applications/Atom.app/Contents/MacOS/Atom":"atom","/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta","/Applications/Brackets.app/Contents/MacOS/Brackets":"brackets","/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text.app/Contents/MacOS/sublime_text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl","/Applications/Visual Studio Code.app/Contents/MacOS/Code":"code","/Applications/Visual Studio Code.app/Contents/MacOS/Electron":"code","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders":"code-insiders","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":"code-insiders","/Applications/VSCodium.app/Contents/MacOS/Electron":"codium","/Applications/Cursor.app/Contents/MacOS/Cursor":"cursor","/Applications/Trae.app/Contents/MacOS/Electron":"trae","/Applications/Antigravity.app/Contents/MacOS/Electron":"antigravity","/Applications/AppCode.app/Contents/MacOS/appcode":"/Applications/AppCode.app/Contents/MacOS/appcode","/Applications/CLion.app/Contents/MacOS/clion":"/Applications/CLion.app/Contents/MacOS/clion","/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea","/Applications/PhpStorm.app/Contents/MacOS/phpstorm":"/Applications/PhpStorm.app/Contents/MacOS/phpstorm","/Applications/PyCharm.app/Contents/MacOS/pycharm":"/Applications/PyCharm.app/Contents/MacOS/pycharm","/Applications/PyCharm CE.app/Contents/MacOS/pycharm":"/Applications/PyCharm CE.app/Contents/MacOS/pycharm","/Applications/RubyMine.app/Contents/MacOS/rubymine":"/Applications/RubyMine.app/Contents/MacOS/rubymine","/Applications/WebStorm.app/Contents/MacOS/webstorm":"/Applications/WebStorm.app/Contents/MacOS/webstorm","/Applications/MacVim.app/Contents/MacOS/MacVim":"mvim","/Applications/GoLand.app/Contents/MacOS/goland":"/Applications/GoLand.app/Contents/MacOS/goland","/Applications/Rider.app/Contents/MacOS/rider":"/Applications/Rider.app/Contents/MacOS/rider","/Applications/Zed.app/Contents/MacOS/zed":"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js"(e){e.exports=["Brackets.exe","Code.exe","Code - Insiders.exe","VSCodium.exe","Cursor.exe","atom.exe","sublime_text.exe","notepad++.exe","clion.exe","clion64.exe","idea.exe","idea64.exe","phpstorm.exe","phpstorm64.exe","pycharm.exe","pycharm64.exe","rubymine.exe","rubymine64.exe","webstorm.exe","webstorm64.exe","goland.exe","goland64.exe","rider.exe","rider64.exe","Trae.exe","zed.exe","Antigravity.exe"]},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"(e,t,o){let n=o("path?37f5");e.exports=function(e,t,o,i=1){switch(n.basename(e).replace(/\.(exe|cmd|bat)$/i,"")){case"atom":case"Atom":case"Atom Beta":case"subl":case"sublime":case"sublime_text":case"wstorm":case"charm":case"zed":return[`${t}:${o}:${i}`];case"notepad++":return["-n"+o,"-c"+i,t];case"vim":case"mvim":return[`+call cursor(${o}, ${i})`,t];case"joe":case"gvim":return[`+${o}`,t];case"emacs":case"emacsclient":return[`+${o}:${i}`,t];case"rmate":case"mate":case"mine":return["--line",o,t];case"code":case"Code":case"code-insiders":case"Code - Insiders":case"codium":case"trae":case"antigravity":case"cursor":case"vscodium":case"VSCodium":return["-r","-g",`${t}:${o}:${i}`];case"appcode":case"clion":case"clion64":case"idea":case"idea64":case"phpstorm":case"phpstorm64":case"pycharm":case"pycharm64":case"rubymine":case"rubymine64":case"webstorm":case"webstorm64":case"goland":case"goland64":case"rider":case"rider64":return["--line",o,"--column",i,t]}return process.env.LAUNCH_EDITOR?[t,o,i]:[t]}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/index.js"),r=o("child_process"),s=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"),a=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js");function l(e){let t=Object.keys(s),o=e.split("\n");for(let n=0;n<t.length;n++){let i=t[n];if(o.includes(i))return s[i];let r=i.replace("/Applications","");if(-1!==e.indexOf(r)){if(i!==s[i])return s[i];let e=o.find(e=>e.endsWith(r));if(void 0!==e)return e}}}function c(e){let t=e.split("\r\n");for(let e=0;e<t.length;e++){let o=t[e].trim(),i=n.win32.basename(o);if(-1!==p.indexOf(i))return o}}function d(e){let t=Object.keys(a);for(let o=0;o<t.length;o++){let n=t[o];if(-1!==e.indexOf(n))return a[n]}}e.exports=function(e){if(e)return i.parse(e);if(process.env.LAUNCH_EDITOR)return[process.env.LAUNCH_EDITOR];if(process.versions.webcontainer)return[process.env.EDITOR||"code"];try{if("darwin"===process.platform){let e=r.execSync("ps x -o comm=",{stdio:["pipe","pipe","ignore"]}).toString(),t=l(e);if(void 0!==t)return[t]}else if("win32"===process.platform){let e=r.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',{stdio:["pipe","pipe","ignore"]}).toString(),t=c(e);if(void 0!==t)return[t]}else if("linux"===process.platform){let e=r.execSync("ps x --no-heading -o comm --sort=comm",{stdio:["pipe","pipe","ignore"]}).toString(),t=d(e);if(void 0!==t)return[t]}}catch(e){}return process.env.VISUAL?[process.env.VISUAL]:process.env.EDITOR?[process.env.EDITOR]:[null]},e.exports.getEditorFromMacProcesses=l,e.exports.getEditorFromWindowsProcesses=c,e.exports.getEditorFromLinuxProcesses=d},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js"(e,t,o){let n=o("fs?cdbd"),i=o("os"),r=o("path?37f5"),s=o("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"),a=o("child_process"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"),l=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"),c=/:(\d+)(:(\d+))?$/,d=null;e.exports=function(e,t,m){var u,h;let x,b,f=((u=e).startsWith("file://")&&(u=o("url?5f07").fileURLToPath(u)),x=u.replace(c,""),{fileName:x,lineNumber:(b=u.match(c))&&b[1],columnNumber:b&&b[3]}),{fileName:g}=f,{lineNumber:C,columnNumber:S}=f;if("win32"===process.platform&&r.resolve(g).startsWith("\\\\"))return m(g,"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.");if(!n.existsSync(g))return;"function"==typeof t&&(m=t,t=void 0),h=m,m=(e,t)=>{console.log(),console.log(s.red("Could not open "+r.basename(e)+" in the editor.")),t&&("."!==t[t.length-1]&&(t+="."),console.log(s.red("The editor process exited with an error: "+t))),console.log(),h&&h(e,t)};let[A,...y]=p(t);if(!A)return void m(g,null);if("linux"===process.platform&&g.startsWith("/mnt/")&&/Microsoft/i.test(i.release())&&(g=r.relative("",g)),C){let e=l(A,g,C,S);y.push.apply(y,e)}else y.push(g);if(d&&function(e){switch(e){case"vim":case"emacs":case"nano":return!0}return!1}(A)&&d.kill("SIGKILL"),"win32"===process.platform){let e=[A,...y.map(function(e){return e.replace(/([&|<>,;=^])/g,"^$1")})].map(function(e){return e.includes("^")?`^"${e}^"`:e.includes(" ")?`"${e}"`:e}).join(" ");d=a.exec(e,{stdio:"inherit",shell:!0})}else d=a.spawn(A,y,{stdio:"inherit"});d.on("exit",function(e){d=null,e&&m(g,"(code "+e+")")}),d.on("error",function(e){let{code:t,message:o}=e;"ENOENT"===t&&(o=`${o} ('${A}' command does not exist in 'PATH')`),m(g,o)})}},"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(e){let t=process||{},o=t.argv||[],n=t.env||{},i=!(n.NO_COLOR||o.includes("--no-color"))&&(!!n.FORCE_COLOR||o.includes("--color")||"win32"===t.platform||(t.stdout||{}).isTTY&&"dumb"!==n.TERM||!!n.CI),r=(e,t,o=e)=>n=>{let i=""+n,r=i.indexOf(t,e.length);return~r?e+s(i,t,o,r)+t:e+i+t},s=(e,t,o,n)=>{let i="",r=0;do i+=e.substring(r,n)+o,r=n+t.length,n=e.indexOf(t,r);while(~n);return i+e.substring(r)},a=(e=i)=>{let t=e?r:()=>String;return{isColorSupported:e,reset:t("\x1b[0m","\x1b[0m"),bold:t("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"),dim:t("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),italic:t("\x1b[3m","\x1b[23m"),underline:t("\x1b[4m","\x1b[24m"),inverse:t("\x1b[7m","\x1b[27m"),hidden:t("\x1b[8m","\x1b[28m"),strikethrough:t("\x1b[9m","\x1b[29m"),black:t("\x1b[30m","\x1b[39m"),red:t("\x1b[31m","\x1b[39m"),green:t("\x1b[32m","\x1b[39m"),yellow:t("\x1b[33m","\x1b[39m"),blue:t("\x1b[34m","\x1b[39m"),magenta:t("\x1b[35m","\x1b[39m"),cyan:t("\x1b[36m","\x1b[39m"),white:t("\x1b[37m","\x1b[39m"),gray:t("\x1b[90m","\x1b[39m"),bgBlack:t("\x1b[40m","\x1b[49m"),bgRed:t("\x1b[41m","\x1b[49m"),bgGreen:t("\x1b[42m","\x1b[49m"),bgYellow:t("\x1b[43m","\x1b[49m"),bgBlue:t("\x1b[44m","\x1b[49m"),bgMagenta:t("\x1b[45m","\x1b[49m"),bgCyan:t("\x1b[46m","\x1b[49m"),bgWhite:t("\x1b[47m","\x1b[49m"),blackBright:t("\x1b[90m","\x1b[39m"),redBright:t("\x1b[91m","\x1b[39m"),greenBright:t("\x1b[92m","\x1b[39m"),yellowBright:t("\x1b[93m","\x1b[39m"),blueBright:t("\x1b[94m","\x1b[39m"),magentaBright:t("\x1b[95m","\x1b[39m"),cyanBright:t("\x1b[96m","\x1b[39m"),whiteBright:t("\x1b[97m","\x1b[39m"),bgBlackBright:t("\x1b[100m","\x1b[49m"),bgRedBright:t("\x1b[101m","\x1b[49m"),bgGreenBright:t("\x1b[102m","\x1b[49m"),bgYellowBright:t("\x1b[103m","\x1b[49m"),bgBlueBright:t("\x1b[104m","\x1b[49m"),bgMagentaBright:t("\x1b[105m","\x1b[49m"),bgCyanBright:t("\x1b[106m","\x1b[49m"),bgWhiteBright:t("\x1b[107m","\x1b[49m")}};e.exports=a(),e.exports.createColors=a},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/index.js"(e,t,o){o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/quote.js"),t.parse=o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/parse.js")},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/parse.js"(e){for(var t="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])",o=RegExp("^"+t+"$"),n="|&;()<> \\t",i=/^#$/,r="",s=0;s<4;s++)r+=(0x100000000*Math.random()).toString(16);var a=RegExp("^"+r);e.exports=function(e,s,p){var l=function(e,s,a){a||(a={});var p=a.escape||"\\",l=!0===a.splitUnquoted?" \n":"string"==typeof a.splitUnquoted?a.splitUnquoted:"",c=function(e,t){for(var o,n=t.lastIndex,i=[];o=t.exec(e);)i[i.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,i}(e,RegExp(["("+t+")","("+("(\\"+p+"['\""+n+"]|[^\\s'\""+n)+'])+|"((\\\\"|[^"])*?)"|\'([^\']*?)\')+'].join("|"),"g"));if(0===c.length)return[];s||(s={});var d=!1;return c.map(function(t){var n,a=t[0];if(a&&!d){if(o.test(a))return{op:a};var c=!1,m=!1,u="",h=[],x=!1,b=null,f=!1;for(n=0;n<a.length;n++){var g=a.charAt(n);if(l&&"$"!==g&&O(),f=f||!c&&("*"===g||"?"===g),m)u+=g,m=!1;else if(c)g===c?c=!1:"'"==c?u+=g:g===p?(n+=1,'"'===(g=a.charAt(n))||g===p||"$"===g?u+=g:u+=p+g):"$"===g?u+=_():u+=g;else if('"'===g||"'"===g)c=g,x=!0;else if(o.test(g))return{op:a};else if(i.test(g)){d=!0;var C={comment:e.slice(t.index+n+1)};if(u.length)return[u,C];return[C]}else if(g===p)m=!0;else if("$"===g){var S=_();if(l)for(var A=0;A<S.length;A+=1){var y=S.charAt(A);0>l.indexOf(y)?(O(),u+=y):null===b?b=+(" "!==y&&" "!==y&&"\n"!==y):" "!==y&&" "!==y&&"\n"!==y&&(b+=1)}else u+=S}else u+=g}if(f)return{op:"glob",pattern:u};if(l){if(null!==b&&b>0){h[h.length]=u,u="";for(var v=1;v<b;v+=1)h[h.length]=""}return(""!==u||x&&0===h.length)&&(h[h.length]=u),h}return u}function _(){n+=1;var e,t,o,i,p,l=a.charAt(n);if("{"===l){if(n+=1,"}"===a.charAt(n))throw Error("Bad substitution: "+a.slice(n-2,n+1));var c=1;for(i=n;c>0&&i<a.length;)"{"===a.charAt(i)&&"$"===a.charAt(i-1)?c+=1:"}"===a.charAt(i)&&(c-=1),i+=1;if(0!==c)throw Error("Bad substitution: "+a.slice(n));i-=1,p=a.slice(n,i),n=i}else if(/[*@#?$!_-]/.test(l))p=l,n+=1;else{var d=a.slice(n);(i=d.match(/[^\w\d_]/))?(p=d.slice(0,i.index),n+=i.index-1):(p=d,n=a.length)}return e=s,t=p,(void 0===(o="function"==typeof e?e(t):e[t])&&""!=t?o="":void 0===o&&(o="$"),"object"==typeof o)?""+r+JSON.stringify(o)+r:""+o}function O(){if(null!==b){if(0===b)""!==u&&(h[h.length]=u,u="");else{h[h.length]=u,u="";for(var e=1;e<b;e+=1)h[h.length]=""}b=null}}}).reduce(function(e,t){return void 0===t||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}(e,s,p);return"function"!=typeof s?l:l.reduce(function(e,t){if("object"==typeof t)return e[e.length]=t,e;var o=t.split(RegExp("("+r+".*?"+r+")","g"));return 1===o.length?e[e.length]=o[0]:o.filter(Boolean).forEach(function(t){e[e.length]=a.test(t)?JSON.parse(t.split(r)[1]):t}),e},[])}},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/quote.js"(e){var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],o=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("op"in e&&"glob"===e.op){if("string"!=typeof e.pattern)throw TypeError("glob token requires a string `pattern`");if(o.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("op"in e&&"string"==typeof e.op){if(0>t.indexOf(e.op))throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("comment"in e&&"string"==typeof e.comment){if(o.test(e.comment))throw TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")}}}),e("../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js");