@shaper.org/vite-react-plugin 1.0.3 → 1.0.5

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 (3) hide show
  1. package/dist/index.cjs +172 -171
  2. package/dist/index.mjs +115 -114
  3. package/package.json +5 -4
package/dist/index.cjs CHANGED
@@ -29,9 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
 
30
30
  //#endregion
31
31
  let node_fs_promises = require("node:fs/promises");
32
- let node_path = require("node:path");
33
32
  let path = require("path");
34
33
  path = __toESM(path);
34
+ let node_path = require("node:path");
35
+ let url = require("url");
35
36
 
36
37
  //#region ../../node_modules/.pnpm/esbuild@0.27.0/node_modules/esbuild/lib/main.js
37
38
  var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/esbuild@0.27.0/node_modules/esbuild/lib/main.js": ((exports, module) => {
@@ -2149,7 +2150,7 @@ error: ${text}`);
2149
2150
  //#endregion
2150
2151
  //#region src/react-route-plugin.ts
2151
2152
  var import_main = require_main();
2152
- const mainContentPath = (0, node_path.join)(__dirname, "../src/main.ts");
2153
+ const mainContentPath = (0, node_path.join)((0, node_path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href)), "../templates/main.ts");
2153
2154
  const appendTo = "src/routes.tsx";
2154
2155
  const reactRoutesPlugin = () => {
2155
2156
  return {
@@ -35589,43 +35590,43 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJS({ "../../node_modules/.
35589
35590
  }
35590
35591
  function parseUrl(input) {
35591
35592
  if (isSchemeRelativeUrl(input)) {
35592
- const url$1 = parseAbsoluteUrl("http:" + input);
35593
- url$1.scheme = "";
35594
- url$1.type = 6;
35595
- return url$1;
35593
+ const url$2 = parseAbsoluteUrl("http:" + input);
35594
+ url$2.scheme = "";
35595
+ url$2.type = 6;
35596
+ return url$2;
35596
35597
  }
35597
35598
  if (isAbsolutePath(input)) {
35598
- const url$1 = parseAbsoluteUrl("http://foo.com" + input);
35599
- url$1.scheme = "";
35600
- url$1.host = "";
35601
- url$1.type = 5;
35602
- return url$1;
35599
+ const url$2 = parseAbsoluteUrl("http://foo.com" + input);
35600
+ url$2.scheme = "";
35601
+ url$2.host = "";
35602
+ url$2.type = 5;
35603
+ return url$2;
35603
35604
  }
35604
35605
  if (isFileUrl(input)) return parseFileUrl(input);
35605
35606
  if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
35606
- const url = parseAbsoluteUrl("http://foo.com/" + input);
35607
- url.scheme = "";
35608
- url.host = "";
35609
- url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
35610
- return url;
35607
+ const url$1 = parseAbsoluteUrl("http://foo.com/" + input);
35608
+ url$1.scheme = "";
35609
+ url$1.host = "";
35610
+ url$1.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
35611
+ return url$1;
35611
35612
  }
35612
35613
  function stripPathFilename(path$4) {
35613
35614
  if (path$4.endsWith("/..")) return path$4;
35614
35615
  const index$2 = path$4.lastIndexOf("/");
35615
35616
  return path$4.slice(0, index$2 + 1);
35616
35617
  }
35617
- function mergePaths(url, base) {
35618
+ function mergePaths(url$1, base) {
35618
35619
  normalizePath$1(base, base.type);
35619
- if (url.path === "/") url.path = base.path;
35620
- else url.path = stripPathFilename(base.path) + url.path;
35620
+ if (url$1.path === "/") url$1.path = base.path;
35621
+ else url$1.path = stripPathFilename(base.path) + url$1.path;
35621
35622
  }
35622
35623
  /**
35623
35624
  * The path can have empty directories "//", unneeded parents "foo/..", or current directory
35624
35625
  * "foo/.". We need to normalize to a standard representation.
35625
35626
  */
35626
- function normalizePath$1(url, type) {
35627
+ function normalizePath$1(url$1, type) {
35627
35628
  const rel = type <= 4;
35628
- const pieces = url.path.split("/");
35629
+ const pieces = url$1.path.split("/");
35629
35630
  let pointer = 1;
35630
35631
  let positive = 0;
35631
35632
  let addTrailingSlash = false;
@@ -35651,44 +35652,44 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJS({ "../../node_modules/.
35651
35652
  let path$4 = "";
35652
35653
  for (let i$2 = 1; i$2 < pointer; i$2++) path$4 += "/" + pieces[i$2];
35653
35654
  if (!path$4 || addTrailingSlash && !path$4.endsWith("/..")) path$4 += "/";
35654
- url.path = path$4;
35655
+ url$1.path = path$4;
35655
35656
  }
35656
35657
  /**
35657
35658
  * Attempts to resolve `input` URL/path relative to `base`.
35658
35659
  */
35659
35660
  function resolve$4(input, base) {
35660
35661
  if (!input && !base) return "";
35661
- const url = parseUrl(input);
35662
- let inputType = url.type;
35662
+ const url$1 = parseUrl(input);
35663
+ let inputType = url$1.type;
35663
35664
  if (base && inputType !== 7) {
35664
35665
  const baseUrl = parseUrl(base);
35665
35666
  const baseType = baseUrl.type;
35666
35667
  switch (inputType) {
35667
- case 1: url.hash = baseUrl.hash;
35668
- case 2: url.query = baseUrl.query;
35668
+ case 1: url$1.hash = baseUrl.hash;
35669
+ case 2: url$1.query = baseUrl.query;
35669
35670
  case 3:
35670
- case 4: mergePaths(url, baseUrl);
35671
+ case 4: mergePaths(url$1, baseUrl);
35671
35672
  case 5:
35672
- url.user = baseUrl.user;
35673
- url.host = baseUrl.host;
35674
- url.port = baseUrl.port;
35675
- case 6: url.scheme = baseUrl.scheme;
35673
+ url$1.user = baseUrl.user;
35674
+ url$1.host = baseUrl.host;
35675
+ url$1.port = baseUrl.port;
35676
+ case 6: url$1.scheme = baseUrl.scheme;
35676
35677
  }
35677
35678
  if (baseType > inputType) inputType = baseType;
35678
35679
  }
35679
- normalizePath$1(url, inputType);
35680
- const queryHash = url.query + url.hash;
35680
+ normalizePath$1(url$1, inputType);
35681
+ const queryHash = url$1.query + url$1.hash;
35681
35682
  switch (inputType) {
35682
35683
  case 2:
35683
35684
  case 3: return queryHash;
35684
35685
  case 4: {
35685
- const path$4 = url.path.slice(1);
35686
+ const path$4 = url$1.path.slice(1);
35686
35687
  if (!path$4) return queryHash || ".";
35687
35688
  if (isRelative(base || input) && !isRelative(path$4)) return "./" + path$4 + queryHash;
35688
35689
  return path$4 + queryHash;
35689
35690
  }
35690
- case 5: return url.path + queryHash;
35691
- default: return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
35691
+ case 5: return url$1.path + queryHash;
35692
+ default: return url$1.scheme + "//" + url$1.user + url$1.host + url$1.port + url$1.path + queryHash;
35692
35693
  }
35693
35694
  }
35694
35695
  return resolve$4;
@@ -47567,16 +47568,16 @@ var require_package$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@
47567
47568
  let pkg = null;
47568
47569
  const directories = [];
47569
47570
  let isPackage = true;
47570
- let dirname = _path$11().dirname(filepath);
47571
- while (!pkg && _path$11().basename(dirname) !== "node_modules") {
47572
- directories.push(dirname);
47573
- pkg = yield* readConfigPackage(_path$11().join(dirname, PACKAGE_FILENAME));
47574
- const nextLoc = _path$11().dirname(dirname);
47575
- if (dirname === nextLoc) {
47571
+ let dirname$1 = _path$11().dirname(filepath);
47572
+ while (!pkg && _path$11().basename(dirname$1) !== "node_modules") {
47573
+ directories.push(dirname$1);
47574
+ pkg = yield* readConfigPackage(_path$11().join(dirname$1, PACKAGE_FILENAME));
47575
+ const nextLoc = _path$11().dirname(dirname$1);
47576
+ if (dirname$1 === nextLoc) {
47576
47577
  isPackage = false;
47577
47578
  break;
47578
47579
  }
47579
- dirname = nextLoc;
47580
+ dirname$1 = nextLoc;
47580
47581
  }
47581
47582
  return {
47582
47583
  filepath,
@@ -78776,37 +78777,37 @@ var require_config_descriptors = /* @__PURE__ */ __commonJS({ "../../node_module
78776
78777
  function* handlerOf(value$1) {
78777
78778
  return value$1;
78778
78779
  }
78779
- function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
78780
- if (typeof options.browserslistConfigFile === "string") options.browserslistConfigFile = (0, _resolveTargets$1.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname);
78780
+ function optionsWithResolvedBrowserslistConfigFile(options, dirname$1) {
78781
+ if (typeof options.browserslistConfigFile === "string") options.browserslistConfigFile = (0, _resolveTargets$1.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname$1);
78781
78782
  return options;
78782
78783
  }
78783
- function createCachedDescriptors(dirname, options, alias$1) {
78784
+ function createCachedDescriptors(dirname$1, options, alias$1) {
78784
78785
  const { plugins, presets, passPerPreset } = options;
78785
78786
  return {
78786
- options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
78787
- plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias$1) : () => handlerOf([]),
78788
- presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias$1)(!!passPerPreset) : () => handlerOf([])
78787
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname$1),
78788
+ plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname$1)(alias$1) : () => handlerOf([]),
78789
+ presets: presets ? () => createCachedPresetDescriptors(presets, dirname$1)(alias$1)(!!passPerPreset) : () => handlerOf([])
78789
78790
  };
78790
78791
  }
78791
- function createUncachedDescriptors(dirname, options, alias$1) {
78792
+ function createUncachedDescriptors(dirname$1, options, alias$1) {
78792
78793
  return {
78793
- options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
78794
- plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname, alias$1)),
78795
- presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname, alias$1, !!options.passPerPreset))
78794
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname$1),
78795
+ plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname$1, alias$1)),
78796
+ presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname$1, alias$1, !!options.passPerPreset))
78796
78797
  };
78797
78798
  }
78798
78799
  const PRESET_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
78799
78800
  const createCachedPresetDescriptors = (0, _caching$3.makeWeakCacheSync)((items, cache$4) => {
78800
- const dirname = cache$4.using((dir) => dir);
78801
+ const dirname$1 = cache$4.using((dir) => dir);
78801
78802
  return (0, _caching$3.makeStrongCacheSync)((alias$1) => (0, _caching$3.makeStrongCache)(function* (passPerPreset) {
78802
- return (yield* createPresetDescriptors(items, dirname, alias$1, passPerPreset)).map((desc) => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
78803
+ return (yield* createPresetDescriptors(items, dirname$1, alias$1, passPerPreset)).map((desc) => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
78803
78804
  }));
78804
78805
  });
78805
78806
  const PLUGIN_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
78806
78807
  const createCachedPluginDescriptors = (0, _caching$3.makeWeakCacheSync)((items, cache$4) => {
78807
- const dirname = cache$4.using((dir) => dir);
78808
+ const dirname$1 = cache$4.using((dir) => dir);
78808
78809
  return (0, _caching$3.makeStrongCache)(function* (alias$1) {
78809
- return (yield* createPluginDescriptors(items, dirname, alias$1)).map((desc) => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
78810
+ return (yield* createPluginDescriptors(items, dirname$1, alias$1)).map((desc) => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
78810
78811
  });
78811
78812
  });
78812
78813
  const DEFAULT_OPTIONS = {};
@@ -78830,14 +78831,14 @@ var require_config_descriptors = /* @__PURE__ */ __commonJS({ "../../node_module
78830
78831
  }
78831
78832
  return desc;
78832
78833
  }
78833
- function* createPresetDescriptors(items, dirname, alias$1, passPerPreset) {
78834
- return yield* createDescriptors("preset", items, dirname, alias$1, passPerPreset);
78834
+ function* createPresetDescriptors(items, dirname$1, alias$1, passPerPreset) {
78835
+ return yield* createDescriptors("preset", items, dirname$1, alias$1, passPerPreset);
78835
78836
  }
78836
- function* createPluginDescriptors(items, dirname, alias$1) {
78837
- return yield* createDescriptors("plugin", items, dirname, alias$1);
78837
+ function* createPluginDescriptors(items, dirname$1, alias$1) {
78838
+ return yield* createDescriptors("plugin", items, dirname$1, alias$1);
78838
78839
  }
78839
- function* createDescriptors(type, items, dirname, alias$1, ownPass) {
78840
- const descriptors = yield* _gensync$8().all(items.map((item, index$2) => createDescriptor(item, dirname, {
78840
+ function* createDescriptors(type, items, dirname$1, alias$1, ownPass) {
78841
+ const descriptors = yield* _gensync$8().all(items.map((item, index$2) => createDescriptor(item, dirname$1, {
78841
78842
  type,
78842
78843
  alias: `${alias$1}$${index$2}`,
78843
78844
  ownPass: !!ownPass
@@ -78845,7 +78846,7 @@ var require_config_descriptors = /* @__PURE__ */ __commonJS({ "../../node_module
78845
78846
  assertNoDuplicates(descriptors);
78846
78847
  return descriptors;
78847
78848
  }
78848
- function* createDescriptor(pair, dirname, { type, alias: alias$1, ownPass }) {
78849
+ function* createDescriptor(pair, dirname$1, { type, alias: alias$1, ownPass }) {
78849
78850
  const desc = (0, _item$3.getItemDescriptor)(pair);
78850
78851
  if (desc) return desc;
78851
78852
  let name;
@@ -78859,7 +78860,7 @@ var require_config_descriptors = /* @__PURE__ */ __commonJS({ "../../node_module
78859
78860
  if (typeof type !== "string") throw new Error("To resolve a string-based item, the type of item must be given");
78860
78861
  const resolver = type === "plugin" ? _index$7.loadPlugin : _index$7.loadPreset;
78861
78862
  const request = value$1;
78862
- ({filepath, value: value$1} = yield* resolver(value$1, dirname));
78863
+ ({filepath, value: value$1} = yield* resolver(value$1, dirname$1));
78863
78864
  file$2 = {
78864
78865
  request,
78865
78866
  resolved: filepath
@@ -78875,7 +78876,7 @@ var require_config_descriptors = /* @__PURE__ */ __commonJS({ "../../node_module
78875
78876
  alias: filepath || alias$1,
78876
78877
  value: value$1,
78877
78878
  options,
78878
- dirname,
78879
+ dirname: dirname$1,
78879
78880
  ownPass,
78880
78881
  file: file$2
78881
78882
  };
@@ -78928,8 +78929,8 @@ var require_item = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
78928
78929
  function createItemFromDescriptor(desc) {
78929
78930
  return new ConfigItem(desc);
78930
78931
  }
78931
- function* createConfigItem$1(value$1, { dirname = ".", type } = {}) {
78932
- return createItemFromDescriptor(yield* (0, _configDescriptors$1.createDescriptor)(value$1, _path$9().resolve(dirname), {
78932
+ function* createConfigItem$1(value$1, { dirname: dirname$1 = ".", type } = {}) {
78933
+ return createItemFromDescriptor(yield* (0, _configDescriptors$1.createDescriptor)(value$1, _path$9().resolve(dirname$1), {
78933
78934
  type,
78934
78935
  alias: "programmatic item"
78935
78936
  }));
@@ -79408,8 +79409,8 @@ var require_pattern_to_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/
79408
79409
  function escapeRegExp(string) {
79409
79410
  return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
79410
79411
  }
79411
- function pathToPattern(pattern, dirname) {
79412
- const parts = _path$8().resolve(dirname, pattern).split(_path$8().sep);
79412
+ function pathToPattern(pattern, dirname$1) {
79413
+ const parts = _path$8().resolve(dirname$1, pattern).split(_path$8().sep);
79413
79414
  return new RegExp(["^", ...parts.map((part, i$2) => {
79414
79415
  const last$1 = i$2 === parts.length - 1;
79415
79416
  if (part === "**") return last$1 ? starStarPatLast : starStarPat;
@@ -79687,59 +79688,59 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
79687
79688
  if (!baseLogger) return () => {};
79688
79689
  return baseLogger.configure(context$2.showConfig, _printer.ChainFormatter.Config, { filepath });
79689
79690
  }
79690
- function buildRootDescriptors({ dirname, options }, alias$1, descriptors) {
79691
- return descriptors(dirname, options, alias$1);
79691
+ function buildRootDescriptors({ dirname: dirname$1, options }, alias$1, descriptors) {
79692
+ return descriptors(dirname$1, options, alias$1);
79692
79693
  }
79693
79694
  function buildProgrammaticLogger(_$1, context$2, baseLogger) {
79694
79695
  var _context$caller;
79695
79696
  if (!baseLogger) return () => {};
79696
79697
  return baseLogger.configure(context$2.showConfig, _printer.ChainFormatter.Programmatic, { callerName: (_context$caller = context$2.caller) == null ? void 0 : _context$caller.name });
79697
79698
  }
79698
- function buildEnvDescriptors({ dirname, options }, alias$1, descriptors, envName) {
79699
+ function buildEnvDescriptors({ dirname: dirname$1, options }, alias$1, descriptors, envName) {
79699
79700
  var _options$env;
79700
79701
  const opts = (_options$env = options.env) == null ? void 0 : _options$env[envName];
79701
- return opts ? descriptors(dirname, opts, `${alias$1}.env["${envName}"]`) : null;
79702
+ return opts ? descriptors(dirname$1, opts, `${alias$1}.env["${envName}"]`) : null;
79702
79703
  }
79703
- function buildOverrideDescriptors({ dirname, options }, alias$1, descriptors, index$2) {
79704
+ function buildOverrideDescriptors({ dirname: dirname$1, options }, alias$1, descriptors, index$2) {
79704
79705
  var _options$overrides;
79705
79706
  const opts = (_options$overrides = options.overrides) == null ? void 0 : _options$overrides[index$2];
79706
79707
  if (!opts) throw new Error("Assertion failure - missing override");
79707
- return descriptors(dirname, opts, `${alias$1}.overrides[${index$2}]`);
79708
+ return descriptors(dirname$1, opts, `${alias$1}.overrides[${index$2}]`);
79708
79709
  }
79709
- function buildOverrideEnvDescriptors({ dirname, options }, alias$1, descriptors, index$2, envName) {
79710
+ function buildOverrideEnvDescriptors({ dirname: dirname$1, options }, alias$1, descriptors, index$2, envName) {
79710
79711
  var _options$overrides2, _override$env;
79711
79712
  const override = (_options$overrides2 = options.overrides) == null ? void 0 : _options$overrides2[index$2];
79712
79713
  if (!override) throw new Error("Assertion failure - missing override");
79713
79714
  const opts = (_override$env = override.env) == null ? void 0 : _override$env[envName];
79714
- return opts ? descriptors(dirname, opts, `${alias$1}.overrides[${index$2}].env["${envName}"]`) : null;
79715
+ return opts ? descriptors(dirname$1, opts, `${alias$1}.overrides[${index$2}].env["${envName}"]`) : null;
79715
79716
  }
79716
79717
  function makeChainWalker({ root: root$1, env: env$3, overrides, overridesEnv, createLogger }) {
79717
79718
  return function* chainWalker(input, context$2, files = /* @__PURE__ */ new Set(), baseLogger) {
79718
- const { dirname } = input;
79719
+ const { dirname: dirname$1 } = input;
79719
79720
  const flattenedConfigs = [];
79720
79721
  const rootOpts = root$1(input);
79721
- if (configIsApplicable(rootOpts, dirname, context$2, input.filepath)) {
79722
+ if (configIsApplicable(rootOpts, dirname$1, context$2, input.filepath)) {
79722
79723
  flattenedConfigs.push({
79723
79724
  config: rootOpts,
79724
79725
  envName: void 0,
79725
79726
  index: void 0
79726
79727
  });
79727
79728
  const envOpts = env$3(input, context$2.envName);
79728
- if (envOpts && configIsApplicable(envOpts, dirname, context$2, input.filepath)) flattenedConfigs.push({
79729
+ if (envOpts && configIsApplicable(envOpts, dirname$1, context$2, input.filepath)) flattenedConfigs.push({
79729
79730
  config: envOpts,
79730
79731
  envName: context$2.envName,
79731
79732
  index: void 0
79732
79733
  });
79733
79734
  (rootOpts.options.overrides || []).forEach((_$1, index$2) => {
79734
79735
  const overrideOps = overrides(input, index$2);
79735
- if (configIsApplicable(overrideOps, dirname, context$2, input.filepath)) {
79736
+ if (configIsApplicable(overrideOps, dirname$1, context$2, input.filepath)) {
79736
79737
  flattenedConfigs.push({
79737
79738
  config: overrideOps,
79738
79739
  index: index$2,
79739
79740
  envName: void 0
79740
79741
  });
79741
79742
  const overrideEnvOpts = overridesEnv(input, index$2, context$2.envName);
79742
- if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context$2, input.filepath)) flattenedConfigs.push({
79743
+ if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname$1, context$2, input.filepath)) flattenedConfigs.push({
79743
79744
  config: overrideEnvOpts,
79744
79745
  index: index$2,
79745
79746
  envName: context$2.envName
@@ -79747,20 +79748,20 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
79747
79748
  }
79748
79749
  });
79749
79750
  }
79750
- if (flattenedConfigs.some(({ config: { options: { ignore, only } } }) => shouldIgnore(context$2, ignore, only, dirname))) return null;
79751
+ if (flattenedConfigs.some(({ config: { options: { ignore, only } } }) => shouldIgnore(context$2, ignore, only, dirname$1))) return null;
79751
79752
  const chain$1 = emptyChain();
79752
79753
  const logger = createLogger(input, context$2, baseLogger);
79753
79754
  for (const { config, index: index$2, envName } of flattenedConfigs) {
79754
- if (!(yield* mergeExtendsChain(chain$1, config.options, dirname, context$2, files, baseLogger))) return null;
79755
+ if (!(yield* mergeExtendsChain(chain$1, config.options, dirname$1, context$2, files, baseLogger))) return null;
79755
79756
  logger(config, index$2, envName);
79756
79757
  yield* mergeChainOpts(chain$1, config);
79757
79758
  }
79758
79759
  return chain$1;
79759
79760
  };
79760
79761
  }
79761
- function* mergeExtendsChain(chain$1, opts, dirname, context$2, files, baseLogger) {
79762
+ function* mergeExtendsChain(chain$1, opts, dirname$1, context$2, files, baseLogger) {
79762
79763
  if (opts.extends === void 0) return true;
79763
- const file$2 = yield* (0, _index$6.loadConfig)(opts.extends, dirname, context$2.envName, context$2.caller);
79764
+ const file$2 = yield* (0, _index$6.loadConfig)(opts.extends, dirname$1, context$2.envName, context$2.caller);
79764
79765
  if (files.has(file$2)) throw new Error(`Configuration cycle detected loading ${file$2.filepath}.\nFile already loaded following the config chain:\n` + Array.from(files, (file$3) => ` - ${file$3.filepath}`).join("\n"));
79765
79766
  files.add(file$2);
79766
79767
  const fileChain = yield* loadFileChain(validateExtendFile(file$2), context$2, files, baseLogger);
@@ -79831,44 +79832,44 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
79831
79832
  return acc;
79832
79833
  }, []);
79833
79834
  }
79834
- function configIsApplicable({ options }, dirname, context$2, configName) {
79835
- return (options.test === void 0 || configFieldIsApplicable(context$2, options.test, dirname, configName)) && (options.include === void 0 || configFieldIsApplicable(context$2, options.include, dirname, configName)) && (options.exclude === void 0 || !configFieldIsApplicable(context$2, options.exclude, dirname, configName));
79835
+ function configIsApplicable({ options }, dirname$1, context$2, configName) {
79836
+ return (options.test === void 0 || configFieldIsApplicable(context$2, options.test, dirname$1, configName)) && (options.include === void 0 || configFieldIsApplicable(context$2, options.include, dirname$1, configName)) && (options.exclude === void 0 || !configFieldIsApplicable(context$2, options.exclude, dirname$1, configName));
79836
79837
  }
79837
- function configFieldIsApplicable(context$2, test, dirname, configName) {
79838
- return matchesPatterns(context$2, Array.isArray(test) ? test : [test], dirname, configName);
79838
+ function configFieldIsApplicable(context$2, test, dirname$1, configName) {
79839
+ return matchesPatterns(context$2, Array.isArray(test) ? test : [test], dirname$1, configName);
79839
79840
  }
79840
79841
  function ignoreListReplacer(_key, value$1) {
79841
79842
  if (value$1 instanceof RegExp) return String(value$1);
79842
79843
  return value$1;
79843
79844
  }
79844
- function shouldIgnore(context$2, ignore, only, dirname) {
79845
- if (ignore && matchesPatterns(context$2, ignore, dirname)) {
79845
+ function shouldIgnore(context$2, ignore, only, dirname$1) {
79846
+ if (ignore && matchesPatterns(context$2, ignore, dirname$1)) {
79846
79847
  var _context$filename;
79847
- const message = `No config is applied to "${(_context$filename = context$2.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname}"`;
79848
+ const message = `No config is applied to "${(_context$filename = context$2.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname$1}"`;
79848
79849
  debug$4(message);
79849
79850
  if (context$2.showConfig) console.log(message);
79850
79851
  return true;
79851
79852
  }
79852
- if (only && !matchesPatterns(context$2, only, dirname)) {
79853
+ if (only && !matchesPatterns(context$2, only, dirname$1)) {
79853
79854
  var _context$filename2;
79854
- const message = `No config is applied to "${(_context$filename2 = context$2.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`;
79855
+ const message = `No config is applied to "${(_context$filename2 = context$2.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname$1}"`;
79855
79856
  debug$4(message);
