rollipop 0.1.0-alpha.12 → 0.1.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/commands.js CHANGED
@@ -22,12 +22,13 @@ import { xxh32 } from "@node-rs/xxhash";
22
22
  import dedent from "dedent";
23
23
  import dotenv from "dotenv";
24
24
  import dotenvExpand from "dotenv-expand";
25
- import { exactRegex, exclude, id, include } from "@rollipop/rolldown-pluginutils";
25
+ import { exactRegex, exclude, id, include, or } from "@rollipop/rolldown-pluginutils";
26
26
  import { imageSize } from "image-size";
27
27
  import url from "url";
28
28
  import { createDevServerMiddleware } from "@react-native-community/cli-server-api";
29
29
  import { createDevMiddleware } from "@react-native/dev-middleware";
30
30
  import Fastify from "fastify";
31
+ import mitt from "mitt";
31
32
  import http from "node:http";
32
33
  import EventEmitter from "node:events";
33
34
  import stripAnsi from "strip-ansi";
@@ -36,13 +37,13 @@ import fp from "fastify-plugin";
36
37
  import { asConst } from "json-schema-to-ts";
37
38
  import mime from "mime";
38
39
  import Ajv from "ajv";
40
+ import { codeFrameColumns } from "@babel/code-frame";
39
41
  import * as ws from "ws";
40
42
  import { transform } from "@svgr/core";
41
43
  import * as babel from "@babel/core";
42
44
  import * as swc from "@swc/core";
43
45
 
44
- //#region rolldown:runtime
45
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
46
+ //#region \0rolldown/runtime.js
46
47
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
47
48
 
48
49
  //#endregion
@@ -81,9 +82,9 @@ function printLogo() {
81
82
  DESCRIPTIONS.forEach((description, index) => {
82
83
  const descriptionHalfLength = description.length / 2;
83
84
  const logoHalfWidth = maxLogoWidth / 2;
84
- const padding$1 = " ".repeat(PADDING - descriptionHalfLength + logoHalfWidth);
85
- if (index === 0) console.log(padding$1 + chalk.bold.hex(PRIMARY_COLOR)(description));
86
- else console.log(padding$1 + description);
85
+ const padding = " ".repeat(PADDING - descriptionHalfLength + logoHalfWidth);
86
+ if (index === 0) console.log(padding + chalk.bold.hex(PRIMARY_COLOR)(description));
87
+ else console.log(padding + description);
87
88
  });
88
89
  console.log("");
89
90
  }
@@ -118,7 +119,7 @@ const FALSY_VALUES = [
118
119
  ];
119
120
  function parseDebugKeys() {
120
121
  return Object.keys(process.env).filter((key) => /^debug_/i.test(key)).reduce((acc, key) => {
121
- const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, key$1) => key$1.toUpperCase());
122
+ const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, key) => key.toUpperCase());
122
123
  let value = process.env[key];
123
124
  const lowerCase = typeof value === "string" ? value.toLowerCase() : value.toString();
124
125
  if (TRUTHY_VALUES.includes(lowerCase)) value = true;
@@ -350,18 +351,18 @@ function setupInteractiveMode(options) {
350
351
  process.emit("SIGINT");
351
352
  process.exit(0);
352
353
  }
353
- const targetCommand = allCommands.find((command$2) => command$2.key === sequence && (command$2.shift ?? false) === shift);
354
+ const targetCommand = allCommands.find((command) => command.key === sequence && (command.shift ?? false) === shift);
354
355
  if (targetCommand) targetCommand.handler.call({
355
356
  server: devServer,
356
357
  logger: logger$2
357
358
  });
358
359
  });
359
360
  console.log();
