peachsim 0.1.2180 → 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/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 +141 -70
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +68 -36
- 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 +106 -59
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
- 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 +3 -3
- 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 +1 -1
- 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 +3 -3
- 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 +131 -67
- package/dist-lib/swift-compile.cjs +13 -4
- package/dist-lib/swift-compile.mjs +13 -4
- 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 +15 -6
- package/dist-lib/vite.cjs +3 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +14 -0
- package/package.json +1 -1
- 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/expoSwiftContract.ts +3 -0
- package/src/native-bundles.ts +30 -10
- package/src/one-sdk/source.ts +10 -4
- package/src/one-sdk-bundle.ts +56 -24
- package/src/swift-compile.ts +3 -1
- package/src/swift-submit.ts +2 -1
- package/src/wasm-optimize.ts +11 -1
package/dist-lib/cloud.cjs
CHANGED
|
@@ -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;
|
package/dist-lib/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2182 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/config.cjs
CHANGED
|
@@ -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;
|
package/dist-lib/config.mjs
CHANGED
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -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 __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 __create = Object.create;
|
|
@@ -2036,7 +2036,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
2036
2036
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
2037
2037
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
2038
2038
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
2039
|
-
var SWIFT_HOST_ABI =
|
|
2039
|
+
var SWIFT_HOST_ABI = 70;
|
|
2040
2040
|
var POLL_INTERVAL_MS = 1500;
|
|
2041
2041
|
function httpSwiftCompileSubmit(context) {
|
|
2042
2042
|
const { assetReadToken, authorization, endpoint } = context;
|
|
@@ -20701,6 +20701,13 @@ var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
|
|
|
20701
20701
|
]
|
|
20702
20702
|
]);
|
|
20703
20703
|
async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
20704
|
+
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
20705
|
+
const requestedCores = Number(process.env.BINARYEN_CORES);
|
|
20706
|
+
const environment = { ...process.env, WASM_OPT_PATH: binary2 };
|
|
20707
|
+
if (Number.isInteger(admittedCores) && admittedCores > 0)
|
|
20708
|
+
environment.BINARYEN_CORES = String(
|
|
20709
|
+
Number.isInteger(requestedCores) && requestedCores > 0 ? Math.min(admittedCores, requestedCores) : admittedCores
|
|
20710
|
+
);
|
|
20704
20711
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
20705
20712
|
[
|
|
20706
20713
|
"-Oz",
|
|
@@ -20710,7 +20717,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
20710
20717
|
"-o",
|
|
20711
20718
|
output2
|
|
20712
20719
|
],
|
|
20713
|
-
{ env:
|
|
20720
|
+
{ env: environment }
|
|
20714
20721
|
);
|
|
20715
20722
|
if (result.status !== 0)
|
|
20716
20723
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -22744,7 +22751,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
22744
22751
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
22745
22752
|
var MULTI_MANIFEST_VERSION = 68;
|
|
22746
22753
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
22747
|
-
var compilerSourceDigest = true ? "
|
|
22754
|
+
var compilerSourceDigest = true ? "73960368f0b83cf042511655d857d5f64204fa539e2c984423a12c08657b068e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
22748
22755
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
22749
22756
|
const hash = (0, import_node_crypto19.createHash)("sha256");
|
|
22750
22757
|
hash.update(`swift-compile
|
|
@@ -26071,7 +26078,7 @@ function readCompiledArtifact(directory, hash) {
|
|
|
26071
26078
|
return null;
|
|
26072
26079
|
const bytes = (0, import_node_fs47.readFileSync)(import_node_path44.default.join(directory, "app.wasm"));
|
|
26073
26080
|
const gzip2 = (0, import_node_fs47.readFileSync)(import_node_path44.default.join(directory, "icu.gz"));
|
|
26074
|
-
if ((0, import_node_crypto19.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto19.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length
|
|
26081
|
+
if ((0, import_node_crypto19.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto19.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
26075
26082
|
return null;
|
|
26076
26083
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 } };
|
|
26077
26084
|
} catch (error) {
|
|
@@ -27133,6 +27140,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
27133
27140
|
bytes: (0, import_node_fs47.readFileSync)(executable),
|
|
27134
27141
|
icu: await icu
|
|
27135
27142
|
};
|
|
27143
|
+
if (artifact.bytes.length <= 8)
|
|
27144
|
+
throw new Error("swift-compile: deferred linker produced no executable");
|
|
27136
27145
|
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
27137
27146
|
saveSharedArtifact(sharedRoot, artifact);
|
|
27138
27147
|
report("compiled artifact verified");
|
|
@@ -31341,6 +31350,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
31341
31350
|
const nodeVersion = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? manifest.engines.node : null;
|
|
31342
31351
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, "--"] : [];
|
|
31343
31352
|
const bunPrefix = import_node_path54.default.join(cacheDir(), "package-managers", manager);
|
|
31353
|
+
const bunExecutable = import_node_path54.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
31344
31354
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
31345
31355
|
"npx",
|
|
31346
31356
|
"--yes",
|
|
@@ -31349,11 +31359,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
31349
31359
|
"--frozen-lockfile",
|
|
31350
31360
|
// the copied node_modules link into the store pnpm chose on the app's volume
|
|
31351
31361
|
...pnpmStoreArgs(root)
|
|
31352
|
-
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [
|
|
31353
|
-
import_node_path54.default.join(bunPrefix, "node_modules/.bin/bun"),
|
|
31354
|
-
"install",
|
|
31355
|
-
"--frozen-lockfile"
|
|
31356
|
-
] : (
|
|
31362
|
+
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [bunExecutable, "install", "--frozen-lockfile"] : (
|
|
31357
31363
|
// npm ci would delete the cloned tree before installing it again
|
|
31358
31364
|
["npm", "install", "--no-audit", "--no-fund"]
|
|
31359
31365
|
);
|
|
@@ -31362,22 +31368,22 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
31362
31368
|
const command = [...prefix, ...args];
|
|
31363
31369
|
await run8(command[0], command.slice(1), cwd, env);
|
|
31364
31370
|
};
|
|
31371
|
+
if (manager.startsWith("bun@") && (!projectReady || !import_node_fs56.default.existsSync(bunExecutable)))
|
|
31372
|
+
await execute(
|
|
31373
|
+
[
|
|
31374
|
+
"npm",
|
|
31375
|
+
"install",
|
|
31376
|
+
"--prefix",
|
|
31377
|
+
bunPrefix,
|
|
31378
|
+
// the bun package ships a placeholder binary its postinstall replaces
|
|
31379
|
+
"--ignore-scripts=false",
|
|
31380
|
+
"--no-audit",
|
|
31381
|
+
"--no-fund",
|
|
31382
|
+
manager
|
|
31383
|
+
],
|
|
31384
|
+
work
|
|
31385
|
+
);
|
|
31365
31386
|
if (!projectReady) {
|
|
31366
|
-
if (manager.startsWith("bun@"))
|
|
31367
|
-
await execute(
|
|
31368
|
-
[
|
|
31369
|
-
"npm",
|
|
31370
|
-
"install",
|
|
31371
|
-
"--prefix",
|
|
31372
|
-
bunPrefix,
|
|
31373
|
-
// the bun package ships a placeholder binary its postinstall replaces
|
|
31374
|
-
"--ignore-scripts=false",
|
|
31375
|
-
"--no-audit",
|
|
31376
|
-
"--no-fund",
|
|
31377
|
-
manager
|
|
31378
|
-
],
|
|
31379
|
-
work
|
|
31380
|
-
);
|
|
31381
31387
|
if (install[0] === "npm" && import_node_fs56.default.existsSync(import_node_path54.default.join(work, "package-lock.json"))) {
|
|
31382
31388
|
await execute(
|
|
31383
31389
|
["npm", "ci", "--dry-run", "--ignore-scripts", "--no-audit", "--no-fund"],
|
|
@@ -32003,7 +32009,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
32003
32009
|
return hash.digest("hex");
|
|
32004
32010
|
}
|
|
32005
32011
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
32006
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
32012
|
+
var STANDIN_SOURCE_DIGEST = true ? "cc396d180b261e922288f645807b4a704fa92410ffc902bfbaac72b81af6413a" : standinSourceDigest();
|
|
32007
32013
|
|
|
32008
32014
|
// src/expoSwiftContract.ts
|
|
32009
32015
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -32269,7 +32275,7 @@ async function packageTreeDigest(root) {
|
|
|
32269
32275
|
// src/expo-native-prebuilt.ts
|
|
32270
32276
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
32271
32277
|
function expoNativeCompilerDigestValue() {
|
|
32272
|
-
return true ? "
|
|
32278
|
+
return true ? "2799fbdcc514ac59227047679bf5780658834c45f46965b7b41455f6453d53e2" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
32273
32279
|
}
|
|
32274
32280
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
32275
32281
|
function readSources(value) {
|
|
@@ -44232,7 +44238,15 @@ function targetSettings2(units) {
|
|
|
44232
44238
|
}
|
|
44233
44239
|
return settings;
|
|
44234
44240
|
}
|
|
44235
|
-
function
|
|
44241
|
+
function oneSDKStamp(oneSDK) {
|
|
44242
|
+
if (!oneSDK) return "";
|
|
44243
|
+
const hash = (0, import_node_crypto40.createHash)("sha256");
|
|
44244
|
+
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
44245
|
+
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
44246
|
+
hash.update(`${name3}\0${source}\0`);
|
|
44247
|
+
return hash.digest("hex");
|
|
44248
|
+
}
|
|
44249
|
+
function expoEntry(units, oneSDK = false) {
|
|
44236
44250
|
const namespaces = [...new Set(units.map((unit2) => unit2.namespace))].filter((namespace) => namespace !== "PeachExpoApp").filter(
|
|
44237
44251
|
(namespace) => units.some(
|
|
44238
44252
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
@@ -44242,13 +44256,14 @@ function expoEntry(units) {
|
|
|
44242
44256
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
44243
44257
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
44244
44258
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
44259
|
+
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) }";
|
|
44245
44260
|
return `import SwiftUI
|
|
44246
44261
|
internal import ExpoModulesCore
|
|
44247
|
-
${bridgeModules.length ? "import React\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
44262
|
+
${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport OneSDKBindings\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
44248
44263
|
|
|
44249
44264
|
@main struct PeachExpoApp: PeachPackage {
|
|
44250
44265
|
init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit2) => unit2.classes).join(", ")}])${delegates}${bridgeModules.length ? `; RCTModuleHost.register([${bridgeModules.join(", ")}])` : ""} } }
|
|
44251
|
-
|
|
44266
|
+
${view}
|
|
44252
44267
|
}
|
|
44253
44268
|
|
|
44254
44269
|
@_expose(wasm, "peach_expo_call")
|
|
@@ -44344,7 +44359,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
44344
44359
|
installSwiftInputTrace();
|
|
44345
44360
|
let key2;
|
|
44346
44361
|
try {
|
|
44347
|
-
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}`;
|
|
44362
|
+
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}\0${oneSDKStamp(options.oneSDK)}`;
|
|
44348
44363
|
} catch {
|
|
44349
44364
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
44350
44365
|
}
|
|
@@ -44381,11 +44396,23 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
44381
44396
|
throw new Error(`conflicting Expo Swift binary source ${name3}`);
|
|
44382
44397
|
files2[name3] = source;
|
|
44383
44398
|
}
|
|
44384
|
-
|
|
44399
|
+
const settings = targetSettings2(linked2);
|
|
44400
|
+
if (options.oneSDK) {
|
|
44401
|
+
for (const [name3, source] of options.oneSDK.targets) files2[name3] = source;
|
|
44402
|
+
for (const [name3, source] of options.oneSDK.entry)
|
|
44403
|
+
files2[`Sources/PeachExpoApp/${name3}`] = source;
|
|
44404
|
+
settings.set("OneSDKBindings", {
|
|
44405
|
+
languageMode: 5,
|
|
44406
|
+
mainActorIsolation: false,
|
|
44407
|
+
swiftFlags: ["-suppress-warnings"],
|
|
44408
|
+
dependencies: [{ kind: "target", name: "One" }]
|
|
44409
|
+
});
|
|
44410
|
+
}
|
|
44411
|
+
files2[EXPO_SWIFT_ENTRY] = expoEntry(linked2, options.oneSDK !== void 0);
|
|
44385
44412
|
files2["Package.swift"] = expoManifest(
|
|
44386
44413
|
files2,
|
|
44387
44414
|
linked2.map((unit2) => generations.get(unit2) ?? "").join(","),
|
|
44388
|
-
|
|
44415
|
+
settings
|
|
44389
44416
|
);
|
|
44390
44417
|
const provider = linked2.some((unit2) => unit2.reactNativeProvider) ? reactProvider : void 0;
|
|
44391
44418
|
if (provider) {
|
|
@@ -44746,7 +44773,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
44746
44773
|
stamps.set(unit2, stamp);
|
|
44747
44774
|
candidates.push(unit2);
|
|
44748
44775
|
}
|
|
44749
|
-
const preparedKey = expoSwiftPreparedKey(
|
|
44776
|
+
const preparedKey = expoSwiftPreparedKey(
|
|
44777
|
+
base,
|
|
44778
|
+
units,
|
|
44779
|
+
reactProviderStamp + oneSDKStamp(options.oneSDK)
|
|
44780
|
+
);
|
|
44750
44781
|
if (!publishArtifact) {
|
|
44751
44782
|
const prepared = preparedExpoSwift.get(preparedKey);
|
|
44752
44783
|
if (prepared) {
|
|
@@ -44938,7 +44969,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
44938
44969
|
}
|
|
44939
44970
|
|
|
44940
44971
|
// src/expo-swift-bundle.ts
|
|
44941
|
-
async function buildExpoSwiftBundle(appRoot) {
|
|
44972
|
+
async function buildExpoSwiftBundle(appRoot, oneSDK) {
|
|
44942
44973
|
const assets2 = [];
|
|
44943
44974
|
const metadata = await compileExpoSwiftModules(
|
|
44944
44975
|
appRoot,
|
|
@@ -44951,7 +44982,8 @@ async function buildExpoSwiftBundle(appRoot) {
|
|
|
44951
44982
|
contentType: "application/wasm"
|
|
44952
44983
|
});
|
|
44953
44984
|
if ("gzip" in artifact.icu) assets2.push(await swiftIcuBundleAsset(artifact.icu));
|
|
44954
|
-
}
|
|
44985
|
+
},
|
|
44986
|
+
{ oneSDK }
|
|
44955
44987
|
);
|
|
44956
44988
|
if (!metadata) return null;
|
|
44957
44989
|
return { metadata, assets: assets2 };
|
|
@@ -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;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -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 __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();
|
|
@@ -18874,7 +18874,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
18874
18874
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
18875
18875
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
18876
18876
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
18877
|
-
var SWIFT_HOST_ABI =
|
|
18877
|
+
var SWIFT_HOST_ABI = 70;
|
|
18878
18878
|
var POLL_INTERVAL_MS = 1500;
|
|
18879
18879
|
function httpSwiftCompileSubmit(context) {
|
|
18880
18880
|
const { assetReadToken, authorization, endpoint } = context;
|
|
@@ -34258,6 +34258,13 @@ var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
|
|
|
34258
34258
|
]
|
|
34259
34259
|
]);
|
|
34260
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
|
+
);
|
|
34261
34268
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
34262
34269
|
[
|
|
34263
34270
|
"-Oz",
|
|
@@ -34267,7 +34274,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
34267
34274
|
"-o",
|
|
34268
34275
|
output2
|
|
34269
34276
|
],
|
|
34270
|
-
{ env:
|
|
34277
|
+
{ env: environment }
|
|
34271
34278
|
);
|
|
34272
34279
|
if (result.status !== 0)
|
|
34273
34280
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -36335,7 +36342,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
36335
36342
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
36336
36343
|
var MULTI_MANIFEST_VERSION = 68;
|
|
36337
36344
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
36338
|
-
var compilerSourceDigest = true ? "
|
|
36345
|
+
var compilerSourceDigest = true ? "73960368f0b83cf042511655d857d5f64204fa539e2c984423a12c08657b068e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
36339
36346
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
36340
36347
|
const hash = (0, import_node_crypto23.createHash)("sha256");
|
|
36341
36348
|
hash.update(`swift-compile
|
|
@@ -39662,7 +39669,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
39662
39669
|
return null;
|
|
39663
39670
|
const bytes = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "app.wasm"));
|
|
39664
39671
|
const gzip2 = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "icu.gz"));
|
|
39665
|
-
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)
|
|
39666
39673
|
return null;
|
|
39667
39674
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 } };
|
|
39668
39675
|
} catch (error) {
|
|
@@ -40724,6 +40731,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
40724
40731
|
bytes: (0, import_node_fs52.readFileSync)(executable),
|
|
40725
40732
|
icu: await icu
|
|
40726
40733
|
};
|
|
40734
|
+
if (artifact.bytes.length <= 8)
|
|
40735
|
+
throw new Error("swift-compile: deferred linker produced no executable");
|
|
40727
40736
|
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
40728
40737
|
saveSharedArtifact(sharedRoot, artifact);
|
|
40729
40738
|
report("compiled artifact verified");
|
|
@@ -45015,6 +45024,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45015
45024
|
const nodeVersion = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? manifest.engines.node : null;
|
|
45016
45025
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, "--"] : [];
|
|
45017
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");
|
|
45018
45028
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
45019
45029
|
"npx",
|
|
45020
45030
|
"--yes",
|
|
@@ -45023,11 +45033,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45023
45033
|
"--frozen-lockfile",
|
|
45024
45034
|
// the copied node_modules link into the store pnpm chose on the app's volume
|
|
45025
45035
|
...pnpmStoreArgs(root)
|
|
45026
|
-
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [
|
|
45027
|
-
import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun"),
|
|
45028
|
-
"install",
|
|
45029
|
-
"--frozen-lockfile"
|
|
45030
|
-
] : (
|
|
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"] : (
|
|
45031
45037
|
// npm ci would delete the cloned tree before installing it again
|
|
45032
45038
|
["npm", "install", "--no-audit", "--no-fund"]
|
|
45033
45039
|
);
|
|
@@ -45036,22 +45042,22 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45036
45042
|
const command = [...prefix, ...args];
|
|
45037
45043
|
await run11(command[0], command.slice(1), cwd, env);
|
|
45038
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
|
+
);
|
|
45039
45060
|
if (!projectReady) {
|
|
45040
|
-
if (manager.startsWith("bun@"))
|
|
45041
|
-
await execute(
|
|
45042
|
-
[
|
|
45043
|
-
"npm",
|
|
45044
|
-
"install",
|
|
45045
|
-
"--prefix",
|
|
45046
|
-
bunPrefix,
|
|
45047
|
-
// the bun package ships a placeholder binary its postinstall replaces
|
|
45048
|
-
"--ignore-scripts=false",
|
|
45049
|
-
"--no-audit",
|
|
45050
|
-
"--no-fund",
|
|
45051
|
-
manager
|
|
45052
|
-
],
|
|
45053
|
-
work
|
|
45054
|
-
);
|
|
45055
45061
|
if (install[0] === "npm" && import_node_fs62.default.existsSync(import_node_path61.default.join(work, "package-lock.json"))) {
|
|
45056
45062
|
await execute(
|
|
45057
45063
|
["npm", "ci", "--dry-run", "--ignore-scripts", "--no-audit", "--no-fund"],
|
|
@@ -45827,7 +45833,7 @@ init_package_tree_digest();
|
|
|
45827
45833
|
init_swift_native_pin();
|
|
45828
45834
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
45829
45835
|
function expoNativeCompilerDigestValue() {
|
|
45830
|
-
return true ? "
|
|
45836
|
+
return true ? "2799fbdcc514ac59227047679bf5780658834c45f46965b7b41455f6453d53e2" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
45831
45837
|
}
|
|
45832
45838
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
45833
45839
|
function readSources(value) {
|
|
@@ -62365,7 +62371,15 @@ function targetSettings2(units) {
|
|
|
62365
62371
|
}
|
|
62366
62372
|
return settings;
|
|
62367
62373
|
}
|
|
62368
|
-
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) {
|
|
62369
62383
|
const namespaces = [...new Set(units.map((unit2) => unit2.namespace))].filter((namespace) => namespace !== "PeachExpoApp").filter(
|
|
62370
62384
|
(namespace) => units.some(
|
|
62371
62385
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
@@ -62375,13 +62389,14 @@ function expoEntry(units) {
|
|
|
62375
62389
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
62376
62390
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
62377
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) }";
|
|
62378
62393
|
return `import SwiftUI
|
|
62379
62394
|
internal import ExpoModulesCore
|
|
62380
|
-
${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")}
|
|
62381
62396
|
|
|
62382
62397
|
@main struct PeachExpoApp: PeachPackage {
|
|
62383
62398
|
init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit2) => unit2.classes).join(", ")}])${delegates}${bridgeModules.length ? `; RCTModuleHost.register([${bridgeModules.join(", ")}])` : ""} } }
|
|
62384
|
-
|
|
62399
|
+
${view}
|
|
62385
62400
|
}
|
|
62386
62401
|
|
|
62387
62402
|
@_expose(wasm, "peach_expo_call")
|
|
@@ -62478,7 +62493,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
62478
62493
|
installSwiftInputTrace();
|
|
62479
62494
|
let key2;
|
|
62480
62495
|
try {
|
|
62481
|
-
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)}`;
|
|
62482
62497
|
} catch {
|
|
62483
62498
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
62484
62499
|
}
|
|
@@ -62515,11 +62530,23 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62515
62530
|
throw new Error(`conflicting Expo Swift binary source ${name3}`);
|
|
62516
62531
|
files2[name3] = source;
|
|
62517
62532
|
}
|
|
62518
|
-
|
|
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);
|
|
62519
62546
|
files2["Package.swift"] = expoManifest(
|
|
62520
62547
|
files2,
|
|
62521
62548
|
linked2.map((unit2) => generations.get(unit2) ?? "").join(","),
|
|
62522
|
-
|
|
62549
|
+
settings
|
|
62523
62550
|
);
|
|
62524
62551
|
const provider = linked2.some((unit2) => unit2.reactNativeProvider) ? reactProvider : void 0;
|
|
62525
62552
|
if (provider) {
|
|
@@ -62880,7 +62907,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62880
62907
|
stamps.set(unit2, stamp);
|
|
62881
62908
|
candidates.push(unit2);
|
|
62882
62909
|
}
|
|
62883
|
-
const preparedKey = expoSwiftPreparedKey(
|
|
62910
|
+
const preparedKey = expoSwiftPreparedKey(
|
|
62911
|
+
base,
|
|
62912
|
+
units,
|
|
62913
|
+
reactProviderStamp + oneSDKStamp(options.oneSDK)
|
|
62914
|
+
);
|
|
62884
62915
|
if (!publishArtifact) {
|
|
62885
62916
|
const prepared = preparedExpoSwift.get(preparedKey);
|
|
62886
62917
|
if (prepared) {
|
|
@@ -64745,12 +64776,11 @@ extension OneNativeComposable {
|
|
|
64745
64776
|
public func propagateActive(_ active: Bool) {}
|
|
64746
64777
|
}
|
|
64747
64778
|
`;
|
|
64748
|
-
var
|
|
64779
|
+
var oneSDKHost = String.raw`import SwiftUI
|
|
64749
64780
|
@_spi(Peach) import UIKit
|
|
64750
64781
|
import One
|
|
64751
|
-
import OneSDKBindings
|
|
64752
64782
|
|
|
64753
|
-
|
|
64783
|
+
struct OneSDKUIKitHost: UIViewRepresentable {
|
|
64754
64784
|
let props: JSON
|
|
64755
64785
|
func makeUIView(context: Context) -> OneNativeUIKitHostView { OneNativeUIKitHostView() }
|
|
64756
64786
|
func updateUIView(_ view: OneNativeUIKitHostView, context: Context) {
|
|
@@ -64762,10 +64792,14 @@ private struct UIKitHost: UIViewRepresentable {
|
|
|
64762
64792
|
}
|
|
64763
64793
|
static func dismantleUIView(_ view: OneNativeUIKitHostView, coordinator: Coordinator) { view.reset() }
|
|
64764
64794
|
}
|
|
64795
|
+
`;
|
|
64796
|
+
var oneSDKApp = String.raw`import SwiftUI
|
|
64797
|
+
import One
|
|
64798
|
+
import OneSDKBindings
|
|
64765
64799
|
|
|
64766
64800
|
@main
|
|
64767
64801
|
struct SDKGuest: PeachPackage {
|
|
64768
|
-
func view(props: JSON) -> some View {
|
|
64802
|
+
func view(props: JSON) -> some View { OneSDKUIKitHost(props: props) }
|
|
64769
64803
|
}
|
|
64770
64804
|
`;
|
|
64771
64805
|
var oneSDKTransport = String.raw`import Foundation
|
|
@@ -65063,7 +65097,7 @@ async function compileOneSDKApp(appRoot, origin, moduleRootOverride) {
|
|
|
65063
65097
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
65064
65098
|
return compilePreparedOneSDKApp(appRoot, prepared.app, origin, moduleRootOverride);
|
|
65065
65099
|
}
|
|
65066
|
-
async function
|
|
65100
|
+
async function oneSDKLinkSources(appRoot, preparedRoot) {
|
|
65067
65101
|
const selected = await selectOneSDK(appRoot);
|
|
65068
65102
|
if (!selected) throw new Error("prepared app has no One SDK imports");
|
|
65069
65103
|
const { one, frameworks } = selected;
|
|
@@ -65078,6 +65112,35 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
65078
65112
|
throw new Error(
|
|
65079
65113
|
"prepared One SDK sources differ from the installed facades or app imports"
|
|
65080
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);
|
|
65081
65144
|
const moduleRoot = moduleRootOverride ?? (await resolveSwiftModule()).root;
|
|
65082
65145
|
const packagePath = import_node_path97.default.join(
|
|
65083
65146
|
swiftCacheDir(),
|
|
@@ -65097,25 +65160,9 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65097
65160
|
])
|
|
65098
65161
|
`
|
|
65099
65162
|
);
|
|
65100
|
-
files2.set(
|
|
65101
|
-
for (const source of
|
|
65102
|
-
"SDK/OneSDKRuntime.swift",
|
|
65103
|
-
"OneNativeUIKitHostView.swift",
|
|
65104
|
-
"OneNativeContent.swift",
|
|
65105
|
-
"OneNativeAccessibility.swift",
|
|
65106
|
-
"SDKViews/OneNativeViewsTable.swift"
|
|
65107
|
-
])
|
|
65108
|
-
files2.set(
|
|
65109
|
-
`Sources/One/${import_node_path97.default.basename(source)}`,
|
|
65110
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(one, "ios", source), "utf8")
|
|
65111
|
-
);
|
|
65112
|
-
for (const name3 of generated.files)
|
|
65113
|
-
files2.set(
|
|
65114
|
-
`Sources/OneSDKBindings/${name3}`,
|
|
65115
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(sourceRoot, name3), "utf8")
|
|
65116
|
-
);
|
|
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);
|
|
65117
65165
|
files2.set("Sources/App/App.swift", oneSDKApp);
|
|
65118
|
-
files2.set("Sources/App/Transport.swift", oneSDKTransport);
|
|
65119
65166
|
import_node_fs98.default.mkdirSync(packagePath, { recursive: true });
|
|
65120
65167
|
syncSwiftTree(
|
|
65121
65168
|
packagePath,
|
|
@@ -65131,7 +65178,7 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65131
65178
|
icuUrl: icuUrl(origin, artifact),
|
|
65132
65179
|
rootId: `one-sdk-${artifact.hash.slice(0, 16)}`,
|
|
65133
65180
|
bundleFiles: artifact.package.bundleFiles.files,
|
|
65134
|
-
modules:
|
|
65181
|
+
modules: sources.modules
|
|
65135
65182
|
};
|
|
65136
65183
|
return { metadata, artifact };
|
|
65137
65184
|
}
|