peachsim 0.1.1815 → 0.1.1817

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 (97) hide show
  1. package/cli/commands/package.ts +82 -31
  2. package/cli/outbound-endpoints.ts +1 -1
  3. package/cli/packaged-app-launcher.ts +6 -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 +4418 -5235
  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 +12 -3
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +3932 -4526
  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 +3289 -4175
  34. package/dist-lib/host/fetch-proxy-handler.cjs +12 -3
  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 +13 -24
  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 +13 -24
  50. package/dist-lib/native-app-identity-project.cjs +2 -22
  51. package/dist-lib/native-app-identity-project.mjs +2 -22
  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 +74 -66
  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 +3793 -4671
  71. package/dist-lib/swift-compile.cjs +216 -242
  72. package/dist-lib/swift-compile.mjs +216 -242
  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 +251 -236
  80. package/dist-lib/vite.cjs +12 -3
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/package.json +1 -1
  84. package/src/answeredNativePackages.ts +41 -0
  85. package/src/cli-runtime.ts +2 -9
  86. package/src/expo-discovery-cache.ts +2 -0
  87. package/src/expo-kotlin-host.ts +11 -9
  88. package/src/expo-swift-host.ts +10 -6
  89. package/src/nitro-bundle.ts +8 -6
  90. package/src/nitro-compiler-digest.ts +2 -4
  91. package/src/nitro-superset.lock.json +19 -251
  92. package/src/nitro-superset.ts +59 -63
  93. package/src/react-native-bridge-modules.ts +2 -4
  94. package/src/swift-compile.ts +258 -254
  95. package/src/swift-objc-standin.ts +10 -6
  96. package/src/swift-standins.ts +36 -12
  97. package/src/turbo-source.ts +2 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1815 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1817 | (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;
@@ -7333,9 +7333,12 @@ ${text4}`
7333
7333
  );
7334
7334
  return [...headers, ...overlays].sort(([a], [b]) => a < b ? -1 : 1);
7335
7335
  }
7336
- var IOS_SDK_ID = (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
7336
+ var sdkId;
7337
+ function iosSdkId() {
7338
+ return sdkId ??= (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
7339
+ }
7337
7340
  function materializeObjcSdk(cacheDir5) {
7338
- const sdk = import_node_path7.default.join(cacheDir5, "ios-sdk", IOS_SDK_ID);
7341
+ const sdk = import_node_path7.default.join(cacheDir5, "ios-sdk", iosSdkId());
7339
7342
  if (import_node_fs7.default.existsSync(sdk)) return sdk;
7340
7343
  import_node_fs7.default.mkdirSync(import_node_path7.default.dirname(sdk), { recursive: true });
7341
7344
  const staging = import_node_fs7.default.mkdtempSync(`${sdk}-`);
@@ -12104,7 +12107,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12104
12107
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12105
12108
  var MULTI_MANIFEST_VERSION = 65;
12106
12109
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12107
- var compilerSourceDigest = true ? "f6bf05da9a8bbde24169c3c8ff29e36d48f13ea9f817f33a350da3c475783ddd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12110
+ var compilerSourceDigest = true ? "1519f1f37c446535792f7bb0c9ba9c5e59b0b0f87d7b5c849346abe684325aa7" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12108
12111
  function swiftArtifactHash(input, release, moduleRoot) {
12109
12112
  const hash = (0, import_node_crypto8.createHash)("sha256");
12110
12113
  hash.update(`swift-compile
@@ -15844,245 +15847,239 @@ function compileSwiftProjectUnit(input, options) {
15844
15847
  `swift-compile: no swift.org toolchain at ${options.toolchainBin}; install ${options.release} and its matching wasm sdk`
15845
15848
  );
15846
15849
  }