360
- allCommands.forEach((command$2, index) => {
361
+ allCommands.forEach((command, index) => {
361
362
  if (defaultCommands.length === index) console.log();
362
- const leadingLabel = command$2.shift ? "»" : "» Press";
363
- const shortcut = chalk.bold(shortcutLabel(command$2.key, command$2.shift));
364
- console.log(`${leadingLabel} ${shortcut} │ ${typeof command$2.description === "function" ? command$2.description() : command$2.description}`);
363
+ const leadingLabel = command.shift ? "»" : "» Press";
364
+ const shortcut = chalk.bold(shortcutLabel(command.key, command.shift));
365
+ console.log(`${leadingLabel} ${shortcut} │ ${typeof command.description === "function" ? command.description() : command.description}`);
365
366
  });
366
367
  }
367
368
  function getDefaultCommands(devServer, debuggerOpener) {
@@ -410,10 +411,10 @@ function shortcutLabel(key, shift) {
410
411
  if (shift) return `shift+${key}`;
411
412
  return key;
412
413
  }
413
- function assertHasNoDuplicateCommands(defaultCommands, commands$1) {
414
+ function assertHasNoDuplicateCommands(defaultCommands, commands) {
414
415
  const defaultCommandKeys = defaultCommands.map(({ key, shift }) => shortcutLabel(key, shift));
415
- const duplicateKeys = commands$1.map(({ key, shift }) => shortcutLabel(key, shift)).filter((key) => defaultCommandKeys.includes(key));
416
- const invalidCommandKeys = commands$1.filter(({ key }) => key.length > 1).map(({ key, shift }) => shortcutLabel(key, shift));
416
+ const duplicateKeys = commands.map(({ key, shift }) => shortcutLabel(key, shift)).filter((key) => defaultCommandKeys.includes(key));
417
+ const invalidCommandKeys = commands.filter(({ key }) => key.length > 1).map(({ key, shift }) => shortcutLabel(key, shift));
417
418
  if (invalidCommandKeys.length > 0) throw new Error(`Invalid commands: ${invalidCommandKeys.join(", ")}`);
418
419
  if (duplicateKeys.length > 0) throw new Error(`Duplicate commands: ${duplicateKeys.join(", ")}`);
419
420
  }
@@ -458,10 +459,10 @@ function parseFlowSyntax(code) {
458
459
  babel: true
459
460
  });
460
461
  }
461
- function generateSourceFromAst(ast, id$1) {
462
+ function generateSourceFromAst(ast, id) {
462
463
  const generated = generate(ast, {
463
464
  sourceMaps: true,
464
- sourceFileName: path.basename(id$1)
465
+ sourceFileName: path.basename(id)
465
466
  });
466
467
  return {
467
468
  code: generated.code,
@@ -598,13 +599,13 @@ function getPolyfillScriptPaths(reactNativePath) {
598
599
  const scriptPath = path.join(reactNativePath, "rn-get-polyfills");
599
600
  return __require(scriptPath)();
600
601
  }
601
- function getGlobalVariables(dev$1, buildType) {
602
- const isDevServerMode = dev$1 && buildType === "serve";
602
+ function getGlobalVariables(dev, buildType) {
603
+ const isDevServerMode = dev && buildType === "serve";
603
604
  return [
604
605
  `var __BUNDLE_START_TIME__=globalThis.nativePerformanceNow?nativePerformanceNow():Date.now();`,
605
- `var __DEV__=${dev$1};`,
606
+ `var __DEV__=${dev};`,
606
607
  `var ${GLOBAL_IDENTIFIER}=typeof globalThis!=='undefined'?globalThis:typeof global !== 'undefined'?global:typeof window!=='undefined'?window:this;`,
607
- `var process=globalThis.process||{};process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"${dev$1 ? "development" : "production"}";`,
608
+ `var process=globalThis.process||{};process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"${dev ? "development" : "production"}";`,
608
609
  isDevServerMode ? `var $RefreshReg$ = () => {};` : null,
609
610
  isDevServerMode ? `var $RefreshSig$ = () => (v) => v;` : null
610
611
  ].filter(isNotNil);
@@ -890,25 +891,25 @@ var ClientLogReporter = class {
890
891
  }
891
892
  }
892
893
  };
893
- var ProgressFlags = /* @__PURE__ */ function(ProgressFlags$1) {
894
- ProgressFlags$1[ProgressFlags$1["NONE"] = 0] = "NONE";
895
- ProgressFlags$1[ProgressFlags$1["BUILD_IN_PROGRESS"] = 1] = "BUILD_IN_PROGRESS";
896
- ProgressFlags$1[ProgressFlags$1["FILE_CHANGED"] = 2] = "FILE_CHANGED";
897
- return ProgressFlags$1;
894
+ var ProgressFlags = /* @__PURE__ */ function(ProgressFlags) {
895
+ ProgressFlags[ProgressFlags["NONE"] = 0] = "NONE";
896
+ ProgressFlags[ProgressFlags["BUILD_IN_PROGRESS"] = 1] = "BUILD_IN_PROGRESS";
897
+ ProgressFlags[ProgressFlags["FILE_CHANGED"] = 2] = "FILE_CHANGED";
898
+ return ProgressFlags;
898
899
  }(ProgressFlags || {});
899
900
  var ProgressBarStatusReporter = class {
900
901
  renderManager = ProgressBarRenderManager.getInstance();
901
902
  progressBar;
902
903
  flags = ProgressFlags.NONE;
903
- constructor(id$1, label, initialTotalModules) {
904
- this.progressBar = this.renderManager.register(id$1, {
904
+ constructor(id, label, initialTotalModules) {
905
+ this.progressBar = this.renderManager.register(id, {
905
906
  label,
906
907
  total: initialTotalModules
907
908
  });
908
909
  }
909
- renderProgress(id$1, totalModules, transformedModules) {
910
+ renderProgress(id, totalModules, transformedModules) {
910
911
  if (totalModules != null) this.progressBar.setTotal(totalModules);
911
- this.progressBar.setCurrent(transformedModules).setModuleId(id$1);
912
+ this.progressBar.setCurrent(transformedModules).setModuleId(id);
912
913
  this.renderManager.render();
913
914
  }
914
915
  update(event) {
@@ -929,12 +930,12 @@ var ProgressBarStatusReporter = class {
929
930
  this.renderManager.release();
930
931
  break;
931
932
  case "transform":
932
- const { id: id$1, totalModules, transformedModules } = event;
933
+ const { id, totalModules, transformedModules } = event;
933
934
  if (this.flags & ProgressFlags.FILE_CHANGED) {
934
- logger$1.debug("Transformed changed file", { id: id$1 });
935
+ logger$1.debug("Transformed changed file", { id });
935
936
  return;
936
937
  }
937
- this.renderProgress(id$1, totalModules, transformedModules);
938
+ this.renderProgress(id, totalModules, transformedModules);
938
939
  break;
939
940
  case "watch_change":
940
941
  this.flags |= ProgressFlags.FILE_CHANGED;
@@ -991,9 +992,9 @@ function getDefaultConfig(projectRoot, mode) {
991
992
  },
992
993
  serializer: {
993
994
  prelude: [getInitializeCorePath(projectRoot)],
994
- polyfills: getPolyfillScriptPaths(reactNativePath).map((path$1) => ({
995
+ polyfills: getPolyfillScriptPaths(reactNativePath).map((path) => ({
995
996
  type: "iife",
996
- code: generateSourceFromAst(stripFlowSyntax(fs.readFileSync(path$1, "utf-8")), path$1).code
997
+ code: generateSourceFromAst(stripFlowSyntax(fs.readFileSync(path, "utf-8")), path).code
997
998
  }))
998
999
  },
999
1000
  watcher: {
@@ -1009,12 +1010,12 @@ function getDefaultConfig(projectRoot, mode) {
1009
1010
  globalIdentifiers: DEFAULT_REACT_NATIVE_GLOBAL_IDENTIFIERS
1010
1011
  },
1011
1012
  devMode: { hmr: true },
1013
+ reporter: new ClientLogReporter(),
1012
1014
  terminal: { status: (() => {
1013
1015
  if (isDebugEnabled()) return "compat";
1014
1016
  if (process.stderr.isTTY) return "progress";
1015
1017
  return "compat";
1016
1018
  })() },
1017
- reporter: new ClientLogReporter(),
1018
1019
  envDir: projectRoot,
1019
1020
  envPrefix: DEFAULT_ENV_PREFIX
1020
1021
  };
@@ -1098,19 +1099,19 @@ async function flattenPluginOption(pluginOption) {
1098
1099
  }
1099
1100
  async function resolvePluginConfig(baseConfig, plugins) {
1100
1101
  let mergedConfig = omit(baseConfig, ["plugins", "dangerously_overrideRolldownOptions"]);
1101
- for (const plugin$3 of plugins) {
1102
- const context = createPluginContext(plugin$3.name);
1103
- if (typeof plugin$3.config === "function") {
1104
- const config = await plugin$3.config.call(context, mergedConfig);
1102
+ for (const plugin of plugins) {
1103
+ const context = createPluginContext(plugin.name);
1104
+ if (typeof plugin.config === "function") {
1105
+ const config = await plugin.config.call(context, mergedConfig);
1105
1106
  if (config != null) mergedConfig = mergeConfig(mergedConfig, config);
1106
- } else if (typeof plugin$3.config === "object") mergedConfig = mergeConfig(mergedConfig, plugin$3.config);
1107
+ } else if (typeof plugin.config === "object") mergedConfig = mergeConfig(mergedConfig, plugin.config);
1107
1108
  }
1108
1109
  return mergedConfig;
1109
1110
  }
1110
1111
  async function invokeConfigResolved(config, plugins) {
1111
- await Promise.all(plugins.map((plugin$3) => {
1112
- const context = createPluginContext(plugin$3.name);
1113
- return plugin$3.configResolved?.call(context, config);
1112
+ await Promise.all(plugins.map((plugin) => {
1113
+ const context = createPluginContext(plugin.name);
1114
+ return plugin.configResolved?.call(context, config);
1114
1115
  }));
1115
1116
  }
1116
1117
 
@@ -1128,8 +1129,8 @@ var FileSystemCache = class FileSystemCache {
1128
1129
  force: true
1129
1130
  });
1130
1131
  }
1131
- constructor(projectRoot, id$1) {
1132
- this.cacheDirectory = path.join(FileSystemCache.getCacheDirectory(projectRoot), id$1);
1132
+ constructor(projectRoot, id) {
1133
+ this.cacheDirectory = path.join(FileSystemCache.getCacheDirectory(projectRoot), id);
1133
1134
  this.ensureCacheDirectory(this.cacheDirectory);
1134
1135
  logger$1.debug("cache directory:", this.cacheDirectory);
1135
1136
  }
@@ -1203,10 +1204,10 @@ function md5(data) {
1203
1204
  //#endregion
1204
1205
  //#region src/utils/serialize.ts
1205
1206
  function serialize(value) {
1206
- return JSON.stringify(value, (_, value$1) => {
1207
- if (typeof value$1 === "function") return value$1.toString();
1208
- if (value$1 instanceof RegExp) return value$1.toString();
1209
- return value$1;
1207
+ return JSON.stringify(value, (_, value) => {
1208
+ if (typeof value === "function") return value.toString();
1209
+ if (value instanceof RegExp) return value.toString();
1210
+ return value;
1210
1211
  });
1211
1212
  }
1212
1213
 
@@ -1230,7 +1231,7 @@ function filterTransformAffectedConfig(config) {
1230
1231
  serializer.prelude,
1231
1232
  reactNative.assetRegistryPath,
1232
1233
  devMode,
1233
- plugins.map((plugin$3, index) => `${plugin$3.name}#${index}`)
1234
+ plugins.map((plugin, index) => `${plugin.name}#${index}`)
1234
1235
  ];
1235
1236
  }
1236
1237
 
@@ -1262,8 +1263,8 @@ var FileStorage = class FileStorage {
1262
1263
 
1263
1264
  //#endregion
1264
1265
  //#region src/utils/string.ts
1265
- function indent(text, indent$1, space = " ") {
1266
- return text.replace(/^/gm, space.repeat(indent$1));
1266
+ function indent(text, indent, space = " ") {
1267
+ return text.replace(/^/gm, space.repeat(indent));
1267
1268
  }
1268
1269
 
1269
1270
  //#endregion
@@ -1274,13 +1275,13 @@ function asLiteral(value) {
1274
1275
  function asIdentifier(name) {
1275
1276
  return name;
1276
1277
  }
1277
- function nodeEnvironment(dev$1) {
1278
- return dev$1 ? "development" : "production";
1278
+ function nodeEnvironment(dev) {
1279
+ return dev ? "development" : "production";
1279
1280
  }
1280
- function iife(body, path$1 = "<unknown>") {
1281
+ function iife(body, path = "<unknown>") {
1281
1282
  const bodyPlaceholder = "__BODY__";
1282
1283
  return dedent`
1283
- // ${path$1}
1284
+ // ${path}
1284
1285
  (function (global) {
1285
1286
  ${bodyPlaceholder}
1286
1287
  })(${GLOBAL_IDENTIFIER});
@@ -1309,7 +1310,7 @@ function bindReporter(config, eventSource) {
1309
1310
  eventSource.emit("watchChange", event.id);
1310
1311
  break;
1311
1312
  }
1312
- originalReporter.update(event);
1313
+ originalReporter?.update(event);
1313
1314
  } };
1314
1315
  return config;
1315
1316
  }
@@ -1346,8 +1347,8 @@ function getBaseUrl(host, port, https) {
1346
1347
 
1347
1348
  //#endregion
1348
1349
  //#region src/utils/storage.ts
1349
- function getBuildTotalModules(storage, id$1) {
1350
- return storage.get().build[id$1]?.totalModules ?? 0;
1350
+ function getBuildTotalModules(storage, id) {
1351
+ return storage.get().build[id]?.totalModules ?? 0;
1351
1352
  }
1352
1353
 
1353
1354
  //#endregion
@@ -1379,30 +1380,6 @@ function loadEnv(options) {
1379
1380
  return env;
1380
1381
  }
1381
1382
 
1382
- //#endregion
1383
- //#region node_modules/mitt/dist/mitt.mjs
1384
- function mitt_default(n) {
1385
- return {
1386
- all: n = n || /* @__PURE__ */ new Map(),
1387
- on: function(t, e) {
1388
- var i = n.get(t);
1389
- i ? i.push(e) : n.set(t, [e]);
1390
- },
1391
- off: function(t, e) {
1392
- var i = n.get(t);
1393
- i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
1394
- },
1395
- emit: function(t, e) {
1396
- var i = n.get(t);
1397
- i && i.slice().map(function(n$1) {
1398
- n$1(e);
1399
- }), (i = n.get("*")) && i.slice().map(function(n$1) {
1400
- n$1(t, e);
1401
- });
1402
- }
1403
- };
1404
- }
1405
-
1406
1383
  //#endregion
1407
1384
  //#region src/server/logger.ts
1408
1385
  const logger = new Logger("dev-server");
@@ -1452,12 +1429,12 @@ async function assertDevServerStatus(options) {
1452
1429
  }
1453
1430
  if (shouldExit) process.exit(1);
1454
1431
  }
1455
- var DevServerStatus = /* @__PURE__ */ function(DevServerStatus$1) {
1456
- DevServerStatus$1[DevServerStatus$1["NOT_RUNNING"] = 0] = "NOT_RUNNING";
1457
- DevServerStatus$1[DevServerStatus$1["MATCHED_SERVER_RUNNING"] = 1] = "MATCHED_SERVER_RUNNING";
1458
- DevServerStatus$1[DevServerStatus$1["PORT_TAKEN"] = 2] = "PORT_TAKEN";
1459
- DevServerStatus$1[DevServerStatus$1["UNKNOWN"] = 3] = "UNKNOWN";
1460
- return DevServerStatus$1;
1432
+ var DevServerStatus = /* @__PURE__ */ function(DevServerStatus) {
1433
+ DevServerStatus[DevServerStatus["NOT_RUNNING"] = 0] = "NOT_RUNNING";
1434
+ DevServerStatus[DevServerStatus["MATCHED_SERVER_RUNNING"] = 1] = "MATCHED_SERVER_RUNNING";
1435
+ DevServerStatus[DevServerStatus["PORT_TAKEN"] = 2] = "PORT_TAKEN";
1436
+ DevServerStatus[DevServerStatus["UNKNOWN"] = 3] = "UNKNOWN";
1437
+ return DevServerStatus;
1461
1438
  }(DevServerStatus || {});
1462
1439
  async function getDevServerStatus(devServerUrl, projectRoot) {
1463
1440
  const { hostname, port } = new URL(devServerUrl);
@@ -1588,9 +1565,9 @@ var BundlerDevEngine = class extends EventEmitter {
1588
1565
  }
1589
1566
  get sourceMappingURL() {
1590
1567
  const { host, port } = this.options.server;
1591
- const { platform, dev: dev$1 } = this.buildOptions;
1568
+ const { platform, dev } = this.buildOptions;
1592
1569
  const [name] = this.config.entry.split(".");
1593
- return `http://${host}:${port}/${name}.bundle.map?platform=${platform}&dev=${dev$1}`;
1570
+ return `http://${host}:${port}/${name}.bundle.map?platform=${platform}&dev=${dev}`;
1594
1571
  }
1595
1572
  async initialize() {
1596
1573
  if (this._state !== "idle" || this._devEngine != null) return this;
@@ -1671,10 +1648,10 @@ var BundlerPool = class BundlerPool {
1671
1648
  bundleName,
1672
1649
  key
1673
1650
  });
1674
- const instance$1 = new BundlerDevEngine({ server: this.resolvedServerOptions }, this.config, buildOptions);
1651
+ const instance = new BundlerDevEngine({ server: this.resolvedServerOptions }, this.config, buildOptions);
1675
1652
  logger.debug("Setting new bundler instance", { key });
1676
- BundlerPool.instances.set(key, instance$1);
1677
- return instance$1;
1653
+ BundlerPool.instances.set(key, instance);
1654
+ return instance;
1678
1655
  }
1679
1656
  }
1680
1657
  };
@@ -1724,9 +1701,9 @@ const plugin$2 = fp((fastify, options) => {
1724
1701
  fastify.get(`/${DEV_SERVER_ASSET_PATH}/*`, {
1725
1702
  schema: { querystring: queryParamSchema },
1726
1703
  async handler(request, reply) {
1727
- const { url: url$1, query } = request;
1728
- const { pathname } = new URL(url$1, baseUrl);
1729
- const assetPath = resolveAsset(pathname.replace(/* @__PURE__ */ new RegExp(`^/${DEV_SERVER_ASSET_PATH}/?`), ""));
1704
+ const { url, query } = request;
1705
+ const { pathname } = new URL(url, baseUrl);
1706
+ const assetPath = resolveAsset(pathname.replace(new RegExp(`^/${DEV_SERVER_ASSET_PATH}/?`), ""));
1730
1707
  let handle = null;
1731
1708
  try {
1732
1709
  handle = await fs.promises.open(resolveAssetPath(assetPath, {
@@ -1921,1394 +1898,30 @@ const plugin$1 = fp((fastify, options) => {
1921
1898
  }, { name: "serve-bundle" });
1922
1899
 
1923
1900
  //#endregion
1924
- //#region node_modules/picocolors/picocolors.js
1925
- var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1926
- let p = process || {}, argv = p.argv || [], env = p.env || {};
1927
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
1928
- let formatter = (open, close, replace = open) => (input) => {
1929
- let string = "" + input, index = string.indexOf(close, open.length);
1930
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
1931
- };
1932
- let replaceClose = (string, close, replace, index) => {
1933
- let result = "", cursor = 0;
1934
- do {
1935
- result += string.substring(cursor, index) + replace;
1936
- cursor = index + close.length;
1937
- index = string.indexOf(close, cursor);
1938
- } while (~index);
1939
- return result + string.substring(cursor);
1940
- };
1941
- let createColors = (enabled = isColorSupported) => {
1942
- let f = enabled ? formatter : () => String;
1901
+ //#region src/utils/url.ts
1902
+ function parseUrl(value) {
1903
+ if (value.startsWith("/")) {
1904
+ const [pathname, query] = value.split("?");
1943
1905
  return {
1944
- isColorSupported: enabled,
1945
- reset: f("\x1B[0m", "\x1B[0m"),
1946
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
1947
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
1948
- italic: f("\x1B[3m", "\x1B[23m"),
1949
- underline: f("\x1B[4m", "\x1B[24m"),
1950
- inverse: f("\x1B[7m", "\x1B[27m"),
1951
- hidden: f("\x1B[8m", "\x1B[28m"),
1952
- strikethrough: f("\x1B[9m", "\x1B[29m"),
1953
- black: f("\x1B[30m", "\x1B[39m"),
1954
- red: f("\x1B[31m", "\x1B[39m"),
1955
- green: f("\x1B[32m", "\x1B[39m"),
1956
- yellow: f("\x1B[33m", "\x1B[39m"),
1957
- blue: f("\x1B[34m", "\x1B[39m"),
1958
- magenta: f("\x1B[35m", "\x1B[39m"),
1959
- cyan: f("\x1B[36m", "\x1B[39m"),
1960
- white: f("\x1B[37m", "\x1B[39m"),
1961
- gray: f("\x1B[90m", "\x1B[39m"),
1962
- bgBlack: f("\x1B[40m", "\x1B[49m"),
1963
- bgRed: f("\x1B[41m", "\x1B[49m"),
1964
- bgGreen: f("\x1B[42m", "\x1B[49m"),
1965
- bgYellow: f("\x1B[43m", "\x1B[49m"),
1966
- bgBlue: f("\x1B[44m", "\x1B[49m"),
1967
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
1968
- bgCyan: f("\x1B[46m", "\x1B[49m"),
1969
- bgWhite: f("\x1B[47m", "\x1B[49m"),
1970
- blackBright: f("\x1B[90m", "\x1B[39m"),
1971
- redBright: f("\x1B[91m", "\x1B[39m"),
1972
- greenBright: f("\x1B[92m", "\x1B[39m"),
1973
- yellowBright: f("\x1B[93m", "\x1B[39m"),
1974
- blueBright: f("\x1B[94m", "\x1B[39m"),
1975
- magentaBright: f("\x1B[95m", "\x1B[39m"),
1976
- cyanBright: f("\x1B[96m", "\x1B[39m"),
1977
- whiteBright: f("\x1B[97m", "\x1B[39m"),
1978
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
1979
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
1980
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
1981
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
1982
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
1983
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
1984
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
1985
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
1906
+ pathname,
1907
+ query: query ? toQueryObject(new URLSearchParams(query)) : {}
1986
1908
  };
1987
- };
1988
- module.exports = createColors();
1989
- module.exports.createColors = createColors;
1990
- }));
1991
-
1992
- //#endregion
1993
- //#region node_modules/js-tokens/index.js
1994
- var require_js_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
1995
- Object.defineProperty(exports, "__esModule", { value: true });
1996
- exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
1997
- exports.matchToToken = function(match) {
1998
- var token = {
1999
- type: "invalid",
2000
- value: match[0],
2001
- closed: void 0
2002
- };
2003
- if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);
2004
- else if (match[5]) token.type = "comment";
2005
- else if (match[6]) token.type = "comment", token.closed = !!match[7];
2006
- else if (match[8]) token.type = "regex";
2007
- else if (match[9]) token.type = "number";
2008
- else if (match[10]) token.type = "name";
2009
- else if (match[11]) token.type = "punctuator";
2010
- else if (match[12]) token.type = "whitespace";
2011
- return token;
2012
- };
2013
- }));
2014
-
2015
- //#endregion
2016
- //#region node_modules/@babel/helper-validator-identifier/lib/identifier.js
2017
- var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
2018
- Object.defineProperty(exports, "__esModule", { value: true });
2019
- exports.isIdentifierChar = isIdentifierChar;
2020
- exports.isIdentifierName = isIdentifierName;
2021
- exports.isIdentifierStart = isIdentifierStart;
2022
- let nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
2023
- let nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
2024
- const nonASCIIidentifierStart = /* @__PURE__ */ new RegExp("[" + nonASCIIidentifierStartChars + "]");
2025
- const nonASCIIidentifier = /* @__PURE__ */ new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
2026
- nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
2027
- const astralIdentifierStartCodes = [
2028
- 0,
2029
- 11,
2030
- 2,
2031
- 25,
2032
- 2,
2033
- 18,
2034
- 2,
2035
- 1,
2036
- 2,
2037
- 14,
2038
- 3,
2039
- 13,
2040
- 35,
2041
- 122,
2042
- 70,
2043
- 52,
2044
- 268,
2045
- 28,
2046
- 4,
2047
- 48,
2048
- 48,
2049
- 31,
2050
- 14,
2051
- 29,
2052
- 6,
2053
- 37,
2054
- 11,
2055
- 29,
2056
- 3,
2057
- 35,
2058
- 5,
2059
- 7,
2060
- 2,
2061
- 4,
2062
- 43,
2063
- 157,
2064
- 19,
2065
- 35,
2066
- 5,
2067
- 35,
2068
- 5,
2069
- 39,
2070
- 9,
2071
- 51,
2072
- 13,
2073
- 10,
2074
- 2,
2075
- 14,
2076
- 2,
2077
- 6,
2078
- 2,
2079
- 1,
2080
- 2,
2081
- 10,
2082
- 2,
2083
- 14,
2084
- 2,
2085
- 6,
2086
- 2,
2087
- 1,
2088
- 4,
2089
- 51,
2090
- 13,
2091
- 310,
2092
- 10,
2093
- 21,
2094
- 11,
2095
- 7,
2096
- 25,
2097
- 5,
2098
- 2,
2099
- 41,
2100
- 2,
2101
- 8,
2102
- 70,
2103
- 5,
2104
- 3,
2105
- 0,
2106
- 2,
2107
- 43,
2108
- 2,
2109
- 1,
2110
- 4,
2111
- 0,
2112
- 3,
2113
- 22,
2114
- 11,
2115
- 22,
2116
- 10,
2117
- 30,
2118
- 66,
2119
- 18,
2120
- 2,
2121
- 1,
2122
- 11,
2123
- 21,
2124
- 11,
2125
- 25,
2126
- 7,
2127
- 25,
2128
- 39,
2129
- 55,
2130
- 7,
2131
- 1,
2132
- 65,
2133
- 0,
2134
- 16,
2135
- 3,
2136
- 2,
2137
- 2,
2138
- 2,
2139
- 28,
2140
- 43,
2141
- 28,
2142
- 4,
2143
- 28,
2144
- 36,
2145
- 7,
2146
- 2,
2147
- 27,
2148
- 28,
2149
- 53,
2150
- 11,
2151
- 21,
2152
- 11,
2153
- 18,
2154
- 14,
2155
- 17,
2156
- 111,
2157
- 72,
2158
- 56,
2159
- 50,
2160
- 14,
2161
- 50,
2162
- 14,
2163
- 35,
2164
- 39,
2165
- 27,
2166
- 10,
2167
- 22,
2168
- 251,
2169
- 41,
2170
- 7,
2171
- 1,
2172
- 17,
2173
- 5,
2174
- 57,
2175
- 28,
2176
- 11,
2177
- 0,
2178
- 9,
2179
- 21,
2180
- 43,
2181
- 17,
2182
- 47,
2183
- 20,
2184
- 28,
2185
- 22,
2186
- 13,
2187
- 52,
2188
- 58,
2189
- 1,
2190
- 3,
2191
- 0,
2192
- 14,
2193
- 44,
2194
- 33,
2195
- 24,
2196
- 27,
2197
- 35,
2198
- 30,
2199
- 0,
2200
- 3,
2201
- 0,
2202
- 9,
2203
- 34,
2204
- 4,
2205
- 0,
2206
- 13,
2207
- 47,
2208
- 15,
2209
- 3,
2210
- 22,
2211
- 0,
2212
- 2,
2213
- 0,
2214
- 36,
2215
- 17,
2216
- 2,
2217
- 24,
2218
- 20,
2219
- 1,
2220
- 64,
2221
- 6,
2222
- 2,
2223
- 0,
2224
- 2,
2225
- 3,
2226
- 2,
2227
- 14,
2228
- 2,
2229
- 9,
2230
- 8,
2231
- 46,
2232
- 39,
2233
- 7,
2234
- 3,
2235
- 1,
2236
- 3,
2237
- 21,
2238
- 2,
2239
- 6,
2240
- 2,
2241
- 1,
2242
- 2,
2243
- 4,
2244
- 4,
2245
- 0,
2246
- 19,
2247
- 0,
2248
- 13,
2249
- 4,
2250
- 31,
2251
- 9,
2252
- 2,
2253
- 0,
2254
- 3,
2255
- 0,
2256
- 2,
2257
- 37,
2258
- 2,
2259
- 0,
2260
- 26,
2261
- 0,
2262
- 2,
2263
- 0,
2264
- 45,
2265
- 52,
2266
- 19,
2267
- 3,
2268
- 21,
2269
- 2,
2270
- 31,
2271
- 47,
2272
- 21,
2273
- 1,
2274
- 2,
2275
- 0,
2276
- 185,
2277
- 46,
2278
- 42,
2279
- 3,
2280
- 37,
2281
- 47,
2282
- 21,
2283
- 0,
2284
- 60,
2285
- 42,
2286
- 14,
2287
- 0,
2288
- 72,
2289
- 26,
2290
- 38,
2291
- 6,
2292
- 186,
2293
- 43,
2294
- 117,
2295
- 63,
2296
- 32,
2297
- 7,
2298
- 3,
2299
- 0,
2300
- 3,
2301
- 7,
2302
- 2,
2303
- 1,
2304
- 2,
2305
- 23,
2306
- 16,
2307
- 0,
2308
- 2,
2309
- 0,
2310
- 95,
2311
- 7,
2312
- 3,
2313
- 38,
2314
- 17,
2315
- 0,
2316
- 2,
2317
- 0,
2318
- 29,
2319
- 0,
2320
- 11,
2321
- 39,
2322
- 8,
2323
- 0,
2324
- 22,
2325
- 0,
2326
- 12,
2327
- 45,
2328
- 20,
2329
- 0,
2330
- 19,
2331
- 72,
2332
- 200,
2333
- 32,
2334
- 32,
2335
- 8,
2336
- 2,
2337
- 36,
2338
- 18,
2339
- 0,
2340
- 50,
2341
- 29,
2342
- 113,
2343
- 6,
2344
- 2,
2345
- 1,
2346
- 2,
2347
- 37,
2348
- 22,
2349
- 0,
2350
- 26,
2351
- 5,
2352
- 2,
2353
- 1,
2354
- 2,
2355
- 31,
2356
- 15,
2357
- 0,
2358
- 24,
2359
- 43,
2360
- 261,
2361
- 18,
2362
- 16,
2363
- 0,
2364
- 2,
2365
- 12,
2366
- 2,
2367
- 33,
2368
- 125,
2369
- 0,
2370
- 80,
2371
- 921,
2372
- 103,
2373
- 110,
2374
- 18,
2375
- 195,
2376
- 2637,
2377
- 96,
2378
- 16,
2379
- 1071,
2380
- 18,
2381
- 5,
2382
- 26,
2383
- 3994,
2384
- 6,
2385
- 582,
2386
- 6842,
2387
- 29,
2388
- 1763,
2389
- 568,
2390
- 8,
2391
- 30,
2392
- 18,
2393
- 78,
2394
- 18,
2395
- 29,
2396
- 19,
2397
- 47,
2398
- 17,
2399
- 3,
2400
- 32,
2401
- 20,
2402
- 6,
2403
- 18,
2404
- 433,
2405
- 44,
2406
- 212,
2407
- 63,
2408
- 33,
2409
- 24,
2410
- 3,
2411
- 24,
2412
- 45,
2413
- 74,
2414
- 6,
2415
- 0,
2416
- 67,
2417
- 12,
2418
- 65,
2419
- 1,
2420
- 2,
2421
- 0,
2422
- 15,
2423
- 4,
2424
- 10,
2425
- 7381,
2426
- 42,
2427
- 31,
2428
- 98,
2429
- 114,
2430
- 8702,
2431
- 3,
2432
- 2,
2433
- 6,
2434
- 2,
2435
- 1,
2436
- 2,
2437
- 290,
2438
- 16,
2439
- 0,
2440
- 30,
2441
- 2,
2442
- 3,
2443
- 0,
2444
- 15,
2445
- 3,
2446
- 9,
2447
- 395,
2448
- 2309,
2449
- 106,
2450
- 6,
2451
- 12,
2452
- 4,
2453
- 8,
2454
- 8,
2455
- 9,
2456
- 5991,
2457
- 84,
2458
- 2,
2459
- 70,
2460
- 2,
2461
- 1,
2462
- 3,
2463
- 0,
2464
- 3,
2465
- 1,
2466
- 3,
2467
- 3,
2468
- 2,
2469
- 11,
2470
- 2,
2471
- 0,
2472
- 2,
2473
- 6,
2474
- 2,
2475
- 64,
2476
- 2,
2477
- 3,
2478
- 3,
2479
- 7,
2480
- 2,
2481
- 6,
2482
- 2,
2483
- 27,
2484
- 2,
2485
- 3,
2486
- 2,
2487
- 4,
2488
- 2,
2489
- 0,
2490
- 4,
2491
- 6,
2492
- 2,
2493
- 339,
2494
- 3,
2495
- 24,
2496
- 2,
2497
- 24,
2498
- 2,
2499
- 30,
2500
- 2,
2501
- 24,
2502
- 2,
2503
- 30,
2504
- 2,
2505
- 24,
2506
- 2,
2507
- 30,
2508
- 2,
2509
- 24,
2510
- 2,
2511
- 30,
2512
- 2,
2513
- 24,
2514
- 2,
2515
- 7,
2516
- 1845,
2517
- 30,
2518
- 7,
2519
- 5,
2520
- 262,
2521
- 61,
2522
- 147,
2523
- 44,
2524
- 11,
2525
- 6,
2526
- 17,
2527
- 0,
2528
- 322,
2529
- 29,
2530
- 19,
2531
- 43,
2532
- 485,
2533
- 27,
2534
- 229,
2535
- 29,
2536
- 3,
2537
- 0,
2538
- 208,
2539
- 30,
2540
- 2,
2541
- 2,
2542
- 2,
2543
- 1,
2544
- 2,
2545
- 6,
2546
- 3,
2547
- 4,
2548
- 10,
2549
- 1,
2550
- 225,
2551
- 6,
2552
- 2,
2553
- 3,
2554
- 2,
2555
- 1,
2556
- 2,
2557
- 14,
2558
- 2,
2559
- 196,
2560
- 60,
2561
- 67,
2562
- 8,
2563
- 0,
2564
- 1205,
2565
- 3,
2566
- 2,
2567
- 26,
2568
- 2,
2569
- 1,
2570
- 2,
2571
- 0,
2572
- 3,
2573
- 0,
2574
- 2,
2575
- 9,
2576
- 2,
2577
- 3,
2578
- 2,
2579
- 0,
2580
- 2,
2581
- 0,
2582
- 7,
2583
- 0,
2584
- 5,
2585
- 0,
2586
- 2,
2587
- 0,
2588
- 2,
2589
- 0,
2590
- 2,
2591
- 2,
2592
- 2,
2593
- 1,
2594
- 2,
2595
- 0,
2596
- 3,
2597
- 0,
2598
- 2,
2599
- 0,
2600
- 2,
2601
- 0,
2602
- 2,
2603
- 0,
2604
- 2,
2605
- 0,
2606
- 2,
2607
- 1,
2608
- 2,
2609
- 0,
2610
- 3,
2611
- 3,
2612
- 2,
2613
- 6,
2614
- 2,
2615
- 3,
2616
- 2,
2617
- 3,
2618
- 2,
2619
- 0,
2620
- 2,
2621
- 9,
2622
- 2,
2623
- 16,
2624
- 6,
2625
- 2,
2626
- 2,
2627
- 4,
2628
- 2,
2629
- 16,
2630
- 4421,
2631
- 42719,
2632
- 33,
2633
- 4381,
2634
- 3,
2635
- 5773,
2636
- 3,
2637
- 7472,
2638
- 16,
2639
- 621,
2640
- 2467,
2641
- 541,
2642
- 1507,
2643
- 4938,
2644
- 6,
2645
- 8489
2646
- ];
2647
- const astralIdentifierCodes = [
2648
- 509,
2649
- 0,
2650
- 227,
2651
- 0,
2652
- 150,
2653
- 4,
2654
- 294,
2655
- 9,
2656
- 1368,
2657
- 2,
2658
- 2,
2659
- 1,
2660
- 6,
2661
- 3,
2662
- 41,
2663
- 2,
2664
- 5,
2665
- 0,
2666
- 166,
2667
- 1,
2668
- 574,
2669
- 3,
2670
- 9,
2671
- 9,
2672
- 7,
2673
- 9,
2674
- 32,
2675
- 4,
2676
- 318,
2677
- 1,
2678
- 78,
2679
- 5,
2680
- 71,
2681
- 10,
2682
- 50,
2683
- 3,
2684
- 123,
2685
- 2,
2686
- 54,
2687
- 14,
2688
- 32,
2689
- 10,
2690
- 3,
2691
- 1,
2692
- 11,
2693
- 3,
2694
- 46,
2695
- 10,
2696
- 8,
2697
- 0,
2698
- 46,
2699
- 9,
2700
- 7,
2701
- 2,
2702
- 37,
2703
- 13,
2704
- 2,
2705
- 9,
2706
- 6,
2707
- 1,
2708
- 45,
2709
- 0,
2710
- 13,
2711
- 2,
2712
- 49,
2713
- 13,
2714
- 9,
2715
- 3,
2716
- 2,
2717
- 11,
2718
- 83,
2719
- 11,
2720
- 7,
2721
- 0,
2722
- 3,
2723
- 0,
2724
- 158,
2725
- 11,
2726
- 6,
2727
- 9,
2728
- 7,
2729
- 3,
2730
- 56,
2731
- 1,
2732
- 2,
2733
- 6,
2734
- 3,
2735
- 1,
2736
- 3,
2737
- 2,
2738
- 10,
2739
- 0,
2740
- 11,
2741
- 1,
2742
- 3,
2743
- 6,
2744
- 4,
2745
- 4,
2746
- 68,
2747
- 8,
2748
- 2,
2749
- 0,
2750
- 3,
2751
- 0,
2752
- 2,
2753
- 3,
2754
- 2,
2755
- 4,
2756
- 2,
2757
- 0,
2758
- 15,
2759
- 1,
2760
- 83,
2761
- 17,
2762
- 10,
2763
- 9,
2764
- 5,
2765
- 0,
2766
- 82,
2767
- 19,
2768
- 13,
2769
- 9,
2770
- 214,
2771
- 6,
2772
- 3,
2773
- 8,
2774
- 28,
2775
- 1,
2776
- 83,
2777
- 16,
2778
- 16,
2779
- 9,
2780
- 82,
2781
- 12,
2782
- 9,
2783
- 9,
2784
- 7,
2785
- 19,
2786
- 58,
2787
- 14,
2788
- 5,
2789
- 9,
2790
- 243,
2791
- 14,
2792
- 166,
2793
- 9,
2794
- 71,
2795
- 5,
2796
- 2,
2797
- 1,
2798
- 3,
2799
- 3,
2800
- 2,
2801
- 0,
2802
- 2,
2803
- 1,
2804
- 13,
2805
- 9,
2806
- 120,
2807
- 6,
2808
- 3,
2809
- 6,
2810
- 4,
2811
- 0,
2812
- 29,
2813
- 9,
2814
- 41,
2815
- 6,
2816
- 2,
2817
- 3,
2818
- 9,
2819
- 0,
2820
- 10,
2821
- 10,
2822
- 47,
2823
- 15,
2824
- 199,
2825
- 7,
2826
- 137,
2827
- 9,
2828
- 54,
2829
- 7,
2830
- 2,
2831
- 7,
2832
- 17,
2833
- 9,
2834
- 57,
2835
- 21,
2836
- 2,
2837
- 13,
2838
- 123,
2839
- 5,
2840
- 4,
2841
- 0,
2842
- 2,
2843
- 1,
2844
- 2,
2845
- 6,
2846
- 2,
2847
- 0,
2848
- 9,
2849
- 9,
2850
- 49,
2851
- 4,
2852
- 2,
2853
- 1,
2854
- 2,
2855
- 4,
2856
- 9,
2857
- 9,
2858
- 55,
2859
- 9,
2860
- 266,
2861
- 3,
2862
- 10,
2863
- 1,
2864
- 2,
2865
- 0,
2866
- 49,
2867
- 6,
2868
- 4,
2869
- 4,
2870
- 14,
2871
- 10,
2872
- 5350,
2873
- 0,
2874
- 7,
2875
- 14,
2876
- 11465,
2877
- 27,
2878
- 2343,
2879
- 9,
2880
- 87,
2881
- 9,
2882
- 39,
2883
- 4,
2884
- 60,
2885
- 6,
2886
- 26,
2887
- 9,
2888
- 535,
2889
- 9,
2890
- 470,
2891
- 0,
2892
- 2,
2893
- 54,
2894
- 8,
2895
- 3,
2896
- 82,
2897
- 0,
2898
- 12,
2899
- 1,
2900
- 19628,
2901
- 1,
2902
- 4178,
2903
- 9,
2904
- 519,
2905
- 45,
2906
- 3,
2907
- 22,
2908
- 543,
2909
- 4,
2910
- 4,
2911
- 5,
2912
- 9,
2913
- 7,
2914
- 3,
2915
- 6,
2916
- 31,
2917
- 3,
2918
- 149,
2919
- 2,
2920
- 1418,
2921
- 49,
2922
- 513,
2923
- 54,
2924
- 5,
2925
- 49,
2926
- 9,
2927
- 0,
2928
- 15,
2929
- 0,
2930
- 23,
2931
- 4,
2932
- 2,
2933
- 14,
2934
- 1361,
2935
- 6,
2936
- 2,
2937
- 16,
2938
- 3,
2939
- 6,
2940
- 2,
2941
- 1,
2942
- 2,
2943
- 4,
2944
- 101,
2945
- 0,
2946
- 161,
2947
- 6,
2948
- 10,
2949
- 9,
2950
- 357,
2951
- 0,
2952
- 62,
2953
- 13,
2954
- 499,
2955
- 13,
2956
- 245,
2957
- 1,
2958
- 2,
2959
- 9,
2960
- 233,
2961
- 0,
2962
- 3,
2963
- 0,
2964
- 8,
2965
- 1,
2966
- 6,
2967
- 0,
2968
- 475,
2969
- 6,
2970
- 110,
2971
- 6,
2972
- 6,
2973
- 9,
2974
- 4759,
2975
- 9,
2976
- 787719,
2977
- 239
2978
- ];
2979
- function isInAstralSet(code, set) {
2980
- let pos = 65536;
2981
- for (let i = 0, length = set.length; i < length; i += 2) {
2982
- pos += set[i];
2983
- if (pos > code) return false;
2984
- pos += set[i + 1];
2985
- if (pos >= code) return true;
2986
- }
2987
- return false;
2988
- }
2989
- function isIdentifierStart(code) {
2990
- if (code < 65) return code === 36;
2991
- if (code <= 90) return true;
2992
- if (code < 97) return code === 95;
2993
- if (code <= 122) return true;
2994
- if (code <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
2995
- return isInAstralSet(code, astralIdentifierStartCodes);
2996
- }
2997
- function isIdentifierChar(code) {
2998
- if (code < 48) return code === 36;
2999
- if (code < 58) return true;
3000
- if (code < 65) return false;
3001
- if (code <= 90) return true;
3002
- if (code < 97) return code === 95;
3003
- if (code <= 122) return true;
3004
- if (code <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
3005
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
3006
- }
3007
- function isIdentifierName(name) {
3008
- let isFirst = true;
3009
- for (let i = 0; i < name.length; i++) {
3010
- let cp = name.charCodeAt(i);
3011
- if ((cp & 64512) === 55296 && i + 1 < name.length) {
3012
- const trail = name.charCodeAt(++i);
3013
- if ((trail & 64512) === 56320) cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
3014
- }
3015
- if (isFirst) {
3016
- isFirst = false;
3017
- if (!isIdentifierStart(cp)) return false;
3018
- } else if (!isIdentifierChar(cp)) return false;
3019
- }
3020
- return !isFirst;
3021
1909
  }
3022
- }));
3023
-
3024
- //#endregion
3025
- //#region node_modules/@babel/helper-validator-identifier/lib/keyword.js
3026
- var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
3027
- Object.defineProperty(exports, "__esModule", { value: true });
3028
- exports.isKeyword = isKeyword;
3029
- exports.isReservedWord = isReservedWord;
3030
- exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
3031
- exports.isStrictBindReservedWord = isStrictBindReservedWord;
3032
- exports.isStrictReservedWord = isStrictReservedWord;
3033
- const reservedWords = {
3034
- keyword: [
3035
- "break",
3036
- "case",
3037
- "catch",
3038
- "continue",
3039
- "debugger",
3040
- "default",
3041
- "do",
3042
- "else",
3043
- "finally",
3044
- "for",
3045
- "function",
3046
- "if",
3047
- "return",
3048
- "switch",
3049
- "throw",
3050
- "try",
3051
- "var",
3052
- "const",
3053
- "while",
3054
- "with",
3055
- "new",
3056
- "this",
3057
- "super",
3058
- "class",
3059
- "extends",
3060
- "export",
3061
- "import",
3062
- "null",
3063
- "true",
3064
- "false",
3065
- "in",
3066
- "instanceof",
3067
- "typeof",
3068
- "void",
3069
- "delete"
3070
- ],
3071
- strict: [
3072
- "implements",
3073
- "interface",
3074
- "let",
3075
- "package",
3076
- "private",
3077
- "protected",
3078
- "public",
3079
- "static",
3080
- "yield"
3081
- ],
3082
- strictBind: ["eval", "arguments"]
1910
+ const url = new URL(value);
1911
+ return {
1912
+ pathname: url.pathname,
1913
+ query: toQueryObject(url.searchParams)
3083
1914
  };
3084
- const keywords = new Set(reservedWords.keyword);
3085
- const reservedWordsStrictSet = new Set(reservedWords.strict);
3086
- const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
3087
- function isReservedWord(word, inModule) {
3088
- return inModule && word === "await" || word === "enum";
3089
- }
3090
- function isStrictReservedWord(word, inModule) {
3091
- return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
3092
- }
3093
- function isStrictBindOnlyReservedWord(word) {
3094
- return reservedWordsStrictBindSet.has(word);
3095
- }
3096
- function isStrictBindReservedWord(word, inModule) {
3097
- return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
3098
- }
3099
- function isKeyword(word) {
3100
- return keywords.has(word);
3101
- }
3102
- }));
3103
-
3104
- //#endregion
3105
- //#region node_modules/@babel/helper-validator-identifier/lib/index.js
3106
- var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3107
- Object.defineProperty(exports, "__esModule", { value: true });
3108
- Object.defineProperty(exports, "isIdentifierChar", {
3109
- enumerable: true,
3110
- get: function() {
3111
- return _identifier.isIdentifierChar;
3112
- }
3113
- });
3114
- Object.defineProperty(exports, "isIdentifierName", {
3115
- enumerable: true,
3116
- get: function() {
3117
- return _identifier.isIdentifierName;
3118
- }
3119
- });
3120
- Object.defineProperty(exports, "isIdentifierStart", {
3121
- enumerable: true,
3122
- get: function() {
3123
- return _identifier.isIdentifierStart;
3124
- }
3125
- });
3126
- Object.defineProperty(exports, "isKeyword", {
3127
- enumerable: true,
3128
- get: function() {
3129
- return _keyword.isKeyword;
3130
- }
3131
- });
3132
- Object.defineProperty(exports, "isReservedWord", {
3133
- enumerable: true,
3134
- get: function() {
3135
- return _keyword.isReservedWord;
3136
- }
3137
- });
3138
- Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
3139
- enumerable: true,
3140
- get: function() {
3141
- return _keyword.isStrictBindOnlyReservedWord;
3142
- }
3143
- });
3144
- Object.defineProperty(exports, "isStrictBindReservedWord", {
3145
- enumerable: true,
3146
- get: function() {
3147
- return _keyword.isStrictBindReservedWord;
3148
- }
3149
- });
3150
- Object.defineProperty(exports, "isStrictReservedWord", {
3151
- enumerable: true,
3152
- get: function() {
3153
- return _keyword.isStrictReservedWord;
3154
- }
3155
- });
3156
- var _identifier = require_identifier();
3157
- var _keyword = require_keyword();
3158
- }));
3159
-
3160
- //#endregion
3161
- //#region node_modules/@babel/code-frame/lib/index.js
3162
- var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
3163
- Object.defineProperty(exports, "__esModule", { value: true });
3164
- var picocolors = require_picocolors();
3165
- var jsTokens = require_js_tokens();
3166
- var helperValidatorIdentifier = require_lib$1();
3167
- function isColorSupported() {
3168
- return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported;
3169
- }
3170
- const compose = (f, g) => (v) => f(g(v));
3171
- function buildDefs(colors) {
3172
- return {
3173
- keyword: colors.cyan,
3174
- capitalized: colors.yellow,
3175
- jsxIdentifier: colors.yellow,
3176
- punctuator: colors.yellow,
3177
- number: colors.magenta,
3178
- string: colors.green,
3179
- regex: colors.magenta,
3180
- comment: colors.gray,
3181
- invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
3182
- gutter: colors.gray,
3183
- marker: compose(colors.red, colors.bold),
3184
- message: compose(colors.red, colors.bold),
3185
- reset: colors.reset
3186
- };
3187
- }
3188
- const defsOn = buildDefs(picocolors.createColors(true));
3189
- const defsOff = buildDefs(picocolors.createColors(false));
3190
- function getDefs(enabled) {
3191
- return enabled ? defsOn : defsOff;
3192
- }
3193
- const sometimesKeywords = new Set([
3194
- "as",
3195
- "async",
3196
- "from",
3197
- "get",
3198
- "of",
3199
- "set"
3200
- ]);
3201
- const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
3202
- const BRACKET = /^[()[\]{}]$/;
3203
- let tokenize;
3204
- {
3205
- const JSX_TAG = /^[a-z][\w-]*$/i;
3206
- const getTokenType = function(token, offset, text) {
3207
- if (token.type === "name") {
3208
- if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) return "keyword";
3209
- if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) return "jsxIdentifier";
3210
- if (token.value[0] !== token.value[0].toLowerCase()) return "capitalized";
3211
- }
3212
- if (token.type === "punctuator" && BRACKET.test(token.value)) return "bracket";
3213
- if (token.type === "invalid" && (token.value === "@" || token.value === "#")) return "punctuator";
3214
- return token.type;
3215
- };
3216
- tokenize = function* (text) {
3217
- let match;
3218
- while (match = jsTokens.default.exec(text)) {
3219
- const token = jsTokens.matchToToken(match);
3220
- yield {
3221
- type: getTokenType(token, match.index, text),
3222
- value: token.value
3223
- };
3224
- }
3225
- };
3226
- }
3227
- function highlight(text) {
3228
- if (text === "") return "";
3229
- const defs = getDefs(true);
3230
- let highlighted = "";
3231
- for (const { type, value } of tokenize(text)) if (type in defs) highlighted += value.split(NEWLINE$1).map((str) => defs[type](str)).join("\n");
3232
- else highlighted += value;
3233
- return highlighted;
3234
- }
3235
- const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
3236
- function getMarkerLines(loc, source, opts) {
3237
- const startLoc = Object.assign({
3238
- column: 0,
3239
- line: -1
3240
- }, loc.start);
3241
- const endLoc = Object.assign({}, startLoc, loc.end);
3242
- const { linesAbove = 2, linesBelow = 3 } = opts || {};
3243
- const startLine = startLoc.line;
3244
- const startColumn = startLoc.column;
3245
- const endLine = endLoc.line;
3246
- const endColumn = endLoc.column;
3247
- let start = Math.max(startLine - (linesAbove + 1), 0);
3248
- let end = Math.min(source.length, endLine + linesBelow);
3249
- if (startLine === -1) start = 0;
3250
- if (endLine === -1) end = source.length;
3251
- const lineDiff = endLine - startLine;
3252
- const markerLines = {};
3253
- if (lineDiff) for (let i = 0; i <= lineDiff; i++) {
3254
- const lineNumber = i + startLine;
3255
- if (!startColumn) markerLines[lineNumber] = true;
3256
- else if (i === 0) markerLines[lineNumber] = [startColumn, source[lineNumber - 1].length - startColumn + 1];
3257
- else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
3258
- else markerLines[lineNumber] = [0, source[lineNumber - i].length];
3259
- }
3260
- else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0];
3261
- else markerLines[startLine] = true;
3262
- else markerLines[startLine] = [startColumn, endColumn - startColumn];
3263
- return {
3264
- start,
3265
- end,
3266
- markerLines
3267
- };
3268
- }
3269
- function codeFrameColumns(rawLines, loc, opts = {}) {
3270
- const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
3271
- const defs = getDefs(shouldHighlight);
3272
- const { start, end, markerLines } = getMarkerLines(loc, rawLines.split(NEWLINE), opts);
3273
- const hasColumns = loc.start && typeof loc.start.column === "number";
3274
- const numberMaxWidth = String(end).length;
3275
- let frame = (shouldHighlight ? highlight(rawLines) : rawLines).split(NEWLINE, end).slice(start, end).map((line, index) => {
3276
- const number = start + 1 + index;
3277
- const gutter = ` ${` ${number}`.slice(-numberMaxWidth)} |`;
3278
- const hasMarker = markerLines[number];
3279
- const lastMarkerLine = !markerLines[number + 1];
3280
- if (hasMarker) {
3281
- let markerLine = "";
3282
- if (Array.isArray(hasMarker)) {
3283
- const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
3284
- const numberOfMarkers = hasMarker[1] || 1;
3285
- markerLine = [
3286
- "\n ",
3287
- defs.gutter(gutter.replace(/\d/g, " ")),
3288
- " ",
3289
- markerSpacing,
3290
- defs.marker("^").repeat(numberOfMarkers)
3291
- ].join("");
3292
- if (lastMarkerLine && opts.message) markerLine += " " + defs.message(opts.message);
3293
- }
3294
- return [
3295
- defs.marker(">"),
3296
- defs.gutter(gutter),
3297
- line.length > 0 ? ` ${line}` : "",
3298
- markerLine
3299
- ].join("");
3300
- } else return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
3301
- }).join("\n");
3302
- if (opts.message && !hasColumns) frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
3303
- if (shouldHighlight) return defs.reset(frame);
3304
- else return frame;
3305
- }
3306
- exports.codeFrameColumns = codeFrameColumns;
3307
- }));
1915
+ }
1916
+ function toQueryObject(searchParams) {
1917
+ return searchParams.entries().reduce((acc, [key, value]) => ({
1918
+ ...acc,
1919
+ [key]: value
1920
+ }), {});
1921
+ }
3308
1922
 
3309
1923
  //#endregion
3310
1924
  //#region src/server/symbolicate.ts
3311
- var import_lib = require_lib();
3312
1925
  /**
3313
1926
  * @see https://github.com/facebook/react-native/blob/0.83-stable/packages/metro-config/src/index.flow.js#L17
3314
1927
  */
@@ -3347,10 +1960,10 @@ function originalPositionFor(sourceMapConsumer, frame) {
3347
1960
  column: frame.column,
3348
1961
  line: frame.lineNumber
3349
1962
  });
3350
- return Object.entries(originalPosition).reduce((frame$1, [key, value]) => {
1963
+ return Object.entries(originalPosition).reduce((frame, [key, value]) => {
3351
1964
  const targetKey = convertFrameKey(key);
3352
1965
  return {
3353
- ...frame$1,
1966
+ ...frame,
3354
1967
  ...value ? { [targetKey]: value } : null
3355
1968
  };
3356
1969
  }, frame);
@@ -3371,17 +1984,17 @@ function convertFrameKey(key) {
3371
1984
  return key;
3372
1985
  }
3373
1986
  function getCodeFrame(sourceMapConsumer, frames, bundle) {
3374
- const frame = frames.find((frame$1) => {
3375
- return frame$1.lineNumber != null && frame$1.column != null && !isCollapsed(frame$1);
1987
+ const frame = frames.find((frame) => {
1988
+ return frame.lineNumber != null && frame.column != null && !isCollapsed(frame);
3376
1989
  });
3377
1990
  if (frame?.file == null || frame.column == null || frame.lineNumber == null) return null;
3378
1991
  try {
3379
1992
  const { lineNumber, column, file } = frame;
3380
1993
  const unresolved = file.startsWith("http");
3381
1994
  const source = unresolved ? bundle.code : sourceMapConsumer.sourceContentFor(frame.file);
3382
- const fileName = unresolved ? url.parse(file).pathname ?? "unknown" : file;
1995
+ const fileName = unresolved ? parseUrl(file).pathname ?? "unknown" : file;
3383
1996
  let content = "";
3384
- if (source) content = (0, import_lib.codeFrameColumns)(source, { start: {
1997
+ if (source) content = codeFrameColumns(source, { start: {
3385
1998
  column,
3386
1999
  line: lineNumber
3387
2000
  } }, { highlightCode: true });
@@ -3419,7 +2032,7 @@ const plugin = fp((fastify, options) => {
3419
2032
  const { stack } = request.body;
3420
2033
  const bundleUrl = stack.find((frame) => frame.file?.startsWith("http"));
3421
2034
  invariant(bundleUrl?.file, "No bundle URL found in stack frames");
3422
- const { pathname, query } = url.parse(bundleUrl.file, true);
2035
+ const { pathname, query } = parseUrl(bundleUrl.file);
3423
2036
  invariant(pathname, "No pathname found in bundle URL");
3424
2037
  invariant(query.platform, "No platform found in query");
3425
2038
  invariant(query.dev, "No dev found in query");
@@ -3488,11 +2101,11 @@ function getWebSocketUpgradeHandler(websocketEndpoints) {
3488
2101
  socket.destroy();
3489
2102
  return;
3490
2103
  }
3491
- const { pathname } = url.parse(request.url, true);
2104
+ const { pathname } = parseUrl(request.url);
3492
2105
  if (pathname != null && websocketEndpoints[pathname]) {
3493
2106
  const wss = websocketEndpoints[pathname];
3494
- wss.handleUpgrade(request, socket, head, (socket$1) => {
3495
- wss.emit("connection", socket$1, request);
2107
+ wss.handleUpgrade(request, socket, head, (socket) => {
2108
+ wss.emit("connection", socket, request);
3496
2109
  });
3497
2110
  } else socket.destroy();
3498
2111
  };
@@ -3621,8 +2234,8 @@ var HMRServer = class extends WebSocketServer {
3621
2234
  sendError(client, error) {
3622
2235
  try {
3623
2236
  this.send(client, JSON.stringify(error));
3624
- } catch (error$1) {
3625
- this.logger.error(`Failed to send HMR error message to client (clientId: ${client.id})`, error$1);
2237
+ } catch (error) {
2238
+ this.logger.error(`Failed to send HMR error message to client (clientId: ${client.id})`, error);
3626
2239
  }
3627
2240
  }
3628
2241
  cleanup(client) {
@@ -3653,12 +2266,12 @@ var HMRServer = class extends WebSocketServer {
3653
2266
  };
3654
2267
  this.logger.trace("HMR client message received", traceMessage);
3655
2268
  } catch (error) {
3656
- const message$1 = "Failed to parse HMR client message";
3657
- this.logger.error(message$1, error);
2269
+ const message = "Failed to parse HMR client message";
2270
+ this.logger.error(message, error);
3658
2271
  this.sendError(client, {
3659
2272
  type: "InternalError",
3660
2273
  errors: [{ description: error instanceof Error ? error.message : String(error) }],
3661
- message: message$1
2274
+ message
3662
2275
  });
3663
2276
  return;
3664
2277
  }
@@ -3719,7 +2332,7 @@ async function createDevServer(config, options) {
3719
2332
  projectRoot,
3720
2333
  port
3721
2334
  });
3722
- const emitter = mitt_default();
2335
+ const emitter = mitt();
3723
2336
  const fastify = Fastify({
3724
2337
  loggerInstance: new DevServerLogger(),
3725
2338
  disableRequestLogging: true
@@ -3755,7 +2368,7 @@ async function createDevServer(config, options) {
3755
2368
  bundlerPool,
3756
2369
  reportEvent: (event) => {
3757
2370
  reportEvent?.(event);
3758
- config.reporter.update(event);
2371
+ config.reporter?.update(event);
3759
2372
  }
3760
2373
  }).on("connection", (client) => emitter.emit("device.connected", { client })).on("message", (client, data) => emitter.emit("device.message", {
3761
2374
  client,
@@ -3805,9 +2418,9 @@ async function createDevServer(config, options) {
3805
2418
  }
3806
2419
  async function invokeConfigureServer(server, plugins) {
3807
2420
  const postConfigureServerHandlers = [];
3808
- for (const plugin$3 of plugins) {
3809
- const context = createPluginContext(plugin$3.name);
3810
- const result = await plugin$3.configureServer?.call(context, server);
2421
+ for (const plugin of plugins) {
2422
+ const context = createPluginContext(plugin.name);
2423
+ const result = await plugin.configureServer?.call(context, server);
3811
2424
  if (typeof result === "function") postConfigureServerHandlers.push(result);
3812
2425
  }
3813
2426
  return { invokePostConfigureServer: async () => {
@@ -3857,7 +2470,7 @@ async function resolveScaledAssets(options) {
3857
2470
  const files = fs.readdirSync(dirname);
3858
2471
  const stripedBasename = stripSuffix(assetPath, context);
3859
2472
  const suffixPattern = platformSuffixPattern(context);
3860
- const assetRegExp = /* @__PURE__ */ new RegExp(`${stripedBasename}(${SCALE_PATTERN})?(?:${suffixPattern})?${extension}$`);
2473
+ const assetRegExp = new RegExp(`${stripedBasename}(${SCALE_PATTERN})?(?:${suffixPattern})?${extension}$`);
3861
2474
  const scaledAssets = {};
3862
2475
  for (const file of files.sort((a, b) => getAssetPriority(b, context) - getAssetPriority(a, context))) {
3863
2476
  const match = assetRegExp.exec(file);
@@ -3902,13 +2515,13 @@ function stripSuffix(assetPath, context) {
3902
2515
  const basename = path.basename(assetPath);
3903
2516
  const extension = path.extname(assetPath);
3904
2517
  const suffixPattern = platformSuffixPattern(context);
3905
- return basename.replace(/* @__PURE__ */ new RegExp(`(${SCALE_PATTERN})?(?:${suffixPattern})?${extension}$`), "");
2518
+ return basename.replace(new RegExp(`(${SCALE_PATTERN})?(?:${suffixPattern})?${extension}$`), "");
3906
2519
  }
3907
2520
  function getAssetPriority(assetPath, context) {
3908
2521
  const suffixPattern = platformSuffixPattern(context);
3909
- if ((/* @__PURE__ */ new RegExp(`${SCALE_PATTERN}(?:${suffixPattern})`)).test(assetPath)) return 3;
3910
- else if ((/* @__PURE__ */ new RegExp(`(?:${suffixPattern})`)).test(assetPath)) return 2;
3911
- else if ((/* @__PURE__ */ new RegExp(`${SCALE_PATTERN}`)).test(assetPath)) return 1;
2522
+ if (new RegExp(`${SCALE_PATTERN}(?:${suffixPattern})`).test(assetPath)) return 3;
2523
+ else if (new RegExp(`(?:${suffixPattern})`).test(assetPath)) return 2;
2524
+ else if (new RegExp(`${SCALE_PATTERN}`).test(assetPath)) return 1;
3912
2525
  return 0;
3913
2526
  }
3914
2527
  function addSuffix(assetPath, context, options) {
@@ -3991,10 +2604,10 @@ async function copyAssetsToDestination(options) {
3991
2604
  return Promise.all(assets.map((asset) => {
3992
2605
  return Promise.all(asset.scales.map(async (scale) => {
3993
2606
  if (platform !== "android") {
3994
- const from$1 = resolveAssetPath(asset.id, context, scale);
3995
- const to$1 = path.join(assetsDir, getIosAssetDestinationPath(asset, scale));
3996
- mkdirWithAssertPath(to$1);
3997
- return fs.copyFileSync(from$1, to$1);
2607
+ const from = resolveAssetPath(asset.id, context, scale);
2608
+ const to = path.join(assetsDir, getIosAssetDestinationPath(asset, scale));
2609
+ mkdirWithAssertPath(to);
2610
+ return fs.copyFileSync(from, to);
3998
2611
  }
3999
2612
  const from = resolveAssetPath(asset.id, context, scale);
4000
2613
  const to = path.join(assetsDir, getAndroidAssetDestinationPath(asset, scale));
@@ -4041,15 +2654,15 @@ function generateAssetRegistryCode(assetRegistryPath, asset) {
4041
2654
  //#endregion
4042
2655
  //#region src/core/plugins/utils/transform-utils.ts
4043
2656
  const TRANSFORM_FLAGS_KEY = Symbol("transform-flags");
4044
- let TransformFlag = /* @__PURE__ */ function(TransformFlag$1) {
4045
- TransformFlag$1[TransformFlag$1["NONE"] = 0] = "NONE";
4046
- TransformFlag$1[TransformFlag$1["CODEGEN_REQUIRED"] = 1] = "CODEGEN_REQUIRED";
4047
- TransformFlag$1[TransformFlag$1["STRIP_FLOW_REQUIRED"] = 2] = "STRIP_FLOW_REQUIRED";
4048
- TransformFlag$1[TransformFlag$1["SKIP_ALL"] = 128] = "SKIP_ALL";
4049
- return TransformFlag$1;
2657
+ let TransformFlag = /* @__PURE__ */ function(TransformFlag) {
2658
+ TransformFlag[TransformFlag["NONE"] = 0] = "NONE";
2659
+ TransformFlag[TransformFlag["CODEGEN_REQUIRED"] = 1] = "CODEGEN_REQUIRED";
2660
+ TransformFlag[TransformFlag["STRIP_FLOW_REQUIRED"] = 2] = "STRIP_FLOW_REQUIRED";
2661
+ TransformFlag[TransformFlag["SKIP_ALL"] = 128] = "SKIP_ALL";
2662
+ return TransformFlag;
4050
2663
  }({});
4051
- function setFlag(context, id$1, flag, options) {
4052
- const moduleInfo = context.getModuleInfo(id$1);
2664
+ function setFlag(context, id, flag, options) {
2665
+ const moduleInfo = context.getModuleInfo(id);
4053
2666
  if (moduleInfo && hasFlag(moduleInfo.meta)) {
4054
2667
  if (options?.override) moduleInfo.meta[TRANSFORM_FLAGS_KEY] = flag;
4055
2668
  else moduleInfo.meta[TRANSFORM_FLAGS_KEY] |= flag;
@@ -4059,8 +2672,8 @@ function setFlag(context, id$1, flag, options) {
4059
2672
  function hasFlag(meta) {
4060
2673
  return TRANSFORM_FLAGS_KEY in meta;
4061
2674
  }
4062
- function getFlag(context, id$1) {
4063
- return getFlagFromModuleInfo(context.getModuleInfo(id$1));
2675
+ function getFlag(context, id) {
2676
+ return getFlagFromModuleInfo(context.getModuleInfo(id));
4064
2677
  }
4065
2678
  function getFlagFromModuleInfo(moduleInfo) {
4066
2679
  if (moduleInfo && hasFlag(moduleInfo.meta)) return moduleInfo.meta[TRANSFORM_FLAGS_KEY];
@@ -4073,18 +2686,18 @@ function withTransformBoundary(plugins, options) {
4073
2686
  name: "rollipop:transform-initializer",
4074
2687
  transform: {
4075
2688
  order: "pre",
4076
- handler(_code, id$1) {
4077
- if (context.state.hmrUpdates.has(id$1)) {
4078
- context.state.hmrUpdates.delete(id$1);
4079
- return { meta: setFlag(this, id$1, TransformFlag.NONE, { override: true }) };
2689
+ handler(_code, id) {
2690
+ if (context.state.hmrUpdates.has(id)) {
2691
+ context.state.hmrUpdates.delete(id);
2692
+ return { meta: setFlag(this, id, TransformFlag.NONE, { override: true }) };
4080
2693
  }
4081
2694
  }
4082
2695
  }
4083
2696
  },
4084
2697
  {
4085
2698
  name: "rollipop:transform-change-watcher",
4086
- watchChange(id$1) {
4087
- context.state.hmrUpdates.add(id$1);
2699
+ watchChange(id) {
2700
+ context.state.hmrUpdates.add(id);
4088
2701
  }
4089
2702
  },
4090
2703
  options?.beforeTransform,
@@ -4101,8 +2714,8 @@ function getPersistCachePlugins(options) {
4101
2714
  afterTransform: null
4102
2715
  };
4103
2716
  const { sourceExtensions, context } = options;
4104
- const includePattern = /* @__PURE__ */ new RegExp(`\\.(?:${sourceExtensions.join("|")})$`);
4105
- const filter = [exclude(id(/@oxc-project\+runtime/)), include(id(includePattern))];
2717
+ const includePattern = new RegExp(`\\.(?:${sourceExtensions.join("|")})$`);
2718
+ const filter = [exclude(or(id(/rolldown\/runtime/), id(/@oxc-project\+runtime/))), include(id(includePattern))];
4106
2719
  let cacheHits = 0;
4107
2720
  return {
4108
2721
  beforeTransform: {
@@ -4116,15 +2729,15 @@ function getPersistCachePlugins(options) {
4116
2729
  transform: {
4117
2730
  order: "pre",
4118
2731
  filter,
4119
- handler(_code, id$1) {
4120
- const key = getCacheKey(id$1, context.id);
2732
+ handler(_code, id) {
2733
+ const key = getCacheKey(id, context.id);
4121
2734
  const cache = context.cache.get(key);
4122
2735
  if (cache != null) {
4123
2736
  cacheHits++;
4124
2737
  return {
4125
2738
  code: cache,
4126
2739
  moduleType: "tsx",
4127
- meta: setFlag(this, id$1, TransformFlag.SKIP_ALL)
2740
+ meta: setFlag(this, id, TransformFlag.SKIP_ALL)
4128
2741
  };
4129
2742
  }
4130
2743
  }
@@ -4135,9 +2748,9 @@ function getPersistCachePlugins(options) {
4135
2748
  transform: {
4136
2749
  order: "post",
4137
2750
  filter,
4138
- handler(code, id$1) {
4139
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
4140
- context.cache.set(getCacheKey(id$1, context.id), code);
2751
+ handler(code, id) {
2752
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
2753
+ context.cache.set(getCacheKey(id, context.id), code);
4141
2754
  }
4142
2755
  },
4143
2756
  buildEnd() {
@@ -4146,60 +2759,60 @@ function getPersistCachePlugins(options) {
4146
2759
  }
4147
2760
  };
4148
2761
  }
4149
- function getCacheKey(id$1, buildHash) {
4150
- const { mtimeMs } = fs.statSync(id$1);
4151
- return xxhash(`${id$1}${buildHash}${mtimeMs}`);
2762
+ function getCacheKey(id, buildHash) {
2763
+ const { mtimeMs } = fs.statSync(id);
2764
+ return xxhash(`${id}${buildHash}${mtimeMs}`);
4152
2765
  }
4153
2766
  /**
4154
2767
  * Enhance a plugin to cache the result. (transform hook only)
4155
2768
  */
4156
- function cacheable(plugin$3) {
2769
+ function cacheable(plugin) {
4157
2770
  let configured = false;
4158
- const originalTransform = plugin$3.transform;
2771
+ const originalTransform = plugin.transform;
4159
2772
  if (typeof originalTransform === "function") {
4160
- plugin$3.transform = function(code, id$1, meta) {
4161
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
4162
- return originalTransform.call(this, code, id$1, meta);
2773
+ plugin.transform = function(code, id, meta) {
2774
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
2775
+ return originalTransform.call(this, code, id, meta);
4163
2776
  };
4164
2777
  configured = true;
4165
2778
  }
4166
2779
  if (typeof originalTransform === "object") {
4167
- plugin$3.transform = {
2780
+ plugin.transform = {
4168
2781
  ...originalTransform,
4169
- handler(code, id$1, meta) {
4170
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
4171
- return originalTransform.handler.call(this, code, id$1, meta);
2782
+ handler(code, id, meta) {
2783
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
2784
+ return originalTransform.handler.call(this, code, id, meta);
4172
2785
  }
4173
2786
  };
4174
2787
  configured = true;
4175
2788
  }
4176
- if (configured) plugin$3.name = `${plugin$3.name}:cacheable`;
4177
- else logger$1.warn(`Plugin '${plugin$3.name}' is could not be cached`);
4178
- return plugin$3;
2789
+ if (configured) plugin.name = `${plugin.name}:cacheable`;
2790
+ else logger$1.warn(`Plugin '${plugin.name}' is could not be cached`);
2791
+ return plugin;
4179
2792
  }
4180
2793
 
4181
2794
  //#endregion
4182
2795
  //#region src/core/plugins/utils/source.ts
4183
2796
  const TS_EXTENSION_REGEXP = /\.tsx?$/;
4184
- function isTS(id$1) {
4185
- return TS_EXTENSION_REGEXP.test(id$1);
2797
+ function isTS(id) {
2798
+ return TS_EXTENSION_REGEXP.test(id);
4186
2799
  }
4187
- function isJSX(id$1) {
4188
- return id$1.endsWith("x");
2800
+ function isJSX(id) {
2801
+ return id.endsWith("x");
4189
2802
  }
4190
2803
 
4191
2804
  //#endregion
4192
2805
  //#region src/core/plugins/react-native-plugin.ts
4193
2806
  function reactNativePlugin(config, options) {
4194
2807
  const { buildType, flowFilter, codegenFilter, assetsDir, assetExtensions, assetRegistryPath } = options;
4195
- const assetExtensionRegex = /* @__PURE__ */ new RegExp(`\\.(?:${assetExtensions.join("|")})$`);
2808
+ const assetExtensionRegex = new RegExp(`\\.(?:${assetExtensions.join("|")})$`);
4196
2809
  const codegenPlugin = {
4197
2810
  name: "rollipop:react-native-codegen-marker",
4198
2811
  transform: {
4199
2812
  order: "pre",
4200
2813
  filter: codegenFilter,
4201
- handler(_code, id$1) {
4202
- return { meta: setFlag(this, id$1, TransformFlag.CODEGEN_REQUIRED) };
2814
+ handler(_code, id) {
2815
+ return { meta: setFlag(this, id, TransformFlag.CODEGEN_REQUIRED) };
4203
2816
  }
4204
2817
  }
4205
2818
  };
@@ -4208,11 +2821,11 @@ function reactNativePlugin(config, options) {
4208
2821
  transform: {
4209
2822
  order: "pre",
4210
2823
  filter: flowFilter,
4211
- handler(code, id$1) {
4212
- const flags = getFlag(this, id$1);
2824
+ handler(code, id) {
2825
+ const flags = getFlag(this, id);
4213
2826
  if (flags & TransformFlag.SKIP_ALL) return;
4214
- if (flags & TransformFlag.CODEGEN_REQUIRED) return { meta: setFlag(this, id$1, TransformFlag.STRIP_FLOW_REQUIRED) };
4215
- const result = generateSourceFromAst(stripFlowSyntax(code), id$1);
2827
+ if (flags & TransformFlag.CODEGEN_REQUIRED) return { meta: setFlag(this, id, TransformFlag.STRIP_FLOW_REQUIRED) };
2828
+ const result = generateSourceFromAst(stripFlowSyntax(code), id);
4216
2829
  return {
4217
2830
  code: result.code,
4218
2831
  map: result.map,
@@ -4226,18 +2839,18 @@ function reactNativePlugin(config, options) {
4226
2839
  name: "rollipop:react-native-asset",
4227
2840
  load: {
4228
2841
  filter: [include(id(assetExtensionRegex))],
4229
- async handler(id$1) {
4230
- this.debug(`Asset ${id$1} found`);
2842
+ async handler(id) {
2843
+ this.debug(`Asset ${id} found`);
4231
2844
  const assetData = await resolveScaledAssets({
4232
2845
  projectRoot: config.root,
4233
- assetPath: id$1,
2846
+ assetPath: id,
4234
2847
  platform: options.platform,
4235
2848
  preferNativePlatform: config.resolver.preferNativePlatform
4236
2849
  });
4237
2850
  assets.push(assetData);
4238
2851
  return {
4239
2852
  code: generateAssetRegistryCode(assetRegistryPath, assetData),
4240
- meta: setFlag(this, id$1, TransformFlag.SKIP_ALL),
2853
+ meta: setFlag(this, id, TransformFlag.SKIP_ALL),
4241
2854
  moduleType: "js"
4242
2855
  };
4243
2856
  }
@@ -4265,15 +2878,15 @@ function reactNativePlugin(config, options) {
4265
2878
  name: "rollipop:react-native-replace-hmr-client",
4266
2879
  resolveId: {
4267
2880
  filter: [include(id(/\/HMRClient\.js$/))],
4268
- async handler(id$1, importer) {
4269
- const resolvedId = await this.resolve(id$1, importer, { skipSelf: true });
2881
+ async handler(id, importer) {
2882
+ const resolvedId = await this.resolve(id, importer, { skipSelf: true });
4270
2883
  if (resolvedId?.id === hmrClientPath) await this.load({ id: resolvedId.id });
4271
2884
  }
4272
2885
  },
4273
2886
  load: {
4274
2887
  filter: [include(id(exactRegex(hmrClientPath)))],
4275
- handler(id$1) {
4276
- this.debug(`Replacing HMR client: ${id$1}`);
2888
+ handler(id) {
2889
+ this.debug(`Replacing HMR client: ${id}`);
4277
2890
  return hmrConfig?.clientImplement ?? defaultRuntimeImplements.clientImplement;
4278
2891
  }
4279
2892
  }
@@ -4294,17 +2907,17 @@ const DEFAULT_EXCLUDE_REGEX = /\/node_modules\//;
4294
2907
  const HAS_REFRESH_REGEX = /\$RefreshReg\$\(/;
4295
2908
  const ONLY_REACT_COMPONENT_REGEX = /extends\s+(?:React\.)?(?:Pure)?Component/;
4296
2909
  function reactRefreshPlugin(options) {
4297
- const { include: include$1 = DEFAULT_INCLUDE_REGEX, exclude: exclude$1 = DEFAULT_EXCLUDE_REGEX } = options ?? {};
2910
+ const { include = DEFAULT_INCLUDE_REGEX, exclude = DEFAULT_EXCLUDE_REGEX } = options ?? {};
4298
2911
  return [{
4299
2912
  name: "rollipop:transform-react-refresh",
4300
2913
  transform: {
4301
2914
  filter: { id: {
4302
- include: include$1,
4303
- exclude: exclude$1
2915
+ include,
2916
+ exclude
4304
2917
  } },
4305
- handler(code, id$1) {
4306
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
4307
- const result = transformSync(id$1, code, {
2918
+ handler(code, id) {
2919
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
2920
+ const result = transformSync(id, code, {
4308
2921
  sourcemap: true,
4309
2922
  jsx: {
4310
2923
  runtime: "automatic",
@@ -4325,15 +2938,15 @@ function reactRefreshPlugin(options) {
4325
2938
  name: "rollipop:react-refresh-boundary",
4326
2939
  transform: {
4327
2940
  filter: { id: {
4328
- include: include$1,
4329
- exclude: exclude$1
2941
+ include,
2942
+ exclude
4330
2943
  } },
4331
- handler(code, id$1, meta) {
4332
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
2944
+ handler(code, id, meta) {
2945
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
4333
2946
  const { magicString } = meta;
4334
2947
  invariant(magicString != null, "magicString is not available");
4335
2948
  applyRefreshWrapper(magicString, {
4336
- id: id$1,
2949
+ id,
4337
2950
  hasRefresh: HAS_REFRESH_REGEX.test(code),
4338
2951
  onlyReactComponent: ONLY_REACT_COMPONENT_REGEX.test(code)
4339
2952
  });
@@ -4343,12 +2956,12 @@ function reactRefreshPlugin(options) {
4343
2956
  }];
4344
2957
  }
4345
2958
  function applyRefreshWrapper(s, options) {
4346
- const { id: id$1, hasRefresh, onlyReactComponent } = options;
2959
+ const { id, hasRefresh, onlyReactComponent } = options;
4347
2960
  if (!(hasRefresh || onlyReactComponent)) return;
4348
2961
  if (hasRefresh) s.prepend(`
4349
2962
  var __prev$RefreshReg$ = global.$RefreshReg$;
4350
2963
  var __prev$RefreshSig$ = global.$RefreshSig$;
4351
- global.$RefreshReg$ = function(type, id) { return __ReactRefresh.register(type, ${JSON.stringify(id$1)} + ' ' + id) }
2964
+ global.$RefreshReg$ = function(type, id) { return __ReactRefresh.register(type, ${JSON.stringify(id)} + ' ' + id) }
4352
2965
  global.$RefreshSig$ = function() { return __ReactRefresh.createSignatureFunctionForTransform(); }
4353
2966
  `);
4354
2967
  s.append(`
@@ -4385,12 +2998,12 @@ function preludePlugin(options) {
4385
2998
  meta: { [IS_ENTRY]: true }
4386
2999
  };
4387
3000
  } },
4388
- load: { handler(id$1) {
3001
+ load: { handler(id) {
4389
3002
  if (processed) return;
4390
- const moduleInfo = this.getModuleInfo(id$1);
3003
+ const moduleInfo = this.getModuleInfo(id);
4391
3004
  if (moduleInfo && isEntry(moduleInfo.meta)) {
4392
- this.debug(`Prelude plugin found entry ${id$1}`);
4393
- const modifiedSource = [preludeImportStatements, fs.readFileSync(id$1, "utf-8")].join("\n");
3005
+ this.debug(`Prelude plugin found entry ${id}`);
3006
+ const modifiedSource = [preludeImportStatements, fs.readFileSync(id, "utf-8")].join("\n");
4394
3007
  processed = true;
4395
3008
  return modifiedSource;
4396
3009
  }
@@ -4408,10 +3021,10 @@ function jsonPlugin() {
4408
3021
  name: "rollipop:json",
4409
3022
  load: {
4410
3023
  filter: [include(id(/\.json$/))],
4411
- handler(id$1) {
3024
+ handler(id) {
4412
3025
  return {
4413
- code: `export = ${fs.readFileSync(id$1, "utf-8")};`,
4414
- meta: setFlag(this, id$1, TransformFlag.SKIP_ALL),
3026
+ code: `export = ${fs.readFileSync(id, "utf-8")};`,
3027
+ meta: setFlag(this, id, TransformFlag.SKIP_ALL),
4415
3028
  moduleType: "ts"
4416
3029
  };
4417
3030
  }
@@ -4427,13 +3040,13 @@ function svgPlugin(options) {
4427
3040
  name: "rollipop:svg",
4428
3041
  load: {
4429
3042
  filter: { id: /\.svg$/ },
4430
- async handler(id$1) {
3043
+ async handler(id) {
4431
3044
  return {
4432
- code: await transform(fs.readFileSync(id$1, "utf-8"), {
3045
+ code: await transform(fs.readFileSync(id, "utf-8"), {
4433
3046
  template: defaultTemplate,
4434
3047
  plugins: [__require.resolve("@svgr/plugin-jsx")],
4435
3048
  native: true
4436
- }, { filePath: id$1 }),
3049
+ }, { filePath: id }),
4437
3050
  moduleType: "jsx"
4438
3051
  };
4439
3052
  }
@@ -4456,7 +3069,7 @@ export default ${SVG_COMPONENT_NAME};`;
4456
3069
  //#endregion
4457
3070
  //#region src/utils/babel.ts
4458
3071
  function mergeBabelOptions(baseOptions, ...options) {
4459
- return options.reduce((acc, options$1) => mergeWith(acc, options$1, merge$2), baseOptions);
3072
+ return options.reduce((acc, options) => mergeWith(acc, options, merge$2), baseOptions);
4460
3073
  }
4461
3074
  function merge$2(target, source, key) {
4462
3075
  if (key === "plugins") return [...target ?? [], ...source ?? []];
@@ -4468,47 +3081,47 @@ function merge$2(target, source, key) {
4468
3081
  function babelPlugin(options) {
4469
3082
  const { rules = [] } = options ?? {};
4470
3083
  const babelOptionsById = /* @__PURE__ */ new Map();
4471
- const babelRules = rules.map(({ filter, options: options$1 }, index) => {
3084
+ const babelRules = rules.map(({ filter, options }, index) => {
4472
3085
  return {
4473
3086
  name: `rollipop:babel-rule-${index}`,
4474
3087
  transform: {
4475
3088
  filter,
4476
- handler(code, id$1) {
4477
- const existingBabelOptions = babelOptionsById.get(id$1);
4478
- const resolvedOptions = typeof options$1 === "function" ? options$1(code, id$1) : options$1;
4479
- existingBabelOptions ? existingBabelOptions.push(resolvedOptions) : babelOptionsById.set(id$1, [resolvedOptions]);
3089
+ handler(code, id) {
3090
+ const existingBabelOptions = babelOptionsById.get(id);
3091
+ const resolvedOptions = typeof options === "function" ? options(code, id) : options;
3092
+ existingBabelOptions ? existingBabelOptions.push(resolvedOptions) : babelOptionsById.set(id, [resolvedOptions]);
4480
3093
  }
4481
3094
  }
4482
3095
  };
4483
3096
  });
4484
- const babelPlugin$1 = {
3097
+ const babelPlugin = {
4485
3098
  name: "rollipop:babel",
4486
3099
  buildStart() {
4487
3100
  babelOptionsById.clear();
4488
3101
  },
4489
- transform: { handler(code, id$1) {
4490
- const flags = getFlag(this, id$1);
3102
+ transform: { handler(code, id) {
3103
+ const flags = getFlag(this, id);
4491
3104
  if (flags & TransformFlag.SKIP_ALL) return;
4492
- const babelOptions = babelOptionsById.get(id$1) ?? [];
3105
+ const babelOptions = babelOptionsById.get(id) ?? [];
4493
3106
  if (!(flags & TransformFlag.CODEGEN_REQUIRED || babelOptions.length > 0)) return;
4494
- const baseOptions = getPreset$1(flags, id$1);
3107
+ const baseOptions = getPreset$1(flags, id);
4495
3108
  const result = babel.transformSync(code, {
4496
- filename: id$1,
3109
+ filename: id,
4497
3110
  babelrc: false,
4498
3111
  configFile: false,
4499
3112
  sourceMaps: true,
4500
3113
  ...mergeBabelOptions(baseOptions, ...babelOptions)
4501
3114
  });
4502
- invariant(result?.code, `Failed to transform with babel: ${id$1}`);
3115
+ invariant(result?.code, `Failed to transform with babel: ${id}`);
4503
3116
  return {
4504
3117
  code: result.code,
4505
3118
  map: result.map
4506
3119
  };
4507
3120
  } }
4508
3121
  };
4509
- return [...babelRules, babelPlugin$1].map(cacheable);
3122
+ return [...babelRules, babelPlugin].map(cacheable);
4510
3123
  }
4511
- function getPreset$1(flags, id$1) {
3124
+ function getPreset$1(flags, id) {
4512
3125
  const presets = [];
4513
3126
  const plugins = [];
4514
3127
  let parserOpts = null;
@@ -4518,8 +3131,8 @@ function getPreset$1(flags, id$1) {
4518
3131
  parseLangTypes: "flow",
4519
3132
  reactRuntimeTarget: "19"
4520
3133
  }], __require.resolve("@babel/plugin-transform-flow-strip-types"));
4521
- } else if (isTS(id$1)) plugins.push([__require.resolve("@babel/plugin-transform-typescript"), {
4522
- isTSX: isJSX(id$1),
3134
+ } else if (isTS(id)) plugins.push([__require.resolve("@babel/plugin-transform-typescript"), {
3135
+ isTSX: isJSX(id),
4523
3136
  allowNamespaces: true
4524
3137
  }]);
4525
3138
  if (flags & TransformFlag.CODEGEN_REQUIRED) plugins.push([__require.resolve("@react-native/babel-plugin-codegen")]);
@@ -4534,7 +3147,7 @@ function getPreset$1(flags, id$1) {
4534
3147
  //#endregion
4535
3148
  //#region src/utils/swc.ts
4536
3149
  function mergeSwcOptions(baseOptions, ...options) {
4537
- return options.reduce((acc, options$1) => mergeWith(acc, options$1, merge$1), baseOptions);
3150
+ return options.reduce((acc, options) => mergeWith(acc, options, merge$1), baseOptions);
4538
3151
  }
4539
3152
  function merge$1(target, source, key) {
4540
3153
  if (key === "plugins") return [...target ?? [], ...source ?? []];
@@ -4545,30 +3158,30 @@ function merge$1(target, source, key) {
4545
3158
  function swcPlugin(options) {
4546
3159
  const { rules = [] } = options ?? {};
4547
3160
  const swcOptionsById = /* @__PURE__ */ new Map();
4548
- const swcRules = rules.map(({ filter, options: options$1 }, index) => {
3161
+ const swcRules = rules.map(({ filter, options }, index) => {
4549
3162
  return {
4550
3163
  name: `rollipop:swc-rule-${index}`,
4551
3164
  transform: {
4552
3165
  filter,
4553
- handler(code, id$1) {
4554
- const existingBabelOptions = swcOptionsById.get(id$1);
4555
- const resolvedOptions = typeof options$1 === "function" ? options$1(code, id$1) : options$1;
4556
- existingBabelOptions ? existingBabelOptions.push(resolvedOptions) : swcOptionsById.set(id$1, [resolvedOptions]);
3166
+ handler(code, id) {
3167
+ const existingBabelOptions = swcOptionsById.get(id);
3168
+ const resolvedOptions = typeof options === "function" ? options(code, id) : options;
3169
+ existingBabelOptions ? existingBabelOptions.push(resolvedOptions) : swcOptionsById.set(id, [resolvedOptions]);
4557
3170
  }
4558
3171
  }
4559
3172
  };
4560
3173
  });
4561
- const swcPlugin$1 = {
3174
+ const swcPlugin = {
4562
3175
  name: "rollipop:swc",
4563
3176
  buildStart() {
4564
3177
  swcOptionsById.clear();
4565
3178
  },
4566
- transform: { handler(code, id$1) {
4567
- if (getFlag(this, id$1) & TransformFlag.SKIP_ALL) return;
4568
- const swcOptions = swcOptionsById.get(id$1) ?? [];
3179
+ transform: { handler(code, id) {
3180
+ if (getFlag(this, id) & TransformFlag.SKIP_ALL) return;
3181
+ const swcOptions = swcOptionsById.get(id) ?? [];
4569
3182
  const baseOptions = getPreset();
4570
3183
  const result = swc.transformSync(code, {
4571
- filename: id$1,
3184
+ filename: id,
4572
3185
  configFile: false,
4573
3186
  swcrc: false,
4574
3187
  sourceMaps: true,
@@ -4581,7 +3194,7 @@ function swcPlugin(options) {
4581
3194
  };
4582
3195
  } }
4583
3196
  };
4584
- return [...swcRules, swcPlugin$1].map(cacheable);
3197
+ return [...swcRules, swcPlugin].map(cacheable);
4585
3198
  }
4586
3199
  function getPreset() {
4587
3200
  return {
@@ -4633,21 +3246,21 @@ function reporterPlugin(options) {
4633
3246
  },
4634
3247
  transform: {
4635
3248
  order: "post",
4636
- handler(_code, id$1) {
3249
+ handler(_code, id) {
4637
3250
  ++transformedModules;
4638
3251
  if (!unknownTotalModules && totalModules < transformedModules) totalModules = transformedModules;
4639
3252
  reporter?.update({
4640
3253
  type: "transform",
4641
- id: id$1,
3254
+ id,
4642
3255
  totalModules: unknownTotalModules ? void 0 : totalModules,
4643
3256
  transformedModules
4644
3257
  });
4645
3258
  }
4646
3259
  },
4647
- watchChange(id$1) {
3260
+ watchChange(id) {
4648
3261
  reporter?.update({
4649
3262
  type: "watch_change",
4650
- id: id$1
3263
+ id
4651
3264
  });
4652
3265
  }
4653
3266
  };
@@ -4659,8 +3272,8 @@ resolveRolldownOptions.cache = /* @__PURE__ */ new Map();
4659
3272
  async function resolveRolldownOptions(context, config, buildOptions, devEngineOptions) {
4660
3273
  const cachedOptions = resolveRolldownOptions.cache.get(context.id);
4661
3274
  if (cachedOptions != null) return cachedOptions;
4662
- const { platform, dev: dev$1, cache } = buildOptions;
4663
- const isDevServerMode = dev$1 && context.buildType === "serve";
3275
+ const { platform, dev, cache } = buildOptions;
3276
+ const isDevServerMode = dev && context.buildType === "serve";
4664
3277
  invariant(isDevServerMode ? devEngineOptions != null : true, "devEngineOptions is required in dev server mode");
4665
3278
  const env = loadEnv(config);
4666
3279
  const builtInEnv = {
@@ -4687,12 +3300,12 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
4687
3300
  target: "es2015",
4688
3301
  jsx: {
4689
3302
  runtime: "automatic",
4690
- development: dev$1
3303
+ development: dev
4691
3304
  },
4692
3305
  define: {
4693
- __DEV__: asLiteral(dev$1),
3306
+ __DEV__: asLiteral(dev),
4694
3307
  global: asIdentifier(GLOBAL_IDENTIFIER),
4695
- "process.env.NODE_ENV": asLiteral(nodeEnvironment(dev$1)),
3308
+ "process.env.NODE_ENV": asLiteral(nodeEnvironment(dev)),
4696
3309
  "process.env.DEBUG_ROLLIPOP": asLiteral(isDebugEnabled()),
4697
3310
  ...defineEnvFromObject(env),
4698
3311
  ...defineEnvFromObject(builtInEnv)
@@ -4707,15 +3320,15 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
4707
3320
  sourceExtensions,
4708
3321
  context
4709
3322
  });
4710
- const statusReporter = (() => {
3323
+ const defaultReporters = [(() => {
4711
3324
  switch (config.terminal.status) {
4712
3325
  case "compat": return new CompatStatusReporter();
4713
3326
  case "progress": return new ProgressBarStatusReporter(context.id, `[${platform}, ${buildOptions.dev ? "dev" : "prod"}]`, getBuildTotalModules(context.storage, context.id));
4714
3327
  }
4715
- })();
3328
+ })()];
4716
3329
  const reporterOptions = {
4717
3330
  initialTotalModules: getBuildTotalModules(context.storage, context.id),
4718
- reporter: mergeReporters([statusReporter, config.reporter].filter(isNotNil))
3331
+ reporter: mergeReporters([...defaultReporters, config.reporter].filter(isNotNil))
4719
3332
  };
4720
3333
  const finalOptions = await applyDangerouslyOverrideOptionsFinalizer(config, {
4721
3334
  platform: "neutral",
@@ -4732,7 +3345,7 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
4732
3345
  plugins: withTransformBoundary([
4733
3346
  preludePlugin({ modulePaths: preludePaths }),
4734
3347
  reactNativePlugin(config, {
4735
- dev: dev$1,
3348
+ dev,
4736
3349
  platform,
4737
3350
  buildType: context.buildType,
4738
3351
  codegenFilter: codegen.filter,
@@ -4772,12 +3385,11 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
4772
3385
  outro: rolldownOutro,
4773
3386
  intro: async (chunk) => {
4774
3387
  return [
4775
- ...getGlobalVariables(dev$1, context.buildType),
3388
+ ...getGlobalVariables(dev, context.buildType),
4776
3389
  ...loadPolyfills(polyfills),
4777
3390
  typeof rolldownIntro === "function" ? await rolldownIntro(chunk) : rolldownIntro
4778
3391
  ].filter(isNotNil).join("\n");
4779
3392
  },
4780
- keepNames: dev$1,
4781
3393
  minify: buildOptions.minify ?? rolldownMinify,
4782
3394
  sourcemap: buildOptions.sourcemap ?? rolldownSourcemap,
4783
3395
  sourcemapBaseUrl: rolldownSourcemapBaseUrl,
@@ -4793,16 +3405,16 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
4793
3405
  }
4794
3406
  function getResolveExtensions({ platform, sourceExtensions, assetExtensions, preferNativePlatform }) {
4795
3407
  const supportedExtensions = [...sourceExtensions, ...assetExtensions];
4796
- return [...[platform, preferNativePlatform ? "native" : null].filter(isNotNil).map((platform$1) => {
4797
- return supportedExtensions.map((extension) => `.${platform$1}.${extension}`);
3408
+ return [...[platform, preferNativePlatform ? "native" : null].filter(isNotNil).map((platform) => {
3409
+ return supportedExtensions.map((extension) => `.${platform}.${extension}`);
4798
3410
  }), ...supportedExtensions.map((extension) => `.${extension}`)].flat();
4799
3411
  }
4800
3412
  function loadPolyfills(polyfills) {
4801
3413
  return polyfills.map((polyfill) => {
4802
3414
  if (typeof polyfill === "string") return fs.readFileSync(polyfill, "utf-8");
4803
- const path$1 = "path" in polyfill ? polyfill.path : void 0;
3415
+ const path = "path" in polyfill ? polyfill.path : void 0;
4804
3416
  const content = "code" in polyfill ? polyfill.code : fs.readFileSync(polyfill.path, "utf-8");
4805
- return polyfill.type === "iife" ? iife(content, path$1) : content;
3417
+ return polyfill.type === "iife" ? iife(content, path) : content;
4806
3418
  });
4807
3419
  }
4808
3420
  async function applyDangerouslyOverrideOptionsFinalizer(config, inputOptions, outputOptions) {
@@ -4862,11 +3474,11 @@ var Bundler = class Bundler {
4862
3474
  return createId(config, buildOptions);
4863
3475
  }
4864
3476
  static createContext(buildType, config, buildOptions) {
4865
- const id$1 = Bundler.createId(config, buildOptions);
3477
+ const id = Bundler.createId(config, buildOptions);
4866
3478
  return {
4867
- id: id$1,
3479
+ id,
4868
3480
  root: config.root,
4869
- cache: new FileSystemCache(config.root, id$1),
3481
+ cache: new FileSystemCache(config.root, id),
4870
3482
  storage: FileStorage.getInstance(config.root),
4871
3483
  buildType,
4872
3484
  state: { hmrUpdates: /* @__PURE__ */ new Set() }
@@ -5157,7 +3769,6 @@ const command = {
5157
3769
  //#endregion
5158
3770
  //#region src/commands.ts
5159
3771
  const commands = [createReactNativeCliCommand(command$1), createReactNativeCliCommand(command)];
5160
- var commands_default = commands;
5161
3772
 
5162
3773
  //#endregion
5163
- export { commands_default as default };
3774
+ export { commands as default };