peachsim 0.1.2438 → 0.1.2440

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 (183) hide show
  1. package/README.md +30 -98
  2. package/cli/app-catalog.ts +4 -73
  3. package/cli/catalog/content.ts +1 -1
  4. package/cli/cloud-box-artifact.ts +26 -39
  5. package/cli/cloud-client.ts +69 -117
  6. package/cli/cloud-session.ts +2 -9
  7. package/cli/commands/box.ts +6 -6
  8. package/cli/commands/control.ts +4 -11
  9. package/cli/commands/flow.ts +5 -9
  10. package/cli/commands/kotlin.ts +2 -1
  11. package/cli/commands/platform.ts +21 -39
  12. package/cli/commands/record-three.ts +1 -1
  13. package/cli/commands/shell-url.ts +29 -23
  14. package/cli/dev-build-freshness.ts +4 -3
  15. package/cli/native-input.ts +2 -2
  16. package/cli/outbound-endpoints.ts +20 -45
  17. package/cli/remote-project-bundle.ts +8 -14
  18. package/cli/remote-simulators.ts +1 -1
  19. package/cli/send-to-box.ts +2 -1
  20. package/detox/jest-preset.cjs +1 -1
  21. package/detox/jest-transform.cjs +40 -2
  22. package/dist-lib/agent-daemon-client.cjs +34 -24
  23. package/dist-lib/agent-events.cjs +1 -1
  24. package/dist-lib/attached-projects.cjs +19 -17
  25. package/dist-lib/auth/shared-session.cjs +18 -16
  26. package/dist-lib/backend-origin.cjs +1 -1
  27. package/dist-lib/beta.cjs +1 -1
  28. package/dist-lib/beta.mjs +2 -1
  29. package/dist-lib/bridge-constants.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.cjs +1 -1
  31. package/dist-lib/bridge-contract-input.mjs +20 -583
  32. package/dist-lib/bridge-contract.cjs +1 -1
  33. package/dist-lib/bridge-contract.mjs +17 -99
  34. package/dist-lib/bundle-channel.cjs +8743 -5562
  35. package/dist-lib/capture-contract.cjs +1 -1
  36. package/dist-lib/capture-contract.mjs +13 -363
  37. package/dist-lib/cloud-contract.cjs +1 -1
  38. package/dist-lib/cloud-contract.mjs +34 -155
  39. package/dist-lib/cloud-test-args.cjs +1 -1
  40. package/dist-lib/cloud-test-args.mjs +2 -1
  41. package/dist-lib/cloud.cjs +1 -1
  42. package/dist-lib/cloud.mjs +26 -155
  43. package/dist-lib/config.cjs +1 -4
  44. package/dist-lib/config.mjs +11 -30
  45. package/dist-lib/detox/index.cjs +2554 -230
  46. package/dist-lib/detox/jest-preset.cjs +1 -1
  47. package/dist-lib/detox/jest-transform.cjs +40 -2
  48. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  49. package/dist-lib/esm-chunks/acorn-B27MTHKJ.mjs +50 -0
  50. package/dist-lib/esm-chunks/chunk-4U7IGWPB.mjs +42 -0
  51. package/dist-lib/esm-chunks/chunk-5CZQZKYU.mjs +10 -0
  52. package/dist-lib/esm-chunks/chunk-6HFWZJ6C.mjs +115 -0
  53. package/dist-lib/esm-chunks/chunk-6JGALQD5.mjs +12 -0
  54. package/dist-lib/esm-chunks/chunk-ADE23YGG.mjs +30 -0
  55. package/dist-lib/esm-chunks/chunk-D4Z36DQQ.mjs +186 -0
  56. package/dist-lib/esm-chunks/chunk-EATI62W3.mjs +188 -0
  57. package/dist-lib/esm-chunks/chunk-H6QIEJRC.mjs +10992 -0
  58. package/dist-lib/esm-chunks/chunk-HIK3VREC.mjs +1353 -0
  59. package/dist-lib/esm-chunks/chunk-HP7DHONL.mjs +598 -0
  60. package/dist-lib/esm-chunks/chunk-PRZI3CFF.mjs +5719 -0
  61. package/dist-lib/esm-chunks/chunk-QECVPSP3.mjs +10 -0
  62. package/dist-lib/esm-chunks/chunk-R5FNLCBO.mjs +17 -0
  63. package/dist-lib/esm-chunks/chunk-RVMUQQWC.mjs +664 -0
  64. package/dist-lib/esm-chunks/chunk-SJFNKW3W.mjs +57 -0
  65. package/dist-lib/esm-chunks/chunk-WQISIGIX.mjs +10 -0
  66. package/dist-lib/esm-chunks/chunk-X6UKJ5AX.mjs +375 -0
  67. package/dist-lib/esm-chunks/chunk-ZXNBC3PZ.mjs +18959 -0
  68. package/dist-lib/esm-chunks/metro-layout-parser-ZOI5PO4E.mjs +58 -0
  69. package/dist-lib/expo-swift-bundle.cjs +7881 -4717
  70. package/dist-lib/expo-swift-metadata.cjs +1 -1
  71. package/dist-lib/expo-swift-metadata.mjs +16 -165
  72. package/dist-lib/home-paths.cjs +1 -1
  73. package/dist-lib/host/bridge-host.cjs +15685 -11414
  74. package/dist-lib/host/fetch-proxy-handler.cjs +3928 -343
  75. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  76. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -1
  77. package/dist-lib/host/replacement-module-handler.cjs +4 -4
  78. package/dist-lib/host/websocket-proxy.cjs +1 -1
  79. package/dist-lib/index.cjs +9145 -32150
  80. package/dist-lib/jump-to-source-babel.cjs +1 -1
  81. package/dist-lib/jump-to-source-native.cjs +2 -2
  82. package/dist-lib/kotlin-host.cjs +260 -253
  83. package/dist-lib/menu.cjs +1 -1
  84. package/dist-lib/menu.mjs +5 -13
  85. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  86. package/dist-lib/metro-fingerprint-registry.mjs +5 -6
  87. package/dist-lib/metro-production-bundle.cjs +22 -3
  88. package/dist-lib/metro-production-bundle.mjs +26 -92
  89. package/dist-lib/native-app-identity-project.cjs +664 -452
  90. package/dist-lib/native-app-identity-project.mjs +509 -2318
  91. package/dist-lib/native-app-identity.cjs +1 -1
  92. package/dist-lib/native-app-identity.mjs +27 -1340
  93. package/dist-lib/native-firebase-metadata.cjs +1 -1
  94. package/dist-lib/native-firebase-metadata.mjs +5 -18
  95. package/dist-lib/pdfium-raster.cjs +1 -1
  96. package/dist-lib/pdfium-raster.mjs +2 -1
  97. package/dist-lib/plist.cjs +2 -2
  98. package/dist-lib/plist.mjs +5 -7
  99. package/dist-lib/profiles.cjs +2 -1
  100. package/dist-lib/public-brand.cjs +1 -1
  101. package/dist-lib/public-origins-lib-esm.json +246 -187
  102. package/dist-lib/public-origins-lib-static.json +1 -1
  103. package/dist-lib/public-origins-lib.json +1059 -1238
  104. package/dist-lib/react-native-host-modules.cjs +1 -1
  105. package/dist-lib/react-native-host-modules.mjs +2 -1
  106. package/dist-lib/reap-browser.cjs +18 -7
  107. package/dist-lib/scripts/dev-server-scanner.cjs +6 -230
  108. package/dist-lib/sdk.cjs +1 -1
  109. package/dist-lib/sdk.mjs +22 -78
  110. package/dist-lib/skills.cjs +21694 -17393
  111. package/dist-lib/swift-compile.cjs +1355 -1322
  112. package/dist-lib/swift-compile.mjs +68 -19013
  113. package/dist-lib/swift-package.cjs +1 -1
  114. package/dist-lib/swift-package.mjs +35 -630
  115. package/dist-lib/swift-submit.cjs +1 -1
  116. package/dist-lib/swift-submit.mjs +9 -24
  117. package/dist-lib/swift-toolchain.cjs +1 -1
  118. package/dist-lib/swift.cjs +1 -1
  119. package/dist-lib/vendor/@peculiar/x509.cjs +18061 -0
  120. package/dist-lib/vendor/acorn.cjs +5699 -0
  121. package/dist-lib/vendor/bplist-parser.cjs +1589 -0
  122. package/dist-lib/vendor/ignore.cjs +455 -0
  123. package/dist-lib/vendor/magic-string.cjs +1693 -0
  124. package/dist-lib/vendor/plist.cjs +10978 -0
  125. package/dist-lib/vendor/smol-toml.cjs +768 -0
  126. package/dist-lib/vendor/stream-json.cjs +1997 -0
  127. package/dist-lib/vendor/sucrase/dist/index.js.cjs +23593 -0
  128. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +15750 -0
  129. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +11316 -0
  130. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +482 -0
  131. package/dist-lib/vendor/sucrase.cjs +23593 -0
  132. package/dist-lib/vendor/terser.cjs +36874 -0
  133. package/dist-lib/vendor/valibot.cjs +6253 -0
  134. package/dist-lib/vendor/zod.cjs +23262 -0
  135. package/dist-lib/worklet-executable.cjs +3 -3
  136. package/dist-lib/worklet-executable.mjs +11 -16
  137. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +4 -0
  138. package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
  139. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  140. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -0
  141. package/kotlin/fork/NOTICE +3 -0
  142. package/kotlin/sdk.tar.gz +0 -0
  143. package/kotlin/toolchain.json +6 -6
  144. package/package.json +17 -121
  145. package/runtime-companion.json +1 -1
  146. package/scripts/dev-server-scanner.ts +13 -223
  147. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDateComponentsFormatter.h +1 -1
  148. package/src/android-autolinking.ts +2 -2
  149. package/src/bundle-channel.mjs +3 -15
  150. package/src/cloud-contract.ts +3 -4
  151. package/src/config.ts +0 -5
  152. package/src/host/bridge-host.ts +21 -1
  153. package/src/host/server-scan-handler.ts +1 -9
  154. package/src/index.ts +0 -2
  155. package/src/kotlin-host.ts +1 -2
  156. package/src/kotlinDiscoveryContract.ts +1 -0
  157. package/src/metro-production-bundle.ts +28 -6
  158. package/src/native-seam-manifest.ts +0 -13
  159. package/src/native-slices.ts +1 -1
  160. package/src/one-native-app-catalog.ts +8 -27
  161. package/src/one-native-app-config.ts +95 -0
  162. package/src/one-native-source.ts +250 -0
  163. package/src/one-widget-metadata.ts +45 -126
  164. package/src/oneWidgetContract.ts +80 -117
  165. package/src/serverDiscoveryContract.ts +0 -1
  166. package/src/simulator-route.ts +8 -0
  167. package/src/swift-compile.ts +13 -7
  168. package/src/swift-host.ts +2 -0
  169. package/src/swift-package-manifest.ts +13 -8
  170. package/src/vite-plugin.ts +2 -2
  171. package/src/xcode-project.ts +1 -1
  172. package/dist-lib/metro.cjs +0 -27984
  173. package/dist-lib/vite-swift.cjs +0 -43376
  174. package/dist-lib/vite.cjs +0 -21456
  175. package/src/androidAutolinkingContract.ts +0 -48
  176. package/src/androidRootModuleContract.ts +0 -39
  177. package/src/dev-server-open.ts +0 -92
  178. package/src/metro-plugin.ts +0 -578
  179. package/src/one-widget-discovery.ts +0 -23
  180. package/src/swift-vite-lifetime.ts +0 -42
  181. package/src/vite-plugin-one.ts +0 -746
  182. package/src/vite-plugin-swift.ts +0 -225
  183. package/src/vite.d.ts +0 -10
