peachsim 0.1.929 → 0.1.930

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 (77) hide show
  1. package/cli/commands/control.ts +26 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/agent-identity.cjs +1 -1
  5. package/dist-lib/agent-sessions.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +1 -1
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cli-constants.cjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +1 -1
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +1 -1
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +1 -1
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/plist.cjs +1 -1
  55. package/dist-lib/plist.mjs +1 -1
  56. package/dist-lib/profiles.cjs +1 -1
  57. package/dist-lib/public-brand.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.cjs +1 -1
  59. package/dist-lib/react-native-host-modules.mjs +1 -1
  60. package/dist-lib/render-mode.cjs +1 -1
  61. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  62. package/dist-lib/sdk.cjs +1 -1
  63. package/dist-lib/sdk.mjs +1 -1
  64. package/dist-lib/skills.cjs +552 -371
  65. package/dist-lib/swift-compile.cjs +1 -1
  66. package/dist-lib/swift-compile.mjs +1 -1
  67. package/dist-lib/swift-package.cjs +1 -1
  68. package/dist-lib/swift-package.mjs +1 -1
  69. package/dist-lib/swift-submit.cjs +1 -1
  70. package/dist-lib/swift-submit.mjs +1 -1
  71. package/dist-lib/swift-toolchain.cjs +1 -1
  72. package/dist-lib/swift.cjs +1 -1
  73. package/dist-lib/vite-swift.cjs +1 -1
  74. package/dist-lib/vite.cjs +1 -1
  75. package/dist-lib/worklet-executable.cjs +1 -1
  76. package/dist-lib/worklet-executable.mjs +1 -1
  77. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.929 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.930 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -19171,17 +19171,17 @@ function visit(node, visitor) {
19171
19171
  } else
19172
19172
  visit_(null, node, visitor_, Object.freeze([]));
19173
19173
  }
