peachsim 0.1.2260 → 0.1.2262

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 (91) hide show
  1. package/cli/app-catalog.ts +72 -15
  2. package/cli/commands/shell-url.ts +11 -3
  3. package/cli/commands/upload.ts +2 -1
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.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 +387 -296
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +2 -2
  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 +6 -4
  34. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  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 +2 -2
  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 +2 -2
  50. package/dist-lib/native-app-identity-project.cjs +1 -1
  51. package/dist-lib/native-app-identity-project.mjs +1 -1
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +24 -24
  63. package/dist-lib/public-origins-lib.json +53 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +1 -1
  69. package/dist-lib/sdk.mjs +1 -1
  70. package/dist-lib/skills.cjs +159 -109
  71. package/dist-lib/swift-compile.cjs +1 -1
  72. package/dist-lib/swift-compile.mjs +1 -1
  73. package/dist-lib/swift-package.cjs +1 -1
  74. package/dist-lib/swift-package.mjs +1 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +1 -1
  80. package/dist-lib/vite.cjs +2 -2
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -1
  84. package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
  85. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
  86. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  87. package/kotlin/sdk.tar.gz +0 -0
  88. package/package.json +1 -1
  89. package/runtime-companion.json +1 -1
  90. package/src/bundle-channel.mjs +21 -3
  91. package/src/nitro-source.ts +8 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2260 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -3338,17 +3338,17 @@ function visit(node, visitor) {
3338
3338
  } else
3339
3339
  visit_(null, node, visitor_, Object.freeze([]));
3340
3340
  }
