peachsim 0.1.2179 → 0.1.2182
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.
- package/cli/commands/package.ts +7 -2
- package/cli/commands/shell-url.ts +28 -22
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +225 -85
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +140 -48
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +201 -82
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +4 -4
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +11 -3
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +239 -176
- package/dist-lib/swift-compile.cjs +85 -16
- package/dist-lib/swift-compile.mjs +85 -16
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +87 -18
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/frame-art.d.ts +41 -0
- package/dist-types/packages/peach-engine/src/ios/frame-paint.d.ts +43 -0
- package/dist-types/packages/peach-engine/src/ios/frame-svg.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +14 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +8 -25
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +26 -0
- package/src/expo-native-workspace.ts +17 -20
- package/src/expo-swift-bundle.ts +6 -1
- package/src/expo-swift-host.ts +35 -6
- package/src/expo-widgets-bundle.ts +12 -8
- package/src/expoSwiftContract.ts +3 -0
- package/src/kotlin-host.ts +10 -2
- package/src/native-bundles.ts +30 -10
- package/src/one-sdk/source.ts +10 -4
- package/src/one-sdk-bundle.ts +57 -24
- package/src/screenshots/frame-compose.ts +14 -109
- package/src/swift-compile.ts +105 -13
- package/src/swift-submit.ts +2 -1
- package/src/wasm-optimize.ts +13 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2182 | (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;
|
|
@@ -12080,7 +12080,7 @@ var init_swift_standin_digest = __esm({
|
|
|
12080
12080
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
12081
12081
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
12082
12082
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
12083
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
12083
|
+
STANDIN_SOURCE_DIGEST = true ? "cc396d180b261e922288f645807b4a704fa92410ffc902bfbaac72b81af6413a" : standinSourceDigest();
|
|
12084
12084
|
}
|
|
12085
12085
|
});
|
|
12086
12086
|
|
|
@@ -12362,7 +12362,7 @@ var init_nitro_superset = __esm({
|
|
|
12362
12362
|
init_nitroContract();
|
|
12363
12363
|
init_swift_standin_digest();
|
|
12364
12364
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
12365
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
12365
|
+
NITRO_COMPILER_DIGEST = true ? "4b0c1069391aa3533d7f86ec0218e3db332433aaaa017425707f0273d51d8ce5" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
12366
12366
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
12367
12367
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
12368
12368
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -12383,7 +12383,7 @@ var init_nitro_superset = __esm({
|
|
|
12383
12383
|
var runtime_companion_default;
|
|
12384
12384
|
var init_runtime_companion = __esm({
|
|
12385
12385
|
"runtime-companion.json"() {
|
|
12386
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
12386
|
+
runtime_companion_default = { abi: 1, sha256: "d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f", file: "node/cli-d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f.cjs" };
|
|
12387
12387
|
}
|
|
12388
12388
|
});
|
|
12389
12389
|
|
|
@@ -13386,7 +13386,11 @@ function entrySource(ids) {
|
|
|
13386
13386
|
"",
|
|
13387
13387
|
"@OptIn(kotlin.js.ExperimentalJsExport::class)",
|
|
13388
13388
|
"@JsExport",
|
|
13389
|
-
"fun
|
|
13389
|
+
"fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
13390
|
+
" Build.setDevice(model, release, apiLevel)",
|
|
13391
|
+
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
13392
|
+
" java.util.TimeZone.setDevice(timeZone)",
|
|
13393
|
+
"}",
|
|
13390
13394
|
"",
|
|
13391
13395
|
"@OptIn(kotlin.js.ExperimentalJsExport::class, kotlinx.coroutines.DelicateCoroutinesApi::class)",
|
|
13392
13396
|
"@JsExport",
|
|
@@ -13753,8 +13757,12 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
|
|
|
13753
13757
|
" ))",
|
|
13754
13758
|
"}",
|
|
13755
13759
|
"",
|
|
13756
|
-
"@JsExport fun
|
|
13760
|
+
"@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
13757
13761
|
" android.os.Build.setDevice(model, release, apiLevel)",
|
|
13762
|
+
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
13763
|
+
" java.util.TimeZone.setDevice(timeZone)",
|
|
13764
|
+
" PeachExpoRuntime.configureProcessLocale(locale)",
|
|
13765
|
+
"}",
|
|
13758
13766
|
"",
|
|
13759
13767
|
"@JsExport fun peachExpoListen(notify: () -> Unit) {",
|
|
13760
13768
|
" registered",
|
|
@@ -18866,7 +18874,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
18866
18874
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
18867
18875
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
18868
18876
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
18869
|
-
var SWIFT_HOST_ABI =
|
|
18877
|
+
var SWIFT_HOST_ABI = 70;
|
|
18870
18878
|
var POLL_INTERVAL_MS = 1500;
|
|
18871
18879
|
function httpSwiftCompileSubmit(context) {
|
|
18872
18880
|
const { assetReadToken, authorization, endpoint } = context;
|
|
@@ -34250,6 +34258,13 @@ var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
|
|
|
34250
34258
|
]
|
|
34251
34259
|
]);
|
|
34252
34260
|
async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
34261
|
+
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
34262
|
+
const requestedCores = Number(process.env.BINARYEN_CORES);
|
|
34263
|
+
const environment = { ...process.env, WASM_OPT_PATH: binary2 };
|
|
34264
|
+
if (Number.isInteger(admittedCores) && admittedCores > 0)
|
|
34265
|
+
environment.BINARYEN_CORES = String(
|
|
34266
|
+
Number.isInteger(requestedCores) && requestedCores > 0 ? Math.min(admittedCores, requestedCores) : admittedCores
|
|
34267
|
+
);
|
|
34253
34268
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
34254
34269
|
[
|
|
34255
34270
|
"-Oz",
|
|
@@ -34259,7 +34274,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
34259
34274
|
"-o",
|
|
34260
34275
|
output2
|
|
34261
34276
|
],
|
|
34262
|
-
{ env:
|
|
34277
|
+
{ env: environment }
|
|
34263
34278
|
);
|
|
34264
34279
|
if (result.status !== 0)
|
|
34265
34280
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -36327,7 +36342,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
36327
36342
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
36328
36343
|
var MULTI_MANIFEST_VERSION = 68;
|
|
36329
36344
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
36330
|
-
var compilerSourceDigest = true ? "
|
|
36345
|
+
var compilerSourceDigest = true ? "73960368f0b83cf042511655d857d5f64204fa539e2c984423a12c08657b068e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
36331
36346
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
36332
36347
|
const hash = (0, import_node_crypto23.createHash)("sha256");
|
|
36333
36348
|
hash.update(`swift-compile
|
|
@@ -36453,6 +36468,20 @@ function emitSwiftPackageManifest(args) {
|
|
|
36453
36468
|
const prebuilt = args.prebuilt;
|
|
36454
36469
|
const linkedObjects = Boolean(distribution || prebuilt);
|
|
36455
36470
|
const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
|
|
36471
|
+
const packageModules = new Set(
|
|
36472
|
+
targets.filter(({ name: name3 }) => !args.sourceSwiftTargets?.has(name3)).map(({ name: name3 }) => swiftTargetModuleName(name3))
|
|
36473
|
+
);
|
|
36474
|
+
const mapsPackageModule = (flag) => {
|
|
36475
|
+
if (!flag.startsWith("-fmodule-map-file=")) return false;
|
|
36476
|
+
const file = flag.slice("-fmodule-map-file=".length).replaceAll(SWIFT_NATIVE_INPUT_ROOT, args.root);
|
|
36477
|
+
if (!file.includes("/Pods/Headers/")) return false;
|
|
36478
|
+
const map2 = args.files.get(file) ?? ((0, import_node_fs52.existsSync)(file) ? (0, import_node_fs52.readFileSync)(file) : void 0);
|
|
36479
|
+
const name3 = map2 === void 0 ? void 0 : moduleMapName(map2.toString());
|
|
36480
|
+
return name3 !== void 0 && packageModules.has(name3);
|
|
36481
|
+
};
|
|
36482
|
+
const withoutPackageModuleMaps = (flags) => flags.filter((flag) => !mapsPackageModule(flag));
|
|
36483
|
+
const targetCFlags = (flags) => cFlagArray(withoutPackageModuleMaps(flags));
|
|
36484
|
+
const targetCxxFlags = (flags) => cxxFlagArray(withoutPackageModuleMaps(flags));
|
|
36456
36485
|
const reachedFrameworks = /* @__PURE__ */ new Set();
|
|
36457
36486
|
const reach = (name3) => {
|
|
36458
36487
|
if (reachedFrameworks.has(name3) || targets.some((target) => swiftTargetModuleName(target.name) === name3))
|
|
@@ -36532,7 +36561,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
36532
36561
|
const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
|
|
36533
36562
|
const flagArray = (literal3) => `peachCompilerArguments(${JSON.stringify(literal3.replace(/,\s*]$/, "]"))})`;
|
|
36534
36563
|
const swiftFlagArray = (literal3) => {
|
|
36535
|
-
const flags = JSON.parse(literal3.replace(/,\s*]$/, "]"))
|
|
36564
|
+
const flags = JSON.parse(literal3.replace(/,\s*]$/, "]")).filter(
|
|
36565
|
+
(flag, index, all) => !mapsPackageModule(flag) && !(flag === "-Xcc" && mapsPackageModule(all[index + 1] ?? ""))
|
|
36566
|
+
);
|
|
36536
36567
|
const content = flags.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
36537
36568
|
const digest3 = (0, import_node_crypto23.createHash)("sha256").update(content).digest("hex");
|
|
36538
36569
|
const file = import_node_path50.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
|
|
@@ -36692,18 +36723,18 @@ function emitSwiftPackageManifest(args) {
|
|
|
36692
36723
|
"c"
|
|
36693
36724
|
).map((entry) => ` ${entry},`).join(
|
|
36694
36725
|
""
|
|
36695
|
-
)} .unsafeFlags(${flagArray(
|
|
36726
|
+
)} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native.clang.flags]))})]`,
|
|
36696
36727
|
...nativeCxx ? [
|
|
36697
36728
|
`cxxSettings: [${cxxDefines}${clangSettingEntries(
|
|
36698
36729
|
frameworkSearchFlags(target, "cxx"),
|
|
36699
36730
|
"cxx"
|
|
36700
36731
|
).map((entry) => ` ${entry},`).join(
|
|
36701
36732
|
""
|
|
36702
|
-
)} .unsafeFlags(${flagArray(
|
|
36733
|
+
)} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`
|
|
36703
36734
|
] : []
|
|
36704
36735
|
].join(", ") : [
|
|
36705
|
-
`cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(
|
|
36706
|
-
`cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(
|
|
36736
|
+
`cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native?.flags ?? []]))})]`,
|
|
36737
|
+
`cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native?.cxxFlags ?? []]))})]`
|
|
36707
36738
|
].join(", ");
|
|
36708
36739
|
const exclusions = native?.clang ? [] : [
|
|
36709
36740
|
...native ? native.exclude ?? native.lateSources : [],
|
|
@@ -36772,9 +36803,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
36772
36803
|
` path: ${JSON.stringify(group.path)},`,
|
|
36773
36804
|
` sources: ${JSON.stringify(group.sources)},`,
|
|
36774
36805
|
` publicHeadersPath: ${JSON.stringify(native.groups ? "include" : "PeachSwiftImplementation")},`,
|
|
36775
|
-
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(
|
|
36806
|
+
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
|
|
36776
36807
|
...group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source)) ? [
|
|
36777
|
-
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(
|
|
36808
|
+
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
|
|
36778
36809
|
] : [" ),"]
|
|
36779
36810
|
]) : [];
|
|
36780
36811
|
}),
|
|
@@ -38301,7 +38332,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
38301
38332
|
const target = bySourcePath.find(
|
|
38302
38333
|
(candidate) => candidate.path === "." || file.startsWith(`${candidate.path}/`)
|
|
38303
38334
|
);
|
|
38304
|
-
|
|
38335
|
+
const excluded = target?.exclude?.some(
|
|
38336
|
+
(name3) => file === import_node_path50.default.posix.join(target.path, name3)
|
|
38337
|
+
);
|
|
38338
|
+
if (target && !excluded) swiftTargets.add(target.name);
|
|
38305
38339
|
}
|
|
38306
38340
|
const importedModules = /* @__PURE__ */ new Set();
|
|
38307
38341
|
const swiftImportedModules = /* @__PURE__ */ new Set();
|
|
@@ -39347,6 +39381,9 @@ module ${moduleName2}.Swift {
|
|
|
39347
39381
|
frameworkLink,
|
|
39348
39382
|
[
|
|
39349
39383
|
...prebuilt.objects.map(quote),
|
|
39384
|
+
"-Wl,--start-lib",
|
|
39385
|
+
...prebuilt.lazyObjects.map(quote),
|
|
39386
|
+
"-Wl,--end-lib",
|
|
39350
39387
|
...darwinRecordsRegion(prebuilt.providers.map(quote))
|
|
39351
39388
|
].join("\n") + "\n"
|
|
39352
39389
|
);
|
|
@@ -39632,7 +39669,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
39632
39669
|
return null;
|
|
39633
39670
|
const bytes = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "app.wasm"));
|
|
39634
39671
|
const gzip2 = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "icu.gz"));
|
|
39635
|
-
if ((0, import_node_crypto23.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto23.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length
|
|
39672
|
+
if ((0, import_node_crypto23.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto23.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
39636
39673
|
return null;
|
|
39637
39674
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 } };
|
|
39638
39675
|
} catch (error) {
|
|
@@ -39753,7 +39790,13 @@ function linkedFrameworkTargets(moduleRoot, input) {
|
|
|
39753
39790
|
);
|
|
39754
39791
|
const targets = compileTargets(input);
|
|
39755
39792
|
const planning = targets.length > 0 ? targets : [{ name: "App", path: "." }];
|
|
39756
|
-
const siblings = swiftTargetDependencies(
|
|
39793
|
+
const siblings = swiftTargetDependencies(
|
|
39794
|
+
input.files,
|
|
39795
|
+
planning.map(
|
|
39796
|
+
(target) => input.libraries?.[target.name] ? { ...target, exclude: [] } : target
|
|
39797
|
+
),
|
|
39798
|
+
libraries.keys()
|
|
39799
|
+
);
|
|
39757
39800
|
const reached = /* @__PURE__ */ new Set();
|
|
39758
39801
|
const reach = (name3) => {
|
|
39759
39802
|
if (name3 === "SwiftUI") return;
|
|
@@ -40055,9 +40098,31 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
40055
40098
|
}
|
|
40056
40099
|
const providers = (0, import_node_fs52.readdirSync)(providerDir).filter((file) => file.endsWith(".o")).sort().map((file) => import_node_path50.default.join(providerDir, file));
|
|
40057
40100
|
for (const provider of providers) linked.owners.set(provider, "DarwinRecords");
|
|
40101
|
+
const archive = import_node_path50.default.join(scratch2, "lib");
|
|
40102
|
+
(0, import_node_fs52.rmSync)(archive, { recursive: true, force: true });
|
|
40103
|
+
(0, import_node_fs52.mkdirSync)(archive);
|
|
40104
|
+
const archived = /* @__PURE__ */ new Map();
|
|
40105
|
+
for (const object6 of objects) {
|
|
40106
|
+
const target = linked.owners.get(object6);
|
|
40107
|
+
const dir = import_node_path50.default.join(release, `${target}.build`);
|
|
40108
|
+
if (!target || target === "Darwin" || !object6.startsWith(dir + import_node_path50.default.sep)) continue;
|
|
40109
|
+
const name3 = `${target}-${import_node_path50.default.relative(dir, object6).replaceAll(import_node_path50.default.sep, "-").replace(/\.swift\.o$/, ".o")}`;
|
|
40110
|
+
(0, import_node_fs52.symlinkSync)(object6, import_node_path50.default.join(archive, name3));
|
|
40111
|
+
archived.set(object6, `lib/${name3}`);
|
|
40112
|
+
}
|
|
40113
|
+
const roots = swiftObjcRootObjects(`${scratch2}
|
|
40114
|
+
${args.frameworkKey}`, scratch2, [
|
|
40115
|
+
...archived.values()
|
|
40116
|
+
]);
|
|
40117
|
+
const linkedObjects = objects.map((object6) => {
|
|
40118
|
+
const name3 = archived.get(object6);
|
|
40119
|
+
return name3 ? { path: import_node_path50.default.join(scratch2, name3), lazy: !roots.has(name3) } : { path: object6, lazy: false };
|
|
40120
|
+
});
|
|
40058
40121
|
return {
|
|
40122
|
+
root: scratch2,
|
|
40059
40123
|
modules: import_node_path50.default.join(release, "Modules"),
|
|
40060
|
-
objects,
|
|
40124
|
+
objects: linkedObjects.filter((object6) => !object6.lazy).map((object6) => object6.path),
|
|
40125
|
+
lazyObjects: linkedObjects.filter((object6) => object6.lazy).map((object6) => object6.path),
|
|
40061
40126
|
owners: linked.owners,
|
|
40062
40127
|
providers,
|
|
40063
40128
|
link,
|
|
@@ -40211,6 +40276,10 @@ ${args.frameworkKey}
|
|
|
40211
40276
|
for (const object6 of args.prebuilt.objects)
|
|
40212
40277
|
hash.update(`object
|
|
40213
40278
|
${object6}
|
|
40279
|
+
${statOf(object6)}`);
|
|
40280
|
+
for (const object6 of args.prebuilt.lazyObjects)
|
|
40281
|
+
hash.update(`lazy-object
|
|
40282
|
+
${object6}
|
|
40214
40283
|
${statOf(object6)}`);
|
|
40215
40284
|
for (const object6 of args.prebuilt.providers)
|
|
40216
40285
|
hash.update(`provider
|
|
@@ -40627,7 +40696,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
40627
40696
|
pruneSwiftWasmLink(
|
|
40628
40697
|
root,
|
|
40629
40698
|
options.toolchainBin,
|
|
40630
|
-
frameworkRoot,
|
|
40699
|
+
prebuilt?.root ?? frameworkRoot,
|
|
40631
40700
|
input.staticClangTargets,
|
|
40632
40701
|
options.project,
|
|
40633
40702
|
void 0,
|
|
@@ -40651,11 +40720,19 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
40651
40720
|
optimized
|
|
40652
40721
|
});
|
|
40653
40722
|
else if (input.optimize) await optimizeWasm(output2, optimized);
|
|
40723
|
+
const executable = input.optimize ? optimized : output2;
|
|
40724
|
+
await runCompiler(
|
|
40725
|
+
import_node_path50.default.join(options.toolchainBin, "llvm-objcopy"),
|
|
40726
|
+
["--remove-section=.swift1_autolink_entries", executable],
|
|
40727
|
+
buildOptions
|
|
40728
|
+
);
|
|
40654
40729
|
const artifact = {
|
|
40655
40730
|
hash,
|
|
40656
|
-
bytes: (0, import_node_fs52.readFileSync)(
|
|
40731
|
+
bytes: (0, import_node_fs52.readFileSync)(executable),
|
|
40657
40732
|
icu: await icu
|
|
40658
40733
|
};
|
|
40734
|
+
if (artifact.bytes.length <= 8)
|
|
40735
|
+
throw new Error("swift-compile: deferred linker produced no executable");
|
|
40659
40736
|
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
40660
40737
|
saveSharedArtifact(sharedRoot, artifact);
|
|
40661
40738
|
report("compiled artifact verified");
|
|
@@ -44947,6 +45024,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
44947
45024
|
const nodeVersion = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? manifest.engines.node : null;
|
|
44948
45025
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, "--"] : [];
|
|
44949
45026
|
const bunPrefix = import_node_path61.default.join(cacheDir(), "package-managers", manager);
|
|
45027
|
+
const bunExecutable = import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
44950
45028
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
44951
45029
|
"npx",
|
|
44952
45030
|
"--yes",
|
|
@@ -44955,11 +45033,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
44955
45033
|
"--frozen-lockfile",
|
|
44956
45034
|
// the copied node_modules link into the store pnpm chose on the app's volume
|
|
44957
45035
|
...pnpmStoreArgs(root)
|
|
44958
|
-
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [
|
|
44959
|
-
import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun"),
|
|
44960
|
-
"install",
|
|
44961
|
-
"--frozen-lockfile"
|
|
44962
|
-
] : (
|
|
45036
|
+
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [bunExecutable, "install", "--frozen-lockfile"] : (
|
|
44963
45037
|
// npm ci would delete the cloned tree before installing it again
|
|
44964
45038
|
["npm", "install", "--no-audit", "--no-fund"]
|
|
44965
45039
|
);
|
|
@@ -44968,22 +45042,22 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
44968
45042
|
const command = [...prefix, ...args];
|
|
44969
45043
|
await run11(command[0], command.slice(1), cwd, env);
|
|
44970
45044
|
};
|
|
45045
|
+
if (manager.startsWith("bun@") && (!projectReady || !import_node_fs62.default.existsSync(bunExecutable)))
|
|
45046
|
+
await execute(
|
|
45047
|
+
[
|
|
45048
|
+
"npm",
|
|
45049
|
+
"install",
|
|
45050
|
+
"--prefix",
|
|
45051
|
+
bunPrefix,
|
|
45052
|
+
// the bun package ships a placeholder binary its postinstall replaces
|
|
45053
|
+
"--ignore-scripts=false",
|
|
45054
|
+
"--no-audit",
|
|
45055
|
+
"--no-fund",
|
|
45056
|
+
manager
|
|
45057
|
+
],
|
|
45058
|
+
work
|
|
45059
|
+
);
|
|
44971
45060
|
if (!projectReady) {
|
|
44972
|
-
if (manager.startsWith("bun@"))
|
|
44973
|
-
await execute(
|
|
44974
|
-
[
|
|
44975
|
-
"npm",
|
|
44976
|
-
"install",
|
|
44977
|
-
"--prefix",
|
|
44978
|
-
bunPrefix,
|
|
44979
|
-
// the bun package ships a placeholder binary its postinstall replaces
|
|
44980
|
-
"--ignore-scripts=false",
|
|
44981
|
-
"--no-audit",
|
|
44982
|
-
"--no-fund",
|
|
44983
|
-
manager
|
|
44984
|
-
],
|
|
44985
|
-
work
|
|
44986
|
-
);
|
|
44987
45061
|
if (install[0] === "npm" && import_node_fs62.default.existsSync(import_node_path61.default.join(work, "package-lock.json"))) {
|
|
44988
45062
|
await execute(
|
|
44989
45063
|
["npm", "ci", "--dry-run", "--ignore-scripts", "--no-audit", "--no-fund"],
|
|
@@ -45759,7 +45833,7 @@ init_package_tree_digest();
|
|
|
45759
45833
|
init_swift_native_pin();
|
|
45760
45834
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
45761
45835
|
function expoNativeCompilerDigestValue() {
|
|
45762
|
-
return true ? "
|
|
45836
|
+
return true ? "2799fbdcc514ac59227047679bf5780658834c45f46965b7b41455f6453d53e2" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
45763
45837
|
}
|
|
45764
45838
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
45765
45839
|
function readSources(value) {
|
|
@@ -62297,7 +62371,15 @@ function targetSettings2(units) {
|
|
|
62297
62371
|
}
|
|
62298
62372
|
return settings;
|
|
62299
62373
|
}
|
|
62300
|
-
function
|
|
62374
|
+
function oneSDKStamp(oneSDK) {
|
|
62375
|
+
if (!oneSDK) return "";
|
|
62376
|
+
const hash = (0, import_node_crypto47.createHash)("sha256");
|
|
62377
|
+
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
62378
|
+
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
62379
|
+
hash.update(`${name3}\0${source}\0`);
|
|
62380
|
+
return hash.digest("hex");
|
|
62381
|
+
}
|
|
62382
|
+
function expoEntry(units, oneSDK = false) {
|
|
62301
62383
|
const namespaces = [...new Set(units.map((unit2) => unit2.namespace))].filter((namespace) => namespace !== "PeachExpoApp").filter(
|
|
62302
62384
|
(namespace) => units.some(
|
|
62303
62385
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
@@ -62307,13 +62389,14 @@ function expoEntry(units) {
|
|
|
62307
62389
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
62308
62390
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
62309
62391
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
62392
|
+
const view = oneSDK ? '@ViewBuilder func view(props: JSON) -> some View {\n if props["oneSDKHost"] != nil { OneSDKUIKitHost(props: props) } else { PeachExpoNativeView(props: props) }\n }' : "func view(props: JSON) -> PeachExpoNativeView { PeachExpoNativeView(props: props) }";
|
|
62310
62393
|
return `import SwiftUI
|
|
62311
62394
|
internal import ExpoModulesCore
|
|
62312
|
-
${bridgeModules.length ? "import React\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
62395
|
+
${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport OneSDKBindings\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
62313
62396
|
|
|
62314
62397
|
@main struct PeachExpoApp: PeachPackage {
|
|
62315
62398
|
init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit2) => unit2.classes).join(", ")}])${delegates}${bridgeModules.length ? `; RCTModuleHost.register([${bridgeModules.join(", ")}])` : ""} } }
|
|
62316
|
-
|
|
62399
|
+
${view}
|
|
62317
62400
|
}
|
|
62318
62401
|
|
|
62319
62402
|
@_expose(wasm, "peach_expo_call")
|
|
@@ -62410,7 +62493,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
62410
62493
|
installSwiftInputTrace();
|
|
62411
62494
|
let key2;
|
|
62412
62495
|
try {
|
|
62413
|
-
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}`;
|
|
62496
|
+
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}\0${oneSDKStamp(options.oneSDK)}`;
|
|
62414
62497
|
} catch {
|
|
62415
62498
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
62416
62499
|
}
|
|
@@ -62447,11 +62530,23 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62447
62530
|
throw new Error(`conflicting Expo Swift binary source ${name3}`);
|
|
62448
62531
|
files2[name3] = source;
|
|
62449
62532
|
}
|
|
62450
|
-
|
|
62533
|
+
const settings = targetSettings2(linked2);
|
|
62534
|
+
if (options.oneSDK) {
|
|
62535
|
+
for (const [name3, source] of options.oneSDK.targets) files2[name3] = source;
|
|
62536
|
+
for (const [name3, source] of options.oneSDK.entry)
|
|
62537
|
+
files2[`Sources/PeachExpoApp/${name3}`] = source;
|
|
62538
|
+
settings.set("OneSDKBindings", {
|
|
62539
|
+
languageMode: 5,
|
|
62540
|
+
mainActorIsolation: false,
|
|
62541
|
+
swiftFlags: ["-suppress-warnings"],
|
|
62542
|
+
dependencies: [{ kind: "target", name: "One" }]
|
|
62543
|
+
});
|
|
62544
|
+
}
|
|
62545
|
+
files2[EXPO_SWIFT_ENTRY] = expoEntry(linked2, options.oneSDK !== void 0);
|
|
62451
62546
|
files2["Package.swift"] = expoManifest(
|
|
62452
62547
|
files2,
|
|
62453
62548
|
linked2.map((unit2) => generations.get(unit2) ?? "").join(","),
|
|
62454
|
-
|
|
62549
|
+
settings
|
|
62455
62550
|
);
|
|
62456
62551
|
const provider = linked2.some((unit2) => unit2.reactNativeProvider) ? reactProvider : void 0;
|
|
62457
62552
|
if (provider) {
|
|
@@ -62812,7 +62907,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62812
62907
|
stamps.set(unit2, stamp);
|
|
62813
62908
|
candidates.push(unit2);
|
|
62814
62909
|
}
|
|
62815
|
-
const preparedKey = expoSwiftPreparedKey(
|
|
62910
|
+
const preparedKey = expoSwiftPreparedKey(
|
|
62911
|
+
base,
|
|
62912
|
+
units,
|
|
62913
|
+
reactProviderStamp + oneSDKStamp(options.oneSDK)
|
|
62914
|
+
);
|
|
62816
62915
|
if (!publishArtifact) {
|
|
62817
62916
|
const prepared = preparedExpoSwift.get(preparedKey);
|
|
62818
62917
|
if (prepared) {
|
|
@@ -64611,18 +64710,21 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
64611
64710
|
throw error;
|
|
64612
64711
|
}
|
|
64613
64712
|
const packageDir = import_node_path96.default.dirname(manifest);
|
|
64614
|
-
await (
|
|
64615
|
-
|
|
64616
|
-
|
|
64617
|
-
|
|
64713
|
+
const runtimeBundle = await withSwiftRootLock(
|
|
64714
|
+
import_node_path96.default.join(await import_promises9.default.realpath(packageDir), "bundle"),
|
|
64715
|
+
async () => {
|
|
64716
|
+
await (0, import_node_util17.promisify)(import_node_child_process46.execFile)(
|
|
64717
|
+
process.env.NODE_BINARY || "node",
|
|
64718
|
+
[import_node_path96.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
64719
|
+
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
64720
|
+
);
|
|
64721
|
+
return import_promises9.default.readFile(import_node_path96.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
|
|
64722
|
+
}
|
|
64618
64723
|
);
|
|
64619
64724
|
const catalog = await stageExpoWidgetAssets(appRoot, origin);
|
|
64620
64725
|
return {
|
|
64621
64726
|
metadata: {
|
|
64622
|
-
runtimeBundle
|
|
64623
|
-
import_node_path96.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"),
|
|
64624
|
-
"utf8"
|
|
64625
|
-
),
|
|
64727
|
+
runtimeBundle,
|
|
64626
64728
|
images: catalog?.images ?? {}
|
|
64627
64729
|
}
|
|
64628
64730
|
};
|
|
@@ -64674,12 +64776,11 @@ extension OneNativeComposable {
|
|
|
64674
64776
|
public func propagateActive(_ active: Bool) {}
|
|
64675
64777
|
}
|
|
64676
64778
|
`;
|
|
64677
|
-
var
|
|
64779
|
+
var oneSDKHost = String.raw`import SwiftUI
|
|
64678
64780
|
@_spi(Peach) import UIKit
|
|
64679
64781
|
import One
|
|
64680
|
-
import OneSDKBindings
|
|
64681
64782
|
|
|
64682
|
-
|
|
64783
|
+
struct OneSDKUIKitHost: UIViewRepresentable {
|
|
64683
64784
|
let props: JSON
|
|
64684
64785
|
func makeUIView(context: Context) -> OneNativeUIKitHostView { OneNativeUIKitHostView() }
|
|
64685
64786
|
func updateUIView(_ view: OneNativeUIKitHostView, context: Context) {
|
|
@@ -64691,10 +64792,14 @@ private struct UIKitHost: UIViewRepresentable {
|
|
|
64691
64792
|
}
|
|
64692
64793
|
static func dismantleUIView(_ view: OneNativeUIKitHostView, coordinator: Coordinator) { view.reset() }
|
|
64693
64794
|
}
|
|
64795
|
+
`;
|
|
64796
|
+
var oneSDKApp = String.raw`import SwiftUI
|
|
64797
|
+
import One
|
|
64798
|
+
import OneSDKBindings
|
|
64694
64799
|
|
|
64695
64800
|
@main
|
|
64696
64801
|
struct SDKGuest: PeachPackage {
|
|
64697
|
-
func view(props: JSON) -> some View {
|
|
64802
|
+
func view(props: JSON) -> some View { OneSDKUIKitHost(props: props) }
|
|
64698
64803
|
}
|
|
64699
64804
|
`;
|
|
64700
64805
|
var oneSDKTransport = String.raw`import Foundation
|
|
@@ -64992,7 +65097,7 @@ async function compileOneSDKApp(appRoot, origin, moduleRootOverride) {
|
|
|
64992
65097
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
64993
65098
|
return compilePreparedOneSDKApp(appRoot, prepared.app, origin, moduleRootOverride);
|
|
64994
65099
|
}
|
|
64995
|
-
async function
|
|
65100
|
+
async function oneSDKLinkSources(appRoot, preparedRoot) {
|
|
64996
65101
|
const selected = await selectOneSDK(appRoot);
|
|
64997
65102
|
if (!selected) throw new Error("prepared app has no One SDK imports");
|
|
64998
65103
|
const { one, frameworks } = selected;
|
|
@@ -65007,6 +65112,35 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
65007
65112
|
throw new Error(
|
|
65008
65113
|
"prepared One SDK sources differ from the installed facades or app imports"
|
|
65009
65114
|
);
|
|
65115
|
+
const targets = /* @__PURE__ */ new Map();
|
|
65116
|
+
targets.set("Sources/One/One.swift", oneSDKModule);
|
|
65117
|
+
for (const source of [
|
|
65118
|
+
"SDK/OneSDKRuntime.swift",
|
|
65119
|
+
"OneNativeUIKitHostView.swift",
|
|
65120
|
+
"OneNativeContent.swift",
|
|
65121
|
+
"OneNativeAccessibility.swift",
|
|
65122
|
+
"SDKViews/OneNativeViewsTable.swift"
|
|
65123
|
+
])
|
|
65124
|
+
targets.set(
|
|
65125
|
+
`Sources/One/${import_node_path97.default.basename(source)}`,
|
|
65126
|
+
import_node_fs98.default.readFileSync(import_node_path97.default.join(one, "ios", source), "utf8")
|
|
65127
|
+
);
|
|
65128
|
+
for (const name3 of generated.files)
|
|
65129
|
+
targets.set(
|
|
65130
|
+
`Sources/OneSDKBindings/${name3}`,
|
|
65131
|
+
import_node_fs98.default.readFileSync(import_node_path97.default.join(sourceRoot, name3), "utf8")
|
|
65132
|
+
);
|
|
65133
|
+
return {
|
|
65134
|
+
targets,
|
|
65135
|
+
entry: /* @__PURE__ */ new Map([
|
|
65136
|
+
["OneSDKHost.swift", oneSDKHost],
|
|
65137
|
+
["OneSDKTransport.swift", oneSDKTransport]
|
|
65138
|
+
]),
|
|
65139
|
+
modules: frameworks.map((name3) => `${name3}_${generated.generation}`)
|
|
65140
|
+
};
|
|
65141
|
+
}
|
|
65142
|
+
async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRootOverride) {
|
|
65143
|
+
const sources = await oneSDKLinkSources(appRoot, preparedRoot);
|
|
65010
65144
|
const moduleRoot = moduleRootOverride ?? (await resolveSwiftModule()).root;
|
|
65011
65145
|
const packagePath = import_node_path97.default.join(
|
|
65012
65146
|
swiftCacheDir(),
|
|
@@ -65026,25 +65160,9 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65026
65160
|
])
|
|
65027
65161
|
`
|
|
65028
65162
|
);
|
|
65029
|
-
files2.set(
|
|
65030
|
-
for (const source of
|
|
65031
|
-
"SDK/OneSDKRuntime.swift",
|
|
65032
|
-
"OneNativeUIKitHostView.swift",
|
|
65033
|
-
"OneNativeContent.swift",
|
|
65034
|
-
"OneNativeAccessibility.swift",
|
|
65035
|
-
"SDKViews/OneNativeViewsTable.swift"
|
|
65036
|
-
])
|
|
65037
|
-
files2.set(
|
|
65038
|
-
`Sources/One/${import_node_path97.default.basename(source)}`,
|
|
65039
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(one, "ios", source), "utf8")
|
|
65040
|
-
);
|
|
65041
|
-
for (const name3 of generated.files)
|
|
65042
|
-
files2.set(
|
|
65043
|
-
`Sources/OneSDKBindings/${name3}`,
|
|
65044
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(sourceRoot, name3), "utf8")
|
|
65045
|
-
);
|
|
65163
|
+
for (const [name3, source] of sources.targets) files2.set(name3, source);
|
|
65164
|
+
for (const [name3, source] of sources.entry) files2.set(`Sources/App/${name3}`, source);
|
|
65046
65165
|
files2.set("Sources/App/App.swift", oneSDKApp);
|
|
65047
|
-
files2.set("Sources/App/Transport.swift", oneSDKTransport);
|
|
65048
65166
|
import_node_fs98.default.mkdirSync(packagePath, { recursive: true });
|
|
65049
65167
|
syncSwiftTree(
|
|
65050
65168
|
packagePath,
|
|
@@ -65052,6 +65170,7 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65052
65170
|
);
|
|
65053
65171
|
const project2 = projectFor(packagePath);
|
|
65054
65172
|
project2.oneModule = false;
|
|
65173
|
+
project2.optimize = true;
|
|
65055
65174
|
const artifact = await artifactFor(project2, "Sources/App/App.swift", moduleRoot);
|
|
65056
65175
|
const metadata = {
|
|
65057
65176
|
url: `${origin}/__peach/swift/${artifact.hash}.wasm`,
|
|
@@ -65059,7 +65178,7 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65059
65178
|
icuUrl: icuUrl(origin, artifact),
|
|
65060
65179
|
rootId: `one-sdk-${artifact.hash.slice(0, 16)}`,
|
|
65061
65180
|
bundleFiles: artifact.package.bundleFiles.files,
|
|
65062
|
-
modules:
|
|
65181
|
+
modules: sources.modules
|
|
65063
65182
|
};
|
|
65064
65183
|
return { metadata, artifact };
|
|
65065
65184
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2182 | (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;
|
|
@@ -1498,7 +1498,7 @@ function readIosSdkTree(root) {
|
|
|
1498
1498
|
|
|
1499
1499
|
// src/swift-standin-digest.ts
|
|
1500
1500
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1501
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
1501
|
+
var STANDIN_SOURCE_DIGEST = true ? "cc396d180b261e922288f645807b4a704fa92410ffc902bfbaac72b81af6413a" : standinSourceDigest();
|
|
1502
1502
|
|
|
1503
1503
|
// src/expo-native-workspace.ts
|
|
1504
1504
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -4974,7 +4974,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
|
|
|
4974
4974
|
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
4975
4975
|
(module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
|
|
4976
4976
|
).join("");
|
|
4977
|
-
var compilerSourceDigest = true ? "
|
|
4977
|
+
var compilerSourceDigest = true ? "73960368f0b83cf042511655d857d5f64204fa539e2c984423a12c08657b068e" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
4978
4978
|
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
4979
4979
|
"CFAllocator",
|
|
4980
4980
|
"CFArray",
|
|
@@ -9467,7 +9467,7 @@ var import_node_module = require("node:module");
|
|
|
9467
9467
|
var import_node_path11 = require("node:path");
|
|
9468
9468
|
|
|
9469
9469
|
// runtime-companion.json
|
|
9470
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
9470
|
+
var runtime_companion_default = { abi: 1, sha256: "d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f", file: "node/cli-d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f.cjs" };
|
|
9471
9471
|
|
|
9472
9472
|
// src/cli-runtime.ts
|
|
9473
9473
|
var CLI_COMPANION_ABI = 1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2182 | (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.
|
|
1
|
+
/*! peach v0.1.2182 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2182 | (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;
|