15847
- return withSwiftRootLock(
15848
- swiftFrameworkScratch(frameworkKey),
15849
- async (frameworkLease) => {
15850
- const frameworkRoot = stageFrameworkSource(moduleRoot, frameworkKey);
15851
- report("preparing compiler plugins");
15852
- const macroPlugins = await ensureMacroPlugins(
15853
- frameworkRoot,
15854
- options.toolchainBin,
15855
- options.release,
15856
- options.signal,
15857
- frameworkLease
15858
- );
15859
- const sdk = swiftModuleSdk(frameworkRoot).wasmSdkId;
15860
- const icu = swiftIcuAsset(options.toolchainBin, sdk);
15861
- const buildOptions = {
15862
- env: {
15863
- ...options.project?.env ?? process.env,
15864
- // shipped host plugins resolve against the selected compiler's runtime.
15865
- ...process.platform === "linux" ? {
15866
- LD_LIBRARY_PATH: [
15867
- import_node_path19.default.resolve(options.toolchainBin, "../lib/swift/linux"),
15868
- import_node_path19.default.resolve(options.toolchainBin, "../lib/swift/host"),
15869
- process.env.LD_LIBRARY_PATH
15870
- ].filter(Boolean).join(":")
15871
- } : {},
15872
- ...input.lazyDistribution ? { PEACH_DEFER_WASM_LINK: "1" } : {}
15873
- },
15874
- maxBuffer: 64 * 1024 * 1024,
15875
- timeout: options.timeoutMs,
15876
- signal: options.signal,
15877
- lease,
15878
- frameworkLease
15879
- };
15880
- let prebuilt;
15881
- if (!swiftDistributionAt(moduleRoot)) {
15882
- report("compiling framework products");
15883
- prebuilt = await compileFrameworkProducts({
15884
- moduleRoot: frameworkRoot,
15885
- frameworkKey,
15886
- input,
15887
- swift,
15888
- sdk,
15889
- toolchainBin: options.toolchainBin,
15890
- plugins: macroPlugins,
15891
- buildOptions
15892
- });
15893
- await pruneFrameworkScratches(frameworkKey);
15894
- }
15895
- if (options.project) removeProjectLinks(root);
15896
- if (retireStaleSwiftLink(
15897
- root,
15898
- swiftLinkStamp({
15899
- frameworkKey,
15900
- prebuilt
15901
- })
15902
- ))
15903
- report("framework revision changed; rebuilding the app link");
15904
- const preparation = writeSwiftProject(
15905
- layout,
15850
+ const frameworkScratch = swiftFrameworkScratch(frameworkKey);
15851
+ const withFrameworkLock = (work) => distribution ? work() : withSwiftRootLock(frameworkScratch, work, options.signal);
15852
+ return withFrameworkLock(async (frameworkLease) => {
15853
+ const frameworkRoot = stageFrameworkSource(moduleRoot, frameworkKey);
15854
+ report("preparing compiler plugins");
15855
+ const pluginsFor = (pluginLease) => ensureMacroPlugins(
15856
+ frameworkRoot,
15857
+ options.toolchainBin,
15858
+ options.release,
15859
+ options.signal,
15860
+ pluginLease
15861
+ );
15862
+ const macroPlugins = distribution ? await withSwiftRootLock(frameworkScratch, pluginsFor, options.signal) : await pluginsFor(frameworkLease);
15863
+ const sdk = swiftModuleSdk(frameworkRoot).wasmSdkId;
15864
+ const icu = swiftIcuAsset(options.toolchainBin, sdk);
15865
+ const buildOptions = {
15866
+ env: {
15867
+ ...options.project?.env ?? process.env,
15868
+ // shipped host plugins resolve against the selected compiler's runtime.
15869
+ ...process.platform === "linux" ? {
15870
+ LD_LIBRARY_PATH: [
15871
+ import_node_path19.default.resolve(options.toolchainBin, "../lib/swift/linux"),
15872
+ import_node_path19.default.resolve(options.toolchainBin, "../lib/swift/host"),
15873
+ process.env.LD_LIBRARY_PATH
15874
+ ].filter(Boolean).join(":")
15875
+ } : {},
15876
+ ...input.lazyDistribution ? { PEACH_DEFER_WASM_LINK: "1" } : {}
15877
+ },
15878
+ maxBuffer: 64 * 1024 * 1024,
15879
+ timeout: options.timeoutMs,
15880
+ signal: options.signal,
15881
+ lease,
15882
+ frameworkLease
15883
+ };
15884
+ let prebuilt;
15885
+ if (!distribution) {
15886
+ report("compiling framework products");
15887
+ prebuilt = await compileFrameworkProducts({
15888
+ moduleRoot: frameworkRoot,
15889
+ frameworkKey,
15906
15890
  input,
15907
- frameworkRoot,
15891
+ swift,
15892
+ sdk,
15893
+ toolchainBin: options.toolchainBin,
15894
+ plugins: macroPlugins,
15895
+ buildOptions
15896
+ });
15897
+ await pruneFrameworkScratches(frameworkKey);
15898
+ }
15899
+ if (options.project) removeProjectLinks(root);
15900
+ if (retireStaleSwiftLink(
15901
+ root,
15902
+ swiftLinkStamp({
15903
+ frameworkKey,
15908
15904
  prebuilt
15905
+ })
15906
+ ))
15907
+ report("framework revision changed; rebuilding the app link");
15908
+ const preparation = writeSwiftProject(layout, input, frameworkRoot, prebuilt);
15909
+ writeSwiftAutolinkLinker(root, options.toolchainBin);
15910
+ const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
15911
+ const appOptions = projectProcess ? {
15912
+ ...buildOptions,
15913
+ uid: projectProcess.uid,
15914
+ gid: projectProcess.gid,
15915
+ confined: projectProcess.env
15916
+ } : buildOptions;
15917
+ const unprepared = preparation.targetFailures.map(
15918
+ (failure2) => `error: target ${failure2}`
15919
+ );
15920
+ const forwarders = /* @__PURE__ */ new Map();
15921
+ for (const [file, text4] of Object.entries(input.files)) {
15922
+ const parents = /^#include "((?:\.\.\/)+)[^"\n]+"\n$/.exec(text4)?.[1];
15923
+ if (!parents) continue;
15924
+ const directory = import_node_path19.default.posix.dirname(file);
15925
+ forwarders.set(
15926
+ `${import_node_path19.default.join(root, directory)}/${parents.slice(0, -1)}`,
15927
+ import_node_path19.default.posix.join("build", directory, parents).replace(/\/$/, "")
15909
15928
  );
15910
- writeSwiftAutolinkLinker(root, options.toolchainBin);
15911
- const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
15912
- const appOptions = projectProcess ? {
15913
- ...buildOptions,
15914
- uid: projectProcess.uid,
15915
- gid: projectProcess.gid,
15916
- confined: projectProcess.env
15917
- } : buildOptions;
15918
- const unprepared = preparation.targetFailures.map(
15919
- (failure2) => `error: target ${failure2}`
15920
- );
15921
- const forwarders = /* @__PURE__ */ new Map();
15922
- for (const [file, text4] of Object.entries(input.files)) {
15923
- const parents = /^#include "((?:\.\.\/)+)[^"\n]+"\n$/.exec(text4)?.[1];
15924
- if (!parents) continue;
15925
- const directory = import_node_path19.default.posix.dirname(file);
15926
- forwarders.set(
15927
- `${import_node_path19.default.join(root, directory)}/${parents.slice(0, -1)}`,
15928
- import_node_path19.default.posix.join("build", directory, parents).replace(/\/$/, "")
15929
+ }
15930
+ const buildArgs = [
15931
+ "build",
15932
+ ...projectProcess?.cacheOptions ?? swiftPackageCacheOptions(),
15933
+ "--build-system",
15934
+ "native",
15935
+ "-j",
15936
+ BUILD_JOBS,
15937
+ "--package-path",
15938
+ root,
15939
+ ...swiftCompileSdkOptions(frameworkRoot, options.toolchainBin),
15940
+ "--swift-sdk",
15941
+ sdk,
15942
+ ...input.packageFiles || prebuilt ? ["--toolset", import_node_path19.default.join(root, ".peach-target-toolset.json")] : [],
15943
+ "-c",
15944
+ "release",
15945
+ "-Xswiftc",
15946
+ "-num-threads",
15947
+ "-Xswiftc",
15948
+ BUILD_JOBS,
15949
+ ...swiftReproducibleBuildFlags([
15950
+ [import_node_path19.default.dirname(options.toolchainBin), "toolchain"],
15951
+ [frameworkRoot, "framework"],
15952
+ [root, "build"],
15953
+ ...forwarders
15954
+ ]),
15955
+ ...macroPlugins.libraries.flatMap((plugin) => [
15956
+ "-Xswiftc",
15957
+ "-load-plugin-library",
15958
+ "-Xswiftc",
15959
+ plugin
15960
+ ]),
15961
+ ...macroPlugins.executables.flatMap((plugin) => [
15962
+ "-Xswiftc",
15963
+ "-load-plugin-executable",
15964
+ "-Xswiftc",
15965
+ `${plugin}#ExpoModulesMacros`
15966
+ ])
15967
+ ];
15968
+ const linked = builtArtifact(layout);
15969
+ if (input.lazyDistribution) {
15970
+ (0, import_node_fs18.rmSync)(import_node_path19.default.join(root, ".peach-link.rsp"), { force: true });
15971
+ if ((0, import_node_fs18.existsSync)(linked) && (0, import_node_fs18.statSync)(linked).size <= 8)
15972
+ (0, import_node_fs18.rmSync)(linked, { force: true });
15973
+ }
15974
+ report("compiling and linking Swift modules");
15975
+ try {
15976
+ const headerBuilds = preparation.headerProductTarget ? [
15977
+ ...Object.keys(preparation.nativeHeaderDeclarations),
15978
+ preparation.headerProductTarget
15979
+ ] : preparation.headerProducers;
15980
+ for (const build of headerBuilds) {
15981
+ await runCompiler(
15982
+ swift,
15983
+ [...buildArgs, "--target", build],
15984
+ appOptions,
15985
+ SWIFTPM_PROGRESS,
15986
+ SWIFTPM_NOISE
15929
15987
  );
15988
+ for (const producer of build === preparation.headerProductTarget ? preparation.headerProducers : [build]) {
15989
+ const emitted = import_node_path19.default.join(
15990
+ root,
15991
+ ".build",
15992
+ "peach-cxx-headers",
15993
+ `${producer}-Swift.h`
15994
+ );
15995
+ const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
15996
+ if ((0, import_node_fs18.existsSync)(original))
15997
+ writeBuildFile(
15998
+ emitted,
15999
+ withoutSwiftDeclarations(
16000
+ clangInterfaceHeader((0, import_node_fs18.readFileSync)(original, "utf8")),
16001
+ new Set(preparation.nativeHeaderDeclarations[producer]),
16002
+ `#import <${producer}/${producer}.h>`
16003
+ )
16004
+ );
16005
+ }
15930
16006
  }
15931
- const buildArgs = [
15932
- "build",
15933
- ...projectProcess?.cacheOptions ?? swiftPackageCacheOptions(),
15934
- "--build-system",
15935
- "native",
15936
- "-j",
15937
- BUILD_JOBS,
15938
- "--package-path",
16007
+ await runCompiler(
16008
+ swift,
16009
+ buildArgs,
16010
+ appOptions,
16011
+ SWIFTPM_PROGRESS,
16012
+ SWIFTPM_NOISE
16013
+ );
16014
+ } catch (error) {
16015
+ const output3 = outputOf(error);
16016
+ const moduleCache = import_node_path19.default.join(
15939
16017
  root,
15940
- ...swiftCompileSdkOptions(frameworkRoot, options.toolchainBin),
15941
- "--swift-sdk",
15942
- sdk,
15943
- ...input.packageFiles || prebuilt ? ["--toolset", import_node_path19.default.join(root, ".peach-target-toolset.json")] : [],
15944
- "-c",
16018
+ ".build",
16019
+ WASM_TRIPLE,
15945
16020
  "release",
15946
- "-Xswiftc",
15947
- "-num-threads",
15948
- "-Xswiftc",
15949
- BUILD_JOBS,
15950
- ...swiftReproducibleBuildFlags([
15951
- [import_node_path19.default.dirname(options.toolchainBin), "toolchain"],
15952
- [frameworkRoot, "framework"],
15953
- [root, "build"],
15954
- ...forwarders
15955
- ]),
15956
- ...macroPlugins.libraries.flatMap((plugin) => [
15957
- "-Xswiftc",
15958
- "-load-plugin-library",
15959
- "-Xswiftc",
15960
- plugin
15961
- ]),
15962
- ...macroPlugins.executables.flatMap((plugin) => [
15963
- "-Xswiftc",
15964
- "-load-plugin-executable",
15965
- "-Xswiftc",
15966
- `${plugin}#ExpoModulesMacros`
15967
- ])
15968
- ];
15969
- const linked = builtArtifact(layout);
15970
- if (input.lazyDistribution) {
15971
- (0, import_node_fs18.rmSync)(import_node_path19.default.join(root, ".peach-link.rsp"), { force: true });
15972
- if ((0, import_node_fs18.existsSync)(linked) && (0, import_node_fs18.statSync)(linked).size <= 8)
15973
- (0, import_node_fs18.rmSync)(linked, { force: true });
15974
- }
15975
- report("compiling and linking Swift modules");
15976
- try {
15977
- const headerBuilds = preparation.headerProductTarget ? [
15978
- ...Object.keys(preparation.nativeHeaderDeclarations),
15979
- preparation.headerProductTarget
15980
- ] : preparation.headerProducers;
15981
- for (const build of headerBuilds) {
16021
+ "ModuleCache"
16022
+ );
16023
+ if (output3.includes("was compiled with module cache path") && (0, import_node_fs18.existsSync)(moduleCache)) {
16024
+ (0, import_node_fs18.rmSync)(moduleCache, { recursive: true, force: true });
16025
+ try {
15982
16026
  await runCompiler(
15983
16027
  swift,
15984
- [...buildArgs, "--target", build],
16028
+ buildArgs,
15985
16029
  appOptions,
15986
16030
  SWIFTPM_PROGRESS,
15987
16031
  SWIFTPM_NOISE
15988
16032
  );
15989
- for (const producer of build === preparation.headerProductTarget ? preparation.headerProducers : [build]) {
15990
- const emitted = import_node_path19.default.join(
15991
- root,
15992
- ".build",
15993
- "peach-cxx-headers",
15994
- `${producer}-Swift.h`
15995
- );
15996
- const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
15997
- if ((0, import_node_fs18.existsSync)(original))
15998
- writeBuildFile(
15999
- emitted,
16000
- withoutSwiftDeclarations(
16001
- clangInterfaceHeader((0, import_node_fs18.readFileSync)(original, "utf8")),
16002
- new Set(preparation.nativeHeaderDeclarations[producer]),
16003
- `#import <${producer}/${producer}.h>`
16004
- )
16005
- );
16006
- }
16007
- }
16008
- await runCompiler(
16009
- swift,
16010
- buildArgs,
16011
- appOptions,
16012
- SWIFTPM_PROGRESS,
16013
- SWIFTPM_NOISE
16014
- );
16015
- } catch (error) {
16016
- const output3 = outputOf(error);
16017
- const moduleCache = import_node_path19.default.join(
16018
- root,
16019
- ".build",
16020
- WASM_TRIPLE,
16021
- "release",
16022
- "ModuleCache"
16023
- );
16024
- if (output3.includes("was compiled with module cache path") && (0, import_node_fs18.existsSync)(moduleCache)) {
16025
- (0, import_node_fs18.rmSync)(moduleCache, { recursive: true, force: true });
16026
- try {
16027
- await runCompiler(
16028
- swift,
16029
- buildArgs,
16030
- appOptions,
16031
- SWIFTPM_PROGRESS,
16032
- SWIFTPM_NOISE
16033
- );
16034
- } catch (retryError) {
16035
- throw new Error(
16036
- [
16037
- ...unprepared,
16038
- projectDiagnostic(outputOf(retryError), layout, input.files)
16039
- ].join("\n"),
16040
- { cause: retryError }
16041
- );
16042
- }
16043
- } else {
16033
+ } catch (retryError) {
16044
16034
  throw new Error(
16045
- [...unprepared, projectDiagnostic(output3, layout, input.files)].join(
16046
- "\n"
16047
- ),
16048
- { cause: error }
16035
+ [
16036
+ ...unprepared,
16037
+ projectDiagnostic(outputOf(retryError), layout, input.files)
16038
+ ].join("\n"),
16039
+ { cause: retryError }
16049
16040
  );
16050
16041
  }
16051
- } finally {
16052
- if (options.project) endSwiftProjectProcesses(options.project);
16053
- }
16054
- if (unprepared.length) throw new Error(unprepared.join("\n"));
16055
- if (!(0, import_node_fs18.existsSync)(linked)) {
16056
- const binDir = import_node_path19.default.dirname(linked);
16057
- const found = (0, import_node_fs18.existsSync)(binDir) ? (0, import_node_fs18.readdirSync)(binDir).filter((name3) => name3.endsWith(".wasm")).sort() : [];
16042
+ } else {
16058
16043
  throw new Error(
16059
- `swift-compile: the build produced no ${import_node_path19.default.basename(linked)} (found: ${found.join(", ") || "none"})`
16060
- );
16061
- }
16062
- if (options.project) removeProjectLinks(root);
16063
- const output2 = options.project ? projectOutputFile(root, linked, options.project) : linked;
16064
- const optimized = `${output2}.optimized`;
16065
- if (input.lazyDistribution) {
16066
- pruneSwiftWasmLink(
16067
- root,
16068
- options.toolchainBin,
16069
- frameworkRoot,
16070
- input.staticClangTargets
16044
+ [...unprepared, projectDiagnostic(output3, layout, input.files)].join(
16045
+ "\n"
16046
+ ),
16047
+ { cause: error }
16071
16048
  );
16072
- await optimizeWasm(output2, optimized);
16073
16049
  }
16074
- const artifact = {
16075
- hash,
16076
- bytes: (0, import_node_fs18.readFileSync)(input.lazyDistribution ? optimized : output2),
16077
- icu: await icu
16078
- };
16079
- if (!options.project) saveCompiledArtifact(root, artifact);
16080
- saveSharedArtifact(sharedRoot, artifact);
16081
- report("compiled artifact verified");
16082
- return retain(root, artifact);
16083
- },
16084
- options.signal
16085
- );
16050
+ } finally {
16051
+ if (options.project) endSwiftProjectProcesses(options.project);
16052
+ }
16053
+ if (unprepared.length) throw new Error(unprepared.join("\n"));
16054
+ if (!(0, import_node_fs18.existsSync)(linked)) {
16055
+ const binDir = import_node_path19.default.dirname(linked);
16056
+ const found = (0, import_node_fs18.existsSync)(binDir) ? (0, import_node_fs18.readdirSync)(binDir).filter((name3) => name3.endsWith(".wasm")).sort() : [];
16057
+ throw new Error(
16058
+ `swift-compile: the build produced no ${import_node_path19.default.basename(linked)} (found: ${found.join(", ") || "none"})`
16059
+ );
16060
+ }
16061
+ if (options.project) removeProjectLinks(root);
16062
+ const output2 = options.project ? projectOutputFile(root, linked, options.project) : linked;
16063
+ const optimized = `${output2}.optimized`;
16064
+ if (input.lazyDistribution) {
16065
+ pruneSwiftWasmLink(
16066
+ root,
16067
+ options.toolchainBin,
16068
+ frameworkRoot,
16069
+ input.staticClangTargets
16070
+ );
16071
+ await optimizeWasm(output2, optimized);
16072
+ }
16073
+ const artifact = {
16074
+ hash,
16075
+ bytes: (0, import_node_fs18.readFileSync)(input.lazyDistribution ? optimized : output2),
16076
+ icu: await icu
16077
+ };
16078
+ if (!options.project) saveCompiledArtifact(root, artifact);
16079
+ saveSharedArtifact(sharedRoot, artifact);
16080
+ report("compiled artifact verified");
16081
+ return retain(root, artifact);
16082
+ });
16086
16083
  },
16087
16084
  options.signal
16088
16085
  );
@@ -24765,7 +24762,7 @@ function standinSourceDigest(srcDir = __sootsim_import_meta_dirname) {
24765
24762
  }
24766
24763
  return hash.digest("hex");
24767
24764
  }
24768
- var STANDIN_SOURCE_DIGEST = true ? "bcab0947a5f2c96b28cbf3a9de81a4e4de8711a17b0d7622fbc8f8c5fcee3d76" : standinSourceDigest();
24765
+ var STANDIN_SOURCE_DIGEST = true ? "9c474de2879c74325a394ed35660b419de359a6c926f74e96eaf97639d7b2c65" : standinSourceDigest();
24769
24766
 
24770
24767
  // src/swift-standins.ts
24771
24768
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -25660,14 +25657,14 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
25660
25657
  const declaredDigest = (0, import_node_crypto20.createHash)("sha256");
25661
25658
  for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
25662
25659
  declaredDigest.update(import_node_path39.default.relative(artifact.dir, framework)).update([...names ?? []].sort().join("\0")).update("\n").update([...imports2].sort().join("\0")).update(sdkHeader ?? "");
25663
- const search = import_node_path39.default.join(
25660
+ const staging = import_node_path39.default.join(
25664
25661
  root,
25665
- "peach-binary-inputs",
25666
- STANDIN_SOURCE_DIGEST.slice(0, 32),
25662
+ "peach-binary-trees",
25667
25663
  declared.size ? `${artifact.digest.slice(0, 32)}-${declaredDigest.digest("hex").slice(0, 16)}` : artifact.digest.slice(0, 32)
25668
25664
  );
25669
- if (!import_node_fs37.default.existsSync(search)) {
25670
- const pending = `${search}.${process.pid}.tmp`;
25665
+ const revision = import_node_path39.default.join(staging, "revisions", STANDIN_SOURCE_DIGEST.slice(0, 32));
25666
+ const stageTree = () => {
25667
+ const pending = import_node_path39.default.join(staging, `pending.${process.pid}`);
25671
25668
  import_node_fs37.default.rmSync(pending, { recursive: true, force: true });
25672
25669
  for (const framework of frameworks) {
25673
25670
  const swift = declared.get(framework);
@@ -25697,13 +25694,29 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
25697
25694
  filter: (source) => import_node_fs37.default.statSync(source).isDirectory() ? import_node_path39.default.dirname(source) !== directory || !import_node_path39.default.basename(source).startsWith("ios-") : !isBinaryLibraryFile(source)
25698
25695
  } : {}
25699
25696
  });
25697
+ const contents = (0, import_node_crypto20.createHash)("sha256");
25698
+ for (const relative2 of import_node_fs37.default.readdirSync(pending, { recursive: true, encoding: "utf8" }).sort()) {
25699
+ const file = import_node_path39.default.join(pending, relative2);
25700
+ contents.update(`${relative2}\0`);
25701
+ if (import_node_fs37.default.statSync(file).isFile()) contents.update(import_node_fs37.default.readFileSync(file));
25702
+ }
25703
+ const name3 = contents.digest("hex").slice(0, 32);
25700
25704
  try {
25701
- import_node_fs37.default.renameSync(pending, search);
25705
+ import_node_fs37.default.renameSync(pending, import_node_path39.default.join(staging, name3));
25702
25706
  } catch (error) {
25703
25707
  import_node_fs37.default.rmSync(pending, { recursive: true, force: true });
25704
- if (!import_node_fs37.default.existsSync(search)) throw error;
25708
+ if (!import_node_fs37.default.existsSync(import_node_path39.default.join(staging, name3))) throw error;
25705
25709
  }
25706
- }
25710
+ import_node_fs37.default.mkdirSync(import_node_path39.default.dirname(revision), { recursive: true });
25711
+ const record2 = `${revision}.${process.pid}`;
25712
+ import_node_fs37.default.writeFileSync(record2, name3);
25713
+ import_node_fs37.default.renameSync(record2, revision);
25714
+ return name3;
25715
+ };
25716
+ const search = import_node_path39.default.join(
25717
+ staging,
25718
+ import_node_fs37.default.existsSync(revision) ? import_node_fs37.default.readFileSync(revision, "utf8") : stageTree()
25719
+ );
25707
25720
  for (const [framework, { header }] of declared) {
25708
25721
  if (header === null) continue;
25709
25722
  const name3 = import_node_path39.default.basename(framework, ".framework");
@@ -25714,8 +25727,10 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
25714
25727
  "Headers",
25715
25728
  `${name3}-Swift.h`
25716
25729
  );
25717
- if (!import_node_fs37.default.existsSync(staged) || import_node_fs37.default.readFileSync(staged, "utf8") !== header)
25718
- import_node_fs37.default.writeFileSync(staged, header);
25730
+ if (!import_node_fs37.default.existsSync(staged) || import_node_fs37.default.readFileSync(staged, "utf8") !== header) {
25731
+ import_node_fs37.default.writeFileSync(`${staged}.${process.pid}`, header);
25732
+ import_node_fs37.default.renameSync(`${staged}.${process.pid}`, staged);
25733
+ }
25719
25734
  }