3341
- function visit_(key2, node, visitor, path100) {
3342
- const ctrl = callVisitor(key2, node, visitor, path100);
3341
+ function visit_(key2, node, visitor, path101) {
3342
+ const ctrl = callVisitor(key2, node, visitor, path101);
3343
3343
  if (isNode(ctrl) || isPair(ctrl)) {
3344
- replaceNode(key2, path100, ctrl);
3345
- return visit_(key2, ctrl, visitor, path100);
3344
+ replaceNode(key2, path101, ctrl);
3345
+ return visit_(key2, ctrl, visitor, path101);
3346
3346
  }
3347
3347
  if (typeof ctrl !== "symbol") {
3348
3348
  if (isCollection(node)) {
3349
- path100 = Object.freeze(path100.concat(node));
3349
+ path101 = Object.freeze(path101.concat(node));
3350
3350
  for (let i = 0; i < node.items.length; ++i) {
3351
- const ci = visit_(i, node.items[i], visitor, path100);
3351
+ const ci = visit_(i, node.items[i], visitor, path101);
3352
3352
  if (typeof ci === "number")
3353
3353
  i = ci - 1;
3354
3354
  else if (ci === BREAK)
@@ -3359,13 +3359,13 @@ function visit_(key2, node, visitor, path100) {
3359
3359
  }
3360
3360
  }
3361
3361
  } else if (isPair(node)) {
3362
- path100 = Object.freeze(path100.concat(node));
3363
- const ck = visit_("key", node.key, visitor, path100);
3362
+ path101 = Object.freeze(path101.concat(node));
3363
+ const ck = visit_("key", node.key, visitor, path101);
3364
3364
  if (ck === BREAK)
3365
3365
  return BREAK;
3366
3366
  else if (ck === REMOVE)
3367
3367
  node.key = null;
3368
- const cv = visit_("value", node.value, visitor, path100);
3368
+ const cv = visit_("value", node.value, visitor, path101);
3369
3369
  if (cv === BREAK)
3370
3370
  return BREAK;
3371
3371
  else if (cv === REMOVE)
@@ -3383,17 +3383,17 @@ async function visitAsync(node, visitor) {
3383
3383
  } else
3384
3384
  await visitAsync_(null, node, visitor_, Object.freeze([]));
3385
3385
  }
3386
- async function visitAsync_(key2, node, visitor, path100) {
3387
- const ctrl = await callVisitor(key2, node, visitor, path100);
3386
+ async function visitAsync_(key2, node, visitor, path101) {
3387
+ const ctrl = await callVisitor(key2, node, visitor, path101);
3388
3388
  if (isNode(ctrl) || isPair(ctrl)) {
3389
- replaceNode(key2, path100, ctrl);
3390
- return visitAsync_(key2, ctrl, visitor, path100);
3389
+ replaceNode(key2, path101, ctrl);
3390
+ return visitAsync_(key2, ctrl, visitor, path101);
3391
3391
  }
3392
3392
  if (typeof ctrl !== "symbol") {
3393
3393
  if (isCollection(node)) {
3394
- path100 = Object.freeze(path100.concat(node));
3394
+ path101 = Object.freeze(path101.concat(node));
3395
3395
  for (let i = 0; i < node.items.length; ++i) {
3396
- const ci = await visitAsync_(i, node.items[i], visitor, path100);
3396
+ const ci = await visitAsync_(i, node.items[i], visitor, path101);
3397
3397
  if (typeof ci === "number")
3398
3398
  i = ci - 1;
3399
3399
  else if (ci === BREAK)
@@ -3404,13 +3404,13 @@ async function visitAsync_(key2, node, visitor, path100) {
3404
3404
  }
3405
3405
  }
3406
3406
  } else if (isPair(node)) {
3407
- path100 = Object.freeze(path100.concat(node));
3408
- const ck = await visitAsync_("key", node.key, visitor, path100);
3407
+ path101 = Object.freeze(path101.concat(node));
3408
+ const ck = await visitAsync_("key", node.key, visitor, path101);
3409
3409
  if (ck === BREAK)
3410
3410
  return BREAK;
3411
3411
  else if (ck === REMOVE)
3412
3412
  node.key = null;
3413
- const cv = await visitAsync_("value", node.value, visitor, path100);
3413
+ const cv = await visitAsync_("value", node.value, visitor, path101);
3414
3414
  if (cv === BREAK)
3415
3415
  return BREAK;
3416
3416
  else if (cv === REMOVE)
@@ -3437,23 +3437,23 @@ function initVisitor(visitor) {
3437
3437
  }
3438
3438
  return visitor;
3439
3439
  }
3440
- function callVisitor(key2, node, visitor, path100) {
3440
+ function callVisitor(key2, node, visitor, path101) {
3441
3441
  if (typeof visitor === "function")
3442
- return visitor(key2, node, path100);
3442
+ return visitor(key2, node, path101);
3443
3443
  if (isMap(node))
3444
- return visitor.Map?.(key2, node, path100);
3444
+ return visitor.Map?.(key2, node, path101);
3445
3445
  if (isSeq(node))
3446
- return visitor.Seq?.(key2, node, path100);
3446
+ return visitor.Seq?.(key2, node, path101);
3447
3447
  if (isPair(node))
3448
- return visitor.Pair?.(key2, node, path100);
3448
+ return visitor.Pair?.(key2, node, path101);
3449
3449
  if (isScalar(node))
3450
- return visitor.Scalar?.(key2, node, path100);
3450
+ return visitor.Scalar?.(key2, node, path101);
3451
3451
  if (isAlias(node))
3452
- return visitor.Alias?.(key2, node, path100);
3452
+ return visitor.Alias?.(key2, node, path101);
3453
3453
  return void 0;
3454
3454
  }
3455
- function replaceNode(key2, path100, node) {
3456
- const parent = path100[path100.length - 1];
3455
+ function replaceNode(key2, path101, node) {
3456
+ const parent = path101[path101.length - 1];
3457
3457
  if (isCollection(parent)) {
3458
3458
  parent.items[key2] = node;
3459
3459
  } else if (isPair(parent)) {
@@ -4053,10 +4053,10 @@ var init_createNode = __esm({
4053
4053
  });
4054
4054
 
4055
4055
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
4056
- function collectionFromPath(schema4, path100, value) {
4056
+ function collectionFromPath(schema4, path101, value) {
4057
4057
  let v6 = value;
4058
- for (let i = path100.length - 1; i >= 0; --i) {
4059
- const k = path100[i];
4058
+ for (let i = path101.length - 1; i >= 0; --i) {
4059
+ const k = path101[i];
4060
4060
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4061
4061
  const a = [];
4062
4062
  a[k] = v6;
@@ -4081,7 +4081,7 @@ var init_Collection = __esm({
4081
4081
  init_createNode();
4082
4082
  init_identity();
4083
4083
  init_Node();
4084
- isEmptyPath = (path100) => path100 == null || typeof path100 === "object" && !!path100[Symbol.iterator]().next().done;
4084
+ isEmptyPath = (path101) => path101 == null || typeof path101 === "object" && !!path101[Symbol.iterator]().next().done;
4085
4085
  Collection = class extends NodeBase {
4086
4086
  constructor(type, schema4) {
4087
4087
  super(type);
@@ -4111,11 +4111,11 @@ var init_Collection = __esm({
4111
4111
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4112
4112
  * that already exists in the map.
4113
4113
  */
4114
- addIn(path100, value) {
4115
- if (isEmptyPath(path100))
4114
+ addIn(path101, value) {
4115
+ if (isEmptyPath(path101))
4116
4116
  this.add(value);
4117
4117
  else {
4118
- const [key2, ...rest] = path100;
4118
+ const [key2, ...rest] = path101;
4119
4119
  const node = this.get(key2, true);
4120
4120
  if (isCollection(node))
4121
4121
  node.addIn(rest, value);
@@ -4129,8 +4129,8 @@ var init_Collection = __esm({
4129
4129
  * Removes a value from the collection.
4130
4130
  * @returns `true` if the item was found and removed.
4131
4131
  */
4132
- deleteIn(path100) {
4133
- const [key2, ...rest] = path100;
4132
+ deleteIn(path101) {
4133
+ const [key2, ...rest] = path101;
4134
4134
  if (rest.length === 0)
4135
4135
  return this.delete(key2);
4136
4136
  const node = this.get(key2, true);
@@ -4144,8 +4144,8 @@ var init_Collection = __esm({
4144
4144
  * scalar values from their surrounding node; to disable set `keepScalar` to
4145
4145
  * `true` (collections are always returned intact).
4146
4146
  */
4147
- getIn(path100, keepScalar) {
4148
- const [key2, ...rest] = path100;
4147
+ getIn(path101, keepScalar) {
4148
+ const [key2, ...rest] = path101;
4149
4149
  const node = this.get(key2, true);
4150
4150
  if (rest.length === 0)
4151
4151
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -4163,8 +4163,8 @@ var init_Collection = __esm({
4163
4163
  /**
4164
4164
  * Checks if the collection includes a value with the key `key`.
4165
4165
  */
4166
- hasIn(path100) {
4167
- const [key2, ...rest] = path100;
4166
+ hasIn(path101) {
4167
+ const [key2, ...rest] = path101;
4168
4168
  if (rest.length === 0)
4169
4169
  return this.has(key2);
4170
4170
  const node = this.get(key2, true);
@@ -4174,8 +4174,8 @@ var init_Collection = __esm({
4174
4174
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4175
4175
  * boolean to add/remove the item from the set.
4176
4176
  */
4177
- setIn(path100, value) {
4178
- const [key2, ...rest] = path100;
4177
+ setIn(path101, value) {
4178
+ const [key2, ...rest] = path101;
4179
4179
  if (rest.length === 0) {
4180
4180
  this.set(key2, value);
4181
4181
  } else {
@@ -6609,9 +6609,9 @@ var init_Document = __esm({
6609
6609
  this.contents.add(value);
6610
6610
  }
6611
6611
  /** Adds a value to the document. */
6612
- addIn(path100, value) {
6612
+ addIn(path101, value) {
6613
6613
  if (assertCollection(this.contents))
6614
- this.contents.addIn(path100, value);
6614
+ this.contents.addIn(path101, value);
6615
6615
  }
6616
6616
  /**
6617
6617
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -6686,14 +6686,14 @@ var init_Document = __esm({
6686
6686
  * Removes a value from the document.
6687
6687
  * @returns `true` if the item was found and removed.
6688
6688
  */
6689
- deleteIn(path100) {
6690
- if (isEmptyPath(path100)) {
6689
+ deleteIn(path101) {
6690
+ if (isEmptyPath(path101)) {
6691
6691
  if (this.contents == null)
6692
6692
  return false;
6693
6693
  this.contents = null;
6694
6694
  return true;
6695
6695
  }
6696
- return assertCollection(this.contents) ? this.contents.deleteIn(path100) : false;
6696
+ return assertCollection(this.contents) ? this.contents.deleteIn(path101) : false;
6697
6697
  }
6698
6698
  /**
6699
6699
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -6708,10 +6708,10 @@ var init_Document = __esm({
6708
6708
  * scalar values from their surrounding node; to disable set `keepScalar` to
6709
6709
  * `true` (collections are always returned intact).
6710
6710
  */
6711
- getIn(path100, keepScalar) {
6712
- if (isEmptyPath(path100))
6711
+ getIn(path101, keepScalar) {
6712
+ if (isEmptyPath(path101))
6713
6713
  return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
6714
- return isCollection(this.contents) ? this.contents.getIn(path100, keepScalar) : void 0;
6714
+ return isCollection(this.contents) ? this.contents.getIn(path101, keepScalar) : void 0;
6715
6715
  }
6716
6716
  /**
6717
6717
  * Checks if the document includes a value with the key `key`.
@@ -6722,10 +6722,10 @@ var init_Document = __esm({
6722
6722
  /**
6723
6723
  * Checks if the document includes a value at `path`.
6724
6724
  */
6725
- hasIn(path100) {
6726
- if (isEmptyPath(path100))
6725
+ hasIn(path101) {
6726
+ if (isEmptyPath(path101))
6727
6727
  return this.contents !== void 0;
6728
- return isCollection(this.contents) ? this.contents.hasIn(path100) : false;
6728
+ return isCollection(this.contents) ? this.contents.hasIn(path101) : false;
6729
6729
  }
6730
6730
  /**
6731
6731
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -6742,13 +6742,13 @@ var init_Document = __esm({
6742
6742
  * Sets a value in this document. For `!!set`, `value` needs to be a
6743
6743
  * boolean to add/remove the item from the set.
6744
6744
  */
6745
- setIn(path100, value) {
6746
- if (isEmptyPath(path100)) {
6745
+ setIn(path101, value) {
6746
+ if (isEmptyPath(path101)) {
6747
6747
  this.contents = value;
6748
6748
  } else if (this.contents == null) {
6749
- this.contents = collectionFromPath(this.schema, Array.from(path100), value);
6749
+ this.contents = collectionFromPath(this.schema, Array.from(path101), value);
6750
6750
  } else if (assertCollection(this.contents)) {
6751
- this.contents.setIn(path100, value);
6751
+ this.contents.setIn(path101, value);
6752
6752
  }
6753
6753
  }
6754
6754
  /**
@@ -8653,15 +8653,15 @@ function visit2(cst, visitor) {
8653
8653
  cst = { start: cst.start, value: cst.value };
8654
8654
  _visit(Object.freeze([]), cst, visitor);
8655
8655
  }
8656
- function _visit(path100, item, visitor) {
8657
- let ctrl = visitor(item, path100);
8656
+ function _visit(path101, item, visitor) {
8657
+ let ctrl = visitor(item, path101);
8658
8658
  if (typeof ctrl === "symbol")
8659
8659
  return ctrl;
8660
8660
  for (const field of ["key", "value"]) {
8661
8661
  const token = item[field];
8662
8662
  if (token && "items" in token) {
8663
8663
  for (let i = 0; i < token.items.length; ++i) {
8664
- const ci = _visit(Object.freeze(path100.concat([[field, i]])), token.items[i], visitor);
8664
+ const ci = _visit(Object.freeze(path101.concat([[field, i]])), token.items[i], visitor);
8665
8665
  if (typeof ci === "number")
8666
8666
  i = ci - 1;
8667
8667
  else if (ci === BREAK2)
@@ -8672,10 +8672,10 @@ function _visit(path100, item, visitor) {
8672
8672
  }
8673
8673
  }
8674
8674
  if (typeof ctrl === "function" && field === "key")
8675
- ctrl = ctrl(item, path100);
8675
+ ctrl = ctrl(item, path101);
8676
8676
  }
8677
8677
  }
8678
- return typeof ctrl === "function" ? ctrl(item, path100) : ctrl;
8678
+ return typeof ctrl === "function" ? ctrl(item, path101) : ctrl;
8679
8679
  }
8680
8680
  var BREAK2, SKIP2, REMOVE2;
8681
8681
  var init_cst_visit = __esm({
@@ -8686,9 +8686,9 @@ var init_cst_visit = __esm({
8686
8686
  visit2.BREAK = BREAK2;
8687
8687
  visit2.SKIP = SKIP2;
8688
8688
  visit2.REMOVE = REMOVE2;
8689
- visit2.itemAtPath = (cst, path100) => {
8689
+ visit2.itemAtPath = (cst, path101) => {
8690
8690
  let item = cst;
8691
- for (const [field, index] of path100) {
8691
+ for (const [field, index] of path101) {
8692
8692
  const tok = item?.[field];
8693
8693
  if (tok && "items" in tok) {
8694
8694
  item = tok.items[index];
@@ -8697,9 +8697,9 @@ var init_cst_visit = __esm({
8697
8697
  }
8698
8698
  return item;
8699
8699
  };
8700
- visit2.parentCollection = (cst, path100) => {
8701
- const parent = visit2.itemAtPath(cst, path100.slice(0, -1));
8702
- const field = path100[path100.length - 1][0];
8700
+ visit2.parentCollection = (cst, path101) => {
8701
+ const parent = visit2.itemAtPath(cst, path101.slice(0, -1));
8702
+ const field = path101[path101.length - 1][0];
8703
8703
  const coll = parent?.[field];
8704
8704
  if (coll && "items" in coll)
8705
8705
  return coll;
@@ -10549,8 +10549,8 @@ function metadataValue(value, key2) {
10549
10549
  if (!value || typeof value !== "object") return void 0;
10550
10550
  return Object.getOwnPropertyDescriptor(value, key2)?.value;
10551
10551
  }
10552
- function readProjectJson(path100, files2 = nodeRepoFileReader) {
10553
- const text6 = readProjectMetadata(path100, files2);
10552
+ function readProjectJson(path101, files2 = nodeRepoFileReader) {
10553
+ const text6 = readProjectMetadata(path101, files2);
10554
10554
  if (text6 === null) return null;
10555
10555
  try {
10556
10556
  const value = JSON.parse(text6);
@@ -11578,8 +11578,8 @@ export *
11578
11578
  }`;
11579
11579
  }
11580
11580
  function swiftPackageIdentity(url) {
11581
- const path100 = url.endsWith("/") ? url.slice(0, -1) : url;
11582
- return (path100.split("/").pop() ?? path100).replace(/\.git$/, "").toLowerCase();
11581
+ const path101 = url.endsWith("/") ? url.slice(0, -1) : url;
11582
+ return (path101.split("/").pop() ?? path101).replace(/\.git$/, "").toLowerCase();
11583
11583
  }
11584
11584
  function clangSettingEntries(settings, tool) {
11585
11585
  return (settings ?? []).flatMap(
@@ -12241,14 +12241,14 @@ function addAsset(into, asset) {
12241
12241
  function checkStack(dir, type, devices) {
12242
12242
  const sets = (parent, allowed) => (0, import_node_fs16.readdirSync)(parent, { withFileTypes: true }).flatMap((entry) => {
12243
12243
  if (entry.name.startsWith(".") || entry.isFile()) return [];
12244
- const path100 = (0, import_node_path14.join)(parent, entry.name);
12244
+ const path101 = (0, import_node_path14.join)(parent, entry.name);
12245
12245
  const extension = (0, import_node_path14.extname)(entry.name);
12246
12246
  if (!entry.isDirectory() || !allowed.includes(extension))
12247
12247
  return refuse(
12248
- path100,
12248
+ path101,
12249
12249
  `image stack content other than ${allowed.join(", ")} is unproven`
12250
12250
  );
12251
- return [{ path: path100, extension }];
12251
+ return [{ path: path101, extension }];
12252
12252
  });
12253
12253
  for (const layer of sets(dir, [`.${type}layer`, ".imageset", ".colorset"])) {
12254
12254
  if (layer.extension !== `.${type}layer`) continue;
@@ -12260,37 +12260,37 @@ function checkStack(dir, type, devices) {
12260
12260
  function walk(dir, into, devices, extensions) {
12261
12261
  for (const entry of (0, import_node_fs16.readdirSync)(dir, { withFileTypes: true })) {
12262
12262
  if (entry.name.startsWith(".") || entry.isFile()) continue;
12263
- const path100 = (0, import_node_path14.join)(dir, entry.name);
12264
- if (!entry.isDirectory()) return refuse(path100, "it is neither a file nor a directory");
12263
+ const path101 = (0, import_node_path14.join)(dir, entry.name);
12264
+ if (!entry.isDirectory()) return refuse(path101, "it is neither a file nor a directory");
12265
12265
  const extension = (0, import_node_path14.extname)(entry.name).slice(1);
12266
12266
  const type = extension.toLowerCase();
12267
12267
  const base = entry.name.slice(0, entry.name.length - extension.length - 1);
12268
12268
  if (type !== extension && knownTypes.has(type))
12269
- return refuse(path100, "its type extension is not lowercase");
12269
+ return refuse(path101, "its type extension is not lowercase");
12270
12270
  if (type === "colorset" || type === "imageset" || type === "symbolset") {
12271
12271
  addAsset(into, {
12272
12272
  kind: type === "colorset" ? "color" : "image",
12273
12273
  name: base,
12274
- ...assetState(path100, type, devices),
12274
+ ...assetState(path101, type, devices),
12275
12275
  extensions,
12276
- source: path100
12276
+ source: path101
12277
12277
  });
12278
12278
  continue;
12279
12279
  }
12280
12280
  if (silentTypes.has(type)) continue;
12281
12281
  if (stackTypes.has(type)) {
12282
- checkStack(path100, type, devices);
12282
+ checkStack(path101, type, devices);
12283
12283
  continue;
12284
12284
  }
12285
- if (unprovenTypes.has(type)) return refuse(path100, `${type} assets are unproven`);
12285
+ if (unprovenTypes.has(type)) return refuse(path101, `${type} assets are unproven`);
12286
12286
  const name3 = type === "spriteatlas" ? base : entry.name;
12287
- if (!folderProperties((0, import_node_path14.join)(path100, "Contents.json")).namespace) {
12288
- walk(path100, into, devices, extensions);
12287
+ if (!folderProperties((0, import_node_path14.join)(path101, "Contents.json")).namespace) {
12288
+ walk(path101, into, devices, extensions);
12289
12289
  continue;
12290
12290
  }
12291
- const child = into.namespaces.get(name3) ?? scope(path100);
12291
+ const child = into.namespaces.get(name3) ?? scope(path101);
12292
12292
  into.namespaces.set(name3, child);
12293
- walk(path100, child, devices, extensions);
12293
+ walk(path101, child, devices, extensions);
12294
12294
  }
12295
12295
  }
12296
12296
  function words(name3) {
@@ -12337,11 +12337,11 @@ function members(into, kind, prefix, extensions) {
12337
12337
  const assets2 = /* @__PURE__ */ new Set();
12338
12338
  const out = [];
12339
12339
  for (const entry of entries) {
12340
- const path100 = `${prefix}${entry.name}`;
12340
+ const path101 = `${prefix}${entry.name}`;
12341
12341
  const source = entry.child ? entry.child.source : entry.asset.source;
12342
12342
  if (Array.from(entry.name).some((char) => char.charCodeAt(0) > 127))
12343
12343
  refuse(source, "its name is not ASCII");
12344
- const named = (text7) => `The \\"${escape(path100)}\\" ${text7}`;
12344
+ const named = (text7) => `The \\"${escape(path101)}\\" ${text7}`;
12345
12345
  if (entry.child) {
12346
12346
  const text7 = symbol(entry.name, true);
12347
12347
  if (!text7)
@@ -12364,9 +12364,9 @@ function members(into, kind, prefix, extensions) {
12364
12364
  namespaces.add(text7);
12365
12365
  out.push({
12366
12366
  type: "namespace",
12367
- path: path100,
12367
+ path: path101,
12368
12368
  symbol: spelled(text7),
12369
- members: members(entry.child, kind, `${path100}/`, extensions)
12369
+ members: members(entry.child, kind, `${path101}/`, extensions)
12370
12370
  });
12371
12371
  }
12372
12372
  continue;
@@ -12393,7 +12393,7 @@ function members(into, kind, prefix, extensions) {
12393
12393
  else if (!omitted)
12394
12394
  out.push({
12395
12395
  type: "asset",
12396
- path: path100,
12396
+ path: path101,
12397
12397
  name: entry.name,
12398
12398
  symbol: spelled(text6),
12399
12399
  thinnable: asset.thinnable,
@@ -12674,8 +12674,8 @@ var init_xcode_asset_symbols = __esm({
12674
12674
  import_node_path14 = require("node:path");
12675
12675
  Refusal = class extends Error {
12676
12676
  };
12677
- refuse = (path100, reason) => {
12678
- throw new Refusal(`Generated asset symbols are unproven for ${path100}: ${reason}`);
12677
+ refuse = (path101, reason) => {
12678
+ throw new Refusal(`Generated asset symbols are unproven for ${path101}: ${reason}`);
12679
12679
  };
12680
12680
  isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
12681
12681
  scope = (source) => ({
@@ -13121,11 +13121,11 @@ function catalogDigest(directory2) {
13121
13121
  for (const entry of (0, import_node_fs17.readdirSync)(dir, { withFileTypes: true }).sort(
13122
13122
  (a, b) => a.name.localeCompare(b.name)
13123
13123
  )) {
13124
- const path100 = (0, import_node_path15.join)(dir, entry.name);
13125
- if (entry.isDirectory()) walk3(path100);
13126
- else if (entry.isFile() && (0, import_node_fs17.statSync)(path100).size <= 64 * 1024 * 1024)
13127
- hashes.push([(0, import_node_path15.relative)(directory2, path100), sha2562((0, import_node_fs17.readFileSync)(path100))]);
13128
- else throw new Error(`Unsupported asset catalog entry: ${path100}`);
13124
+ const path101 = (0, import_node_path15.join)(dir, entry.name);
13125
+ if (entry.isDirectory()) walk3(path101);
13126
+ else if (entry.isFile() && (0, import_node_fs17.statSync)(path101).size <= 64 * 1024 * 1024)
13127
+ hashes.push([(0, import_node_path15.relative)(directory2, path101), sha2562((0, import_node_fs17.readFileSync)(path101))]);
13128
+ else throw new Error(`Unsupported asset catalog entry: ${path101}`);
13129
13129
  }
13130
13130
  };
13131
13131
  walk3(directory2);
@@ -13136,7 +13136,7 @@ function symbolSource(plan, root) {
13136
13136
  const known = symbolTexts.get(key2);
13137
13137
  if (known !== void 0) return { status: "source", text: known };
13138
13138
  const source = assetSymbolSource(
13139
- plan.catalogs.map(({ path: path100 }) => (0, import_node_path15.join)(root, path100)),
13139
+ plan.catalogs.map(({ path: path101 }) => (0, import_node_path15.join)(root, path101)),
13140
13140
  plan.settings
13141
13141
  );
13142
13142
  if (source.status === "source") symbolTexts.set(key2, source.text);
@@ -13195,9 +13195,9 @@ function planAssetSymbols(resources, root, settings) {
13195
13195
  `Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
13196
13196
  );
13197
13197
  const plan = {
13198
- catalogs: catalogs.map((path100) => ({
13199
- path: path100,
13200
- sha256: catalogDigest((0, import_node_path15.join)(root, path100))
13198
+ catalogs: catalogs.map((path101) => ({
13199
+ path: path101,
13200
+ sha256: catalogDigest((0, import_node_path15.join)(root, path101))
13201
13201
  })),
13202
13202
  settings: { deployment: target, devices, extensions: extensions === "YES" }
13203
13203
  };
@@ -16260,10 +16260,10 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
16260
16260
  const enclosing = scopes.length > 0 ? scopes[scopes.length - 1].prefix : [];
16261
16261
  if (scope2?.[3] === "enum" && opens > 0 && /(^|\s)(public|open)\s/.test(scope2[2] ?? "") && !/\bwhere\b/.test(first.masked) && first.masked[scope2.index + scope2[0].length] !== "<") {
16262
16262
  const name3 = scope2[4];
16263
- const path100 = scopeOf(name3, enclosing, false);
16264
- if (!byPath.has(path100.join(".")) && (path100.length === 1 || byPath.has(path100.slice(0, -1).join(".")))) {
16263
+ const path101 = scopeOf(name3, enclosing, false);
16264
+ if (!byPath.has(path101.join(".")) && (path101.length === 1 || byPath.has(path101.slice(0, -1).join(".")))) {
16265
16265
  const keptAttrs = [...(scope2[1] ?? "").matchAll(/@\w+(?:\([^)]*\))?/g)].map((attr) => attr[0]).filter((attr) => !attr.startsWith("@objc"));
16266
- const id = `s:peach-synthesized-${module2}-${path100.join(".")}`;
16266
+ const id = `s:peach-synthesized-${module2}-${path101.join(".")}`;
16267
16267
  const body = [];
16268
16268
  let inner = 1;
16269
16269
  let closed = false;
@@ -16318,15 +16318,15 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
16318
16318
  symbols.push({
16319
16319
  kind: { identifier: "swift.enum" },
16320
16320
  identifier: { precise: id },
16321
- pathComponents: path100,
16321
+ pathComponents: path101,
16322
16322
  declarationFragments: fragments,
16323
16323
  accessLevel: "public"
16324
16324
  });
16325
- if (path100.length > 1)
16325
+ if (path101.length > 1)
16326
16326
  relationships.push({
16327
16327
  kind: "memberOf",
16328
16328
  source: id,
16329
- target: byPath.get(path100.slice(0, -1).join("."))
16329
+ target: byPath.get(path101.slice(0, -1).join("."))
16330
16330
  });
16331
16331
  for (const kase of cases) {
16332
16332
  const memberId = `${id}-${kase.leaf}`;
@@ -16335,7 +16335,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
16335
16335
  symbols.push({
16336
16336
  kind: { identifier: "swift.enum.case" },
16337
16337
  identifier: { precise: memberId },
16338
- pathComponents: [...path100, kase.leaf],
16338
+ pathComponents: [...path101, kase.leaf],
16339
16339
  declarationFragments: [
16340
16340
  { kind: "keyword", spelling: "case" },
16341
16341
  { kind: "text", spelling: " " },
@@ -16351,7 +16351,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
16351
16351
  symbols.push({
16352
16352
  kind: { identifier: "swift.init" },
16353
16353
  identifier: { precise: initId },
16354
- pathComponents: [...path100, "init(rawValue:)"],
16354
+ pathComponents: [...path101, "init(rawValue:)"],
16355
16355
  declarationFragments: [
16356
16356
  { kind: "keyword", spelling: "init" },
16357
16357
  { kind: "text", spelling: "?(" },
@@ -16420,7 +16420,7 @@ function emitSwiftStandin(sourceGraphs, options) {
16420
16420
  })
16421
16421
  )
16422
16422
  );
16423
- const trap = (path100) => `fatalError("${path100} is ${options.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
16423
+ const trap = (path101) => `fatalError("${path101} is ${options.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
16424
16424
  const skipped = [];
16425
16425
  const behavior = options.behavior ?? /* @__PURE__ */ new Map();
16426
16426
  const used = /* @__PURE__ */ new Set();
@@ -16770,34 +16770,34 @@ function emitSwiftStandin(sourceGraphs, options) {
16770
16770
  lines.push(...physical);
16771
16771
  owners.push(...physical.map(() => current2));
16772
16772
  };
16773
- const emitAt = (path100, line) => {
16774
- if (omit.has(path100)) return;
16773
+ const emitAt = (path101, line) => {
16774
+ if (omit.has(path101)) return;
16775
16775
  const previous = current2;
16776
- current2 = path100;
16776
+ current2 = path101;
16777
16777
  emit(line);
16778
16778
  current2 = previous;
16779
16779
  };
16780
16780
  const emitInertState = (id, indent2, build) => {
16781
- const path100 = pathOf(byId.get(id));
16781
+ const path101 = pathOf(byId.get(id));
16782
16782
  emitAt(hiddenInit(id), `${indent2}init(_peachInert: Void) { ${build} }`);
16783
16783
  const list2 = conforms.get(id) ?? [];
16784
16784
  const has = (name3) => (children.get(id) ?? []).some((member) => leaf(member) === name3);
16785
16785
  if (list2.includes("Encodable") && !has("encode(to:)"))
16786
16786
  emitAt(
16787
- `${path100}.encode(to:)`,
16787
+ `${path101}.encode(to:)`,
16788
16788
  `${indent2}public func encode(to encoder: Encoder) throws {}`
16789
16789
  );
16790
16790
  if (list2.includes("Decodable") && !has("init(from:)"))
16791
16791
  emitAt(
16792
- `${path100}.init(from:)`,
16792
+ `${path101}.init(from:)`,
16793
16793
  `${indent2}public init(from decoder: Decoder) throws { self.init(_peachInert: ()) }`
16794
16794
  );
16795
16795
  };
16796
16796
  const scoped = (body) => (symbol2, ...rest) => {
16797
- const path100 = pathOf(symbol2);
16798
- if (omit.has(path100)) return void skipped.push({ path: path100, reason: omit.get(path100) });
16797
+ const path101 = pathOf(symbol2);
16798
+ if (omit.has(path101)) return void skipped.push({ path: path101, reason: omit.get(path101) });
16799
16799
  const previous = current2;
16800
- current2 = path100;
16800
+ current2 = path101;
16801
16801
  try {
16802
16802
  body(symbol2, ...rest);
16803
16803
  } finally {
@@ -16829,7 +16829,7 @@ function emitSwiftStandin(sourceGraphs, options) {
16829
16829
  };
16830
16830
  const emitMember = scoped(
16831
16831
  (member, indent2, context) => {
16832
- const path100 = pathOf(member);
16832
+ const path101 = pathOf(member);
16833
16833
  if (TYPE_KINDS.has(member.kind.identifier)) {
16834
16834
  const origin = origins.get(member.identifier.precise)?.split(".")[0];
16835
16835
  const parent = owner.get(member.identifier.precise);
@@ -16846,7 +16846,7 @@ function emitSwiftStandin(sourceGraphs, options) {
16846
16846
  ))
16847
16847
  return;
16848
16848
  if (!MEMBER_KINDS.has(member.kind.identifier)) {
16849
- skipped.push({ path: path100, reason: `unhandled ${member.kind.identifier}` });
16849
+ skipped.push({ path: path101, reason: `unhandled ${member.kind.identifier}` });
16850
16850
  return;
16851
16851
  }
16852
16852
  const { 1: spelledAttrs, 2: rest } = LEADING_ATTRS.exec(text(member));
@@ -16854,15 +16854,15 @@ function emitSwiftStandin(sourceGraphs, options) {
16854
16854
  /@(\w+)(?:\([^)]*\))?\s*/g,
16855
16855
  (attr, name3) => typeByPath.has(name3) ? "" : attr
16856
16856
  ) : spelledAttrs;
16857
- const attrs = options.unobjc?.has(path100) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
16857
+ const attrs = options.unobjc?.has(path101) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
16858
16858
  const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
16859
16859
  rest
16860
16860
  );
16861
16861
  const flags = new Set(
16862
16862
  modifiers[1].trim().split(/\s+/).filter(Boolean).map((flag) => flag.replace(/\(.*/, ""))
16863
16863
  );
16864
- const requiredInit = context.inClass && !!options.requiredInits?.has(path100);
16865
- const restatesRequired = context.inClass && path100.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
16864
+ const requiredInit = context.inClass && !!options.requiredInits?.has(path101);
16865
+ const restatesRequired = context.inClass && path101.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
16866
16866
  (at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
16867
16867
  );
16868
16868
  const protocolInit = member.kind.identifier === "swift.init" && /^c:objc\(pl\)\w+\(im\).*::SYNTHESIZED::c:objc\(cs\)/.test(
@@ -16872,12 +16872,12 @@ function emitSwiftStandin(sourceGraphs, options) {
16872
16872
  const final = context.inClass && flags.has("final") ? "final " : "";
16873
16873
  const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
16874
16874
  let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
16875
- const override = context.inClass && !options.plain?.has(path100) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path100) || isObjC(member) && path100.endsWith(".init()")) ? "override " : "";
16875
+ const override = context.inClass && !options.plain?.has(path101) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path101) || isObjC(member) && path101.endsWith(".init()")) ? "override " : "";
16876
16876
  const head = `${indent2}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
16877
- const measured = behavior.get(path100);
16878
- if (measured) used.add(path100);
16877
+ const measured = behavior.get(path101);
16878
+ if (measured) used.add(path101);
16879
16879
  const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
16880
- const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(path100));
16880
+ const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(path101));
16881
16881
  switch (member.kind.identifier) {
16882
16882
  case "swift.property":
16883
16883
  case "swift.type.property":
@@ -16890,13 +16890,13 @@ function emitSwiftStandin(sourceGraphs, options) {
16890
16890
  const parameter = !measured && !options.inert && !settable && /:\s*some\s/.test(decl) ? opaqueParameter(member) : void 0;
16891
16891
  const getter = parameter ? `return ({ () -> ${parameter} in ${body} })()` : body;
16892
16892
  const computed = decl.replace(/^((?:static |class )*)let /, "$1var ");
16893
- const wrapper = options.projections?.get(path100);
16893
+ const wrapper = options.projections?.get(path101);
16894
16894
  if (wrapper) {
16895
16895
  const type = /^var\s+`?\w+`?\s*:\s*(.+)$/s.exec(computed)?.[1];
16896
- const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path100]);
16896
+ const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path101]);
16897
16897
  if (!initial)
16898
16898
  return void skipped.push({
16899
- path: path100,
16899
+ path: path101,
16900
16900
  reason: `wrapped by ${wrapper} with no inert initial value`
16901
16901
  });
16902
16902
  const own = new RegExp(
@@ -16917,7 +16917,7 @@ function emitSwiftStandin(sourceGraphs, options) {
16917
16917
  return;
16918
16918
  }
16919
16919
  emit(
16920
- `${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(path100))} }` : ""} }`
16920
+ `${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(path101))} }` : ""} }`
16921
16921
  );
16922
16922
  return;
16923
16923
  }
@@ -16976,7 +16976,7 @@ function emitSwiftStandin(sourceGraphs, options) {
16976
16976
  };
16977
16977
  const emitType = scoped(
16978
16978
  (symbol2, indent2) => {
16979
- const path100 = pathOf(symbol2);
16979
+ const path101 = pathOf(symbol2);
16980
16980
  const id = symbol2.identifier.precise;
16981
16981
  const inner = `${indent2} `;
16982
16982
  switch (symbol2.kind.identifier) {
@@ -16993,10 +16993,10 @@ function emitSwiftStandin(sourceGraphs, options) {
16993
16993
  case "swift.class": {
16994
16994
  const shape = header(symbol2, "class", indent2);
16995
16995
  if (!shape)
16996
- return void skipped.push({ path: path100, reason: `unparsed class ${text(symbol2)}` });
16997
- const parent = options.superclasses?.get(path100) ?? superclass.get(id);
16996
+ return void skipped.push({ path: path101, reason: `unparsed class ${text(symbol2)}` });
16997
+ const parent = options.superclasses?.get(path101) ?? superclass.get(id);
16998
16998
  const blocked = classBlocked(id);
16999
- if (blocked) return void skipped.push({ path: path100, reason: blocked });
16999
+ if (blocked) return void skipped.push({ path: path101, reason: blocked });
17000
17000
  const ancestors = /* @__PURE__ */ new Set();
17001
17001
  const inherited = /* @__PURE__ */ new Set();
17002
17002
  for (let at = superId.get(id); at; at = superId.get(at)) {
@@ -17012,7 +17012,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17012
17012
  "Equatable",
17013
17013
  "CustomStringConvertible",
17014
17014
  "CustomDebugStringConvertible"
17015
- ].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path100)?.has(name3.split(/::|\./).pop()) && !options.unconformed?.get(path100)?.has(name3)
17015
+ ].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path101)?.has(name3.split(/::|\./).pop()) && !options.unconformed?.get(path101)?.has(name3)
17016
17016
  )
17017
17017
  ].filter((name3, at, all2) => all2.indexOf(name3) === at);
17018
17018
  const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
@@ -17024,9 +17024,9 @@ function emitSwiftStandin(sourceGraphs, options) {
17024
17024
  `${indent2}${shape.attrs}${objcName ? `@objc(${objcName}) ` : ""}${shape.final}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
17025
17025
  );
17026
17026
  const members2 = membersOf(id);
17027
- const extra = options.behavior?.get(path100)?.members;
17027
+ const extra = options.behavior?.get(path101)?.members;
17028
17028
  if (extra) {
17029
- used.add(path100);
17029
+ used.add(path101);
17030
17030
  emit(`${inner}${extra}`);
17031
17031
  }
17032
17032
  for (const member of members2)
@@ -17082,11 +17082,11 @@ function emitSwiftStandin(sourceGraphs, options) {
17082
17082
  if (protocol && member.kind.identifier === "swift.method" && leaf(member).endsWith("()") && have.has(`instance|leaf|${leaf(member).slice(0, -2)}`))
17083
17083
  propertyWitnesses.push({
17084
17084
  owner: current2,
17085
- head: `extension ${pathOf(protocol)} where Self: ${path100} {`,
17085
+ head: `extension ${pathOf(protocol)} where Self: ${path101} {`,
17086
17086
  member,
17087
- path: path100
17087
+ path: path101
17088
17088
  });
17089
- else emitWitness(member, inner, path100, open && isObjC(member));
17089
+ else emitWitness(member, inner, path101, open && isObjC(member));
17090
17090
  }
17091
17091
  }
17092
17092
  if (options.inert && designated2 && classBuild(id) === "hidden")
@@ -17094,13 +17094,13 @@ function emitSwiftStandin(sourceGraphs, options) {
17094
17094
  const coder = members2.some((member) => leaf(member) === "init(coder:)");
17095
17095
  if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
17096
17096
  emit(
17097
- `${inner}public required init${options.coderNonfailable?.has(path100) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path100) ? "return nil" : trap(`${path100}.init(coder:)`)} }`
17097
+ `${inner}public required init${options.coderNonfailable?.has(path101) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path101) ? "return nil" : trap(`${path101}.init(coder:)`)} }`
17098
17098
  );
17099
17099
  if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
17100
17100
  (at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
17101
17101
  ))
17102
17102
  emit(
17103
- `${inner}public required init() { ${options.inert ? superInit(id) : trap(`${path100}.init()`)} }`
17103
+ `${inner}public required init() { ${options.inert ? superInit(id) : trap(`${path101}.init()`)} }`
17104
17104
  );
17105
17105
  emit(`${indent2}}`);
17106
17106
  return;
@@ -17108,7 +17108,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17108
17108
  case "swift.struct": {
17109
17109
  const shape = header(symbol2, "struct", indent2);
17110
17110
  if (!shape)
17111
- return void skipped.push({ path: path100, reason: `unparsed struct ${text(symbol2)}` });
17111
+ return void skipped.push({ path: path101, reason: `unparsed struct ${text(symbol2)}` });
17112
17112
  const members2 = membersOf(id);
17113
17113
  const raw2 = rawType(members2);
17114
17114
  const list2 = inheritance(id);
@@ -17148,7 +17148,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17148
17148
  emitInertState(
17149
17149
  id,
17150
17150
  inner,
17151
- raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path100]) ?? "0"}` : ""
17151
+ raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path101]) ?? "0"}` : ""
17152
17152
  );
17153
17153
  emit(`${indent2}}`);
17154
17154
  return;
@@ -17156,7 +17156,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17156
17156
  case "swift.enum": {
17157
17157
  const shape = header(symbol2, "enum", indent2);
17158
17158
  if (!shape)
17159
- return void skipped.push({ path: path100, reason: `unparsed enum ${text(symbol2)}` });
17159
+ return void skipped.push({ path: path101, reason: `unparsed enum ${text(symbol2)}` });
17160
17160
  const members2 = membersOf(id);
17161
17161
  const cases = members2.filter(
17162
17162
  (member) => member.kind.identifier === "swift.enum.case"
@@ -17166,7 +17166,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17166
17166
  const missing2 = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
17167
17167
  if (raw2 && (isObjC(symbol2) || /^c:@C?M@[^@]+@E@/.test(id)) && missing2.length > 0)
17168
17168
  return void skipped.push({
17169
- path: path100,
17169
+ path: path101,
17170
17170
  reason: `no header value for ${missing2.map(leaf).join(", ")}`
17171
17171
  });
17172
17172
  const list2 = inheritance(id, raw2 ?? void 0).filter(
@@ -17205,8 +17205,8 @@ function emitSwiftStandin(sourceGraphs, options) {
17205
17205
  });
17206
17206
  }
17207
17207
  if (options.inert) {
17208
- const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(path100, /* @__PURE__ */ new Set(), []);
17209
- emitInertState(id, inner, value === null ? trap(path100) : `self = ${value}`);
17208
+ const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(path101, /* @__PURE__ */ new Set(), []);
17209
+ emitInertState(id, inner, value === null ? trap(path101) : `self = ${value}`);
17210
17210
  }
17211
17211
  emit(`${indent2}}`);
17212
17212
  return;
@@ -17215,14 +17215,14 @@ function emitSwiftStandin(sourceGraphs, options) {
17215
17215
  const shape = header(symbol2, "protocol", indent2);
17216
17216
  if (!shape)
17217
17217
  return void skipped.push({
17218
- path: path100,
17218
+ path: path101,
17219
17219
  reason: `unparsed protocol ${text(symbol2)}`
17220
17220
  });
17221
17221
  const native = nativeObjcProtocols.has(id);
17222
17222
  const objcName = native ? /^c:objc\(pl\)(\w+)$/.exec(id)?.[1] : void 0;
17223
17223
  if (native && !objcName)
17224
17224
  return void skipped.push({
17225
- path: path100,
17225
+ path: path101,
17226
17226
  reason: `unknown Objective-C protocol identity ${id}`
17227
17227
  });
17228
17228
  const list2 = [
@@ -17250,7 +17250,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17250
17250
  }
17251
17251
  emit(`${indent2}}`);
17252
17252
  if (defaults.length > 0) {
17253
- emit(`${indent2}extension ${path100} {`);
17253
+ emit(`${indent2}extension ${path101} {`);
17254
17254
  for (const member of defaults) {
17255
17255
  const decl = text(member);
17256
17256
  if (optional3.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
@@ -17344,7 +17344,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17344
17344
  return null;
17345
17345
  };
17346
17346
  const emitGlobal = scoped((symbol2) => {
17347
- const path100 = pathOf(symbol2);
17347
+ const path101 = pathOf(symbol2);
17348
17348
  const kind = symbol2.kind.identifier;
17349
17349
  if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
17350
17350
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol2));
@@ -17353,20 +17353,20 @@ function emitSwiftStandin(sourceGraphs, options) {
17353
17353
  if (leaf(symbol2).endsWith("(_:)") && !/^(?:prefix|infix|postfix)\b/.test(spelled2))
17354
17354
  spelled2 = `prefix ${spelled2}`;
17355
17355
  }
17356
- const measured = behavior.get(path100);
17357
- if (measured) used.add(path100);
17356
+ const measured = behavior.get(path101);
17357
+ if (measured) used.add(path101);
17358
17358
  const overloadBody = /\basync\b/.test(spelled2) ? measured?.asyncBody : /\bResult</.test(spelled2) ? measured?.resultBody : void 0;
17359
17359
  emit(
17360
- `${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path100))} }`
17360
+ `${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path101))} }`
17361
17361
  );
17362
17362
  } else if (kind === "swift.var") {
17363
17363
  const parsed = splitAccessors(text(symbol2).replace(/^let /, "var "));
17364
- const measured = behavior.get(path100);
17365
- if (measured) used.add(path100);
17364
+ const measured = behavior.get(path101);
17365
+ if (measured) used.add(path101);
17366
17366
  emit(
17367
- `public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path100))} }`
17367
+ `public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path101))} }`
17368
17368
  );
17369
- } else skipped.push({ path: path100, reason: `unhandled top-level ${kind}` });
17369
+ } else skipped.push({ path: path101, reason: `unhandled top-level ${kind}` });
17370
17370
  });
17371
17371
  const cExports = new Set(
17372
17372
  [...byId.values()].flatMap((symbol2) => {
@@ -17383,7 +17383,7 @@ function emitSwiftStandin(sourceGraphs, options) {
17383
17383
  return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
17384
17384
  }).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
17385
17385
  for (const symbol2 of roots) {
17386
- const path100 = pathOf(symbol2);
17386
+ const path101 = pathOf(symbol2);
17387
17387
  if (TYPE_KINDS.has(symbol2.kind.identifier)) emitType(symbol2, "");
17388
17388
  else emitGlobal(symbol2);
17389
17389
  }
@@ -17444,9 +17444,9 @@ function emitSwiftStandin(sourceGraphs, options) {
17444
17444
  "#endif",
17445
17445
  ""
17446
17446
  ];
17447
- for (const path100 of behavior.keys())
17448
- if (!used.has(path100))
17449
- skipped.push({ path: path100, reason: "behavior names no emitted declaration" });
17447
+ for (const path101 of behavior.keys())
17448
+ if (!used.has(path101))
17449
+ skipped.push({ path: path101, reason: "behavior names no emitted declaration" });
17450
17450
  return {
17451
17451
  source: `${[...banner, ...lines].join("\n")}
17452
17452
  `,
@@ -19646,9 +19646,9 @@ function originalColumn(line, column) {
19646
19646
  }
19647
19647
  function designTimeDiagnostic(output2, files2) {
19648
19648
  const rewritten = /* @__PURE__ */ new Map();
19649
- const linesOf = (path100) => {
19649
+ const linesOf = (path101) => {
19650
19650
  const file = Object.keys(files2).find(
19651
- (name3) => name3.endsWith(".swift") && (path100 === name3 || path100.endsWith(`/${name3}`))
19651
+ (name3) => name3.endsWith(".swift") && (path101 === name3 || path101.endsWith(`/${name3}`))
19652
19652
  );
19653
19653
  if (file === void 0) return null;
19654
19654
  let lines = rewritten.get(file);
@@ -38073,6 +38073,8 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
38073
38073
  const source = import_node_fs53.default.realpathSync(import_node_path53.default.join(root, sourceRelative));
38074
38074
  if (providerRoots.has(root) && /\.(?:c|cc|cpp|cxx|m|mm|swift)$/.test(entry.name) && !nativeSourceKeys.has(projectSourceKey([sourceRoot], source)))
38075
38075
  continue;
38076
+ if (/\.mm?$/.test(entry.name) && /\bRCT_EXTERN_(?:REMAP_)?MODULE\s*\(/.test(import_node_fs53.default.readFileSync(source, "utf8")))
38077
+ continue;
38076
38078
  const key2 = `${targetPath(name3)}/upstream/${import_node_path53.default.relative(root, source).split(import_node_path53.default.sep).join("/")}`;
38077
38079
  let original = originals.get(source);
38078
38080
  if (!original) {
@@ -40272,7 +40274,7 @@ function scanLocalNative(appDir, pkg, answered, platform2, knownPackages = /* @_
40272
40274
  expoModule: moduleDir ? (0, import_node_path59.relative)(appDir, moduleDir) || "." : null,
40273
40275
  optional: optional3,
40274
40276
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
40275
- (path100) => path100.endsWith(".swift") && [...(readSmallFile(path100) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
40277
+ (path101) => path101.endsWith(".swift") && [...(readSmallFile(path101) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
40276
40278
  (match) => match[1] === name3
40277
40279
  )
40278
40280
  ) : false,
@@ -41575,8 +41577,8 @@ function imagesetFiles(images) {
41575
41577
  ];
41576
41578
  }).sort((a, b) => a.scale - b.scale);
41577
41579
  }
41578
- function flatScale(path100) {
41579
- const match = /@([23])x\.[^./]+$/.exec(path100);
41580
+ function flatScale(path101) {
41581
+ const match = /@([23])x\.[^./]+$/.exec(path101);
41580
41582
  return match ? Number(match[1]) : 1;
41581
41583
  }
41582
41584
  function providesNamespace(text6) {
@@ -41603,8 +41605,8 @@ function catalogEntryName(contentsPath, kind, readText2) {
41603
41605
  }
41604
41606
  return segments.join("/");
41605
41607
  }
41606
- function isFlatResourceImage(path100) {
41607
- return path100.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path100));
41608
+ function isFlatResourceImage(path101) {
41609
+ return path101.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path101));
41608
41610
  }
41609
41611
  function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
41610
41612
  const table = [];
@@ -41617,7 +41619,7 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
41617
41619
  seen.set(bundlePath, names);
41618
41620
  return { bundlePath, names };
41619
41621
  };
41620
- const catalogs = paths.filter((path100) => baseOf(path100) === "Contents.json");
41622
+ const catalogs = paths.filter((path101) => baseOf(path101) === "Contents.json");
41621
41623
  for (const contentsPath of catalogs) {
41622
41624
  const name3 = catalogEntryName(contentsPath, ".imageset", readText2);
41623
41625
  if (name3 === null) continue;
@@ -41649,13 +41651,13 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
41649
41651
  ...intent === "template" || intent === "original" ? { renderingMode: intent } : {}
41650
41652
  });
41651
41653
  }
41652
- for (const path100 of paths) {
41653
- if (!isFlatResourceImage(path100)) continue;
41654
- const name3 = baseOf(path100).slice(0, -extOf(path100).length);
41655
- const { bundlePath, names } = namesFor(path100);
41654
+ for (const path101 of paths) {
41655
+ if (!isFlatResourceImage(path101)) continue;
41656
+ const name3 = baseOf(path101).slice(0, -extOf(path101).length);
41657
+ const { bundlePath, names } = namesFor(path101);
41656
41658
  if (name3 === "" || names.has(name3)) continue;
41657
41659
  names.add(name3);
41658
- table.push({ name: name3, file: path100, scale: flatScale(path100), bundlePath });
41660
+ table.push({ name: name3, file: path101, scale: flatScale(path101), bundlePath });
41659
41661
  }
41660
41662
  return table;
41661
41663
  }
@@ -41690,7 +41692,7 @@ function colorsetValue(color) {
41690
41692
  }
41691
41693
  function enumerateBundleColors(paths, readText2) {
41692
41694
  const table = {};
41693
- for (const contentsPath of paths.filter((path100) => baseOf(path100) === "Contents.json")) {
41695
+ for (const contentsPath of paths.filter((path101) => baseOf(path101) === "Contents.json")) {
41694
41696
  const name3 = catalogEntryName(contentsPath, ".colorset", readText2);
41695
41697
  if (name3 === null || name3 in table) continue;
41696
41698
  let colors;
@@ -41754,8 +41756,8 @@ function axisExtremes(points) {
41754
41756
  function pathBounds(d) {
41755
41757
  const xs = [];
41756
41758
  const ys = [];
41757
- for (const path100 of d)
41758
- (0, import_svgpath.default)(path100).abs().unshort().unarc().iterate((segment2, _index, x, y) => {
41759
+ for (const path101 of d)
41760
+ (0, import_svgpath.default)(path101).abs().unshort().unarc().iterate((segment2, _index, x, y) => {
41759
41761
  const [command, ...args] = segment2;
41760
41762
  if (command === "M" || command === "L") {
41761
41763
  xs.push(Number(args[0]));
@@ -41782,7 +41784,7 @@ function guide(svg, id, axis) {
41782
41784
  }
41783
41785
  function enumerateBundleSymbols(paths, readText2, bundleForFile) {
41784
41786
  const table = {};
41785
- for (const contentsPath of paths.filter((path100) => baseOf(path100) === "Contents.json")) {
41787
+ for (const contentsPath of paths.filter((path101) => baseOf(path101) === "Contents.json")) {
41786
41788
  const name3 = catalogEntryName(contentsPath, ".symbolset", readText2);
41787
41789
  if (name3 === null) continue;
41788
41790
  const bundle = bundleForFile(contentsPath);
@@ -41841,8 +41843,8 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
41841
41843
  advance,
41842
41844
  box: [12 - wide2 / 2, 12 - tall / 2, wide2, tall],
41843
41845
  ...customLayout ? { customLayout } : {},
41844
- layers: d.map((path100) => ({
41845
- d: (0, import_svgpath.default)(path100).abs().scale(em).translate(translateX, translateY).round(3).toString()
41846
+ layers: d.map((path101) => ({
41847
+ d: (0, import_svgpath.default)(path101).abs().scale(em).translate(translateX, translateY).round(3).toString()
41846
41848
  }))
41847
41849
  };
41848
41850
  table[vectorKey] = vector;
@@ -41853,21 +41855,21 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
41853
41855
  }
41854
41856
  return table;
41855
41857
  }
41856
- function isCopiedResource(path100, copiedBundle) {
41857
- const segments = path100.split("/");
41858
+ function isCopiedResource(path101, copiedBundle) {
41859
+ const segments = path101.split("/");
41858
41860
  if (segments.some((segment2) => /\.(atlasc|bundle|storyboardc|nib|momd)$/.test(segment2)))
41859
41861
  return true;
41860
41862
  if (segments.some((segment2) => /\.xcdatamodeld?$/.test(segment2))) return false;
41861
41863
  if (copiedBundle) return true;
41862
- const ext = extOf(path100);
41864
+ const ext = extOf(path101);
41863
41865
  if (ext === ".json" || ext === ".xcstrings") return true;
41864
- return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !path100.split("/").some((segment2) => segment2.endsWith(".xcassets"));
41866
+ return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !path101.split("/").some((segment2) => segment2.endsWith(".xcassets"));
41865
41867
  }
41866
41868
  function enumerateBundleResources(paths, copiedBundle = false) {
41867
41869
  const found = [];
41868
41870
  const seen = /* @__PURE__ */ new Set();
41869
41871
  const ordered = [...paths].filter(
41870
- (path100) => path100.split("/").includes("Resources") && path100.split("/").every((segment2) => segment2 !== "" && segment2 !== "..") && isCopiedResource(path100, copiedBundle)
41872
+ (path101) => path101.split("/").includes("Resources") && path101.split("/").every((segment2) => segment2 !== "" && segment2 !== "..") && isCopiedResource(path101, copiedBundle)
41871
41873
  ).sort((a, b) => {
41872
41874
  const aDepth = a.split("/").length;
41873
41875
  const bDepth = b.split("/").length;
@@ -42012,31 +42014,31 @@ function tokens(text6) {
42012
42014
  }
42013
42015
  return result;
42014
42016
  }
42015
- function qualified(language, key2, path100) {
42016
- return `(${language}: ${key2}${path100 === "" ? "" : "|==|" + path100})`;
42017
+ function qualified(language, key2, path101) {
42018
+ return `(${language}: ${key2}${path101 === "" ? "" : "|==|" + path101})`;
42017
42019
  }
42018
- function requiresNumber(language, key2, path100) {
42020
+ function requiresNumber(language, key2, path101) {
42019
42021
  return Error(
42020
- "Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path100)
42022
+ "Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path101)
42021
42023
  );
42022
42024
  }
42023
- function moreThanOne(language, key2, path100) {
42025
+ function moreThanOne(language, key2, path101) {
42024
42026
  return Error(
42025
- "Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path100)
42027
+ "Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path101)
42026
42028
  );
42027
42029
  }
42028
42030
  function schemaPath(segments) {
42029
42031
  return segments.map((segment2) => `'${segment2}'`).join(" -> ");
42030
42032
  }
42031
- function checkUnitShape(node, path100) {
42033
+ function checkUnitShape(node, path101) {
42032
42034
  const raw2 = node.stringUnit;
42033
42035
  if (raw2 === void 0)
42034
- throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path100)}`);
42036
+ throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path101)}`);
42035
42037
  if (raw2 === null)
42036
- throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path100)}`);
42038
+ throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path101)}`);
42037
42039
  if (!isRecord3(raw2))
42038
- throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path100)}`);
42039
- const unitPath = [...path100, "stringUnit"];
42040
+ throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path101)}`);
42041
+ const unitPath = [...path101, "stringUnit"];
42040
42042
  if (!Object.hasOwn(raw2, "state"))
42041
42043
  throw Error(`Missing required key 'state' inside ${schemaPath(unitPath)}`);
42042
42044
  const state = raw2.state;
@@ -42053,38 +42055,38 @@ function checkUnitShape(node, path100) {
42053
42055
  throw Error(`Expected string for key 'value' inside ${schemaPath(unitPath)}`);
42054
42056
  return value;
42055
42057
  }
42056
- function checkPluralShape(node, path100) {
42058
+ function checkPluralShape(node, path101) {
42057
42059
  for (const [category, raw2] of Object.entries(node)) {
42058
- const categoryPath = [...path100, category];
42060
+ const categoryPath = [...path101, category];
42059
42061
  if (raw2 === null)
42060
42062
  throw Error(
42061
- `Missing required value for key '${category}' inside ${schemaPath(path100)}`
42063
+ `Missing required value for key '${category}' inside ${schemaPath(path101)}`
42062
42064
  );
42063
42065
  if (!isRecord3(raw2))
42064
- throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path100)}`);
42066
+ throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path101)}`);
42065
42067
  checkUnitShape(raw2, categoryPath);
42066
42068
  }
42067
42069
  }
42068
- function checkLocalizationShape(node, path100, deviceValue = false) {
42070
+ function checkLocalizationShape(node, path101, deviceValue = false) {
42069
42071
  if (node === null)
42070
42072
  throw Error(
42071
- `Missing required value for key '${path100[path100.length - 1]}' inside ${schemaPath(path100.slice(0, -1))}`
42073
+ `Missing required value for key '${path101[path101.length - 1]}' inside ${schemaPath(path101.slice(0, -1))}`
42072
42074
  );
42073
42075
  if (!isRecord3(node))
42074
42076
  throw Error(
42075
- `Expected dictionary for key '${path100[path100.length - 1]}' inside ${schemaPath(path100.slice(0, -1))}`
42077
+ `Expected dictionary for key '${path101[path101.length - 1]}' inside ${schemaPath(path101.slice(0, -1))}`
42076
42078
  );
42077
- if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path100);
42079
+ if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path101);
42078
42080
  if (!deviceValue && Object.hasOwn(node, "substitutions"))
42079
- checkSubstitutionsShape(node.substitutions, path100);
42080
- if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path100);
42081
+ checkSubstitutionsShape(node.substitutions, path101);
42082
+ if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path101);
42081
42083
  }
42082
- function checkVariationsShape(variations, path100) {
42084
+ function checkVariationsShape(variations, path101) {
42083
42085
  if (variations === null)
42084
- throw Error(`Missing required value for key 'variations' inside ${schemaPath(path100)}`);
42086
+ throw Error(`Missing required value for key 'variations' inside ${schemaPath(path101)}`);
42085
42087
  if (!isRecord3(variations))
42086
- throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path100)}`);
42087
- const variationsPath = [...path100, "variations"];
42088
+ throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path101)}`);
42089
+ const variationsPath = [...path101, "variations"];
42088
42090
  for (const [type, raw2] of Object.entries(variations)) {
42089
42091
  if (raw2 === null)
42090
42092
  throw Error(
@@ -42110,11 +42112,11 @@ function checkVariationsShape(variations, path100) {
42110
42112
  }
42111
42113
  }
42112
42114
  }
42113
- function checkSubstitutionsShape(substitutions, path100) {
42115
+ function checkSubstitutionsShape(substitutions, path101) {
42114
42116
  if (substitutions === null) return;
42115
42117
  if (!isRecord3(substitutions))
42116
- throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path100)}`);
42117
- const substitutionsPath = [...path100, "substitutions"];
42118
+ throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path101)}`);
42119
+ const substitutionsPath = [...path101, "substitutions"];
42118
42120
  for (const [name3, raw2] of Object.entries(substitutions)) {
42119
42121
  const subPath = [...substitutionsPath, name3];
42120
42122
  if (raw2 === null)
@@ -42156,10 +42158,10 @@ function scanSpecs(forms) {
42156
42158
  }
42157
42159
  return specs;
42158
42160
  }
42159
- function inferPlural(forms, language, key2, path100) {
42161
+ function inferPlural(forms, language, key2, path101) {
42160
42162
  const specs = scanSpecs(forms);
42161
- if (specs.size === 0) throw requiresNumber(language, key2, path100);
42162
- if (specs.size > 1) throw moreThanOne(language, key2, path100);
42163
+ if (specs.size === 0) throw requiresNumber(language, key2, path101);
42164
+ if (specs.size > 1) throw moreThanOne(language, key2, path101);
42163
42165
  return [...specs.values()][0] ?? { specifier: "", argument: 0 };
42164
42166
  }
42165
42167
  function unit(value) {
@@ -42628,8 +42630,8 @@ function plist3(value, depth) {
42628
42630
  }
42629
42631
  function compileStringCatalog(source, name3) {
42630
42632
  return Object.fromEntries(
42631
- Object.entries(compileCatalogTables(source, name3)).map(([path100, table]) => [
42632
- path100,
42633
+ Object.entries(compileCatalogTables(source, name3)).map(([path101, table]) => [
42634
+ path101,
42633
42635
  '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n' + plist3(table, 0) + "</plist>\n"
42634
42636
  ])
42635
42637
  );
@@ -44563,7 +44565,7 @@ function resolveSwiftPackages(options) {
44563
44565
  headers.set(name3, import_node_path69.default.relative(binary2.dir, dir));
44564
44566
  };
44565
44567
  visit3(pkg, binary2.target);
44566
- binary2.headerDependencies = [...headers].map(([module2, path100]) => ({ module: module2, path: path100 }));
44568
+ binary2.headerDependencies = [...headers].map(([module2, path101]) => ({ module: module2, path: path101 }));
44567
44569
  }
44568
44570
  for (const owner of options.owners ?? []) {
44569
44571
  const found = productClosure(owner.products);
@@ -45301,8 +45303,8 @@ function withBuiltinStandinBehavior(behavior) {
45301
45303
  for (const [module2, members2] of Object.entries(BUILTIN_STANDIN_BEHAVIOR))
45302
45304
  merged[module2] = {
45303
45305
  ...Object.fromEntries(
45304
- Object.entries(members2).map(([path100, entry]) => [
45305
- path100,
45306
+ Object.entries(members2).map(([path101, entry]) => [
45307
+ path101,
45306
45308
  { ...entry, builtin: true }
45307
45309
  ])
45308
45310
  ),
@@ -49557,8 +49559,8 @@ function sourceEntryPath() {
49557
49559
  return null;
49558
49560
  }
49559
49561
  }
49560
- function isCliEntry(path100) {
49561
- const name3 = (0, import_node_path77.basename)(path100);
49562
+ function isCliEntry(path101) {
49563
+ const name3 = (0, import_node_path77.basename)(path101);
49562
49564
  return name3 === "bin.ts" || name3 === "bin.js";
49563
49565
  }
49564
49566
  function rnxSelfInvocation() {
@@ -54586,11 +54588,11 @@ function stringList(value) {
54586
54588
  function externalSpecMembers(root, requested) {
54587
54589
  const children = (spec) => Array.isArray(spec.subspecs) ? spec.subspecs.filter(object5) : [];
54588
54590
  const chains = /* @__PURE__ */ new Map();
54589
- const select = (path100) => {
54590
- const key2 = path100.join("/");
54591
+ const select = (path101) => {
54592
+ const key2 = path101.join("/");
54591
54593
  if (chains.has(key2)) return;
54592
54594
  const chain = [root];
54593
- for (const part of path100) {
54595
+ for (const part of path101) {
54594
54596
  const child = children(chain.at(-1)).find((sub) => sub.name === part);
54595
54597
  if (!child) throw new Error(`${String(root.name)} has no subspec ${key2}`);
54596
54598
  chain.push(child);
@@ -54599,7 +54601,7 @@ function externalSpecMembers(root, requested) {
54599
54601
  const spec = chain.at(-1);
54600
54602
  const defaults = stringList(spec.default_subspecs ?? spec.default_subspec);
54601
54603
  const activated = defaults[0] === "none" ? [] : defaults.length > 0 ? defaults : children(spec).map((sub) => String(sub.name));
54602
- for (const name3 of activated) select([...path100, ...name3.split("/")]);
54604
+ for (const name3 of activated) select([...path101, ...name3.split("/")]);
54603
54605
  for (const member of chain)
54604
54606
  for (const dependencies of [member.dependencies, iosOf(member)?.dependencies])
54605
54607
  for (const dependency of object5(dependencies) ? Object.keys(dependencies) : []) {
@@ -57230,9 +57232,9 @@ async function packageTreeDigest(root) {
57230
57232
  (a, b) => a.name.localeCompare(b.name)
57231
57233
  )) {
57232
57234
  if (entry.name === "node_modules") continue;
57233
- const path100 = `${relative4}${entry.name}`;
57234
- if (entry.isDirectory()) walk3((0, import_node_path86.join)(directory2, entry.name), `${path100}/`);
57235
- else if (entry.isFile()) files2.push(path100);
57235
+ const path101 = `${relative4}${entry.name}`;
57236
+ if (entry.isDirectory()) walk3((0, import_node_path86.join)(directory2, entry.name), `${path101}/`);
57237
+ else if (entry.isFile()) files2.push(path101);
57236
57238
  }
57237
57239
  };
57238
57240
  walk3(root, "");
@@ -57387,7 +57389,7 @@ var init_nitro_superset = __esm({
57387
57389
  init_nitroContract();
57388
57390
  init_swift_standin_digest();
57389
57391
  NITRO_SUPERSET_ENTRY_NAME = "superset";
57390
- NITRO_COMPILER_DIGEST = true ? "6239f3161a4d56f76065516a1d66ca7db3b31a6a5a178b7f0cb3d3af2bf652a3" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
57392
+ NITRO_COMPILER_DIGEST = true ? "279b234bcb016af66f6c96d6750b196b96467a2ed007f51f8b6a8b3008a126b0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
57391
57393
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
57392
57394
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
57393
57395
  published = /* @__PURE__ */ new Map();
@@ -58604,7 +58606,7 @@ var init_expo_native_compiler_digest = __esm({
58604
58606
 
58605
58607
  // src/expo-native-prebuilt.ts
58606
58608
  function expoNativeCompilerDigestValue() {
58607
- return true ? "d84857c586b98c373371326068df1e324bfb49a8eea6414ab3bf8ff70720b358" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
58609
+ return true ? "0c7b8eb4e71003ca5db9ff4cdc14faf78c00f0730c4244aa0557c4ca343acf58" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
58608
58610
  }
58609
58611
  function readSources(value) {
58610
58612
  const sources = isRecord(value) ? value.sources : null;
@@ -65572,13 +65574,13 @@ var init_replacementModule = __esm({
65572
65574
 
65573
65575
  // src/host/replacement-module-handler.ts
65574
65576
  function resolveReplacementModuleFile(fromFile, specifier) {
65575
- const base = import_node_path109.default.resolve(import_node_path109.default.dirname(fromFile), specifier);
65577
+ const base = import_node_path110.default.resolve(import_node_path110.default.dirname(fromFile), specifier);
65576
65578
  const candidates = [
65577
65579
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
65578
- (ext) => ext === import_node_path109.default.extname(base).toLowerCase()
65580
+ (ext) => ext === import_node_path110.default.extname(base).toLowerCase()
65579
65581
  ) ? [base] : [],
65580
65582
  ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => base + ext),
65581
- ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path109.default.join(base, `index${ext}`))
65583
+ ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path110.default.join(base, `index${ext}`))
65582
65584
  ];
65583
65585
  const found = candidates.find(
65584
65586
  (candidate) => (0, import_node_fs110.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
@@ -65590,12 +65592,12 @@ function resolveReplacementModuleFile(fromFile, specifier) {
65590
65592
  }
65591
65593
  return found;
65592
65594
  }
65593
- var import_node_fs110, import_node_path109;
65595
+ var import_node_fs110, import_node_path110;
65594
65596
  var init_replacement_module_handler = __esm({
65595
65597
  "src/host/replacement-module-handler.ts"() {
65596
65598
  "use strict";
65597
65599
  import_node_fs110 = require("node:fs");
65598
- import_node_path109 = __toESM(require("node:path"), 1);
65600
+ import_node_path110 = __toESM(require("node:path"), 1);
65599
65601
  init_replacementModule();
65600
65602
  init_backend_origin();
65601
65603
  }
@@ -65656,7 +65658,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
65656
65658
  if (!entries || typeof entries !== "object") continue;
65657
65659
  for (const resolution of Object.values(entries)) {
65658
65660
  if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
65659
- resolution.file = visit3(import_node_path110.default.resolve(resolution.file));
65661
+ resolution.file = visit3(import_node_path111.default.resolve(resolution.file));
65660
65662
  }
65661
65663
  }
65662
65664
  }
@@ -65680,12 +65682,12 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
65680
65682
  const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
65681
65683
  return prefix + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
65682
65684
  }
65683
- var import_node_fs111, import_node_path110, import_sucrase3, import_terser, PREFIX_START, PREFIX_END;
65685
+ var import_node_fs111, import_node_path111, import_sucrase3, import_terser, PREFIX_START, PREFIX_END;
65684
65686
  var init_configured_bundle_producer = __esm({
65685
65687
  "src/configured-bundle-producer.ts"() {
65686
65688
  "use strict";
65687
65689
  import_node_fs111 = __toESM(require("node:fs"), 1);
65688
- import_node_path110 = __toESM(require("node:path"), 1);
65690
+ import_node_path111 = __toESM(require("node:path"), 1);
65689
65691
  init_bundle_global_footer();
65690
65692
  import_sucrase3 = require("sucrase");
65691
65693
  import_terser = require("terser");
@@ -65710,7 +65712,7 @@ __export(bundle_channel_exports, {
65710
65712
  module.exports = __toCommonJS(bundle_channel_exports);
65711
65713
  var import_node_crypto58 = require("node:crypto");
65712
65714
  var import_node_fs112 = require("node:fs");
65713
- var import_node_path111 = require("node:path");
65715
+ var import_node_path112 = require("node:path");
65714
65716
  var import_node_vm = require("node:vm");
65715
65717
  var import_node_zlib4 = require("node:zlib");
65716
65718
  init_backend_origin();
@@ -65818,8 +65820,8 @@ function getDefaultPortForProtocol(protocol) {
65818
65820
  return protocol === "https:" ? 443 : 80;
65819
65821
  }
65820
65822
  function isBaseServerUrl(url) {
65821
- const path100 = url.pathname || "/";
65822
- return (path100 === "/" || path100 === "") && !url.search && !url.hash;
65823
+ const path101 = url.pathname || "/";
65824
+ return (path101 === "/" || path101 === "") && !url.search && !url.hash;
65823
65825
  }
65824
65826
  async function resolvePortViaServerScan(port) {
65825
65827
  try {
@@ -66056,7 +66058,7 @@ var import_node_path5 = require("node:path");
66056
66058
  init_src();
66057
66059
 
66058
66060
  // runtime-companion.json
66059
- var runtime_companion_default = { abi: 1, sha256: "57b07bccdba28c1c59c27ea3e84683c1b3ffed983ede473771ab16d1c5068e8c", file: "node/cli-57b07bccdba28c1c59c27ea3e84683c1b3ffed983ede473771ab16d1c5068e8c.cjs" };
66061
+ var runtime_companion_default = { abi: 1, sha256: "9ea841897a63090ddbce1dbf9be3b55664d3630f612f68e9f3035948dc019b3b", file: "node/cli-9ea841897a63090ddbce1dbf9be3b55664d3630f612f68e9f3035948dc019b3b.cjs" };
66060
66062
 
66061
66063
  // src/cli-runtime.ts
66062
66064
  init_answeredNativePackages();
@@ -69423,8 +69425,12 @@ init_node_http_fetch();
69423
69425
  init_process_group();
69424
69426
 
69425
69427
  // cli/app-catalog.ts
69428
+ var import_node_child_process53 = require("node:child_process");
69426
69429
  var import_node_fs109 = __toESM(require("node:fs"), 1);
69427
- var import_node_path108 = __toESM(require("node:path"), 1);
69430
+ var import_node_module19 = require("node:module");
69431
+ var import_node_path109 = __toESM(require("node:path"), 1);
69432
+ var import_node_url8 = require("node:url");
69433
+ var import_node_util23 = require("node:util");
69428
69434
  init_bundleAssets();
69429
69435
  init_expo_native_workspace();
69430
69436
 
@@ -69553,7 +69559,31 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
69553
69559
  }
69554
69560
 
69555
69561
  // src/one-native-app-catalog.ts
69562
+ var import_node_path108 = __toESM(require("node:path"), 1);
69556
69563
  init_is_record();
69564
+ var ONE_NATIVE_APP_CATALOG_ROUTE = "/__peach/native-app-catalog";
69565
+ var HEX_COLOR = /^#[\da-f]{6}$/i;
69566
+ function parseAccent(value) {
69567
+ if (!isRecord(value) || typeof value.light !== "string") return null;
69568
+ if (!HEX_COLOR.test(value.light)) return null;
69569
+ const dark = typeof value.dark === "string" && HEX_COLOR.test(value.dark) ? value.dark : value.light;
69570
+ return { light: value.light, dark };
69571
+ }
69572
+ function parseOneNativeAppCatalog(value) {
69573
+ if (!isRecord(value)) return null;
69574
+ const accentColor = parseAccent(value.accentColor);
69575
+ const assetCatalog = typeof value.assetCatalog === "string" && import_node_path108.default.isAbsolute(value.assetCatalog) ? value.assetCatalog : null;
69576
+ return accentColor || assetCatalog ? { accentColor, assetCatalog } : null;
69577
+ }
69578
+ function readOneNativeAppCatalog(entryConfig, root) {
69579
+ const app = isRecord(entryConfig) ? entryConfig.app : void 0;
69580
+ const ios = isRecord(app) ? app.ios : void 0;
69581
+ if (!isRecord(ios)) return null;
69582
+ return parseOneNativeAppCatalog({
69583
+ accentColor: ios.accentColor,
69584
+ assetCatalog: typeof ios.assetCatalog === "string" ? import_node_path108.default.resolve(root, ios.assetCatalog) : null
69585
+ });
69586
+ }
69557
69587
 
69558
69588
  // cli/app-catalog.ts
69559
69589
  init_app_project();
@@ -69575,7 +69605,7 @@ function readText(file) {
69575
69605
  }
69576
69606
  function catalogFiles(dir, found) {
69577
69607
  for (const entry of listDir2(dir)) {
69578
- const full = import_node_path108.default.join(dir, entry.name);
69608
+ const full = import_node_path109.default.join(dir, entry.name);
69579
69609
  if (entry.isDirectory()) catalogFiles(full, found);
69580
69610
  else if (entry.name === "Contents.json") found.push(full);
69581
69611
  }
@@ -69601,33 +69631,33 @@ function readAssetCatalog(files2, readContents2, imageUri, accentName) {
69601
69631
  return { colors, images, symbols, accentName };
69602
69632
  }
69603
69633
  async function discoverAppCatalog(appDir, assetOrigin) {
69604
- if (!import_node_fs109.default.existsSync(import_node_path108.default.join(appDir, "ios")) && findExpoAppConfig(appDir)) {
69605
- const packageJson = readText(import_node_path108.default.join(appDir, "package.json"));
69634
+ if (!import_node_fs109.default.existsSync(import_node_path109.default.join(appDir, "ios")) && findExpoAppConfig(appDir)) {
69635
+ const packageJson = readText(import_node_path109.default.join(appDir, "package.json"));
69606
69636
  if (packageJson) {
69607
69637
  const manifest = JSON.parse(packageJson);
69608
69638
  if (declaresNativeDependency(manifest, "expo") || declaresNativeDependency(manifest, "one"))
69609
69639
  appDir = (await prepareExpoNativeProject(appDir)).app;
69610
69640
  }
69611
69641
  }
69612
- const iosDir = import_node_path108.default.join(appDir, "ios");
69642
+ const iosDir = import_node_path109.default.join(appDir, "ios");
69613
69643
  const target = listDir2(iosDir).find(
69614
- (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(import_node_path108.default.join(iosDir, entry.name)).some(
69644
+ (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(import_node_path109.default.join(iosDir, entry.name)).some(
69615
69645
  (file) => /^AppDelegate\.(swift|mm|m)$/.test(file.name)
69616
69646
  )
69617
69647
  );
69618
69648
  if (!target) return null;
69619
- const targetDir = import_node_path108.default.join(iosDir, target.name);
69649
+ const targetDir = import_node_path109.default.join(iosDir, target.name);
69620
69650
  const files2 = [];
69621
69651
  for (const entry of listDir2(targetDir)) {
69622
69652
  if (entry.isDirectory() && entry.name.endsWith(".xcassets"))
69623
- catalogFiles(import_node_path108.default.join(targetDir, entry.name), files2);
69653
+ catalogFiles(import_node_path109.default.join(targetDir, entry.name), files2);
69624
69654
  }
69625
69655
  const relative4 = files2.map(
69626
- (file) => import_node_path108.default.relative(targetDir, file).split(import_node_path108.default.sep).join(import_node_path108.default.posix.sep)
69656
+ (file) => import_node_path109.default.relative(targetDir, file).split(import_node_path109.default.sep).join(import_node_path109.default.posix.sep)
69627
69657
  );
69628
- const readContents2 = (candidate) => readText(import_node_path108.default.join(targetDir, candidate));
69658
+ const readContents2 = (candidate) => readText(import_node_path109.default.join(targetDir, candidate));
69629
69659
  const pbxproj = listDir2(iosDir).find((entry) => entry.name.endsWith(".xcodeproj"));
69630
- const accentName = readText(import_node_path108.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path108.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
69660
+ const accentName = readText(import_node_path109.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path109.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
69631
69661
  ACCENT_BUILD_SETTING
69632
69662
  )?.[1] : void 0) ?? null;
69633
69663
  return readAssetCatalog(
@@ -69640,11 +69670,63 @@ async function discoverAppCatalog(appDir, assetOrigin) {
69640
69670
  );
69641
69671
  return null;
69642
69672
  }
69643
- return stageHostFile(import_node_path108.default.join(targetDir, file), assetOrigin);
69673
+ return stageHostFile(import_node_path109.default.join(targetDir, file), assetOrigin);
69644
69674
  },
69645
69675
  accentName
69646
69676
  );
69647
69677
  }
69678
+ function oneDeclaredAppCatalog(declared, assetOrigin) {
69679
+ const { accentColor, assetCatalog } = declared;
69680
+ const accentName = accentColor ? "AccentColor" : null;
69681
+ const files2 = [];
69682
+ if (assetCatalog) catalogFiles(assetCatalog, files2);
69683
+ const catalog = readAssetCatalog(
69684
+ files2,
69685
+ readText,
69686
+ (file) => stageHostFile(file, assetOrigin),
69687
+ accentName
69688
+ );
69689
+ if (catalog && accentColor) catalog.colors.AccentColor = accentColor;
69690
+ return catalog;
69691
+ }
69692
+ async function discoverOneNativeAppCatalog(metroOrigin, assetOrigin) {
69693
+ const response = await fetch(`${metroOrigin}${ONE_NATIVE_APP_CATALOG_ROUTE}`, {
69694
+ signal: AbortSignal.timeout(1500)
69695
+ }).catch(() => null);
69696
+ if (!response?.ok || !(response.headers.get("content-type") ?? "").toLowerCase().includes("json"))
69697
+ return null;
69698
+ const declared = parseOneNativeAppCatalog(await response.json().catch(() => null));
69699
+ return declared ? oneDeclaredAppCatalog(declared, assetOrigin) : null;
69700
+ }
69701
+ async function readProjectOneNativeAppCatalog(projectRoot, env, runtimeExecutable) {
69702
+ let onePackage;
69703
+ try {
69704
+ onePackage = (0, import_node_module19.createRequire)(import_node_path109.default.join(projectRoot, "package.json")).resolve(
69705
+ "one/package.json"
69706
+ );
69707
+ } catch {
69708
+ return null;
69709
+ }
69710
+ const loader = (0, import_node_url8.pathToFileURL)(
69711
+ import_node_path109.default.join(import_node_path109.default.dirname(onePackage), "dist/esm/vite/loadConfig.mjs")
69712
+ ).href;
69713
+ const { stdout } = await (0, import_node_util23.promisify)(import_node_child_process53.execFile)(
69714
+ runtimeExecutable,
69715
+ [
69716
+ "--input-type=module",
69717
+ "-e",
69718
+ `const { loadUserOneOptions } = await import(process.argv[1])
69719
+ const { oneOptions } = await loadUserOneOptions('build', true)
69720
+ const app = typeof oneOptions?.native === 'object' ? oneOptions.native.app : undefined
69721
+ process.stdout.write('\\n' + JSON.stringify({ app }) + '\\n')
69722
+ process.exit(0)`,
69723
+ loader
69724
+ ],
69725
+ { cwd: projectRoot, env, maxBuffer: 64 * 1024 * 1024 }
69726
+ );
69727
+ const json = stdout.split("\n").findLast((line) => line.startsWith('{"app"'));
69728
+ return readOneNativeAppCatalog(json ? JSON.parse(json) : null, projectRoot);
69729
+ }
69648
69730
 
69649
69731
  // src/bundle-channel.mjs
69650
69732
  var digest3 = (bytes) => (0, import_node_crypto58.createHash)("sha256").update(bytes).digest("hex");
@@ -69754,10 +69836,10 @@ async function prepareChannel({
69754
69836
  }
69755
69837
  }
69756
69838
  const identity2 = (0, import_node_crypto58.createHash)("sha256").update(bundle).update(icon);
69757
- for (const [path100, bytes] of [...files2].sort(
69839
+ for (const [path101, bytes] of [...files2].sort(
69758
69840
  ([a], [b]) => a < b ? -1 : a > b ? 1 : 0
69759
69841
  )) {
69760
- identity2.update(JSON.stringify([path100, digest3(bytes)]));
69842
+ identity2.update(JSON.stringify([path101, digest3(bytes)]));
69761
69843
  }
69762
69844
  if (native) identity2.update(JSON.stringify(native.metadata));
69763
69845
  if (oneSDK) identity2.update(JSON.stringify(oneSDK.metadata));
@@ -69767,7 +69849,7 @@ async function prepareChannel({
69767
69849
  const releaseKey = `${prefix}/peach/releases/${identity2.digest("hex")}`;
69768
69850
  const assetBaseUrl = `${origin.origin}/${releaseKey}/`;
69769
69851
  const directories = new Set(
69770
- [...files2.keys()].map((path100) => path100.slice(0, path100.lastIndexOf("/")))
69852
+ [...files2.keys()].map((path101) => path101.slice(0, path101.lastIndexOf("/")))
69771
69853
  );
69772
69854
  let locations = 0;
69773
69855
  const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } = getCliRuntime().rolldown_bundle_inventory;
@@ -69781,12 +69863,12 @@ async function prepareChannel({
69781
69863
  /("?httpServerLocation"?\s*:\s*)(?:"((?:[^"\\]|\\.)*)"|`([^`\\$]*)`)/g,
69782
69864
  (match, property, quoted2, template) => {
69783
69865
  const location = quoted2 === void 0 ? template : JSON.parse(`"${quoted2}"`);
69784
- const path100 = packagedAssetDirectory(location);
69785
- if (!directories.has(path100)) {
69866
+ const path101 = packagedAssetDirectory(location);
69867
+ if (!directories.has(path101)) {
69786
69868
  throw new Error(`bundle asset location has no packaged files: ${location}`);
69787
69869
  }
69788
69870
  locations++;
69789
- return `${property}${JSON.stringify(new URL(path100, assetBaseUrl).href)}`;
69871
+ return `${property}${JSON.stringify(new URL(path101, assetBaseUrl).href)}`;
69790
69872
  }
69791
69873
  );
69792
69874
  if (assets2.some((asset) => !asset.path.startsWith("assets/native-catalog/")) && !locations)
@@ -69794,7 +69876,7 @@ async function prepareChannel({
69794
69876
  const attached = insertNativeBundleFooters(
69795
69877
  source,
69796
69878
  { oneSDK, expoSwift, expoKotlin, nitro, turbo },
69797
- (path100) => new URL(path100, assetBaseUrl).href
69879
+ (path101) => new URL(path101, assetBaseUrl).href
69798
69880
  );
69799
69881
  source = attached.source;
69800
69882
  if (appCatalog) {
@@ -69832,10 +69914,10 @@ async function prepareChannel({
69832
69914
  contentType: "application/javascript"
69833
69915
  },
69834
69916
  { key: `${releaseKey}/icon.png`, bytes: icon, contentType: "image/png" },
69835
- ...[...files2].map(([path100, bytes]) => ({
69836
- key: `${releaseKey}/${path100}`,
69917
+ ...[...files2].map(([path101, bytes]) => ({
69918
+ key: `${releaseKey}/${path101}`,
69837
69919
  bytes,
69838
- contentType: nativeAssets.get(path100)?.contentType ?? {
69920
+ contentType: nativeAssets.get(path101)?.contentType ?? {
69839
69921
  png: "image/png",
69840
69922
  jpg: "image/jpeg",
69841
69923
  jpeg: "image/jpeg",
@@ -69844,13 +69926,13 @@ async function prepareChannel({
69844
69926
  ttf: "font/ttf",
69845
69927
  otf: "font/otf",
69846
69928
  wav: "audio/wav"
69847
- }[path100.split(".").pop()] ?? "application/octet-stream"
69929
+ }[path101.split(".").pop()] ?? "application/octet-stream"
69848
69930
  }))
69849
69931
  ];
69850
69932
  return { platform: platform2, key: `${prefix}/${channelKey(platform2)}`, metadata, objects };
69851
69933
  }
69852
69934
  function brotliCompressCached(bytes) {
69853
- const file = (0, import_node_path111.join)(cacheDir(), "bundle-channel-brotli", `${digest3(bytes)}-q11-w24.br`);
69935
+ const file = (0, import_node_path112.join)(cacheDir(), "bundle-channel-brotli", `${digest3(bytes)}-q11-w24.br`);
69854
69936
  if ((0, import_node_fs112.existsSync)(file)) return (0, import_node_fs112.readFileSync)(file);
69855
69937
  const compressed = (0, import_node_zlib4.brotliCompressSync)(bytes, {
69856
69938
  params: {
@@ -69858,7 +69940,7 @@ function brotliCompressCached(bytes) {
69858
69940
  [import_node_zlib4.constants.BROTLI_PARAM_LGWIN]: 24
69859
69941
  }
69860
69942
  });
69861
- (0, import_node_fs112.mkdirSync)((0, import_node_path111.dirname)(file), { recursive: true });
69943
+ (0, import_node_fs112.mkdirSync)((0, import_node_path112.dirname)(file), { recursive: true });
69862
69944
  (0, import_node_fs112.writeFileSync)(`${file}.${process.pid}`, compressed);
69863
69945
  (0, import_node_fs112.renameSync)(`${file}.${process.pid}`, file);
69864
69946
  return compressed;
@@ -69903,7 +69985,7 @@ async function publishBundleChannel(release, { put, fetchObject = fetch }) {
69903
69985
  );
69904
69986
  }
69905
69987
  }
69906
- async function packagePlatformBundle(projectRoot, platform2, bundle, { config, versions, readAssetFile, configuration }) {
69988
+ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, versions, readAssetFile, configuration, devOrigin = null, oneDeclared = null }) {
69907
69989
  const { produceConfiguredBundle: produceConfiguredBundle2 } = await Promise.resolve().then(() => (init_configured_bundle_producer(), configured_bundle_producer_exports));
69908
69990
  const assets2 = /* @__PURE__ */ new Map();
69909
69991
  for (const [registration] of bundle.toString("utf8").matchAll(/(?<=registerAsset\()\{[^{}]*"__packager_asset": true[^{}]*\}/g)) {
@@ -69911,27 +69993,29 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
69911
69993
  const directory2 = packagedAssetDirectory(asset.httpServerLocation);
69912
69994
  if (asset.files) {
69913
69995
  for (const file of asset.files) {
69914
- const path100 = `${directory2}/${(0, import_node_path111.basename)(file)}`;
69915
- if (!assets2.has(path100)) assets2.set(path100, (0, import_node_fs112.readFileSync)(file));
69996
+ const path101 = `${directory2}/${(0, import_node_path112.basename)(file)}`;
69997
+ if (!assets2.has(path101)) assets2.set(path101, (0, import_node_fs112.readFileSync)(file));
69916
69998
  }
69917
69999
  continue;
69918
70000
  }
69919
70001
  for (const scale of asset.scales) {
69920
70002
  const file = `${asset.name}${scale === 1 ? "" : `@${scale}x`}.${asset.type}`;
69921
- const path100 = `${directory2}/${file}`;
69922
- if (!assets2.has(path100)) assets2.set(path100, await readAssetFile(asset, file));
70003
+ const path101 = `${directory2}/${file}`;
70004
+ if (!assets2.has(path101)) assets2.set(path101, await readAssetFile(asset, file));
69923
70005
  }
69924
70006
  }
69925
70007
  let appCatalog = null;
69926
70008
  if (platform2 === "ios") {
69927
- const captured = await captureStagedHostFiles(() => discoverAppCatalog(projectRoot, "https://packaged.invalid"));
70009
+ const captured = await captureStagedHostFiles(
70010
+ async () => await discoverAppCatalog(projectRoot, "https://packaged.invalid") ?? (devOrigin ? await discoverOneNativeAppCatalog(devOrigin, "https://packaged.invalid") : null) ?? (oneDeclared ? oneDeclaredAppCatalog(oneDeclared, "https://packaged.invalid") : null)
70011
+ );
69928
70012
  if (captured.value) {
69929
70013
  appCatalog = {
69930
70014
  ...captured.value,
69931
70015
  images: Object.fromEntries(Object.entries(captured.value.images).map(([name3, variants]) => [
69932
70016
  name3,
69933
70017
  variants.map((image) => {
69934
- const file = (0, import_node_path111.basename)(new URL(image.uri).pathname);
70018
+ const file = (0, import_node_path112.basename)(new URL(image.uri).pathname);
69935
70019
  const staged = captured.files.get(file);
69936
70020
  if (!staged) throw new Error("app catalog image was not staged");
69937
70021
  const resource = `assets/native-catalog/${file}`;
@@ -69956,7 +70040,7 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
69956
70040
  versions
69957
70041
  )
69958
70042
  ),
69959
- assets: [...assets2].map(([path100, bytes]) => ({ path: path100, bytes })),
70043
+ assets: [...assets2].map(([path101, bytes]) => ({ path: path101, bytes })),
69960
70044
  ...await buildNativeBundles(projectRoot, platform2, configuration)
69961
70045
  };
69962
70046
  }
@@ -70015,6 +70099,7 @@ ${await response.text()}`
70015
70099
  await packagePlatformBundle(projectRoot, platform2, bundle, {
70016
70100
  ...inputs,
70017
70101
  configuration: "Debug",
70102
+ devOrigin: origin,
70018
70103
  readAssetFile: async (asset, file) => {
70019
70104
  const response = await fetch(
70020
70105
  `${origin}${asset.httpServerLocation}/${file}?platform=${platform2}&hash=${asset.hash}`
@@ -70029,19 +70114,24 @@ ${await response.text()}`
70029
70114
  return { platforms: snapshots };
70030
70115
  }
70031
70116
  async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
70032
- const { execFile: execFile22 } = await import("node:child_process");
70117
+ const { execFile: execFile23 } = await import("node:child_process");
70033
70118
  const { mkdtemp, readFile: readFile3, rm: rm2 } = await import("node:fs/promises");
70034
70119
  const { tmpdir: tmpdir3 } = await import("node:os");
70035
- const { promisify: promisify21 } = await import("node:util");
70120
+ const { promisify: promisify22 } = await import("node:util");
70036
70121
  const inputs = await readPackagingInputs(projectRoot);
70122
+ const oneDeclared = platforms2.includes("ios") ? await readProjectOneNativeAppCatalog(
70123
+ projectRoot,
70124
+ { ...process.env, ...env, NODE_ENV: "production" },
70125
+ runtimeExecutable
70126
+ ) : null;
70037
70127
  const snapshots = [];
70038
70128
  for (const platform2 of platforms2) {
70039
- const out = await mkdtemp((0, import_node_path111.join)(tmpdir3(), "peach-production-bundle-"));
70129
+ const out = await mkdtemp((0, import_node_path112.join)(tmpdir3(), "peach-production-bundle-"));
70040
70130
  try {
70041
- await promisify21(execFile22)(
70131
+ await promisify22(execFile23)(
70042
70132
  runtimeExecutable,
70043
70133
  [
70044
- (0, import_node_path111.join)(projectRoot, "node_modules/.bin/react-native"),
70134
+ (0, import_node_path112.join)(projectRoot, "node_modules/.bin/react-native"),
70045
70135
  "bundle",
70046
70136
  "--platform",
70047
70137
  platform2,
@@ -70052,19 +70142,20 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
70052
70142
  "--entry-file",
70053
70143
  entryFile,
70054
70144
  "--bundle-output",
70055
- (0, import_node_path111.join)(out, "bundle.js"),
70145
+ (0, import_node_path112.join)(out, "bundle.js"),
70056
70146
  "--assets-dest",
70057
- (0, import_node_path111.join)(out, "assets"),
70147
+ (0, import_node_path112.join)(out, "assets"),
70058
70148
  "--sourcemap-output",
70059
- (0, import_node_path111.join)(out, "bundle.js.map")
70149
+ (0, import_node_path112.join)(out, "bundle.js.map")
70060
70150
  ],
70061
70151
  { cwd: projectRoot, env: { ...process.env, ...env, NODE_ENV: "production" } }
70062
70152
  );
70063
70153
  snapshots.push(
70064
- await packagePlatformBundle(projectRoot, platform2, await readFile3((0, import_node_path111.join)(out, "bundle.js")), {
70154
+ await packagePlatformBundle(projectRoot, platform2, await readFile3((0, import_node_path112.join)(out, "bundle.js")), {
70065
70155
  ...inputs,
70156
+ oneDeclared,
70066
70157
  configuration: "Release",
70067
- readAssetFile: (asset, file) => readFile3((0, import_node_path111.join)(out, asset.httpServerLocation, file))
70158
+ readAssetFile: (asset, file) => readFile3((0, import_node_path112.join)(out, asset.httpServerLocation, file))
70068
70159
  })
70069
70160
  );
70070
70161
  } finally {
@@ -70076,12 +70167,12 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
70076
70167
  async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
70077
70168
  const { spawn: spawn9 } = await import("node:child_process");
70078
70169
  const { createServer } = await import("node:net");
70079
- const { createRequire: createRequire19 } = await import("node:module");
70080
- const onePackage = createRequire19((0, import_node_path111.join)(projectRoot, "package.json")).resolve(
70170
+ const { createRequire: createRequire20 } = await import("node:module");
70171
+ const onePackage = createRequire20((0, import_node_path112.join)(projectRoot, "package.json")).resolve(
70081
70172
  "one/package.json"
70082
70173
  );
70083
- const oneBin = (0, import_node_path111.join)(
70084
- (0, import_node_path111.dirname)(onePackage),
70174
+ const oneBin = (0, import_node_path112.join)(
70175
+ (0, import_node_path112.dirname)(onePackage),
70085
70176
  JSON.parse((0, import_node_fs112.readFileSync)(onePackage, "utf8")).bin.one
70086
70177
  );
70087
70178
  const port = await new Promise((resolve4, reject) => {