peachsim 0.1.928 → 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 +599 -372
  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.928 | (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;
@@ -3906,7 +3906,53 @@ var init_capability_outcomes2 = __esm({
3906
3906
  "react-native-reanimated": {
3907
3907
  exactTestedVersion: "4.6.0",
3908
3908
  supportedVersionRange: ">=4.0.0",
3909
- lastMeasured: null,
3909
+ lastMeasured: {
3910
+ byWeighting: {
3911
+ strict: {
3912
+ android: {
3913
+ passedWeight: 0,
3914
+ failedWeight: 0,
3915
+ unassessedWeight: 196,
3916
+ totalWeight: 196,
3917
+ assessedWeight: 0,
3918
+ compatibility: null,
3919
+ assessed: 0
3920
+ },
3921
+ ios: {
3922
+ passedWeight: 26,
3923
+ failedWeight: 0,
3924
+ unassessedWeight: 170,
3925
+ totalWeight: 196,
3926
+ assessedWeight: 26,
3927
+ compatibility: 1,
3928
+ assessed: 0.1326530612244898
3929
+ }
3930
+ },
3931
+ usage: {
3932
+ android: {
3933
+ passedWeight: 0,
3934
+ failedWeight: 0,
3935
+ unassessedWeight: 4910,
3936
+ totalWeight: 4910,
3937
+ assessedWeight: 0,
3938
+ compatibility: null,
3939
+ assessed: 0
3940
+ },
3941
+ ios: {
3942
+ passedWeight: 3182,
3943
+ failedWeight: 0,
3944
+ unassessedWeight: 1728,
3945
+ totalWeight: 4910,
3946
+ assessedWeight: 3182,
3947
+ compatibility: 1,
3948
+ assessed: 0.6480651731160896
3949
+ }
3950
+ }
3951
+ },
3952
+ capturedAt: "2026-10-08T18:50:55.485Z",
3953
+ receipts: ["ir-reanimated-current-capture"],
3954
+ sourceCommit: "4268dae5de7e2b52e8c6e2a91ac950c0359be612"
3955
+ },
3910
3956
  unmatchedReferenceCount: 590,
3911
3957
  byPlatform: {
3912
3958
  android: {
@@ -19125,17 +19171,17 @@ function visit(node, visitor) {
19125
19171
  } else
19126
19172
  visit_(null, node, visitor_, Object.freeze([]));
19127
19173
  }
19128
- function visit_(key2, node, visitor, path38) {
19129
- const ctrl = callVisitor(key2, node, visitor, path38);
19174
+ function visit_(key2, node, visitor, path39) {
19175
+ const ctrl = callVisitor(key2, node, visitor, path39);
19130
19176
  if (isNode(ctrl) || isPair(ctrl)) {
19131
- replaceNode(key2, path38, ctrl);
19132
- return visit_(key2, ctrl, visitor, path38);
19177
+ replaceNode(key2, path39, ctrl);
19178
+ return visit_(key2, ctrl, visitor, path39);
19133
19179
  }
19134
19180
  if (typeof ctrl !== "symbol") {
19135
19181
  if (isCollection(node)) {
19136
- path38 = Object.freeze(path38.concat(node));
19182
+ path39 = Object.freeze(path39.concat(node));
19137
19183
  for (let i = 0; i < node.items.length; ++i) {
19138
- const ci = visit_(i, node.items[i], visitor, path38);
19184
+ const ci = visit_(i, node.items[i], visitor, path39);
19139
19185
  if (typeof ci === "number")
19140
19186
  i = ci - 1;
19141
19187
  else if (ci === BREAK)
@@ -19146,13 +19192,13 @@ function visit_(key2, node, visitor, path38) {
19146
19192
  }
19147
19193
  }
19148
19194
  } else if (isPair(node)) {
19149
- path38 = Object.freeze(path38.concat(node));
19150
- const ck = visit_("key", node.key, visitor, path38);
19195
+ path39 = Object.freeze(path39.concat(node));
19196
+ const ck = visit_("key", node.key, visitor, path39);
19151
19197
  if (ck === BREAK)
19152
19198
  return BREAK;
19153
19199
  else if (ck === REMOVE)
19154
19200
  node.key = null;
19155
- const cv = visit_("value", node.value, visitor, path38);
19201
+ const cv = visit_("value", node.value, visitor, path39);
19156
19202
  if (cv === BREAK)
19157
19203
  return BREAK;
19158
19204
  else if (cv === REMOVE)
@@ -19170,17 +19216,17 @@ async function visitAsync(node, visitor) {
19170
19216
  } else
19171
19217
  await visitAsync_(null, node, visitor_, Object.freeze([]));
19172
19218
  }
19173
- async function visitAsync_(key2, node, visitor, path38) {
19174
- 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);
19175
19221
  if (isNode(ctrl) || isPair(ctrl)) {
19176
- replaceNode(key2, path38, ctrl);
19177
- return visitAsync_(key2, ctrl, visitor, path38);
19222
+ replaceNode(key2, path39, ctrl);
19223
+ return visitAsync_(key2, ctrl, visitor, path39);
19178
19224
  }
19179
19225
  if (typeof ctrl !== "symbol") {
19180
19226
  if (isCollection(node)) {
19181
- path38 = Object.freeze(path38.concat(node));
19227
+ path39 = Object.freeze(path39.concat(node));
19182
19228
  for (let i = 0; i < node.items.length; ++i) {
19183
- const ci = await visitAsync_(i, node.items[i], visitor, path38);
19229
+ const ci = await visitAsync_(i, node.items[i], visitor, path39);
19184
19230
  if (typeof ci === "number")
19185
19231
  i = ci - 1;
19186
19232
  else if (ci === BREAK)
@@ -19191,13 +19237,13 @@ async function visitAsync_(key2, node, visitor, path38) {
19191
19237
  }
19192
19238
  }
19193
19239
  } else if (isPair(node)) {
19194
- path38 = Object.freeze(path38.concat(node));
19195
- 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);
19196
19242
  if (ck === BREAK)
19197
19243
  return BREAK;
19198
19244
  else if (ck === REMOVE)
19199
19245
  node.key = null;
19200
- const cv = await visitAsync_("value", node.value, visitor, path38);
19246
+ const cv = await visitAsync_("value", node.value, visitor, path39);
19201
19247
  if (cv === BREAK)
19202
19248
  return BREAK;
19203
19249
  else if (cv === REMOVE)
@@ -19224,23 +19270,23 @@ function initVisitor(visitor) {
19224
19270
  }
19225
19271
  return visitor;
19226
19272
  }
19227
- function callVisitor(key2, node, visitor, path38) {
19273
+ function callVisitor(key2, node, visitor, path39) {
19228
19274
  if (typeof visitor === "function")
19229
- return visitor(key2, node, path38);
19275
+ return visitor(key2, node, path39);
19230
19276
  if (isMap(node))
19231
- return visitor.Map?.(key2, node, path38);
19277
+ return visitor.Map?.(key2, node, path39);
19232
19278
  if (isSeq(node))
19233
- return visitor.Seq?.(key2, node, path38);
19279
+ return visitor.Seq?.(key2, node, path39);
19234
19280
  if (isPair(node))
19235
- return visitor.Pair?.(key2, node, path38);
19281
+ return visitor.Pair?.(key2, node, path39);
19236
19282
  if (isScalar(node))
19237
- return visitor.Scalar?.(key2, node, path38);
19283
+ return visitor.Scalar?.(key2, node, path39);
19238
19284
  if (isAlias(node))
19239
- return visitor.Alias?.(key2, node, path38);
19285
+ return visitor.Alias?.(key2, node, path39);
19240
19286
  return void 0;
19241
19287
  }
19242
- function replaceNode(key2, path38, node) {
19243
- const parent = path38[path38.length - 1];
19288
+ function replaceNode(key2, path39, node) {
19289
+ const parent = path39[path39.length - 1];
19244
19290
  if (isCollection(parent)) {
19245
19291
  parent.items[key2] = node;
19246
19292
  } else if (isPair(parent)) {
@@ -19840,10 +19886,10 @@ var init_createNode = __esm({
19840
19886
  });
19841
19887
 
19842
19888
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
19843
- function collectionFromPath(schema4, path38, value) {
19889
+ function collectionFromPath(schema4, path39, value) {
19844
19890
  let v = value;
19845
- for (let i = path38.length - 1; i >= 0; --i) {
19846
- const k = path38[i];
19891
+ for (let i = path39.length - 1; i >= 0; --i) {
19892
+ const k = path39[i];
19847
19893
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
19848
19894
  const a = [];
19849
19895
  a[k] = v;
@@ -19868,7 +19914,7 @@ var init_Collection = __esm({
19868
19914
  init_createNode();
19869
19915
  init_identity();
19870
19916
  init_Node();
19871
- 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;
19872
19918
  Collection = class extends NodeBase {
19873
19919
  constructor(type, schema4) {
19874
19920
  super(type);
@@ -19898,11 +19944,11 @@ var init_Collection = __esm({
19898
19944
  * be a Pair instance or a `{ key, value }` object, which may not have a key
19899
19945
  * that already exists in the map.
19900
19946
  */
19901
- addIn(path38, value) {
19902
- if (isEmptyPath(path38))
19947
+ addIn(path39, value) {
19948
+ if (isEmptyPath(path39))
19903
19949
  this.add(value);
19904
19950
  else {
19905
- const [key2, ...rest] = path38;
19951
+ const [key2, ...rest] = path39;
19906
19952
  const node = this.get(key2, true);
19907
19953
  if (isCollection(node))
19908
19954
  node.addIn(rest, value);
@@ -19916,8 +19962,8 @@ var init_Collection = __esm({
19916
19962
  * Removes a value from the collection.
19917
19963
  * @returns `true` if the item was found and removed.
19918
19964
  */
19919
- deleteIn(path38) {
19920
- const [key2, ...rest] = path38;
19965
+ deleteIn(path39) {
19966
+ const [key2, ...rest] = path39;
19921
19967
  if (rest.length === 0)
19922
19968
  return this.delete(key2);
19923
19969
  const node = this.get(key2, true);
@@ -19931,8 +19977,8 @@ var init_Collection = __esm({
19931
19977
  * scalar values from their surrounding node; to disable set `keepScalar` to
19932
19978
  * `true` (collections are always returned intact).
19933
19979
  */
19934
- getIn(path38, keepScalar) {
19935
- const [key2, ...rest] = path38;
19980
+ getIn(path39, keepScalar) {
19981
+ const [key2, ...rest] = path39;
19936
19982
  const node = this.get(key2, true);
19937
19983
  if (rest.length === 0)
19938
19984
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -19950,8 +19996,8 @@ var init_Collection = __esm({
19950
19996
  /**
19951
19997
  * Checks if the collection includes a value with the key `key`.
19952
19998
  */
19953
- hasIn(path38) {
19954
- const [key2, ...rest] = path38;
19999
+ hasIn(path39) {
20000
+ const [key2, ...rest] = path39;
19955
20001
  if (rest.length === 0)
19956
20002
  return this.has(key2);
19957
20003
  const node = this.get(key2, true);
@@ -19961,8 +20007,8 @@ var init_Collection = __esm({
19961
20007
  * Sets a value in this collection. For `!!set`, `value` needs to be a
19962
20008
  * boolean to add/remove the item from the set.
19963
20009
  */
19964
- setIn(path38, value) {
19965
- const [key2, ...rest] = path38;
20010
+ setIn(path39, value) {
20011
+ const [key2, ...rest] = path39;
19966
20012
  if (rest.length === 0) {
19967
20013
  this.set(key2, value);
19968
20014
  } else {
@@ -22396,9 +22442,9 @@ var init_Document = __esm({
22396
22442
  this.contents.add(value);
22397
22443
  }
22398
22444
  /** Adds a value to the document. */
22399
- addIn(path38, value) {
22445
+ addIn(path39, value) {
22400
22446
  if (assertCollection(this.contents))
22401
- this.contents.addIn(path38, value);
22447
+ this.contents.addIn(path39, value);
22402
22448
  }
22403
22449
  /**
22404
22450
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -22473,14 +22519,14 @@ var init_Document = __esm({
22473
22519
  * Removes a value from the document.
22474
22520
  * @returns `true` if the item was found and removed.
22475
22521
  */
22476
- deleteIn(path38) {
22477
- if (isEmptyPath(path38)) {
22522
+ deleteIn(path39) {
22523
+ if (isEmptyPath(path39)) {
22478
22524
  if (this.contents == null)
22479
22525
  return false;
22480
22526
  this.contents = null;
22481
22527
  return true;
22482
22528
  }
22483
- return assertCollection(this.contents) ? this.contents.deleteIn(path38) : false;
22529
+ return assertCollection(this.contents) ? this.contents.deleteIn(path39) : false;
22484
22530
  }
22485
22531
  /**
22486
22532
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -22495,10 +22541,10 @@ var init_Document = __esm({
22495
22541
  * scalar values from their surrounding node; to disable set `keepScalar` to
22496
22542
  * `true` (collections are always returned intact).
22497
22543
  */
22498
- getIn(path38, keepScalar) {
22499
- if (isEmptyPath(path38))
22544
+ getIn(path39, keepScalar) {
22545
+ if (isEmptyPath(path39))
22500
22546
  return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
22501
- return isCollection(this.contents) ? this.contents.getIn(path38, keepScalar) : void 0;
22547
+ return isCollection(this.contents) ? this.contents.getIn(path39, keepScalar) : void 0;
22502
22548
  }
22503
22549
  /**
22504
22550
  * Checks if the document includes a value with the key `key`.
@@ -22509,10 +22555,10 @@ var init_Document = __esm({
22509
22555
  /**
22510
22556
  * Checks if the document includes a value at `path`.
22511
22557
  */
22512
- hasIn(path38) {
22513
- if (isEmptyPath(path38))
22558
+ hasIn(path39) {
22559
+ if (isEmptyPath(path39))
22514
22560
  return this.contents !== void 0;
22515
- return isCollection(this.contents) ? this.contents.hasIn(path38) : false;
22561
+ return isCollection(this.contents) ? this.contents.hasIn(path39) : false;
22516
22562
  }
22517
22563
  /**
22518
22564
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -22529,13 +22575,13 @@ var init_Document = __esm({
22529
22575
  * Sets a value in this document. For `!!set`, `value` needs to be a
22530
22576
  * boolean to add/remove the item from the set.
22531
22577
  */
22532
- setIn(path38, value) {
22533
- if (isEmptyPath(path38)) {
22578
+ setIn(path39, value) {
22579
+ if (isEmptyPath(path39)) {
22534
22580
  this.contents = value;
22535
22581
  } else if (this.contents == null) {
22536
- this.contents = collectionFromPath(this.schema, Array.from(path38), value);
22582
+ this.contents = collectionFromPath(this.schema, Array.from(path39), value);
22537
22583
  } else if (assertCollection(this.contents)) {
22538
- this.contents.setIn(path38, value);
22584
+ this.contents.setIn(path39, value);
22539
22585
  }
22540
22586
  }
22541
22587
  /**
@@ -24440,15 +24486,15 @@ function visit2(cst, visitor) {
24440
24486
  cst = { start: cst.start, value: cst.value };
24441
24487
  _visit(Object.freeze([]), cst, visitor);
24442
24488
  }
24443
- function _visit(path38, item, visitor) {
24444
- let ctrl = visitor(item, path38);
24489
+ function _visit(path39, item, visitor) {
24490
+ let ctrl = visitor(item, path39);
24445
24491
  if (typeof ctrl === "symbol")
24446
24492
  return ctrl;
24447
24493
  for (const field of ["key", "value"]) {
24448
24494
  const token = item[field];
24449
24495
  if (token && "items" in token) {
24450
24496
  for (let i = 0; i < token.items.length; ++i) {
24451
- 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);
24452
24498
  if (typeof ci === "number")
24453
24499
  i = ci - 1;
24454
24500
  else if (ci === BREAK2)
@@ -24459,10 +24505,10 @@ function _visit(path38, item, visitor) {
24459
24505
  }
24460
24506
  }
24461
24507
  if (typeof ctrl === "function" && field === "key")
24462
- ctrl = ctrl(item, path38);
24508
+ ctrl = ctrl(item, path39);
24463
24509
  }
24464
24510
  }
24465
- return typeof ctrl === "function" ? ctrl(item, path38) : ctrl;
24511
+ return typeof ctrl === "function" ? ctrl(item, path39) : ctrl;
24466
24512
  }
24467
24513
  var BREAK2, SKIP2, REMOVE2;
24468
24514
  var init_cst_visit = __esm({
@@ -24473,9 +24519,9 @@ var init_cst_visit = __esm({
24473
24519
  visit2.BREAK = BREAK2;
24474
24520
  visit2.SKIP = SKIP2;
24475
24521
  visit2.REMOVE = REMOVE2;
24476
- visit2.itemAtPath = (cst, path38) => {
24522
+ visit2.itemAtPath = (cst, path39) => {
24477
24523
  let item = cst;
24478
- for (const [field, index] of path38) {
24524
+ for (const [field, index] of path39) {
24479
24525
  const tok = item?.[field];
24480
24526
  if (tok && "items" in tok) {
24481
24527
  item = tok.items[index];
@@ -24484,9 +24530,9 @@ var init_cst_visit = __esm({
24484
24530
  }
24485
24531
  return item;
24486
24532
  };
24487
- visit2.parentCollection = (cst, path38) => {
24488
- const parent = visit2.itemAtPath(cst, path38.slice(0, -1));
24489
- 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];
24490
24536
  const coll = parent?.[field];
24491
24537
  if (coll && "items" in coll)
24492
24538
  return coll;
@@ -25789,14 +25835,14 @@ var init_parser = __esm({
25789
25835
  case "scalar":
25790
25836
  case "single-quoted-scalar":
25791
25837
  case "double-quoted-scalar": {
25792
- const fs34 = this.flowScalar(this.type);
25838
+ const fs35 = this.flowScalar(this.type);
25793
25839
  if (atNextItem || it.value) {
25794
- map2.items.push({ start, key: fs34, sep: [] });
25840
+ map2.items.push({ start, key: fs35, sep: [] });
25795
25841
  this.onKeyLine = true;
25796
25842
  } else if (it.sep) {
25797
- this.stack.push(fs34);
25843
+ this.stack.push(fs35);
25798
25844
  } else {
25799
- Object.assign(it, { key: fs34, sep: [] });
25845
+ Object.assign(it, { key: fs35, sep: [] });
25800
25846
  this.onKeyLine = true;
25801
25847
  }
25802
25848
  return;
@@ -25924,13 +25970,13 @@ var init_parser = __esm({
25924
25970
  case "scalar":
25925
25971
  case "single-quoted-scalar":
25926
25972
  case "double-quoted-scalar": {
25927
- const fs34 = this.flowScalar(this.type);
25973
+ const fs35 = this.flowScalar(this.type);
25928
25974
  if (!it || it.value)
25929
- fc.items.push({ start: [], key: fs34, sep: [] });
25975
+ fc.items.push({ start: [], key: fs35, sep: [] });
25930
25976
  else if (it.sep)
25931
- this.stack.push(fs34);
25977
+ this.stack.push(fs35);
25932
25978
  else
25933
- Object.assign(it, { key: fs34, sep: [] });
25979
+ Object.assign(it, { key: fs35, sep: [] });
25934
25980
  return;
25935
25981
  }
25936
25982
  case "flow-map-end":
@@ -27301,9 +27347,9 @@ function safeChildPlistName(value) {
27301
27347
  name: file.toLowerCase().endsWith(".plist") ? file : `${file}.plist`
27302
27348
  };
27303
27349
  }
27304
- async function readableSettingsBundle(path38) {
27350
+ async function readableSettingsBundle(path39) {
27305
27351
  try {
27306
- 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"));
27307
27353
  return root.isFile() && root.size <= MAX_PLIST_BYTES;
27308
27354
  } catch {
27309
27355
  return false;
@@ -27348,11 +27394,11 @@ async function settingsBundleFingerprint(bundlePath) {
27348
27394
  return null;
27349
27395
  }
27350
27396
  }
27351
- async function parsePlistRecord(path38) {
27397
+ async function parsePlistRecord(path39) {
27352
27398
  try {
27353
- const metadata = await (0, import_promises.stat)(path38);
27399
+ const metadata = await (0, import_promises.stat)(path39);
27354
27400
  if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
27355
- const source = await (0, import_promises.readFile)(path38, "utf8");
27401
+ const source = await (0, import_promises.readFile)(path39, "utf8");
27356
27402
  const parsed = parsePlistSource(source);
27357
27403
  return isRecord2(parsed) ? parsed : null;
27358
27404
  } catch {
@@ -27698,7 +27744,7 @@ async function tcpPing(port, timeout = TCP_GATE_MS) {
27698
27744
  return null;
27699
27745
  }
27700
27746
  }
27701
- function httpGet(hostname, port, path38, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
27747
+ function httpGet(hostname, port, path39, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
27702
27748
  return new Promise((resolve10) => {
27703
27749
  let settled = false;
27704
27750
  let killing = false;
@@ -27707,7 +27753,7 @@ function httpGet(hostname, port, path38, method = "GET", timeout = TIMEOUT_MS, h
27707
27753
  settled = true;
27708
27754
  resolve10(value);
27709
27755
  };
27710
- 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) => {
27711
27757
  let body = "";
27712
27758
  res.on("data", (c) => body += c.toString());
27713
27759
  const contentType = (() => {
@@ -31835,8 +31881,8 @@ function pickImagesetFile(images) {
31835
31881
  scale: pick.scale === "2x" ? 2 : pick.scale === "3x" ? 3 : 1
31836
31882
  };
31837
31883
  }
31838
- function flatScale(path38) {
31839
- const match = /@([23])x\.[^./]+$/.exec(path38);
31884
+ function flatScale(path39) {
31885
+ const match = /@([23])x\.[^./]+$/.exec(path39);
31840
31886
  return match ? Number(match[1]) : 1;
31841
31887
  }
31842
31888
  function providesNamespace(text3) {
@@ -31863,13 +31909,13 @@ function catalogEntryName(contentsPath, kind, readText2) {
31863
31909
  }
31864
31910
  return segments.join("/");
31865
31911
  }
31866
- function isFlatResourceImage(path38) {
31867
- 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));
31868
31914
  }
31869
31915
  function enumerateBundleImages(paths, readText2) {
31870
31916
  const table = [];
31871
31917
  const seen = /* @__PURE__ */ new Set();
31872
- const catalogs = paths.filter((path38) => baseOf(path38) === "Contents.json");
31918
+ const catalogs = paths.filter((path39) => baseOf(path39) === "Contents.json");
31873
31919
  for (const contentsPath of catalogs) {
31874
31920
  const name2 = catalogEntryName(contentsPath, ".imageset", readText2);
31875
31921
  if (name2 === null || seen.has(name2)) continue;
@@ -31890,12 +31936,12 @@ function enumerateBundleImages(paths, readText2) {
31890
31936
  seen.add(name2);
31891
31937
  table.push({ name: name2, file: `${dir}/${pick.filename}`, scale: pick.scale });
31892
31938
  }
31893
- for (const path38 of paths) {
31894
- if (!isFlatResourceImage(path38)) continue;
31895
- 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);
31896
31942
  if (name2 === "" || seen.has(name2)) continue;
31897
31943
  seen.add(name2);
31898
- table.push({ name: name2, file: path38, scale: flatScale(path38) });
31944
+ table.push({ name: name2, file: path39, scale: flatScale(path39) });
31899
31945
  }
31900
31946
  return table;
31901
31947
  }
@@ -31924,7 +31970,7 @@ function colorsetValue(color) {
31924
31970
  }
31925
31971
  function enumerateBundleColors(paths, readText2) {
31926
31972
  const table = {};
31927
- for (const contentsPath of paths.filter((path38) => baseOf(path38) === "Contents.json")) {
31973
+ for (const contentsPath of paths.filter((path39) => baseOf(path39) === "Contents.json")) {
31928
31974
  const name2 = catalogEntryName(contentsPath, ".colorset", readText2);
31929
31975
  if (name2 === null || name2 in table) continue;
31930
31976
  let colors;
@@ -31988,8 +32034,8 @@ function axisExtremes(points) {
31988
32034
  function pathBounds(d) {
31989
32035
  const xs = [];
31990
32036
  const ys = [];
31991
- for (const path38 of d)
31992
- (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) => {
31993
32039
  const [command, ...args] = segment;
31994
32040
  if (command === "M" || command === "L") {
31995
32041
  xs.push(Number(args[0]));
@@ -32016,7 +32062,7 @@ function guide(svg, id, axis) {
32016
32062
  }
32017
32063
  function enumerateBundleSymbols(paths, readText2) {
32018
32064
  const table = {};
32019
- for (const contentsPath of paths.filter((path38) => baseOf(path38) === "Contents.json")) {
32065
+ for (const contentsPath of paths.filter((path39) => baseOf(path39) === "Contents.json")) {
32020
32066
  const name2 = catalogEntryName(contentsPath, ".symbolset", readText2);
32021
32067
  if (name2 === null || name2 in table) continue;
32022
32068
  let symbols;
@@ -32049,8 +32095,8 @@ function enumerateBundleSymbols(paths, readText2) {
32049
32095
  viewBox: "0 0 24 24",
32050
32096
  advance,
32051
32097
  box: [12 - advance / 2, 12 - tall / 2, advance, tall],
32052
- layers: d.map((path38) => ({
32053
- 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()
32054
32100
  }))
32055
32101
  };
32056
32102
  }
@@ -32060,7 +32106,7 @@ function enumerateBundleJson(paths) {
32060
32106
  const found = [];
32061
32107
  const seen = /* @__PURE__ */ new Set();
32062
32108
  const ordered = [...paths].filter(
32063
- (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")
32064
32110
  ).sort((a, b) => {
32065
32111
  const aDepth = a.split("/").length;
32066
32112
  const bDepth = b.split("/").length;
@@ -33359,10 +33405,10 @@ function emitSwiftStandin(graphs, options) {
33359
33405
  owners.push(...physical.map(() => current));
33360
33406
  };
33361
33407
  const scoped = (body) => (symbol, ...rest) => {
33362
- const path38 = pathOf(symbol);
33363
- 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) });
33364
33410
  const previous = current;
33365
- current = path38;
33411
+ current = path39;
33366
33412
  try {
33367
33413
  body(symbol, ...rest);
33368
33414
  } finally {
@@ -33382,14 +33428,14 @@ function emitSwiftStandin(graphs, options) {
33382
33428
  const access = (symbol, openOwner) => symbol.accessLevel === "open" && openOwner ? "open" : "public";
33383
33429
  const emitMember = scoped(
33384
33430
  (member, indent, context) => {
33385
- const path38 = pathOf(member);
33431
+ const path39 = pathOf(member);
33386
33432
  if (TYPE_KINDS.has(member.kind.identifier)) {
33387
33433
  emitType(member, indent);
33388
33434
  return;
33389
33435
  }
33390
33436
  if (member.kind.identifier === "swift.enum.case") return;
33391
33437
  if (!MEMBER_KINDS.has(member.kind.identifier)) {
33392
- skipped.push({ path: path38, reason: `unhandled ${member.kind.identifier}` });
33438
+ skipped.push({ path: path39, reason: `unhandled ${member.kind.identifier}` });
33393
33439
  return;
33394
33440
  }
33395
33441
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(member));
@@ -33403,12 +33449,12 @@ function emitSwiftStandin(graphs, options) {
33403
33449
  const final = context.inClass && flags.has("final") ? "final " : "";
33404
33450
  const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
33405
33451
  let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
33406
- 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 " : "";
33407
33453
  const head = `${indent}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
33408
- const measured = behavior.get(path38);
33409
- if (measured) used.add(path38);
33454
+ const measured = behavior.get(path39);
33455
+ if (measured) used.add(path39);
33410
33456
  const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
33411
- const body = overloadBody ?? measured?.body ?? trap(path38);
33457
+ const body = overloadBody ?? measured?.body ?? trap(path39);
33412
33458
  switch (member.kind.identifier) {
33413
33459
  case "swift.property":
33414
33460
  case "swift.type.property":
@@ -33429,7 +33475,7 @@ function emitSwiftStandin(graphs, options) {
33429
33475
  return;
33430
33476
  }
33431
33477
  emit(
33432
- `${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)} }` : ""} }`
33433
33479
  );
33434
33480
  return;
33435
33481
  }
@@ -33482,7 +33528,7 @@ function emitSwiftStandin(graphs, options) {
33482
33528
  };
33483
33529
  const emitType = scoped(
33484
33530
  (symbol, indent) => {
33485
- const path38 = pathOf(symbol);
33531
+ const path39 = pathOf(symbol);
33486
33532
  const id = symbol.identifier.precise;
33487
33533
  const inner = `${indent} `;
33488
33534
  switch (symbol.kind.identifier) {
@@ -33494,10 +33540,10 @@ function emitSwiftStandin(graphs, options) {
33494
33540
  case "swift.class": {
33495
33541
  const shape = header(symbol, "class", indent);
33496
33542
  if (!shape)
33497
- return void skipped.push({ path: path38, reason: `unparsed class ${text(symbol)}` });
33498
- 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);
33499
33545
  const blocked = classBlocked(id);
33500
- if (blocked) return void skipped.push({ path: path38, reason: blocked });
33546
+ if (blocked) return void skipped.push({ path: path39, reason: blocked });
33501
33547
  const ancestors = /* @__PURE__ */ new Set();
33502
33548
  for (let at = superId.get(id); at; at = superId.get(at))
33503
33549
  for (const name2 of conforms.get(at) ?? []) ancestors.add(name2);
@@ -33513,9 +33559,9 @@ function emitSwiftStandin(graphs, options) {
33513
33559
  `${indent}${shape.attrs}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
33514
33560
  );
33515
33561
  const members = membersOf(id);
33516
- const extra = options.behavior?.get(path38)?.members;
33562
+ const extra = options.behavior?.get(path39)?.members;
33517
33563
  if (extra) {
33518
- used.add(path38);
33564
+ used.add(path39);
33519
33565
  emit(`${inner}${extra}`);
33520
33566
  }
33521
33567
  for (const member of members)
@@ -33567,13 +33613,13 @@ function emitSwiftStandin(graphs, options) {
33567
33613
  continue;
33568
33614
  have.add(witnessKey(member));
33569
33615
  have.add(sideLeaf(member));
33570
- emitWitness(member, inner, path38);
33616
+ emitWitness(member, inner, path39);
33571
33617
  }
33572
33618
  }
33573
33619
  const coder = members.some((member) => leaf(member) === "init(coder:)");
33574
33620
  if (designated && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
33575
33621
  emit(
33576
- `${inner}public required init?(coder: NSCoder) { ${trap(`${path38}.init(coder:)`)} }`
33622
+ `${inner}public required init?(coder: NSCoder) { ${trap(`${path39}.init(coder:)`)} }`
33577
33623
  );
33578
33624
  emit(`${indent}}`);
33579
33625
  return;
@@ -33581,7 +33627,7 @@ function emitSwiftStandin(graphs, options) {
33581
33627
  case "swift.struct": {
33582
33628
  const shape = header(symbol, "struct", indent);
33583
33629
  if (!shape)
33584
- return void skipped.push({ path: path38, reason: `unparsed struct ${text(symbol)}` });
33630
+ return void skipped.push({ path: path39, reason: `unparsed struct ${text(symbol)}` });
33585
33631
  const members = membersOf(id);
33586
33632
  const raw2 = rawType(members);
33587
33633
  const list2 = inheritance(id);
@@ -33613,7 +33659,7 @@ function emitSwiftStandin(graphs, options) {
33613
33659
  case "swift.enum": {
33614
33660
  const shape = header(symbol, "enum", indent);
33615
33661
  if (!shape)
33616
- return void skipped.push({ path: path38, reason: `unparsed enum ${text(symbol)}` });
33662
+ return void skipped.push({ path: path39, reason: `unparsed enum ${text(symbol)}` });
33617
33663
  const members = membersOf(id);
33618
33664
  const raw2 = rawType(members);
33619
33665
  const cases = members.filter(
@@ -33622,7 +33668,7 @@ function emitSwiftStandin(graphs, options) {
33622
33668
  const missing = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
33623
33669
  if (raw2 && isObjC(symbol) && missing.length > 0)
33624
33670
  return void skipped.push({
33625
- path: path38,
33671
+ path: path39,
33626
33672
  reason: `no header value for ${missing.map(leaf).join(", ")}`
33627
33673
  });
33628
33674
  const list2 = inheritance(id, raw2 ?? void 0).filter(
@@ -33662,7 +33708,7 @@ function emitSwiftStandin(graphs, options) {
33662
33708
  const shape = header(symbol, "protocol", indent);
33663
33709
  if (!shape)
33664
33710
  return void skipped.push({
33665
- path: path38,
33711
+ path: path39,
33666
33712
  reason: `unparsed protocol ${text(symbol)}`
33667
33713
  });
33668
33714
  const list2 = [...isObjC(symbol) ? ["AnyObject"] : [], ...inheritance(id)];
@@ -33687,7 +33733,7 @@ function emitSwiftStandin(graphs, options) {
33687
33733
  }
33688
33734
  emit(`${indent}}`);
33689
33735
  if (defaults.length > 0) {
33690
- emit(`${indent}extension ${path38} {`);
33736
+ emit(`${indent}extension ${path39} {`);
33691
33737
  for (const member of defaults) {
33692
33738
  const decl = text(member);
33693
33739
  if (optional.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
@@ -33733,7 +33779,7 @@ function emitSwiftStandin(graphs, options) {
33733
33779
  return init ? /rawValue:\s*([^)]+)\)/.exec(text(init))?.[1]?.trim() ?? null : null;
33734
33780
  };
33735
33781
  const emitGlobal = scoped((symbol) => {
33736
- const path38 = pathOf(symbol);
33782
+ const path39 = pathOf(symbol);
33737
33783
  const kind = symbol.kind.identifier;
33738
33784
  if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
33739
33785
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol));
@@ -33744,17 +33790,17 @@ function emitSwiftStandin(graphs, options) {
33744
33790
  if (fix && !/^(?:prefix|infix|postfix)\b/.test(spelled))
33745
33791
  spelled = `${fix} ${spelled}`;
33746
33792
  }
33747
- emit(`${attrs}public ${spelled} { ${trap(path38)} }`);
33793
+ emit(`${attrs}public ${spelled} { ${trap(path39)} }`);
33748
33794
  } else if (kind === "swift.var") {
33749
33795
  const parsed = splitAccessors(text(symbol).replace(/^let /, "var "));
33750
- const measured = behavior.get(path38);
33751
- if (measured) used.add(path38);
33752
- emit(`public ${parsed.decl} { ${measured?.body ?? trap(path38)} }`);
33753
- } 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}` });
33754
33800
  });
33755
33801
  const roots = [...byId.values()].filter((symbol) => !owner.has(symbol.identifier.precise) && !unavailable(symbol)).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
33756
33802
  for (const symbol of roots) {
33757
- const path38 = pathOf(symbol);
33803
+ const path39 = pathOf(symbol);
33758
33804
  if (TYPE_KINDS.has(symbol.kind.identifier)) emitType(symbol, "");
33759
33805
  else emitGlobal(symbol);
33760
33806
  }
@@ -33795,9 +33841,9 @@ function emitSwiftStandin(graphs, options) {
33795
33841
  ...imports.map((name2) => `import ${name2}`),
33796
33842
  ""
33797
33843
  ];
33798
- for (const path38 of behavior.keys())
33799
- if (!used.has(path38))
33800
- 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" });
33801
33847
  return {
33802
33848
  source: `${[...banner, ...lines].join("\n")}
33803
33849
  `,
@@ -33883,7 +33929,7 @@ var init_swift_standin_emit = __esm({
33883
33929
  sideLeaf = (symbol) => `${symbol.kind.identifier.startsWith("swift.type.") ? "type" : "instance"}|leaf|${leaf(symbol)}`;
33884
33930
  isObjC = (symbol) => symbol.identifier.precise.startsWith("c:");
33885
33931
  synthesizedEquality = (symbol, conforms) => conforms.includes("Hashable") ? ["==(_:_:)", "hash(into:)", "hashValue"].includes(leaf(symbol)) : conforms.includes("Equatable") && leaf(symbol) === "==(_:_:)";
33886
- trap = (path38) => `fatalError("${path38} is a binary framework peach cannot run")`;
33932
+ trap = (path39) => `fatalError("${path39} is a binary framework peach cannot run")`;
33887
33933
  KEYWORDS = /* @__PURE__ */ new Set([
33888
33934
  "Type",
33889
33935
  "Protocol",
@@ -36601,6 +36647,9 @@ function nativeTargets(project) {
36601
36647
  }
36602
36648
  return refs;
36603
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
+ }
36604
36653
  function readXcodeAppTarget(input, targetName) {
36605
36654
  const xcodeprojOrWorkspace = import_node_fs18.default.realpathSync(input);
36606
36655
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
@@ -38179,8 +38228,8 @@ function sourceEntryPath() {
38179
38228
  return null;
38180
38229
  }
38181
38230
  }
38182
- function isCliEntry(path38) {
38183
- const name2 = (0, import_node_path22.basename)(path38);
38231
+ function isCliEntry(path39) {
38232
+ const name2 = (0, import_node_path22.basename)(path39);
38184
38233
  return name2 === "bin.ts" || name2 === "bin.js";
38185
38234
  }
38186
38235
  function rnxSelfInvocation() {
@@ -43095,8 +43144,8 @@ function metroIosAssetDestRelatives(httpServerLocation, filename) {
43095
43144
  }
43096
43145
  const out = [];
43097
43146
  for (const dir of dirs) {
43098
- const path38 = `${dir}/${filename}`;
43099
- if (!out.includes(path38)) out.push(path38);
43147
+ const path39 = `${dir}/${filename}`;
43148
+ if (!out.includes(path39)) out.push(path39);
43100
43149
  }
43101
43150
  if (!out.includes(filename)) out.push(filename);
43102
43151
  return out;
@@ -44060,13 +44109,13 @@ function readFactoryStringLiterals(factory) {
44060
44109
  return literals;
44061
44110
  }
44062
44111
  function normalizeFingerprintLiteral(literal) {
44063
- const path38 = literal.replaceAll("\\\\", "/").replaceAll("\\/", "/");
44112
+ const path39 = literal.replaceAll("\\\\", "/").replaceAll("\\/", "/");
44064
44113
  const nodeModulesMarker = "/node_modules/";
44065
- const nodeModulesIndex = path38.lastIndexOf(nodeModulesMarker);
44114
+ const nodeModulesIndex = path39.lastIndexOf(nodeModulesMarker);
44066
44115
  if (nodeModulesIndex >= 0) {
44067
- return `node_modules/${path38.slice(nodeModulesIndex + nodeModulesMarker.length)}`;
44116
+ return `node_modules/${path39.slice(nodeModulesIndex + nodeModulesMarker.length)}`;
44068
44117
  }
44069
- 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)) {
44070
44119
  return null;
44071
44120
  }
44072
44121
  return literal;
@@ -44304,10 +44353,10 @@ function templateAssignment(template, embeddings) {
44304
44353
  if (existingNode !== void 0 && existingNode !== nodeIndex) return null;
44305
44354
  nodesByModuleId.set(moduleId, nodeIndex);
44306
44355
  const node = template.nodes[nodeIndex];
44307
- 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`;
44308
44357
  const existingPath = pathsByModuleId.get(moduleId);
44309
- if (existingPath !== void 0 && existingPath !== path38) return null;
44310
- pathsByModuleId.set(moduleId, path38);
44358
+ if (existingPath !== void 0 && existingPath !== path39) return null;
44359
+ pathsByModuleId.set(moduleId, path39);
44311
44360
  }
44312
44361
  }
44313
44362
  return {
@@ -44469,14 +44518,14 @@ async function inferMetroModuleIdentity(args) {
44469
44518
  const packageClaims = claimsByPackage.values().next().value;
44470
44519
  if (!packageClaims) continue;
44471
44520
  const exactClaims = packageClaims.filter((assignment2) => {
44472
- const path38 = assignment2.pathsByModuleId.get(moduleId);
44473
- return path38 !== void 0 && !path38.includes("/__rnx_inferred__/");
44521
+ const path39 = assignment2.pathsByModuleId.get(moduleId);
44522
+ return path39 !== void 0 && !path39.includes("/__rnx_inferred__/");
44474
44523
  });
44475
44524
  const preferredClaims = exactClaims.length > 0 ? exactClaims : packageClaims;
44476
44525
  const routes = new Set(
44477
44526
  preferredClaims.flatMap((assignment2) => {
44478
- const path38 = assignment2.pathsByModuleId.get(moduleId);
44479
- return path38 ? [metroFingerprintModuleClaimRoute(assignment2.packageName, path38)] : [];
44527
+ const path39 = assignment2.pathsByModuleId.get(moduleId);
44528
+ return path39 ? [metroFingerprintModuleClaimRoute(assignment2.packageName, path39)] : [];
44480
44529
  })
44481
44530
  );
44482
44531
  if (routes.size !== 1) continue;
@@ -44832,8 +44881,8 @@ function metadataValue(value, key2) {
44832
44881
  if (!value || typeof value !== "object") return void 0;
44833
44882
  return Object.getOwnPropertyDescriptor(value, key2)?.value;
44834
44883
  }
44835
- function readProjectJson(path38, files2 = nodeRepoFileReader) {
44836
- const text3 = readProjectMetadata(path38, files2);
44884
+ function readProjectJson(path39, files2 = nodeRepoFileReader) {
44885
+ const text3 = readProjectMetadata(path39, files2);
44837
44886
  if (text3 === null) return null;
44838
44887
  try {
44839
44888
  const value = JSON.parse(text3);
@@ -48818,11 +48867,11 @@ async function evalInBridge(bridge, code, opts = {}) {
48818
48867
  if (opts.acquireLock) payload.acquireLock = true;
48819
48868
  return bridge.send(payload);
48820
48869
  }
48821
- async function callInBridge(bridge, path38, ...args) {
48822
- return bridge.send({ type: "call", path: path38, args });
48870
+ async function callInBridge(bridge, path39, ...args) {
48871
+ return bridge.send({ type: "call", path: path39, args });
48823
48872
  }
48824
- async function callInBridgeWrite(bridge, path38, ...args) {
48825
- 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 });
48826
48875
  }
48827
48876
  var import_node_fs32, import_node_path33, import_ws2, PEACH_PLACEMENT_ENV, resolvedWorld, BridgeSimLockedError, DisconnectedSimError, BRIDGE_VALUE_FLAGS_TABLE, BRIDGE_VALUE_FLAGS;
48828
48877
  var init_ws_bridge = __esm({
@@ -48959,8 +49008,8 @@ function getDefaultPortForProtocol(protocol) {
48959
49008
  return protocol === "https:" ? 443 : 80;
48960
49009
  }
48961
49010
  function isBaseServerUrl(url) {
48962
- const path38 = url.pathname || "/";
48963
- return (path38 === "/" || path38 === "") && !url.search && !url.hash;
49011
+ const path39 = url.pathname || "/";
49012
+ return (path39 === "/" || path39 === "") && !url.search && !url.hash;
48964
49013
  }
48965
49014
  async function resolvePortViaServerScan(port) {
48966
49015
  try {
@@ -49261,6 +49310,165 @@ var init_flow_timeout_scale = __esm({
49261
49310
  }
49262
49311
  });
49263
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
+
49264
49472
  // src/profiles.ts
49265
49473
  function normalizeProfileId(input) {
49266
49474
  const id = input.trim();
@@ -49368,59 +49576,59 @@ var init_profiles = __esm({
49368
49576
  // cli/app-catalog.ts
49369
49577
  function listDir(dir) {
49370
49578
  try {
49371
- return import_node_fs34.default.readdirSync(dir, { withFileTypes: true });
49579
+ return import_node_fs35.default.readdirSync(dir, { withFileTypes: true });
49372
49580
  } catch {
49373
49581
  return [];
49374
49582
  }
49375
49583
  }
49376
49584
  function readText(file) {
49377
49585
  try {
49378
- return import_node_fs34.default.readFileSync(file, "utf8");
49586
+ return import_node_fs35.default.readFileSync(file, "utf8");
49379
49587
  } catch {
49380
49588
  return null;
49381
49589
  }
49382
49590
  }
49383
49591
  function catalogFiles(dir, found) {
49384
49592
  for (const entry of listDir(dir)) {
49385
- const full = import_node_path35.default.join(dir, entry.name);
49593
+ const full = import_node_path36.default.join(dir, entry.name);
49386
49594
  if (entry.isDirectory()) catalogFiles(full, found);
49387
49595
  else if (entry.name === "Contents.json") found.push(full);
49388
49596
  }
49389
49597
  }
49390
49598
  function discoverAppCatalog(appDir) {
49391
- const iosDir = import_node_path35.default.join(appDir, "ios");
49599
+ const iosDir = import_node_path36.default.join(appDir, "ios");
49392
49600
  const target = listDir(iosDir).find(
49393
- (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(
49394
49602
  (file) => /^AppDelegate\.(swift|mm|m)$/.test(file.name)
49395
49603
  )
49396
49604
  );
49397
49605
  if (!target) return null;
49398
- const targetDir = import_node_path35.default.join(iosDir, target.name);
49606
+ const targetDir = import_node_path36.default.join(iosDir, target.name);
49399
49607
  const files2 = [];
49400
49608
  for (const entry of listDir(targetDir)) {
49401
49609
  if (entry.isDirectory() && entry.name.endsWith(".xcassets"))
49402
- catalogFiles(import_node_path35.default.join(targetDir, entry.name), files2);
49610
+ catalogFiles(import_node_path36.default.join(targetDir, entry.name), files2);
49403
49611
  }
49404
49612
  const relative3 = files2.map(
49405
- (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)
49406
49614
  );
49407
49615
  const colors = enumerateBundleColors(
49408
49616
  relative3,
49409
- (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
49410
49618
  );
49411
49619
  const pbxproj = listDir(iosDir).find((entry) => entry.name.endsWith(".xcodeproj"));
49412
- 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(
49413
49621
  ACCENT_BUILD_SETTING
49414
49622
  )?.[1] : void 0) ?? null;
49415
49623
  if (accentName === null && Object.keys(colors).length === 0) return null;
49416
49624
  return { colors, accentName };
49417
49625
  }
49418
- 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;
49419
49627
  var init_app_catalog = __esm({
49420
49628
  "cli/app-catalog.ts"() {
49421
49629
  "use strict";
49422
- import_node_fs34 = __toESM(require("node:fs"), 1);
49423
- 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);
49424
49632
  init_bundleAssets();
49425
49633
  ACCENT_BUILD_SETTING = /ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "?([^";]+)"?;/;
49426
49634
  PLIST_ACCENT = /<key>NSAccentColorName<\/key>\s*<string>([^<]+)<\/string>/;
@@ -49430,9 +49638,9 @@ var init_app_catalog = __esm({
49430
49638
  // cli/app-project.ts
49431
49639
  function firstNamedFile(dir, names) {
49432
49640
  for (const name2 of names) {
49433
- const candidate = import_node_path36.default.join(dir, name2);
49641
+ const candidate = import_node_path37.default.join(dir, name2);
49434
49642
  try {
49435
- if (import_node_fs35.default.statSync(candidate).isFile()) return candidate;
49643
+ if (import_node_fs36.default.statSync(candidate).isFile()) return candidate;
49436
49644
  } catch {
49437
49645
  }
49438
49646
  }
@@ -49445,24 +49653,24 @@ function findRNXAppConfig(dir) {
49445
49653
  return firstNamedFile(dir, PEACH_APP_CONFIG_NAMES);
49446
49654
  }
49447
49655
  function resolveAppProject(projectRoot) {
49448
- const appDir = import_node_path36.default.resolve(projectRoot);
49656
+ const appDir = import_node_path37.default.resolve(projectRoot);
49449
49657
  try {
49450
- if (!import_node_fs35.default.statSync(appDir).isDirectory()) return null;
49658
+ if (!import_node_fs36.default.statSync(appDir).isDirectory()) return null;
49451
49659
  } catch {
49452
49660
  return null;
49453
49661
  }
49454
49662
  const configPath = findRNXAppConfig(appDir);
49455
- 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"))) {
49456
49664
  return null;
49457
49665
  }
49458
49666
  return { appDir, configPath };
49459
49667
  }
49460
- 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;
49461
49669
  var init_app_project = __esm({
49462
49670
  "cli/app-project.ts"() {
49463
49671
  "use strict";
49464
- import_node_fs35 = __toESM(require("node:fs"), 1);
49465
- 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);
49466
49674
  EXPO_APP_CONFIG_NAMES = [
49467
49675
  "app.config.js",
49468
49676
  "app.config.ts",
@@ -49485,12 +49693,12 @@ function resolveFileEntries(entries, configDir) {
49485
49693
  return Object.fromEntries(
49486
49694
  Object.entries(entries).map(([name2, resolution]) => [
49487
49695
  name2,
49488
- 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
49489
49697
  ])
49490
49698
  );
49491
49699
  }
49492
49700
  function resolveConfigReplacementFiles(config, configPath) {
49493
- const configDir = import_node_path37.default.dirname(configPath);
49701
+ const configDir = import_node_path38.default.dirname(configPath);
49494
49702
  return {
49495
49703
  ...config,
49496
49704
  modules: resolveFileEntries(config.modules, configDir),
@@ -49525,11 +49733,11 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
49525
49733
  const project = resolveAppProject(startDir);
49526
49734
  return { project, config: await loadRNXAppConfig(project) };
49527
49735
  }
49528
- var import_node_path37, import_jiti;
49736
+ var import_node_path38, import_jiti;
49529
49737
  var init_app_config = __esm({
49530
49738
  "cli/app-config.ts"() {
49531
49739
  "use strict";
49532
- import_node_path37 = __toESM(require("node:path"), 1);
49740
+ import_node_path38 = __toESM(require("node:path"), 1);
49533
49741
  import_jiti = require("jiti");
49534
49742
  init_config();
49535
49743
  init_config();
@@ -49589,13 +49797,13 @@ function discoverNativeLinkedAppFontPaths(opts) {
49589
49797
  scannedFontDirectories++;
49590
49798
  let entries;
49591
49799
  try {
49592
- entries = import_node_fs36.default.readdirSync(current.dir, { withFileTypes: true });
49800
+ entries = import_node_fs37.default.readdirSync(current.dir, { withFileTypes: true });
49593
49801
  } catch {
49594
49802
  continue;
49595
49803
  }
49596
49804
  for (const entry of entries) {
49597
49805
  if (entry.isSymbolicLink()) continue;
49598
- const fullPath = import_node_path38.default.join(current.dir, entry.name);
49806
+ const fullPath = import_node_path39.default.join(current.dir, entry.name);
49599
49807
  if (entry.isDirectory()) {
49600
49808
  if (current.depth < 4 && pending.length < 64 && !entry.name.startsWith(".")) {
49601
49809
  pending.push({ dir: fullPath, depth: current.depth + 1 });
@@ -49603,15 +49811,15 @@ function discoverNativeLinkedAppFontPaths(opts) {
49603
49811
  continue;
49604
49812
  }
49605
49813
  if (!entry.isFile() || !/\.(ttf|otf|woff|woff2)$/i.test(entry.name)) continue;
49606
- const relative3 = import_node_path38.default.relative(root, fullPath).split(import_node_path38.default.sep).join("/");
49607
- 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));
49608
49816
  if (fontPaths.length >= 256) break;
49609
49817
  }
49610
49818
  }
49611
49819
  };
49612
49820
  try {
49613
49821
  const packageJson = JSON.parse(
49614
- 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")
49615
49823
  );
49616
49824
  const dependencyNames = /* @__PURE__ */ new Set();
49617
49825
  for (const field of ["dependencies", "devDependencies", "optionalDependencies"]) {
@@ -49626,32 +49834,32 @@ function discoverNativeLinkedAppFontPaths(opts) {
49626
49834
  const config = Reflect.get(packageJson, "reactNativeVectorIcons");
49627
49835
  const configuredFontDir = config && typeof config === "object" ? Reflect.get(config, "fontDir") : null;
49628
49836
  const configuredDir = typeof configuredFontDir === "string" ? configuredFontDir : "rnvi-fonts";
49629
- const root = import_node_path38.default.resolve(selectedAppDir, configuredDir);
49630
- const relativeRoot = import_node_path38.default.relative(selectedAppDir, root);
49631
- if (!relativeRoot.startsWith("..") && !import_node_path38.default.isAbsolute(relativeRoot)) {
49632
- 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("/"));
49633
49841
  }
49634
- const bundleDir = import_node_path38.default.posix.dirname(opts.bundleUrl ? new URL(opts.bundleUrl).pathname : "/").replace(/^\/+/, "");
49635
- 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);
49636
49844
  const metroRootCandidates = [selectedAppDir];
49637
- if (bundleDir && selectedAppDir.endsWith(import_node_path38.default.sep + appRelativeDir)) {
49845
+ if (bundleDir && selectedAppDir.endsWith(import_node_path39.default.sep + appRelativeDir)) {
49638
49846
  metroRootCandidates.push(selectedAppDir.slice(0, -appRelativeDir.length - 1));
49639
49847
  }
49640
- 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"));
49641
49849
  for (const dependencyName of vectorIconDependencies) {
49642
49850
  try {
49643
49851
  const entryPath = vectorIconRequire.resolve(dependencyName);
49644
- const dependencyPath = dependencyName.split("/").join(import_node_path38.default.sep);
49645
- 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}`;
49646
49854
  const markerIndex = entryPath.lastIndexOf(marker);
49647
49855
  if (markerIndex === -1) continue;
49648
49856
  const packageRoot = entryPath.slice(0, markerIndex + marker.length - 1);
49649
49857
  const fontsDir = dependencyName === "react-native-vector-icons" ? "Fonts" : "fonts";
49650
- const fontsRoot = import_node_path38.default.join(packageRoot, fontsDir);
49858
+ const fontsRoot = import_node_path39.default.join(packageRoot, fontsDir);
49651
49859
  for (const metroRoot of metroRootCandidates) {
49652
49860
  collectFontFiles(
49653
49861
  fontsRoot,
49654
- 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("/")
49655
49863
  );
49656
49864
  }
49657
49865
  } catch {
@@ -49661,37 +49869,37 @@ function discoverNativeLinkedAppFontPaths(opts) {
49661
49869
  } catch {
49662
49870
  }
49663
49871
  try {
49664
- const configPath = import_node_path38.default.join(selectedAppDir, "react-native.config.js");
49665
- if (import_node_fs36.default.statSync(configPath).isFile()) {
49666
- 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"));
49667
49875
  const rnConfig = appConfigRequire(configPath);
49668
49876
  const assets2 = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
49669
49877
  if (Array.isArray(assets2)) {
49670
49878
  for (const assetDir of assets2) {
49671
49879
  if (typeof assetDir !== "string") continue;
49672
- const root = import_node_path38.default.resolve(selectedAppDir, assetDir);
49673
- const relativeRoot = import_node_path38.default.relative(selectedAppDir, root);
49674
- if (relativeRoot.startsWith("..") || import_node_path38.default.isAbsolute(relativeRoot)) continue;
49675
- 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("/"));
49676
49884
  }
49677
49885
  }
49678
49886
  }
49679
49887
  } catch {
49680
49888
  }
49681
49889
  if (platform === "ios") {
49682
- const iosDir = import_node_path38.default.join(selectedAppDir, "ios");
49890
+ const iosDir = import_node_path39.default.join(selectedAppDir, "ios");
49683
49891
  try {
49684
- const targetDirs = import_node_fs36.default.readdirSync(iosDir, { withFileTypes: true }).filter(
49892
+ const targetDirs = import_node_fs37.default.readdirSync(iosDir, { withFileTypes: true }).filter(
49685
49893
  (entry) => entry.isDirectory() && !entry.isSymbolicLink() && entry.name !== "Pods" && entry.name !== "build" && !entry.name.startsWith(".")
49686
49894
  ).slice(0, 64);
49687
- const plistPaths = [import_node_path38.default.join(iosDir, "Info.plist")];
49895
+ const plistPaths = [import_node_path39.default.join(iosDir, "Info.plist")];
49688
49896
  for (const entry of targetDirs) {
49689
- 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"));
49690
49898
  }
49691
49899
  for (const plistPath of plistPaths) {
49692
49900
  let parsed;
49693
49901
  try {
49694
- parsed = parsePlistSource(import_node_fs36.default.readFileSync(plistPath, "utf8"));
49902
+ parsed = parsePlistSource(import_node_fs37.default.readFileSync(plistPath, "utf8"));
49695
49903
  } catch {
49696
49904
  continue;
49697
49905
  }
@@ -49701,21 +49909,21 @@ function discoverNativeLinkedAppFontPaths(opts) {
49701
49909
  for (const declaredFont of declaredFonts) {
49702
49910
  if (typeof declaredFont !== "string") continue;
49703
49911
  const candidates = [
49704
- import_node_path38.default.resolve(import_node_path38.default.dirname(plistPath), declaredFont),
49705
- 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)
49706
49914
  ];
49707
49915
  const fontPath = candidates.find((candidate) => {
49708
- const relative3 = import_node_path38.default.relative(selectedAppDir, candidate);
49709
- 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;
49710
49918
  try {
49711
- return import_node_fs36.default.statSync(candidate).isFile();
49919
+ return import_node_fs37.default.statSync(candidate).isFile();
49712
49920
  } catch {
49713
49921
  return false;
49714
49922
  }
49715
49923
  });
49716
49924
  if (!fontPath) continue;
49717
49925
  fontPaths.push(
49718
- 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("/")
49719
49927
  );
49720
49928
  }
49721
49929
  }
@@ -49757,19 +49965,19 @@ async function resolveMetroProjectRoot(bundleUrl, opts) {
49757
49965
  function encodeAppFontsWire(specs) {
49758
49966
  return specs.map((spec) => `${encodeURIComponent(spec.url)}::${encodeURIComponent(spec.family)}`).join(",");
49759
49967
  }
49760
- 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;
49761
49969
  var init_app_fonts = __esm({
49762
49970
  "cli/app-fonts.ts"() {
49763
49971
  "use strict";
49764
- import_node_fs36 = __toESM(require("node:fs"), 1);
49765
- import_node_module2 = require("node:module");
49766
- 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);
49767
49975
  import_config_plugin_fonts = require("peach-engine/engine/config-plugin-fonts");
49768
49976
  init_dev_server_scanner();
49769
49977
  init_backend_origin();
49770
49978
  init_plist();
49771
49979
  init_app_project();
49772
- require2 = (0, import_node_module2.createRequire)(__sootsim_import_meta_url);
49980
+ require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
49773
49981
  }
49774
49982
  });
49775
49983
 
@@ -49838,15 +50046,15 @@ function splashImageUrls(spec) {
49838
50046
  if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
49839
50047
  return [...urls];
49840
50048
  }
49841
- var import_node_module3, import_config_plugin_splash, require3;
50049
+ var import_node_module4, import_config_plugin_splash, require3;
49842
50050
  var init_app_splash = __esm({
49843
50051
  "cli/app-splash.ts"() {
49844
50052
  "use strict";
49845
- import_node_module3 = require("node:module");
50053
+ import_node_module4 = require("node:module");
49846
50054
  import_config_plugin_splash = require("peach-engine/engine/config-plugin-splash");
49847
50055
  init_backend_origin();
49848
50056
  init_app_project();
49849
- require3 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
50057
+ require3 = (0, import_node_module4.createRequire)(__sootsim_import_meta_url);
49850
50058
  }
49851
50059
  });
49852
50060
 
@@ -50703,7 +50911,7 @@ function desktopHostExecutable() {
50703
50911
  function bundleValue(app, key2) {
50704
50912
  const read = (0, import_node_child_process13.spawnSync)(
50705
50913
  "plutil",
50706
- ["-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")],
50707
50915
  { encoding: "utf8" }
50708
50916
  );
50709
50917
  return read.status === 0 ? read.stdout.trim() : null;
@@ -50714,8 +50922,8 @@ function isNativeHostBundle(app) {
50714
50922
  function placedHostVersion() {
50715
50923
  if (desktopHostPlatform() === "linux-x64") {
50716
50924
  try {
50717
- const version = import_node_fs37.default.readFileSync(import_node_path39.default.join(desktopHostsDir(), "active"), "utf8").trim();
50718
- 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;
50719
50927
  } catch {
50720
50928
  return null;
50721
50929
  }
@@ -50731,18 +50939,18 @@ function headlessHostCommand() {
50731
50939
  if (!version) return null;
50732
50940
  const dir = desktopHostDir(version);
50733
50941
  return [
50734
- import_node_path39.default.join(dir, "bin/node"),
50942
+ import_node_path40.default.join(dir, "bin/node"),
50735
50943
  "--experimental-vm-modules",
50736
- import_node_path39.default.join(dir, "node/host.mjs")
50944
+ import_node_path40.default.join(dir, "node/host.mjs")
50737
50945
  ];
50738
50946
  }
50739
- 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;
50740
50948
  var init_desktop_host_delivery = __esm({
50741
50949
  "src/desktop-host-delivery.ts"() {
50742
50950
  "use strict";
50743
50951
  import_node_child_process13 = require("node:child_process");
50744
- import_node_fs37 = __toESM(require("node:fs"), 1);
50745
- 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);
50746
50954
  init_src();
50747
50955
  init_home_paths();
50748
50956
  MAC_HOST_APP = "/Applications/Peach.app";
@@ -52290,8 +52498,8 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52290
52498
  };
52291
52499
  }
52292
52500
  const lock = parseLinuxBrowserLibsLock(linux_browser_libs_lock_default);
52293
- const dir = (0, import_node_path40.join)(rnxHomeDir(), "linux-libs", `${lock.id}-${arch}`);
52294
- 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))) {
52295
52503
  const url = `${DEFAULT_CLI_RELEASE_ORIGIN}/${linuxBrowserLibsKey(lock.id, arch)}`;
52296
52504
  process.stderr.write(
52297
52505
  `peach: this system lacks ${missing.length} shared libraries ${browser} links; downloading them\u2026
@@ -52319,7 +52527,7 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52319
52527
  };
52320
52528
  }
52321
52529
  }
52322
- 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(":");
52323
52531
  const stillMissing = missingLibraries(executablePath, libraryPath);
52324
52532
  if (stillMissing.length) {
52325
52533
  return {
@@ -52329,13 +52537,13 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
52329
52537
  }
52330
52538
  return { ok: true, libraryPath };
52331
52539
  }
52332
- 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;
52333
52541
  var init_linux_browser_libs = __esm({
52334
52542
  "cli/drivers/linux-browser-libs.ts"() {
52335
52543
  "use strict";
52336
52544
  import_node_child_process14 = require("node:child_process");
52337
- import_node_fs38 = require("node:fs");
52338
- import_node_path40 = require("node:path");
52545
+ import_node_fs39 = require("node:fs");
52546
+ import_node_path41 = require("node:path");
52339
52547
  init_src();
52340
52548
  init_home_paths();
52341
52549
  init_is_record();
@@ -52354,18 +52562,18 @@ function resolvePlaywright() {
52354
52562
  roots.push(`${playwrightCoreDir(PINNED_PLAYWRIGHT_CORE.version)}/`);
52355
52563
  for (const root of roots) {
52356
52564
  try {
52357
- const requireFromRoot = (0, import_node_module4.createRequire)(root);
52565
+ const requireFromRoot = (0, import_node_module5.createRequire)(root);
52358
52566
  for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
52359
52567
  try {
52360
52568
  const modulePath = requireFromRoot.resolve(spec);
52361
52569
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
52362
- const parsed = JSON.parse((0, import_node_fs39.readFileSync)(packageJsonPath, "utf8"));
52570
+ const parsed = JSON.parse((0, import_node_fs40.readFileSync)(packageJsonPath, "utf8"));
52363
52571
  if (!isRecord(parsed) || typeof parsed.version !== "string") continue;
52364
- const corePackagePath = (0, import_node_module4.createRequire)(modulePath).resolve(
52572
+ const corePackagePath = (0, import_node_module5.createRequire)(modulePath).resolve(
52365
52573
  "playwright-core/package.json"
52366
52574
  );
52367
- const cliPath = (0, import_node_path41.join)((0, import_node_path41.dirname)(corePackagePath), "cli.js");
52368
- 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;
52369
52577
  return {
52370
52578
  spec,
52371
52579
  modulePath,
@@ -52393,7 +52601,7 @@ async function provisionPlaywright() {
52393
52601
  await installVerifiedTarball({
52394
52602
  url: `https://registry.npmjs.org/playwright-core/-/playwright-core-${version}.tgz`,
52395
52603
  digest: { algorithm, encoding: "base64", value: digest },
52396
- 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"),
52397
52605
  installedMarker: "package.json",
52398
52606
  // npm tarballs hold the package under a leading `package/`
52399
52607
  stripComponents: 1,
@@ -52436,7 +52644,7 @@ function probeBrowser(resolved, env) {
52436
52644
  return {
52437
52645
  ok: true,
52438
52646
  executablePath: parsed.executablePath,
52439
- exists: parsed.exists && (0, import_node_fs39.existsSync)(parsed.executablePath)
52647
+ exists: parsed.exists && (0, import_node_fs40.existsSync)(parsed.executablePath)
52440
52648
  };
52441
52649
  } catch (error) {
52442
52650
  return {
@@ -52509,7 +52717,7 @@ async function launchProvisionedPlaywright() {
52509
52717
  const env = { ...process.env };
52510
52718
  const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
52511
52719
  if (!browser.ok) throw new Error(browser.message);
52512
- const playwright = (0, import_node_module4.createRequire)(resolved.modulePath)(
52720
+ const playwright = (0, import_node_module5.createRequire)(resolved.modulePath)(
52513
52721
  resolved.modulePath
52514
52722
  );
52515
52723
  const browserEnv = browser.libraryPath ? {
@@ -52521,14 +52729,14 @@ async function launchProvisionedPlaywright() {
52521
52729
  { headless: true }
52522
52730
  );
52523
52731
  }
52524
- 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;
52525
52733
  var init_playwright_provisioning = __esm({
52526
52734
  "cli/drivers/playwright-provisioning.ts"() {
52527
52735
  "use strict";
52528
52736
  import_node_child_process15 = require("node:child_process");
52529
- import_node_fs39 = require("node:fs");
52530
- import_node_module4 = require("node:module");
52531
- 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");
52532
52740
  init_src();
52533
52741
  init_reap_browser();
52534
52742
  init_home_paths();
@@ -53007,12 +53215,12 @@ var init_runtime_diagnostics = __esm({
53007
53215
  // cli/commands/skills.ts
53008
53216
  function getSkillsDir() {
53009
53217
  if (typeof __PEACH_BUNDLED_SKILLS__ !== "undefined") {
53010
- const dir = path34.join(rnxHomeDir(), "skills", getCliVersion());
53218
+ const dir = path35.join(rnxHomeDir(), "skills", getCliVersion());
53011
53219
  for (const [file, body] of Object.entries(__PEACH_BUNDLED_SKILLS__)) {
53012
- const target = path34.join(dir, file);
53013
- if (fs29.existsSync(target)) continue;
53014
- fs29.mkdirSync(path34.dirname(target), { recursive: true });
53015
- 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);
53016
53224
  }
53017
53225
  return dir;
53018
53226
  }
@@ -53020,10 +53228,10 @@ function getSkillsDir() {
53020
53228
  const pkgPath = (0, import_url3.fileURLToPath)(
53021
53229
  import_meta3.resolve(`${rnxPublicBrand.packageName}/package.json`)
53022
53230
  );
53023
- return primaryCheckoutPath(path34.join(path34.dirname(pkgPath), "skills"));
53231
+ return primaryCheckoutPath(path35.join(path35.dirname(pkgPath), "skills"));
53024
53232
  } catch {
53025
- const __dirname = path34.dirname((0, import_url3.fileURLToPath)(__sootsim_import_meta_url));
53026
- 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"));
53027
53235
  }
53028
53236
  }
53029
53237
  function primaryCheckoutPath(dir) {
@@ -53046,39 +53254,39 @@ function primaryCheckoutPath(dir) {
53046
53254
  } catch {
53047
53255
  return dir;
53048
53256
  }
53049
- if (path34.basename(common) !== ".git") return dir;
53050
- const primary = path34.join(path34.dirname(common), path34.relative(top, dir));
53051
- 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;
53052
53260
  }
53053
53261
  function skillsDir() {
53054
53262
  skillsDirPath ??= getSkillsDir();
53055
53263
  return skillsDirPath;
53056
53264
  }
53057
53265
  function targetFromHome(envName, fallbackDir) {
53058
- const home = process.env[envName] || path34.join(os9.homedir(), fallbackDir);
53059
- return path34.join(home, "skills");
53266
+ const home = process.env[envName] || path35.join(os9.homedir(), fallbackDir);
53267
+ return path35.join(home, "skills");
53060
53268
  }
53061
53269
  function codexTargets() {
53062
53270
  const homes = /* @__PURE__ */ new Map();
53063
53271
  const userHome = process.env.HOME || os9.homedir();
53064
- const primaryCodexHome = process.env.CODEX_HOME || path34.join(userHome, ".codex");
53065
- homes.set(path34.resolve(primaryCodexHome), "codex");
53272
+ const primaryCodexHome = process.env.CODEX_HOME || path35.join(userHome, ".codex");
53273
+ homes.set(path35.resolve(primaryCodexHome), "codex");
53066
53274
  const tmCodexHomes = process.env.TM_CODEX_HOMES;
53067
53275
  if (tmCodexHomes) {
53068
- for (const h of tmCodexHomes.split(path34.delimiter)) {
53276
+ for (const h of tmCodexHomes.split(path35.delimiter)) {
53069
53277
  if (h.trim()) {
53070
- const resolved = path34.resolve(h.trim());
53278
+ const resolved = path35.resolve(h.trim());
53071
53279
  if (!homes.has(resolved)) {
53072
- homes.set(resolved, path34.basename(resolved).replace(/^\./, ""));
53280
+ homes.set(resolved, path35.basename(resolved).replace(/^\./, ""));
53073
53281
  }
53074
53282
  }
53075
53283
  }
53076
53284
  }
53077
- const tmHome = process.env.TM_HOME || path34.join(userHome, ".team-machine");
53078
- const enginePath = path34.join(tmHome, "engine.yaml");
53079
- 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)) {
53080
53288
  try {
53081
- const content = fs29.readFileSync(enginePath, "utf8");
53289
+ const content = fs30.readFileSync(enginePath, "utf8");
53082
53290
  let inCodex = false;
53083
53291
  let inAccounts = false;
53084
53292
  let currentAccount = "";
@@ -53108,9 +53316,9 @@ function codexTargets() {
53108
53316
  if (match) {
53109
53317
  let homeDir = match[1].trim();
53110
53318
  if (homeDir.startsWith("~")) {
53111
- homeDir = path34.join(userHome, homeDir.slice(1));
53319
+ homeDir = path35.join(userHome, homeDir.slice(1));
53112
53320
  }
53113
- const resolved = path34.resolve(homeDir);
53321
+ const resolved = path35.resolve(homeDir);
53114
53322
  if (!homes.has(resolved)) {
53115
53323
  homes.set(resolved, `codex-${currentAccount}`);
53116
53324
  }
@@ -53121,13 +53329,13 @@ function codexTargets() {
53121
53329
  }
53122
53330
  }
53123
53331
  try {
53124
- for (const entry of fs29.readdirSync(userHome)) {
53332
+ for (const entry of fs30.readdirSync(userHome)) {
53125
53333
  if (entry.startsWith(".codex-")) {
53126
- const fullPath = path34.join(userHome, entry);
53334
+ const fullPath = path35.join(userHome, entry);
53127
53335
  try {
53128
- const stat2 = fs29.statSync(fullPath);
53336
+ const stat2 = fs30.statSync(fullPath);
53129
53337
  if (stat2.isDirectory()) {
53130
- const resolved = path34.resolve(fullPath);
53338
+ const resolved = path35.resolve(fullPath);
53131
53339
  if (!homes.has(resolved)) {
53132
53340
  homes.set(resolved, entry.replace(/^\./, ""));
53133
53341
  }
@@ -53142,7 +53350,7 @@ function codexTargets() {
53142
53350
  for (const [homePath, label] of homes) {
53143
53351
  targets.push({
53144
53352
  label,
53145
- dir: path34.join(homePath, "skills")
53353
+ dir: path35.join(homePath, "skills")
53146
53354
  });
53147
53355
  }
53148
53356
  return targets;
@@ -53158,7 +53366,7 @@ function hasInstalledPeachSkills() {
53158
53366
  (file) => /^([^/]+)\/SKILL\.md$/.exec(file)?.[1] ?? []
53159
53367
  ) : listSkills().map((skill7) => skill7.name);
53160
53368
  return defaultAgentTargets().some(
53161
- ({ 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")))
53162
53370
  );
53163
53371
  }
53164
53372
  function parseSkillFrontmatter(content) {
@@ -53201,26 +53409,26 @@ function readFrontmatterField(frontmatter, field) {
53201
53409
  return null;
53202
53410
  }
53203
53411
  function listSkills() {
53204
- if (!fs29.existsSync(skillsDir())) return [];
53412
+ if (!fs30.existsSync(skillsDir())) return [];
53205
53413
  const skills = [];
53206
- for (const entry of fs29.readdirSync(skillsDir())) {
53207
- const skillMd = path34.join(skillsDir(), entry, "SKILL.md");
53208
- if (!fs29.existsSync(skillMd)) continue;
53209
- 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"));
53210
53418
  if (meta) {
53211
53419
  skills.push({ name: entry, description: meta.description });
53212
53420
  }
53213
53421
  }
53214
53422
  return skills.sort((a, b) => a.name.localeCompare(b.name));
53215
53423
  }
53216
- 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;
53217
53425
  var init_skills = __esm({
53218
53426
  "cli/commands/skills.ts"() {
53219
53427
  "use strict";
53220
53428
  import_child_process7 = require("child_process");
53221
- fs29 = __toESM(require("fs"), 1);
53429
+ fs30 = __toESM(require("fs"), 1);
53222
53430
  os9 = __toESM(require("os"), 1);
53223
- path34 = __toESM(require("path"), 1);
53431
+ path35 = __toESM(require("path"), 1);
53224
53432
  import_url3 = require("url");
53225
53433
  init_cli_version();
53226
53434
  init_home_paths();
@@ -53681,11 +53889,11 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53681
53889
  );
53682
53890
  }
53683
53891
  const { executable, prefixArgs } = rnxSelfInvocation();
53684
- const bridgeLogPath = import_node_path42.default.join(
53892
+ const bridgeLogPath = import_node_path43.default.join(
53685
53893
  import_node_os11.default.tmpdir(),
53686
53894
  `peach-bridge-${Date.now()}-${process.pid}.log`
53687
53895
  );
53688
- const bridgeLogFd = import_node_fs40.default.openSync(bridgeLogPath, "a");
53896
+ const bridgeLogFd = import_node_fs41.default.openSync(bridgeLogPath, "a");
53689
53897
  let child;
53690
53898
  try {
53691
53899
  child = (0, import_node_child_process16.spawn)(
@@ -53699,7 +53907,7 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53699
53907
  }
53700
53908
  );
53701
53909
  } finally {
53702
- import_node_fs40.default.closeSync(bridgeLogFd);
53910
+ import_node_fs41.default.closeSync(bridgeLogFd);
53703
53911
  }
53704
53912
  if (resources) {
53705
53913
  resources.bridge = child;
@@ -53735,7 +53943,7 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
53735
53943
  await sleep(150);
53736
53944
  }
53737
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`;
53738
- 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);
53739
53947
  throw new Error(
53740
53948
  `${reason}${bridgeLog ? `
53741
53949
  ${bridgeLog}` : ""}
@@ -53758,7 +53966,7 @@ function assertExplicitBridgeLock(preferredPort, explicitPort, lock) {
53758
53966
  async function ensureRuntimeForOpen() {
53759
53967
  if (resolveDevCheckoutRuntimeRoot()) return;
53760
53968
  const active = readActiveRuntime();
53761
- if (active && import_node_fs40.default.existsSync(runtimeDir(active))) return;
53969
+ if (active && import_node_fs41.default.existsSync(runtimeDir(active))) return;
53762
53970
  console.error(" installing peach engine runtime...");
53763
53971
  const { runRuntime: runRuntime2 } = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
53764
53972
  await runRuntime2(["install"], {});
@@ -53906,10 +54114,10 @@ async function buildResolvedBundleOpenUrl(target, baseUrl, opts = {}) {
53906
54114
  }
53907
54115
  function normalizeReplacementPath(filePath) {
53908
54116
  if (filePath.startsWith("~/")) {
53909
- 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));
53910
54118
  }
53911
- if (import_node_path42.default.isAbsolute(filePath)) return filePath;
53912
- 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);
53913
54121
  }
53914
54122
  function parseOpenRuntimeConfig(args) {
53915
54123
  const modules = {};
@@ -53928,7 +54136,7 @@ function parseOpenRuntimeConfig(args) {
53928
54136
  }
53929
54137
  const moduleName = raw2.slice(0, eqIndex).trim();
53930
54138
  const filePath = normalizeReplacementPath(raw2.slice(eqIndex + 1).trim());
53931
- if (!import_node_fs40.default.existsSync(filePath)) {
54139
+ if (!import_node_fs41.default.existsSync(filePath)) {
53932
54140
  console.error(` peach open: replacement file not found: ${filePath}`);
53933
54141
  rnxExit(1);
53934
54142
  }
@@ -53964,7 +54172,7 @@ async function resolveAppProjectForBundleUrl(bundleUrl, projectRoot) {
53964
54172
  return advertisedRoot ? resolveAppProject(advertisedRoot) : null;
53965
54173
  }
53966
54174
  async function ensureConfiguredRuntime(version) {
53967
- 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;
53968
54176
  console.error(` installing configured engine runtime ${version}...`);
53969
54177
  const result = await rnxRuntime.install({
53970
54178
  version,
@@ -54106,6 +54314,20 @@ async function splashImageReachable(imageUrl) {
54106
54314
  clearTimeout(timer);
54107
54315
  }
54108
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
+ }
54109
54331
  function bundleUrlOf(urlStr) {
54110
54332
  try {
54111
54333
  return new URL(urlStr).searchParams.get("bundle") || void 0;
@@ -54123,6 +54345,9 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
54123
54345
  );
54124
54346
  const expoStamped = new URL(stamped);
54125
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));
54126
54351
  if (opts.bundleOriginOverride)
54127
54352
  expoStamped.searchParams.set("bundleOriginOverride", opts.bundleOriginOverride);
54128
54353
  if (opts.hostDriver) expoStamped.searchParams.set("peachHostDriver", opts.hostDriver);
@@ -54288,7 +54513,7 @@ function playwrightHostPidForSim(sim) {
54288
54513
  function signalDriverLaunchConnected(result) {
54289
54514
  if (!result.connectAckFile) return false;
54290
54515
  try {
54291
- import_node_fs40.default.writeFileSync(
54516
+ import_node_fs41.default.writeFileSync(
54292
54517
  result.connectAckFile,
54293
54518
  `${JSON.stringify({ connectedAt: Date.now(), pid: result.pid ?? null })}
54294
54519
  `,
@@ -54302,7 +54527,7 @@ function signalDriverLaunchConnected(result) {
54302
54527
  function readUnservedUrl(result) {
54303
54528
  if (!result.diagnosticLogPath) return null;
54304
54529
  try {
54305
- const detail = import_node_fs40.default.readFileSync(result.diagnosticLogPath, "utf8");
54530
+ const detail = import_node_fs41.default.readFileSync(result.diagnosticLogPath, "utf8");
54306
54531
  const match = detail.match(/\[unserved\] nothing serves (\S+)/);
54307
54532
  return match ? match[1] : null;
54308
54533
  } catch {
@@ -54312,19 +54537,19 @@ function readUnservedUrl(result) {
54312
54537
  function printDriverDiagnosticLogTail(result) {
54313
54538
  if (!result.diagnosticLogPath) return;
54314
54539
  try {
54315
- const detail = import_node_fs40.default.readFileSync(result.diagnosticLogPath, "utf8").trim();
54540
+ const detail = import_node_fs41.default.readFileSync(result.diagnosticLogPath, "utf8").trim();
54316
54541
  if (!detail) {
54317
- console.error(` ${import_node_path42.default.basename(result.diagnosticLogPath)} was empty`);
54542
+ console.error(` ${import_node_path43.default.basename(result.diagnosticLogPath)} was empty`);
54318
54543
  return;
54319
54544
  }
54320
54545
  const shown = detail.length > 4e3 ? `\u2026
54321
54546
  ${detail.slice(-4e3)}` : detail;
54322
- console.error(` ${import_node_path42.default.basename(result.diagnosticLogPath)}:`);
54547
+ console.error(` ${import_node_path43.default.basename(result.diagnosticLogPath)}:`);
54323
54548
  console.error(shown);
54324
54549
  } catch (err) {
54325
54550
  const message = err instanceof Error ? err.message : String(err);
54326
54551
  console.error(
54327
- ` failed to read ${import_node_path42.default.basename(result.diagnosticLogPath)}: ${message}`
54552
+ ` failed to read ${import_node_path43.default.basename(result.diagnosticLogPath)}: ${message}`
54328
54553
  );
54329
54554
  }
54330
54555
  }
@@ -55362,14 +55587,15 @@ async function runCloseCommand(args, opts = {}) {
55362
55587
  bridge.close();
55363
55588
  }
55364
55589
  }
55365
- 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;
55366
55591
  var init_control = __esm({
55367
55592
  "cli/commands/control.ts"() {
55368
55593
  "use strict";
55369
55594
  import_node_child_process16 = require("node:child_process");
55370
- import_node_fs40 = __toESM(require("node:fs"), 1);
55595
+ import_node_fs41 = __toESM(require("node:fs"), 1);
55596
+ import_node_module6 = require("node:module");
55371
55597
  import_node_os11 = __toESM(require("node:os"), 1);
55372
- import_node_path42 = __toESM(require("node:path"), 1);
55598
+ import_node_path43 = __toESM(require("node:path"), 1);
55373
55599
  import_app_catalog_wire = require("peach-engine/engine/app-catalog-wire");
55374
55600
  import_devices2 = require("peach-engine/settings/devices");
55375
55601
  import_ws4 = require("ws");
@@ -55383,6 +55609,7 @@ var init_control = __esm({
55383
55609
  init_flow_timeout_scale();
55384
55610
  init_home_paths();
55385
55611
  init_native_dev_bundle_url();
55612
+ init_native_firebase_config();
55386
55613
  init_profiles();
55387
55614
  init_public_brand();
55388
55615
  init_runtime_assets();
@@ -56829,16 +57056,16 @@ function readRecentShellAppId(state) {
56829
57056
  }
56830
57057
  function resolveProjectRelativeFlowBase(flowDir) {
56831
57058
  if (!flowDir) return process.cwd();
56832
- return path36.basename(flowDir) === ".maestro" ? path36.dirname(flowDir) : flowDir;
57059
+ return path37.basename(flowDir) === ".maestro" ? path37.dirname(flowDir) : flowDir;
56833
57060
  }
56834
57061
  function resolveFlowScreenshotPathWithMode(screenshotDir, name2, opts) {
56835
57062
  const normalizedName = name2.endsWith(".png") ? name2 : `${name2}.png`;
56836
- if (path36.isAbsolute(normalizedName)) return normalizedName;
57063
+ if (path37.isAbsolute(normalizedName)) return normalizedName;
56837
57064
  if (opts.mode === "flow" && /[\\/]/.test(normalizedName)) {
56838
57065
  const baseDir = normalizedName.startsWith("./") || normalizedName.startsWith("../") ? opts.flowDir ?? process.cwd() : resolveProjectRelativeFlowBase(opts.flowDir);
56839
- return path36.resolve(baseDir, normalizedName);
57066
+ return path37.resolve(baseDir, normalizedName);
56840
57067
  }
56841
- return path36.join(screenshotDir, normalizedName);
57068
+ return path37.join(screenshotDir, normalizedName);
56842
57069
  }
56843
57070
  function normalizeFlowScreenshotSpec(step) {
56844
57071
  if (typeof step === "string") {
@@ -56892,12 +57119,12 @@ function normalizeBareStringStep(verb) {
56892
57119
  function parseFlowSteps(content) {
56893
57120
  return parseFlowFile(content).steps;
56894
57121
  }
56895
- 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;
56896
57123
  var init_bridge_flow_runner = __esm({
56897
57124
  "cli/bridge-flow-runner.ts"() {
56898
57125
  "use strict";
56899
- fs32 = __toESM(require("fs"), 1);
56900
- path36 = __toESM(require("path"), 1);
57126
+ fs33 = __toESM(require("fs"), 1);
57127
+ path37 = __toESM(require("path"), 1);
56901
57128
  import_devices4 = require("peach-engine/settings/devices");
56902
57129
  import_proof_frame = __toESM(require_proof_frame(), 1);
56903
57130
  init_flow_timeout_scale();
@@ -57209,14 +57436,14 @@ var init_bridge_flow_runner = __esm({
57209
57436
  if (chunks.length === 0) {
57210
57437
  throw new Error("recording requested but no video buffer was produced");
57211
57438
  }
57212
- fs32.mkdirSync(this.opts.recordingOutputDir, { recursive: true });
57439
+ fs33.mkdirSync(this.opts.recordingOutputDir, { recursive: true });
57213
57440
  const videoMime = stopped.mime || this.opts.recordingFormat || "video/webm";
57214
57441
  const extension = videoMime.includes("mp4") ? "mp4" : "webm";
57215
- const outputPath = path36.join(
57442
+ const outputPath = path37.join(
57216
57443
  this.opts.recordingOutputDir,
57217
57444
  `peach-${Date.now()}.${extension}`
57218
57445
  );
57219
- fs32.writeFileSync(outputPath, Buffer.concat(chunks));
57446
+ fs33.writeFileSync(outputPath, Buffer.concat(chunks));
57220
57447
  return outputPath;
57221
57448
  }
57222
57449
  async waitForRecordingTail(opts) {
@@ -57837,7 +58064,7 @@ var init_bridge_flow_runner = __esm({
57837
58064
  flowDir: this.opts.flowDir
57838
58065
  }
57839
58066
  );
57840
- fs32.mkdirSync(path36.dirname(outputPath), { recursive: true });
58067
+ fs33.mkdirSync(path37.dirname(outputPath), { recursive: true });
57841
58068
  const layers = spec.layers ?? this.opts.screenshotLayers;
57842
58069
  const screenshotRequest = {
57843
58070
  type: "screenshot",
@@ -57872,11 +58099,11 @@ var init_bridge_flow_runner = __esm({
57872
58099
  throw new Error("could not read current device model for framed screenshot");
57873
58100
  }
57874
58101
  const framed = await composeFramedScreenshot(rawBuffer, model);
57875
- fs32.writeFileSync(outputPath, framed);
58102
+ fs33.writeFileSync(outputPath, framed);
57876
58103
  console.log(`[flow] screenshot: ${outputPath} (frame: ${model})`);
57877
58104
  return outputPath;
57878
58105
  }
57879
- fs32.writeFileSync(outputPath, rawBuffer);
58106
+ fs33.writeFileSync(outputPath, rawBuffer);
57880
58107
  console.log(`[flow] screenshot: ${outputPath}`);
57881
58108
  return outputPath;
57882
58109
  }
@@ -57898,10 +58125,10 @@ var init_bridge_flow_runner = __esm({
57898
58125
  // + a11y tree + console errors/warnings + failed network requests +
57899
58126
  // shell state, all under one directory so post-mortem is one grep away.
57900
58127
  async captureFailureBundle(outputDir, context) {
57901
- fs32.mkdirSync(outputDir, { recursive: true });
58128
+ fs33.mkdirSync(outputDir, { recursive: true });
57902
58129
  const write = (name2, content) => {
57903
58130
  try {
57904
- fs32.writeFileSync(path36.join(outputDir, name2), content);
58131
+ fs33.writeFileSync(path37.join(outputDir, name2), content);
57905
58132
  } catch {
57906
58133
  }
57907
58134
  };
@@ -58496,8 +58723,8 @@ var init_bridge_flow_runner = __esm({
58496
58723
  runScript(target) {
58497
58724
  const spec = typeof target === "string" ? { file: target } : target;
58498
58725
  if (!spec.file) throw new Error("runScript requires a file");
58499
- const scriptPath = path36.resolve(this.opts.flowDir, spec.file);
58500
- const source = fs32.readFileSync(scriptPath, "utf8");
58726
+ const scriptPath = path37.resolve(this.opts.flowDir, spec.file);
58727
+ const source = fs33.readFileSync(scriptPath, "utf8");
58501
58728
  this.js.evaluate(source, { env: spec.env });
58502
58729
  console.log(`[flow] runScript: ${spec.file} done`);
58503
58730
  }
@@ -58857,14 +59084,14 @@ var init_bridge_flow_runner = __esm({
58857
59084
  for (const [k, v] of Object.entries(env)) this.js.putEnv(k, v);
58858
59085
  }
58859
59086
  if (file) {
58860
- const flowPath = path36.resolve(this.opts.flowDir, file);
58861
- const flowContent = fs32.readFileSync(flowPath, "utf8");
59087
+ const flowPath = path37.resolve(this.opts.flowDir, file);
59088
+ const flowContent = fs33.readFileSync(flowPath, "utf8");
58862
59089
  const { frontmatter } = parseFlowFile(flowContent);
58863
59090
  if (frontmatter.env && typeof frontmatter.env === "object") {
58864
59091
  this.js.defineVariables(frontmatter.env);
58865
59092
  }
58866
59093
  const previousDir = this.opts.flowDir;
58867
- this.opts.flowDir = path36.dirname(flowPath);
59094
+ this.opts.flowDir = path37.dirname(flowPath);
58868
59095
  try {
58869
59096
  await this.runFlow(parseFlowSteps(flowContent));
58870
59097
  } finally {
@@ -59035,8 +59262,8 @@ __export(registry_exports, {
59035
59262
  skillRegistry: () => skillRegistry
59036
59263
  });
59037
59264
  module.exports = __toCommonJS(registry_exports);
59038
- var fs33 = __toESM(require("fs"), 1);
59039
- var path37 = __toESM(require("path"), 1);
59265
+ var fs34 = __toESM(require("fs"), 1);
59266
+ var path38 = __toESM(require("path"), 1);
59040
59267
 
59041
59268
  // src/skills/builtin/a11y-review.ts
59042
59269
  init_reap_browser();
@@ -59055,8 +59282,8 @@ var skill = {
59055
59282
  },
59056
59283
  async execute(params, context) {
59057
59284
  const { chromium } = await import("playwright");
59058
- const path38 = await import("path");
59059
- const fs34 = await import("fs");
59285
+ const path39 = await import("path");
59286
+ const fs35 = await import("fs");
59060
59287
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59061
59288
  headless: true
59062
59289
  });
@@ -59113,9 +59340,9 @@ var skill = {
59113
59340
  warnings: issues.filter((i) => i.severity === "warning").length,
59114
59341
  tree: typeof tree === "string" ? tree : JSON.stringify(tree)
59115
59342
  };
59116
- const reportPath = path38.join(context.outputDir, "a11y-report.json");
59117
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59118
- 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));
59119
59346
  return {
59120
59347
  success: issues.filter((i) => i.severity === "error").length === 0,
59121
59348
  message: `${report.errors} errors, ${report.warnings} warnings across ${report.nodeCount} nodes`,
@@ -59148,14 +59375,14 @@ var skill2 = {
59148
59375
  }
59149
59376
  },
59150
59377
  async execute(params, context) {
59151
- const fs34 = await import("node:fs");
59152
- const path38 = await import("node:path");
59378
+ const fs35 = await import("node:fs");
59379
+ const path39 = await import("node:path");
59153
59380
  const { COMPAT_RESULT_CAVEAT: COMPAT_RESULT_CAVEAT2, formatPackageStatus: formatPackageStatus2, formatScanCounts: formatScanCounts2, scanDeps: scanDeps2 } = await Promise.resolve().then(() => (init_web(), web_exports));
59154
- const packagePath = path38.join(context.projectDir, "package.json");
59155
- if (!fs34.existsSync(packagePath)) {
59381
+ const packagePath = path39.join(context.projectDir, "package.json");
59382
+ if (!fs35.existsSync(packagePath)) {
59156
59383
  return { success: false, message: "No package.json found" };
59157
59384
  }
59158
- const parsed = JSON.parse(fs34.readFileSync(packagePath, "utf8"));
59385
+ const parsed = JSON.parse(fs35.readFileSync(packagePath, "utf8"));
59159
59386
  if (!parsed || typeof parsed !== "object") {
59160
59387
  return { success: false, message: "package.json is not an object" };
59161
59388
  }
@@ -59167,9 +59394,9 @@ var skill2 = {
59167
59394
  }) : scanDeps2(parsed);
59168
59395
  const packageResult = params.packageName ? scan.packages[0] : void 0;
59169
59396
  const message = packageResult ? `${params.packageName}: ${formatPackageStatus2(packageResult)}. ${COMPAT_RESULT_CAVEAT2}` : `${formatScanCounts2(scan)}. ${COMPAT_RESULT_CAVEAT2}`;
59170
- const reportPath = path38.join(context.outputDir, "compat-report.json");
59171
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59172
- 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)}
59173
59400
  `);
59174
59401
  return {
59175
59402
  success: true,
@@ -59211,8 +59438,8 @@ var skill3 = {
59211
59438
  record: { type: "boolean", description: "Record video of the flow" }
59212
59439
  },
59213
59440
  async execute(params, context) {
59214
- const fs34 = await import("fs");
59215
- const path38 = await import("path");
59441
+ const fs35 = await import("fs");
59442
+ const path39 = await import("path");
59216
59443
  const yaml = await Promise.resolve().then(() => (init_browser(), browser_exports));
59217
59444
  const { DEFAULT_SOOTSIM_BRIDGE_PORT: DEFAULT_SOOTSIM_BRIDGE_PORT3 } = await Promise.resolve().then(() => (init_bridge_constants(), bridge_constants_exports));
59218
59445
  const { SootSimBridgeHost: SootSimBridgeHost2 } = await Promise.resolve().then(() => (init_bridge_host(), bridge_host_exports));
@@ -59222,7 +59449,7 @@ var skill3 = {
59222
59449
  const host2 = new SootSimBridgeHost2({ port: DEFAULT_SOOTSIM_BRIDGE_PORT3 });
59223
59450
  host2.start({ silent: true });
59224
59451
  try {
59225
- const flowContent = fs34.readFileSync(params.flowPath, "utf8");
59452
+ const flowContent = fs35.readFileSync(params.flowPath, "utf8");
59226
59453
  const fmMatch = flowContent.match(/^---\n([\s\S]*?)\n---\n?/);
59227
59454
  const stepsBody = fmMatch ? flowContent.slice(fmMatch[0].length) : flowContent;
59228
59455
  const steps = yaml.parse(stepsBody);
@@ -59249,7 +59476,7 @@ var skill3 = {
59249
59476
  });
59250
59477
  const driver = new SootSimBridgeFlowRunner2(bridge, {
59251
59478
  screenshotDir: context.outputDir,
59252
- flowDir: path38.dirname(path38.resolve(params.flowPath)),
59479
+ flowDir: path39.dirname(path39.resolve(params.flowPath)),
59253
59480
  simId,
59254
59481
  recordingOutputDir: params.record ? context.outputDir : void 0
59255
59482
  });
@@ -59271,7 +59498,7 @@ var skill3 = {
59271
59498
  simId,
59272
59499
  videoPath: videoPath || void 0
59273
59500
  },
59274
- 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
59275
59502
  };
59276
59503
  } finally {
59277
59504
  try {
@@ -59318,8 +59545,8 @@ var skill4 = {
59318
59545
  },
59319
59546
  async execute(params, context) {
59320
59547
  const { chromium } = await import("playwright");
59321
- const path38 = await import("path");
59322
- const fs34 = await import("fs");
59548
+ const path39 = await import("path");
59549
+ const fs35 = await import("fs");
59323
59550
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59324
59551
  headless: true
59325
59552
  });
@@ -59347,9 +59574,9 @@ var skill4 = {
59347
59574
  ...profile,
59348
59575
  fps: syncCount > 0 ? (syncCount / (duration / 1e3)).toFixed(1) : "0"
59349
59576
  };
59350
- const reportPath = path38.join(context.outputDir, "perf-report.json");
59351
- fs34.mkdirSync(path38.dirname(reportPath), { recursive: true });
59352
- 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));
59353
59580
  return {
59354
59581
  success: true,
59355
59582
  message: `${report.fps} fps, ${profile.avgSyncMs?.toFixed(1)}ms avg sync, ${nodeCount} nodes`,
@@ -59382,8 +59609,8 @@ var skill5 = {
59382
59609
  },
59383
59610
  async execute(params, context) {
59384
59611
  const { chromium } = await import("playwright");
59385
- const path38 = await import("path");
59386
- const fs34 = await import("fs");
59612
+ const path39 = await import("path");
59613
+ const fs35 = await import("fs");
59387
59614
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59388
59615
  headless: true
59389
59616
  });
@@ -59391,8 +59618,8 @@ var skill5 = {
59391
59618
  try {
59392
59619
  await page.goto(context.url, { waitUntil: "networkidle" });
59393
59620
  await page.waitForTimeout(2e3);
59394
- const outputPath = path38.join(context.outputDir, `${params.name}.png`);
59395
- 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 });
59396
59623
  await page.screenshot({ path: outputPath });
59397
59624
  return {
59398
59625
  success: true,
@@ -59433,8 +59660,8 @@ var skill6 = {
59433
59660
  },
59434
59661
  async execute(params, context) {
59435
59662
  const { chromium } = await import("playwright");
59436
- const path38 = await import("path");
59437
- const fs34 = await import("fs");
59663
+ const path39 = await import("path");
59664
+ const fs35 = await import("fs");
59438
59665
  const browser = await launchReapedChrome((options) => chromium.launch(options), {
59439
59666
  headless: true
59440
59667
  });
@@ -59442,14 +59669,14 @@ var skill6 = {
59442
59669
  try {
59443
59670
  await page.goto(context.url, { waitUntil: "networkidle" });
59444
59671
  await page.waitForTimeout(2e3);
59445
- const currentPath = path38.join(context.outputDir, `${params.name}-current.png`);
59446
- 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 });
59447
59674
  await page.screenshot({ path: currentPath });
59448
59675
  try {
59449
59676
  const { PNG } = await import("pngjs");
59450
59677
  const pixelmatch = (await import("pixelmatch")).default;
59451
- const baseline = PNG.sync.read(fs34.readFileSync(params.baseline));
59452
- 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));
59453
59680
  const { width, height } = baseline;
59454
59681
  const diff = new PNG({ width, height });
59455
59682
  const numDiffPixels = pixelmatch(
@@ -59460,8 +59687,8 @@ var skill6 = {
59460
59687
  height,
59461
59688
  { threshold: params.threshold || 0.1 }
59462
59689
  );
59463
- const diffPath = path38.join(context.outputDir, `${params.name}-diff.png`);
59464
- 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));
59465
59692
  const totalPixels = width * height;
59466
59693
  const diffPercent = (numDiffPixels / totalPixels * 100).toFixed(2);
59467
59694
  return {
@@ -59525,10 +59752,10 @@ var skillRegistry = {
59525
59752
  },
59526
59753
  // load skills from a project manifest (rnx-skills.json)
59527
59754
  async loadFromManifest(projectDir) {
59528
- const manifestPath = path37.join(projectDir, "rnx-skills.json");
59529
- if (!fs33.existsSync(manifestPath)) return;
59755
+ const manifestPath = path38.join(projectDir, "rnx-skills.json");
59756
+ if (!fs34.existsSync(manifestPath)) return;
59530
59757
  try {
59531
- const manifest = JSON.parse(fs33.readFileSync(manifestPath, "utf8"));
59758
+ const manifest = JSON.parse(fs34.readFileSync(manifestPath, "utf8"));
59532
59759
  if (Array.isArray(manifest.skills)) {
59533
59760
  for (const entry of manifest.skills) {
59534
59761
  if (typeof entry === "string") {
@@ -59539,7 +59766,7 @@ var skillRegistry = {
59539
59766
  }
59540
59767
  } else if (entry.file) {
59541
59768
  try {
59542
- const mod = await import(path37.resolve(projectDir, entry.file));
59769
+ const mod = await import(path38.resolve(projectDir, entry.file));
59543
59770
  if (mod.skill) this.register(mod.skill);
59544
59771
  } catch {
59545
59772
  }
@@ -59552,10 +59779,10 @@ var skillRegistry = {
59552
59779
  // auto-discover skills based on project dependencies
59553
59780
  suggestSkills(projectDir) {
59554
59781
  const suggestions = [];
59555
- const pkgPath = path37.join(projectDir, "package.json");
59556
- if (!fs33.existsSync(pkgPath)) return suggestions;
59782
+ const pkgPath = path38.join(projectDir, "package.json");
59783
+ if (!fs34.existsSync(pkgPath)) return suggestions;
59557
59784
  try {
59558
- const pkg = JSON.parse(fs33.readFileSync(pkgPath, "utf8"));
59785
+ const pkg = JSON.parse(fs34.readFileSync(pkgPath, "utf8"));
59559
59786
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
59560
59787
  if (deps["detox"] || deps["maestro"]) {
59561
59788
  suggestions.push("maestro-test");