79856
79857
  if (context$2.showConfig) console.log(message);
79857
79858
  return true;
79858
79859
  }
79859
79860
  return false;
79860
79861
  }
79861
- function matchesPatterns(context$2, patterns, dirname, configName) {
79862
- return patterns.some((pattern) => matchPattern(pattern, dirname, context$2.filename, context$2, configName));
79862
+ function matchesPatterns(context$2, patterns, dirname$1, configName) {
79863
+ return patterns.some((pattern) => matchPattern(pattern, dirname$1, context$2.filename, context$2, configName));
79863
79864
  }
79864
- function matchPattern(pattern, dirname, pathToTest, context$2, configName) {
79865
+ function matchPattern(pattern, dirname$1, pathToTest, context$2, configName) {
79865
79866
  if (typeof pattern === "function") return !!(0, _rewriteStackTrace$6.endHiddenCallStack)(pattern)(pathToTest, {
79866
- dirname,
79867
+ dirname: dirname$1,
79867
79868
  envName: context$2.envName,
79868
79869
  caller: context$2.caller
79869
79870
  });
79870
79871
  if (typeof pathToTest !== "string") throw new _configError$3.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName);
79871
- if (typeof pattern === "string") pattern = (0, _patternToRegex$1.default)(pattern, dirname);
79872
+ if (typeof pattern === "string") pattern = (0, _patternToRegex$1.default)(pattern, dirname$1);
79872
79873
  return pattern.test(pathToTest);
79873
79874
  }
79874
79875
  }) });
