peachsim 0.1.2022 → 0.1.2024
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/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 +114 -38
- 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 +29 -16
- 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 +111 -37
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +33 -8
- 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 +33 -8
- package/dist-lib/native-app-identity-project.cjs +33 -8
- package/dist-lib/native-app-identity-project.mjs +33 -8
- 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 +114 -38
- package/dist-lib/swift-compile.cjs +11 -3
- package/dist-lib/swift-compile.mjs +11 -3
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +21 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +28 -15
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/swift-toolchain.ts +21 -10
- package/src/turbo-bundle.ts +8 -0
- package/src/turbo-source.ts +60 -18
- package/src/xcode-project.ts +30 -5
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2024 | (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;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "1e190da48e39a8b58a4f784208c965177b09b9535a77e3455a1bab0b62d07783", "home-paths.ts": "af600a7f017474946ede726320a133d830e77e4e287b043d4fea026a945ce748", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "3dea1482aa4180b576e9151c1a687590d4b43261cadf7657788febb480a640d9", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -42104,11 +42104,7 @@ function verifySwiftSdk(swift, sdk) {
|
|
|
42104
42104
|
}
|
|
42105
42105
|
function installSwiftSdkArchive(swift, sdk, archive) {
|
|
42106
42106
|
validateSwiftSdkIdentity(sdk);
|
|
42107
|
-
const staging = import_node_fs32.default.realpathSync(
|
|
42108
|
-
import_node_fs32.default.mkdtempSync(
|
|
42109
|
-
import_node_path27.default.join(scratch?.directory ?? import_node_os6.default.tmpdir(), "peach-sdk-verification-")
|
|
42110
|
-
)
|
|
42111
|
-
);
|
|
42107
|
+
const staging = import_node_fs32.default.realpathSync(swiftSdkStagingDirectory("peach-sdk-verification-"));
|
|
42112
42108
|
try {
|
|
42113
42109
|
if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
|
|
42114
42110
|
throw new Error("declared Swift SDK archive checksum mismatch");
|
|
@@ -42175,6 +42171,11 @@ function installSwiftSdkArchive(swift, sdk, archive) {
|
|
|
42175
42171
|
if (file.startsWith(staging + import_node_path27.default.sep)) sdkFileHashes.delete(file);
|
|
42176
42172
|
}
|
|
42177
42173
|
}
|
|
42174
|
+
function swiftSdkStagingDirectory(prefix) {
|
|
42175
|
+
const parent = scratch?.directory ?? import_node_os6.default.tmpdir();
|
|
42176
|
+
if (!import_node_fs32.default.existsSync(parent)) throw new Error(`Swift SDK install is missing ${parent}`);
|
|
42177
|
+
return import_node_fs32.default.mkdtempSync(import_node_path27.default.join(parent, prefix));
|
|
42178
|
+
}
|
|
42178
42179
|
function installSwiftWasmSdk(release, sdk) {
|
|
42179
42180
|
validateSwiftSdkIdentity(sdk);
|
|
42180
42181
|
ensureSwiftLinuxRuntime(release);
|
|
@@ -42184,9 +42185,7 @@ function installSwiftWasmSdk(release, sdk) {
|
|
|
42184
42185
|
} catch {
|
|
42185
42186
|
}
|
|
42186
42187
|
const swift = import_node_path27.default.join(swiftCompiler(release), "swift");
|
|
42187
|
-
const staging =
|
|
42188
|
-
import_node_path27.default.join(scratch?.directory ?? import_node_os6.default.tmpdir(), "builder-swift-sdk-")
|
|
42189
|
-
);
|
|
42188
|
+
const staging = swiftSdkStagingDirectory("builder-swift-sdk-");
|
|
42190
42189
|
const archive = import_node_path27.default.join(staging, "sdk.artifactbundle.tar.gz");
|
|
42191
42190
|
try {
|
|
42192
42191
|
if (sdk.wasmSdkUrl.startsWith("file:"))
|
|
@@ -42218,6 +42217,8 @@ function swiftFileChecksum(file) {
|
|
|
42218
42217
|
}
|
|
42219
42218
|
function swiftHostCompilerFiles(release, root) {
|
|
42220
42219
|
const file = import_node_path27.default.join(root, "compiler.json");
|
|
42220
|
+
if (!import_node_fs32.default.existsSync(file))
|
|
42221
|
+
throw new Error(`Swift compiler ${release} is missing ${file}`);
|
|
42221
42222
|
const pin2 = release === privateSwiftRelease() ? {
|
|
42222
42223
|
identity: release.replace(/^.*-custom-/, ""),
|
|
42223
42224
|
manifest: swiftFileChecksum(file)
|
|
@@ -42233,6 +42234,9 @@ function swiftHostCompilerFiles(release, root) {
|
|
|
42233
42234
|
return files2.map(([relative5, checksum]) => {
|
|
42234
42235
|
if (relative5.startsWith("/") || relative5.split("/").includes("..") || typeof checksum !== "string")
|
|
42235
42236
|
throw new Error(`Swift compiler binary mismatch: ${relative5}`);
|
|
42237
|
+
const binary2 = import_node_path27.default.join(root, relative5);
|
|
42238
|
+
if (!import_node_fs32.default.existsSync(binary2))
|
|
42239
|
+
throw new Error(`Swift compiler ${release} is missing ${binary2}`);
|
|
42236
42240
|
return [relative5, checksum];
|
|
42237
42241
|
});
|
|
42238
42242
|
}
|
|
@@ -42246,6 +42250,9 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
42246
42250
|
const cached4 = verifiedCompilers.get(release);
|
|
42247
42251
|
if (cached4) return cached4;
|
|
42248
42252
|
const bin = swiftToolchainBin(release);
|
|
42253
|
+
const binary2 = import_node_path27.default.join(bin, "swift");
|
|
42254
|
+
if (!import_node_fs32.default.existsSync(binary2))
|
|
42255
|
+
throw new Error(`Swift compiler ${release} is missing ${binary2}`);
|
|
42249
42256
|
if (release.includes("-custom-")) {
|
|
42250
42257
|
const root = import_node_path27.default.resolve(bin, "../..");
|
|
42251
42258
|
for (const [relative5, checksum] of swiftHostCompilerFiles(release, root)) {
|
|
@@ -42258,7 +42265,7 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
42258
42265
|
throw new Error(`Swift compiler binary mismatch: ${relative5}`);
|
|
42259
42266
|
}
|
|
42260
42267
|
}
|
|
42261
|
-
const { stdout } = await (0, import_node_util6.promisify)(import_node_child_process15.execFile)(
|
|
42268
|
+
const { stdout } = await (0, import_node_util6.promisify)(import_node_child_process15.execFile)(binary2, ["--version"], {
|
|
42262
42269
|
encoding: "utf8",
|
|
42263
42270
|
env: swiftEnvironment(),
|
|
42264
42271
|
signal
|
|
@@ -42272,9 +42279,12 @@ function swiftCompiler(release) {
|
|
|
42272
42279
|
const cached4 = verifiedCompilers.get(release);
|
|
42273
42280
|
if (cached4) return cached4;
|
|
42274
42281
|
const bin = swiftToolchainBin(release);
|
|
42282
|
+
const binary2 = import_node_path27.default.join(bin, "swift");
|
|
42283
|
+
if (!import_node_fs32.default.existsSync(binary2))
|
|
42284
|
+
throw new Error(`Swift compiler ${release} is missing ${binary2}`);
|
|
42275
42285
|
if (release.includes("-custom-"))
|
|
42276
42286
|
verifySwiftHostCompiler(release, import_node_path27.default.resolve(bin, "../.."));
|
|
42277
|
-
const version2 = (0, import_node_child_process15.execFileSync)(
|
|
42287
|
+
const version2 = (0, import_node_child_process15.execFileSync)(binary2, ["--version"], {
|
|
42278
42288
|
encoding: "utf8",
|
|
42279
42289
|
env: swiftEnvironment(),
|
|
42280
42290
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -57532,7 +57542,7 @@ var init_swift_compile = __esm({
|
|
|
57532
57542
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
57533
57543
|
MULTI_MANIFEST_VERSION = 68;
|
|
57534
57544
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
57535
|
-
compilerSourceDigest = true ? "
|
|
57545
|
+
compilerSourceDigest = true ? "62300abaade33badb0eb38ca4bb176c724e0c46b99bbc9981dfdec21bf9c3d27" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
57536
57546
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
57537
57547
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
57538
57548
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -60738,7 +60748,17 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
60738
60748
|
);
|
|
60739
60749
|
const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
|
|
60740
60750
|
const name3 = target && str(target.target.name);
|
|
60741
|
-
if (!name3)
|
|
60751
|
+
if (!name3) {
|
|
60752
|
+
const declared = (project2 ? [project2] : projects2).flatMap(
|
|
60753
|
+
(candidate) => projectTargets(candidate).flatMap((ref) => {
|
|
60754
|
+
const targetName = str(ref.target.name);
|
|
60755
|
+
return targetName ? [targetName] : [];
|
|
60756
|
+
})
|
|
60757
|
+
);
|
|
60758
|
+
throw new Error(
|
|
60759
|
+
`scheme ${scheme} runs blueprint ${blueprint}, which no project here declares (declared targets: ${declared.join(", ") || "none"})`
|
|
60760
|
+
);
|
|
60761
|
+
}
|
|
60742
60762
|
return { target: name3, configuration };
|
|
60743
60763
|
}
|
|
60744
60764
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
@@ -60776,8 +60796,18 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
60776
60796
|
requireSources: false
|
|
60777
60797
|
}).includes(iosTarget)
|
|
60778
60798
|
);
|
|
60779
|
-
if (matches.length === 0)
|
|
60780
|
-
|
|
60799
|
+
if (matches.length === 0) {
|
|
60800
|
+
const known = [
|
|
60801
|
+
...new Set(
|
|
60802
|
+
projects2.flatMap(
|
|
60803
|
+
(entry) => listXcodeAppTargets(entry.xcodeproj, { requireSources: false })
|
|
60804
|
+
)
|
|
60805
|
+
)
|
|
60806
|
+
];
|
|
60807
|
+
throw new Error(
|
|
60808
|
+
`native app identity has no application target ${iosTarget}; pass --target with one of: ${known.join(", ") || "none"}`
|
|
60809
|
+
);
|
|
60810
|
+
}
|
|
60781
60811
|
if (matches.length > 1)
|
|
60782
60812
|
throw new Error(
|
|
60783
60813
|
`native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(", ")}`
|
|
@@ -60802,7 +60832,9 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
60802
60832
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
60803
60833
|
}
|
|
60804
60834
|
if (!appTargets.includes(target))
|
|
60805
|
-
throw new Error(
|
|
60835
|
+
throw new Error(
|
|
60836
|
+
`native app identity has no application target ${target}; pass --target with one of: ${appTargets.join(", ") || "none"}`
|
|
60837
|
+
);
|
|
60806
60838
|
return { xcodeproj, target, workspace: project2.workspace };
|
|
60807
60839
|
}
|
|
60808
60840
|
async function resolveXcodeSwiftPackages(input, signal, target, configuration) {
|
|
@@ -61503,7 +61535,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
61503
61535
|
import_plist2.default.parse(import_node_fs55.default.readFileSync(entitlementsFile, "utf8")),
|
|
61504
61536
|
(value) => expand(value, (key2) => {
|
|
61505
61537
|
const resolved = settings(key2);
|
|
61506
|
-
if (!resolved)
|
|
61538
|
+
if (!resolved)
|
|
61539
|
+
throw new Error(
|
|
61540
|
+
`${entitlementsFile} references $(${key2}), which ${module2.name}'s build settings do not define${key2 === "CFBundleIdentifier" ? " (set PRODUCT_BUNDLE_IDENTIFIER; Xcode supplies it as CFBundleIdentifier)" : ""}`
|
|
61541
|
+
);
|
|
61507
61542
|
return resolved;
|
|
61508
61543
|
})
|
|
61509
61544
|
) : void 0;
|
|
@@ -63909,7 +63944,7 @@ var init_swift_standin_digest = __esm({
|
|
|
63909
63944
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
63910
63945
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
63911
63946
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
63912
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
63947
|
+
STANDIN_SOURCE_DIGEST = true ? "45fe12f22344d1e23a6afb0d49b48dc17521ea87010594b3664e90487b0aa10c" : standinSourceDigest();
|
|
63913
63948
|
}
|
|
63914
63949
|
});
|
|
63915
63950
|
|
|
@@ -64639,7 +64674,7 @@ var init_expo_native_prebuilt = __esm({
|
|
|
64639
64674
|
init_swift_native_pin();
|
|
64640
64675
|
init_xcode_project();
|
|
64641
64676
|
EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
64642
|
-
EXPO_NATIVE_COMPILER_DIGEST = true ? "
|
|
64677
|
+
EXPO_NATIVE_COMPILER_DIGEST = true ? "3cedca17ebb7a28f378764f34fad8b005a9aecee64a990841fc2ab44d049e283" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
64643
64678
|
IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
64644
64679
|
expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
|
|
64645
64680
|
isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
@@ -77134,14 +77169,46 @@ function fabricComponents(root) {
|
|
|
77134
77169
|
function object5(value) {
|
|
77135
77170
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
77136
77171
|
}
|
|
77172
|
+
function packageManifest(root) {
|
|
77173
|
+
const manifestPath = import_node_path82.default.join(root, "package.json");
|
|
77174
|
+
if (!import_node_fs85.default.existsSync(manifestPath)) return null;
|
|
77175
|
+
const value = JSON.parse(import_node_fs85.default.readFileSync(manifestPath, "utf8"));
|
|
77176
|
+
if (!object5(value)) throw new Error(`${root}: package.json needs a name and version`);
|
|
77177
|
+
return value;
|
|
77178
|
+
}
|
|
77137
77179
|
function packageInfo2(root) {
|
|
77138
77180
|
root = import_node_fs85.default.realpathSync(root);
|
|
77139
|
-
const value =
|
|
77140
|
-
|
|
77141
|
-
|
|
77142
|
-
|
|
77143
|
-
|
|
77144
|
-
|
|
77181
|
+
const value = packageManifest(root);
|
|
77182
|
+
if (value) {
|
|
77183
|
+
if (typeof value.name !== "string" || typeof value.version !== "string")
|
|
77184
|
+
throw new Error(`${root}: package.json needs a name and version`);
|
|
77185
|
+
return { name: value.name, version: value.version, root };
|
|
77186
|
+
}
|
|
77187
|
+
let name3 = import_node_path82.default.basename(root);
|
|
77188
|
+
const configPath = import_node_path82.default.join(root, "expo-module.config.json");
|
|
77189
|
+
if (import_node_fs85.default.existsSync(configPath)) {
|
|
77190
|
+
const config = JSON.parse(import_node_fs85.default.readFileSync(configPath, "utf8"));
|
|
77191
|
+
if (object5(config) && typeof config.name === "string" && config.name !== "")
|
|
77192
|
+
name3 = config.name;
|
|
77193
|
+
}
|
|
77194
|
+
return { name: name3, version: "0.0.0", root };
|
|
77195
|
+
}
|
|
77196
|
+
function moduleNamesAnswered(root, files2, answered2) {
|
|
77197
|
+
const names = [];
|
|
77198
|
+
for (const file of files2) {
|
|
77199
|
+
if (!/\.(?:swift|m|mm)$/.test(file)) continue;
|
|
77200
|
+
const text6 = stripComments3(import_node_fs85.default.readFileSync(import_node_path82.default.join(root, file), "utf8"));
|
|
77201
|
+
for (const match of text6.matchAll(DECLARED_MODULE_NAME))
|
|
77202
|
+
if (match[1]) names.push(match[1]);
|
|
77203
|
+
for (const match of text6.matchAll(EXPORTED_MODULE)) {
|
|
77204
|
+
if (match[1]) names.push(match[1]);
|
|
77205
|
+
else {
|
|
77206
|
+
const cls = /@implementation\s+(\w+)/.exec(text6)?.[1];
|
|
77207
|
+
if (cls) names.push(cls);
|
|
77208
|
+
}
|
|
77209
|
+
}
|
|
77210
|
+
}
|
|
77211
|
+
return names.length > 0 && names.every((name3) => answered2.has(name3));
|
|
77145
77212
|
}
|
|
77146
77213
|
function globRegex(glob) {
|
|
77147
77214
|
let out = "";
|
|
@@ -77604,7 +77671,7 @@ function registers(root, files2, objc = true) {
|
|
|
77604
77671
|
}
|
|
77605
77672
|
return false;
|
|
77606
77673
|
}
|
|
77607
|
-
async function discoverTurboProviders(appRoot, projectRoot, iosTarget) {
|
|
77674
|
+
async function discoverTurboProviders(appRoot, projectRoot, iosTarget, answered2 = /* @__PURE__ */ new Set()) {
|
|
77608
77675
|
const providers = [];
|
|
77609
77676
|
const candidates = [];
|
|
77610
77677
|
const autolinked = await iosAutolinkedDependencies(appRoot);
|
|
@@ -77628,6 +77695,9 @@ async function discoverTurboProviders(appRoot, projectRoot, iosTarget) {
|
|
|
77628
77695
|
if (!sources) continue;
|
|
77629
77696
|
const { root, files: files2 } = sources;
|
|
77630
77697
|
if (fabric || files2 !== null && registers(root, files2)) {
|
|
77698
|
+
const nameFiles = files2 ?? podGlobFiles(pod);
|
|
77699
|
+
if (answered2.size > 0 && nameFiles && moduleNamesAnswered(root, nameFiles, answered2))
|
|
77700
|
+
continue;
|
|
77631
77701
|
const dependencies = await Promise.all(
|
|
77632
77702
|
podspecDependencies(pod.text).map(
|
|
77633
77703
|
(dep) => resolveExternalTurboPod(dep.name, dep.requirements, dep.subspecs)
|
|
@@ -77688,10 +77758,8 @@ async function collectTurboSources(options) {
|
|
|
77688
77758
|
let moduleProviders = false;
|
|
77689
77759
|
const installedCodegenNames = new Set(
|
|
77690
77760
|
installedHeaderPods.flatMap((pod) => {
|
|
77691
|
-
const manifest =
|
|
77692
|
-
|
|
77693
|
-
);
|
|
77694
|
-
if (!object5(manifest) || !object5(manifest.codegenConfig)) return [];
|
|
77761
|
+
const manifest = packageManifest(pod.packageRoot);
|
|
77762
|
+
if (!manifest || !object5(manifest.codegenConfig)) return [];
|
|
77695
77763
|
const config = manifest.codegenConfig;
|
|
77696
77764
|
return typeof config.name === "string" && config.includesGeneratedCode !== true ? [config.name] : [];
|
|
77697
77765
|
})
|
|
@@ -78188,10 +78256,8 @@ async function collectTurboSources(options) {
|
|
|
78188
78256
|
};
|
|
78189
78257
|
for (const [name3, relative5] of pod.installed?.mappedHeaders ?? [])
|
|
78190
78258
|
header([name3], { label, root, relative: relative5 });
|
|
78191
|
-
const manifest =
|
|
78192
|
-
|
|
78193
|
-
);
|
|
78194
|
-
const codegenConfig = object5(manifest) && object5(manifest.codegenConfig) ? manifest.codegenConfig : null;
|
|
78259
|
+
const manifest = packageManifest(provider.root);
|
|
78260
|
+
const codegenConfig = manifest && object5(manifest.codegenConfig) ? manifest.codegenConfig : null;
|
|
78195
78261
|
const sources = [];
|
|
78196
78262
|
const codegenObjCSources = [];
|
|
78197
78263
|
const swiftSources = [];
|
|
@@ -79202,7 +79268,7 @@ ${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProvi
|
|
|
79202
79268
|
}
|
|
79203
79269
|
`;
|
|
79204
79270
|
}
|
|
79205
|
-
var import_node_child_process45, import_node_crypto45, import_node_fs85, import_node_path82, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, sha2563, versionParts, iosOf, JS_CALL_INVOKER;
|
|
79271
|
+
var import_node_child_process45, import_node_crypto45, import_node_fs85, import_node_path82, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2563, versionParts, iosOf, JS_CALL_INVOKER;
|
|
79206
79272
|
var init_turbo_source = __esm({
|
|
79207
79273
|
"src/turbo-source.ts"() {
|
|
79208
79274
|
"use strict";
|
|
@@ -79334,6 +79400,8 @@ var init_turbo_source = __esm({
|
|
|
79334
79400
|
REACT_NATIVE_BARE_HEADER_DIRS = [
|
|
79335
79401
|
"ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager"
|
|
79336
79402
|
];
|
|
79403
|
+
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
79404
|
+
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
79337
79405
|
sha2563 = (data) => (0, import_node_crypto45.createHash)("sha256").update(data).digest("hex");
|
|
79338
79406
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
79339
79407
|
iosOf = (member) => object5(member.ios) ? member.ios : null;
|
|
@@ -83157,7 +83225,7 @@ var init_nitro_superset = __esm({
|
|
|
83157
83225
|
init_swift_standin_digest();
|
|
83158
83226
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
83159
83227
|
packageVersion = (root) => JSON.parse((0, import_node_fs94.readFileSync)((0, import_node_path91.join)(root, "package.json"), "utf8")).version;
|
|
83160
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
83228
|
+
NITRO_COMPILER_DIGEST = true ? "72f3ca78a00eff3ac90bbb90ad753063c72dd0285b31464f692d6e16d4638eca" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
83161
83229
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
83162
83230
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
83163
83231
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -84312,10 +84380,16 @@ var init_turbo_compile = __esm({
|
|
|
84312
84380
|
|
|
84313
84381
|
// src/turbo-bundle.ts
|
|
84314
84382
|
async function compiledTurboProviders(appRoot, projectRoot, iosTarget) {
|
|
84383
|
+
const config = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
84384
|
+
const answered2 = /* @__PURE__ */ new Set([
|
|
84385
|
+
...Object.keys(config?.nativeModules ?? {}),
|
|
84386
|
+
...Object.keys(config?.nativeViews ?? {})
|
|
84387
|
+
]);
|
|
84315
84388
|
return discoverTurboProviders(
|
|
84316
84389
|
appRoot,
|
|
84317
84390
|
projectRoot ?? await prepareNativeAppRoot(appRoot),
|
|
84318
|
-
iosTarget
|
|
84391
|
+
iosTarget,
|
|
84392
|
+
answered2
|
|
84319
84393
|
);
|
|
84320
84394
|
}
|
|
84321
84395
|
async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget) {
|
|
@@ -84379,6 +84453,8 @@ var init_turbo_bundle = __esm({
|
|
|
84379
84453
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
84380
84454
|
import_node_module17 = require("node:module");
|
|
84381
84455
|
import_node_path97 = __toESM(require("node:path"), 1);
|
|
84456
|
+
init_app_config();
|
|
84457
|
+
init_app_project();
|
|
84382
84458
|
init_expo_native_prebuilt();
|
|
84383
84459
|
init_expo_native_workspace();
|
|
84384
84460
|
init_installed_native_libraries();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2024 | (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;
|
|
@@ -3163,6 +3163,8 @@ function swiftFileChecksum(file) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
function swiftHostCompilerFiles(release, root) {
|
|
3165
3165
|
const file = import_node_path4.default.join(root, "compiler.json");
|
|
3166
|
+
if (!import_node_fs6.default.existsSync(file))
|
|
3167
|
+
throw new Error(`Swift compiler ${release} is missing ${file}`);
|
|
3166
3168
|
const pin = release === privateSwiftRelease() ? {
|
|
3167
3169
|
identity: release.replace(/^.*-custom-/, ""),
|
|
3168
3170
|
manifest: swiftFileChecksum(file)
|
|
@@ -3178,6 +3180,9 @@ function swiftHostCompilerFiles(release, root) {
|
|
|
3178
3180
|
return files.map(([relative, checksum]) => {
|
|
3179
3181
|
if (relative.startsWith("/") || relative.split("/").includes("..") || typeof checksum !== "string")
|
|
3180
3182
|
throw new Error(`Swift compiler binary mismatch: ${relative}`);
|
|
3183
|
+
const binary = import_node_path4.default.join(root, relative);
|
|
3184
|
+
if (!import_node_fs6.default.existsSync(binary))
|
|
3185
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
3181
3186
|
return [relative, checksum];
|
|
3182
3187
|
});
|
|
3183
3188
|
}
|
|
@@ -3192,9 +3197,12 @@ function swiftCompiler(release) {
|
|
|
3192
3197
|
const cached = verifiedCompilers.get(release);
|
|
3193
3198
|
if (cached) return cached;
|
|
3194
3199
|
const bin = swiftToolchainBin(release);
|
|
3200
|
+
const binary = import_node_path4.default.join(bin, "swift");
|
|
3201
|
+
if (!import_node_fs6.default.existsSync(binary))
|
|
3202
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
3195
3203
|
if (release.includes("-custom-"))
|
|
3196
3204
|
verifySwiftHostCompiler(release, import_node_path4.default.resolve(bin, "../.."));
|
|
3197
|
-
const version2 = (0, import_node_child_process4.execFileSync)(
|
|
3205
|
+
const version2 = (0, import_node_child_process4.execFileSync)(binary, ["--version"], {
|
|
3198
3206
|
encoding: "utf8",
|
|
3199
3207
|
env: swiftEnvironment(),
|
|
3200
3208
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -12407,7 +12415,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12407
12415
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12408
12416
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12409
12417
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12410
|
-
var compilerSourceDigest = true ? "
|
|
12418
|
+
var compilerSourceDigest = true ? "62300abaade33badb0eb38ca4bb176c724e0c46b99bbc9981dfdec21bf9c3d27" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12411
12419
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12412
12420
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12413
12421
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2024 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -3109,6 +3109,8 @@ function swiftFileChecksum(file) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
function swiftHostCompilerFiles(release, root) {
|
|
3111
3111
|
const file = path4.join(root, "compiler.json");
|
|
3112
|
+
if (!fs.existsSync(file))
|
|
3113
|
+
throw new Error(`Swift compiler ${release} is missing ${file}`);
|
|
3112
3114
|
const pin = release === privateSwiftRelease() ? {
|
|
3113
3115
|
identity: release.replace(/^.*-custom-/, ""),
|
|
3114
3116
|
manifest: swiftFileChecksum(file)
|
|
@@ -3124,6 +3126,9 @@ function swiftHostCompilerFiles(release, root) {
|
|
|
3124
3126
|
return files.map(([relative, checksum]) => {
|
|
3125
3127
|
if (relative.startsWith("/") || relative.split("/").includes("..") || typeof checksum !== "string")
|
|
3126
3128
|
throw new Error(`Swift compiler binary mismatch: ${relative}`);
|
|
3129
|
+
const binary = path4.join(root, relative);
|
|
3130
|
+
if (!fs.existsSync(binary))
|
|
3131
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
3127
3132
|
return [relative, checksum];
|
|
3128
3133
|
});
|
|
3129
3134
|
}
|
|
@@ -3138,9 +3143,12 @@ function swiftCompiler(release) {
|
|
|
3138
3143
|
const cached = verifiedCompilers.get(release);
|
|
3139
3144
|
if (cached) return cached;
|
|
3140
3145
|
const bin = swiftToolchainBin(release);
|
|
3146
|
+
const binary = path4.join(bin, "swift");
|
|
3147
|
+
if (!fs.existsSync(binary))
|
|
3148
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
3141
3149
|
if (release.includes("-custom-"))
|
|
3142
3150
|
verifySwiftHostCompiler(release, path4.resolve(bin, "../.."));
|
|
3143
|
-
const version2 = execFileSync(
|
|
3151
|
+
const version2 = execFileSync(binary, ["--version"], {
|
|
3144
3152
|
encoding: "utf8",
|
|
3145
3153
|
env: swiftEnvironment(),
|
|
3146
3154
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -12389,7 +12397,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12389
12397
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12390
12398
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12391
12399
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12392
|
-
var compilerSourceDigest = true ? "
|
|
12400
|
+
var compilerSourceDigest = true ? "62300abaade33badb0eb38ca4bb176c724e0c46b99bbc9981dfdec21bf9c3d27" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12393
12401
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12394
12402
|
const hash = createHash13("sha256");
|
|
12395
12403
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2024 | (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.2024 | (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.2024 | (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;
|
|
@@ -705,11 +705,7 @@ function verifySwiftSdk(swift, sdk) {
|
|
|
705
705
|
}
|
|
706
706
|
function installSwiftSdkArchive(swift, sdk, archive) {
|
|
707
707
|
validateSwiftSdkIdentity(sdk);
|
|
708
|
-
const staging = import_node_fs.default.realpathSync(
|
|
709
|
-
import_node_fs.default.mkdtempSync(
|
|
710
|
-
import_node_path.default.join(scratch?.directory ?? import_node_os.default.tmpdir(), "peach-sdk-verification-")
|
|
711
|
-
)
|
|
712
|
-
);
|
|
708
|
+
const staging = import_node_fs.default.realpathSync(swiftSdkStagingDirectory("peach-sdk-verification-"));
|
|
713
709
|
try {
|
|
714
710
|
if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
|
|
715
711
|
throw new Error("declared Swift SDK archive checksum mismatch");
|
|
@@ -776,6 +772,11 @@ function installSwiftSdkArchive(swift, sdk, archive) {
|
|
|
776
772
|
if (file.startsWith(staging + import_node_path.default.sep)) sdkFileHashes.delete(file);
|
|
777
773
|
}
|
|
778
774
|
}
|
|
775
|
+
function swiftSdkStagingDirectory(prefix) {
|
|
776
|
+
const parent = scratch?.directory ?? import_node_os.default.tmpdir();
|
|
777
|
+
if (!import_node_fs.default.existsSync(parent)) throw new Error(`Swift SDK install is missing ${parent}`);
|
|
778
|
+
return import_node_fs.default.mkdtempSync(import_node_path.default.join(parent, prefix));
|
|
779
|
+
}
|
|
779
780
|
function installSwiftWasmSdk(release, sdk) {
|
|
780
781
|
validateSwiftSdkIdentity(sdk);
|
|
781
782
|
ensureSwiftLinuxRuntime(release);
|
|
@@ -785,9 +786,7 @@ function installSwiftWasmSdk(release, sdk) {
|
|
|
785
786
|
} catch {
|
|
786
787
|
}
|
|
787
788
|
const swift = import_node_path.default.join(swiftCompiler(release), "swift");
|
|
788
|
-
const staging =
|
|
789
|
-
import_node_path.default.join(scratch?.directory ?? import_node_os.default.tmpdir(), "builder-swift-sdk-")
|
|
790
|
-
);
|
|
789
|
+
const staging = swiftSdkStagingDirectory("builder-swift-sdk-");
|
|
791
790
|
const archive = import_node_path.default.join(staging, "sdk.artifactbundle.tar.gz");
|
|
792
791
|
try {
|
|
793
792
|
if (sdk.wasmSdkUrl.startsWith("file:"))
|
|
@@ -819,6 +818,8 @@ function swiftFileChecksum(file) {
|
|
|
819
818
|
}
|
|
820
819
|
function swiftHostCompilerFiles(release, root) {
|
|
821
820
|
const file = import_node_path.default.join(root, "compiler.json");
|
|
821
|
+
if (!import_node_fs.default.existsSync(file))
|
|
822
|
+
throw new Error(`Swift compiler ${release} is missing ${file}`);
|
|
822
823
|
const pin = release === privateSwiftRelease() ? {
|
|
823
824
|
identity: release.replace(/^.*-custom-/, ""),
|
|
824
825
|
manifest: swiftFileChecksum(file)
|
|
@@ -834,6 +835,9 @@ function swiftHostCompilerFiles(release, root) {
|
|
|
834
835
|
return files.map(([relative, checksum]) => {
|
|
835
836
|
if (relative.startsWith("/") || relative.split("/").includes("..") || typeof checksum !== "string")
|
|
836
837
|
throw new Error(`Swift compiler binary mismatch: ${relative}`);
|
|
838
|
+
const binary = import_node_path.default.join(root, relative);
|
|
839
|
+
if (!import_node_fs.default.existsSync(binary))
|
|
840
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
837
841
|
return [relative, checksum];
|
|
838
842
|
});
|
|
839
843
|
}
|
|
@@ -848,6 +852,9 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
848
852
|
const cached = verifiedCompilers.get(release);
|
|
849
853
|
if (cached) return cached;
|
|
850
854
|
const bin = swiftToolchainBin(release);
|
|
855
|
+
const binary = import_node_path.default.join(bin, "swift");
|
|
856
|
+
if (!import_node_fs.default.existsSync(binary))
|
|
857
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
851
858
|
if (release.includes("-custom-")) {
|
|
852
859
|
const root = import_node_path.default.resolve(bin, "../..");
|
|
853
860
|
for (const [relative, checksum] of swiftHostCompilerFiles(release, root)) {
|
|
@@ -860,7 +867,7 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
860
867
|
throw new Error(`Swift compiler binary mismatch: ${relative}`);
|
|
861
868
|
}
|
|
862
869
|
}
|
|
863
|
-
const { stdout } = await (0, import_node_util.promisify)(import_node_child_process.execFile)(
|
|
870
|
+
const { stdout } = await (0, import_node_util.promisify)(import_node_child_process.execFile)(binary, ["--version"], {
|
|
864
871
|
encoding: "utf8",
|
|
865
872
|
env: swiftEnvironment(),
|
|
866
873
|
signal
|
|
@@ -874,9 +881,12 @@ function swiftCompiler(release) {
|
|
|
874
881
|
const cached = verifiedCompilers.get(release);
|
|
875
882
|
if (cached) return cached;
|
|
876
883
|
const bin = swiftToolchainBin(release);
|
|
884
|
+
const binary = import_node_path.default.join(bin, "swift");
|
|
885
|
+
if (!import_node_fs.default.existsSync(binary))
|
|
886
|
+
throw new Error(`Swift compiler ${release} is missing ${binary}`);
|
|
877
887
|
if (release.includes("-custom-"))
|
|
878
888
|
verifySwiftHostCompiler(release, import_node_path.default.resolve(bin, "../.."));
|
|
879
|
-
const version = (0, import_node_child_process.execFileSync)(
|
|
889
|
+
const version = (0, import_node_child_process.execFileSync)(binary, ["--version"], {
|
|
880
890
|
encoding: "utf8",
|
|
881
891
|
env: swiftEnvironment(),
|
|
882
892
|
stdio: ["ignore", "pipe", "pipe"]
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2024 | (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;
|