25720
25735
  return {
25721
25736
  frameworks: frameworks.length ? [import_node_path39.default.join(search, "frameworks")] : [],
@@ -27126,7 +27141,7 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
27126
27141
  sdk.wasmSdkChecksum,
27127
27142
  swiftModuleDigest(moduleRoot).toString("hex"),
27128
27143
  `sources/${digest}`,
27129
- `ios-sdk/${IOS_SDK_ID}`
27144
+ `ios-sdk/${iosSdkId()}`
27130
27145
  ];
27131
27146
  const modules = new Set(
27132
27147
  binaries.flatMap((binary) => {
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1815 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1817 | (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;
@@ -205,6 +205,9 @@ function isValidRuntimeVersion(value) {
205
205
  // runtime-companion.json
206
206
  var runtime_companion_default = { abi: 1, sha256: "d657f8c4fd2d3c861f50ea15c42b3275555ac4f799c58a46d3dca829656bc63c", file: "node/cli-d657f8c4fd2d3c861f50ea15c42b3275555ac4f799c58a46d3dca829656bc63c.cjs" };
207
207
 
208
+ // src/answeredNativePackages.ts
209
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
210
+
208
211
  // src/runtime-assets.ts
209
212
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
210
213
  var import_fs = __toESM(require("fs"), 1);
@@ -484,6 +487,13 @@ function streamFile(res, stream) {
484
487
  stream.pipe(res);
485
488
  }
486
489
 
490
+ // src/answeredNativePackages.ts
491
+ function peachRuntimeRoot() {
492
+ const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot();
493
+ if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
494
+ return root;
495
+ }
496
+
487
497
  // src/cli-runtime.ts
488
498
  var CLI_COMPANION_ABI = 1;
489
499
  function cliCompanionPath() {
@@ -513,8 +523,7 @@ function verifyCompanionFile(file) {
513
523
  var loaded;
514
524
  function getCliRuntime() {
515
525
  if (loaded) return loaded.runtime;
516
- const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot();
517
- if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
526
+ const root = peachRuntimeRoot();
518
527
  verifyCliCompanion(root);
519
528
  const require2 = (0, import_node_module.createRequire)(__sootsim_import_meta_url);
520
529
  const runtime = require2((0, import_node_path2.join)(root, cliCompanionPath()));
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1815 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1817 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1815 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1817 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1815",
3
+ "version": "0.1.1817",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",