peachsim 0.1.2209 → 0.1.2210

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 (102) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +271 -51
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +270 -50
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +271 -51
  31. package/dist-lib/host/fetch-proxy-handler.cjs +16 -3
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +16 -3
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +16 -3
  47. package/dist-lib/native-app-identity-project.cjs +15 -2
  48. package/dist-lib/native-app-identity-project.mjs +15 -2
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +63 -53
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +271 -51
  68. package/dist-lib/swift-compile.cjs +58 -12
  69. package/dist-lib/swift-compile.mjs +57 -12
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +253 -46
  77. package/dist-lib/vite.cjs +16 -3
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/package.json +1 -1
  81. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +2 -0
  82. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +21 -0
  83. package/sdk/ios/usr/lib/swift/Combine.swiftmodule/arm64-apple-ios-simulator.swiftinterface +18 -0
  84. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
  85. package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -0
  86. package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
  87. package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
  88. package/sdk/ios/wasm/include/pthread.h +1 -0
  89. package/sdk/ios/wasm/include/signal.h +2 -2
  90. package/sdk/native-hashes.json +3 -3
  91. package/src/native-static-libraries.ts +7 -0
  92. package/src/swift-compile.ts +48 -10
  93. package/src/swift-host.ts +22 -3
  94. package/src/swift-objc-compile.ts +1 -1
  95. package/src/swift-objc-import.ts +32 -2
  96. package/src/swift-objc-standin.ts +1 -1
  97. package/src/swift-packages.ts +53 -28
  98. package/src/swift-pdf-raster.ts +60 -4
  99. package/src/swift-shipped-archives.json +44 -0
  100. package/src/swift-shipped-binaries.ts +12 -0
  101. package/src/swift-standin-emit.ts +9 -3
  102. package/src/swift-standins.ts +75 -8
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2210 | (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;
@@ -7148,7 +7148,7 @@ function emitSwiftStandin(sourceGraphs, options) {
7148
7148
  const coder = members2.some((member) => leaf(member) === "init(coder:)");
7149
7149
  if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
7150
7150
  emit(
7151
- `${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path51}.init(coder:)`)} }`
7151
+ `${inner}public required init${options.coderNonfailable?.has(path51) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path51) ? "return nil" : trap(`${path51}.init(coder:)`)} }`
7152
7152
  );
7153
7153
  if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
7154
7154
  (at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
@@ -7329,15 +7329,18 @@ function emitSwiftStandin(sourceGraphs, options) {
7329
7329
  const { 2: rest } = LEADING_ATTRS.exec(text(member));
7330
7330
  const decl = rest.replace(/^(?:weak |unowned )/, "").replace(/^((?:static )?)let /, "$1var ");
7331
7331
  const witness = `${owner2}.${leaf(member)}`;
7332
+ if (options.forcedOverride?.has(witness)) return;
7332
7333
  const body = options.inert ? inertBody(member) : trap(witness);
7333
7334
  if (member.kind.identifier === "swift.property" || member.kind.identifier === "swift.type.property") {
7334
7335
  const parsed = splitAccessors(decl);
7335
7336
  const setter = parsed.settable ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${body} }` : "";
7336
- emit(
7337
+ emitAt(
7338
+ witness,
7337
7339
  `${indent2}${visibility} ${parsed.decl} { get${parsed.effects} { ${body} }${setter} }`
7338
7340
  );
7339
7341
  } else
7340
- emit(
7342
+ emitAt(
7343
+ witness,
7341
7344
  `${indent2}${member.kind.identifier === "swift.init" ? "public required " : visibility + " "}${stripDefaults(decl)} { ${body} }`
7342
7345
  );
7343
7346
  };
@@ -7773,7 +7776,7 @@ function iosDeploymentMinimum(version2) {
7773
7776
  if (!parts) return void 0;
7774
7777
  return Number(parts[1]) * 1e4 + Number(parts[2] ?? 0) * 100 + Number(parts[3] ?? 0);
7775
7778
  }