@@ -80201,7 +80202,7 @@ var require_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
80201
80202
  }
80202
80203
  };
80203
80204
  }
80204
- const makeDescriptorLoader = (apiFactory) => (0, _caching$1.makeWeakCache)(function* ({ value: value$1, options, dirname, alias: alias$1 }, cache$4) {
80205
+ const makeDescriptorLoader = (apiFactory) => (0, _caching$1.makeWeakCache)(function* ({ value: value$1, options, dirname: dirname$1, alias: alias$1 }, cache$4) {
80205
80206
  if (options === false) throw new Error("Assertion failure");
80206
80207
  options = options || {};
80207
80208
  const externalDependencies = [];
@@ -80210,7 +80211,7 @@ var require_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
80210
80211
  const factory = (0, _async$4.maybeAsync)(value$1, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
80211
80212
  const api = Object.assign({}, context, apiFactory(cache$4, externalDependencies));
80212
80213
  try {
80213
- item = yield* factory(api, options, dirname);
80214
+ item = yield* factory(api, options, dirname$1);
80214
80215
  } catch (e$1) {
80215
80216
  if (alias$1) e$1.message += ` (While processing: ${JSON.stringify(alias$1)})`;
80216
80217
  throw e$1;
@@ -80232,14 +80233,14 @@ var require_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
80232
80233
  return {
80233
80234
  value: item,
80234
80235
  options,
80235
- dirname,
80236
+ dirname: dirname$1,
80236
80237
  alias: alias$1,
80237
80238
  externalDependencies: (0, _deepArray$1.finalize)(externalDependencies)
80238
80239
  };
80239
80240
  });
80240
80241
  const pluginDescriptorLoader = makeDescriptorLoader(_configApi$1.makePluginAPI);
80241
80242
  const presetDescriptorLoader = makeDescriptorLoader(_configApi$1.makePresetAPI);
80242
- const instantiatePlugin = (0, _caching$1.makeWeakCache)(function* ({ value: value$1, options, dirname, alias: alias$1, externalDependencies }, cache$4) {
80243
+ const instantiatePlugin = (0, _caching$1.makeWeakCache)(function* ({ value: value$1, options, dirname: dirname$1, alias: alias$1, externalDependencies }, cache$4) {
80243
80244
  const pluginObj = (0, _plugins$1.validatePluginObject)(value$1);
80244
80245
  const plugin = Object.assign({}, pluginObj);
80245
80246
  if (plugin.visitor) plugin.visitor = _traverse$5().default.explode(Object.assign({}, plugin.visitor));
@@ -80249,7 +80250,7 @@ var require_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
80249
80250
  alias: `${alias$1}$inherits`,
80250
80251
  value: plugin.inherits,
80251
80252
  options,
80252
- dirname
80253
+ dirname: dirname$1
80253
80254
  };
80254
80255
  const inherits$2 = yield* (0, _async$4.forwardAsync)(loadPluginDescriptor, (run$1) => {
80255
80256
  return cache$4.invalidate((data) => run$1(inheritsDescriptor, data));
@@ -80291,11 +80292,11 @@ var require_full = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel
80291
80292
  (_options$overrides = options.overrides) == null || _options$overrides.forEach((overrideOptions) => validateIfOptionNeedsFilename(overrideOptions, descriptor));
80292
80293
  }
80293
80294
  };
80294
- const instantiatePreset = (0, _caching$1.makeWeakCacheSync)(({ value: value$1, dirname, alias: alias$1, externalDependencies }) => {
80295
+ const instantiatePreset = (0, _caching$1.makeWeakCacheSync)(({ value: value$1, dirname: dirname$1, alias: alias$1, externalDependencies }) => {
80295
80296
  return {
80296
80297
  options: (0, _options.validate)("preset", value$1),
80297
80298
  alias: alias$1,
80298
- dirname,
80299
+ dirname: dirname$1,
80299
80300
  externalDependencies
80300
80301
  };
80301
80302
  });
@@ -80974,7 +80975,7 @@ var require_missing_plugin_helper = /* @__PURE__ */ __commonJS({ "../../node_mod
80974
80975
  }
80975
80976
  }
80976
80977
  });
80977
- const getNameURLCombination = ({ name, url }) => `${name} (${url})`;
80978
+ const getNameURLCombination = ({ name, url: url$1 }) => `${name} (${url$1})`;
80978
80979
  function generateMissingPluginMessage(missingPluginName, loc, codeFrame, filename) {
80979
80980
  let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled (${loc.line}:${loc.column + 1}):\n\n` + codeFrame;
80980
80981
  const pluginInfo = pluginNameMap[missingPluginName];
@@ -81640,14 +81641,14 @@ var require_lib$12 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@bab
81640
81641
  addExternalDependency: () => () => {}
81641
81642
  });
81642
81643
  function declare(builder) {
81643
- return (api, options, dirname) => {
81644
+ return (api, options, dirname$1) => {
81644
81645
  let clonedApi;
81645
81646
  for (const name of Object.keys(apiPolyfills)) {
81646
81647
  if (api[name]) continue;
81647
81648
  clonedApi ??= copyApiObject(api);
81648
81649
  clonedApi[name] = apiPolyfills[name](clonedApi);
81649
81650
  }
81650
- return builder(clonedApi != null ? clonedApi : api, options || {}, dirname);
81651
+ return builder(clonedApi != null ? clonedApi : api, options || {}, dirname$1);
81651
81652
  };
81652
81653
  }
81653
81654
  exports.declarePreset = declare;
@@ -85817,9 +85818,9 @@ var require_module_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
85817
85818
  }
85818
85819
  const loadMjsFromPath = (0, _rewriteStackTrace$4.endHiddenCallStack)(function() {
85819
85820
  var _loadMjsFromPath = _asyncToGenerator(function* (filepath) {
85820
- const url = (0, _url$2().pathToFileURL)(filepath).toString() + "?import";
85821
+ const url$1 = (0, _url$2().pathToFileURL)(filepath).toString() + "?import";
85821
85822
  if (!import_) throw new _configError$1.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
85822
- return yield import_(url);
85823
+ return yield import_(url$1);
85823
85824
  });
85824
85825
  function loadMjsFromPath$1(_x) {
85825
85826
  return _loadMjsFromPath.apply(this, arguments);
@@ -86069,19 +86070,19 @@ var require_configuration = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
86069
86070
  };
86070
86071
  });
86071
86072
  function findConfigUpwards(rootDir) {
86072
- let dirname = rootDir;
86073
+ let dirname$1 = rootDir;
86073
86074
  for (;;) {
86074
- for (const filename of ROOT_CONFIG_FILENAMES) if (_fs$2().existsSync(_path$2().join(dirname, filename))) return dirname;
86075
- const nextDir = _path$2().dirname(dirname);
86076
- if (dirname === nextDir) break;
86077
- dirname = nextDir;
86075
+ for (const filename of ROOT_CONFIG_FILENAMES) if (_fs$2().existsSync(_path$2().join(dirname$1, filename))) return dirname$1;
86076
+ const nextDir = _path$2().dirname(dirname$1);
86077
+ if (dirname$1 === nextDir) break;
86078
+ dirname$1 = nextDir;
86078
86079
  }
86079
86080
  return null;
86080
86081
  }
86081
86082
  function* findRelativeConfig(packageData, envName, caller) {
86082
86083
  let config = null;
86083
86084
  let ignore = null;
86084
- const dirname = _path$2().dirname(packageData.filepath);
86085
+ const dirname$1 = _path$2().dirname(packageData.filepath);
86085
86086
  for (const loc of packageData.directories) {
86086
86087
  if (!config) {
86087
86088
  var _packageData$pkg;
@@ -86089,7 +86090,7 @@ var require_configuration = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
86089
86090
  }
86090
86091
  if (!ignore) {
86091
86092
  ignore = yield* readIgnoreConfig(_path$2().join(loc, BABELIGNORE_FILENAME));
86092
- if (ignore) debug$1("Found ignore %o from %o.", ignore.filepath, dirname);
86093
+ if (ignore) debug$1("Found ignore %o from %o.", ignore.filepath, dirname$1);
86093
86094
  }
86094
86095
  }
86095
86096
  return {
@@ -86097,28 +86098,28 @@ var require_configuration = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
86097
86098
  ignore
86098
86099
  };
86099
86100
  }
86100
- function findRootConfig(dirname, envName, caller) {
86101
- return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);
86101
+ function findRootConfig(dirname$1, envName, caller) {
86102
+ return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname$1, envName, caller);
86102
86103
  }
86103
- function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) {
86104
- const config = (yield* _gensync$3().all(names.map((filename) => readConfig(_path$2().join(dirname, filename), envName, caller)))).reduce((previousConfig$1, config$1) => {
86105
- if (config$1 && previousConfig$1) throw new _configError.default(`Multiple configuration files found. Please remove one:\n - ${_path$2().basename(previousConfig$1.filepath)}\n - ${config$1.filepath}\nfrom ${dirname}`);
86104
+ function* loadOneConfig(names, dirname$1, envName, caller, previousConfig = null) {
86105
+ const config = (yield* _gensync$3().all(names.map((filename) => readConfig(_path$2().join(dirname$1, filename), envName, caller)))).reduce((previousConfig$1, config$1) => {
86106
+ if (config$1 && previousConfig$1) throw new _configError.default(`Multiple configuration files found. Please remove one:\n - ${_path$2().basename(previousConfig$1.filepath)}\n - ${config$1.filepath}\nfrom ${dirname$1}`);
86106
86107
  return config$1 || previousConfig$1;
86107
86108
  }, previousConfig);
86108
- if (config) debug$1("Found configuration %o from %o.", config.filepath, dirname);
86109
+ if (config) debug$1("Found configuration %o from %o.", config.filepath, dirname$1);
86109
86110
  return config;
86110
86111
  }
86111
- function* loadConfig(name, dirname, envName, caller) {
86112
+ function* loadConfig(name, dirname$1, envName, caller) {
86112
86113
  const filepath = (((v$4, w$2) => (v$4 = v$4.split("."), w$2 = w$2.split("."), +v$4[0] > +w$2[0] || v$4[0] == w$2[0] && +v$4[1] >= +w$2[1]))(process.versions.node, "8.9") ? require.resolve : (r$1, { paths: [b$2] }, M = require("module")) => {
86113
86114
  let f$1 = M._findPath(r$1, M._nodeModulePaths(b$2).concat(b$2));
86114
86115
  if (f$1) return f$1;
86115
86116
  f$1 = /* @__PURE__ */ new Error(`Cannot resolve module '${r$1}'`);
86116
86117
  f$1.code = "MODULE_NOT_FOUND";
86117
86118
  throw f$1;
86118
- })(name, { paths: [dirname] });
86119
+ })(name, { paths: [dirname$1] });
86119
86120
  const conf = yield* readConfig(filepath, envName, caller);
86120
86121
  if (!conf) throw new _configError.default(`Config file contains no configuration data`, filepath);
86121
- debug$1("Loaded config %o from %o.", name, dirname);
86122
+ debug$1("Loaded config %o from %o.", name, dirname$1);
86122
86123
  return conf;
86123
86124
  }
86124
86125
  function readConfig(filepath, envName, caller) {
@@ -86135,10 +86136,10 @@ var require_configuration = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
86135
86136
  default: return readConfigJSON5(filepath);
86136
86137
  }
86137
86138
  }
86138
- function* resolveShowConfigPath(dirname) {
86139
+ function* resolveShowConfigPath(dirname$1) {
86139
86140
  const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
86140
86141
  if (targetPath != null) {
86141
- const absolutePath = _path$2().resolve(dirname, targetPath);
86142
+ const absolutePath = _path$2().resolve(dirname$1, targetPath);
86142
86143
  if (!(yield* fs.stat(absolutePath)).isFile()) throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
86143
86144
  return absolutePath;
86144
86145
  }
@@ -86500,8 +86501,8 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
86500
86501
  type: "none"
86501
86502
  };
86502
86503
  }
86503
- function getPackageType(url) {
86504
- return getPackageScopeConfig(url).type;
86504
+ function getPackageType(url$1) {
86505
+ return getPackageScopeConfig(url$1).type;
86505
86506
  }
86506
86507
  const { ERR_UNKNOWN_FILE_EXTENSION } = codes;
86507
86508
  const hasOwnProperty$2 = {}.hasOwnProperty;
@@ -86535,8 +86536,8 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
86535
86536
  ];
86536
86537
  return mimeToFormat(mime);
86537
86538
  }
86538
- function extname(url) {
86539
- const pathname = url.pathname;
86539
+ function extname(url$1) {
86540
+ const pathname = url$1.pathname;
86540
86541
  let index$2 = pathname.length;
86541
86542
  while (index$2--) {
86542
86543
  const code$1 = pathname.codePointAt(index$2);
@@ -86545,28 +86546,28 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
86545
86546
  }
86546
86547
  return "";
86547
86548
  }
86548
- function getFileProtocolModuleFormat(url, _context$10, ignoreErrors) {
86549
- const value$1 = extname(url);
86549
+ function getFileProtocolModuleFormat(url$1, _context$10, ignoreErrors) {
86550
+ const value$1 = extname(url$1);
86550
86551
  if (value$1 === ".js") {
86551
- const packageType = getPackageType(url);
86552
+ const packageType = getPackageType(url$1);
86552
86553
  if (packageType !== "none") return packageType;
86553
86554
  return "commonjs";
86554
86555
  }
86555
86556
  if (value$1 === "") {
86556
- const packageType = getPackageType(url);
86557
+ const packageType = getPackageType(url$1);
86557
86558
  if (packageType === "none" || packageType === "commonjs") return "commonjs";
86558
86559
  return "module";
86559
86560
  }
86560
86561
  const format = extensionFormatMap[value$1];
86561
86562
  if (format) return format;
86562
86563
  if (ignoreErrors) return;
86563
- throw new ERR_UNKNOWN_FILE_EXTENSION(value$1, (0, _url$1().fileURLToPath)(url));
86564
+ throw new ERR_UNKNOWN_FILE_EXTENSION(value$1, (0, _url$1().fileURLToPath)(url$1));
86564
86565
  }
86565
86566
  function getHttpProtocolModuleFormat() {}
86566
- function defaultGetFormatWithoutErrors(url, context$2) {
86567
- const protocol = url.protocol;
86567
+ function defaultGetFormatWithoutErrors(url$1, context$2) {
86568
+ const protocol = url$1.protocol;
86568
86569
  if (!hasOwnProperty$2.call(protocolHandlers, protocol)) return null;
86569
- return protocolHandlers[protocol](url, context$2, true) || null;
86570
+ return protocolHandlers[protocol](url$1, context$2, true) || null;
86570
86571
  }
86571
86572
  const { ERR_INVALID_ARG_VALUE } = codes;
86572
86573
  const DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
@@ -86600,10 +86601,10 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
86600
86601
  const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
86601
86602
  _process().emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url$1().fileURLToPath)(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
86602
86603
  }
86603
- function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
86604
+ function emitLegacyIndexDeprecation(url$1, packageJsonUrl, base, main) {
86604
86605
  if (_process().noDeprecation) return;
86605
- if (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== "module") return;
86606
- const urlPath = (0, _url$1().fileURLToPath)(url.href);
86606
+ if (defaultGetFormatWithoutErrors(url$1, { parentURL: base.href }) !== "module") return;
86607
+ const urlPath = (0, _url$1().fileURLToPath)(url$1.href);
86607
86608
  const packagePath = (0, _url$1().fileURLToPath)(new (_url$1()).URL(".", packageJsonUrl));
86608
86609
  const basePath = (0, _url$1().fileURLToPath)(base);
86609
86610
  if (!main) _process().emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
@@ -86614,8 +86615,8 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
86614
86615
  return (0, _fs$1().statSync)(path$4);
86615
86616
  } catch (_unused2) {}
86616
86617
  }
86617
- function fileExists(url) {
86618
- const stats = (0, _fs$1().statSync)(url, { throwIfNoEntry: false });
86618
+ function fileExists(url$1) {
86619
+ const stats = (0, _fs$1().statSync)(url$1, { throwIfNoEntry: false });
86619
86620
  const isFile$2 = stats ? stats.isFile() : void 0;
86620
86621
  return isFile$2 === null || isFile$2 === void 0 ? false : isFile$2;
86621
86622
  }
@@ -87025,10 +87026,10 @@ var require_import_meta_resolve = /* @__PURE__ */ __commonJS({ "../../node_modul
87025
87026
  if (protocol === "node:") return { url: specifier };
87026
87027
  if (parsed && parsed.protocol === "node:") return { url: specifier };
87027
87028
  const conditions = getConditionsSet(context$2.conditions);
87028
- const url = moduleResolve(specifier, new (_url$1()).URL(parentURL), conditions, false);
87029
+ const url$1 = moduleResolve(specifier, new (_url$1()).URL(parentURL), conditions, false);
87029
87030
  return {
87030
- url: url.href,
87031
- format: defaultGetFormatWithoutErrors(url, { parentURL })
87031
+ url: url$1.href,
87032
+ format: defaultGetFormatWithoutErrors(url$1, { parentURL })
87032
87033
  };
87033
87034
  }
87034
87035
  function resolve(specifier, parent) {
@@ -87093,19 +87094,19 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@ba
87093
87094
  const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
87094
87095
  const resolvePlugin$1 = exports.resolvePlugin = resolveStandardizedName.bind(null, "plugin");
87095
87096
  const resolvePreset$1 = exports.resolvePreset = resolveStandardizedName.bind(null, "preset");
87096
- function* loadPlugin(name, dirname) {
87097
- const { filepath, loader } = resolvePlugin$1(name, dirname, yield* (0, _async.isAsync)());
87097
+ function* loadPlugin(name, dirname$1) {
87098
+ const { filepath, loader } = resolvePlugin$1(name, dirname$1, yield* (0, _async.isAsync)());
87098
87099
  const value$1 = yield* requireModule("plugin", loader, filepath);
87099
- debug("Loaded plugin %o from %o.", name, dirname);
87100
+ debug("Loaded plugin %o from %o.", name, dirname$1);
87100
87101
  return {
87101
87102
  filepath,
87102
87103
  value: value$1
87103
87104
  };
87104
87105
  }
87105
- function* loadPreset(name, dirname) {
87106
- const { filepath, loader } = resolvePreset$1(name, dirname, yield* (0, _async.isAsync)());
87106
+ function* loadPreset(name, dirname$1) {
87107
+ const { filepath, loader } = resolvePreset$1(name, dirname$1, yield* (0, _async.isAsync)());
87107
87108
  const value$1 = yield* requireModule("preset", loader, filepath);
87108
- debug("Loaded preset %o from %o.", name, dirname);
87109
+ debug("Loaded preset %o from %o.", name, dirname$1);
87109
87110
  return {
87110
87111
  filepath,
87111
87112
  value: value$1
@@ -87139,9 +87140,9 @@ to your top-level package.json.
87139
87140
  `;
87140
87141
  throw error;
87141
87142
  }
87142
- function tryRequireResolve(id, dirname) {
87143
+ function tryRequireResolve(id, dirname$1) {
87143
87144
  try {
87144
- if (dirname) return {
87145
+ if (dirname$1) return {
87145
87146
  error: null,
87146
87147
  value: (((v$4, w$2) => (v$4 = v$4.split("."), w$2 = w$2.split("."), +v$4[0] > +w$2[0] || v$4[0] == w$2[0] && +v$4[1] >= +w$2[1]))(process.versions.node, "8.9") ? require.resolve : (r$1, { paths: [b$2] }, M = require("module")) => {
87147
87148
  let f$1 = M._findPath(r$1, M._nodeModulePaths(b$2).concat(b$2));
@@ -87149,7 +87150,7 @@ to your top-level package.json.
87149
87150
  f$1 = /* @__PURE__ */ new Error(`Cannot resolve module '${r$1}'`);
87150
87151
  f$1.code = "MODULE_NOT_FOUND";
87151
87152
  throw f$1;
87152
- })(id, { paths: [dirname] })
87153
+ })(id, { paths: [dirname$1] })
87153
87154
  };
87154
87155
  else return {
87155
87156
  error: null,
@@ -87175,17 +87176,17 @@ to your top-level package.json.
87175
87176
  };
87176
87177
  }
87177
87178
  }
87178
- function resolveStandardizedNameForRequire(type, name, dirname) {
87179
+ function resolveStandardizedNameForRequire(type, name, dirname$1) {
87179
87180
  const it = resolveAlternativesHelper(type, name);
87180
87181
  let res = it.next();
87181
- while (!res.done) res = it.next(tryRequireResolve(res.value, dirname));
87182
+ while (!res.done) res = it.next(tryRequireResolve(res.value, dirname$1));
87182
87183
  return {
87183
87184
  loader: "require",
87184
87185
  filepath: res.value
87185
87186
  };
87186
87187
  }
87187
- function resolveStandardizedNameForImport(type, name, dirname) {
87188
- const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
87188
+ function resolveStandardizedNameForImport(type, name, dirname$1) {
87189
+ const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname$1, "./babel-virtual-resolve-base.js")).href;
87189
87190
  const it = resolveAlternativesHelper(type, name);
87190
87191
  let res = it.next();
87191
87192
  while (!res.done) res = it.next(tryImportMetaResolve(res.value, parentUrl));
@@ -87194,15 +87195,15 @@ to your top-level package.json.
87194
87195
  filepath: (0, _url().fileURLToPath)(res.value)
87195
87196
  };
87196
87197
  }
87197
- function resolveStandardizedName(type, name, dirname, allowAsync) {
87198
- if (!_moduleTypes.supportsESM || !allowAsync) return resolveStandardizedNameForRequire(type, name, dirname);
87198
+ function resolveStandardizedName(type, name, dirname$1, allowAsync) {
87199
+ if (!_moduleTypes.supportsESM || !allowAsync) return resolveStandardizedNameForRequire(type, name, dirname$1);
87199
87200
  try {
87200
- const resolved = resolveStandardizedNameForImport(type, name, dirname);
87201
- if (!(0, _fs().existsSync)(resolved.filepath)) throw Object.assign(/* @__PURE__ */ new Error(`Could not resolve "${name}" in file ${dirname}.`), { type: "MODULE_NOT_FOUND" });
87201
+ const resolved = resolveStandardizedNameForImport(type, name, dirname$1);
87202
+ if (!(0, _fs().existsSync)(resolved.filepath)) throw Object.assign(/* @__PURE__ */ new Error(`Could not resolve "${name}" in file ${dirname$1}.`), { type: "MODULE_NOT_FOUND" });
87202
87203
  return resolved;
87203
87204
  } catch (e$1) {
87204
87205
  try {
87205
- return resolveStandardizedNameForRequire(type, name, dirname);
87206
+ return resolveStandardizedNameForRequire(type, name, dirname$1);
87206
87207
  } catch (e2) {
87207
87208
  if (e$1.type === "MODULE_NOT_FOUND") throw e$1;
87208
87209
  if (e2.type === "MODULE_NOT_FOUND") throw e2;
@@ -87639,9 +87640,9 @@ var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@babel+
87639
87640
  var _transformAst = require_transform_ast();
87640
87641
  var _parse = require_parse();
87641
87642
  exports.version = "7.28.5";
87642
- const resolvePlugin = (name, dirname) => resolvers.resolvePlugin(name, dirname, false).filepath;
87643
+ const resolvePlugin = (name, dirname$1) => resolvers.resolvePlugin(name, dirname$1, false).filepath;
87643
87644
  exports.resolvePlugin = resolvePlugin;
87644
- const resolvePreset = (name, dirname) => resolvers.resolvePreset(name, dirname, false).filepath;
87645
+ const resolvePreset = (name, dirname$1) => resolvers.resolvePreset(name, dirname$1, false).filepath;
87645
87646
  exports.resolvePreset = resolvePreset;
87646
87647
  exports.DEFAULT_EXTENSIONS = Object.freeze([
87647
87648
  ".js",