@@ -22,7 +22,7 @@ module.exports = {
22
22
  // keep per-pixel arithmetic inside the module instead of the vm global proxy.
23
23
  sandboxInjectedGlobals: ['Math'],
24
24
  setupFilesAfterEnv: [path.join(PACKAGE_ROOT, 'detox', 'jest-setup-after-env.cjs')],
25
- transform: require('./jest-transform.cjs'),
25
+ transform: require('./jest-transform.cjs').config,
26
26
  // compiled runtime companions contain source-map text from bundled compilers.
27
27
  transformIgnorePatterns: [
28
28
  '/node_modules/',
@@ -1,4 +1,42 @@
1
1
  // native and peach conformance share module syntax, including esm helpers.
2
- module.exports = {
3
- '^.+\\.(?:[jt]sx?|mjs)$': ['@sucrase/jest-plugin', { jsxRuntime: 'automatic' }],
2
+ const { extname } = require('node:path')
3
+ const { transform } = require('peachsim/vendor/sucrase')
4
+
5
+ exports.config = {
6
+ '^.+\\.(?:[jt]sx?|mjs)$': [__filename, { jsxRuntime: 'automatic' }],
7
+ }
8
+
9
+ exports.process = (source, filename, options) => {
10
+ const transforms = options.supportsStaticESM ? [] : ['imports']
11
+ switch (extname(filename)) {
12
+ case '.js':
13
+ case '.jsx':
14
+ case '.mjs':
15
+ case '.cjs':
16
+ transforms.push('flow', 'jsx', 'jest')
17
+ break
18
+ case '.ts':
19
+ transforms.push('typescript', 'jest')
20
+ break
21
+ case '.tsx':
22
+ case '.mts':
23
+ case '.cts':
24
+ transforms.push('typescript', 'jsx', 'jest')
25
+ break
26
+ default:
27
+ return { code: source }
28
+ }
29
+ const { code, sourceMap } = transform(source, {
30
+ transforms,
31
+ disableESTransforms: true,
32
+ preserveDynamicImport: options.supportsDynamicImport,
33
+ ...options.transformerConfig,
34
+ sourceMapOptions: { compiledFilename: filename },
35
+ filePath: filename,
36
+ })
37
+ const encodedMap = Buffer.from(JSON.stringify(sourceMap)).toString('base64')
38
+ return {
39
+ code: `${code}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${encodedMap}`,
40
+ map: sourceMap,
41
+ }
4
42
  }
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2438 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2440 | (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;
@@ -0,0 +1,50 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import {
3
+ Node,
4
+ Parser,
5
+ Position,
6
+ SourceLocation,
7
+ TokContext,
8
+ Token,
9
+ TokenType,
10
+ defaultOptions,
11
+ getLineInfo,
12
+ isIdentifierChar,
13
+ isIdentifierStart,
14
+ isNewLine,
15
+ keywords,
16
+ lineBreak,
17
+ lineBreakG,
18
+ nonASCIIwhitespace,
19
+ parse,
20
+ parseExpressionAt,
21
+ tokenizer,
22
+ types,
23
+ types$1,
24
+ version
25
+ } from "./chunk-PRZI3CFF.mjs";
26
+ import "./chunk-4U7IGWPB.mjs";
27
+ export {
28
+ Node,
29
+ Parser,
30
+ Position,
31
+ SourceLocation,
32
+ TokContext,
33
+ Token,
34
+ TokenType,
35
+ defaultOptions,
36
+ getLineInfo,
37
+ isIdentifierChar,
38
+ isIdentifierStart,
39
+ isNewLine,
40
+ keywords as keywordTypes,
41
+ lineBreak,
42
+ lineBreakG,
43
+ nonASCIIwhitespace,
44
+ parse,
45
+ parseExpressionAt,
46
+ types as tokContexts,
47
+ types$1 as tokTypes,
48
+ tokenizer,
49
+ version
50
+ };
@@ -0,0 +1,42 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __typeError = (msg) => {
9
+ throw TypeError(msg);
10
+ };
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __commonJS = (cb, mod) => function __require() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
33
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
34
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
35
+
36
+ export {
37
+ __commonJS,
38
+ __toESM,
39
+ __publicField,
40
+ __privateGet,
41
+ __privateAdd
42
+ };
@@ -0,0 +1,10 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+
3
+ // ../contrast-runtime-delivery/src/version.ts
4
+ function isValidRuntimeVersion(value) {
5
+ return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
6
+ }
7
+
8
+ export {
9
+ isValidRuntimeVersion
10
+ };
@@ -0,0 +1,115 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+
3
+ // src/bridge-contract.ts
4
+ var REFUSED_PERFORM_STEP_TYPES = [
5
+ "keyDown",
6
+ "keyUp",
7
+ "setOrientation",
8
+ "buttonDown",
9
+ "buttonUp",
10
+ "incrementElement",
11
+ "decrementElement",
12
+ "discoverStoreKitConfig",
13
+ "clearStoreKitConfig"
14
+ ];
15
+ function refusedPerformStepReason(type) {
16
+ switch (type) {
17
+ case "keyDown":
18
+ case "keyUp":
19
+ return `${type} is not supported: keys dispatch atomically; use the key step`;
20
+ case "setOrientation":
21
+ return "setOrientation is not supported: the simulator viewport is fixed at boot";
22
+ case "buttonDown":
23
+ case "buttonUp":
24
+ return `${type} is not supported: the simulator has no hardware buttons`;
25
+ case "incrementElement":
26
+ case "decrementElement":
27
+ return `${type} is not supported: steppers have no engine primitive; drive them with tapId`;
28
+ case "discoverStoreKitConfig":
29
+ case "clearStoreKitConfig":
30
+ return `${type} is not supported: storekit has no simulator model`;
31
+ }
32
+ }
33
+ function performStepRefusal(type) {
34
+ switch (type) {
35
+ case "keyDown":
36
+ case "keyUp":
37
+ case "setOrientation":
38
+ case "buttonDown":
39
+ case "buttonUp":
40
+ case "incrementElement":
41
+ case "decrementElement":
42
+ case "discoverStoreKitConfig":
43
+ case "clearStoreKitConfig":
44
+ return refusedPerformStepReason(type);
45
+ case "touchDown":
46
+ case "touchMove":
47
+ case "touchUp":
48
+ case "touchCancel":
49
+ case "tap":
50
+ case "tapId":
51
+ case "doubleTap":
52
+ case "longPress":
53
+ case "drag":
54
+ case "pinch":
55
+ case "scroll":
56
+ case "type":
57
+ case "typeInto":
58
+ case "key":
59
+ case "dismissKeyboard":
60
+ case "setElementValue":
61
+ case "toggleKeyboard":
62
+ case "openUrl":
63
+ case "deviceInfo":
64
+ case "wait":
65
+ case "waitFor":
66
+ return null;
67
+ }
68
+ }
69
+ var SIM_LONG_PRESS_DEFAULT_MS = 500;
70
+ var SIM_LONG_PRESS_MAX_MS = 5e3;
71
+ var SEMANTIC_READY_NODE_STABLE_MS = 750;
72
+ var SEMANTIC_READY_POLL_MS = 150;
73
+ var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
74
+ function readyProbeContentBasis(probe) {
75
+ if (probe.paintedAppContent === true) return "paintedAppContent";
76
+ if ((probe.browserSurfaceCount ?? 0) > 0) return "browserSurface";
77
+ if (probe.liveFrameActive) return "liveFrame";
78
+ return "";
79
+ }
80
+ function readyProbeHasContent(probe) {
81
+ return readyProbeContentBasis(probe) !== "";
82
+ }
83
+ function readyProbeIsReady(probe) {
84
+ return readyProbeContentBasis(probe) !== "" && probe.externalReady !== false && !probe.externalError && !probe.loadingText;
85
+ }
86
+ var WRITE_COMMAND_TYPES = /* @__PURE__ */ new Set([
87
+ "tap",
88
+ "keyboard",
89
+ "longPress",
90
+ "perform",
91
+ "reset",
92
+ "camera"
93
+ ]);
94
+ function commandWritesSim(msg) {
95
+ if (typeof msg.type !== "string") return false;
96
+ if (msg.acquireLock === true) return true;
97
+ if (msg.readOnly === true) return false;
98
+ return WRITE_COMMAND_TYPES.has(msg.type);
99
+ }
100
+
101
+ export {
102
+ REFUSED_PERFORM_STEP_TYPES,
103
+ refusedPerformStepReason,
104
+ performStepRefusal,
105
+ SIM_LONG_PRESS_DEFAULT_MS,
106
+ SIM_LONG_PRESS_MAX_MS,
107
+ SEMANTIC_READY_NODE_STABLE_MS,
108
+ SEMANTIC_READY_POLL_MS,
109
+ HEADLESS_TENANT_FETCH_HUNG_MARKER,
110
+ readyProbeContentBasis,
111
+ readyProbeHasContent,
112
+ readyProbeIsReady,
113
+ WRITE_COMMAND_TYPES,
114
+ commandWritesSim
115
+ };
@@ -0,0 +1,12 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+
3
+ // src/assetCatalogContract.ts
4
+ function isSwiftImageVariants(value) {
5
+ return Array.isArray(value) && value.length > 0 && value.every(
6
+ (image) => typeof image === "object" && image !== null && typeof image.uri === "string" && typeof image.scale === "number" && Number.isFinite(image.scale) && image.scale > 0 && (image.renderingMode === void 0 || image.renderingMode === "template" || image.renderingMode === "original")
7
+ );
8
+ }
9
+
10
+ export {
11
+ isSwiftImageVariants
12
+ };
@@ -0,0 +1,30 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+
3
+ // src/launchMetadataContract.ts
4
+ var LAUNCH_METADATA_QUERY_PARAM = "launchMetadata";
5
+ var LAUNCH_METADATA_KEYS_PATH = "node/launch-metadata-keys.json";
6
+ var LAUNCH_METADATA_KEYS = [
7
+ "appFonts",
8
+ "appSplash",
9
+ "appCatalog",
10
+ "appBundleResources",
11
+ "nativeAppIdentity",
12
+ "nativeFirebase",
13
+ "expoSwift",
14
+ "expoWidgets",
15
+ "expoKotlin",
16
+ "nitro",
17
+ "turbo",
18
+ "widgetExtension",
19
+ "appManifest",
20
+ "packageVersions",
21
+ "dotEnv",
22
+ "env"
23
+ ];
24
+ var LAUNCH_METADATA_KEYS_BEFORE_RUNTIME_STATED_THEM = LAUNCH_METADATA_KEYS.filter((key) => key !== "widgetExtension");
25
+
26
+ export {
27
+ LAUNCH_METADATA_QUERY_PARAM,
28
+ LAUNCH_METADATA_KEYS_PATH,
29
+ LAUNCH_METADATA_KEYS
30
+ };
@@ -0,0 +1,186 @@
1
+ /*! peach v0.1.2440 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+
3
+ // src/swiftContract.ts
4
+ function isSwiftSourceLinkGraph(value) {
5
+ if (!value || typeof value !== "object") return false;
6
+ const text = (value2) => typeof value2 === "string" && value2.length > 0 && value2.length <= 4096 && !value2.includes("\0");
7
+ const entry = Reflect.get(value, "entry");
8
+ const targets = Reflect.get(value, "targets");
9
+ if (!text(entry) || !Array.isArray(targets) || targets.length > 1024) return false;
10
+ const ids = /* @__PURE__ */ new Set();
11
+ for (const target of targets) {
12
+ if (!target || typeof target !== "object") return false;
13
+ const id = Reflect.get(target, "id");
14
+ const source = Reflect.get(target, "sourceTarget");
15
+ const flags = Reflect.get(target, "linkerFlags");
16
+ const dependencies = Reflect.get(target, "dependencies");
17
+ const build = Reflect.get(target, "buildVersion");
18
+ const nullableText = (value2) => value2 === null || text(value2);
19
+ if (!text(id) || ids.has(id) || !(source === null || text(source)) || !text(Reflect.get(target, "productName")) || !text(Reflect.get(target, "productType")) || !nullableText(Reflect.get(target, "installName")) || !build || typeof build !== "object" || !["platform", "minimumOS", "sdk"].every(
20
+ (key) => nullableText(Reflect.get(build, key))
21
+ ) || !(Reflect.get(target, "machOType") === null || text(Reflect.get(target, "machOType"))) || !Array.isArray(flags) || !flags.every(text) || !Array.isArray(dependencies) || !dependencies.every(
22
+ (link) => link && typeof link === "object" && text(Reflect.get(link, "target")) && Array.isArray(Reflect.get(link, "attributes")) && Reflect.get(link, "attributes").every(text)
23
+ ))
24
+ return false;
25
+ ids.add(id);
26
+ }
27
+ return ids.has(entry) && targets.every(
28
+ (target) => Reflect.get(target, "dependencies").every(
29
+ (link) => ids.has(link.target)
30
+ )
31
+ );
32
+ }
33
+ var SWIFT_REMOTE_PACKAGES_DIR = "__packages__";
34
+ var SWIFT_LOCAL_PACKAGES_DIR = "__local_packages__";
35
+ var SWIFT_XCODE_BUILD_CONDITION = "__PEACH_XCODE_BUILD";
36
+ function isBase64Bytes(value) {
37
+ return value.length % 4 === 0 && /^[A-Za-z0-9+/]*={0,2}(?![\s\S])/.test(value);
38
+ }
39
+ function isSwiftPackageFiles(value) {
40
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.entries(value).every(
41
+ ([file, bytes]) => isSwiftResourcePath(file) && (file.startsWith(`${SWIFT_REMOTE_PACKAGES_DIR}/`) || file.startsWith(`${SWIFT_LOCAL_PACKAGES_DIR}/`)) && typeof bytes === "string" && isBase64Bytes(bytes)
42
+ );
43
+ }
44
+ function swiftProjectFileProblem(file) {
45
+ if (!isSwiftResourcePath(file)) return "not a relative path of plain segments";
46
+ if (file === "Package.swift") return "would replace the generated manifest";
47
+ if (file.split("/").includes(".build")) return "is build output (.build)";
48
+ if (file.startsWith(".")) return 'starts with "." (hidden file or peach output)';
49
+ if (file.startsWith(`${SWIFT_REMOTE_PACKAGES_DIR}/`) || file.startsWith(`${SWIFT_LOCAL_PACKAGES_DIR}/`))
50
+ return "collides with a transported package checkout";
51
+ return void 0;
52
+ }
53
+ function swiftProjectEntryProblem(file, bytes) {
54
+ return swiftProjectFileProblem(file) ?? (typeof bytes === "string" && isBase64Bytes(bytes) ? void 0 : "bytes are not base64");
55
+ }
56
+ function isSwiftProjectFiles(value) {
57
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.entries(value).every(
58
+ ([file, bytes]) => swiftProjectEntryProblem(file, bytes) === void 0
59
+ );
60
+ }
61
+ function swiftProjectFilesProblems(value) {
62
+ if (value === null || typeof value !== "object" || Array.isArray(value))
63
+ return ["projectFiles is not an object"];
64
+ return Object.entries(value).flatMap(([file, bytes]) => {
65
+ const problem = swiftProjectEntryProblem(file, bytes);
66
+ return problem ? [`${file}: ${problem}`] : [];
67
+ });
68
+ }
69
+ var SWIFT_NATIVE_INPUT_ROOT = "$(PEACH_INPUT_ROOT)";
70
+ var SWIFT_NATIVE_SDK_INCLUDE = "$(PEACH_SDK_INCLUDE)";
71
+ function isSwiftHeaderAliases(value) {
72
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.entries(value).every(
73
+ ([alias, file]) => isSwiftResourcePath(alias) && isSwiftResourcePath(file)
74
+ );
75
+ }
76
+ function isSwiftNativeTargets(value) {
77
+ return swiftNativeTargetsRefusal(value) === null;
78
+ }
79
+ function swiftNativeTargetsRefusal(value) {
80
+ const strings = (value2) => Array.isArray(value2) && value2.every((item) => typeof item === "string" && !item.includes("\0"));
81
+ const paths = (value2) => strings(value2) && value2.every(isSwiftResourcePath);
82
+ if (!Array.isArray(value)) return "nativeTargets";
83
+ if (value.length > 128) return "nativeTargets:length";
84
+ for (const target of value) {
85
+ if (!target || typeof target !== "object") return "nativeTargets:shape";
86
+ const field = (name2) => Reflect.get(target, name2);
87
+ const name = typeof field("name") === "string" ? String(field("name")) : "?";
88
+ const at = (shape) => `nativeTargets:${name}:${shape}`;
89
+ const nullablePath = (key) => field(key) === null || isSwiftResourcePath(field(key));
90
+ const perFile = field("fileFlags");
91
+ const directories = field("sourceDirectories");
92
+ const searches = field("headerSearchPaths");
93
+ const userSearches = field("userHeaderSearchPaths");
94
+ const frameworks = field("frameworkSearchPaths");
95
+ const maps = field("headerMaps");
96
+ const products = field("productHeaders");
97
+ const inputPath = (value2) => typeof value2 === "string" && value2.startsWith(`${SWIFT_NATIVE_INPUT_ROOT}/`) && isSwiftResourcePath(value2.slice(SWIFT_NATIVE_INPUT_ROOT.length + 1));
98
+ const deployment = field("deploymentTarget");
99
+ const targetName = field("name");
100
+ if (typeof targetName !== "string" || targetName.length === 0 || targetName.length > 4096 || targetName.includes("\0") || targetName.includes("/") || targetName.includes("\\") || targetName === "." || targetName === "..")
101
+ return at("name");
102
+ if (!(deployment === null || typeof deployment === "string" && /^\d+(?:\.\d+){0,2}$/.test(deployment)))
103
+ return at("deploymentTarget");
104
+ if (!paths(field("headers"))) return at("headers");
105
+ if (!paths(field("publicHeaders"))) return at("publicHeaders");
106
+ if (typeof field("flattensPublicHeaders") !== "boolean")
107
+ return at("flattensPublicHeaders");
108
+ if (!nullablePath("bridgingHeader")) return at("bridgingHeader");
109
+ if (!nullablePath("prefixHeader")) return at("prefixHeader");
110
+ if (!strings(searches) || !searches.every((item) => item === "." || isSwiftResourcePath(item)))
111
+ return at("headerSearchPaths");
112
+ const moduleMaps = field("moduleMaps");
113
+ if (moduleMaps !== void 0 && (!Array.isArray(moduleMaps) || moduleMaps.length > 128 || !moduleMaps.every((map) => {
114
+ if (!map || typeof map !== "object") return false;
115
+ const module = Reflect.get(map, "module");
116
+ const headers = Reflect.get(map, "headers");
117
+ return typeof module === "string" && module.length > 0 && module.length <= 4096 && !module.includes("\0") && (headers === "." || isSwiftResourcePath(headers));
118
+ })))
119
+ return at("moduleMaps");
120
+ if (!strings(userSearches) || !userSearches.every((item) => item === "." || isSwiftResourcePath(item)))
121
+ return at("userHeaderSearchPaths");
122
+ if (!strings(frameworks) || !frameworks.every((item) => item === "." || isSwiftResourcePath(item)))
123
+ return at("frameworkSearchPaths");
124
+ if (!Array.isArray(maps) || !maps.every((map) => {
125
+ if (!map || typeof map !== "object") return false;
126
+ const flag = Reflect.get(map, "flag");
127
+ const entries = Reflect.get(map, "entries");
128
+ return (flag === "-I" || flag === "-iquote") && Array.isArray(entries) && entries.every(
129
+ (entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] === "string" && !entry[0].includes("\0") && (inputPath(entry[1]) || isSwiftResourcePath(entry[1]))
130
+ );
131
+ }))
132
+ return at("headerMaps");
133
+ if (!products || typeof products !== "object" || Array.isArray(products) || !Object.entries(products).every(
134
+ ([product, file]) => isSwiftResourcePath(product) && isSwiftResourcePath(file)
135
+ ))
136
+ return at("productHeaders");
137
+ if (!strings(field("flags"))) return at("flags");
138
+ if (!strings(field("importerFlags"))) return at("importerFlags");
139
+ if (!strings(field("cxxFlags"))) return at("cxxFlags");
140
+ if (!perFile || typeof perFile !== "object" || Array.isArray(perFile) || !Object.entries(perFile).every(
141
+ ([file, flags]) => isSwiftResourcePath(file) && strings(flags)
142
+ ))
143
+ return at("fileFlags");
144
+ if (!directories || typeof directories !== "object" || Array.isArray(directories) || !Object.entries(directories).every(
145
+ ([file, directory]) => isSwiftResourcePath(file) && (directory === "." || isSwiftResourcePath(directory))
146
+ ))
147
+ return at("sourceDirectories");
148
+ }
149
+ return null;
150
+ }
151
+ function isSwiftResourcePath(value) {
152
+ return typeof value === "string" && value.length <= 4096 && !value.startsWith("/") && !value.includes("\\") && !value.includes("\0") && value.split("/").every((part) => part !== "" && part !== "." && part !== "..");
153
+ }
154
+ function isSwiftBundlePath(value) {
155
+ return typeof value === "string" && (value === "." || isSwiftResourcePath(value) && /\.(bundle|framework)$/.test(value));
156
+ }
157
+ function isSwiftResourceBundles(value) {
158
+ return Array.isArray(value) && value.every(
159
+ (bundle) => typeof bundle === "object" && bundle !== null && typeof bundle.target === "string" && /^[A-Za-z_][A-Za-z0-9_-]*$/.test(bundle.target) && (bundle.sourcePath === "." || isSwiftResourcePath(bundle.sourcePath)) && isSwiftBundlePath(bundle.path)
160
+ ) && new Set(value.map((bundle) => bundle.target)).size === value.length && new Set(value.map((bundle) => bundle.path)).size === value.length;
161
+ }
162
+ function isSwiftMetalSources(value) {
163
+ return typeof value === "object" && value !== null && !Array.isArray(value) && Object.entries(value).every(
164
+ ([file, source]) => file.endsWith(".metal") && isSwiftResourcePath(file) && typeof source === "object" && source !== null && !Array.isArray(source) && "url" in source && typeof source.url === "string" && "sha256" in source && typeof source.sha256 === "string" && /^[a-f0-9]{64}$/.test(source.sha256)
165
+ );
166
+ }
167
+ function isSwiftMetalLibrarySources(value) {
168
+ return isSwiftMetalSources(value) && Object.values(value).every(
169
+ (source) => "bundlePath" in source && isSwiftBundlePath(source.bundlePath)
170
+ );
171
+ }
172
+
173
+ export {
174
+ isSwiftSourceLinkGraph,
175
+ SWIFT_XCODE_BUILD_CONDITION,
176
+ isSwiftPackageFiles,
177
+ isSwiftProjectFiles,
178
+ swiftProjectFilesProblems,
179
+ SWIFT_NATIVE_INPUT_ROOT,
180
+ SWIFT_NATIVE_SDK_INCLUDE,
181
+ isSwiftHeaderAliases,
182
+ isSwiftNativeTargets,
183
+ isSwiftResourcePath,
184
+ isSwiftResourceBundles,
185
+ isSwiftMetalLibrarySources
186
+ };