19174
- function visit_(key2, node, visitor, path38) {
19175
- const ctrl = callVisitor(key2, node, visitor, path38);
19174
+ function visit_(key2, node, visitor, path39) {
19175
+ const ctrl = callVisitor(key2, node, visitor, path39);
19176
19176
  if (isNode(ctrl) || isPair(ctrl)) {
19177
- replaceNode(key2, path38, ctrl);
19178
- return visit_(key2, ctrl, visitor, path38);
19177
+ replaceNode(key2, path39, ctrl);
19178
+ return visit_(key2, ctrl, visitor, path39);
19179
19179
  }
19180
19180
  if (typeof ctrl !== "symbol") {
19181
19181
  if (isCollection(node)) {
19182
- path38 = Object.freeze(path38.concat(node));
19182
+ path39 = Object.freeze(path39.concat(node));
19183
19183
  for (let i = 0; i < node.items.length; ++i) {
19184
- const ci = visit_(i, node.items[i], visitor, path38);
19184
+ const ci = visit_(i, node.items[i], visitor, path39);
19185
19185
  if (typeof ci === "number")
19186
19186
  i = ci - 1;
19187
19187
  else if (ci === BREAK)
@@ -19192,13 +19192,13 @@ function visit_(key2, node, visitor, path38) {
19192
19192
  }
19193
19193
  }
19194
19194
  } else if (isPair(node)) {
19195
- path38 = Object.freeze(path38.concat(node));
19196
- const ck = visit_("key", node.key, visitor, path38);
19195
+ path39 = Object.freeze(path39.concat(node));
19196
+ const ck = visit_("key", node.key, visitor, path39);
19197
19197
  if (ck === BREAK)
19198
19198
  return BREAK;
19199
19199
  else if (ck === REMOVE)
19200
19200
  node.key = null;
19201
- const cv = visit_("value", node.value, visitor, path38);
19201
+ const cv = visit_("value", node.value, visitor, path39);
19202
19202
  if (cv === BREAK)
19203
19203
  return BREAK;
19204
19204
  else if (cv === REMOVE)
@@ -19216,17 +19216,17 @@ async function visitAsync(node, visitor) {
19216
19216
  } else
19217
19217
  await visitAsync_(null, node, visitor_, Object.freeze([]));
19218
19218
  }
19219
- async function visitAsync_(key2, node, visitor, path38) {
19220
- const ctrl = await callVisitor(key2, node, visitor, path38);
19219
+ async function visitAsync_(key2, node, visitor, path39) {
19220
+ const ctrl = await callVisitor(key2, node, visitor, path39);
19221
19221
  if (isNode(ctrl) || isPair(ctrl)) {
19222
- replaceNode(key2, path38, ctrl);
19223
- return visitAsync_(key2, ctrl, visitor, path38);
19222
+ replaceNode(key2, path39, ctrl);
19223
+ return visitAsync_(key2, ctrl, visitor, path39);
19224
19224
  }
19225
19225
  if (typeof ctrl !== "symbol") {
19226
19226
  if (isCollection(node)) {
19227
- path38 = Object.freeze(path38.concat(node));
19227
+ path39 = Object.freeze(path39.concat(node));
19228
19228
  for (let i = 0; i < node.items.length; ++i) {
19229
- const ci = await visitAsync_(i, node.items[i], visitor, path38);
19229
+ const ci = await visitAsync_(i, node.items[i], visitor, path39);
19230
19230
  if (typeof ci === "number")
19231
19231
  i = ci - 1;
19232
19232
  else if (ci === BREAK)
@@ -19237,13 +19237,13 @@ async function visitAsync_(key2, node, visitor, path38) {
19237
19237
  }
19238
19238
  }
19239
19239
  } else if (isPair(node)) {
19240
- path38 = Object.freeze(path38.concat(node));
19241
- const ck = await visitAsync_("key", node.key, visitor, path38);
19240
+ path39 = Object.freeze(path39.concat(node));
19241
+ const ck = await visitAsync_("key", node.key, visitor, path39);
19242
19242
  if (ck === BREAK)
19243
19243
  return BREAK;
19244
19244
  else if (ck === REMOVE)
19245
19245
  node.key = null;
19246
- const cv = await visitAsync_("value", node.value, visitor, path38);
19246
+ const cv = await visitAsync_("value", node.value, visitor, path39);
19247
19247
  if (cv === BREAK)
19248
19248
  return BREAK;
19249
19249
  else if (cv === REMOVE)
@@ -19270,23 +19270,23 @@ function initVisitor(visitor) {
19270
19270
  }
19271
19271
  return visitor;
19272
19272
  }
19273
- function callVisitor(key2, node, visitor, path38) {
19273
+ function callVisitor(key2, node, visitor, path39) {
19274
19274
  if (typeof visitor === "function")
19275
- return visitor(key2, node, path38);
19275
+ return visitor(key2, node, path39);
19276
19276
  if (isMap(node))
19277
- return visitor.Map?.(key2, node, path38);
19277
+ return visitor.Map?.(key2, node, path39);
19278
19278
  if (isSeq(node))
19279
- return visitor.Seq?.(key2, node, path38);
19279
+ return visitor.Seq?.(key2, node, path39);
19280
19280
  if (isPair(node))
19281
- return visitor.Pair?.(key2, node, path38);
19281
+ return visitor.Pair?.(key2, node, path39);
19282
19282
  if (isScalar(node))
19283
- return visitor.Scalar?.(key2, node, path38);
19283
+ return visitor.Scalar?.(key2, node, path39);
19284
19284
  if (isAlias(node))
19285
- return visitor.Alias?.(key2, node, path38);
19285
+ return visitor.Alias?.(key2, node, path39);
19286
19286
  return void 0;
19287
19287
  }
19288
- function replaceNode(key2, path38, node) {
19289
- const parent = path38[path38.length - 1];
19288
+ function replaceNode(key2, path39, node) {
19289
+ const parent = path39[path39.length - 1];
19290
19290
  if (isCollection(parent)) {
19291
19291
  parent.items[key2] = node;
19292
19292
  } else if (isPair(parent)) {
@@ -19886,10 +19886,10 @@ var init_createNode = __esm({
19886
19886
  });
19887
19887
 
19888
19888
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
19889
- function collectionFromPath(schema4, path38, value) {
19889
+ function collectionFromPath(schema4, path39, value) {
19890
19890
  let v = value;
19891
- for (let i = path38.length - 1; i >= 0; --i) {
19892
- const k = path38[i];
19891
+ for (let i = path39.length - 1; i >= 0; --i) {
19892
+ const k = path39[i];
19893
19893
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
19894
19894
  const a = [];
19895
19895
  a[k] = v;
@@ -19914,7 +19914,7 @@ var init_Collection = __esm({
19914
19914
  init_createNode();
19915
19915
  init_identity();
19916
19916
  init_Node();
19917
- isEmptyPath = (path38) => path38 == null || typeof path38 === "object" && !!path38[Symbol.iterator]().next().done;
19917
+ isEmptyPath = (path39) => path39 == null || typeof path39 === "object" && !!path39[Symbol.iterator]().next().done;
19918
19918
  Collection = class extends NodeBase {
19919
19919
  constructor(type, schema4) {
19920
19920
  super(type);
@@ -19944,11 +19944,11 @@ var init_Collection = __esm({
19944
19944
  * be a Pair instance or a `{ key, value }` object, which may not have a key
19945
19945
  * that already exists in the map.
19946
19946
  */
19947
- addIn(path38, value) {
19948
- if (isEmptyPath(path38))
19947
+ addIn(path39, value) {
19948
+ if (isEmptyPath(path39))
19949
19949
  this.add(value);
19950
19950
  else {
19951
- const [key2, ...rest] = path38;
19951
+ const [key2, ...rest] = path39;
19952
19952
  const node = this.get(key2, true);
19953
19953
  if (isCollection(node))
19954
19954
  node.addIn(rest, value);
@@ -19962,8 +19962,8 @@ var init_Collection = __esm({
19962
19962
  * Removes a value from the collection.
19963
19963
  * @returns `true` if the item was found and removed.
19964
19964
  */
19965
- deleteIn(path38) {
19966
- const [key2, ...rest] = path38;
19965
+ deleteIn(path39) {
19966
+ const [key2, ...rest] = path39;
19967
19967
  if (rest.length === 0)
19968
19968
  return this.delete(key2);
19969
19969
  const node = this.get(key2, true);
@@ -19977,8 +19977,8 @@ var init_Collection = __esm({
19977
19977
  * scalar values from their surrounding node; to disable set `keepScalar` to
19978
19978
  * `true` (collections are always returned intact).
19979
19979
  */
19980
- getIn(path38, keepScalar) {
19981
- const [key2, ...rest] = path38;
19980
+ getIn(path39, keepScalar) {
19981
+ const [key2, ...rest] = path39;
19982
19982
  const node = this.get(key2, true);
19983
19983
  if (rest.length === 0)
19984
19984
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -19996,8 +19996,8 @@ var init_Collection = __esm({
19996
19996
  /**
19997
19997
  * Checks if the collection includes a value with the key `key`.
19998
19998
  */
19999
- hasIn(path38) {
20000
- const [key2, ...rest] = path38;
19999
+ hasIn(path39) {
20000
+ const [key2, ...rest] = path39;
20001
20001
  if (rest.length === 0)
20002
20002
  return this.has(key2);
20003
20003
  const node = this.get(key2, true);
@@ -20007,8 +20007,8 @@ var init_Collection = __esm({
20007
20007
  * Sets a value in this collection. For `!!set`, `value` needs to be a
20008
20008
  * boolean to add/remove the item from the set.
20009
20009
  */
20010
- setIn(path38, value) {
20011
- const [key2, ...rest] = path38;
20010
+ setIn(path39, value) {
20011
+ const [key2, ...rest] = path39;
20012
20012
  if (rest.length === 0) {
20013
20013
  this.set(key2, value);
20014
20014
  } else {
@@ -22442,9 +22442,9 @@ var init_Document = __esm({
22442
22442
  this.contents.add(value);
22443
22443
  }
22444
22444
  /** Adds a value to the document. */
22445
- addIn(path38, value) {
22445
+ addIn(path39, value) {
22446
22446
  if (assertCollection(this.contents))
22447
- this.contents.addIn(path38, value);
22447
+ this.contents.addIn(path39, value);
22448
22448
  }
22449
22449
  /**
22450
22450
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -22519,14 +22519,14 @@ var init_Document = __esm({
22519
22519
  * Removes a value from the document.
22520
22520
  * @returns `true` if the item was found and removed.
22521
22521
  */
22522
- deleteIn(path38) {
22523
- if (isEmptyPath(path38)) {
22522
+ deleteIn(path39) {
22523
+ if (isEmptyPath(path39)) {
22524
22524
  if (this.contents == null)
22525
22525
  return false;
22526
22526
  this.contents = null;
22527
22527
  return true;
22528
22528
  }
22529
- return assertCollection(this.contents) ? this.contents.deleteIn(path38) : false;
22529
+ return assertCollection(this.contents) ? this.contents.deleteIn(path39) : false;
22530
22530
  }
22531
22531
  /**
22532
22532
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -22541,10 +22541,10 @@ var init_Document = __esm({
22541
22541
  * scalar values from their surrounding node; to disable set `keepScalar` to
22542
22542
  * `true` (collections are always returned intact).
22543
22543
  */
22544
- getIn(path38, keepScalar) {
22545
- if (isEmptyPath(path38))
22544
+ getIn(path39, keepScalar) {
22545
+ if (isEmptyPath(path39))
22546
22546
  return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
22547
- return isCollection(this.contents) ? this.contents.getIn(path38, keepScalar) : void 0;
22547
+ return isCollection(this.contents) ? this.contents.getIn(path39, keepScalar) : void 0;
22548
22548
  }
22549
22549
  /**
22550
22550
  * Checks if the document includes a value with the key `key`.
@@ -22555,10 +22555,10 @@ var init_Document = __esm({
22555
22555
  /**
22556
22556
  * Checks if the document includes a value at `path`.
22557
22557
  */
22558
- hasIn(path38) {
22559
- if (isEmptyPath(path38))
22558
+ hasIn(path39) {
22559
+ if (isEmptyPath(path39))
22560
22560
  return this.contents !== void 0;
22561
- return isCollection(this.contents) ? this.contents.hasIn(path38) : false;
22561
+ return isCollection(this.contents) ? this.contents.hasIn(path39) : false;
22562
22562
  }
22563
22563
  /**
22564
22564
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -22575,13 +22575,13 @@ var init_Document = __esm({
22575
22575
  * Sets a value in this document. For `!!set`, `value` needs to be a
22576
22576
  * boolean to add/remove the item from the set.
22577
22577
  */
22578
- setIn(path38, value) {
22579
- if (isEmptyPath(path38)) {
22578
+ setIn(path39, value) {
22579
+ if (isEmptyPath(path39)) {
22580
22580
  this.contents = value;
22581
22581
  } else if (this.contents == null) {
22582
- this.contents = collectionFromPath(this.schema, Array.from(path38), value);
22582
+ this.contents = collectionFromPath(this.schema, Array.from(path39), value);
22583
22583
  } else if (assertCollection(this.contents)) {
22584
- this.contents.setIn(path38, value);
22584
+ this.contents.setIn(path39, value);
22585
22585
  }
22586
22586
  }
22587
22587
  /**
@@ -24486,15 +24486,15 @@ function visit2(cst, visitor) {
24486
24486
  cst = { start: cst.start, value: cst.value };
24487
24487
  _visit(Object.freeze([]), cst, visitor);
24488
24488
  }
24489
- function _visit(path38, item, visitor) {
24490
- let ctrl = visitor(item, path38);
24489
+ function _visit(path39, item, visitor) {
24490
+ let ctrl = visitor(item, path39);
24491
24491
  if (typeof ctrl === "symbol")
24492
24492
  return ctrl;
24493
24493
  for (const field of ["key", "value"]) {
24494
24494
  const token = item[field];
24495
24495
  if (token && "items" in token) {
24496
24496
  for (let i = 0; i < token.items.length; ++i) {
24497
- const ci = _visit(Object.freeze(path38.concat([[field, i]])), token.items[i], visitor);
24497
+ const ci = _visit(Object.freeze(path39.concat([[field, i]])), token.items[i], visitor);
24498
24498
  if (typeof ci === "number")
24499
24499
  i = ci - 1;
24500
24500
  else if (ci === BREAK2)
@@ -24505,10 +24505,10 @@ function _visit(path38, item, visitor) {
24505
24505
  }
24506
24506
  }
24507
24507
  if (typeof ctrl === "function" && field === "key")
24508
- ctrl = ctrl(item, path38);
24508
+ ctrl = ctrl(item, path39);
24509
24509
  }
24510
24510
  }
24511
- return typeof ctrl === "function" ? ctrl(item, path38) : ctrl;
24511
+ return typeof ctrl === "function" ? ctrl(item, path39) : ctrl;
24512
24512
  }
24513
24513
  var BREAK2, SKIP2, REMOVE2;
24514
24514
  var init_cst_visit = __esm({
@@ -24519,9 +24519,9 @@ var init_cst_visit = __esm({
24519
24519
  visit2.BREAK = BREAK2;
24520
24520
  visit2.SKIP = SKIP2;
24521
24521
  visit2.REMOVE = REMOVE2;
24522
- visit2.itemAtPath = (cst, path38) => {
24522
+ visit2.itemAtPath = (cst, path39) => {
24523
24523
  let item = cst;
24524
- for (const [field, index] of path38) {
24524
+ for (const [field, index] of path39) {
24525
24525
  const tok = item?.[field];
24526
24526
  if (tok && "items" in tok) {
24527
24527
  item = tok.items[index];
@@ -24530,9 +24530,9 @@ var init_cst_visit = __esm({
24530
24530
  }
24531
24531
  return item;
24532
24532
  };
24533
- visit2.parentCollection = (cst, path38) => {
24534
- const parent = visit2.itemAtPath(cst, path38.slice(0, -1));
24535
- const field = path38[path38.length - 1][0];
24533
+ visit2.parentCollection = (cst, path39) => {
24534
+ const parent = visit2.itemAtPath(cst, path39.slice(0, -1));
24535
+ const field = path39[path39.length - 1][0];
24536
24536
  const coll = parent?.[field];
24537
24537
  if (coll && "items" in coll)
24538
24538
  return coll;
@@ -25835,14 +25835,14 @@ var init_parser = __esm({
25835
25835
  case "scalar":
25836
25836
  case "single-quoted-scalar":
25837
25837
  case "double-quoted-scalar": {
25838
- const fs34 = this.flowScalar(this.type);
25838
+ const fs35 = this.flowScalar(this.type);
25839
25839
  if (atNextItem || it.value) {
25840
- map2.items.push({ start, key: fs34, sep: [] });
25840
+ map2.items.push({ start, key: fs35, sep: [] });
25841
25841
  this.onKeyLine = true;
25842
25842
  } else if (it.sep) {
25843
- this.stack.push(fs34);
25843
+ this.stack.push(fs35);
25844
25844
  } else {
25845
- Object.assign(it, { key: fs34, sep: [] });
25845
+ Object.assign(it, { key: fs35, sep: [] });
25846
25846
  this.onKeyLine = true;
25847
25847
  }
25848
25848
  return;
@@ -25970,13 +25970,13 @@ var init_parser = __esm({
25970
25970
  case "scalar":
25971
25971
  case "single-quoted-scalar":
25972
25972
  case "double-quoted-scalar": {
25973
- const fs34 = this.flowScalar(this.type);
25973
+ const fs35 = this.flowScalar(this.type);
25974
25974
  if (!it || it.value)
25975
- fc.items.push({ start: [], key: fs34, sep: [] });
25975
+ fc.items.push({ start: [], key: fs35, sep: [] });
25976
25976
  else if (it.sep)
25977
- this.stack.push(fs34);
25977
+ this.stack.push(fs35);
25978
25978
  else
25979
- Object.assign(it, { key: fs34, sep: [] });
25979
+ Object.assign(it, { key: fs35, sep: [] });
25980
25980
  return;
25981
25981
  }
25982
25982
  case "flow-map-end":
@@ -27347,9 +27347,9 @@ function safeChildPlistName(value) {
27347
27347
  name: file.toLowerCase().endsWith(".plist") ? file : `${file}.plist`
27348
27348
  };
27349
27349
  }
27350
- async function readableSettingsBundle(path38) {
27350
+ async function readableSettingsBundle(path39) {
27351
27351
  try {
27352
- const root = await (0, import_promises.stat)((0, import_node_path.join)(path38, "Root.plist"));
27352
+ const root = await (0, import_promises.stat)((0, import_node_path.join)(path39, "Root.plist"));
27353
27353
  return root.isFile() && root.size <= MAX_PLIST_BYTES;
27354
27354
  } catch {
27355
27355
  return false;
@@ -27394,11 +27394,11 @@ async function settingsBundleFingerprint(bundlePath) {
27394
27394
  return null;
27395
27395
  }
27396
27396
  }
27397
- async function parsePlistRecord(path38) {
27397
+ async function parsePlistRecord(path39) {
27398
27398
  try {
27399
- const metadata = await (0, import_promises.stat)(path38);
27399
+ const metadata = await (0, import_promises.stat)(path39);
27400
27400
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
27401
- const source = await (0, import_promises.readFile)(path38, "utf8");
27401
+ const source = await (0, import_promises.readFile)(path39, "utf8");
27402
27402
  const parsed = parsePlistSource(source);
27403
27403
  return isRecord2(parsed) ? parsed : null;
27404
27404
  } catch {
@@ -27744,7 +27744,7 @@ async function tcpPing(port, timeout = TCP_GATE_MS) {
27744
27744
  return null;
27745
27745
  }
27746
27746
  }
27747
- function httpGet(hostname, port, path38, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
27747
+ function httpGet(hostname, port, path39, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
27748
27748
  return new Promise((resolve10) => {
27749
27749
  let settled = false;
27750
27750
  let killing = false;
@@ -27753,7 +27753,7 @@ function httpGet(hostname, port, path38, method = "GET", timeout = TIMEOUT_MS, h
27753
27753
  settled = true;
27754
27754
  resolve10(value);
27755
27755
  };
27756
- const req = import_http.default.request({ hostname, port, path: path38, method, headers }, (res) => {
27756
+ const req = import_http.default.request({ hostname, port, path: path39, method, headers }, (res) => {
27757
27757
  let body = "";
27758
27758
  res.on("data", (c) => body += c.toString());
27759
27759
  const contentType = (() => {
@@ -31881,8 +31881,8 @@ function pickImagesetFile(images) {
31881
31881
  scale: pick.scale === "2x" ? 2 : pick.scale === "3x" ? 3 : 1
31882
31882
  };
31883
31883
  }
31884
- function flatScale(path38) {
31885
- const match = /@([23])x\.[^./]+$/.exec(path38);
31884
+ function flatScale(path39) {
31885
+ const match = /@([23])x\.[^./]+$/.exec(path39);
31886
31886
  return match ? Number(match[1]) : 1;
31887
31887
  }
31888
31888
  function providesNamespace(text3) {
@@ -31909,13 +31909,13 @@ function catalogEntryName(contentsPath, kind, readText2) {
31909
31909
  }
31910
31910
  return segments.join("/");
31911
31911
  }
31912
- function isFlatResourceImage(path38) {
31913
- return path38.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path38));
31912
+ function isFlatResourceImage(path39) {
31913
+ return path39.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path39));
31914
31914
  }
31915
31915
  function enumerateBundleImages(paths, readText2) {
31916
31916
  const table = [];
31917
31917
  const seen = /* @__PURE__ */ new Set();
31918
- const catalogs = paths.filter((path38) => baseOf(path38) === "Contents.json");
31918
+ const catalogs = paths.filter((path39) => baseOf(path39) === "Contents.json");
31919
31919
  for (const contentsPath of catalogs) {
31920
31920
  const name2 = catalogEntryName(contentsPath, ".imageset", readText2);
31921
31921
  if (name2 === null || seen.has(name2)) continue;
@@ -31936,12 +31936,12 @@ function enumerateBundleImages(paths, readText2) {
31936
31936
  seen.add(name2);
31937
31937
  table.push({ name: name2, file: `${dir}/${pick.filename}`, scale: pick.scale });
31938
31938
  }
31939
- for (const path38 of paths) {
31940
- if (!isFlatResourceImage(path38)) continue;
31941
- const name2 = baseOf(path38).slice(0, -extOf(path38).length);
31939
+ for (const path39 of paths) {
31940
+ if (!isFlatResourceImage(path39)) continue;
31941
+ const name2 = baseOf(path39).slice(0, -extOf(path39).length);
31942
31942
  if (name2 === "" || seen.has(name2)) continue;
31943
31943
  seen.add(name2);
31944
- table.push({ name: name2, file: path38, scale: flatScale(path38) });
31944
+ table.push({ name: name2, file: path39, scale: flatScale(path39) });
31945
31945
  }
31946
31946
  return table;
31947
31947
  }
@@ -31970,7 +31970,7 @@ function colorsetValue(color) {
31970
31970
  }
31971
31971
  function enumerateBundleColors(paths, readText2) {
31972
31972
  const table = {};
31973
- for (const contentsPath of paths.filter((path38) => baseOf(path38) === "Contents.json")) {
31973
+ for (const contentsPath of paths.filter((path39) => baseOf(path39) === "Contents.json")) {
31974
31974
  const name2 = catalogEntryName(contentsPath, ".colorset", readText2);
31975
31975
  if (name2 === null || name2 in table) continue;
31976
31976
  let colors;
@@ -32034,8 +32034,8 @@ function axisExtremes(points) {
32034
32034
  function pathBounds(d) {
32035
32035
  const xs = [];
32036
32036
  const ys = [];
32037
- for (const path38 of d)
32038
- (0, import_svgpath.default)(path38).abs().unshort().unarc().iterate((segment, _index, x, y) => {
32037
+ for (const path39 of d)
32038
+ (0, import_svgpath.default)(path39).abs().unshort().unarc().iterate((segment, _index, x, y) => {
32039
32039
  const [command, ...args] = segment;
32040
32040
  if (command === "M" || command === "L") {
32041
32041
  xs.push(Number(args[0]));
@@ -32062,7 +32062,7 @@ function guide(svg, id, axis) {
32062
32062
  }
32063
32063
  function enumerateBundleSymbols(paths, readText2) {
32064
32064
  const table = {};
32065
- for (const contentsPath of paths.filter((path38) => baseOf(path38) === "Contents.json")) {
32065
+ for (const contentsPath of paths.filter((path39) => baseOf(path39) === "Contents.json")) {
32066
32066
  const name2 = catalogEntryName(contentsPath, ".symbolset", readText2);
32067
32067
  if (name2 === null || name2 in table) continue;
32068
32068
  let symbols;
@@ -32095,8 +32095,8 @@ function enumerateBundleSymbols(paths, readText2) {
32095
32095
  viewBox: "0 0 24 24",
32096
32096
  advance,
32097
32097
  box: [12 - advance / 2, 12 - tall / 2, advance, tall],
32098
- layers: d.map((path38) => ({
32099
- d: (0, import_svgpath.default)(path38).abs().scale(scale).translate(translateX, translateY).round(3).toString()
32098
+ layers: d.map((path39) => ({
32099
+ d: (0, import_svgpath.default)(path39).abs().scale(scale).translate(translateX, translateY).round(3).toString()
32100
32100
  }))
32101
32101
  };
32102
32102
  }
@@ -32106,7 +32106,7 @@ function enumerateBundleJson(paths) {
32106
32106
  const found = [];
32107
32107
  const seen = /* @__PURE__ */ new Set();
32108
32108
  const ordered = [...paths].filter(
32109
- (path38) => path38.split("/").includes("Resources") && path38.split("/").every((segment) => segment !== "" && segment !== "..") && (extOf(path38) === ".json" || extOf(path38) === ".xcstrings")
32109
+ (path39) => path39.split("/").includes("Resources") && path39.split("/").every((segment) => segment !== "" && segment !== "..") && (extOf(path39) === ".json" || extOf(path39) === ".xcstrings")
32110
32110
  ).sort((a, b) => {
32111
32111
  const aDepth = a.split("/").length;
32112
32112
  const bDepth = b.split("/").length;
@@ -33405,10 +33405,10 @@ function emitSwiftStandin(graphs, options) {
33405
33405
  owners.push(...physical.map(() => current));
33406
33406
  };
33407
33407
  const scoped = (body) => (symbol, ...rest) => {
33408
- const path38 = pathOf(symbol);
33409
- if (omit.has(path38)) return void skipped.push({ path: path38, reason: omit.get(path38) });
33408
+ const path39 = pathOf(symbol);
33409
+ if (omit.has(path39)) return void skipped.push({ path: path39, reason: omit.get(path39) });
33410
33410
  const previous = current;
33411
- current = path38;
33411
+ current = path39;
33412
33412
  try {
33413
33413
  body(symbol, ...rest);
33414
33414
  } finally {
@@ -33428,14 +33428,14 @@ function emitSwiftStandin(graphs, options) {
33428
33428
  const access = (symbol, openOwner) => symbol.accessLevel === "open" && openOwner ? "open" : "public";
33429
33429
  const emitMember = scoped(
33430
33430
  (member, indent, context) => {
33431
- const path38 = pathOf(member);
33431
+ const path39 = pathOf(member);
33432
33432
  if (TYPE_KINDS.has(member.kind.identifier)) {
33433
33433
  emitType(member, indent);
33434
33434
  return;
33435
33435
  }
33436
33436
  if (member.kind.identifier === "swift.enum.case") return;
33437
33437
  if (!MEMBER_KINDS.has(member.kind.identifier)) {
33438
- skipped.push({ path: path38, reason: `unhandled ${member.kind.identifier}` });
33438
+ skipped.push({ path: path39, reason: `unhandled ${member.kind.identifier}` });
33439
33439
  return;
33440
33440
  }
33441
33441
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(member));
@@ -33449,12 +33449,12 @@ function emitSwiftStandin(graphs, options) {
33449
33449
  const final = context.inClass && flags.has("final") ? "final " : "";
33450
33450
  const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
33451
33451
  let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
33452
- const override = context.inClass && !options.plain?.has(path38) && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path38) || isObjC(member) && path38.endsWith(".init()")) ? "override " : "";
33452
+ const override = context.inClass && !options.plain?.has(path39) && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path39) || isObjC(member) && path39.endsWith(".init()")) ? "override " : "";
33453
33453
  const head = `${indent}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
33454
- const measured = behavior.get(path38);
33455
- if (measured) used.add(path38);
33454
+ const measured = behavior.get(path39);
33455
+ if (measured) used.add(path39);
33456
33456
  const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
33457
- const body = overloadBody ?? measured?.body ?? trap(path38);
33457
+ const body = overloadBody ?? measured?.body ?? trap(path39);
33458
33458
  switch (member.kind.identifier) {
33459
33459
  case "swift.property":
33460
33460
  case "swift.type.property":
@@ -33475,7 +33475,7 @@ function emitSwiftStandin(graphs, options) {
33475
33475
  return;
33476
33476
  }
33477
33477
  emit(
33478
- `${head}${computed} { get${effects} { ${body} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? trap(path38)} }` : ""} }`
33478
+ `${head}${computed} { get${effects} { ${body} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? trap(path39)} }` : ""} }`
33479
33479
  );
33480
33480
  return;
33481
33481
  }
@@ -33528,7 +33528,7 @@ function emitSwiftStandin(graphs, options) {
33528
33528
  };
33529
33529
  const emitType = scoped(
33530
33530
  (symbol, indent) => {
33531
- const path38 = pathOf(symbol);
33531
+ const path39 = pathOf(symbol);
33532
33532
  const id = symbol.identifier.precise;
33533
33533
  const inner = `${indent} `;
33534
33534
  switch (symbol.kind.identifier) {
@@ -33540,10 +33540,10 @@ function emitSwiftStandin(graphs, options) {
33540
33540
  case "swift.class": {
33541
33541
  const shape = header(symbol, "class", indent);
33542
33542
  if (!shape)
33543
- return void skipped.push({ path: path38, reason: `unparsed class ${text(symbol)}` });
33544
- const parent = options.superclasses?.get(path38) ?? superclass.get(id);
33543
+ return void skipped.push({ path: path39, reason: `unparsed class ${text(symbol)}` });
33544
+ const parent = options.superclasses?.get(path39) ?? superclass.get(id);
33545
33545
  const blocked = classBlocked(id);
33546
- if (blocked) return void skipped.push({ path: path38, reason: blocked });
33546
+ if (blocked) return void skipped.push({ path: path39, reason: blocked });
33547
33547
  const ancestors = /* @__PURE__ */ new Set();
33548
33548
  for (let at = superId.get(id); at; at = superId.get(at))
33549
33549
  for (const name2 of conforms.get(at) ?? []) ancestors.add(name2);
@@ -33559,9 +33559,9 @@ function emitSwiftStandin(graphs, options) {
33559
33559
  `${indent}${shape.attrs}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
33560
33560
  );
33561
33561
  const members = membersOf(id);
33562
- const extra = options.behavior?.get(path38)?.members;
33562
+ const extra = options.behavior?.get(path39)?.members;
33563
33563
  if (extra) {
33564
- used.add(path38);
33564
+ used.add(path39);
33565
33565
  emit(`${inner}${extra}`);
33566
33566
  }
33567
33567
  for (const member of members)
@@ -33613,13 +33613,13 @@ function emitSwiftStandin(graphs, options) {
33613
33613
  continue;
33614
33614
  have.add(witnessKey(member));
33615
33615
  have.add(sideLeaf(member));
33616
- emitWitness(member, inner, path38);
33616
+ emitWitness(member, inner, path39);
33617
33617
  }
33618
33618
  }
33619
33619
  const coder = members.some((member) => leaf(member) === "init(coder:)");
33620
33620
  if (designated && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
33621
33621
  emit(
33622
- `${inner}public required init?(coder: NSCoder) { ${trap(`${path38}.init(coder:)`)} }`
33622
+ `${inner}public required init?(coder: NSCoder) { ${trap(`${path39}.init(coder:)`)} }`
33623
33623
  );
33624
33624
  emit(`${indent}}`);
33625
33625
  return;
@@ -33627,7 +33627,7 @@ function emitSwiftStandin(graphs, options) {
33627
33627
  case "swift.struct": {
33628
33628
  const shape = header(symbol, "struct", indent);
33629
33629
  if (!shape)
33630
- return void skipped.push({ path: path38, reason: `unparsed struct ${text(symbol)}` });
33630
+ return void skipped.push({ path: path39, reason: `unparsed struct ${text(symbol)}` });
33631
33631
  const members = membersOf(id);
33632
33632
  const raw2 = rawType(members);
33633
33633
  const list2 = inheritance(id);
@@ -33659,7 +33659,7 @@ function emitSwiftStandin(graphs, options) {
33659
33659
  case "swift.enum": {
33660
33660
  const shape = header(symbol, "enum", indent);
33661
33661
  if (!shape)
33662
- return void skipped.push({ path: path38, reason: `unparsed enum ${text(symbol)}` });
33662
+ return void skipped.push({ path: path39, reason: `unparsed enum ${text(symbol)}` });
33663
33663
  const members = membersOf(id);
33664
33664
  const raw2 = rawType(members);
33665
33665
  const cases = members.filter(
@@ -33668,7 +33668,7 @@ function emitSwiftStandin(graphs, options) {
33668
33668
  const missing = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
33669
33669
  if (raw2 && isObjC(symbol) && missing.length > 0)
33670
33670
  return void skipped.push({
33671
- path: path38,
33671
+ path: path39,
33672
33672
  reason: `no header value for ${missing.map(leaf).join(", ")}`
33673
33673
  });
33674
33674
  const list2 = inheritance(id, raw2 ?? void 0).filter(
@@ -33708,7 +33708,7 @@ function emitSwiftStandin(graphs, options) {
33708
33708
  const shape = header(symbol, "protocol", indent);
33709
33709
  if (!shape)
33710
33710
  return void skipped.push({
33711
- path: path38,
33711
+ path: path39,
33712
33712
  reason: `unparsed protocol ${text(symbol)}`
33713
33713
  });
33714
33714
  const list2 = [...isObjC(symbol) ? ["AnyObject"] : [], ...inheritance(id)];
@@ -33733,7 +33733,7 @@ function emitSwiftStandin(graphs, options) {
33733
33733
  }
33734
33734
  emit(`${indent}}`);
33735
33735
  if (defaults.length > 0) {
33736
- emit(`${indent}extension ${path38} {`);
33736
+ emit(`${indent}extension ${path39} {`);
33737
33737
  for (const member of defaults) {
33738
33738
  const decl = text(member);
33739
33739
  if (optional.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
@@ -33779,7 +33779,7 @@ function emitSwiftStandin(graphs, options) {
33779
33779
  return init ? /rawValue:\s*([^)]+)\)/.exec(text(init))?.[1]?.trim() ?? null : null;
33780
33780
  };
33781
33781
  const emitGlobal = scoped((symbol) => {
33782
- const path38 = pathOf(symbol);
33782
+ const path39 = pathOf(symbol);
33783
33783
  const kind = symbol.kind.identifier;
33784
33784
  if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
33785
33785
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol));
@@ -33790,17 +33790,17 @@ function emitSwiftStandin(graphs, options) {
33790
33790
  if (fix && !/^(?:prefix|infix|postfix)\b/.test(spelled))
33791
33791
  spelled = `${fix} ${spelled}`;
33792
33792
  }
33793
- emit(`${attrs}public ${spelled} { ${trap(path38)} }`);
33793
+ emit(`${attrs}public ${spelled} { ${trap(path39)} }`);
33794
33794
  } else if (kind === "swift.var") {
33795
33795
  const parsed = splitAccessors(text(symbol).replace(/^let /, "var "));
33796
- const measured = behavior.get(path38);
33797
- if (measured) used.add(path38);
33798
- emit(`public ${parsed.decl} { ${measured?.body ?? trap(path38)} }`);
33799
- } else skipped.push({ path: path38, reason: `unhandled top-level ${kind}` });
33796
+ const measured = behavior.get(path39);
33797
+ if (measured) used.add(path39);
33798
+ emit(`public ${parsed.decl} { ${measured?.body ?? trap(path39)} }`);
33799
+ } else skipped.push({ path: path39, reason: `unhandled top-level ${kind}` });
33800
33800
  });
33801
33801
  const roots = [...byId.values()].filter((symbol) => !owner.has(symbol.identifier.precise) && !unavailable(symbol)).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
33802
33802
  for (const symbol of roots) {
33803
- const path38 = pathOf(symbol);
33803
+ const path39 = pathOf(symbol);
33804
33804
  if (TYPE_KINDS.has(symbol.kind.identifier)) emitType(symbol, "");
33805
33805
  else emitGlobal(symbol);
33806
33806
  }
@@ -33841,9 +33841,9 @@ function emitSwiftStandin(graphs, options) {
33841
33841
  ...imports.map((name2) => `import ${name2}`),
33842
33842
  ""
33843
33843
  ];
33844
- for (const path38 of behavior.keys())
33845
- if (!used.has(path38))
33846
- skipped.push({ path: path38, reason: "behavior names no emitted declaration" });
33844
+ for (const path39 of behavior.keys())
33845
+ if (!used.has(path39))
33846
+ skipped.push({ path: path39, reason: "behavior names no emitted declaration" });
33847
33847
  return {
33848
33848
  source: `${[...banner, ...lines].join("\n")}
33849
33849
  `,
@@ -33929,7 +33929,7 @@ var init_swift_standin_emit = __esm({
33929
33929
  sideLeaf = (symbol) => `${symbol.kind.identifier.startsWith("swift.type.") ? "type" : "instance"}|leaf|${leaf(symbol)}`;
33930
33930
  isObjC = (symbol) => symbol.identifier.precise.startsWith("c:");
33931
33931
  synthesizedEquality = (symbol, conforms) => conforms.includes("Hashable") ? ["==(_:_:)", "hash(into:)", "hashValue"].includes(leaf(symbol)) : conforms.includes("Equatable") && leaf(symbol) === "==(_:_:)";
33932
- trap = (path38) => `fatalError("${path38} is a binary framework peach cannot run")`;
33932
+ trap = (path39) => `fatalError("${path39} is a binary framework peach cannot run")`;
33933
33933
  KEYWORDS = /* @__PURE__ */ new Set([
33934
33934
  "Type",
33935
33935
  "Protocol",
@@ -36647,6 +36647,9 @@ function nativeTargets(project) {
36647
36647
  }
36648
36648
  return refs;
36649
36649
  }
36650
+ function listXcodeAppTargets(xcodeprojOrWorkspace) {
36651
+ return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(nativeTargets).filter((ref) => ref.target.productType === APPLICATION).map((ref) => str(ref.target.name) ?? ref.id);
36652
+ }
36650
36653
  function readXcodeAppTarget(input, targetName) {
36651
36654
  const xcodeprojOrWorkspace = import_node_fs18.default.realpathSync(input);
36652
36655
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
@@ -38225,8 +38228,8 @@ function sourceEntryPath() {
38225
38228
  return null;
38226
38229
  }
38227
38230
  }
38228
- function isCliEntry(path38) {
38229
- const name2 = (0, import_node_path22.basename)(path38);
38231
+ function isCliEntry(path39) {
38232
+ const name2 = (0, import_node_path22.basename)(path39);
38230
38233
  return name2 === "bin.ts" || name2 === "bin.js";
38231
38234
  }
38232
38235
  function rnxSelfInvocation() {
@@ -43141,8 +43144,8 @@ function metroIosAssetDestRelatives(httpServerLocation, filename) {
43141
43144
  }
43142
43145
  const out = [];
43143
43146
  for (const dir of dirs) {
43144
- const path38 = `${dir}/${filename}`;
43145
- if (!out.includes(path38)) out.push(path38);
43147
+ const path39 = `${dir}/${filename}`;
43148
+ if (!out.includes(path39)) out.push(path39);
43146
43149
  }
43147
43150
  if (!out.includes(filename)) out.push(filename);
43148
43151
  return out;
@@ -44106,13 +44109,13 @@ function readFactoryStringLiterals(factory) {
44106
44109
  return literals;
44107
44110
  }
44108
44111
  function normalizeFingerprintLiteral(literal) {
44109
- const path38 = literal.replaceAll("\\\\", "/").replaceAll("\\/", "/");
44112
+ const path39 = literal.replaceAll("\\\\", "/").replaceAll("\\/", "/");
44110
44113
  const nodeModulesMarker = "/node_modules/";
44111
- const nodeModulesIndex = path38.lastIndexOf(nodeModulesMarker);
44114
+ const nodeModulesIndex = path39.lastIndexOf(nodeModulesMarker);
44112
44115
  if (nodeModulesIndex >= 0) {
44113
- return `node_modules/${path38.slice(nodeModulesIndex + nodeModulesMarker.length)}`;
44116
+ return `node_modules/${path39.slice(nodeModulesIndex + nodeModulesMarker.length)}`;
44114
44117
  }
44115
- if ((path38.startsWith("/") || /^[A-Za-z]:\//.test(path38) || path38.startsWith("file:/")) && /\.[cm]?[jt]sx?(?::\d+(?::\d+)?)?$/.test(path38)) {
44118
+ if ((path39.startsWith("/") || /^[A-Za-z]:\//.test(path39) || path39.startsWith("file:/")) && /\.[cm]?[jt]sx?(?::\d+(?::\d+)?)?$/.test(path39)) {
44116
44119
  return null;
44117
44120
  }
44118
44121
  return literal;
@@ -44350,10 +44353,10 @@ function templateAssignment(template, embeddings) {
44350
44353
  if (existingNode !== void 0 && existingNode !== nodeIndex) return null;
44351
44354
  nodesByModuleId.set(moduleId, nodeIndex);
44352
44355
  const node = template.nodes[nodeIndex];
44353
- const path38 = node.landmarkPath ?? `node_modules/${template.packageName}/__rnx_inferred__/${moduleId}.js`;
44356
+ const path39 = node.landmarkPath ?? `node_modules/${template.packageName}/__rnx_inferred__/${moduleId}.js`;
44354
44357
  const existingPath = pathsByModuleId.get(moduleId);
44355
- if (existingPath !== void 0 && existingPath !== path38) return null;
44356
- pathsByModuleId.set(moduleId, path38);
44358
+ if (existingPath !== void 0 && existingPath !== path39) return null;
44359
+ pathsByModuleId.set(moduleId, path39);
44357
44360
  }
44358
44361
  }
44359
44362
  return {
@@ -44515,14 +44518,14 @@ async function inferMetroModuleIdentity(args) {
44515
44518
  const packageClaims = claimsByPackage.values().next().value;
44516
44519
  if (!packageClaims) continue;
44517
44520
  const exactClaims = packageClaims.filter((assignment2) => {
44518
- const path38 = assignment2.pathsByModuleId.get(moduleId);
44519
- return path38 !== void 0 && !path38.includes("/__rnx_inferred__/");
44521
+ const path39 = assignment2.pathsByModuleId.get(moduleId);
44522
+ return path39 !== void 0 && !path39.includes("/__rnx_inferred__/");
44520
44523
  });
44521
44524
  const preferredClaims = exactClaims.length > 0 ? exactClaims : packageClaims;
44522
44525
  const routes = new Set(
44523
44526
  preferredClaims.flatMap((assignment2) => {
44524
- const path38 = assignment2.pathsByModuleId.get(moduleId);
44525
- return path38 ? [metroFingerprintModuleClaimRoute(assignment2.packageName, path38)] : [];
44527
+ const path39 = assignment2.pathsByModuleId.get(moduleId);
44528
+ return path39 ? [metroFingerprintModuleClaimRoute(assignment2.packageName, path39)] : [];
44526
44529
  })
44527
44530
  );
44528
44531
  if (routes.size !== 1) continue;
@@ -44878,8 +44881,8 @@ function metadataValue(value, key2) {
44878
44881
  if (!value || typeof value !== "object") return void 0;
44879
44882
  return Object.getOwnPropertyDescriptor(value, key2)?.value;
44880
44883
  }
44881
- function readProjectJson(path38, files2 = nodeRepoFileReader) {
44882
- const text3 = readProjectMetadata(path38, files2);
44884
+ function readProjectJson(path39, files2 = nodeRepoFileReader) {
44885
+ const text3 = readProjectMetadata(path39, files2);
44883
44886
  if (text3 === null) return null;
44884
44887
  try {
44885
44888
  const value = JSON.parse(text3);
@@ -48864,11 +48867,11 @@ async function evalInBridge(bridge, code, opts = {}) {
48864
48867
  if (opts.acquireLock) payload.acquireLock = true;
48865
48868
  return bridge.send(payload);
48866
48869
  }
48867
- async function callInBridge(bridge, path38, ...args) {
48868
- return bridge.send({ type: "call", path: path38, args });
48870
+ async function callInBridge(bridge, path39, ...args) {
48871
+ return bridge.send({ type: "call", path: path39, args });
48869
48872
  }
48870
- async function callInBridgeWrite(bridge, path38, ...args) {
48871
- return bridge.send({ type: "call", path: path38, args, acquireLock: true });
48873
+ async function callInBridgeWrite(bridge, path39, ...args) {
48874
+ return bridge.send({ type: "call", path: path39, args, acquireLock: true });
48872
48875
  }
48873
48876
  var import_node_fs32, import_node_path33, import_ws2, PEACH_PLACEMENT_ENV, resolvedWorld, BridgeSimLockedError, DisconnectedSimError, BRIDGE_VALUE_FLAGS_TABLE, BRIDGE_VALUE_FLAGS;
48874
48877
  var init_ws_bridge = __esm({
@@ -49005,8 +49008,8 @@ function getDefaultPortForProtocol(protocol) {
49005
49008
  return protocol === "https:" ? 443 : 80;
49006
49009
  }
49007
49010
  function isBaseServerUrl(url) {
49008
- const path38 = url.pathname || "/";
49009
- return (path38 === "/" || path38 === "") && !url.search && !url.hash;
49011
+ const path39 = url.pathname || "/";
49012
+ return (path39 === "/" || path39 === "") && !url.search && !url.hash;
49010
49013
  }
49011
49014
  async function resolvePortViaServerScan(port) {
49012
49015
  try {
@@ -49307,6 +49310,165 @@ var init_flow_timeout_scale = __esm({
49307
49310
  }
49308
49311
  });
49309
49312
 
49313
+ // src/native-firebase-config.ts
49314
+ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
49315
+ const result = {};
49316
+ let config = {};
49317
+ const appJsonPath = import_node_path35.default.join(projectRoot, "app.json");
49318
+ const appJson = import_node_fs34.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs34.default.readFileSync(appJsonPath, "utf8")) : null;
49319
+ const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
49320
+ (value) => isRecord(value) && typeof value.googleServicesFile === "string"
49321
+ ));
49322
+ const dynamicExpo = [
49323
+ "app.config.js",
49324
+ "app.config.ts",
49325
+ "app.config.cjs",
49326
+ "app.config.mjs"
49327
+ ].some((name2) => import_node_fs34.default.existsSync(import_node_path35.default.join(projectRoot, name2)));
49328
+ if (staticExpo || dynamicExpo) {
49329
+ const require4 = (0, import_node_module2.createRequire)(import_node_path35.default.join(projectRoot, "package.json"));
49330
+ const configModule = require4("@expo/config");
49331
+ if (!isRecord(configModule) || typeof configModule.getConfig !== "function")
49332
+ throw new Error("Expo native configuration is unavailable.");
49333
+ const resolved = Reflect.apply(configModule.getConfig, configModule, [
49334
+ projectRoot,
49335
+ { skipSDKVersionRequirement: true }
49336
+ ]);
49337
+ config = isRecord(resolved) && isRecord(resolved.exp) ? resolved.exp : {};
49338
+ }
49339
+ const ios = config.ios;
49340
+ if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
49341
+ const iosRoot = import_node_path35.default.join(projectRoot, "ios");
49342
+ if (import_node_fs34.default.existsSync(iosRoot)) {
49343
+ const projects2 = import_node_fs34.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
49344
+ if (projects2.length > 1)
49345
+ throw new Error("native Firebase configuration requires a selected Xcode project");
49346
+ if (projects2.length === 1) {
49347
+ const xcodeproj = import_node_path35.default.join(iosRoot, projects2[0].name);
49348
+ const appTargets = listXcodeAppTargets(xcodeproj);
49349
+ if (appTargets.length > 1)
49350
+ throw new Error("native Firebase configuration requires a selected app target");
49351
+ if (appTargets.length === 1) {
49352
+ const app = readXcodeAppTarget(xcodeproj, appTargets[0]);
49353
+ const delegates = app.allSources.filter(
49354
+ (file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path35.default.basename(file))
49355
+ );
49356
+ const defaultConfigured = delegates.some((file) => {
49357
+ const source = import_node_fs34.default.readFileSync(file, "utf8").replace(
49358
+ /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
49359
+ (token) => token.startsWith('"') ? '""' : token.replace(/[^\n]/g, " ")
49360
+ );
49361
+ const launch2 = /(?:\bfunc\s+application\s*\([\s\S]*?didFinishLaunchingWithOptions[\s\S]*?\)\s*->\s*Bool|^-\s*\(BOOL\)\s*application\s*:[\s\S]*?didFinishLaunchingWithOptions[^\{]*)\s*\{/m.exec(
49362
+ source
49363
+ );
49364
+ if (!launch2) return false;
49365
+ const body = source.slice(launch2.index + launch2[0].length);
49366
+ const configure = /^\s*(?:FirebaseApp\s*\.\s*configure\s*\(\s*\)|\[FIRApp\s+configure\])/m.exec(
49367
+ body
49368
+ );
49369
+ if (!configure) return false;
49370
+ const before = body.slice(0, configure.index);
49371
+ let depth = 1;
49372
+ for (const token of before) {
49373
+ if (token === "{") depth += 1;
49374
+ if (token === "}") depth -= 1;
49375
+ if (depth === 0) return false;
49376
+ }
49377
+ if (depth !== 1 || /\b(?:return|throw)\b|^\s*#(?:if|elseif|else)/m.test(before))
49378
+ throw new Error(
49379
+ "native Firebase initialization must be unconditional in the app launch method"
49380
+ );
49381
+ return true;
49382
+ });
49383
+ if (defaultConfigured) {
49384
+ const resources = app.resources.filter(
49385
+ (file) => /^GoogleService-Info\.plist$/.test(import_node_path35.default.basename(file))
49386
+ );
49387
+ if (resources.length !== 1)
49388
+ throw new Error(
49389
+ "native Firebase default initialization requires one GoogleService-Info.plist build resource"
49390
+ );
49391
+ config.ios = {
49392
+ googleServicesFile: import_node_path35.default.relative(
49393
+ import_node_fs34.default.realpathSync(projectRoot),
49394
+ resources[0]
49395
+ )
49396
+ };
49397
+ }
49398
+ }
49399
+ }
49400
+ }
49401
+ }
49402
+ for (const platform of platforms) {
49403
+ const native = config[platform];
49404
+ if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
49405
+ try {
49406
+ const source = import_node_fs34.default.readFileSync(
49407
+ import_node_path35.default.resolve(projectRoot, native.googleServicesFile),
49408
+ "utf8"
49409
+ );
49410
+ const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
49411
+ if (!isRecord(parsed)) throw new Error("Invalid Google services file.");
49412
+ if (platform === "ios") {
49413
+ result[platform] = {
49414
+ apiKey: parsed.API_KEY,
49415
+ appId: parsed.GOOGLE_APP_ID,
49416
+ projectId: parsed.PROJECT_ID,
49417
+ databaseURL: parsed.DATABASE_URL,
49418
+ gaTrackingId: parsed.TRACKING_ID,
49419
+ storageBucket: parsed.STORAGE_BUCKET,
49420
+ messagingSenderId: parsed.GCM_SENDER_ID,
49421
+ clientId: parsed.CLIENT_ID,
49422
+ androidClientID: parsed.ANDROID_CLIENT_ID,
49423
+ deepLinkUrlScheme: parsed.REVERSED_CLIENT_ID
49424
+ };
49425
+ } else {
49426
+ const project = isRecord(parsed.project_info) ? parsed.project_info : {};
49427
+ const clients = Array.isArray(parsed.client) ? parsed.client : [];
49428
+ const client = clients.find((value) => {
49429
+ if (!isRecord(value) || !isRecord(value.client_info)) return false;
49430
+ const android = value.client_info.android_client_info;
49431
+ return isRecord(android) && android.package_name === native.package;
49432
+ });
49433
+ if (!isRecord(client) || !isRecord(client.client_info))
49434
+ throw new Error("No Google services client matches the Android package.");
49435
+ const apiKeys = Array.isArray(client.api_key) ? client.api_key : [];
49436
+ const apiKey = apiKeys.find(
49437
+ (value) => isRecord(value) && typeof value.current_key === "string"
49438
+ );
49439
+ const oauthClients = Array.isArray(client.oauth_client) ? client.oauth_client : [];
49440
+ const oauth = oauthClients.find(
49441
+ (value) => isRecord(value) && value.client_type === 3
49442
+ );
49443
+ result[platform] = {
49444
+ apiKey: isRecord(apiKey) ? apiKey.current_key : void 0,
49445
+ appId: client.client_info.mobilesdk_app_id,
49446
+ projectId: project.project_id,
49447
+ databaseURL: project.firebase_url,
49448
+ storageBucket: project.storage_bucket,
49449
+ messagingSenderId: project.project_number,
49450
+ clientId: isRecord(oauth) ? oauth.client_id : void 0
49451
+ };
49452
+ }
49453
+ } catch (error) {
49454
+ result[platform] = { error: error instanceof Error ? error.message : String(error) };
49455
+ }
49456
+ }
49457
+ return result;
49458
+ }
49459
+ var import_node_fs34, import_node_module2, import_node_path35;
49460
+ var init_native_firebase_config = __esm({
49461
+ "src/native-firebase-config.ts"() {
49462
+ "use strict";
49463
+ import_node_fs34 = __toESM(require("node:fs"), 1);
49464
+ import_node_module2 = require("node:module");
49465
+ import_node_path35 = __toESM(require("node:path"), 1);
49466
+ init_is_record();
49467
+ init_plist();
49468
+ init_xcode_project();
49469
+ }
49470
+ });
49471
+
49310
49472
  // src/profiles.ts
49311
49473
  function normalizeProfileId(input) {
49312
49474
  const id = input.trim();
@@ -49414,59 +49576,59 @@ var init_profiles = __esm({
49414
49576
  // cli/app-catalog.ts
49415
49577
  function listDir(dir) {
49416
49578
  try {
49417
- return import_node_fs34.default.readdirSync(dir, { withFileTypes: true });
49579
+ return import_node_fs35.default.readdirSync(dir, { withFileTypes: true });
49418
49580
  } catch {
49419
49581
  return [];
49420
49582
  }
49421
49583
  }
49422
49584
  function readText(file) {
49423
49585
  try {
49424
- return import_node_fs34.default.readFileSync(file, "utf8");
49586
+ return import_node_fs35.default.readFileSync(file, "utf8");
49425
49587
  } catch {
49426
49588
  return null;
49427
49589
  }
49428
49590
  }
49429
49591
  function catalogFiles(dir, found) {
49430
49592
  for (const entry of listDir(dir)) {
49431
- const full = import_node_path35.default.join(dir, entry.name);
49593
+ const full = import_node_path36.default.join(dir, entry.name);
49432
49594
  if (entry.isDirectory()) catalogFiles(full, found);
49433
49595
  else if (entry.name === "Contents.json") found.push(full);
49434
49596
  }
49435
49597
  }
49436
49598
  function discoverAppCatalog(appDir) {
49437
- const iosDir = import_node_path35.default.join(appDir, "ios");
49599
+ const iosDir = import_node_path36.default.join(appDir, "ios");
49438
49600
  const target = listDir(iosDir).find(
49439
- (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir(import_node_path35.default.join(iosDir, entry.name)).some(
49601
+ (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir(import_node_path36.default.join(iosDir, entry.name)).some(
49440
49602
  (file) => /^AppDelegate\.(swift|mm|m)$/.test(file.name)
49441
49603
  )
49442
49604
  );
49443
49605
  if (!target) return null;
49444
- const targetDir = import_node_path35.default.join(iosDir, target.name);
49606
+ const targetDir = import_node_path36.default.join(iosDir, target.name);
49445
49607
  const files2 = [];
49446
49608
  for (const entry of listDir(targetDir)) {
49447
49609
  if (entry.isDirectory() && entry.name.endsWith(".xcassets"))
49448
- catalogFiles(import_node_path35.default.join(targetDir, entry.name), files2);
49610
+ catalogFiles(import_node_path36.default.join(targetDir, entry.name), files2);
49449
49611
  }
49450
49612
  const relative3 = files2.map(
49451
- (file) => import_node_path35.default.relative(targetDir, file).split(import_node_path35.default.sep).join(import_node_path35.default.posix.sep)
49613
+ (file) => import_node_path36.default.relative(targetDir, file).split(import_node_path36.default.sep).join(import_node_path36.default.posix.sep)
49452
49614
  );
49453
49615
  const colors = enumerateBundleColors(
49454
49616
  relative3,
49455
- (candidate) => candidate.endsWith("Contents.json") ? readText(import_node_path35.default.join(targetDir, candidate)) : null
49617
+ (candidate) => candidate.endsWith("Contents.json") ? readText(import_node_path36.default.join(targetDir, candidate)) : null
49456
49618
  );
49457
49619
  const pbxproj = listDir(iosDir).find((entry) => entry.name.endsWith(".xcodeproj"));
49458
- const accentName = readText(import_node_path35.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path35.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
49620
+ const accentName = readText(import_node_path36.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path36.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
49459
49621
  ACCENT_BUILD_SETTING
49460
49622
  )?.[1] : void 0) ?? null;
49461
49623
  if (accentName === null && Object.keys(colors).length === 0) return null;
49462
49624
  return { colors, accentName };
49463
49625
  }
49464
- var import_node_fs34, import_node_path35, ACCENT_BUILD_SETTING, PLIST_ACCENT;
49626
+ var import_node_fs35, import_node_path36, ACCENT_BUILD_SETTING, PLIST_ACCENT;
49465
49627
  var init_app_catalog = __esm({
49466
49628
  "cli/app-catalog.ts"() {
49467
49629
  "use strict";
49468
- import_node_fs34 = __toESM(require("node:fs"), 1);
49469
- import_node_path35 = __toESM(require("node:path"), 1);
49630
+ import_node_fs35 = __toESM(require("node:fs"), 1);
49631
+ import_node_path36 = __toESM(require("node:path"), 1);
49470
49632
  init_bundleAssets();
49471
49633
  ACCENT_BUILD_SETTING = /ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "?([^";]+)"?;/;
49472
49634
  PLIST_ACCENT = /<key>NSAccentColorName<\/key>\s*<string>([^<]+)<\/string>/;
@@ -49476,9 +49638,9 @@ var init_app_catalog = __esm({
49476
49638
  // cli/app-project.ts
49477
49639
  function firstNamedFile(dir, names) {
49478
49640
  for (const name2 of names) {
49479
- const candidate = import_node_path36.default.join(dir, name2);
49641
+ const candidate = import_node_path37.default.join(dir, name2);
49480
49642
  try {
49481
- if (import_node_fs35.default.statSync(candidate).isFile()) return candidate;
49643
+ if (import_node_fs36.default.statSync(candidate).isFile()) return candidate;
49482
49644
  } catch {
49483
49645
  }
49484
49646
  }
@@ -49491,24 +49653,24 @@ function findRNXAppConfig(dir) {
49491
49653
  return firstNamedFile(dir, PEACH_APP_CONFIG_NAMES);
49492
49654
  }
49493
49655
  function resolveAppProject(projectRoot) {
49494
- const appDir = import_node_path36.default.resolve(projectRoot);
49656
+ const appDir = import_node_path37.default.resolve(projectRoot);
49495
49657
  try {
49496
- if (!import_node_fs35.default.statSync(appDir).isDirectory()) return null;
49658
+ if (!import_node_fs36.default.statSync(appDir).isDirectory()) return null;
49497
49659
  } catch {
49498
49660
  return null;
49499
49661
  }
49500
49662
  const configPath = findRNXAppConfig(appDir);
49501
- if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs35.default.existsSync(import_node_path36.default.join(appDir, "package.json"))) {
49663
+ if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs36.default.existsSync(import_node_path37.default.join(appDir, "package.json"))) {
49502
49664
  return null;
49503
49665
  }
49504
49666
  return { appDir, configPath };
49505
49667
  }
49506
- var import_node_fs35, import_node_path36, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
49668
+ var import_node_fs36, import_node_path37, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
49507
49669
  var init_app_project = __esm({
49508
49670
  "cli/app-project.ts"() {
49509
49671
  "use strict";
49510
- import_node_fs35 = __toESM(require("node:fs"), 1);
49511
- import_node_path36 = __toESM(require("node:path"), 1);
49672
+ import_node_fs36 = __toESM(require("node:fs"), 1);
49673
+ import_node_path37 = __toESM(require("node:path"), 1);
49512
49674
  EXPO_APP_CONFIG_NAMES = [
49513
49675
  "app.config.js",
49514
49676
  "app.config.ts",
@@ -49531,12 +49693,12 @@ function resolveFileEntries(entries, configDir) {
49531
49693
  return Object.fromEntries(
49532
49694
  Object.entries(entries).map(([name2, resolution]) => [
49533
49695
  name2,
49534
- resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path37.default.resolve(configDir, resolution.file) } : resolution
49696
+ resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path38.default.resolve(configDir, resolution.file) } : resolution
49535
49697
  ])
49536
49698
  );
49537
49699
  }
49538
49700
  function resolveConfigReplacementFiles(config, configPath) {
49539
- const configDir = import_node_path37.default.dirname(configPath);
49701
+ const configDir = import_node_path38.default.dirname(configPath);
49540
49702
  return {
49541
49703
  ...config,
49542
49704
  modules: resolveFileEntries(config.modules, configDir),
@@ -49571,11 +49733,11 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
49571
49733
  const project = resolveAppProject(startDir);
49572
49734
  return { project, config: await loadRNXAppConfig(project) };
49573
49735
  }
49574
- var import_node_path37, import_jiti;
49736
+ var import_node_path38, import_jiti;
49575
49737
  var init_app_config = __esm({
49576
49738
  "cli/app-config.ts"() {
49577
49739
  "use strict";
49578
- import_node_path37 = __toESM(require("node:path"), 1);
49740
+ import_node_path38 = __toESM(require("node:path"), 1);
49579
49741
  import_jiti = require("jiti");
49580
49742
  init_config();
49581
49743
  init_config();
@@ -49635,13 +49797,13 @@ function discoverNativeLinkedAppFontPaths(opts) {
49635
49797
  scannedFontDirectories++;
49636
49798
  let entries;
49637
49799
  try {
49638
- entries = import_node_fs36.default.readdirSync(current.dir, { withFileTypes: true });
49800
+ entries = import_node_fs37.default.readdirSync(current.dir, { withFileTypes: true });
49639
49801
  } catch {
49640
49802
  continue;
49641
49803
  }
49642
49804
  for (const entry of entries) {
49643
49805
  if (entry.isSymbolicLink()) continue;
49644
- const fullPath = import_node_path38.default.join(current.dir, entry.name);
49806
+ const fullPath = import_node_path39.default.join(current.dir, entry.name);
49645
49807
  if (entry.isDirectory()) {
49646
49808
  if (current.depth < 4 && pending.length < 64 && !entry.name.startsWith(".")) {
49647
49809
  pending.push({ dir: fullPath, depth: current.depth + 1 });
@@ -49649,15 +49811,15 @@ function discoverNativeLinkedAppFontPaths(opts) {
49649
49811
  continue;
49650
49812
  }
49651
49813
  if (!entry.isFile() || !/\.(ttf|otf|woff|woff2)$/i.test(entry.name)) continue;
49652
- const relative3 = import_node_path38.default.relative(root, fullPath).split(import_node_path38.default.sep).join("/");
49653
- fontPaths.push(import_node_path38.default.posix.join(metroPathPrefix, relative3));
49814
+ const relative3 = import_node_path39.default.relative(root, fullPath).split(import_node_path39.default.sep).join("/");
49815
+ fontPaths.push(import_node_path39.default.posix.join(metroPathPrefix, relative3));
49654
49816
  if (fontPaths.length >= 256) break;
49655
49817
  }
49656
49818
  }
49657
49819
  };
49658
49820
  try {
49659
49821
  const packageJson = JSON.parse(
49660
- import_node_fs36.default.readFileSync(import_node_path38.default.join(selectedAppDir, "package.json"), "utf8")
49822
+ import_node_fs37.default.readFileSync(import_node_path39.default.join(selectedAppDir, "package.json"), "utf8")
49661
49823
  );
49662
49824
  const dependencyNames = /* @__PURE__ */ new Set();
49663
49825
  for (const field of ["dependencies", "devDependencies", "optionalDependencies"]) {
@@ -49672,32 +49834,32 @@ function discoverNativeLinkedAppFontPaths(opts) {
49672
49834
  const config = Reflect.get(packageJson, "reactNativeVectorIcons");
49673
49835
  const configuredFontDir = config && typeof config === "object" ? Reflect.get(config, "fontDir") : null;
49674
49836
  const configuredDir = typeof configuredFontDir === "string" ? configuredFontDir : "rnvi-fonts";
49675
- const root = import_node_path38.default.resolve(selectedAppDir, configuredDir);
49676
- const relativeRoot = import_node_path38.default.relative(selectedAppDir, root);
49677
- if (!relativeRoot.startsWith("..") && !import_node_path38.default.isAbsolute(relativeRoot)) {
49678
- collectFontFiles(root, relativeRoot.split(import_node_path38.default.sep).join("/"));
49837
+ const root = import_node_path39.default.resolve(selectedAppDir, configuredDir);
49838
+ const relativeRoot = import_node_path39.default.relative(selectedAppDir, root);
49839
+ if (!relativeRoot.startsWith("..") && !import_node_path39.default.isAbsolute(relativeRoot)) {
49840
+ collectFontFiles(root, relativeRoot.split(import_node_path39.default.sep).join("/"));
49679
49841
  }
49680
- const bundleDir = import_node_path38.default.posix.dirname(opts.bundleUrl ? new URL(opts.bundleUrl).pathname : "/").replace(/^\/+/, "");
49681
- const appRelativeDir = bundleDir.split("/").join(import_node_path38.default.sep);
49842
+ const bundleDir = import_node_path39.default.posix.dirname(opts.bundleUrl ? new URL(opts.bundleUrl).pathname : "/").replace(/^\/+/, "");
49843
+ const appRelativeDir = bundleDir.split("/").join(import_node_path39.default.sep);
49682
49844
  const metroRootCandidates = [selectedAppDir];
49683
- if (bundleDir && selectedAppDir.endsWith(import_node_path38.default.sep + appRelativeDir)) {
49845
+ if (bundleDir && selectedAppDir.endsWith(import_node_path39.default.sep + appRelativeDir)) {
49684
49846
  metroRootCandidates.push(selectedAppDir.slice(0, -appRelativeDir.length - 1));
49685
49847
  }
49686
- const vectorIconRequire = (0, import_node_module2.createRequire)(import_node_path38.default.join(selectedAppDir, "package.json"));
49848
+ const vectorIconRequire = (0, import_node_module3.createRequire)(import_node_path39.default.join(selectedAppDir, "package.json"));
49687
49849
  for (const dependencyName of vectorIconDependencies) {
49688
49850
  try {
49689
49851
  const entryPath = vectorIconRequire.resolve(dependencyName);
49690
- const dependencyPath = dependencyName.split("/").join(import_node_path38.default.sep);
49691
- const marker = `${import_node_path38.default.sep}node_modules${import_node_path38.default.sep}${dependencyPath}${import_node_path38.default.sep}`;
49852
+ const dependencyPath = dependencyName.split("/").join(import_node_path39.default.sep);
49853
+ const marker = `${import_node_path39.default.sep}node_modules${import_node_path39.default.sep}${dependencyPath}${import_node_path39.default.sep}`;
49692
49854
  const markerIndex = entryPath.lastIndexOf(marker);
49693
49855
  if (markerIndex === -1) continue;
49694
49856
  const packageRoot = entryPath.slice(0, markerIndex + marker.length - 1);
49695
49857
  const fontsDir = dependencyName === "react-native-vector-icons" ? "Fonts" : "fonts";
49696
- const fontsRoot = import_node_path38.default.join(packageRoot, fontsDir);
49858
+ const fontsRoot = import_node_path39.default.join(packageRoot, fontsDir);
49697
49859
  for (const metroRoot of metroRootCandidates) {
49698
49860
  collectFontFiles(
49699
49861
  fontsRoot,
49700
- import_node_path38.default.relative(metroRoot, fontsRoot).split(import_node_path38.default.sep).join("/")
49862
+ import_node_path39.default.relative(metroRoot, fontsRoot).split(import_node_path39.default.sep).join("/")
49701
49863
  );
49702
49864
  }
49703
49865
  } catch {
@@ -49707,37 +49869,37 @@ function discoverNativeLinkedAppFontPaths(opts) {
49707
49869
  } catch {
49708
49870
  }
49709
49871
  try {
49710
- const configPath = import_node_path38.default.join(selectedAppDir, "react-native.config.js");
49711
- if (import_node_fs36.default.statSync(configPath).isFile()) {
49712
- const appConfigRequire = (0, import_node_module2.createRequire)(import_node_path38.default.join(selectedAppDir, "package.json"));
49872
+ const configPath = import_node_path39.default.join(selectedAppDir, "react-native.config.js");
49873
+ if (import_node_fs37.default.statSync(configPath).isFile()) {
49874
+ const appConfigRequire = (0, import_node_module3.createRequire)(import_node_path39.default.join(selectedAppDir, "package.json"));
49713
49875
  const rnConfig = appConfigRequire(configPath);
49714
49876
  const assets2 = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
49715
49877
  if (Array.isArray(assets2)) {
49716
49878
  for (const assetDir of assets2) {
49717
49879
  if (typeof assetDir !== "string") continue;
49718
- const root = import_node_path38.default.resolve(selectedAppDir, assetDir);
49719
- const relativeRoot = import_node_path38.default.relative(selectedAppDir, root);
49720
- if (relativeRoot.startsWith("..") || import_node_path38.default.isAbsolute(relativeRoot)) continue;
49721
- collectFontFiles(root, relativeRoot.split(import_node_path38.default.sep).join("/"));
49880
+ const root = import_node_path39.default.resolve(selectedAppDir, assetDir);
49881
+ const relativeRoot = import_node_path39.default.relative(selectedAppDir, root);
49882
+ if (relativeRoot.startsWith("..") || import_node_path39.default.isAbsolute(relativeRoot)) continue;
49883
+ collectFontFiles(root, relativeRoot.split(import_node_path39.default.sep).join("/"));
49722
49884
  }
49723
49885
  }
49724
49886
  }
49725
49887
  } catch {
49726
49888
  }
49727
49889
  if (platform === "ios") {
49728
- const iosDir = import_node_path38.default.join(selectedAppDir, "ios");
49890
+ const iosDir = import_node_path39.default.join(selectedAppDir, "ios");
49729
49891
  try {
49730
- const targetDirs = import_node_fs36.default.readdirSync(iosDir, { withFileTypes: true }).filter(
49892
+ const targetDirs = import_node_fs37.default.readdirSync(iosDir, { withFileTypes: true }).filter(
49731
49893
  (entry) => entry.isDirectory() && !entry.isSymbolicLink() && entry.name !== "Pods" && entry.name !== "build" && !entry.name.startsWith(".")
49732
49894
  ).slice(0, 64);
49733
- const plistPaths = [import_node_path38.default.join(iosDir, "Info.plist")];
49895
+ const plistPaths = [import_node_path39.default.join(iosDir, "Info.plist")];
49734
49896
  for (const entry of targetDirs) {
49735
- plistPaths.push(import_node_path38.default.join(iosDir, entry.name, "Info.plist"));
49897
+ plistPaths.push(import_node_path39.default.join(iosDir, entry.name, "Info.plist"));
49736
49898
  }
49737
49899
  for (const plistPath of plistPaths) {
49738
49900
  let parsed;
49739
49901
  try {
49740
- parsed = parsePlistSource(import_node_fs36.default.readFileSync(plistPath, "utf8"));
49902
+ parsed = parsePlistSource(import_node_fs37.default.readFileSync(plistPath, "utf8"));
49741
49903
  } catch {
49742
49904
  continue;
49743
49905
  }
@@ -49747,21 +49909,21 @@ function discoverNativeLinkedAppFontPaths(opts) {
49747
49909
  for (const declaredFont of declaredFonts) {
49748
49910
  if (typeof declaredFont !== "string") continue;
49749
49911
  const candidates = [
49750
- import_node_path38.default.resolve(import_node_path38.default.dirname(plistPath), declaredFont),
49751
- import_node_path38.default.resolve(iosDir, declaredFont)
49912
+ import_node_path39.default.resolve(import_node_path39.default.dirname(plistPath), declaredFont),
49913
+ import_node_path39.default.resolve(iosDir, declaredFont)
49752
49914
  ];
49753
49915
  const fontPath = candidates.find((candidate) => {
49754
- const relative3 = import_node_path38.default.relative(selectedAppDir, candidate);
49755
- if (relative3.startsWith("..") || import_node_path38.default.isAbsolute(relative3)) return false;
49916
+ const relative3 = import_node_path39.default.relative(selectedAppDir, candidate);
49917
+ if (relative3.startsWith("..") || import_node_path39.default.isAbsolute(relative3)) return false;
49756
49918
  try {
49757
- return import_node_fs36.default.statSync(candidate).isFile();
49919
+ return import_node_fs37.default.statSync(candidate).isFile();
49758
49920
  } catch {
49759
49921
  return false;
49760
49922
  }
49761
49923
  });
49762
49924
  if (!fontPath) continue;
49763
49925
  fontPaths.push(
49764
- import_node_path38.default.relative(selectedAppDir, fontPath).split(import_node_path38.default.sep).join("/")
49926
+ import_node_path39.default.relative(selectedAppDir, fontPath).split(import_node_path39.default.sep).join("/")
49765
49927
  );
49766
49928
  }
49767
49929
  }
@@ -49803,19 +49965,19 @@ async function resolveMetroProjectRoot(bundleUrl, opts) {
49803
49965
  function encodeAppFontsWire(specs) {
49804
49966
  return specs.map((spec) => `${encodeURIComponent(spec.url)}::${encodeURIComponent(spec.family)}`).join(",");
49805
49967
  }
49806
- var import_node_fs36, import_node_module2, import_node_path38, import_config_plugin_fonts, require2;
49968
+ var import_node_fs37, import_node_module3, import_node_path39, import_config_plugin_fonts, require2;
49807
49969
  var init_app_fonts = __esm({
49808
49970
  "cli/app-fonts.ts"() {
49809
49971
  "use strict";
49810
- import_node_fs36 = __toESM(require("node:fs"), 1);
49811
- import_node_module2 = require("node:module");
49812
- import_node_path38 = __toESM(require("node:path"), 1);
49972
+ import_node_fs37 = __toESM(require("node:fs"), 1);
49973
+ import_node_module3 = require("node:module");
49974
+ import_node_path39 = __toESM(require("node:path"), 1);
49813
49975
  import_config_plugin_fonts = require("peach-engine/engine/config-plugin-fonts");
49814
49976
  init_dev_server_scanner();
49815
49977
  init_backend_origin();
49816
49978
  init_plist();
49817
49979
  init_app_project();
49818
- require2 = (0, import_node_module2.createRequire)(__sootsim_import_meta_url);
49980
+ require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
49819
49981
  }
49820
49982
  });
49821
49983
 
@@ -49884,15 +50046,15 @@ function splashImageUrls(spec) {
49884
50046
  if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
49885
50047
  return [...urls];
49886
50048
  }
49887
- var import_node_module3, import_config_plugin_splash, require3;
50049
+ var import_node_module4, import_config_plugin_splash, require3;
49888
50050
  var init_app_splash = __esm({
49889
50051
  "cli/app-splash.ts"() {
49890
50052
  "use strict";
49891
- import_node_module3 = require("node:module");
50053
+ import_node_module4 = require("node:module");
49892
50054
  import_config_plugin_splash = require("peach-engine/engine/config-plugin-splash");
49893
50055
  init_backend_origin();
49894
50056
  init_app_project();
49895
- require3 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
50057
+ require3 = (0, import_node_module4.createRequire)(__sootsim_import_meta_url);
49896
50058
  }
49897
50059
  });
49898
50060
 
@@ -50749,7 +50911,7 @@ function desktopHostExecutable() {
50749
50911
  function bundleValue(app, key2) {
50750
50912
  const read = (0, import_node_child_process13.spawnSync)(
50751
50913
  "plutil",
50752
- ["-extract", key2, "raw", "-o", "-", import_node_path39.default.join(app, "Contents/Info.plist")],
50914
+ ["-extract", key2, "raw", "-o", "-", import_node_path40.default.join(app, "Contents/Info.plist")],
50753
50915
  { encoding: "utf8" }
50754
50916
  );
50755
50917
  return read.status === 0 ? read.stdout.trim() : null;
@@ -50760,8 +50922,8 @@ function isNativeHostBundle(app) {
50760
50922
  function placedHostVersion() {
50761
50923
  if (desktopHostPlatform() === "linux-x64") {
50762
50924
  try {
50763
- const version = import_node_fs37.default.readFileSync(import_node_path39.default.join(desktopHostsDir(), "active"), "utf8").trim();
50764
- return /^\d+\.\d+$/.test(version) && import_node_fs37.default.existsSync(import_node_path39.default.join(desktopHostDir(version), desktopHostExecutable())) ? version : null;
50925
+ const version = import_node_fs38.default.readFileSync(import_node_path40.default.join(desktopHostsDir(), "active"), "utf8").trim();
50926
+ return /^\d+\.\d+$/.test(version) && import_node_fs38.default.existsSync(import_node_path40.default.join(desktopHostDir(version), desktopHostExecutable())) ? version : null;
50765
50927
  } catch {
50766
50928
  return null;
50767
50929
  }
@@ -50777,18 +50939,18 @@ function headlessHostCommand() {
50777
50939
  if (!version) return null;
50778
50940
  const dir = desktopHostDir(version);
50779
50941
  return [
50780
- import_node_path39.default.join(dir, "bin/node"),
50942
+ import_node_path40.default.join(dir, "bin/node"),
50781
50943
  "--experimental-vm-modules",
50782
- import_node_path39.default.join(dir, "node/host.mjs")
50944
+ import_node_path40.default.join(dir, "node/host.mjs")
50783
50945
  ];
50784
50946
  }
50785
- var import_node_child_process13, import_node_fs37, import_node_path39, MAC_HOST_APP, HOST_BUNDLE_ID;
50947
+ var import_node_child_process13, import_node_fs38, import_node_path40, MAC_HOST_APP, HOST_BUNDLE_ID;
50786
50948
  var init_desktop_host_delivery = __esm({
50787
50949
  "src/desktop-host-delivery.ts"() {
50788
50950
  "use strict";
50789
50951
  import_node_child_process13 = require("node:child_process");
50790
- import_node_fs37 = __toESM(require("node:fs"), 1);
50791
- import_node_path39 = __toESM(require("node:path"), 1);
50952
+ import_node_fs38 = __toESM(require("node:fs"), 1);
50953
+ import_node_path40 = __toESM(require("node:path"), 1);
50792
50954
  init_src();
50793
50955
  init_home_paths();
50794
50956
  MAC_HOST_APP = "/Applications/Peach.app";
@@ -52336,8 +52498,8 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52336
52498
  };
52337
52499
  }
52338
52500
  const lock = parseLinuxBrowserLibsLock(linux_browser_libs_lock_default);
52339
- const dir = (0, import_node_path40.join)(rnxHomeDir(), "linux-libs", `${lock.id}-${arch}`);
52340
- if (!(0, import_node_fs38.existsSync)((0, import_node_path40.join)(dir, LINUX_BROWSER_LIBS_MARKER))) {
52501
+ const dir = (0, import_node_path41.join)(rnxHomeDir(), "linux-libs", `${lock.id}-${arch}`);
52502
+ if (!(0, import_node_fs39.existsSync)((0, import_node_path41.join)(dir, LINUX_BROWSER_LIBS_MARKER))) {
52341
52503
  const url = `${DEFAULT_CLI_RELEASE_ORIGIN}/${linuxBrowserLibsKey(lock.id, arch)}`;
52342
52504
  process.stderr.write(
52343
52505
  `peach: this system lacks ${missing.length} shared libraries ${browser} links; downloading them\u2026
@@ -52365,7 +52527,7 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52365
52527
  };
52366
52528
  }
52367
52529
  }
52368
- const libraryPath = [(0, import_node_path40.join)(dir, "lib"), (0, import_node_path40.join)(dir, "lib", "nss")].join(":");
52530
+ const libraryPath = [(0, import_node_path41.join)(dir, "lib"), (0, import_node_path41.join)(dir, "lib", "nss")].join(":");
52369
52531
  const stillMissing = missingLibraries(executablePath, libraryPath);
52370
52532
  if (stillMissing.length) {
52371
52533
  return {
@@ -52375,13 +52537,13 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52375
52537
  }
52376
52538
  return { ok: true, libraryPath };
52377
52539
  }
52378
- var import_node_child_process14, import_node_fs38, import_node_path40, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
52540
+ var import_node_child_process14, import_node_fs39, import_node_path41, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
52379
52541
  var init_linux_browser_libs = __esm({
52380
52542
  "cli/drivers/linux-browser-libs.ts"() {
52381
52543
  "use strict";
52382
52544
  import_node_child_process14 = require("node:child_process");
52383
- import_node_fs38 = require("node:fs");
52384
- import_node_path40 = require("node:path");
52545
+ import_node_fs39 = require("node:fs");
52546
+ import_node_path41 = require("node:path");
52385
52547
  init_src();
52386
52548
  init_home_paths();
52387
52549
  init_is_record();
@@ -52400,18 +52562,18 @@ function resolvePlaywright() {
52400
52562
  roots.push(`${playwrightCoreDir(PINNED_PLAYWRIGHT_CORE.version)}/`);
52401
52563
  for (const root of roots) {
52402
52564
  try {
52403
- const requireFromRoot = (0, import_node_module4.createRequire)(root);
52565
+ const requireFromRoot = (0, import_node_module5.createRequire)(root);
52404
52566
  for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
52405
52567
  try {
52406
52568
  const modulePath = requireFromRoot.resolve(spec);
52407
52569
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
52408
- const parsed = JSON.parse((0, import_node_fs39.readFileSync)(packageJsonPath, "utf8"));
52570
+ const parsed = JSON.parse((0, import_node_fs40.readFileSync)(packageJsonPath, "utf8"));
52409
52571
  if (!isRecord(parsed) || typeof parsed.version !== "string") continue;
52410
- const corePackagePath = (0, import_node_module4.createRequire)(modulePath).resolve(
52572
+ const corePackagePath = (0, import_node_module5.createRequire)(modulePath).resolve(
52411
52573
  "playwright-core/package.json"
52412
52574
  );
52413
- const cliPath = (0, import_node_path41.join)((0, import_node_path41.dirname)(corePackagePath), "cli.js");
52414
- if (!(0, import_node_fs39.existsSync)(cliPath)) continue;
52575
+ const cliPath = (0, import_node_path42.join)((0, import_node_path42.dirname)(corePackagePath), "cli.js");
52576
+ if (!(0, import_node_fs40.existsSync)(cliPath)) continue;
52415
52577
  return {
52416
52578
  spec,
52417
52579
  modulePath,
@@ -52439,7 +52601,7 @@ async function provisionPlaywright() {
52439
52601
  await installVerifiedTarball({
52440
52602
  url: `https://registry.npmjs.org/playwright-core/-/playwright-core-${version}.tgz`,
52441
52603
  digest: { algorithm, encoding: "base64", value: digest },
52442
- destDir: (0, import_node_path41.join)(playwrightCoreDir(version), "node_modules", "playwright-core"),
52604
+ destDir: (0, import_node_path42.join)(playwrightCoreDir(version), "node_modules", "playwright-core"),
52443
52605
  installedMarker: "package.json",
52444
52606
  // npm tarballs hold the package under a leading `package/`
52445
52607
  stripComponents: 1,
@@ -52482,7 +52644,7 @@ function probeBrowser(resolved, env) {
52482
52644
  return {
52483
52645
  ok: true,
52484
52646
  executablePath: parsed.executablePath,
52485
- exists: parsed.exists && (0, import_node_fs39.existsSync)(parsed.executablePath)
52647
+ exists: parsed.exists && (0, import_node_fs40.existsSync)(parsed.executablePath)
52486
52648
  };
52487
52649
  } catch (error) {
52488
52650
  return {
@@ -52555,7 +52717,7 @@ async function launchProvisionedPlaywright() {
52555
52717
  const env = { ...process.env };
52556
52718
  const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
52557
52719
  if (!browser.ok) throw new Error(browser.message);
52558
- const playwright = (0, import_node_module4.createRequire)(resolved.modulePath)(
52720
+ const playwright = (0, import_node_module5.createRequire)(resolved.modulePath)(
52559
52721
  resolved.modulePath
52560
52722
  );
52561
52723
  const browserEnv = browser.libraryPath ? {
@@ -52567,14 +52729,14 @@ async function launchProvisionedPlaywright() {
52567
52729
  { headless: true }
52568
52730
  );
52569
52731
  }
52570
- var import_node_child_process15, import_node_fs39, import_node_module4, import_node_path41;
52732
+ var import_node_child_process15, import_node_fs40, import_node_module5, import_node_path42;
52571
52733
  var init_playwright_provisioning = __esm({
52572
52734
  "cli/drivers/playwright-provisioning.ts"() {
52573
52735
  "use strict";
52574
52736
  import_node_child_process15 = require("node:child_process");
52575
- import_node_fs39 = require("node:fs");
52576
- import_node_module4 = require("node:module");
52577
- import_node_path41 = require("node:path");
52737
+ import_node_fs40 = require("node:fs");
52738
+ import_node_module5 = require("node:module");
52739
+ import_node_path42 = require("node:path");
52578
52740
  init_src();
52579
52741
  init_reap_browser();
52580
52742
  init_home_paths();
@@ -53053,12 +53215,12 @@ var init_runtime_diagnostics = __esm({
53053
53215
  // cli/commands/skills.ts
53054
53216
  function getSkillsDir() {
53055
53217
  if (typeof __PEACH_BUNDLED_SKILLS__ !== "undefined") {
53056
- const dir = path34.join(rnxHomeDir(), "skills", getCliVersion());
53218
+ const dir = path35.join(rnxHomeDir(), "skills", getCliVersion());
53057
53219
  for (const [file, body] of Object.entries(__PEACH_BUNDLED_SKILLS__)) {
53058
- const target = path34.join(dir, file);
53059
- if (fs29.existsSync(target)) continue;
53060
- fs29.mkdirSync(path34.dirname(target), { recursive: true });
53061
- fs29.writeFileSync(target, body);
53220
+ const target = path35.join(dir, file);
53221
+ if (fs30.existsSync(target)) continue;
53222
+ fs30.mkdirSync(path35.dirname(target), { recursive: true });
53223
+ fs30.writeFileSync(target, body);
53062
53224
  }
53063
53225
  return dir;
53064
53226
  }
@@ -53066,10 +53228,10 @@ function getSkillsDir() {
53066
53228
  const pkgPath = (0, import_url3.fileURLToPath)(
53067
53229
  import_meta3.resolve(`${rnxPublicBrand.packageName}/package.json`)
53068
53230
  );
53069
- return primaryCheckoutPath(path34.join(path34.dirname(pkgPath), "skills"));
53231
+ return primaryCheckoutPath(path35.join(path35.dirname(pkgPath), "skills"));
53070
53232
  } catch {
53071
- const __dirname = path34.dirname((0, import_url3.fileURLToPath)(__sootsim_import_meta_url));
53072
- return primaryCheckoutPath(path34.resolve(__dirname, "../../skills"));
53233
+ const __dirname = path35.dirname((0, import_url3.fileURLToPath)(__sootsim_import_meta_url));
53234
+ return primaryCheckoutPath(path35.resolve(__dirname, "../../skills"));
53073
53235
  }
53074
53236
  }
53075
53237
  function primaryCheckoutPath(dir) {
@@ -53092,39 +53254,39 @@ function primaryCheckoutPath(dir) {
53092
53254
  } catch {
53093
53255
  return dir;
53094
53256
  }
53095
- if (path34.basename(common) !== ".git") return dir;
53096
- const primary = path34.join(path34.dirname(common), path34.relative(top, dir));
53097
- return fs29.existsSync(primary) ? primary : dir;
53257
+ if (path35.basename(common) !== ".git") return dir;
53258
+ const primary = path35.join(path35.dirname(common), path35.relative(top, dir));
53259
+ return fs30.existsSync(primary) ? primary : dir;
53098
53260
  }
53099
53261
  function skillsDir() {
53100
53262
  skillsDirPath ??= getSkillsDir();
53101
53263
  return skillsDirPath;
53102
53264
  }
53103
53265
  function targetFromHome(envName, fallbackDir) {
53104
- const home = process.env[envName] || path34.join(os9.homedir(), fallbackDir);
53105
- return path34.join(home, "skills");
53266
+ const home = process.env[envName] || path35.join(os9.homedir(), fallbackDir);
53267
+ return path35.join(home, "skills");
53106
53268
  }
53107
53269
  function codexTargets() {
53108
53270
  const homes = /* @__PURE__ */ new Map();
53109
53271
  const userHome = process.env.HOME || os9.homedir();
53110
- const primaryCodexHome = process.env.CODEX_HOME || path34.join(userHome, ".codex");
53111
- homes.set(path34.resolve(primaryCodexHome), "codex");
53272
+ const primaryCodexHome = process.env.CODEX_HOME || path35.join(userHome, ".codex");
53273
+ homes.set(path35.resolve(primaryCodexHome), "codex");
53112
53274
  const tmCodexHomes = process.env.TM_CODEX_HOMES;
53113
53275
  if (tmCodexHomes) {
53114
- for (const h of tmCodexHomes.split(path34.delimiter)) {
53276
+ for (const h of tmCodexHomes.split(path35.delimiter)) {
53115
53277
  if (h.trim()) {
53116
- const resolved = path34.resolve(h.trim());
53278
+ const resolved = path35.resolve(h.trim());
53117
53279
  if (!homes.has(resolved)) {
53118
- homes.set(resolved, path34.basename(resolved).replace(/^\./, ""));
53280
+ homes.set(resolved, path35.basename(resolved).replace(/^\./, ""));
53119
53281
  }
53120
53282
  }
53121
53283
  }
53122
53284
  }
53123
- const tmHome = process.env.TM_HOME || path34.join(userHome, ".team-machine");
53124
- const enginePath = path34.join(tmHome, "engine.yaml");
53125
- if (fs29.existsSync(enginePath)) {
53285
+ const tmHome = process.env.TM_HOME || path35.join(userHome, ".team-machine");
53286
+ const enginePath = path35.join(tmHome, "engine.yaml");
53287
+ if (fs30.existsSync(enginePath)) {
53126
53288
  try {
53127
- const content = fs29.readFileSync(enginePath, "utf8");
53289
+ const content = fs30.readFileSync(enginePath, "utf8");
53128
53290
  let inCodex = false;
53129
53291
  let inAccounts = false;
53130
53292
  let currentAccount = "";
@@ -53154,9 +53316,9 @@ function codexTargets() {
53154
53316
  if (match) {
53155
53317
  let homeDir = match[1].trim();
53156
53318
  if (homeDir.startsWith("~")) {
53157
- homeDir = path34.join(userHome, homeDir.slice(1));
53319
+ homeDir = path35.join(userHome, homeDir.slice(1));
53158
53320
  }
53159
- const resolved = path34.resolve(homeDir);
53321
+ const resolved = path35.resolve(homeDir);
53160
53322
  if (!homes.has(resolved)) {
53161
53323
  homes.set(resolved, `codex-${currentAccount}`);
53162
53324
  }
@@ -53167,13 +53329,13 @@ function codexTargets() {
53167
53329
  }
53168
53330
  }
53169
53331
  try {
53170
- for (const entry of fs29.readdirSync(userHome)) {
53332
+ for (const entry of fs30.readdirSync(userHome)) {
53171
53333
  if (entry.startsWith(".codex-")) {
53172
- const fullPath = path34.join(userHome, entry);
53334
+ const fullPath = path35.join(userHome, entry);
53173
53335
  try {
53174
- const stat2 = fs29.statSync(fullPath);
53336
+ const stat2 = fs30.statSync(fullPath);
53175
53337
  if (stat2.isDirectory()) {
53176
- const resolved = path34.resolve(fullPath);
53338
+ const resolved = path35.resolve(fullPath);
53177
53339
  if (!homes.has(resolved)) {
53178
53340
  homes.set(resolved, entry.replace(/^\./, ""));
53179
53341
  }
@@ -53188,7 +53350,7 @@ function codexTargets() {
53188
53350
  for (const [homePath, label] of homes) {
53189
53351
  targets.push({
53190
53352
  label,
53191
- dir: path34.join(homePath, "skills")
53353
+ dir: path35.join(homePath, "skills")
53192
53354
  });
53193
53355
  }
53194
53356
  return targets;
@@ -53204,7 +53366,7 @@ function hasInstalledPeachSkills() {
53204
53366
  (file) => /^([^/]+)\/SKILL\.md$/.exec(file)?.[1] ?? []
53205
53367
  ) : listSkills().map((skill7) => skill7.name);
53206
53368
  return defaultAgentTargets().some(
53207
- ({ dir }) => names.some((name2) => fs29.existsSync(path34.join(dir, name2, "SKILL.md")))
53369
+ ({ dir }) => names.some((name2) => fs30.existsSync(path35.join(dir, name2, "SKILL.md")))
53208
53370
  );
53209
53371
  }
53210
53372
  function parseSkillFrontmatter(content) {
@@ -53247,26 +53409,26 @@ function readFrontmatterField(frontmatter, field) {
53247
53409
  return null;
53248
53410
  }
53249
53411
  function listSkills() {
53250
- if (!fs29.existsSync(skillsDir())) return [];
53412
+ if (!fs30.existsSync(skillsDir())) return [];
53251
53413
  const skills = [];
53252
- for (const entry of fs29.readdirSync(skillsDir())) {
53253
- const skillMd = path34.join(skillsDir(), entry, "SKILL.md");
53254
- if (!fs29.existsSync(skillMd)) continue;
53255
- const meta = parseSkillFrontmatter(fs29.readFileSync(skillMd, "utf8"));
53414
+ for (const entry of fs30.readdirSync(skillsDir())) {
53415
+ const skillMd = path35.join(skillsDir(), entry, "SKILL.md");
53416
+ if (!fs30.existsSync(skillMd)) continue;
53417
+ const meta = parseSkillFrontmatter(fs30.readFileSync(skillMd, "utf8"));
53256
53418
  if (meta) {
53257
53419
  skills.push({ name: entry, description: meta.description });
53258
53420
  }
53259
53421
  }
53260
53422
  return skills.sort((a, b) => a.name.localeCompare(b.name));
53261
53423
  }
53262
- var import_child_process7, fs29, os9, path34, import_url3, import_meta3, skillsDirPath;
53424
+ var import_child_process7, fs30, os9, path35, import_url3, import_meta3, skillsDirPath;
53263
53425
  var init_skills = __esm({
53264
53426
  "cli/commands/skills.ts"() {
53265
53427
  "use strict";
53266
53428
  import_child_process7 = require("child_process");
53267
- fs29 = __toESM(require("fs"), 1);
53429
+ fs30 = __toESM(require("fs"), 1);
53268
53430
  os9 = __toESM(require("os"), 1);
53269
- path34 = __toESM(require("path"), 1);
53431
+ path35 = __toESM(require("path"), 1);
53270
53432
  import_url3 = require("url");
53271
53433
  init_cli_version();
53272
53434
  init_home_paths();
@@ -53727,11 +53889,11 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53727
53889
  );
53728
53890
  }
53729
53891
  const { executable, prefixArgs } = rnxSelfInvocation();
53730
- const bridgeLogPath = import_node_path42.default.join(
53892
+ const bridgeLogPath = import_node_path43.default.join(
53731
53893
  import_node_os11.default.tmpdir(),
53732
53894
  `peach-bridge-${Date.now()}-${process.pid}.log`
53733
53895
  );
53734
- const bridgeLogFd = import_node_fs40.default.openSync(bridgeLogPath, "a");
53896
+ const bridgeLogFd = import_node_fs41.default.openSync(bridgeLogPath, "a");
53735
53897
  let child;
53736
53898
  try {
53737
53899
  child = (0, import_node_child_process16.spawn)(
@@ -53745,7 +53907,7 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53745
53907
  }
53746
53908
  );
53747
53909
  } finally {
53748
- import_node_fs40.default.closeSync(bridgeLogFd);
53910
+ import_node_fs41.default.closeSync(bridgeLogFd);
53749
53911
  }
53750
53912
  if (resources) {
53751
53913
  resources.bridge = child;
@@ -53781,7 +53943,7 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53781
53943
  await sleep(150);
53782
53944
  }
53783
53945
  const reason = childExit ? `peach bridge exited before becoming ready (exit ${childExit})` : `peach bridge did not start within ${Math.round(OPEN_BRIDGE_SPAWN_TIMEOUT_MS / 1e3)}s`;
53784
- const bridgeLog = import_node_fs40.default.readFileSync(bridgeLogPath, "utf8").trim().slice(-2e3);
53946
+ const bridgeLog = import_node_fs41.default.readFileSync(bridgeLogPath, "utf8").trim().slice(-2e3);
53785
53947
  throw new Error(
53786
53948
  `${reason}${bridgeLog ? `
53787
53949
  ${bridgeLog}` : ""}
@@ -53804,7 +53966,7 @@ function assertExplicitBridgeLock(preferredPort, explicitPort, lock) {
53804
53966
  async function ensureRuntimeForOpen() {
53805
53967
  if (resolveDevCheckoutRuntimeRoot()) return;
53806
53968
  const active = readActiveRuntime();
53807
- if (active && import_node_fs40.default.existsSync(runtimeDir(active))) return;
53969
+ if (active && import_node_fs41.default.existsSync(runtimeDir(active))) return;
53808
53970
  console.error(" installing peach engine runtime...");
53809
53971
  const { runRuntime: runRuntime2 } = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
53810
53972
  await runRuntime2(["install"], {});
@@ -53952,10 +54114,10 @@ async function buildResolvedBundleOpenUrl(target, baseUrl, opts = {}) {
53952
54114
  }
53953
54115
  function normalizeReplacementPath(filePath) {
53954
54116
  if (filePath.startsWith("~/")) {
53955
- return import_node_path42.default.join(import_node_os11.default.homedir(), filePath.slice(2));
54117
+ return import_node_path43.default.join(import_node_os11.default.homedir(), filePath.slice(2));
53956
54118
  }
53957
- if (import_node_path42.default.isAbsolute(filePath)) return filePath;
53958
- return import_node_path42.default.resolve(process.cwd(), filePath);
54119
+ if (import_node_path43.default.isAbsolute(filePath)) return filePath;
54120
+ return import_node_path43.default.resolve(process.cwd(), filePath);
53959
54121
  }
53960
54122
  function parseOpenRuntimeConfig(args) {
53961
54123
  const modules = {};
@@ -53974,7 +54136,7 @@ function parseOpenRuntimeConfig(args) {
53974
54136
  }
53975
54137
  const moduleName = raw2.slice(0, eqIndex).trim();
53976
54138
  const filePath = normalizeReplacementPath(raw2.slice(eqIndex + 1).trim());
53977
- if (!import_node_fs40.default.existsSync(filePath)) {
54139
+ if (!import_node_fs41.default.existsSync(filePath)) {
53978
54140
  console.error(` peach open: replacement file not found: ${filePath}`);
53979
54141
  rnxExit(1);
53980
54142
  }
@@ -54010,7 +54172,7 @@ async function resolveAppProjectForBundleUrl(bundleUrl, projectRoot) {
54010
54172
  return advertisedRoot ? resolveAppProject(advertisedRoot) : null;
54011
54173
  }
54012
54174
  async function ensureConfiguredRuntime(version) {
54013
- if (import_node_fs40.default.existsSync(import_node_path42.default.join(runtimeDir(version), "index.html"))) return;
54175
+ if (import_node_fs41.default.existsSync(import_node_path43.default.join(runtimeDir(version), "index.html"))) return;
54014
54176
  console.error(` installing configured engine runtime ${version}...`);
54015
54177
  const result = await rnxRuntime.install({
54016
54178
  version,
@@ -54152,6 +54314,20 @@ async function splashImageReachable(imageUrl) {
54152
54314
  clearTimeout(timer);
54153
54315
  }
54154
54316
  }
54317
+ function readProjectNativeFirebaseConfig(project) {
54318
+ if (!project) return null;
54319
+ const require4 = (0, import_node_module6.createRequire)(import_node_path43.default.join(project.appDir, "package.json"));
54320
+ try {
54321
+ require4.resolve("@expo/config");
54322
+ } catch {
54323
+ return null;
54324
+ }
54325
+ try {
54326
+ return readNativeFirebaseConfig(project.appDir);
54327
+ } catch (error) {
54328
+ return { error: error instanceof Error ? error.message : String(error) };
54329
+ }
54330
+ }
54155
54331
  function bundleUrlOf(urlStr) {
54156
54332
  try {
54157
54333
  return new URL(urlStr).searchParams.get("bundle") || void 0;
@@ -54169,6 +54345,9 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
54169
54345
  );
54170
54346
  const expoStamped = new URL(stamped);
54171
54347
  expoStamped.searchParams.delete("nativeFirebase");
54348
+ const nativeFirebase = readProjectNativeFirebaseConfig(project);
54349
+ if (nativeFirebase && expoStamped.searchParams.get("bundle"))
54350
+ expoStamped.searchParams.set("nativeFirebase", JSON.stringify(nativeFirebase));
54172
54351
  if (opts.bundleOriginOverride)
54173
54352
  expoStamped.searchParams.set("bundleOriginOverride", opts.bundleOriginOverride);
54174
54353
  if (opts.hostDriver) expoStamped.searchParams.set("peachHostDriver", opts.hostDriver);
@@ -54334,7 +54513,7 @@ function playwrightHostPidForSim(sim) {
54334
54513
  function signalDriverLaunchConnected(result) {
54335
54514
  if (!result.connectAckFile) return false;
54336
54515
  try {
54337
- import_node_fs40.default.writeFileSync(
54516
+ import_node_fs41.default.writeFileSync(
54338
54517
  result.connectAckFile,
54339
54518
  `${JSON.stringify({ connectedAt: Date.now(), pid: result.pid ?? null })}
54340
54519
  `,
@@ -54348,7 +54527,7 @@ function signalDriverLaunchConnected(result) {
54348
54527
  function readUnservedUrl(result) {
54349
54528
  if (!result.diagnosticLogPath) return null;
54350
54529
  try {
54351
- const detail = import_node_fs40.default.readFileSync(result.diagnosticLogPath, "utf8");
54530
+ const detail = import_node_fs41.default.readFileSync(result.diagnosticLogPath, "utf8");
54352
54531
  const match = detail.match(/\[unserved\] nothing serves (\S+)/);
54353
54532
  return match ? match[1] : null;
54354
54533
  } catch {
@@ -54358,19 +54537,19 @@ function readUnservedUrl(result) {
54358
54537
  function printDriverDiagnosticLogTail(result) {
54359
54538
  if (!result.diagnosticLogPath) return;
54360
54539
  try {
54361
- const detail = import_node_fs40.default.readFileSync(result.diagnosticLogPath, "utf8").trim();
54540
+ const detail = import_node_fs41.default.readFileSync(result.diagnosticLogPath, "utf8").trim();
54362
54541
  if (!detail) {
54363
- console.error(` ${import_node_path42.default.basename(result.diagnosticLogPath)} was empty`);
54542
+ console.error(` ${import_node_path43.default.basename(result.diagnosticLogPath)} was empty`);
54364
54543
  return;
54365
54544
  }
54366
54545
  const shown = detail.length > 4e3 ? `\u2026
54367
54546
  ${detail.slice(-4e3)}` : detail;
54368
- console.error(` ${import_node_path42.default.basename(result.diagnosticLogPath)}:`);
54547
+ console.error(` ${import_node_path43.default.basename(result.diagnosticLogPath)}:`);
54369
54548
  console.error(shown);
54370
54549
  } catch (err) {
54371
54550
  const message = err instanceof Error ? err.message : String(err);
54372
54551
  console.error(
54373
- ` failed to read ${import_node_path42.default.basename(result.diagnosticLogPath)}: ${message}`
54552
+ ` failed to read ${import_node_path43.default.basename(result.diagnosticLogPath)}: ${message}`
54374
54553
  );
54375
54554
  }
54376
54555
  }
@@ -55408,14 +55587,15 @@ async function runCloseCommand(args, opts = {}) {
55408
55587
  bridge.close();
55409
55588
  }
55410
55589
  }
55411
- var import_node_child_process16, import_node_fs40, import_node_os11, import_node_path42, import_app_catalog_wire, import_devices2, import_ws4, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, OPEN_BRIDGE_RUNTIME_TIMEOUT_MS, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS;
55590
+ var import_node_child_process16, import_node_fs41, import_node_module6, import_node_os11, import_node_path43, import_app_catalog_wire, import_devices2, import_ws4, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, OPEN_BRIDGE_RUNTIME_TIMEOUT_MS, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS;
55412
55591
  var init_control = __esm({
55413
55592
  "cli/commands/control.ts"() {
55414
55593
  "use strict";
55415
55594
  import_node_child_process16 = require("node:child_process");
55416
- import_node_fs40 = __toESM(require("node:fs"), 1);
55595
+ import_node_fs41 = __toESM(require("node:fs"), 1);
55596
+ import_node_module6 = require("node:module");
55417
55597
  import_node_os11 = __toESM(require("node:os"), 1);
55418
- import_node_path42 = __toESM(require("node:path"), 1);
55598
+ import_node_path43 = __toESM(require("node:path"), 1);
55419
55599
  import_app_catalog_wire = require("peach-engine/engine/app-catalog-wire");
55420
55600
  import_devices2 = require("peach-engine/settings/devices");
55421
55601
  import_ws4 = require("ws");
@@ -55429,6 +55609,7 @@ var init_control = __esm({
55429
55609
  init_flow_timeout_scale();
55430
55610
  init_home_paths();
55431
55611
  init_native_dev_bundle_url();
55612
+ init_native_firebase_config();
55432
55613
  init_profiles();
55433
55614
  init_public_brand();
55434
55615
  init_runtime_assets();
@@ -56875,16 +57056,16 @@ function readRecentShellAppId(state) {
56875
57056
  }
56876
57057
  function resolveProjectRelativeFlowBase(flowDir) {
56877
57058
  if (!flowDir) return process.cwd();
56878
- return path36.basename(flowDir) === ".maestro" ? path36.dirname(flowDir) : flowDir;
57059
+ return path37.basename(flowDir) === ".maestro" ? path37.dirname(flowDir) : flowDir;
56879
57060
  }
56880
57061
  function resolveFlowScreenshotPathWithMode(screenshotDir, name2, opts) {
56881
57062
  const normalizedName = name2.endsWith(".png") ? name2 : `${name2}.png`;
56882
- if (path36.isAbsolute(normalizedName)) return normalizedName;
57063
+ if (path37.isAbsolute(normalizedName)) return normalizedName;
56883
57064
  if (opts.mode === "flow" && /[\\/]/.test(normalizedName)) {
56884
57065
  const baseDir = normalizedName.startsWith("./") || normalizedName.startsWith("../") ? opts.flowDir ?? process.cwd() : resolveProjectRelativeFlowBase(opts.flowDir);
56885
- return path36.resolve(baseDir, normalizedName);
57066
+ return path37.resolve(baseDir, normalizedName);
56886
57067
  }
56887
- return path36.join(screenshotDir, normalizedName);
57068
+ return path37.join(screenshotDir, normalizedName);
56888
57069
  }
56889
57070
  function normalizeFlowScreenshotSpec(step) {
56890
57071
  if (typeof step === "string") {
@@ -56938,12 +57119,12 @@ function normalizeBareStringStep(verb) {
56938
57119
  function parseFlowSteps(content) {
56939
57120
  return parseFlowFile(content).steps;
56940
57121
  }
56941
- var fs32, path36, import_devices4, import_proof_frame, DEFAULT_TIMEOUT, ASSERTION_LOOKUP_MS, FLOW_TIMEOUT_SCALE, scaledTimeout, MAESTRO_SELECTOR_KEYS, UNSUPPORTED_SELECTOR_KEYS, ACCESSIBILITY_SELECTOR_KEYS, ACCESSIBILITY_TRAIT_FILTERS, MAESTRO_PERMISSION_KINDS, MAESTRO_PERMISSION_STATUS, SootSimBridgeFlowRunner;
57122
+ var fs33, path37, import_devices4, import_proof_frame, DEFAULT_TIMEOUT, ASSERTION_LOOKUP_MS, FLOW_TIMEOUT_SCALE, scaledTimeout, MAESTRO_SELECTOR_KEYS, UNSUPPORTED_SELECTOR_KEYS, ACCESSIBILITY_SELECTOR_KEYS, ACCESSIBILITY_TRAIT_FILTERS, MAESTRO_PERMISSION_KINDS, MAESTRO_PERMISSION_STATUS, SootSimBridgeFlowRunner;
56942
57123
  var init_bridge_flow_runner = __esm({
56943
57124
  "cli/bridge-flow-runner.ts"() {
56944
57125
  "use strict";
56945
- fs32 = __toESM(require("fs"), 1);
56946
- path36 = __toESM(require("path"), 1);
57126
+ fs33 = __toESM(require("fs"), 1);
57127
+ path37 = __toESM(require("path"), 1);
56947
57128
  import_devices4 = require("peach-engine/settings/devices");
56948
57129
  import_proof_frame = __toESM(require_proof_frame(), 1);
56949
57130
  init_flow_timeout_scale();
@@ -57255,14 +57436,14 @@ var init_bridge_flow_runner = __esm({
57255
57436
  if (chunks.length === 0) {
57256
57437
  throw new Error("recording requested but no video buffer was produced");
57257
57438
  }
57258
- fs32.mkdirSync(this.opts.recordingOutputDir, { recursive: true });
57439
+ fs33.mkdirSync(this.opts.recordingOutputDir, { recursive: true });
57259
57440
  const videoMime = stopped.mime || this.opts.recordingFormat || "video/webm";
57260
57441
  const extension = videoMime.includes("mp4") ? "mp4" : "webm";
57261
- const outputPath = path36.join(
57442
+ const outputPath = path37.join(
57262
57443
  this.opts.recordingOutputDir,
57263
57444
  `peach-${Date.now()}.${extension}`
57264
57445
  );
57265
- fs32.writeFileSync(outputPath, Buffer.concat(chunks));
57446
+ fs33.writeFileSync(outputPath, Buffer.concat(chunks));
57266
57447
  return outputPath;
57267
57448
  }
57268
57449
  async waitForRecordingTail(opts) {
@@ -57883,7 +58064,7 @@ var init_bridge_flow_runner = __esm({
57883
58064
  flowDir: this.opts.flowDir
57884
58065
  }
57885
58066
  );
57886
- fs32.mkdirSync(path36.dirname(outputPath), { recursive: true });
58067
+ fs33.mkdirSync(path37.dirname(outputPath), { recursive: true });
57887
58068
  const layers = spec.layers ?? this.opts.screenshotLayers;
57888
58069
  const screenshotRequest = {
57889
58070
  type: "screenshot",
@@ -57918,11 +58099,11 @@ var init_bridge_flow_runner = __esm({
57918
58099
  throw new Error("could not read current device model for framed screenshot");
57919
58100
  }
57920
58101
  const framed = await composeFramedScreenshot(rawBuffer, model);
57921
- fs32.writeFileSync(outputPath, framed);
58102
+ fs33.writeFileSync(outputPath, framed);
57922
58103
  console.log(`[flow] screenshot: ${outputPath} (frame: ${model})`);
57923
58104
  return outputPath;
57924
58105
  }
57925
- fs32.writeFileSync(outputPath, rawBuffer);
58106
+ fs33.writeFileSync(outputPath, rawBuffer);
57926
58107
  console.log(`[flow] screenshot: ${outputPath}`);
57927
58108
  return outputPath;
57928
58109
  }
@@ -57944,10 +58125,10 @@ var init_bridge_flow_runner = __esm({
57944
58125
  // + a11y tree + console errors/warnings + failed network requests +
57945
58126
  // shell state, all under one directory so post-mortem is one grep away.
57946
58127
  async captureFailureBundle(outputDir, context) {
57947
- fs32.mkdirSync(outputDir, { recursive: true });
58128
+ fs33.mkdirSync(outputDir, { recursive: true });
57948
58129
  const write = (name2, content) => {
57949
58130
  try {
57950
- fs32.writeFileSync(path36.join(outputDir, name2), content);
58131
+ fs33.writeFileSync(path37.join(outputDir, name2), content);
57951
58132
  } catch {
57952
58133
  }
57953
58134
  };
@@ -58542,8 +58723,8 @@ var init_bridge_flow_runner = __esm({
58542
58723
  runScript(target) {
58543
58724
  const spec = typeof target === "string" ? { file: target } : target;
58544
58725
  if (!spec.file) throw new Error("runScript requires a file");
58545
- const scriptPath = path36.resolve(this.opts.flowDir, spec.file);
58546
- const source = fs32.readFileSync(scriptPath, "utf8");
58726
+ const scriptPath = path37.resolve(this.opts.flowDir, spec.file);
58727
+ const source = fs33.readFileSync(scriptPath, "utf8");
58547
58728
  this.js.evaluate(source, { env: spec.env });
58548
58729
  console.log(`[flow] runScript: ${spec.file} done`);
58549
58730
  }
@@ -58903,14 +59084,14 @@ var init_bridge_flow_runner = __esm({
58903
59084
  for (const [k, v] of Object.entries(env)) this.js.putEnv(k, v);
58904
59085
  }
58905
59086
  if (file) {
58906
- const flowPath = path36.resolve(this.opts.flowDir, file);
58907
- const flowContent = fs32.readFileSync(flowPath, "utf8");
59087
+ const flowPath = path37.resolve(this.opts.flowDir, file);
59088
+ const flowContent = fs33.readFileSync(flowPath, "utf8");
58908
59089
  const { frontmatter } = parseFlowFile(flowContent);
58909
59090
  if (frontmatter.env && typeof frontmatter.env === "object") {
58910
59091
  this.js.defineVariables(frontmatter.env);
58911
59092
  }
58912
59093
  const previousDir = this.opts.flowDir;
58913
- this.opts.flowDir = path36.dirname(flowPath);
59094
+ this.opts.flowDir = path37.dirname(flowPath);
58914
59095
  try {
58915
59096
  await this.runFlow(parseFlowSteps(flowContent));
58916
59097
  } finally {
@@ -59081,8 +59262,8 @@ __export(registry_exports, {
59081
59262
  skillRegistry: () => skillRegistry
59082
59263
  });
59083
59264
  module.exports = __toCommonJS(registry_exports);
59084
- var fs33 = __toESM(require("fs"), 1);
59085
- var path37 = __toESM(require("path"), 1);
59265
+ var fs34 = __toESM(require("fs"), 1);
59266
+ var path38 = __toESM(require("path"), 1);
59086
59267
 
59087
59268
  // src/skills/builtin/a11y-review.ts
59088
59269
  init_reap_browser();
@@ -59101,8 +59282,8 @@ var skill = {
59101
59282
  },
59102
59283
  async execute(params, context) {
59103
59284
  const { chromium } = await import("playwright");
59104
- const path38 = await import("path");
59105
- const fs34 = await import("fs");
59285
+ const path39 = await import("path");
59286
+ const fs35 = await import("fs");
59106
59287
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59107
59288
  headless: true
59108
59289
  });
@@ -59159,9 +59340,9 @@ var skill = {
59159
59340
  warnings: issues.filter((i) => i.severity === "warning").length,
59160
59341
  tree: typeof tree === "string" ? tree : JSON.stringify(tree)
59161
59342
  };
59162
- const reportPath = path38.join(context.outputDir, "a11y-report.json");
59163
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59164
- fs34.writeFileSync(reportPath, JSON.stringify(report, null, 2));
59343
+ const reportPath = path39.join(context.outputDir, "a11y-report.json");
59344
+ fs35.mkdirSync(path39.dirname(reportPath), { recursive: true });
59345
+ fs35.writeFileSync(reportPath, JSON.stringify(report, null, 2));
59165
59346
  return {
59166
59347
  success: issues.filter((i) => i.severity === "error").length === 0,
59167
59348
  message: `${report.errors} errors, ${report.warnings} warnings across ${report.nodeCount} nodes`,
@@ -59194,14 +59375,14 @@ var skill2 = {
59194
59375
  }
59195
59376
  },
59196
59377
  async execute(params, context) {
59197
- const fs34 = await import("node:fs");
59198
- const path38 = await import("node:path");
59378
+ const fs35 = await import("node:fs");
59379
+ const path39 = await import("node:path");
59199
59380
  const { COMPAT_RESULT_CAVEAT: COMPAT_RESULT_CAVEAT2, formatPackageStatus: formatPackageStatus2, formatScanCounts: formatScanCounts2, scanDeps: scanDeps2 } = await Promise.resolve().then(() => (init_web(), web_exports));
59200
- const packagePath = path38.join(context.projectDir, "package.json");
59201
- if (!fs34.existsSync(packagePath)) {
59381
+ const packagePath = path39.join(context.projectDir, "package.json");
59382
+ if (!fs35.existsSync(packagePath)) {
59202
59383
  return { success: false, message: "No package.json found" };
59203
59384
  }
59204
- const parsed = JSON.parse(fs34.readFileSync(packagePath, "utf8"));
59385
+ const parsed = JSON.parse(fs35.readFileSync(packagePath, "utf8"));
59205
59386
  if (!parsed || typeof parsed !== "object") {
59206
59387
  return { success: false, message: "package.json is not an object" };
59207
59388
  }
@@ -59213,9 +59394,9 @@ var skill2 = {
59213
59394
  }) : scanDeps2(parsed);
59214
59395
  const packageResult = params.packageName ? scan.packages[0] : void 0;
59215
59396
  const message = packageResult ? `${params.packageName}: ${formatPackageStatus2(packageResult)}. ${COMPAT_RESULT_CAVEAT2}` : `${formatScanCounts2(scan)}. ${COMPAT_RESULT_CAVEAT2}`;
59216
- const reportPath = path38.join(context.outputDir, "compat-report.json");
59217
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59218
- fs34.writeFileSync(reportPath, `${JSON.stringify(scan, null, 2)}
59397
+ const reportPath = path39.join(context.outputDir, "compat-report.json");
59398
+ fs35.mkdirSync(path39.dirname(reportPath), { recursive: true });
59399
+ fs35.writeFileSync(reportPath, `${JSON.stringify(scan, null, 2)}
59219
59400
  `);
59220
59401
  return {
59221
59402
  success: true,
@@ -59257,8 +59438,8 @@ var skill3 = {
59257
59438
  record: { type: "boolean", description: "Record video of the flow" }
59258
59439
  },
59259
59440
  async execute(params, context) {
59260
- const fs34 = await import("fs");
59261
- const path38 = await import("path");
59441
+ const fs35 = await import("fs");
59442
+ const path39 = await import("path");
59262
59443
  const yaml = await Promise.resolve().then(() => (init_browser(), browser_exports));
59263
59444
  const { DEFAULT_SOOTSIM_BRIDGE_PORT: DEFAULT_SOOTSIM_BRIDGE_PORT3 } = await Promise.resolve().then(() => (init_bridge_constants(), bridge_constants_exports));
59264
59445
  const { SootSimBridgeHost: SootSimBridgeHost2 } = await Promise.resolve().then(() => (init_bridge_host(), bridge_host_exports));
@@ -59268,7 +59449,7 @@ var skill3 = {
59268
59449
  const host2 = new SootSimBridgeHost2({ port: DEFAULT_SOOTSIM_BRIDGE_PORT3 });
59269
59450
  host2.start({ silent: true });
59270
59451
  try {
59271
- const flowContent = fs34.readFileSync(params.flowPath, "utf8");
59452
+ const flowContent = fs35.readFileSync(params.flowPath, "utf8");
59272
59453
  const fmMatch = flowContent.match(/^---\n([\s\S]*?)\n---\n?/);
59273
59454
  const stepsBody = fmMatch ? flowContent.slice(fmMatch[0].length) : flowContent;
59274
59455
  const steps = yaml.parse(stepsBody);
@@ -59295,7 +59476,7 @@ var skill3 = {
59295
59476
  });
59296
59477
  const driver = new SootSimBridgeFlowRunner2(bridge, {
59297
59478
  screenshotDir: context.outputDir,
59298
- flowDir: path38.dirname(path38.resolve(params.flowPath)),
59479
+ flowDir: path39.dirname(path39.resolve(params.flowPath)),
59299
59480
  simId,
59300
59481
  recordingOutputDir: params.record ? context.outputDir : void 0
59301
59482
  });
@@ -59317,7 +59498,7 @@ var skill3 = {
59317
59498
  simId,
59318
59499
  videoPath: videoPath || void 0
59319
59500
  },
59320
- artifacts: videoPath ? [{ type: "video", name: path38.basename(videoPath), path: videoPath }] : void 0
59501
+ artifacts: videoPath ? [{ type: "video", name: path39.basename(videoPath), path: videoPath }] : void 0
59321
59502
  };
59322
59503
  } finally {
59323
59504
  try {
@@ -59364,8 +59545,8 @@ var skill4 = {
59364
59545
  },
59365
59546
  async execute(params, context) {
59366
59547
  const { chromium } = await import("playwright");
59367
- const path38 = await import("path");
59368
- const fs34 = await import("fs");
59548
+ const path39 = await import("path");
59549
+ const fs35 = await import("fs");
59369
59550
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59370
59551
  headless: true
59371
59552
  });
@@ -59393,9 +59574,9 @@ var skill4 = {
59393
59574
  ...profile,
59394
59575
  fps: syncCount > 0 ? (syncCount / (duration / 1e3)).toFixed(1) : "0"
59395
59576
  };
59396
- const reportPath = path38.join(context.outputDir, "perf-report.json");
59397
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59398
- fs34.writeFileSync(reportPath, JSON.stringify(report, null, 2));
59577
+ const reportPath = path39.join(context.outputDir, "perf-report.json");
59578
+ fs35.mkdirSync(path39.dirname(reportPath), { recursive: true });
59579
+ fs35.writeFileSync(reportPath, JSON.stringify(report, null, 2));
59399
59580
  return {
59400
59581
  success: true,
59401
59582
  message: `${report.fps} fps, ${profile.avgSyncMs?.toFixed(1)}ms avg sync, ${nodeCount} nodes`,
@@ -59428,8 +59609,8 @@ var skill5 = {
59428
59609
  },
59429
59610
  async execute(params, context) {
59430
59611
  const { chromium } = await import("playwright");
59431
- const path38 = await import("path");
59432
- const fs34 = await import("fs");
59612
+ const path39 = await import("path");
59613
+ const fs35 = await import("fs");
59433
59614
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59434
59615
  headless: true
59435
59616
  });
@@ -59437,8 +59618,8 @@ var skill5 = {
59437
59618
  try {
59438
59619
  await page.goto(context.url, { waitUntil: "networkidle" });
59439
59620
  await page.waitForTimeout(2e3);
59440
- const outputPath = path38.join(context.outputDir, `${params.name}.png`);
59441
- fs34.mkdirSync(path38.dirname(outputPath), { recursive: true });
59621
+ const outputPath = path39.join(context.outputDir, `${params.name}.png`);
59622
+ fs35.mkdirSync(path39.dirname(outputPath), { recursive: true });
59442
59623
  await page.screenshot({ path: outputPath });
59443
59624
  return {
59444
59625
  success: true,
@@ -59479,8 +59660,8 @@ var skill6 = {
59479
59660
  },
59480
59661
  async execute(params, context) {
59481
59662
  const { chromium } = await import("playwright");
59482
- const path38 = await import("path");
59483
- const fs34 = await import("fs");
59663
+ const path39 = await import("path");
59664
+ const fs35 = await import("fs");
59484
59665
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59485
59666
  headless: true
59486
59667
  });
@@ -59488,14 +59669,14 @@ var skill6 = {
59488
59669
  try {
59489
59670
  await page.goto(context.url, { waitUntil: "networkidle" });
59490
59671
  await page.waitForTimeout(2e3);
59491
- const currentPath = path38.join(context.outputDir, `${params.name}-current.png`);
59492
- fs34.mkdirSync(path38.dirname(currentPath), { recursive: true });
59672
+ const currentPath = path39.join(context.outputDir, `${params.name}-current.png`);
59673
+ fs35.mkdirSync(path39.dirname(currentPath), { recursive: true });
59493
59674
  await page.screenshot({ path: currentPath });
59494
59675
  try {
59495
59676
  const { PNG } = await import("pngjs");
59496
59677
  const pixelmatch = (await import("pixelmatch")).default;
59497
- const baseline = PNG.sync.read(fs34.readFileSync(params.baseline));
59498
- const current = PNG.sync.read(fs34.readFileSync(currentPath));
59678
+ const baseline = PNG.sync.read(fs35.readFileSync(params.baseline));
59679
+ const current = PNG.sync.read(fs35.readFileSync(currentPath));
59499
59680
  const { width, height } = baseline;
59500
59681
  const diff = new PNG({ width, height });
59501
59682
  const numDiffPixels = pixelmatch(
@@ -59506,8 +59687,8 @@ var skill6 = {
59506
59687
  height,
59507
59688
  { threshold: params.threshold || 0.1 }
59508
59689
  );
59509
- const diffPath = path38.join(context.outputDir, `${params.name}-diff.png`);
59510
- fs34.writeFileSync(diffPath, PNG.sync.write(diff));
59690
+ const diffPath = path39.join(context.outputDir, `${params.name}-diff.png`);
59691
+ fs35.writeFileSync(diffPath, PNG.sync.write(diff));
59511
59692
  const totalPixels = width * height;
59512
59693
  const diffPercent = (numDiffPixels / totalPixels * 100).toFixed(2);
59513
59694
  return {
@@ -59571,10 +59752,10 @@ var skillRegistry = {
59571
59752
  },
59572
59753
  // load skills from a project manifest (rnx-skills.json)
59573
59754
  async loadFromManifest(projectDir) {
59574
- const manifestPath = path37.join(projectDir, "rnx-skills.json");
59575
- if (!fs33.existsSync(manifestPath)) return;
59755
+ const manifestPath = path38.join(projectDir, "rnx-skills.json");
59756
+ if (!fs34.existsSync(manifestPath)) return;
59576
59757
  try {
59577
- const manifest = JSON.parse(fs33.readFileSync(manifestPath, "utf8"));
59758
+ const manifest = JSON.parse(fs34.readFileSync(manifestPath, "utf8"));
59578
59759
  if (Array.isArray(manifest.skills)) {
59579
59760
  for (const entry of manifest.skills) {
59580
59761
  if (typeof entry === "string") {
@@ -59585,7 +59766,7 @@ var skillRegistry = {
59585
59766
  }
59586
59767
  } else if (entry.file) {
59587
59768
  try {
59588
- const mod = await import(path37.resolve(projectDir, entry.file));
59769
+ const mod = await import(path38.resolve(projectDir, entry.file));
59589
59770
  if (mod.skill) this.register(mod.skill);
59590
59771
  } catch {
59591
59772
  }
@@ -59598,10 +59779,10 @@ var skillRegistry = {
59598
59779
  // auto-discover skills based on project dependencies
59599
59780
  suggestSkills(projectDir) {
59600
59781
  const suggestions = [];
59601
- const pkgPath = path37.join(projectDir, "package.json");
59602
- if (!fs33.existsSync(pkgPath)) return suggestions;
59782
+ const pkgPath = path38.join(projectDir, "package.json");
59783
+ if (!fs34.existsSync(pkgPath)) return suggestions;
59603
59784
  try {
59604
- const pkg = JSON.parse(fs33.readFileSync(pkgPath, "utf8"));
59785
+ const pkg = JSON.parse(fs34.readFileSync(pkgPath, "utf8"));
59605
59786
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
59606
59787
  if (deps["detox"] || deps["maestro"]) {
59607
59788
  suggestions.push("maestro-test");