7776
- var headerFiles = (dir) => import_node_fs7.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h")).sort();
7779
+ var headerFiles = (dir) => import_node_fs7.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h") || file.endsWith(".hh")).sort();
7777
7780
  function moduleMapHeaders(modulemap, directoryHeaders = []) {
7778
7781
  const tokens2 = moduleMapTokens(import_node_fs7.default.readFileSync(modulemap, "utf8"));
7779
7782
  const open = [];
@@ -16049,10 +16052,25 @@ function swiftClangImporterFlags(flags) {
16049
16052
  (flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
16050
16053
  );
16051
16054
  }
16052
- function swiftObjCModuleMap(module2, headers) {
16055
+ var SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
16056
+ function swiftSubmoduleImports(sources) {
16057
+ const imports2 = /* @__PURE__ */ new Map();
16058
+ for (const source of sources)
16059
+ for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
16060
+ const names = imports2.get(module2) ?? /* @__PURE__ */ new Set();
16061
+ names.add(submodule);
16062
+ imports2.set(module2, names);
16063
+ }
16064
+ return imports2;
16065
+ }
16066
+ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
16067
+ const header = (file) => `header ${JSON.stringify(file)}`;
16068
+ const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
16053
16069
  return [
16054
16070
  `module ${module2} {`,
16055
- ...headers.map((header) => ` header ${JSON.stringify(header)}`),
16071
+ ...headers.map(
16072
+ (file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
16073
+ ),
16056
16074
  " export *",
16057
16075
  "}",
16058
16076
  ""
@@ -17431,7 +17449,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
17431
17449
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
17432
17450
  var MULTI_MANIFEST_VERSION = 68;
17433
17451
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
17434
- var compilerSourceDigest = true ? "f113c3b74986e3d582dde643cb5771f750e5c836703fb20a79a1d67a53884748" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17452
+ var compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17435
17453
  function swiftArtifactHash(input, release, moduleRoot) {
17436
17454
  const hash = (0, import_node_crypto13.createHash)("sha256");
17437
17455
  hash.update(`swift-compile
@@ -19020,6 +19038,20 @@ function stripCCode(source) {
19020
19038
  }
19021
19039
  return code;
19022
19040
  }
19041
+ var wasmMacroEnvironment = {
19042
+ ...emptyMacroEnvironment,
19043
+ defines: /* @__PURE__ */ new Map([
19044
+ ["__wasm__", "1"],
19045
+ ["__wasm32__", "1"],
19046
+ ["__wasi__", "1"]
19047
+ ])
19048
+ };
19049
+ function swiftCTakesReturnAddress(source) {
19050
+ if (!source.includes("__builtin_return_address")) return false;
19051
+ return /\b__builtin_return_address\s*\(/.test(
19052
+ cActiveCode(stripCCode(source), wasmMacroEnvironment)
19053
+ );
19054
+ }
19023
19055
  function swiftCDefinedNames(sources) {
19024
19056
  const names = /* @__PURE__ */ new Set();
19025
19057
  for (const source of sources)
@@ -19317,6 +19349,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
19317
19349
  clangImportedModules.add(name3);
19318
19350
  }
19319
19351
  }
19352
+ const submoduleImports = swiftSubmoduleImports(
19353
+ Object.entries(input.files).flatMap(
19354
+ ([file, contents]) => file.endsWith(".swift") ? [contents] : []
19355
+ )
19356
+ );
19320
19357
  const headerDirectory = import_node_path27.default.join(layout2.root, ".build", "peach-cxx-headers");
19321
19358
  const flattenedHeaders = /* @__PURE__ */ new Set();
19322
19359
  if ((0, import_node_fs27.existsSync)(headerDirectory)) {
@@ -19702,7 +19739,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
19702
19739
  );
19703
19740
  const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
19704
19741
  swiftTargetModuleName(target.name),
19705
- roots2.map((file) => import_node_path27.default.join(layout2.root, file))
19742
+ roots2.map((file) => import_node_path27.default.join(layout2.root, file)),
19743
+ submoduleImports.get(swiftTargetModuleName(target.name))
19706
19744
  );
19707
19745
  if (moduleContents === void 0)
19708
19746
  throw new Error("missing original module map " + modulemap);
@@ -20027,10 +20065,14 @@ module ${moduleName}.Swift {
20027
20065
  header ${JSON.stringify(import_node_path27.default.join(headerDirectory, name3 + "-Swift.h"))}
20028
20066
  requires objc
20029
20067
  }
20030
- ` : swiftObjCModuleMap(moduleName, [
20031
- ...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path27.default.join(layout2.root, header)),
20032
- import_node_path27.default.join(headerDirectory, name3 + "-Swift.h")
20033
- ])
20068
+ ` : swiftObjCModuleMap(
20069
+ moduleName,
20070
+ [
20071
+ ...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path27.default.join(layout2.root, header)),
20072
+ import_node_path27.default.join(headerDirectory, name3 + "-Swift.h")
20073
+ ],
20074
+ submoduleImports.get(moduleName)
20075
+ )
20034
20076
  );
20035
20077
  nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
20036
20078
  }
@@ -21021,8 +21063,12 @@ async function buildFrameworkProducts(scratch2, args) {
21021
21063
  const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
21022
21064
  const objects = linked.objects;
21023
21065
  if (linked.modules.has("UniformTypeIdentifiers")) {
21024
- const object4 = import_node_path27.default.join(scratch2, "UniformTypeIdentifiers-NativeConstants.o");
21025
- if (!(0, import_node_fs27.existsSync)(object4)) {
21066
+ const constantsDir = import_node_path27.default.join(scratch2, "uniform-type-constants");
21067
+ const constantsStamp = import_node_path27.default.join(constantsDir, ".complete");
21068
+ const object4 = import_node_path27.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
21069
+ if (!(0, import_node_fs27.existsSync)(constantsStamp) || (0, import_node_fs27.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
21070
+ (0, import_node_fs27.rmSync)(constantsDir, { recursive: true, force: true });
21071
+ (0, import_node_fs27.mkdirSync)(constantsDir);
21026
21072
  const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
21027
21073
  compileUniformTypeConstants({
21028
21074
  bin: args.toolchainBin,
@@ -21030,8 +21076,9 @@ async function buildFrameworkProducts(scratch2, args) {
21030
21076
  darwin: sdkPaths2.darwin,
21031
21077
  packageRoot: args.moduleRoot,
21032
21078
  minimum: darwinRecordsMinimum(),
21033
- out: scratch2
21079
+ out: constantsDir
21034
21080
  });
21081
+ (0, import_node_fs27.writeFileSync)(constantsStamp, args.frameworkKey);
21035
21082
  }
21036
21083
  objects.push(object4);
21037
21084
  linked.owners.set(object4, "UniformTypeIdentifiers");
@@ -30139,6 +30186,62 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30139
30186
  // src/numbered-lock.ts
30140
30187
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30141
30188
 
30189
+ // src/swift-shipped-binaries.ts
30190
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30191
+
30192
+ // src/swift-shipped-archives.json
30193
+ var swift_shipped_archives_default = {
30194
+ AppCheckCore: "a18d4e5aff27ff4b9bce8d6e73e55ccf1d11515311e219aa4473319cdff3187b",
30195
+ AppLovinSDK: "c00f052c4b15766a6a2734e2b3685234e6bd28dbc47fbe7cbc3edbf56f701d5c",
30196
+ AppsFlyerLib: "13bae495e63e22579dd9525a1c9e88d8eedc78b4586979b7e2d492cfd3efbe1f",
30197
+ FBAEMKit: "ceaf685683c6a23ae4893150d0d770aeeaec34811ac8c146b3aa351beade5fa0",
30198
+ FBAudienceNetwork: "4d84bf1e404a83852a93af2ae73e22e45bb2b11e0a9a445c3b461173a5d6aec3",
30199
+ FBLPromises: "3544fb457e7f60c69740cdd26617a75bdd613943e948becca643022c7edd76c0",
30200
+ FBSDKCoreKit: "1577edd62ec0c172928befed3b309dc59ae8915d2aaad091460d9d1be5ddc13d",
30201
+ FBSDKCoreKit_Basics: "c780833f204f9ec6eab70a3758a45c5c78bfb6f4e590289ccf395497f204cac1",
30202
+ FirebaseAnalytics: "e3253a494375c5174d20cb81925e20afa1ff6b1419125cb608d39b092b53ff2a",
30203
+ FirebaseAppCheck: "af82d72727d55d14f65eee96845d4d9495e4e603b4673709d6f3448b9595cc63",
30204
+ FirebaseAppCheckInterop: "7ffd54e6fe187bf8cd714e3d863e0095f7cbbb0fb802adb87a40c552de7cffcc",
30205
+ FirebaseAuth: "fcde09db8d45ffba67802e81c17b8046db6b56568226ace3fca898983b08c968",
30206
+ FirebaseAuthInterop: "e8e6f4fb42b3fa76c2bade7a522ab0f224558d27d2321175c791d307541787a8",
30207
+ FirebaseCore: "30e3505c715e17682c1dc20bb26ba475e99e6981a9a0dba3cf9352eea632fc1d",
30208
+ FirebaseCoreExtension: "e37ce2abcd4c218ab5426da78cbe7ab41f79ee7eba1d02dd4b0cde952ed2c4a0",
30209
+ FirebaseCoreInternal: "72a15c0c63585faf93e9ffa91e8a8c1c50b24749405804ffae19a29ec05b07ab",
30210
+ FirebaseCrashlytics: "e03c71913efd97678b895abb1e968c83e58b3fbd7955a81ec6e6581b95db16e3",
30211
+ FirebaseFirestore: "f7a1bb7fc4a2fb09298b514114d6aaca9a4f00fd8868667524a05bc4563bf1fd",
30212
+ FirebaseFirestoreInternal: "d9595a1784beaf5cd4a8e0dda0f4364ddfa6b536ad60f82746d81d14dce037a3",
30213
+ FirebaseInstallations: "141e313325bab001f2dbb79dc8a433f884f4c4a12a5feb665e6958098d637f7b",
30214
+ FirebaseRemoteConfig: "e0ae6d626a423d535bc67216f9f0cd66f98f1c0fb4b5bf88074d4496733e2db1",
30215
+ FirebaseRemoteConfigInterop: "794f599eb4232058715b606fa671639c8cc5d821655a0f739651d17c5ef65c37",
30216
+ FirebaseSessions: "1781d72e47dac0fc7a532412641021730bd5b659135633cd9ef7b97ccd31b0ce",
30217
+ FirebaseSharedSwift: "8d63b09a517733ef3a58390bf1e8cf054f058bdd618bb4f19a1f4b5a0b4f09e5",
30218
+ FirebaseStorage: "636b33180dd5ad60b4878357691fe6472cf3bd57ec691e9d661c5444f523df66",
30219
+ GTMSessionFetcher: "f58dc2bd9db39defd73f0f67e7a11893a0c6e6f0ba45cd83cf420b2b3c15f1bd",
30220
+ GoogleAdsOnDeviceConversion: "31a5a1f5204f4844a480d3889b6ebe2e69473ef32b868935c51812c0483cb08b",
30221
+ GoogleAppMeasurement: "5741e6334392e0345f1b5896111ffef4d5a78859970f5e197fa0b7d881165305",
30222
+ GoogleAppMeasurementIdentitySupport: "b70cb033eeb002ed1c5a8140953ccb3be0221ca754c05fe450ed9c9c6547f274",
30223
+ GoogleDataTransport: "7d08050419e0906f13039cc4d2dd69be075234c0bf5bbb34df9dd4891e48831d",
30224
+ GoogleMobileAds: "f2c09c60ee331ce029f563304ad73a481d57ace0d4bc11ce33a2bf59497c59bf",
30225
+ GoogleUtilities: "37a9d3d3810dad763a8a79bd4c7cc4c37b386240725aca07f45dba1826676c8c",
30226
+ Intercom: "fc8251f24b305b91f83304d4dffaf1a90c424a7bc37be8b595dd1fc5cff566ea",
30227
+ Promises: "6d8f1a4b3d561d67adfc2026834779b05685d1cdacea6e83c70d0641c39f24de",
30228
+ RecaptchaInterop: "cf5cc62ebc237b34d5267c1190d18f33b424dbc7f81713f127108d0ad8a592cf",
30229
+ RiveRuntime: "72b6ff5c5a1d153c9cdbea9a917c09be557cfcb1fafa02853fa06b0268551710",
30230
+ absl: "fff0388cf074c69a2da4bc197a005da0b8e5c23ebdcfa383600c540a342f9df1",
30231
+ grpc: "918737c9f8f93e14127b3894e31c7a0522475f2247b74f87d8166dff3a6bafb0",
30232
+ grpcpp: "b83f85e0256cf06df00cf0ed728b5c0d68373ca401742877935771447450b90a",
30233
+ leveldb: "5521a6e6e4cd01b2e31b099d4341f1bccae7e8ba43de648b028928573daf8bb4",
30234
+ nanopb: "a7fafe2e4e16d99de4c58f72e22dcc53221885aa6d678d1270123e4b01badfa3",
30235
+ openssl_grpc: "b2aaede82457cdd15915762a4f57b38e28ba0f47b9b48556a7e0c46881973096"
30236
+ };
30237
+
30238
+ // src/swift-shipped-binaries.ts
30239
+ var SHIPPED_ARCHIVES = new Map(Object.entries(swift_shipped_archives_default));
30240
+ function shippedBinaryDiffers(target, checksum) {
30241
+ const shipped = SHIPPED_ARCHIVES.get(target);
30242
+ return shipped !== void 0 && checksum !== null && checksum !== shipped;
30243
+ }
30244
+
30142
30245
  // src/swift-packages.ts
30143
30246
  var swiftBinaryOnDisk = (binary) => binary.url !== null || import_node_fs40.default.existsSync(binary.dir);
30144
30247
  var SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
@@ -30151,16 +30254,22 @@ function remoteSwiftCheckouts(root) {
30151
30254
  return import_node_path41.default.join(import_node_fs40.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
30152
30255
  }
30153
30256
  var UNSUPPORTED_NATIVE = /\.(s|S)$/;
30154
- function assemblySources(files2, target) {
30257
+ function unlowerableSources(files2, target) {
30258
+ if (target.declaresWasiNativeSettings) return [];
30259
+ return [
30260
+ ...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
30261
+ ...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs40.default.readFileSync(file, "utf8")))
30262
+ ];
30263
+ }
30264
+ function unloweredSources(files2, target) {
30155
30265
  if (target.type !== "regular") return null;
30156
- if (target.declaresWasiNativeSettings) return null;
30157
- const assembly = files2.filter((file) => UNSUPPORTED_NATIVE.test(file));
30158
- if (assembly.length === 0) return null;
30159
30266
  if (!files2.some(isSwiftNativeTranslationUnit)) return null;
30267
+ const unlowered = unlowerableSources(files2, target);
30268
+ if (unlowered.length === 0) return null;
30160
30269
  const headers = import_node_path41.default.resolve(target.dir, target.publicHeadersPath);
30161
30270
  if (!files2.some((file) => file.startsWith(`${headers}${import_node_path41.default.sep}`) && file.endsWith(".h")))
30162
30271
  return null;
30163
- return assembly;
30272
+ return unlowered;
30164
30273
  }
30165
30274
  var BINARY = "is a binary framework";
30166
30275
  var blockers = (reasons) => [...new Set(reasons.flat())];
@@ -30325,9 +30434,9 @@ function resolveSwiftPackages(options) {
30325
30434
  if (target.type === "macro") return preservePackage(pkg, [name3], "host");
30326
30435
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
30327
30436
  const gap = options.binaryGaps?.get(name3);
30328
- const assembly = target.declaresWasiNativeSettings ? [] : files2.filter((file) => UNSUPPORTED_NATIVE.test(file));
30437
+ const unlowerable = unlowerableSources(files2, target);
30329
30438
  const placeholder = placeholderPackage(pkg);
30330
- const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` : assembly.length > 0 ? `${name3} is an assembly target with no wasm32 lowering: ${assembly.map((file) => import_node_path41.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
30439
+ const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` : unlowerable.length > 0 ? `${name3} has native sources with no wasm32 lowering: ${unlowerable.map((file) => import_node_path41.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
30331
30440
  const reasons = target.dependencies.map((dependency) => {
30332
30441
  if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
30333
30442
  const nested = resolveDependencyProduct(pkg, dependency);
@@ -30406,7 +30515,7 @@ function resolveSwiftPackages(options) {
30406
30515
  (file) => file.endsWith(".swift") && import_node_fs40.default.readFileSync(file, "utf8").trim() === ""
30407
30516
  ))
30408
30517
  return false;
30409
- if (providedTargets.has(name3) && assemblySources(files2, target)) return false;
30518
+ if (unloweredSources(files2, target)) return false;
30410
30519
  claimed.add(key2);
30411
30520
  providedTargets.delete(name3);
30412
30521
  for (const dependency of target.dependencies) {
@@ -30420,6 +30529,13 @@ function resolveSwiftPackages(options) {
30420
30529
  };
30421
30530
  const claimProduct = (pkg, product) => {
30422
30531
  const roots = pkg.manifest.products.get(product)?.targets ?? [];
30532
+ for (const root of roots) {
30533
+ const target = pkg.manifest.targets.get(root);
30534
+ if (target?.type === "binary" && !options.standinTargets?.has(root) && shippedBinaryDiffers(root, target.checksum)) {
30535
+ providedTargets.delete(root);
30536
+ providedProducts.delete(product);
30537
+ }
30538
+ }
30423
30539
  if (roots.map((name3) => claimTarget(pkg, name3)).some(Boolean))
30424
30540
  providedProducts.delete(product);
30425
30541
  };
@@ -30447,7 +30563,7 @@ function resolveSwiftPackages(options) {
30447
30563
  if (target.type === "executable") continue;
30448
30564
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
30449
30565
  const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
30450
- const assembly = assemblySources(files2, target);
30566
+ const unlowered = unloweredSources(files2, target);
30451
30567
  const gap = placeholderPackage(pkg);
30452
30568
  const sources = files2.filter((file) => file.endsWith(".swift"));
30453
30569
  const release = (setting) => setting.configuration !== "debug";
@@ -30474,7 +30590,7 @@ function resolveSwiftPackages(options) {
30474
30590
  ]
30475
30591
  }
30476
30592
  });
30477
- else if (target.type === "binary" || objc || assembly)
30593
+ else if (target.type === "binary" || objc || unlowered)
30478
30594
  result.binaries.push({
30479
30595
  target: name3,
30480
30596
  source: pkg.source,
@@ -30488,8 +30604,8 @@ function resolveSwiftPackages(options) {
30488
30604
  import_node_path41.default.join(target.dir, target.publicHeadersPath)
30489
30605
  )
30490
30606
  },
30491
- ...assembly ? {
30492
- assemblySources: assembly.map(
30607
+ ...unlowered ? {
30608
+ unloweredSources: unlowered.map(
30493
30609
  (file) => import_node_path41.default.relative(pkg.manifest.dir, file)
30494
30610
  )
30495
30611
  } : {}
@@ -30746,7 +30862,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
30746
30862
  return hash.digest("hex");
30747
30863
  }
30748
30864
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
30749
- var STANDIN_SOURCE_DIGEST = true ? "30ee25efff915489853ffb5c34661d03b2ca480fc48fe80201fced1d4821577a" : standinSourceDigest();
30865
+ var STANDIN_SOURCE_DIGEST = true ? "9adf53d6f1cfece1b7a3e23bad712630278818d71b5b718384cf640144349600" : standinSourceDigest();
30750
30866
 
30751
30867
  // src/swift-standins.ts
30752
30868
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -31094,6 +31210,13 @@ var NATIVE_STATIC_LIBRARY_RECIPES = [
31094
31210
  upstream: "b94213a11b3a2edadfae89f0c57a7f4ab72772c9",
31095
31211
  recipe: "a2642115a5eeb04559c9f1daaa4b4cbe4b1c211533b4cc80cb8339a4477af205",
31096
31212
  archive: "libsksg.a"
31213
+ },
31214
+ {
31215
+ name: "webgpu_dawn",
31216
+ nativeSha256: "95078993275bccc969b1dfa1ad0934cbacc05ae59e8aa2a6cc46ce93e97d4f69",
31217
+ upstream: "3d786993a7ded64c4ebb4884b9b079db9ad0e580",
31218
+ recipe: "c55468cc976e837ad894133f2231beb7d1ed64633af7b457b8a2610d7df45994",
31219
+ archive: "libwebgpu_dawn.a"
31097
31220
  }
31098
31221
  ];
31099
31222
  function nativeStaticLibraryEntry(recipe, compiler, sdk, distribution) {
@@ -32607,7 +32730,7 @@ function interfaceEnumValues(graphs, interfaceText) {
32607
32730
  const declarations = [
32608
32731
  ...interfaceText.matchAll(
32609
32732
  new RegExp(
32610
- `^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?U?Int(?:8|16|32|64)?\\b[^{]*\\{[ \\t]*$`,
32733
+ `^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?(?:U?Int(?:8|16|32|64)?|IntegerLiteralType)\\b[^{]*\\{[ \\t]*$`,
32611
32734
  "gm"
32612
32735
  )
32613
32736
  )
@@ -32706,9 +32829,26 @@ function mixedStandin(surface, binary, toolchain, work, behavior, frameworkDirs,
32706
32829
  view.protocolProperties ?? /* @__PURE__ */ new Map(),
32707
32830
  null,
32708
32831
  view.inheritedConformances,
32709
- interfaceProjections(view.graphs, interfaceText)
32832
+ interfaceProjections(view.graphs, interfaceText),
32833
+ [],
32834
+ externalConformances(surface.module, interfaceText)
32710
32835
  );
32711
32836
  }
32837
+ function externalConformances(module2, interfaceText) {
32838
+ const lines = /* @__PURE__ */ new Set();
32839
+ for (const match of interfaceText.matchAll(
32840
+ /^(?:@\w+\s+)*extension\s+([\w.]+)\s*:\s*([^{\n]+?)\s*\{/gm
32841
+ )) {
32842
+ const [, extended, conformances] = match;
32843
+ if (extended.startsWith(`${module2}.`) || /\bwhere\b/.test(conformances)) continue;
32844
+ const own = conformances.split(",").map((name3) => name3.trim()).filter((name3) => name3.startsWith(`${module2}.`));
32845
+ const type = extended.startsWith("Swift.") ? extended : extended.split(".").slice(1).join(".");
32846
+ if (own.length > 0 && type) lines.add(`extension ${type} : ${own.join(", ")} {}
32847
+ `);
32848
+ }
32849
+ return lines.size > 0 ? `
32850
+ ${[...lines].join("")}` : "";
32851
+ }
32712
32852
  var WASM_EH_FLAGS = ["-Xllvm", "-wasm-enable-eh"];
32713
32853
  function wasmFlags(toolchain, imports2) {
32714
32854
  const { sysroot, darwin, resources, cFlags } = swiftSdkPaths(
@@ -32804,7 +32944,7 @@ function objcStandin(surface, binary, toolchain, work, behavior, frameworks, sib
32804
32944
  }
32805
32945
  var OBJC_UNREPRESENTABLE = "cannot be marked '@objc' because its type cannot be represented in Objective-C";
32806
32946
  var INERT_VALUE = /missing argument|cannot be constructed|has no member 'init'|no exact matches in call to initializer|cannot convert return expression|does not conform to '|extra argument|takes no arguments|could not be inferred|cannot infer/;
32807
- function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, requiredInits2, declared, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = []) {
32947
+ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, requiredInits2, declared, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = [], trailer = "") {
32808
32948
  const paths = new Set(
32809
32949
  graphs.flatMap(
32810
32950
  (graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
@@ -32845,6 +32985,8 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32845
32985
  const plain = /* @__PURE__ */ new Set();
32846
32986
  const unobjc = /* @__PURE__ */ new Set();
32847
32987
  const trapped = /* @__PURE__ */ new Set();
32988
+ const forced = /* @__PURE__ */ new Set();
32989
+ const nonfailable = /* @__PURE__ */ new Set();
32848
32990
  const unconformed = /* @__PURE__ */ new Map();
32849
32991
  const objcProtocols = new Set(
32850
32992
  graphs.flatMap(
@@ -32854,7 +32996,7 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32854
32996
  )
32855
32997
  );
32856
32998
  const file = import_node_path49.default.join(work, `${module2}.swift`);
32857
- const inert = binary.placeholder !== void 0 || binary.publicHeaders !== void 0 && binary.assemblySources === void 0;
32999
+ const inert = binary.placeholder !== void 0 || binary.publicHeaders !== void 0 && binary.unloweredSources === void 0;
32858
33000
  for (; ; ) {
32859
33001
  const { source, owners, skipped } = emitSwiftStandin(graphs, {
32860
33002
  module: module2,
@@ -32867,6 +33009,8 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32867
33009
  unobjc,
32868
33010
  unconformed,
32869
33011
  trapped,
33012
+ forcedOverride: forced,
33013
+ coderNonfailable: nonfailable,
32870
33014
  inert,
32871
33015
  imports: [...placeholder?.peachImports ?? [], ...imports2],
32872
33016
  family: [...imports2, ...placeholder?.peachImports ?? []],
@@ -32886,7 +33030,7 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32886
33030
  `Configured Swift behavior ${module2}.${entry.path} was not emitted: ${entry.reason}`
32887
33031
  );
32888
33032
  }
32889
- import_node_fs48.default.writeFileSync(file, source);
33033
+ import_node_fs48.default.writeFileSync(file, source + trailer);
32890
33034
  const check2 = (0, import_node_child_process29.spawnSync)(
32891
33035
  import_node_path49.default.join(toolchain.toolchainBin, "swiftc"),
32892
33036
  // emitting the module runs the diagnostics a typecheck skips, such as
@@ -32910,10 +33054,10 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32910
33054
  return {
32911
33055
  module: module2,
32912
33056
  target: binary.target,
32913
- files: { [`${module2}.swift`]: source },
33057
+ files: { [`${module2}.swift`]: source + trailer },
32914
33058
  ...imports2.length ? { dependencies: imports2 } : {}
32915
33059
  };
32916
- const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
33060
+ const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size;
32917
33061
  const elsewhere = [];
32918
33062
  for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
32919
33063
  const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
@@ -32936,14 +33080,22 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
32936
33080
  throw new Error(
32937
33081
  `Configured Swift behavior ${module2}.${owner} does not typecheck: ${match[3]}`
32938
33082
  );
32939
- if (owner && /does not override any|overrides nothing/.test(match[3]))
33083
+ if (owner && /does not override any|overrides nothing|does not override a designated initializer/.test(
33084
+ match[3]
33085
+ ))
32940
33086
  plain.add(owner);
33087
+ else if (owner && /failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
33088
+ match[3]
33089
+ ) && !nonfailable.has(owner))
33090
+ nonfailable.add(owner);
33091
+ else if (owner && /requires an 'override' keyword/.test(match[3]) && !forced.has(owner))
33092
+ forced.add(owner);
32941
33093
  else if (owner && inert && INERT_VALUE.test(match[3]) && !trapped.has(owner))
32942
33094
  trapped.add(owner);
32943
33095
  else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
32944
33096
  else elsewhere.push(match[3]);
32945
33097
  }
32946
- if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
33098
+ if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
32947
33099
  throw new Error(
32948
33100
  `its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
32949
33101
  );
@@ -33757,7 +33909,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
33757
33909
  ...(binary.headerDependencies ?? []).map(
33758
33910
  (dependency) => `${swiftTargetModuleName(dependency.module)}\0${treeDigest(import_node_path49.default.join(binary.dir, dependency.path))}`
33759
33911
  ),
33760
- ...binary.assemblySources ?? []
33912
+ ...binary.unloweredSources ?? []
33761
33913
  ].join("\0") : swiftBinaryFramework(binary).digest
33762
33914
  );
33763
33915
  } catch {
@@ -34394,7 +34546,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
34394
34546
  const binaryHeaders = binarySearch.flatMap((search) => search.headers);
34395
34547
  const configuration = app.configuration === "Debug" ? "debug" : "release";
34396
34548
  for (const binary of binaries) {
34397
- if (!binary.reached || binary.publicHeaders === void 0 || binary.assemblySources !== void 0)
34549
+ if (!binary.reached || binary.publicHeaders === void 0 || binary.unloweredSources !== void 0)
34398
34550
  continue;
34399
34551
  const manifest = swiftPackageManifest(binary.dir);
34400
34552
  const target = manifest.targets.get(binary.target);
@@ -35758,9 +35910,9 @@ guard let dest = CGImageDestinationCreateWithURL(output as CFURL, UTType.png.ide
35758
35910
  CGImageDestinationAddImage(dest, image, nil)
35759
35911
  guard CGImageDestinationFinalize(dest) else { exit(7) }
35760
35912
  `;
35761
- function rasterBinary() {
35762
- const tag = (0, import_node_crypto28.createHash)("sha256").update(RASTER_SWIFT).digest("hex").slice(0, 16);
35763
- const binary = import_node_path53.default.join(cacheDir(), `swift-pdf-raster-${tag}`);
35913
+ function rasterBinary(swift = RASTER_SWIFT, name3 = "swift-pdf-raster") {
35914
+ const tag = (0, import_node_crypto28.createHash)("sha256").update(swift).digest("hex").slice(0, 16);
35915
+ const binary = import_node_path53.default.join(cacheDir(), `${name3}-${tag}`);
35764
35916
  try {
35765
35917
  import_node_fs52.default.accessSync(binary, import_node_fs52.default.constants.X_OK);
35766
35918
  return binary;
@@ -35772,7 +35924,7 @@ function rasterBinary() {
35772
35924
  import_node_fs52.default.mkdtempSync(import_node_path53.default.join(import_node_os14.default.tmpdir(), "swift-pdf-raster-")),
35773
35925
  "raster.swift"
35774
35926
  );
35775
- import_node_fs52.default.writeFileSync(source, RASTER_SWIFT);
35927
+ import_node_fs52.default.writeFileSync(source, swift);
35776
35928
  try {
35777
35929
  (0, import_node_child_process32.execFileSync)("xcrun", ["swiftc", "-o", binary, source], { stdio: "pipe" });
35778
35930
  } finally {
@@ -35830,6 +35982,49 @@ function rasterizePdfFile(diskPath, pdfSha256) {
35830
35982
  import_node_fs52.default.rmSync(import_node_path53.default.dirname(out), { recursive: true, force: true });
35831
35983
  }
35832
35984
  }
35985
+ var RASTER_SVG_SWIFT = `import AppKit
35986
+ guard CommandLine.arguments.count == 4 else { exit(1) }
35987
+ let input = URL(fileURLWithPath: CommandLine.arguments[1])
35988
+ let scale = CGFloat(Double(CommandLine.arguments[2]) ?? 3.0)
35989
+ let output = URL(fileURLWithPath: CommandLine.arguments[3])
35990
+ guard let image = NSImage(contentsOf: input), image.size.width > 0, image.size.height > 0 else { exit(2) }
35991
+ let width = Int(ceil(image.size.width * scale))
35992
+ let height = Int(ceil(image.size.height * scale))
35993
+ if width > 12000 || height > 12000 { exit(3) }
35994
+ guard let rep = NSBitmapImageRep(bitmapDataPlanes: nil, pixelsWide: width, pixelsHigh: height, bitsPerSample: 8, samplesPerPixel: 4, hasAlpha: true, isPlanar: false, colorSpaceName: .deviceRGB, bytesPerRow: 0, bitsPerPixel: 0) else { exit(4) }
35995
+ guard let context = NSGraphicsContext(bitmapImageRep: rep) else { exit(5) }
35996
+ NSGraphicsContext.saveGraphicsState()
35997
+ NSGraphicsContext.current = context
35998
+ context.imageInterpolation = .high
35999
+ image.draw(in: NSRect(x: 0, y: 0, width: width, height: height), from: .zero, operation: .copy, fraction: 1)
36000
+ NSGraphicsContext.restoreGraphicsState()
36001
+ guard let data = rep.representation(using: .png, properties: [:]) else { exit(6) }
36002
+ do { try data.write(to: output) } catch { exit(7) }
36003
+ `;
36004
+ function rasterizeSvgFile(diskPath, svgSha256) {
36005
+ if (process.platform !== "darwin") return null;
36006
+ const binary = rasterBinary(RASTER_SVG_SWIFT, "swift-svg-raster");
36007
+ const tag = (0, import_node_crypto28.createHash)("sha256").update(RASTER_SVG_SWIFT).digest("hex").slice(0, 16);
36008
+ const cached = import_node_path53.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
36009
+ if (import_node_fs52.default.existsSync(cached)) return { bytes: import_node_fs52.default.readFileSync(cached) };
36010
+ const out = import_node_path53.default.join(
36011
+ import_node_fs52.default.mkdtempSync(import_node_path53.default.join(import_node_os14.default.tmpdir(), "swift-svg-png-")),
36012
+ "out.png"
36013
+ );
36014
+ try {
36015
+ (0, import_node_child_process32.execFileSync)(binary, [diskPath, "3", out], { stdio: "pipe" });
36016
+ const bytes = import_node_fs52.default.readFileSync(out);
36017
+ import_node_fs52.default.mkdirSync(cacheDir(), { recursive: true });
36018
+ import_node_fs52.default.copyFileSync(out, cached);
36019
+ return { bytes: Buffer.from(bytes) };
36020
+ } catch (error) {
36021
+ throw new Error(
36022
+ `swift svg asset ${diskPath} did not rasterize: ${error instanceof Error ? error.message : String(error)}`
36023
+ );
36024
+ } finally {
36025
+ import_node_fs52.default.rmSync(import_node_path53.default.dirname(out), { recursive: true, force: true });
36026
+ }
36027
+ }
35833
36028
 
35834
36029
  // src/swift-standin-config.ts
35835
36030
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -35995,7 +36190,7 @@ async function swiftPackages(entry, app) {
35995
36190
  ] : []
35996
36191
  );
35997
36192
  let reached = [...cached.binaries.filter((binary) => binary.reached), ...vendored];
35998
- const standinArtifact = (binary) => binary.publicHeaders === void 0 || binary.assemblySources !== void 0;
36193
+ const standinArtifact = (binary) => binary.publicHeaders === void 0 || binary.unloweredSources !== void 0;
35999
36194
  const artifacts = reached.filter(standinArtifact);
36000
36195
  if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
36001
36196
  const resolved = swiftModuleToolchain(entry.moduleRoot);
@@ -36014,10 +36209,13 @@ async function swiftPackages(entry, app) {
36014
36209
  const cxxArtifacts = reached.filter(standinArtifact);
36015
36210
  const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
36016
36211
  if (cached.standinKey !== generation) {
36212
+ const replaced = new Set(
36213
+ cxxArtifacts.filter((binary) => shippedBinaryDiffers(binary.target, binary.checksum)).map((binary) => binary.target)
36214
+ );
36017
36215
  const built2 = await swiftStandins(
36018
36216
  cxxArtifacts,
36019
36217
  toolchain,
36020
- entry.provided,
36218
+ new Set([...entry.provided].filter((name3) => !replaced.has(name3))),
36021
36219
  entry.behavior
36022
36220
  );
36023
36221
  cached.packages = await resolveSwiftPackagesAsync({
@@ -36031,6 +36229,9 @@ async function swiftPackages(entry, app) {
36031
36229
  ...entry.provided,
36032
36230
  ...cxxArtifacts.map((binary) => binary.target).filter((target) => !built2.gaps.has(target))
36033
36231
  ]),
36232
+ standinTargets: new Set(
36233
+ [...replaced].filter((target) => !built2.gaps.has(target))
36234
+ ),
36034
36235
  binaryGaps: built2.gaps,
36035
36236
  owners
36036
36237
  });
@@ -36930,6 +37131,12 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
36930
37131
  throw new Error("swift image pack exceeds the compile service caps");
36931
37132
  }
36932
37133
  bytes = readPackageFile2(project.packagePath, disk, limits.imageBytes);
37134
+ const svg = ext === ".svg" ? rasterizeSvgFile(disk, (0, import_node_crypto29.createHash)("sha256").update(bytes).digest("hex")) : null;
37135
+ if (svg) {
37136
+ bytes = svg.bytes;
37137
+ ext = ".png";
37138
+ uploadName = `${import_node_path54.default.posix.basename(file, import_node_path54.default.posix.extname(file))}.png`;
37139
+ }
36933
37140
  }
36934
37141
  if (imageBytes + bytes.length > limits.imageTotalBytes) {
36935
37142
  throw new Error("swift image pack exceeds the compile service caps");
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2210 | (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;
@@ -1909,7 +1909,7 @@ function readIosSdkTree(root) {
1909
1909
 
1910
1910
  // src/swift-standin-digest.ts
1911
1911
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1912
- var STANDIN_SOURCE_DIGEST = true ? "30ee25efff915489853ffb5c34661d03b2ca480fc48fe80201fced1d4821577a" : standinSourceDigest();
1912
+ var STANDIN_SOURCE_DIGEST = true ? "9adf53d6f1cfece1b7a3e23bad712630278818d71b5b718384cf640144349600" : standinSourceDigest();
1913
1913
 
1914
1914
  // src/expo-native-workspace.ts
1915
1915
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -5403,7 +5403,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
5403
5403
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
5404
5404
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
5405
5405
  ).join("");
5406
- var compilerSourceDigest = true ? "f113c3b74986e3d582dde643cb5771f750e5c836703fb20a79a1d67a53884748" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5406
+ var compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5407
5407
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
5408
5408
  "CFAllocator",
5409
5409
  "CFArray",
@@ -5423,6 +5423,19 @@ var CORE_FOUNDATION_HANDLE_IMPORTS = [
5423
5423
  "import typealias CoreFoundation.CFTypeRef",
5424
5424
  "import CoreGraphics"
5425
5425
  ]).join("; ");
5426
+ var emptyMacroEnvironment = {
5427
+ defines: /* @__PURE__ */ new Map(),
5428
+ predefines: /* @__PURE__ */ new Map(),
5429
+ targetDefined: /* @__PURE__ */ new Set()
5430
+ };
5431
+ var wasmMacroEnvironment = {
5432
+ ...emptyMacroEnvironment,
5433
+ defines: /* @__PURE__ */ new Map([
5434
+ ["__wasm__", "1"],
5435
+ ["__wasm32__", "1"],
5436
+ ["__wasi__", "1"]
5437
+ ])
5438
+ };
5426
5439
  var ROOT_LOCKS = Symbol.for("peachsim.swiftCompile.rootLocks");
5427
5440
  var host = globalThis;
5428
5441
  var rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2210 | (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.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2210 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";