peachsim 0.1.2777 → 0.1.2778
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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +381 -366
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-M5O633NZ.mjs → acorn-RWBIRNWO.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-GSTVX33B.mjs → chunk-3RPELUA2.mjs} +36 -14
- package/dist-lib/esm-chunks/{chunk-WSHBJUCP.mjs → chunk-3WQANOYY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TONCJKKR.mjs → chunk-5TIUTQ55.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OVCIWUV2.mjs → chunk-5WASPTSS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DPL3I4WY.mjs → chunk-6YHF4VYF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Q42OLP7O.mjs → chunk-DLBUPWTI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TRSHEQVJ.mjs → chunk-EXU474NE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FHYWKCOZ.mjs → chunk-F3OPIKJC.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-3UJO4NG3.mjs → chunk-G7UJ4BAC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NJHTAVEI.mjs → chunk-GSTHJQMW.mjs} +16 -6
- package/dist-lib/esm-chunks/{chunk-V2I633CU.mjs → chunk-IQSFMB4R.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-KCSUAVJQ.mjs → chunk-K3ULPN2R.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-THHP5XKD.mjs → chunk-KBYVKTVK.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-Q53QPYEU.mjs → chunk-KLA74B7J.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LB2X5KYV.mjs → chunk-KX7LV722.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OSESKVWT.mjs → chunk-LQVLXDRN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OLCLLGZF.mjs → chunk-MRIDS3GE.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-FB27T2JY.mjs → chunk-N2PEXZGL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GISUEYXO.mjs → chunk-QKTKE4OX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GMN43CNC.mjs → chunk-QUVLFF6I.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZKPBT6FD.mjs → chunk-VZ3NXXUC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RX3WDTYI.mjs → chunk-X25PQNNH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IPX66HMP.mjs → chunk-ZDWMPXYI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AGWZKA24.mjs → chunk-ZWOS2EDN.mjs} +65 -75
- package/dist-lib/esm-chunks/{metro-layout-parser-PFRFHGDY.mjs → metro-layout-parser-RRIZOLBE.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-NUAEDMSQ.mjs → swift-package-prebuilt-EIZ7MCKR.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-P3BARE2W.mjs → swift-sdk-app-module-S2LQ4OXD.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-Y6XT7KI4.mjs → swift-sdk-image-77FFUGXI.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-DYR47O6H.mjs → swift-sdk-image-producer-XFSFUXQJ.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +304 -289
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +441 -421
- package/dist-lib/host/fetch-proxy-handler.cjs +99 -86
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +20 -15
- package/dist-lib/native-app-identity-project.mjs +27 -32
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +86 -85
- package/dist-lib/public-origins-lib.json +71 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +480 -460
- package/dist-lib/swift-compile.cjs +91 -62
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/core-abi/web/sceneClientContract.d.ts +0 -6
- package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +0 -4
- package/package.json +1 -1
- package/src/bazel-project.ts +2 -6
- package/src/build-cache.ts +3 -2
- package/src/sha256.ts +8 -0
- package/src/swift-coverage/indexing.ts +3 -4
- package/src/swift-coverage/package.ts +1 -4
- package/src/swift-coverage/reader.ts +1 -4
- package/src/swift-coverage/source.ts +1 -4
- package/src/swift-coverage/xcode-assets.ts +1 -4
- package/src/swift-coverage/xcode-bridging.ts +1 -4
- package/src/swift-coverage/xcode-packages.ts +1 -4
- package/src/swift-coverage/xcode-strings.ts +1 -4
- package/src/swift-coverage/xcode.ts +1 -4
- package/src/swift-guest-dyld-table.ts +1 -6
- package/src/swift-guest-source-inputs.ts +3 -15
- package/src/swift-objc-compile.ts +2 -7
- package/src/swift-sdk-image.ts +50 -12
- package/src/swift-wasm-prune.ts +3 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2778 | (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;
|
|
@@ -3679,15 +3679,15 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
|
|
|
3679
3679
|
if (!Buffer.from(text7).equals(bytes))
|
|
3680
3680
|
throw new Error(`Nitro dependency header is not UTF-8: ${source}`);
|
|
3681
3681
|
const backport = dependency.backport?.file === relative3 ? dependency.backport : void 0;
|
|
3682
|
-
let
|
|
3682
|
+
let sha2564 = original;
|
|
3683
3683
|
if (backport) {
|
|
3684
3684
|
if (original !== backport.originalSha256)
|
|
3685
3685
|
throw new Error(`${dependency.name} backport original differs: ${relative3}`);
|
|
3686
3686
|
if (!text7.includes(backport.before))
|
|
3687
3687
|
throw new Error(`${dependency.name} backport anchor missing: ${relative3}`);
|
|
3688
3688
|
text7 = text7.replace(backport.before, backport.after);
|
|
3689
|
-
|
|
3690
|
-
if (
|
|
3689
|
+
sha2564 = (0, import_node_crypto5.createHash)("sha256").update(text7).digest("hex");
|
|
3690
|
+
if (sha2564 !== backport.derivedSha256)
|
|
3691
3691
|
throw new Error(`${dependency.name} backport derived source differs: ${relative3}`);
|
|
3692
3692
|
}
|
|
3693
3693
|
return {
|
|
@@ -3695,7 +3695,7 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
|
|
|
3695
3695
|
name: dependency.name,
|
|
3696
3696
|
source,
|
|
3697
3697
|
text: text7,
|
|
3698
|
-
sha256:
|
|
3698
|
+
sha256: sha2564,
|
|
3699
3699
|
...backport && {
|
|
3700
3700
|
derivation: {
|
|
3701
3701
|
upstreamCommit: backport.upstreamCommit,
|
|
@@ -11620,10 +11620,10 @@ function swiftNativePin() {
|
|
|
11620
11620
|
}
|
|
11621
11621
|
return pin;
|
|
11622
11622
|
}
|
|
11623
|
-
function publishedSwiftSdk(
|
|
11623
|
+
function publishedSwiftSdk(sha2564) {
|
|
11624
11624
|
const { sdkRuntime, sdkGuestRuntime } = swiftNativePin().distribution;
|
|
11625
11625
|
return [sdkRuntime, sdkGuestRuntime].find(
|
|
11626
|
-
(publication) => publication?.source ===
|
|
11626
|
+
(publication) => publication?.source === sha2564
|
|
11627
11627
|
);
|
|
11628
11628
|
}
|
|
11629
11629
|
var pin;
|
|
@@ -19579,7 +19579,7 @@ var init_react_native_core_digest = __esm({
|
|
|
19579
19579
|
|
|
19580
19580
|
// src/swift-compiler-digest.ts
|
|
19581
19581
|
function swiftArchiveCompilerDigestValue() {
|
|
19582
|
-
return true ? "
|
|
19582
|
+
return true ? "faa13b0ae0340e03d058b765e659f5e07b69f8e94793bf99981b3da7ca3bf2bd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
19583
19583
|
}
|
|
19584
19584
|
var import_node_crypto16, import_node_fs32, import_node_path31, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
19585
19585
|
var init_swift_compiler_digest = __esm({
|
|
@@ -19725,13 +19725,13 @@ var init_swift_standin_digest = __esm({
|
|
|
19725
19725
|
];
|
|
19726
19726
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
19727
19727
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
19728
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
19728
|
+
STANDIN_SOURCE_DIGEST = true ? "b6aa8eda1952d06a101c0a46227f227fb983255bb2a5f825515d7b9bc6f8650d" : standinSourceDigest();
|
|
19729
19729
|
}
|
|
19730
19730
|
});
|
|
19731
19731
|
|
|
19732
19732
|
// src/expo-native-compiler-digest.ts
|
|
19733
19733
|
function expoNativeCompilerDigestValue() {
|
|
19734
|
-
return true ? "
|
|
19734
|
+
return true ? "d396bac9636107aeb95f7657c77fa10e270f50f4ac8935e007b088b2ef65dfc8" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
19735
19735
|
}
|
|
19736
19736
|
var import_node_crypto18;
|
|
19737
19737
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -24355,6 +24355,21 @@ var init_swift_foundation = __esm({
|
|
|
24355
24355
|
}
|
|
24356
24356
|
});
|
|
24357
24357
|
|
|
24358
|
+
// src/sha256.ts
|
|
24359
|
+
function sha256Hex2(input) {
|
|
24360
|
+
if (typeof Bun !== "undefined") {
|
|
24361
|
+
return new Bun.CryptoHasher("sha256").update(input).digest("hex");
|
|
24362
|
+
}
|
|
24363
|
+
return (0, import_node_crypto25.createHash)("sha256").update(input).digest("hex");
|
|
24364
|
+
}
|
|
24365
|
+
var import_node_crypto25;
|
|
24366
|
+
var init_sha256 = __esm({
|
|
24367
|
+
"src/sha256.ts"() {
|
|
24368
|
+
"use strict";
|
|
24369
|
+
import_node_crypto25 = require("node:crypto");
|
|
24370
|
+
}
|
|
24371
|
+
});
|
|
24372
|
+
|
|
24358
24373
|
// src/swift-guest-source-plan.ts
|
|
24359
24374
|
function swiftPackageLinkage(target) {
|
|
24360
24375
|
const linkage = target.machOType === "staticlib" ? "static" : target.machOType === "mh_dylib" ? "dynamic" : null;
|
|
@@ -27006,11 +27021,6 @@ var init_swift_wasm_archive = __esm({
|
|
|
27006
27021
|
});
|
|
27007
27022
|
|
|
27008
27023
|
// src/swift-wasm-prune.ts
|
|
27009
|
-
function sha256Hex2(bytes) {
|
|
27010
|
-
if (typeof Bun !== "undefined")
|
|
27011
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
27012
|
-
return (0, import_node_crypto25.createHash)("sha256").update(bytes).digest("hex");
|
|
27013
|
-
}
|
|
27014
27024
|
function readULEB2(b, o) {
|
|
27015
27025
|
let res = 0;
|
|
27016
27026
|
let shift = 0;
|
|
@@ -28047,7 +28057,7 @@ function swiftPrunedSdkObjectOrigins(sdk2, args, rewritten) {
|
|
|
28047
28057
|
}
|
|
28048
28058
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
28049
28059
|
const archives = import_node_fs45.default.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
28050
|
-
const hash = (0,
|
|
28060
|
+
const hash = (0, import_node_crypto26.createHash)("sha256");
|
|
28051
28061
|
for (const archive of archives) {
|
|
28052
28062
|
hash.update(archive + "\0");
|
|
28053
28063
|
hash.update(swiftFileChecksum(import_node_path44.default.join(sdkWasiDir, archive)));
|
|
@@ -29336,15 +29346,16 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
|
|
|
29336
29346
|
);
|
|
29337
29347
|
import_node_fs45.default.rmSync(rspPath, { force: true });
|
|
29338
29348
|
}
|
|
29339
|
-
var import_node_child_process22,
|
|
29349
|
+
var import_node_child_process22, import_node_crypto26, import_node_fs45, import_node_path44, v3, WIDE_DATA_RELOCS, ROOT_SEG_PREFIXES, RECORD_SEGS, PARTITIONED_SEGS, PRUNED_SDK_ARCHIVES, OMIT_SDK_LIB_FLAGS, NEUTRALIZED_SWIFTRT_SECTIONS, ADDEND_RELOC_MASK2, relocationBytes, parsedObjectCache, PARSED_ROOTS, SWIFTUI_WRAPPER_HOST_PROTOCOLS, SWIFT_PRUNED_LINK_MAP, SWIFT_PRUNED_LINK_RESPONSE;
|
|
29340
29350
|
var init_swift_wasm_prune = __esm({
|
|
29341
29351
|
"src/swift-wasm-prune.ts"() {
|
|
29342
29352
|
"use strict";
|
|
29343
29353
|
import_node_child_process22 = require("node:child_process");
|
|
29344
|
-
|
|
29354
|
+
import_node_crypto26 = require("node:crypto");
|
|
29345
29355
|
import_node_fs45 = __toESM(require("node:fs"), 1);
|
|
29346
29356
|
import_node_path44 = __toESM(require("node:path"), 1);
|
|
29347
29357
|
v3 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
29358
|
+
init_sha256();
|
|
29348
29359
|
init_swift_guest_source_plan();
|
|
29349
29360
|
init_swift_link_roots();
|
|
29350
29361
|
init_swift_resource_class_names();
|
|
@@ -29458,7 +29469,7 @@ function aliasGuestArchive(options2) {
|
|
|
29458
29469
|
alias,
|
|
29459
29470
|
name: member.name,
|
|
29460
29471
|
ordinal,
|
|
29461
|
-
sha256: (0,
|
|
29472
|
+
sha256: (0, import_node_crypto27.createHash)("sha256").update(member.bytes).digest("hex")
|
|
29462
29473
|
};
|
|
29463
29474
|
});
|
|
29464
29475
|
const response = import_node_path45.default.join(options2.directory, "members.rsp");
|
|
@@ -29471,7 +29482,7 @@ function aliasGuestArchive(options2) {
|
|
|
29471
29482
|
(0, import_node_child_process23.execFileSync)(options2.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
|
|
29472
29483
|
const rewritten = readArMembers((0, import_node_fs46.readFileSync)(archive));
|
|
29473
29484
|
if (rewritten.length !== members2.length || rewritten.some(
|
|
29474
|
-
(member, index) => member.name !== members2[index].alias || (0,
|
|
29485
|
+
(member, index) => member.name !== members2[index].alias || (0, import_node_crypto27.createHash)("sha256").update(member.bytes).digest("hex") !== members2[index].sha256
|
|
29475
29486
|
))
|
|
29476
29487
|
throw new Error(`guest archive changed members ${options2.archive}`);
|
|
29477
29488
|
return { source: options2.archive, archive, members: members2 };
|
|
@@ -29531,12 +29542,12 @@ function aliasGuestLinkIdentities(identities, archives) {
|
|
|
29531
29542
|
}
|
|
29532
29543
|
return result;
|
|
29533
29544
|
}
|
|
29534
|
-
var import_node_child_process23,
|
|
29545
|
+
var import_node_child_process23, import_node_crypto27, import_node_fs46, import_node_path45;
|
|
29535
29546
|
var init_swift_guest_archive = __esm({
|
|
29536
29547
|
"src/swift-guest-archive.ts"() {
|
|
29537
29548
|
"use strict";
|
|
29538
29549
|
import_node_child_process23 = require("node:child_process");
|
|
29539
|
-
|
|
29550
|
+
import_node_crypto27 = require("node:crypto");
|
|
29540
29551
|
import_node_fs46 = require("node:fs");
|
|
29541
29552
|
import_node_path45 = __toESM(require("node:path"), 1);
|
|
29542
29553
|
init_swift_wasm_prune();
|
|
@@ -29550,15 +29561,15 @@ function nativeDyldName(bytes) {
|
|
|
29550
29561
|
name3 += String.fromCharCode(...bytes.subarray(start, start + 4096));
|
|
29551
29562
|
return name3;
|
|
29552
29563
|
}
|
|
29553
|
-
function nativeDyldTablePath(primary,
|
|
29564
|
+
function nativeDyldTablePath(primary, sha2564) {
|
|
29554
29565
|
const prefix = primary.slice(0, primary.lastIndexOf("/") + 1);
|
|
29555
|
-
return prefix +
|
|
29566
|
+
return prefix + sha2564 + (primary.endsWith(".wasm") ? ".dyld" : "");
|
|
29556
29567
|
}
|
|
29557
29568
|
function readNativeDyldTableIndex(section2) {
|
|
29558
29569
|
const bytes = new Uint8Array(section2);
|
|
29559
29570
|
const view = new DataView(section2);
|
|
29560
29571
|
if (bytes.length < 40) throw new Error("native dyld table index is truncated");
|
|
29561
|
-
const
|
|
29572
|
+
const sha2564 = Array.from(
|
|
29562
29573
|
bytes.subarray(0, 32),
|
|
29563
29574
|
(byte) => byte.toString(16).padStart(2, "0")
|
|
29564
29575
|
).join("");
|
|
@@ -29582,7 +29593,7 @@ function readNativeDyldTableIndex(section2) {
|
|
|
29582
29593
|
at = end + 1;
|
|
29583
29594
|
}
|
|
29584
29595
|
if (at !== bytes.length) throw new Error("native dyld table index has trailing bytes");
|
|
29585
|
-
return { sha256:
|
|
29596
|
+
return { sha256: sha2564, byteLength, packs, firsts };
|
|
29586
29597
|
}
|
|
29587
29598
|
var NATIVE_DYLD_TABLE_SECTION, NATIVE_DYLD_PACKS_SECTION;
|
|
29588
29599
|
var init_nativeDyldTableContract = __esm({
|
|
@@ -30544,7 +30555,7 @@ function createGuestImageLedger(input) {
|
|
|
30544
30555
|
const digest2 = ({ object: object8 }) => {
|
|
30545
30556
|
let value = digests2.get(object8);
|
|
30546
30557
|
if (value === void 0) {
|
|
30547
|
-
value = (0,
|
|
30558
|
+
value = (0, import_node_crypto28.createHash)("sha256").update(objects2.get(object8).bytes).digest("hex");
|
|
30548
30559
|
digests2.set(object8, value);
|
|
30549
30560
|
}
|
|
30550
30561
|
return value;
|
|
@@ -30759,7 +30770,7 @@ done:
|
|
|
30759
30770
|
attributes #0 = { "wasm-import-module"="${NATIVE_TABLE_IMPORT_MODULE}" "wasm-import-name"="${NATIVE_DYLD_FUNCTION_IMPORT}" }`;
|
|
30760
30771
|
}
|
|
30761
30772
|
function sdkGuestCallerId(product) {
|
|
30762
|
-
const hash = (0,
|
|
30773
|
+
const hash = (0, import_node_crypto28.createHash)("sha256").update(product).digest().readUInt32LE(0);
|
|
30763
30774
|
return (hash | 2147483648) >>> 0;
|
|
30764
30775
|
}
|
|
30765
30776
|
function sdkGuestSymbolName(product, name3) {
|
|
@@ -30837,11 +30848,11 @@ function nameGuestImageAliases(wasm, symbols) {
|
|
|
30837
30848
|
}
|
|
30838
30849
|
return Buffer.concat(parts);
|
|
30839
30850
|
}
|
|
30840
|
-
var
|
|
30851
|
+
var import_node_crypto28, ByteWriter, OBJC_INIT_RECORD, TABLE_INDEX_RELOCATIONS, sha256PairHex, GUEST_DYLD_VALUES_SECTION, GUEST_LAZY_FUNCTION_BASE, SDK_DYLD_RESOLVER;
|
|
30841
30852
|
var init_swift_guest_image_ledger = __esm({
|
|
30842
30853
|
"src/swift-guest-image-ledger.ts"() {
|
|
30843
30854
|
"use strict";
|
|
30844
|
-
|
|
30855
|
+
import_node_crypto28 = require("node:crypto");
|
|
30845
30856
|
init_nativeWasmContract();
|
|
30846
30857
|
init_swift_sdk_image_wasm();
|
|
30847
30858
|
init_swiftSdkLinkContract();
|
|
@@ -30898,7 +30909,7 @@ var init_swift_guest_image_ledger = __esm({
|
|
|
30898
30909
|
};
|
|
30899
30910
|
OBJC_INIT_RECORD = ".objc_init";
|
|
30900
30911
|
TABLE_INDEX_RELOCATIONS = /* @__PURE__ */ new Set([1, 2, 12, 18, 19, 24]);
|
|
30901
|
-
sha256PairHex = typeof Bun !== "undefined" ? (first, second) => new Bun.CryptoHasher("sha256").update(first).update("\0").update(second).digest("hex") : (first, second) => (0,
|
|
30912
|
+
sha256PairHex = typeof Bun !== "undefined" ? (first, second) => new Bun.CryptoHasher("sha256").update(first).update("\0").update(second).digest("hex") : (first, second) => (0, import_node_crypto28.createHash)("sha256").update(first).update("\0").update(second).digest("hex");
|
|
30902
30913
|
GUEST_DYLD_VALUES_SECTION = "peach_dyld_values";
|
|
30903
30914
|
GUEST_LAZY_FUNCTION_BASE = 2 ** 32;
|
|
30904
30915
|
SDK_DYLD_RESOLVER = "__peach_sdk_dyld_resolve";
|
|
@@ -31224,12 +31235,7 @@ var init_wasm_narrow_boundary = __esm({
|
|
|
31224
31235
|
function sha256Buffer(bytes) {
|
|
31225
31236
|
if (typeof Bun !== "undefined")
|
|
31226
31237
|
return Buffer.from(new Bun.CryptoHasher("sha256").update(bytes).digest());
|
|
31227
|
-
return (0,
|
|
31228
|
-
}
|
|
31229
|
-
function sha256Hex3(bytes) {
|
|
31230
|
-
if (typeof Bun !== "undefined")
|
|
31231
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
31232
|
-
return (0, import_node_crypto28.createHash)("sha256").update(bytes).digest("hex");
|
|
31238
|
+
return (0, import_node_crypto29.createHash)("sha256").update(bytes).digest();
|
|
31233
31239
|
}
|
|
31234
31240
|
function uleb2(value) {
|
|
31235
31241
|
const bytes = [];
|
|
@@ -31320,8 +31326,8 @@ function guestDyldValueRange(map2) {
|
|
|
31320
31326
|
function swiftDyldTableReference(modulePath, module2) {
|
|
31321
31327
|
const section2 = readWasmCustomSection(module2, NATIVE_DYLD_TABLE_SECTION);
|
|
31322
31328
|
if (!section2 || readWasmCustomSection(module2, NATIVE_DYLD_PACKS_SECTION)) return;
|
|
31323
|
-
const { sha256:
|
|
31324
|
-
return { path: nativeDyldTablePath(modulePath,
|
|
31329
|
+
const { sha256: sha2564, byteLength } = readNativeDyldTableIndex(Uint8Array.from(section2).buffer);
|
|
31330
|
+
return { path: nativeDyldTablePath(modulePath, sha2564), sha256: sha2564, byteLength };
|
|
31325
31331
|
}
|
|
31326
31332
|
function splitSwiftDyldTable(wasm) {
|
|
31327
31333
|
const packs = readWasmCustomSection(wasm, NATIVE_DYLD_PACKS_SECTION);
|
|
@@ -31329,16 +31335,17 @@ function splitSwiftDyldTable(wasm) {
|
|
|
31329
31335
|
const bytes = Buffer.from(packs);
|
|
31330
31336
|
return {
|
|
31331
31337
|
module: dropWasmCustomSection(wasm, NATIVE_DYLD_PACKS_SECTION),
|
|
31332
|
-
table: { sha256:
|
|
31338
|
+
table: { sha256: sha256Hex2(bytes), bytes }
|
|
31333
31339
|
};
|
|
31334
31340
|
}
|
|
31335
|
-
var
|
|
31341
|
+
var import_node_crypto29, import_node_zlib3, PACK_BYTES;
|
|
31336
31342
|
var init_swift_guest_dyld_table = __esm({
|
|
31337
31343
|
"src/swift-guest-dyld-table.ts"() {
|
|
31338
31344
|
"use strict";
|
|
31339
|
-
|
|
31345
|
+
import_node_crypto29 = require("node:crypto");
|
|
31340
31346
|
import_node_zlib3 = require("node:zlib");
|
|
31341
31347
|
init_nativeDyldTableContract();
|
|
31348
|
+
init_sha256();
|
|
31342
31349
|
init_swift_guest_image_ledger();
|
|
31343
31350
|
init_swift_guest_linked_spans();
|
|
31344
31351
|
init_wasm_narrow_boundary();
|
|
@@ -31681,7 +31688,7 @@ function selectedGuestManifestInputs(plan, selection, identities, readSelected)
|
|
|
31681
31688
|
throw new Error(
|
|
31682
31689
|
`selected member has no original identity: ${item.artifact}(${item.member})`
|
|
31683
31690
|
);
|
|
31684
|
-
if (origin && (0,
|
|
31691
|
+
if (origin && (0, import_node_crypto30.createHash)("sha256").update(bytes).digest("hex") !== origin.sha256)
|
|
31685
31692
|
throw new Error(
|
|
31686
31693
|
`selected member differs from original: ${item.artifact}(${item.member})`
|
|
31687
31694
|
);
|
|
@@ -31728,7 +31735,7 @@ function createGuestImageManifest(image) {
|
|
|
31728
31735
|
cpuType: -1,
|
|
31729
31736
|
cpuSubtype: 0
|
|
31730
31737
|
};
|
|
31731
|
-
const digest2 = (0,
|
|
31738
|
+
const digest2 = (0, import_node_crypto30.createHash)("sha256");
|
|
31732
31739
|
const sizeBuf = Buffer.allocUnsafe(8);
|
|
31733
31740
|
const add = (bytes) => {
|
|
31734
31741
|
sizeBuf.writeBigUInt64BE(BigInt(bytes.byteLength));
|
|
@@ -31770,11 +31777,11 @@ function createGuestImageManifest(image) {
|
|
|
31770
31777
|
regions: image.regions
|
|
31771
31778
|
};
|
|
31772
31779
|
}
|
|
31773
|
-
var
|
|
31780
|
+
var import_node_crypto30, import_node_fs47, framedLinkOptionsCache;
|
|
31774
31781
|
var init_swift_guest_manifest = __esm({
|
|
31775
31782
|
"src/swift-guest-manifest.ts"() {
|
|
31776
31783
|
"use strict";
|
|
31777
|
-
|
|
31784
|
+
import_node_crypto30 = require("node:crypto");
|
|
31778
31785
|
import_node_fs47 = require("node:fs");
|
|
31779
31786
|
init_swift_guest_link_plan();
|
|
31780
31787
|
init_swift_wasm_prune();
|
|
@@ -32240,11 +32247,11 @@ var init_swift_guest_projection_storage = __esm({
|
|
|
32240
32247
|
function frameworkRuntimeProductId(product) {
|
|
32241
32248
|
return `swift-package/${product.packageName}/${product.product.name}`;
|
|
32242
32249
|
}
|
|
32243
|
-
var
|
|
32250
|
+
var import_node_crypto31, v4, packageSchema;
|
|
32244
32251
|
var init_swift_runtime_products = __esm({
|
|
32245
32252
|
"src/swift-runtime-products.ts"() {
|
|
32246
32253
|
"use strict";
|
|
32247
|
-
|
|
32254
|
+
import_node_crypto31 = require("node:crypto");
|
|
32248
32255
|
v4 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
32249
32256
|
init_is_record();
|
|
32250
32257
|
packageSchema = v4.object({
|
|
@@ -32275,7 +32282,7 @@ function canonicalArchivePath(file) {
|
|
|
32275
32282
|
function sdkArtifactBytes(root, artifact) {
|
|
32276
32283
|
const file = import_node_path46.default.resolve(root, artifact.path);
|
|
32277
32284
|
const linked = (0, import_node_fs48.readFileSync)(file);
|
|
32278
|
-
const hash = (bytes) => (0,
|
|
32285
|
+
const hash = (bytes) => (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex");
|
|
32279
32286
|
if (hash(linked) === artifact.sha256) return { source: linked, linked };
|
|
32280
32287
|
if (artifact.kind !== "archive" || artifact.path !== `${SWIFT_SDK_PRODUCT_DIRECTORY}/libFoundation.a`)
|
|
32281
32288
|
throw new Error(`SDK product artifact changed ${file}`);
|
|
@@ -32301,9 +32308,9 @@ function indexSdkMembers(bytes) {
|
|
|
32301
32308
|
);
|
|
32302
32309
|
}
|
|
32303
32310
|
function verifySdkObjectTransform(source, linked, sourceSha256, transformation) {
|
|
32304
|
-
if ((0,
|
|
32311
|
+
if ((0, import_node_crypto32.createHash)("sha256").update(source).digest("hex") !== sourceSha256 || transformation.inputSha256 !== sourceSha256)
|
|
32305
32312
|
throw new Error("SDK object transform input changed");
|
|
32306
|
-
if ((0,
|
|
32313
|
+
if ((0, import_node_crypto32.createHash)("sha256").update(linked).digest("hex") !== transformation.outputSha256 || transformation.kind === "swiftrt" && !Buffer.from(patchSwiftrtObject(source)).equals(linked))
|
|
32307
32314
|
throw new Error("SDK object transform output changed");
|
|
32308
32315
|
}
|
|
32309
32316
|
function readGuestRuntimeCatalogs(sdkRoot, distributionRoot) {
|
|
@@ -32583,7 +32590,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
32583
32590
|
const digest2 = (file) => {
|
|
32584
32591
|
let value = hashes.get(file);
|
|
32585
32592
|
if (!value) {
|
|
32586
|
-
value = (0,
|
|
32593
|
+
value = (0, import_node_crypto32.createHash)("sha256").update((0, import_node_fs48.readFileSync)(file)).digest("hex");
|
|
32587
32594
|
hashes.set(file, value);
|
|
32588
32595
|
}
|
|
32589
32596
|
return value;
|
|
@@ -32651,9 +32658,9 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
32651
32658
|
if (input.member) {
|
|
32652
32659
|
if (original.kind !== "archive")
|
|
32653
32660
|
throw new Error(`SDK input member has no archive ${originalFile}`);
|
|
32654
|
-
const { name: name3, ordinal, sha256:
|
|
32661
|
+
const { name: name3, ordinal, sha256: sha2564 } = input.member;
|
|
32655
32662
|
const member = original.members.find(
|
|
32656
|
-
(entry) => entry.name === name3 && entry.ordinal === ordinal && entry.sha256 ===
|
|
32663
|
+
(entry) => entry.name === name3 && entry.ordinal === ordinal && entry.sha256 === sha2564
|
|
32657
32664
|
);
|
|
32658
32665
|
let records = archiveMembers.get(originalFile);
|
|
32659
32666
|
if (!records) {
|
|
@@ -32661,7 +32668,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
32661
32668
|
archiveMembers.set(originalFile, records);
|
|
32662
32669
|
}
|
|
32663
32670
|
const bytes = records.filter((entry) => entry.name === name3)[ordinal - 1]?.bytes;
|
|
32664
|
-
if (!member || !bytes || (0,
|
|
32671
|
+
if (!member || !bytes || (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex") !== sha2564)
|
|
32665
32672
|
throw new Error(`SDK input member changed ${originalFile}(${name3})`);
|
|
32666
32673
|
} else if (original.kind !== "object")
|
|
32667
32674
|
throw new Error(`SDK object input has no member ${originalFile}`);
|
|
@@ -32690,7 +32697,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
32690
32697
|
const member = members2.get(key2);
|
|
32691
32698
|
const source = indexed.source.get(key2);
|
|
32692
32699
|
const linked2 = indexed.linked.get(key2);
|
|
32693
|
-
if (!member || !source || !linked2 || (0,
|
|
32700
|
+
if (!member || !source || !linked2 || (0, import_node_crypto32.createHash)("sha256").update(source).digest("hex") !== member.sha256 || (0, import_node_crypto32.createHash)("sha256").update(linked2).digest("hex") !== digest2(origin.original))
|
|
32694
32701
|
throw new Error(`SDK member differs from source product ${origin.original}`);
|
|
32695
32702
|
add({
|
|
32696
32703
|
path: origin.original,
|
|
@@ -32755,7 +32762,7 @@ function guestAliasedSdkArchiveArtifacts(options2) {
|
|
|
32755
32762
|
const key2 = JSON.stringify([member.name, member.ordinal]);
|
|
32756
32763
|
const bytes = sourceMembers[index].get(key2);
|
|
32757
32764
|
const linked = viewMembers[index].get(key2);
|
|
32758
|
-
return bytes !== void 0 && linked !== void 0 && (0,
|
|
32765
|
+
return bytes !== void 0 && linked !== void 0 && (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex") === entry.sha256 && (0, import_node_crypto32.createHash)("sha256").update(linked).digest("hex") === member.sha256;
|
|
32759
32766
|
}) ? [product2.id] : []
|
|
32760
32767
|
)
|
|
32761
32768
|
);
|
|
@@ -32788,11 +32795,11 @@ function guestAliasedSdkArchiveArtifacts(options2) {
|
|
|
32788
32795
|
}
|
|
32789
32796
|
return result;
|
|
32790
32797
|
}
|
|
32791
|
-
var
|
|
32798
|
+
var import_node_crypto32, import_node_fs48, import_node_path46, v5, SDK_CONTAINING_IMAGE;
|
|
32792
32799
|
var init_swift_guest_runtime_plan = __esm({
|
|
32793
32800
|
"src/swift-guest-runtime-plan.ts"() {
|
|
32794
32801
|
"use strict";
|
|
32795
|
-
|
|
32802
|
+
import_node_crypto32 = require("node:crypto");
|
|
32796
32803
|
import_node_fs48 = require("node:fs");
|
|
32797
32804
|
import_node_path46 = __toESM(require("node:path"), 1);
|
|
32798
32805
|
v5 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -34628,13 +34635,8 @@ function clangBinaryStamp(file) {
|
|
|
34628
34635
|
const stat = (0, import_node_fs51.statSync)(file, { bigint: true });
|
|
34629
34636
|
return [file, stat.size, stat.mtimeNs].join(":");
|
|
34630
34637
|
}
|
|
34631
|
-
function sha256Hex4(bytes) {
|
|
34632
|
-
if (typeof Bun !== "undefined")
|
|
34633
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
34634
|
-
return (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex");
|
|
34635
|
-
}
|
|
34636
34638
|
function clangWrapperStamp(file) {
|
|
34637
|
-
return
|
|
34639
|
+
return sha256Hex2((0, import_node_fs51.readFileSync)(file));
|
|
34638
34640
|
}
|
|
34639
34641
|
function clangArgsNeedCwd(args) {
|
|
34640
34642
|
const pathFlags = /* @__PURE__ */ new Set([
|
|
@@ -34812,7 +34814,7 @@ function sourceGuestClangLinkOptions(options2) {
|
|
|
34812
34814
|
import_node_path49.default.join(options2.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)
|
|
34813
34815
|
)))
|
|
34814
34816
|
throw new Error(`unsupported source object producer ${file}`);
|
|
34815
|
-
const key2 =
|
|
34817
|
+
const key2 = sha256Hex2(
|
|
34816
34818
|
JSON.stringify([
|
|
34817
34819
|
"clang-link-options/v2",
|
|
34818
34820
|
clangArgsNeedCwd(command.args) ? process.cwd() : null,
|
|
@@ -34823,7 +34825,7 @@ function sourceGuestClangLinkOptions(options2) {
|
|
|
34823
34825
|
clangProducerStamp(file)
|
|
34824
34826
|
])
|
|
34825
34827
|
);
|
|
34826
|
-
const cacheFile = import_node_path49.default.join(cacheDirectory,
|
|
34828
|
+
const cacheFile = import_node_path49.default.join(cacheDirectory, sha256Hex2(file) + ".json");
|
|
34827
34829
|
const cached2 = readClangLinkOptions(cacheFile, key2);
|
|
34828
34830
|
if (cached2) {
|
|
34829
34831
|
validateClangLinkOptions(cached2);
|
|
@@ -35036,7 +35038,7 @@ function sourceGuestRuntimeLinks(options2) {
|
|
|
35036
35038
|
const file = import_node_path49.default.resolve(directory2, alias.moduleMap);
|
|
35037
35039
|
if (!file.startsWith(directory2 + import_node_path49.default.sep))
|
|
35038
35040
|
throw new Error(`invalid framework module map ${alias.moduleMap}`);
|
|
35039
|
-
if ((
|
|
35041
|
+
if (sha256Hex2((0, import_node_fs51.readFileSync)(file)) !== alias.moduleMapSha256)
|
|
35040
35042
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
35041
35043
|
sdkAliases.set(alias.name, {
|
|
35042
35044
|
product: product.id,
|
|
@@ -35092,7 +35094,7 @@ function sourceGuestRuntimeLinks(options2) {
|
|
|
35092
35094
|
const map2 = import_node_path49.default.resolve(root, alias.moduleMap);
|
|
35093
35095
|
if (!map2.startsWith(root + import_node_path49.default.sep))
|
|
35094
35096
|
throw new Error(`invalid framework module map ${alias.moduleMap}`);
|
|
35095
|
-
if ((
|
|
35097
|
+
if (sha256Hex2((0, import_node_fs51.readFileSync)(map2)) !== alias.moduleMapSha256)
|
|
35096
35098
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
35097
35099
|
frameworkAliases.set(alias.name, { kind: "package", targets: closure(alias.targets) });
|
|
35098
35100
|
}
|
|
@@ -35193,15 +35195,15 @@ function logicalGuestLinkOptions(args, identities, roots) {
|
|
|
35193
35195
|
}
|
|
35194
35196
|
return output;
|
|
35195
35197
|
}
|
|
35196
|
-
var import_node_child_process26,
|
|
35198
|
+
var import_node_child_process26, import_node_fs51, import_node_path49, CLANG_TARGET_MODULE_WRAPPER, PARALLEL_REPLAY;
|
|
35197
35199
|
var init_swift_guest_source_inputs = __esm({
|
|
35198
35200
|
"src/swift-guest-source-inputs.ts"() {
|
|
35199
35201
|
"use strict";
|
|
35200
35202
|
import_node_child_process26 = require("node:child_process");
|
|
35201
|
-
import_node_crypto32 = require("node:crypto");
|
|
35202
35203
|
import_node_fs51 = require("node:fs");
|
|
35203
35204
|
import_node_path49 = __toESM(require("node:path"), 1);
|
|
35204
35205
|
init_forked_script_contract();
|
|
35206
|
+
init_sha256();
|
|
35205
35207
|
init_swift_guest_source_plan();
|
|
35206
35208
|
init_swift_runtime_products();
|
|
35207
35209
|
init_swift_wasm_prune();
|
|
@@ -40157,6 +40159,10 @@ ${SWIFT_SDK_IMAGE_VERSION}
|
|
|
40157
40159
|
`).update(inputs2).update(products.length === 0 ? "" : `
|
|
40158
40160
|
products ${products.join(" ")}`).digest("hex").slice(0, 32);
|
|
40159
40161
|
}
|
|
40162
|
+
function swiftSdkImageVariantKey(baseKey, required) {
|
|
40163
|
+
if (!required.length) return baseKey;
|
|
40164
|
+
return (0, import_node_crypto39.createHash)("sha256").update(baseKey).update(JSON.stringify(required)).digest("hex").slice(0, 32);
|
|
40165
|
+
}
|
|
40160
40166
|
function swiftSdkImageEntry(key2, scopedLookups) {
|
|
40161
40167
|
const inputs2 = { image: key2 };
|
|
40162
40168
|
return {
|
|
@@ -40186,15 +40192,15 @@ function cached(directory2, key2) {
|
|
|
40186
40192
|
return void 0;
|
|
40187
40193
|
}
|
|
40188
40194
|
}
|
|
40189
|
-
function sdkImageAt(directory2, key2,
|
|
40195
|
+
function sdkImageAt(directory2, key2, sha2564) {
|
|
40190
40196
|
refreshSwiftCacheHold(directory2);
|
|
40191
|
-
const cacheKey = `${directory2}\0${
|
|
40197
|
+
const cacheKey = `${directory2}\0${sha2564}`;
|
|
40192
40198
|
let loadedInterface;
|
|
40193
40199
|
return {
|
|
40194
40200
|
key: key2,
|
|
40195
40201
|
directory: directory2,
|
|
40196
40202
|
image: import_node_path58.default.join(directory2, IMAGE_FILE),
|
|
40197
|
-
sha256:
|
|
40203
|
+
sha256: sha2564,
|
|
40198
40204
|
get sdkInterface() {
|
|
40199
40205
|
if (loadedInterface) return loadedInterface;
|
|
40200
40206
|
const memo2 = cachedSdkInterfaces.get(cacheKey);
|
|
@@ -40208,11 +40214,24 @@ function sdkImageAt(directory2, key2, sha2565) {
|
|
|
40208
40214
|
}
|
|
40209
40215
|
async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkImports2 = [], options2) {
|
|
40210
40216
|
const { imports: imports2, products } = swiftSdkImageProducts(moduleRoot, frameworkImports2);
|
|
40211
|
-
const
|
|
40212
|
-
const
|
|
40217
|
+
const images = import_node_path58.default.join(swiftCacheDir(), "swift-sdk-images");
|
|
40218
|
+
const baseKey = swiftSdkImageKey(moduleRoot, scopedLookups, products);
|
|
40219
|
+
const required = [...new Set(options2?.requiredGuestSymbols)].sort();
|
|
40220
|
+
const base = cached(import_node_path58.default.join(images, baseKey), baseKey);
|
|
40221
|
+
if (base) {
|
|
40222
|
+
if (!required.length) return base;
|
|
40223
|
+
const { functions, data, tls } = base.sdkInterface;
|
|
40224
|
+
if (required.every(
|
|
40225
|
+
(name3) => functions[name3] !== void 0 || data[name3] !== void 0 || tls[name3] !== void 0
|
|
40226
|
+
))
|
|
40227
|
+
return base;
|
|
40228
|
+
}
|
|
40229
|
+
const key2 = swiftSdkImageVariantKey(baseKey, required);
|
|
40230
|
+
const directory2 = import_node_path58.default.join(images, key2);
|
|
40213
40231
|
const existing = cached(directory2, key2);
|
|
40214
40232
|
if (existing) return existing;
|
|
40215
|
-
|
|
40233
|
+
const distribution = swiftDistributionAt(moduleRoot);
|
|
40234
|
+
if (!options2?.producer && !required.length && !distribution && import_node_path58.default.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
|
|
40216
40235
|
const { produceSwiftSdkImage: produceSwiftSdkImage2 } = await Promise.resolve().then(() => (init_swift_sdk_image_producer(), swift_sdk_image_producer_exports));
|
|
40217
40236
|
await produceSwiftSdkImage2({
|
|
40218
40237
|
moduleRoot,
|
|
@@ -40233,7 +40252,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
40233
40252
|
return cached(directory2, key2) ?? withSwiftRootLock(directory2, async () => {
|
|
40234
40253
|
const previous = cached(directory2, key2);
|
|
40235
40254
|
if (previous) return previous;
|
|
40236
|
-
if (
|
|
40255
|
+
if (distribution && !required.length) {
|
|
40237
40256
|
const entry = swiftSdkImageEntry(key2, scopedLookups);
|
|
40238
40257
|
const fetched = fetchNativeEntry("sdk-image", entry.name, entry.key);
|
|
40239
40258
|
if (fetched) {
|
|
@@ -40270,6 +40289,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
40270
40289
|
work,
|
|
40271
40290
|
scopedLookups,
|
|
40272
40291
|
imports2,
|
|
40292
|
+
required,
|
|
40273
40293
|
releaseFrameworks
|
|
40274
40294
|
)
|
|
40275
40295
|
);
|
|
@@ -40278,7 +40298,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
40278
40298
|
}
|
|
40279
40299
|
});
|
|
40280
40300
|
}
|
|
40281
|
-
async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLookups, imports2, releaseFrameworks) {
|
|
40301
|
+
async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLookups, imports2, required, releaseFrameworks) {
|
|
40282
40302
|
(0, import_node_fs60.rmSync)(work, { recursive: true, force: true });
|
|
40283
40303
|
(0, import_node_fs60.mkdirSync)(work, { recursive: true });
|
|
40284
40304
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
@@ -40439,7 +40459,10 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
40439
40459
|
const quote3 = (value) => JSON.stringify(value);
|
|
40440
40460
|
(0, import_node_fs60.writeFileSync)(
|
|
40441
40461
|
import_node_path58.default.join(work, "exports.rsp"),
|
|
40442
|
-
[
|
|
40462
|
+
[
|
|
40463
|
+
...[...defined].map((name3) => quote3(`--export-if-defined=${name3}`)),
|
|
40464
|
+
...required.filter((name3) => !defined.has(name3)).map((name3) => quote3(`--export=${name3}`))
|
|
40465
|
+
].join("\n")
|
|
40443
40466
|
);
|
|
40444
40467
|
const guestServices = import_node_path58.default.join(work, "peach-guest-services.allow");
|
|
40445
40468
|
(0, import_node_fs60.writeFileSync)(guestServices, peachGuestServiceAllowlist);
|
|
@@ -40530,11 +40553,12 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
40530
40553
|
import_node_path58.default.join(work, IMAGE_DIGEST),
|
|
40531
40554
|
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0, import_node_crypto39.createHash)("sha256").update(image).digest("hex")
|
|
40532
40555
|
);
|
|
40533
|
-
|
|
40556
|
+
const baseKey = swiftSdkImageKey(
|
|
40534
40557
|
moduleRoot,
|
|
40535
40558
|
scopedLookups,
|
|
40536
40559
|
swiftSdkImageProducts(moduleRoot, imports2).products
|
|
40537
|
-
)
|
|
40560
|
+
);
|
|
40561
|
+
if (swiftSdkImageVariantKey(baseKey, required) !== key2)
|
|
40538
40562
|
throw new Error("Swift SDK image inputs changed during compilation");
|
|
40539
40563
|
for (const name3 of (0, import_node_fs60.readdirSync)(work))
|
|
40540
40564
|
if (!SWIFT_SDK_IMAGE_FILES.includes(name3))
|
|
@@ -40945,12 +40969,12 @@ function encodeNativeSdkLater(later) {
|
|
|
40945
40969
|
const view = new DataView(bytes.buffer);
|
|
40946
40970
|
view.setUint32(0, files2.length, true);
|
|
40947
40971
|
let at = 4;
|
|
40948
|
-
for (const { sha256:
|
|
40949
|
-
if (!/^[a-f0-9]{64}$/.test(
|
|
40972
|
+
for (const { sha256: sha2564, byteLength } of files2) {
|
|
40973
|
+
if (!/^[a-f0-9]{64}$/.test(sha2564))
|
|
40950
40974
|
throw new Error("Swift SDK later data needs a sha256 digest");
|
|
40951
40975
|
if (!byteLength) throw new Error("Swift SDK later data file is empty");
|
|
40952
40976
|
for (let i = 0; i < LATER_DIGEST_BYTES; i++)
|
|
40953
|
-
bytes[at + i] = Number.parseInt(
|
|
40977
|
+
bytes[at + i] = Number.parseInt(sha2564.slice(i * 2, i * 2 + 2), 16);
|
|
40954
40978
|
view.setUint32(at + LATER_DIGEST_BYTES, byteLength, true);
|
|
40955
40979
|
at += LATER_DIGEST_BYTES + 4;
|
|
40956
40980
|
}
|
|
@@ -40975,13 +40999,13 @@ function decodeNativeSdkLater(trailer) {
|
|
|
40975
40999
|
const files2 = [];
|
|
40976
41000
|
for (let file = 0; file < count; file++) {
|
|
40977
41001
|
if (at + LATER_DIGEST_BYTES + 4 > trailer.byteLength) throw truncated();
|
|
40978
|
-
const
|
|
41002
|
+
const sha2564 = Array.from(
|
|
40979
41003
|
trailer.subarray(at, at + LATER_DIGEST_BYTES),
|
|
40980
41004
|
(byte) => byte.toString(16).padStart(2, "0")
|
|
40981
41005
|
).join("");
|
|
40982
41006
|
const byteLength = view.getUint32(at + LATER_DIGEST_BYTES, true);
|
|
40983
41007
|
if (!byteLength) throw new Error("Swift SDK binding names empty later data");
|
|
40984
|
-
files2.push({ sha256:
|
|
41008
|
+
files2.push({ sha256: sha2564, byteLength });
|
|
40985
41009
|
at += LATER_DIGEST_BYTES + 4;
|
|
40986
41010
|
}
|
|
40987
41011
|
if (!files2.length || at + 4 > trailer.byteLength) throw truncated();
|
|
@@ -42168,8 +42192,8 @@ function createSwiftSdkBinding(linkage, sdk2, usage, projection) {
|
|
|
42168
42192
|
const binding = bindSwiftAppModule(linkage, sdk2);
|
|
42169
42193
|
const { data, liveSlots } = selectSwiftSdkData(sdk2, usage, linkage, projection);
|
|
42170
42194
|
const bytes = Buffer.concat([binding, data]);
|
|
42171
|
-
const
|
|
42172
|
-
return { bytes, sha256:
|
|
42195
|
+
const sha2564 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto40.createHash)("sha256").update(bytes).digest("hex");
|
|
42196
|
+
return { bytes, sha256: sha2564, liveSlots };
|
|
42173
42197
|
}
|
|
42174
42198
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
42175
42199
|
const map2 = readWasmLinkMap(mapFile, false);
|
|
@@ -50695,7 +50719,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
50695
50719
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
50696
50720
|
MULTI_MANIFEST_VERSION = 76;
|
|
50697
50721
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
50698
|
-
compilerSourceDigest = true ? "
|
|
50722
|
+
compilerSourceDigest = true ? "3bdbb1d31ba7d202e612a91b60a3b588f9bc94a11990fb114585b3e2521857f5" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
50699
50723
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
50700
50724
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
50701
50725
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -68939,11 +68963,6 @@ end
|
|
|
68939
68963
|
});
|
|
68940
68964
|
|
|
68941
68965
|
// src/bazel-project.ts
|
|
68942
|
-
function sha256Hex5(bytes) {
|
|
68943
|
-
if (typeof Bun !== "undefined")
|
|
68944
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
68945
|
-
return (0, import_node_crypto49.createHash)("sha256").update(bytes).digest("hex");
|
|
68946
|
-
}
|
|
68947
68966
|
function isBazelPackage(input) {
|
|
68948
68967
|
return /^BUILD(?:\.bazel)?$/.test(import_node_path83.default.basename(input)) && import_node_fs82.default.statSync(input).isFile();
|
|
68949
68968
|
}
|
|
@@ -68973,7 +68992,7 @@ function bazelBinary(root) {
|
|
|
68973
68992
|
const expected = (0, import_node_child_process44.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
|
|
68974
68993
|
encoding: "utf8"
|
|
68975
68994
|
}).split(/\s/)[0];
|
|
68976
|
-
const actual = (
|
|
68995
|
+
const actual = sha256Hex2(import_node_fs82.default.readFileSync(partial));
|
|
68977
68996
|
if (actual !== expected) {
|
|
68978
68997
|
import_node_fs82.default.rmSync(partial, { force: true });
|
|
68979
68998
|
throw new Error(`${url} digest ${actual} differs from its release ${expected}`);
|
|
@@ -69698,8 +69717,8 @@ ${published3.map(
|
|
|
69698
69717
|
]
|
|
69699
69718
|
)
|
|
69700
69719
|
]);
|
|
69701
|
-
const digest2 =
|
|
69702
|
-
JSON.stringify([...contents2].map(([file, bytes]) => [file,
|
|
69720
|
+
const digest2 = sha256Hex2(
|
|
69721
|
+
JSON.stringify([...contents2].map(([file, bytes]) => [file, sha256Hex2(bytes)]))
|
|
69703
69722
|
);
|
|
69704
69723
|
const stamp = import_node_path83.default.join(bundle, ".peach-digest");
|
|
69705
69724
|
if (!import_node_fs82.default.existsSync(stamp) || import_node_fs82.default.readFileSync(stamp, "utf8") !== digest2) {
|
|
@@ -69871,6 +69890,7 @@ var init_bazel_project = __esm({
|
|
|
69871
69890
|
import_node_path83 = __toESM(require("node:path"), 1);
|
|
69872
69891
|
init_is_record();
|
|
69873
69892
|
init_plist();
|
|
69893
|
+
init_sha256();
|
|
69874
69894
|
LIBRARY_RULES = /* @__PURE__ */ new Set(["swift_library", "objc_library", "cc_library"]);
|
|
69875
69895
|
QUERIED_RULES = [
|
|
69876
69896
|
"swift_library",
|
|
@@ -70793,7 +70813,7 @@ var init_provenance = __esm({
|
|
|
70793
70813
|
import_node_crypto51 = require("node:crypto");
|
|
70794
70814
|
import_node_fs84 = require("node:fs");
|
|
70795
70815
|
import_node_path85 = require("node:path");
|
|
70796
|
-
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"
|
|
70816
|
+
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"839661007eb801f3e3ec055a1f00c0e8b7a3d3be7f4bf1fc389ee6b5c2a290a6","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"2c235d7947d94c8a9f84b305f5453da8647c5c9f8180a38c59631868685b8723","swift-coverage/package.ts":"0f595bd55bcbd22bb337395f175d2aba23624d60f44d3309a61929629cc9b200","swift-coverage/xcode.ts":"059dd3b47d1ce4fe43acef97277c64b57507399866725a2144289eaa6ef8c1d4","swift-coverage/xcode-assets.ts":"a9314d1de1df0ce639a4402b66f89f8b20537f3fdadf0b7cf7355e6ac5b09f54","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"b7f31dd9c3c554bd69bff75cc9985a11032a394b405acc4b82be8f140a2a8676","swift-coverage/xcode-packages.ts":"d6b3d7fb1f5e32b4b08727927b794030d2f1285c7e3c41d7e8ab2e244a3d8c36","swift-coverage/xcode-strings.ts":"ef711d2a9039a08eb7d407546018ab22aafb0e883a65fc838bf864f5c5c9f85b","swift-coverage/reader.ts":"2562d668fd959c4ae3d24b765d3281b8d03251e8de65ec62bda305ba79f7d8c3","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"cc32d16a0a3539e97447f853dd876b6b9240d544f5e0f21852c5a8333968e8a5","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"d140088a94d032e28788e18bf11499965e0c626255fd904538764ededcf1d751","xcode-target-members.ts":"2379e6d411c5d63fa65ddc24c4e4fc8bfcd001b5be109b694c848fe62908db86","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path85.join)(__sootsim_import_meta_dirname, ".."));
|
|
70797
70817
|
}
|
|
70798
70818
|
});
|
|
70799
70819
|
|
|
@@ -71785,12 +71805,12 @@ function catalogDigest(directory2) {
|
|
|
71785
71805
|
const path121 = (0, import_node_path87.join)(dir, entry.name);
|
|
71786
71806
|
if (entry.isDirectory()) walk4(path121);
|
|
71787
71807
|
else if (entry.isFile() && (0, import_node_fs86.statSync)(path121).size <= 64 * 1024 * 1024)
|
|
71788
|
-
hashes.push([(0, import_node_path87.relative)(directory2, path121),
|
|
71808
|
+
hashes.push([(0, import_node_path87.relative)(directory2, path121), sha256Hex2((0, import_node_fs86.readFileSync)(path121))]);
|
|
71789
71809
|
else throw new Error(`Unsupported asset catalog entry: ${path121}`);
|
|
71790
71810
|
}
|
|
71791
71811
|
};
|
|
71792
71812
|
walk4(directory2);
|
|
71793
|
-
return
|
|
71813
|
+
return sha256Hex2(JSON.stringify(hashes));
|
|
71794
71814
|
}
|
|
71795
71815
|
function symbolSource(plan, root) {
|
|
71796
71816
|
const key2 = JSON.stringify([root, plan]);
|
|
@@ -71887,16 +71907,15 @@ function assetSymbolText(plan, root) {
|
|
|
71887
71907
|
if (source.status === "unknown") throw new Error(source.reason);
|
|
71888
71908
|
return source.text;
|
|
71889
71909
|
}
|
|
71890
|
-
var
|
|
71910
|
+
var import_node_fs86, import_node_path87, unprovenAssetSettings, assetSymbolSettingKeys, provenOtherAssetFlags, symbolTexts;
|
|
71891
71911
|
var init_xcode_assets = __esm({
|
|
71892
71912
|
"src/swift-coverage/xcode-assets.ts"() {
|
|
71893
71913
|
"use strict";
|
|
71894
|
-
import_node_crypto52 = require("node:crypto");
|
|
71895
71914
|
import_node_fs86 = require("node:fs");
|
|
71896
71915
|
import_node_path87 = require("node:path");
|
|
71916
|
+
init_sha256();
|
|
71897
71917
|
init_provenance();
|
|
71898
71918
|
init_xcode_asset_symbols();
|
|
71899
|
-
sha2562 = (bytes) => (0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex");
|
|
71900
71919
|
unprovenAssetSettings = [
|
|
71901
71920
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
71902
71921
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
@@ -72578,7 +72597,7 @@ function normalizedEnums(input) {
|
|
|
72578
72597
|
}
|
|
72579
72598
|
function localizationIdentifier(field, key2) {
|
|
72580
72599
|
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
72581
|
-
const digest2 = (0,
|
|
72600
|
+
const digest2 = (0, import_node_crypto52.createHash)("sha256").update(JSON.stringify([...field, key2])).digest();
|
|
72582
72601
|
return Array.from(
|
|
72583
72602
|
digest2.subarray(0, 6),
|
|
72584
72603
|
(byte) => alphabet[byte % alphabet.length]
|
|
@@ -72903,12 +72922,12 @@ function writeIntentDefinition(input, prefix) {
|
|
|
72903
72922
|
lines.push("</plist>", "");
|
|
72904
72923
|
return lines.join("\n");
|
|
72905
72924
|
}
|
|
72906
|
-
var import_strict4,
|
|
72925
|
+
var import_strict4, import_node_crypto52, typeMetadata, initializeMetadata, widgetArraySizes, defaultReasonMessages;
|
|
72907
72926
|
var init_metadata = __esm({
|
|
72908
72927
|
"src/intent-definition/metadata.ts"() {
|
|
72909
72928
|
"use strict";
|
|
72910
72929
|
import_strict4 = __toESM(require("node:assert/strict"), 1);
|
|
72911
|
-
|
|
72930
|
+
import_node_crypto52 = require("node:crypto");
|
|
72912
72931
|
init_fields();
|
|
72913
72932
|
init_hash_input();
|
|
72914
72933
|
init_siphash();
|
|
@@ -73617,7 +73636,7 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
73617
73636
|
if (prefix) identifier(prefix);
|
|
73618
73637
|
if (module2) identifier(module2);
|
|
73619
73638
|
const source = import_node_fs88.default.readFileSync(definition2);
|
|
73620
|
-
const key2 = (0,
|
|
73639
|
+
const key2 = (0, import_node_crypto53.createHash)("sha256").update(
|
|
73621
73640
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
73622
73641
|
).update("\0").update(source).digest("hex");
|
|
73623
73642
|
const cache = import_node_path89.default.join(derivedDirectory, "IntentDefinitions");
|
|
@@ -73657,11 +73676,11 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
73657
73676
|
import_node_fs88.default.rmSync(stage, { recursive: true, force: true });
|
|
73658
73677
|
}
|
|
73659
73678
|
}
|
|
73660
|
-
var
|
|
73679
|
+
var import_node_crypto53, import_node_fs88, import_node_path89, intentCompilerRevision;
|
|
73661
73680
|
var init_xcode_intents = __esm({
|
|
73662
73681
|
"src/xcode-intents.ts"() {
|
|
73663
73682
|
"use strict";
|
|
73664
|
-
|
|
73683
|
+
import_node_crypto53 = require("node:crypto");
|
|
73665
73684
|
import_node_fs88 = __toESM(require("node:fs"), 1);
|
|
73666
73685
|
import_node_path89 = __toESM(require("node:path"), 1);
|
|
73667
73686
|
init_fields();
|
|
@@ -74363,7 +74382,7 @@ function loadProject(xcodeproj) {
|
|
|
74363
74382
|
if (!projectFile)
|
|
74364
74383
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
74365
74384
|
const source = import_node_fs89.default.readFileSync(projectFile, "utf8");
|
|
74366
|
-
const digest2 = (0,
|
|
74385
|
+
const digest2 = (0, import_node_crypto54.createHash)("sha256").update(source).digest("hex");
|
|
74367
74386
|
const cached2 = loaded2.get(projectFile);
|
|
74368
74387
|
if (cached2?.digest === digest2) return cached2.project;
|
|
74369
74388
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -74415,7 +74434,7 @@ function xcodeInstallationIdentity() {
|
|
|
74415
74434
|
if (!selected) return null;
|
|
74416
74435
|
const directory2 = import_node_path91.default.extname(selected) === ".app" ? import_node_path91.default.join(selected, "Contents", "Developer") : selected;
|
|
74417
74436
|
const versionFile = `${directory2}/../version.plist`;
|
|
74418
|
-
const version2 = import_node_fs89.default.existsSync(versionFile) ? (0,
|
|
74437
|
+
const version2 = import_node_fs89.default.existsSync(versionFile) ? (0, import_node_crypto54.createHash)("sha256").update(import_node_fs89.default.readFileSync(versionFile)).digest("hex") : null;
|
|
74419
74438
|
return { directory: directory2, version: version2 };
|
|
74420
74439
|
}
|
|
74421
74440
|
function defaultConfiguration(project2) {
|
|
@@ -74899,7 +74918,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
74899
74918
|
);
|
|
74900
74919
|
});
|
|
74901
74920
|
}
|
|
74902
|
-
const signature2 = (0,
|
|
74921
|
+
const signature2 = (0, import_node_crypto54.createHash)("sha256").update(
|
|
74903
74922
|
JSON.stringify([phase, [...settingKeys].map((key3) => [key3, settings(key3)])])
|
|
74904
74923
|
);
|
|
74905
74924
|
for (const file of inputFiles) {
|
|
@@ -75054,7 +75073,7 @@ ${output}`
|
|
|
75054
75073
|
const inputs2 = JSON.stringify([
|
|
75055
75074
|
1,
|
|
75056
75075
|
args,
|
|
75057
|
-
(0,
|
|
75076
|
+
(0, import_node_crypto54.createHash)("sha256").update(import_node_fs89.default.readFileSync(file)).digest("hex")
|
|
75058
75077
|
]);
|
|
75059
75078
|
const developer = settings("DEVELOPER_DIR");
|
|
75060
75079
|
const cached2 = import_node_fs89.default.existsSync(output) && import_node_fs89.default.existsSync(stamp) ? import_node_fs89.default.readFileSync(stamp, "utf8").split("\n") : [];
|
|
@@ -76564,12 +76583,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
76564
76583
|
cocoapods
|
|
76565
76584
|
};
|
|
76566
76585
|
}
|
|
76567
|
-
var import_node_child_process45,
|
|
76586
|
+
var import_node_child_process45, import_node_crypto54, import_node_fs89, import_node_module8, import_node_path91, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
76568
76587
|
var init_xcode_project = __esm({
|
|
76569
76588
|
"src/xcode-project.ts"() {
|
|
76570
76589
|
"use strict";
|
|
76571
76590
|
import_node_child_process45 = require("node:child_process");
|
|
76572
|
-
|
|
76591
|
+
import_node_crypto54 = require("node:crypto");
|
|
76573
76592
|
import_node_fs89 = __toESM(require("node:fs"), 1);
|
|
76574
76593
|
import_node_module8 = require("node:module");
|
|
76575
76594
|
import_node_path91 = __toESM(require("node:path"), 1);
|
|
@@ -76778,8 +76797,8 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
76778
76797
|
);
|
|
76779
76798
|
const appRelative = import_node_path92.default.relative(root, app);
|
|
76780
76799
|
const manifest = JSON.parse(import_node_fs90.default.readFileSync(import_node_path92.default.join(root, "package.json"), "utf8"));
|
|
76781
|
-
const hash = (0,
|
|
76782
|
-
const native = (0,
|
|
76800
|
+
const hash = (0, import_node_crypto55.createHash)("sha256");
|
|
76801
|
+
const native = (0, import_node_crypto55.createHash)("sha256");
|
|
76783
76802
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
76784
76803
|
const versionFree = new Set(
|
|
76785
76804
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
@@ -76863,7 +76882,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
76863
76882
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
76864
76883
|
const bytes = await import_node_fs90.default.promises.readFile(file);
|
|
76865
76884
|
content.size = bytes.length;
|
|
76866
|
-
content.digest = (0,
|
|
76885
|
+
content.digest = (0, import_node_crypto55.createHash)("sha256").update(bytes).digest("hex");
|
|
76867
76886
|
fileDigests.set(file, content);
|
|
76868
76887
|
})
|
|
76869
76888
|
);
|
|
@@ -77416,10 +77435,10 @@ function stageCachedQuickCryptoOpenSsl(app) {
|
|
|
77416
77435
|
const opensslDir = import_node_path92.default.join(packageDir, "ios", "openssl");
|
|
77417
77436
|
if (import_node_fs90.default.existsSync(import_node_path92.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
|
|
77418
77437
|
const podspec = import_node_fs90.default.readFileSync(import_node_path92.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
|
|
77419
|
-
const
|
|
77420
|
-
if (!
|
|
77421
|
-
const archive = import_node_path92.default.join(cacheDir(), "pod-archives", `${
|
|
77422
|
-
if (!import_node_fs90.default.existsSync(archive) || (0,
|
|
77438
|
+
const sha2564 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
77439
|
+
if (!sha2564) return;
|
|
77440
|
+
const archive = import_node_path92.default.join(cacheDir(), "pod-archives", `${sha2564}.zip`);
|
|
77441
|
+
if (!import_node_fs90.default.existsSync(archive) || (0, import_node_crypto55.createHash)("sha256").update(import_node_fs90.default.readFileSync(archive)).digest("hex") !== sha2564)
|
|
77423
77442
|
return;
|
|
77424
77443
|
import_node_fs90.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
77425
77444
|
import_node_fs90.default.mkdirSync(opensslDir, { recursive: true });
|
|
@@ -77457,12 +77476,12 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
77457
77476
|
});
|
|
77458
77477
|
});
|
|
77459
77478
|
}
|
|
77460
|
-
var import_node_child_process46,
|
|
77479
|
+
var import_node_child_process46, import_node_crypto55, import_node_fs90, import_node_module9, import_node_os20, import_node_path92, import_node_util13, isolatedGitEnv, EXACT_VERSION, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
|
|
77461
77480
|
var init_expo_native_workspace = __esm({
|
|
77462
77481
|
"src/expo-native-workspace.ts"() {
|
|
77463
77482
|
"use strict";
|
|
77464
77483
|
import_node_child_process46 = require("node:child_process");
|
|
77465
|
-
|
|
77484
|
+
import_node_crypto55 = require("node:crypto");
|
|
77466
77485
|
import_node_fs90 = __toESM(require("node:fs"), 1);
|
|
77467
77486
|
import_node_module9 = require("node:module");
|
|
77468
77487
|
import_node_os20 = __toESM(require("node:os"), 1);
|
|
@@ -77536,7 +77555,7 @@ function run() {
|
|
|
77536
77555
|
|
|
77537
77556
|
// src/expo-discovery-cache.ts
|
|
77538
77557
|
function peachPin() {
|
|
77539
|
-
return (0,
|
|
77558
|
+
return (0, import_node_crypto56.createHash)("sha256").update(
|
|
77540
77559
|
`${FORMAT}\0${expoNativeCompilerDigestValue()}\0${swiftNativePin().distribution.id}\0`
|
|
77541
77560
|
).update(JSON.stringify([...EXPO_EAGER_NATIVE_VIEWS])).update(JSON.stringify([...peachAnsweredNativePackages()].sort())).digest("hex");
|
|
77542
77561
|
}
|
|
@@ -77550,7 +77569,7 @@ function stable(value) {
|
|
|
77550
77569
|
}
|
|
77551
77570
|
async function expoDiscoveryKey(options2) {
|
|
77552
77571
|
const { root, hash } = await hashExpoWorkspace(options2.appRoot, options2.signal);
|
|
77553
|
-
const key2 = (0,
|
|
77572
|
+
const key2 = (0, import_node_crypto56.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable(JSON.parse(options2.searchText))}\0`).update(`${stable(options2.configuration)}\0`).update(stable(JSON.parse(options2.resolveText))).digest("hex");
|
|
77554
77573
|
return { key: key2, root };
|
|
77555
77574
|
}
|
|
77556
77575
|
function expoDiscoveryCacheDir() {
|
|
@@ -77621,7 +77640,7 @@ function readExpoDiscovery(key2) {
|
|
|
77621
77640
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
77622
77641
|
const archive = import_node_path93.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
77623
77642
|
const bytes = import_node_fs91.default.readFileSync(archive);
|
|
77624
|
-
if ((0,
|
|
77643
|
+
if ((0, import_node_crypto56.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
77625
77644
|
return void 0;
|
|
77626
77645
|
const bodies = (0, import_node_zlib6.zstdDecompressSync)(bytes);
|
|
77627
77646
|
const decoded = /* @__PURE__ */ new Map();
|
|
@@ -77695,7 +77714,7 @@ function stampedFileHash(file) {
|
|
|
77695
77714
|
const stamp = [stat.dev, stat.ino, stat.size, stat.mtimeNs, stat.ctimeNs].join(":");
|
|
77696
77715
|
const cached2 = fileHashes.get(file);
|
|
77697
77716
|
if (cached2?.stamp === stamp) return cached2.checksum;
|
|
77698
|
-
const checksum = (0,
|
|
77717
|
+
const checksum = (0, import_node_crypto56.createHash)("sha256").update(import_node_fs91.default.readFileSync(file)).digest("hex");
|
|
77699
77718
|
fileHashes.set(file, { stamp, checksum });
|
|
77700
77719
|
fileHashesChanged = true;
|
|
77701
77720
|
return checksum;
|
|
@@ -77704,7 +77723,7 @@ function saveFileHashes() {
|
|
|
77704
77723
|
if (!fileHashesChanged) return;
|
|
77705
77724
|
fileHashesChanged = false;
|
|
77706
77725
|
const target = fileHashesPath();
|
|
77707
|
-
const temporary = `${target}.${process.pid}.${(0,
|
|
77726
|
+
const temporary = `${target}.${process.pid}.${(0, import_node_crypto56.randomUUID)()}.tmp`;
|
|
77708
77727
|
try {
|
|
77709
77728
|
import_node_fs91.default.mkdirSync(import_node_path93.default.dirname(target), { recursive: true });
|
|
77710
77729
|
import_node_fs91.default.writeFileSync(
|
|
@@ -77759,7 +77778,7 @@ function frameworkDigest(directory2, signal) {
|
|
|
77759
77778
|
if (target !== root && !target.startsWith(`${root}${import_node_path93.default.sep}`))
|
|
77760
77779
|
throw new Error(`framework link escapes its tree: ${relative3}`);
|
|
77761
77780
|
}
|
|
77762
|
-
return (0,
|
|
77781
|
+
return (0, import_node_crypto56.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
77763
77782
|
}
|
|
77764
77783
|
function rewritePreparedPaths(options2) {
|
|
77765
77784
|
const { units, sourceRoot, preparedRoot, signal } = options2;
|
|
@@ -77780,7 +77799,7 @@ function rewritePreparedPaths(options2) {
|
|
|
77780
77799
|
return null;
|
|
77781
77800
|
}
|
|
77782
77801
|
if (!preparedBytes.equals(sourceBytes)) return null;
|
|
77783
|
-
dependencies[sourceFile] = (0,
|
|
77802
|
+
dependencies[sourceFile] = (0, import_node_crypto56.createHash)("sha256").update(sourceBytes).digest("hex");
|
|
77784
77803
|
verifiedFiles.set(preparedFile, sourceFile);
|
|
77785
77804
|
return sourceFile;
|
|
77786
77805
|
};
|
|
@@ -77857,7 +77876,7 @@ function rewritePreparedPaths(options2) {
|
|
|
77857
77876
|
portableDir = import_node_path93.default.join(parent, import_node_path93.default.basename(dir));
|
|
77858
77877
|
if (!import_node_fs91.default.existsSync(portableDir)) {
|
|
77859
77878
|
import_node_fs91.default.mkdirSync(parent, { recursive: true });
|
|
77860
|
-
const tmp = import_node_path93.default.join(parent, `.${process.pid}.${(0,
|
|
77879
|
+
const tmp = import_node_path93.default.join(parent, `.${process.pid}.${(0, import_node_crypto56.randomUUID)()}.tmp`);
|
|
77861
77880
|
try {
|
|
77862
77881
|
import_node_fs91.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
77863
77882
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
@@ -77886,7 +77905,7 @@ function writeExpoDiscovery(options2) {
|
|
|
77886
77905
|
try {
|
|
77887
77906
|
const dir = expoDiscoveryCacheDir();
|
|
77888
77907
|
import_node_fs91.default.mkdirSync(dir, { recursive: true });
|
|
77889
|
-
const tmp = import_node_path93.default.join(dir, `.${options2.key}.${process.pid}.${(0,
|
|
77908
|
+
const tmp = import_node_path93.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto56.randomUUID)()}.tmp`);
|
|
77890
77909
|
if (options2.units === null) {
|
|
77891
77910
|
import_node_fs91.default.writeFileSync(
|
|
77892
77911
|
tmp,
|
|
@@ -77949,8 +77968,8 @@ function writeExpoDiscovery(options2) {
|
|
|
77949
77968
|
}
|
|
77950
77969
|
);
|
|
77951
77970
|
const contents2 = (0, import_node_zlib6.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
77952
|
-
const archive = (0,
|
|
77953
|
-
const temporary = import_node_path93.default.join(blobDir, "." + (0,
|
|
77971
|
+
const archive = (0, import_node_crypto56.createHash)("sha256").update(contents2).digest("hex");
|
|
77972
|
+
const temporary = import_node_path93.default.join(blobDir, "." + (0, import_node_crypto56.randomUUID)() + ".tmp");
|
|
77954
77973
|
try {
|
|
77955
77974
|
import_node_fs91.default.writeFileSync(temporary, contents2);
|
|
77956
77975
|
import_node_fs91.default.renameSync(temporary, import_node_path93.default.join(blobDir, `${archive}.zst`));
|
|
@@ -77977,11 +77996,11 @@ function writeExpoDiscovery(options2) {
|
|
|
77977
77996
|
return error instanceof Error ? error.message : String(error);
|
|
77978
77997
|
}
|
|
77979
77998
|
}
|
|
77980
|
-
var
|
|
77999
|
+
var import_node_crypto56, import_node_fs91, import_node_path93, import_node_zlib6, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
|
|
77981
78000
|
var init_expo_discovery_cache = __esm({
|
|
77982
78001
|
"src/expo-discovery-cache.ts"() {
|
|
77983
78002
|
"use strict";
|
|
77984
|
-
|
|
78003
|
+
import_node_crypto56 = require("node:crypto");
|
|
77985
78004
|
import_node_fs91 = __toESM(require("node:fs"), 1);
|
|
77986
78005
|
import_node_path93 = __toESM(require("node:path"), 1);
|
|
77987
78006
|
import_node_zlib6 = require("node:zlib");
|
|
@@ -78451,7 +78470,7 @@ function hashPackageTree(root, options2) {
|
|
|
78451
78470
|
}
|
|
78452
78471
|
};
|
|
78453
78472
|
walk4(root, "");
|
|
78454
|
-
const hash = (0,
|
|
78473
|
+
const hash = (0, import_node_crypto57.createHash)("sha256");
|
|
78455
78474
|
return (async () => {
|
|
78456
78475
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
78457
78476
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
@@ -78466,11 +78485,11 @@ function packageTreeDigest(root) {
|
|
|
78466
78485
|
compareNames: (left, right) => left.localeCompare(right)
|
|
78467
78486
|
});
|
|
78468
78487
|
}
|
|
78469
|
-
var
|
|
78488
|
+
var import_node_crypto57, import_node_fs94, import_promises9, import_node_path96, READ_AHEAD;
|
|
78470
78489
|
var init_package_tree_digest = __esm({
|
|
78471
78490
|
"src/package-tree-digest.ts"() {
|
|
78472
78491
|
"use strict";
|
|
78473
|
-
|
|
78492
|
+
import_node_crypto57 = require("node:crypto");
|
|
78474
78493
|
import_node_fs94 = require("node:fs");
|
|
78475
78494
|
import_promises9 = require("node:fs/promises");
|
|
78476
78495
|
import_node_path96 = require("node:path");
|
|
@@ -78550,7 +78569,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
78550
78569
|
"swift-pin": JSON.stringify(swiftNativePin()),
|
|
78551
78570
|
answered: JSON.stringify([...peachAnsweredNativePackages()].sort()),
|
|
78552
78571
|
"pods-environment": JSON.stringify(reactNativePodsEnvironment()),
|
|
78553
|
-
fingerprint: (0,
|
|
78572
|
+
fingerprint: (0, import_node_crypto58.createHash)("sha256").update(lines.sort().join("\n")).digest("hex")
|
|
78554
78573
|
},
|
|
78555
78574
|
packages
|
|
78556
78575
|
};
|
|
@@ -78656,7 +78675,7 @@ async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
|
|
|
78656
78675
|
}
|
|
78657
78676
|
function servedExpoSwift(appRoot, entry, app) {
|
|
78658
78677
|
if (!entry.expoSwift) return null;
|
|
78659
|
-
const rootId = `${(0,
|
|
78678
|
+
const rootId = `${(0, import_node_crypto58.createHash)("sha256").update(import_node_fs95.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
78660
78679
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
78661
78680
|
const installed = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
78662
78681
|
const infoPlist2 = Buffer.from(installed).toString("base64");
|
|
@@ -78684,11 +78703,11 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
78684
78703
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
78685
78704
|
);
|
|
78686
78705
|
}
|
|
78687
|
-
var
|
|
78706
|
+
var import_node_crypto58, import_node_fs95, import_node_module12, import_node_path97, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
|
|
78688
78707
|
var init_expo_native_prebuilt = __esm({
|
|
78689
78708
|
"src/expo-native-prebuilt.ts"() {
|
|
78690
78709
|
"use strict";
|
|
78691
|
-
|
|
78710
|
+
import_node_crypto58 = require("node:crypto");
|
|
78692
78711
|
import_node_fs95 = __toESM(require("node:fs"), 1);
|
|
78693
78712
|
import_node_module12 = require("node:module");
|
|
78694
78713
|
import_node_path97 = __toESM(require("node:path"), 1);
|
|
@@ -78750,7 +78769,7 @@ function watchNativeInputs(root) {
|
|
|
78750
78769
|
(0, import_node_timers.clearTimeout)(expiry);
|
|
78751
78770
|
for (const watcher of watchers) watcher.close();
|
|
78752
78771
|
}
|
|
78753
|
-
const inputs2 = { expiry, revision: (0,
|
|
78772
|
+
const inputs2 = { expiry, revision: (0, import_node_crypto59.randomUUID)() };
|
|
78754
78773
|
const watch = (directory2, recursive, name3) => {
|
|
78755
78774
|
const watcher = import_node_fs96.default.watch(
|
|
78756
78775
|
directory2,
|
|
@@ -78791,11 +78810,11 @@ function watchNativeInputs(root) {
|
|
|
78791
78810
|
watchedInputs.set(workspace, inputs2);
|
|
78792
78811
|
return inputs2;
|
|
78793
78812
|
}
|
|
78794
|
-
var
|
|
78813
|
+
var import_node_crypto59, import_node_fs96, import_node_path98, import_node_timers, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
78795
78814
|
var init_native_preparation = __esm({
|
|
78796
78815
|
"src/native-preparation.ts"() {
|
|
78797
78816
|
"use strict";
|
|
78798
|
-
|
|
78817
|
+
import_node_crypto59 = require("node:crypto");
|
|
78799
78818
|
import_node_fs96 = __toESM(require("node:fs"), 1);
|
|
78800
78819
|
import_node_path98 = __toESM(require("node:path"), 1);
|
|
78801
78820
|
import_node_timers = require("node:timers");
|
|
@@ -78894,7 +78913,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
|
|
|
78894
78913
|
return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
|
|
78895
78914
|
}
|
|
78896
78915
|
function nativeStaticLibraryRecipe(bytes) {
|
|
78897
|
-
const digest2 = (0,
|
|
78916
|
+
const digest2 = (0, import_node_crypto60.createHash)("sha256").update(bytes).digest("hex");
|
|
78898
78917
|
return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest2);
|
|
78899
78918
|
}
|
|
78900
78919
|
function nativeStaticLibrary(file, recipe2, moduleRoot) {
|
|
@@ -78937,7 +78956,7 @@ function isRustSymbol(name3, demangled) {
|
|
|
78937
78956
|
function rustStaticLibrary(file, moduleRoot) {
|
|
78938
78957
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
78939
78958
|
const bytes = import_node_fs97.default.readFileSync(file);
|
|
78940
|
-
const key2 = (0,
|
|
78959
|
+
const key2 = (0, import_node_crypto60.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
|
|
78941
78960
|
const directory2 = import_node_path99.default.join(cacheDir(), "native-archives", key2);
|
|
78942
78961
|
const archive = import_node_path99.default.join(directory2, "library.a");
|
|
78943
78962
|
if (import_node_fs97.default.existsSync(archive)) return archive;
|
|
@@ -78966,7 +78985,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
78966
78985
|
const members2 = readArMembers(bytes, true);
|
|
78967
78986
|
const seen = /* @__PURE__ */ new Set();
|
|
78968
78987
|
const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
|
|
78969
|
-
const identity2 = name3 + "\0" + (0,
|
|
78988
|
+
const identity2 = name3 + "\0" + (0, import_node_crypto60.createHash)("sha256").update(bytes2).digest("hex");
|
|
78970
78989
|
if (seen.has(identity2)) return false;
|
|
78971
78990
|
seen.add(identity2);
|
|
78972
78991
|
return true;
|
|
@@ -79013,14 +79032,14 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
79013
79032
|
function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
79014
79033
|
if (files2.length === 1) return files2[0];
|
|
79015
79034
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
79016
|
-
const hash = (0,
|
|
79035
|
+
const hash = (0, import_node_crypto60.createHash)("sha256").update(toolchain.release);
|
|
79017
79036
|
for (const file of files2)
|
|
79018
79037
|
hash.update("\0").update(import_node_path99.default.basename(file)).update("\0").update(import_node_fs97.default.readFileSync(file));
|
|
79019
79038
|
const directory2 = import_node_path99.default.join(cacheDir(), "native-archives", hash.digest("hex"));
|
|
79020
79039
|
const archive = import_node_path99.default.join(directory2, "combined.a");
|
|
79021
79040
|
if (import_node_fs97.default.existsSync(archive)) return archive;
|
|
79022
79041
|
import_node_fs97.default.mkdirSync(directory2, { recursive: true });
|
|
79023
|
-
const temporary = import_node_path99.default.join(directory2, `combined-${(0,
|
|
79042
|
+
const temporary = import_node_path99.default.join(directory2, `combined-${(0, import_node_crypto60.randomUUID)()}.a`);
|
|
79024
79043
|
try {
|
|
79025
79044
|
(0, import_node_child_process48.execFileSync)(import_node_path99.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
79026
79045
|
"qcsDL",
|
|
@@ -79033,12 +79052,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
79033
79052
|
}
|
|
79034
79053
|
return archive;
|
|
79035
79054
|
}
|
|
79036
|
-
var import_node_child_process48,
|
|
79055
|
+
var import_node_child_process48, import_node_crypto60, import_node_fs97, import_node_path99, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
79037
79056
|
var init_native_static_libraries = __esm({
|
|
79038
79057
|
"src/native-static-libraries.ts"() {
|
|
79039
79058
|
"use strict";
|
|
79040
79059
|
import_node_child_process48 = require("node:child_process");
|
|
79041
|
-
|
|
79060
|
+
import_node_crypto60 = require("node:crypto");
|
|
79042
79061
|
import_node_fs97 = __toESM(require("node:fs"), 1);
|
|
79043
79062
|
import_node_path99 = __toESM(require("node:path"), 1);
|
|
79044
79063
|
init_home_paths();
|
|
@@ -79650,13 +79669,13 @@ var init_swift_wasm64_wamr = __esm({
|
|
|
79650
79669
|
|
|
79651
79670
|
// src/swift-wasm64-native-source.ts
|
|
79652
79671
|
function deriveSource(file, bytes, backport) {
|
|
79653
|
-
if (!backport || (0,
|
|
79672
|
+
if (!backport || (0, import_node_crypto61.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256)
|
|
79654
79673
|
return null;
|
|
79655
79674
|
const source = bytes.toString("utf8");
|
|
79656
79675
|
const derived = Buffer.from(
|
|
79657
79676
|
"rewrite" in backport ? backport.rewrite(source) : source.replace(backport.before, backport.after)
|
|
79658
79677
|
);
|
|
79659
|
-
if ((0,
|
|
79678
|
+
if ((0, import_node_crypto61.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
|
|
79660
79679
|
throw new Error(`Native source derivation differs: ${file}`);
|
|
79661
79680
|
return {
|
|
79662
79681
|
bytes: derived,
|
|
@@ -79675,11 +79694,11 @@ function deriveWasm64NativeSource(file, bytes) {
|
|
|
79675
79694
|
sourceDerivations.get(name3) ?? headerDerivations.get(name3)
|
|
79676
79695
|
);
|
|
79677
79696
|
}
|
|
79678
|
-
var
|
|
79697
|
+
var import_node_crypto61, import_node_path101, webrtcUnknownArchitecture, boringsslWordSize2, wamrCommit, headerDerivations, sourceDerivations;
|
|
79679
79698
|
var init_swift_wasm64_native_source = __esm({
|
|
79680
79699
|
"src/swift-wasm64-native-source.ts"() {
|
|
79681
79700
|
"use strict";
|
|
79682
|
-
|
|
79701
|
+
import_node_crypto61 = require("node:crypto");
|
|
79683
79702
|
import_node_path101 = __toESM(require("node:path"), 1);
|
|
79684
79703
|
init_swift_wasm64_wamr();
|
|
79685
79704
|
init_swiftWasm64ConfigContract();
|
|
@@ -80139,7 +80158,7 @@ var init_genrule_library_builds = __esm({
|
|
|
80139
80158
|
function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
80140
80159
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
80141
80160
|
const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
80142
|
-
const identity2 = (0,
|
|
80161
|
+
const identity2 = (0, import_node_crypto62.createHash)("sha256").update(
|
|
80143
80162
|
JSON.stringify([
|
|
80144
80163
|
distribution?.id,
|
|
80145
80164
|
distribution?.link,
|
|
@@ -80165,7 +80184,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
80165
80184
|
for (const alias of product.frameworkAliases) {
|
|
80166
80185
|
if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
|
|
80167
80186
|
throw new Error(`framework SDK identity differs for ${alias.name}`);
|
|
80168
|
-
if ((0,
|
|
80187
|
+
if ((0, import_node_crypto62.createHash)("sha256").update(import_node_fs100.default.readFileSync(import_node_path103.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
80169
80188
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
80170
80189
|
const selected = /* @__PURE__ */ new Set();
|
|
80171
80190
|
const reach = (name3) => {
|
|
@@ -80206,7 +80225,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
80206
80225
|
for (const alias of owner.frameworkAliases) {
|
|
80207
80226
|
if (frameworkResponses[alias.name])
|
|
80208
80227
|
throw new Error(`ambiguous declared framework ${alias.name}`);
|
|
80209
|
-
if ((0,
|
|
80228
|
+
if ((0, import_node_crypto62.createHash)("sha256").update(import_node_fs100.default.readFileSync(import_node_path103.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
80210
80229
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
80211
80230
|
const file = import_node_path103.default.join(root, `${alias.name}.rsp`);
|
|
80212
80231
|
import_node_fs100.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
|
|
@@ -80300,11 +80319,11 @@ exec ${shellQuote2(configuration.compiler)} "$@"
|
|
|
80300
80319
|
};
|
|
80301
80320
|
return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
|
|
80302
80321
|
}
|
|
80303
|
-
var
|
|
80322
|
+
var import_node_crypto62, import_node_fs100, import_node_path103, v7;
|
|
80304
80323
|
var init_native_framework_compiler = __esm({
|
|
80305
80324
|
"src/native-framework-compiler.ts"() {
|
|
80306
80325
|
"use strict";
|
|
80307
|
-
|
|
80326
|
+
import_node_crypto62 = require("node:crypto");
|
|
80308
80327
|
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
80309
80328
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
80310
80329
|
v7 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -80325,7 +80344,7 @@ function processAlive(pid) {
|
|
|
80325
80344
|
}
|
|
80326
80345
|
function tryAcquireNumberedLock(directory2, detail = "") {
|
|
80327
80346
|
(0, import_node_fs101.mkdirSync)(directory2, { recursive: true });
|
|
80328
|
-
const claim = (0, import_node_path104.join)(directory2, `claim-${process.pid}-${(0,
|
|
80347
|
+
const claim = (0, import_node_path104.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto63.randomUUID)()}`);
|
|
80329
80348
|
for (; ; ) {
|
|
80330
80349
|
const numbers = (0, import_node_fs101.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
|
|
80331
80350
|
const top = Math.max(-1, ...numbers);
|
|
@@ -80364,11 +80383,11 @@ ${detail}` : ""}`);
|
|
|
80364
80383
|
};
|
|
80365
80384
|
}
|
|
80366
80385
|
}
|
|
80367
|
-
var
|
|
80386
|
+
var import_node_crypto63, import_node_fs101, import_node_path104, errorCode2;
|
|
80368
80387
|
var init_numbered_lock = __esm({
|
|
80369
80388
|
"src/numbered-lock.ts"() {
|
|
80370
80389
|
"use strict";
|
|
80371
|
-
|
|
80390
|
+
import_node_crypto63 = require("node:crypto");
|
|
80372
80391
|
import_node_fs101 = require("node:fs");
|
|
80373
80392
|
import_node_path104 = require("node:path");
|
|
80374
80393
|
errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
|
|
@@ -80395,7 +80414,7 @@ function llvmIdentity(toolchainBin, release) {
|
|
|
80395
80414
|
] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
|
|
80396
80415
|
(name3) => swiftFileChecksum(import_node_path105.default.join(toolchainBin, name3))
|
|
80397
80416
|
);
|
|
80398
|
-
const identity2 = (0,
|
|
80417
|
+
const identity2 = (0, import_node_crypto64.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
|
|
80399
80418
|
toolIdentities.set(toolchainBin, identity2);
|
|
80400
80419
|
return identity2;
|
|
80401
80420
|
}
|
|
@@ -80403,7 +80422,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
|
|
|
80403
80422
|
const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
|
|
80404
80423
|
const cached2 = sysrootIdentities.get(key2);
|
|
80405
80424
|
if (cached2) return cached2;
|
|
80406
|
-
const hash = (0,
|
|
80425
|
+
const hash = (0, import_node_crypto64.createHash)("sha256");
|
|
80407
80426
|
const add = (root, relative3) => {
|
|
80408
80427
|
const file = import_node_path105.default.join(root, relative3);
|
|
80409
80428
|
const stat = import_node_fs102.default.statSync(file, { throwIfNoEntry: false });
|
|
@@ -80438,7 +80457,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
80438
80457
|
import_node_fs102.default.readFileSync(import_node_path105.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
80439
80458
|
)
|
|
80440
80459
|
);
|
|
80441
|
-
const hash = (0,
|
|
80460
|
+
const hash = (0, import_node_crypto64.createHash)("sha256").update(
|
|
80442
80461
|
JSON.stringify([
|
|
80443
80462
|
headers,
|
|
80444
80463
|
distribution.link,
|
|
@@ -80448,7 +80467,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
80448
80467
|
])
|
|
80449
80468
|
);
|
|
80450
80469
|
const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
|
|
80451
|
-
const objectKey = (0,
|
|
80470
|
+
const objectKey = (0, import_node_crypto64.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
|
|
80452
80471
|
const cache = import_node_path105.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
|
|
80453
80472
|
if (!import_node_fs102.default.existsSync(cache)) {
|
|
80454
80473
|
import_node_fs102.default.mkdirSync(import_node_path105.default.dirname(cache), { recursive: true });
|
|
@@ -80483,7 +80502,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
80483
80502
|
const digest2 = import_node_path105.default.join(temporary, "digest");
|
|
80484
80503
|
import_node_fs102.default.writeFileSync(
|
|
80485
80504
|
digest2,
|
|
80486
|
-
(0,
|
|
80505
|
+
(0, import_node_crypto64.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
|
|
80487
80506
|
);
|
|
80488
80507
|
import_node_fs102.default.renameSync(digest2, cache);
|
|
80489
80508
|
} finally {
|
|
@@ -80538,7 +80557,7 @@ function buildable(declaration) {
|
|
|
80538
80557
|
return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
|
|
80539
80558
|
}
|
|
80540
80559
|
function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
|
|
80541
|
-
const hash = (0,
|
|
80560
|
+
const hash = (0, import_node_crypto64.createHash)("sha256");
|
|
80542
80561
|
const files2 = declaration.sources.filter(
|
|
80543
80562
|
(source) => !source.generator && !source.file.split(import_node_path105.default.sep).includes(".git")
|
|
80544
80563
|
).map((source) => import_node_path105.default.relative(declaration.packageDir, source.file));
|
|
@@ -80672,12 +80691,12 @@ function genruleArchive(declaration, library, moduleRoot) {
|
|
|
80672
80691
|
}
|
|
80673
80692
|
return combined;
|
|
80674
80693
|
}
|
|
80675
|
-
var import_node_child_process51,
|
|
80694
|
+
var import_node_child_process51, import_node_crypto64, import_node_fs102, import_node_os22, import_node_path105, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
|
|
80676
80695
|
var init_genrule_archives = __esm({
|
|
80677
80696
|
"src/genrule-archives.ts"() {
|
|
80678
80697
|
"use strict";
|
|
80679
80698
|
import_node_child_process51 = require("node:child_process");
|
|
80680
|
-
|
|
80699
|
+
import_node_crypto64 = require("node:crypto");
|
|
80681
80700
|
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
80682
80701
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
80683
80702
|
import_node_path105 = __toESM(require("node:path"), 1);
|
|
@@ -80785,7 +80804,7 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
80785
80804
|
function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
|
|
80786
80805
|
if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
|
|
80787
80806
|
const native = simulatorNativeLibrary(artifact());
|
|
80788
|
-
if (!native || (0,
|
|
80807
|
+
if (!native || (0, import_node_crypto65.createHash)("sha256").update(import_node_fs103.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
|
|
80789
80808
|
return standin;
|
|
80790
80809
|
if (configured)
|
|
80791
80810
|
throw new Error(
|
|
@@ -80843,12 +80862,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
80843
80862
|
}
|
|
80844
80863
|
};
|
|
80845
80864
|
}
|
|
80846
|
-
var import_node_child_process52,
|
|
80865
|
+
var import_node_child_process52, import_node_crypto65, import_node_fs103, import_node_os23, import_node_path106, SENTRY_SWIFT_SLICE;
|
|
80847
80866
|
var init_native_swift_slices = __esm({
|
|
80848
80867
|
"src/native-swift-slices.ts"() {
|
|
80849
80868
|
"use strict";
|
|
80850
80869
|
import_node_child_process52 = require("node:child_process");
|
|
80851
|
-
|
|
80870
|
+
import_node_crypto65 = require("node:crypto");
|
|
80852
80871
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
80853
80872
|
import_node_os23 = __toESM(require("node:os"), 1);
|
|
80854
80873
|
import_node_path106 = __toESM(require("node:path"), 1);
|
|
@@ -81656,7 +81675,7 @@ function treeDigest2(root) {
|
|
|
81656
81675
|
}).join("\n");
|
|
81657
81676
|
const memo2 = digests.get(`tree\0${root}`);
|
|
81658
81677
|
if (memo2?.stamp === stamp) return memo2.digest;
|
|
81659
|
-
const hash = (0,
|
|
81678
|
+
const hash = (0, import_node_crypto66.createHash)("sha256");
|
|
81660
81679
|
for (const name3 of names) {
|
|
81661
81680
|
hash.update(`${name3}\0`);
|
|
81662
81681
|
hash.update(import_node_fs107.default.readFileSync(import_node_path109.default.join(root, name3)));
|
|
@@ -81703,7 +81722,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
81703
81722
|
const found3 = locateXcframework(import_node_path109.default.join(dir, "tree"));
|
|
81704
81723
|
if (found3) return { dir: found3, digest: stored.sha };
|
|
81705
81724
|
}
|
|
81706
|
-
const sha2 = (0,
|
|
81725
|
+
const sha2 = (0, import_node_crypto66.createHash)("sha256").update(import_node_fs107.default.readFileSync(binary2.dir)).digest("hex");
|
|
81707
81726
|
if (sha2 !== stored?.sha || !locateXcframework(import_node_path109.default.join(dir, "tree"))) {
|
|
81708
81727
|
import_node_fs107.default.rmSync(dir, { recursive: true, force: true });
|
|
81709
81728
|
import_node_fs107.default.mkdirSync(import_node_path109.default.join(dir, "tree"), { recursive: true });
|
|
@@ -81715,7 +81734,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
81715
81734
|
return { dir: found2, digest: sha2 };
|
|
81716
81735
|
}
|
|
81717
81736
|
if (stored && import_node_fs107.default.existsSync(archive)) {
|
|
81718
|
-
const sha2 = (0,
|
|
81737
|
+
const sha2 = (0, import_node_crypto66.createHash)("sha256").update(import_node_fs107.default.readFileSync(archive)).digest("hex");
|
|
81719
81738
|
if (sha2 !== expected)
|
|
81720
81739
|
throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
|
|
81721
81740
|
const found2 = locateXcframework(import_node_path109.default.join(dir, "tree"));
|
|
@@ -81724,7 +81743,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
81724
81743
|
import_node_fs107.default.rmSync(dir, { recursive: true, force: true });
|
|
81725
81744
|
import_node_fs107.default.mkdirSync(import_node_path109.default.join(dir, "tree"), { recursive: true });
|
|
81726
81745
|
exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
|
|
81727
|
-
const sha = (0,
|
|
81746
|
+
const sha = (0, import_node_crypto66.createHash)("sha256").update(import_node_fs107.default.readFileSync(archive)).digest("hex");
|
|
81728
81747
|
if (sha !== expected) {
|
|
81729
81748
|
import_node_fs107.default.rmSync(dir, { recursive: true, force: true });
|
|
81730
81749
|
throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
|
|
@@ -81849,7 +81868,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
81849
81868
|
});
|
|
81850
81869
|
}
|
|
81851
81870
|
}
|
|
81852
|
-
const declaredDigest = (0,
|
|
81871
|
+
const declaredDigest = (0, import_node_crypto66.createHash)("sha256");
|
|
81853
81872
|
for (const framework of providedFrameworks)
|
|
81854
81873
|
declaredDigest.update(`provided/${import_node_path109.default.relative(artifact.dir, framework)}\0`);
|
|
81855
81874
|
for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
|
|
@@ -81919,7 +81938,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
81919
81938
|
import_node_fs107.default.copyFileSync(surface.modulemap, modulemap);
|
|
81920
81939
|
}
|
|
81921
81940
|
}
|
|
81922
|
-
const contents2 = (0,
|
|
81941
|
+
const contents2 = (0, import_node_crypto66.createHash)("sha256");
|
|
81923
81942
|
for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
|
|
81924
81943
|
const modulemap = import_node_path109.default.join(
|
|
81925
81944
|
pending,
|
|
@@ -83334,7 +83353,7 @@ function crateSourceRoots(manifest, searchRoot) {
|
|
|
83334
83353
|
return roots;
|
|
83335
83354
|
}
|
|
83336
83355
|
function crateSourceDigest(manifest, searchRoot) {
|
|
83337
|
-
const hash = (0,
|
|
83356
|
+
const hash = (0, import_node_crypto66.createHash)("sha256");
|
|
83338
83357
|
const walk4 = (dir, root) => {
|
|
83339
83358
|
for (const entry of import_node_fs107.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
|
|
83340
83359
|
const full = import_node_path109.default.join(dir, entry.name);
|
|
@@ -83781,7 +83800,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
83781
83800
|
...swiftSources.flags,
|
|
83782
83801
|
...swiftSources.sources.flatMap((source) => [
|
|
83783
83802
|
source,
|
|
83784
|
-
(0,
|
|
83803
|
+
(0, import_node_crypto66.createHash)("sha256").update(import_node_fs107.default.readFileSync(import_node_path109.default.join(binary2.dir, source))).digest("hex")
|
|
83785
83804
|
])
|
|
83786
83805
|
);
|
|
83787
83806
|
continue;
|
|
@@ -83817,7 +83836,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
83817
83836
|
);
|
|
83818
83837
|
}
|
|
83819
83838
|
}
|
|
83820
|
-
return (0,
|
|
83839
|
+
return (0, import_node_crypto66.createHash)("sha256").update(parts.join("\0")).digest("hex");
|
|
83821
83840
|
}
|
|
83822
83841
|
function missingArtifactGap(binary2) {
|
|
83823
83842
|
if (swiftBinaryOnDisk(binary2)) return null;
|
|
@@ -83899,7 +83918,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
83899
83918
|
return NO_IMPORTABLE_SURFACE;
|
|
83900
83919
|
}
|
|
83901
83920
|
const configured = new Map(Object.entries(behavior));
|
|
83902
|
-
const hash = (0,
|
|
83921
|
+
const hash = (0, import_node_crypto66.createHash)("sha256").update(
|
|
83903
83922
|
standinGenerationInputs([binary2], toolchain, behavior)
|
|
83904
83923
|
);
|
|
83905
83924
|
hash.update(digest2);
|
|
@@ -84139,7 +84158,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
84139
84158
|
);
|
|
84140
84159
|
if (binary2.moduleSources !== void 0)
|
|
84141
84160
|
frameworkInputs.push(
|
|
84142
|
-
`${binary2.target}\0${(0,
|
|
84161
|
+
`${binary2.target}\0${(0, import_node_crypto66.createHash)("sha256").update(
|
|
84143
84162
|
[iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
|
|
84144
84163
|
"\0"
|
|
84145
84164
|
)
|
|
@@ -84180,7 +84199,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
84180
84199
|
import_node_fs107.default.mkdirSync(sourceFrameworks);
|
|
84181
84200
|
const frameworks = {
|
|
84182
84201
|
dirs: [...frameworkDirs, sourceFrameworks].sort(),
|
|
84183
|
-
digest: (0,
|
|
84202
|
+
digest: (0, import_node_crypto66.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
84184
84203
|
surfaces: frameworkSurfaces
|
|
84185
84204
|
};
|
|
84186
84205
|
const siblings = new Map(
|
|
@@ -84299,12 +84318,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
84299
84318
|
import_node_fs107.default.rmSync(modules, { recursive: true, force: true });
|
|
84300
84319
|
}
|
|
84301
84320
|
}
|
|
84302
|
-
var import_node_child_process54,
|
|
84321
|
+
var import_node_child_process54, import_node_crypto66, import_node_fs107, import_node_path109, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
|
|
84303
84322
|
var init_swift_standins = __esm({
|
|
84304
84323
|
"src/swift-standins.ts"() {
|
|
84305
84324
|
"use strict";
|
|
84306
84325
|
import_node_child_process54 = require("node:child_process");
|
|
84307
|
-
|
|
84326
|
+
import_node_crypto66 = require("node:crypto");
|
|
84308
84327
|
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
84309
84328
|
import_node_path109 = __toESM(require("node:path"), 1);
|
|
84310
84329
|
init_forked_script_contract();
|
|
@@ -84334,7 +84353,7 @@ var init_swift_standins = __esm({
|
|
|
84334
84353
|
init_swiftTargetContract();
|
|
84335
84354
|
TRIPLE = SWIFT_WASM_TRIPLE;
|
|
84336
84355
|
cacheDir5 = import_node_path109.default.join(cacheDir(), "swift-standins");
|
|
84337
|
-
key = (...parts) => (0,
|
|
84356
|
+
key = (...parts) => (0, import_node_crypto66.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
|
|
84338
84357
|
digests = /* @__PURE__ */ new Map();
|
|
84339
84358
|
isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
|
|
84340
84359
|
OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
|
|
@@ -84494,11 +84513,6 @@ function compiledFrameworkImports(app, products) {
|
|
|
84494
84513
|
}
|
|
84495
84514
|
return imports2;
|
|
84496
84515
|
}
|
|
84497
|
-
function sha256Hex6(bytes) {
|
|
84498
|
-
if (typeof Bun !== "undefined")
|
|
84499
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
84500
|
-
return (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex");
|
|
84501
|
-
}
|
|
84502
84516
|
function regularFileStamp(file) {
|
|
84503
84517
|
const stat = import_node_fs108.default.lstatSync(file, { bigint: true, throwIfNoEntry: false });
|
|
84504
84518
|
if (!stat || !stat.isFile()) return null;
|
|
@@ -84512,7 +84526,7 @@ function verifyRetainedFile(work, file, hash, stamps) {
|
|
|
84512
84526
|
if (typeof expectedStamp === "string" && regularFileStamp(resolved) === expectedStamp)
|
|
84513
84527
|
return true;
|
|
84514
84528
|
if (!import_node_fs108.default.existsSync(resolved)) return false;
|
|
84515
|
-
return
|
|
84529
|
+
return sha256Hex2(readPackageFile(work, resolved, Infinity)) === hash;
|
|
84516
84530
|
}
|
|
84517
84531
|
function recordRetainedStamps(work, files2) {
|
|
84518
84532
|
const stamps = {};
|
|
@@ -84529,7 +84543,7 @@ function cachedBinaryFileDigest(file) {
|
|
|
84529
84543
|
const memory = binaryFileDigests.get(real);
|
|
84530
84544
|
if (memory?.stamp === stamp) return memory.digest;
|
|
84531
84545
|
const dir = import_node_path110.default.join(swiftCacheDir(), "swift-binary-digests");
|
|
84532
|
-
const record5 = import_node_path110.default.join(dir, `${
|
|
84546
|
+
const record5 = import_node_path110.default.join(dir, `${sha256Hex2(real)}.json`);
|
|
84533
84547
|
if (import_node_fs108.default.existsSync(record5)) {
|
|
84534
84548
|
const saved = JSON.parse(import_node_fs108.default.readFileSync(record5, "utf8"));
|
|
84535
84549
|
if (isRecord(saved) && saved.stamp === stamp && typeof saved.digest === "string") {
|
|
@@ -84537,10 +84551,10 @@ function cachedBinaryFileDigest(file) {
|
|
|
84537
84551
|
return saved.digest;
|
|
84538
84552
|
}
|
|
84539
84553
|
}
|
|
84540
|
-
const digest2 =
|
|
84554
|
+
const digest2 = sha256Hex2(import_node_fs108.default.readFileSync(real));
|
|
84541
84555
|
binaryFileDigests.set(real, { stamp, digest: digest2 });
|
|
84542
84556
|
import_node_fs108.default.mkdirSync(dir, { recursive: true });
|
|
84543
|
-
const partial = `${record5}.${process.pid}.${(0,
|
|
84557
|
+
const partial = `${record5}.${process.pid}.${(0, import_node_crypto67.randomUUID)()}`;
|
|
84544
84558
|
import_node_fs108.default.writeFileSync(partial, JSON.stringify({ stamp, digest: digest2 }));
|
|
84545
84559
|
import_node_fs108.default.renameSync(partial, record5);
|
|
84546
84560
|
return digest2;
|
|
@@ -85078,7 +85092,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
85078
85092
|
const staged = withFrameworkCompanionImports(original);
|
|
85079
85093
|
if (staged !== original) sources.set(file, Buffer.from(staged));
|
|
85080
85094
|
}
|
|
85081
|
-
const digest2 =
|
|
85095
|
+
const digest2 = sha256Hex2;
|
|
85082
85096
|
const providers = /* @__PURE__ */ new Map();
|
|
85083
85097
|
for (const target of targets) {
|
|
85084
85098
|
if (!supplied.has(target.moduleName)) continue;
|
|
@@ -85434,7 +85448,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
|
|
|
85434
85448
|
products
|
|
85435
85449
|
);
|
|
85436
85450
|
const checkouts = remoteSwiftCheckouts(app.rootDir);
|
|
85437
|
-
const digest2 =
|
|
85451
|
+
const digest2 = sha256Hex2;
|
|
85438
85452
|
const inputs2 = Object.fromEntries(
|
|
85439
85453
|
[...sources].map(([file, bytes]) => [file, digest2(bytes)])
|
|
85440
85454
|
);
|
|
@@ -85816,16 +85830,17 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
85816
85830
|
import_node_fs108.default.closeSync(descriptor);
|
|
85817
85831
|
}
|
|
85818
85832
|
}
|
|
85819
|
-
var import_node_child_process55,
|
|
85833
|
+
var import_node_child_process55, import_node_crypto67, import_node_fs108, import_node_path110, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT, binaryFileDigests, objcInputSnapshots;
|
|
85820
85834
|
var init_swift_objc_compile = __esm({
|
|
85821
85835
|
"src/swift-objc-compile.ts"() {
|
|
85822
85836
|
"use strict";
|
|
85823
85837
|
import_node_child_process55 = require("node:child_process");
|
|
85824
|
-
|
|
85838
|
+
import_node_crypto67 = require("node:crypto");
|
|
85825
85839
|
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
85826
85840
|
import_node_path110 = __toESM(require("node:path"), 1);
|
|
85827
85841
|
init_mapLimit();
|
|
85828
85842
|
init_is_record();
|
|
85843
|
+
init_sha256();
|
|
85829
85844
|
init_swift_objc_import();
|
|
85830
85845
|
init_swift_objc_runtime();
|
|
85831
85846
|
init_swift_objc_standin();
|
|
@@ -89894,19 +89909,19 @@ function u32(value) {
|
|
|
89894
89909
|
}
|
|
89895
89910
|
function propertyHash(property) {
|
|
89896
89911
|
const transient = property.kind === "attribute" && property.transient;
|
|
89897
|
-
const base =
|
|
89912
|
+
const base = sha2562(
|
|
89898
89913
|
property.name,
|
|
89899
89914
|
[(property.optional ? 1 : 0) | (transient ? 2 : 0), 0],
|
|
89900
89915
|
property.modifier ?? ""
|
|
89901
89916
|
);
|
|
89902
89917
|
if (property.kind === "attribute")
|
|
89903
|
-
return
|
|
89918
|
+
return sha2562(
|
|
89904
89919
|
base,
|
|
89905
89920
|
u32(property.type),
|
|
89906
89921
|
property.type === 1e3 && property.flags & EXTERNAL_BINARY ? [1] : [],
|
|
89907
89922
|
property.flags & PRESERVE_AFTER_DELETION ? [1] : []
|
|
89908
89923
|
);
|
|
89909
|
-
return
|
|
89924
|
+
return sha2562(
|
|
89910
89925
|
base,
|
|
89911
89926
|
property.destination,
|
|
89912
89927
|
property.inverse ?? "",
|
|
@@ -89921,7 +89936,7 @@ function entityHashes(model) {
|
|
|
89921
89936
|
...item.parent === null ? [] : allProperties(byName2.get(item.parent)),
|
|
89922
89937
|
...item.properties
|
|
89923
89938
|
];
|
|
89924
|
-
const hash = (item) =>
|
|
89939
|
+
const hash = (item) => sha2562(
|
|
89925
89940
|
item.name,
|
|
89926
89941
|
[item.abstract ? 1 : 0],
|
|
89927
89942
|
item.parent === null ? [] : hash(byName2.get(item.parent)),
|
|
@@ -89949,7 +89964,7 @@ function compileCoreDataModel(directory2) {
|
|
|
89949
89964
|
files2[`${name3}.momd/${version2}.mom`] = archiveModel(model);
|
|
89950
89965
|
const entities = entityHashes(model);
|
|
89951
89966
|
hashes[version2] = Object.fromEntries(entities);
|
|
89952
|
-
checksums[version2] =
|
|
89967
|
+
checksums[version2] = sha2562(...entities.map(([, hash]) => hash)).toString("base64");
|
|
89953
89968
|
}
|
|
89954
89969
|
const named = (0, import_node_fs112.existsSync)(import_node_path114.default.join(directory2, ".xccurrentversion")) ? {
|
|
89955
89970
|
NSManagedObjectModel_CurrentVersionName: import_node_path114.default.basename(
|
|
@@ -89972,11 +89987,11 @@ function coreDataModelDirectories(files2) {
|
|
|
89972
89987
|
}
|
|
89973
89988
|
return [...models].sort();
|
|
89974
89989
|
}
|
|
89975
|
-
var
|
|
89990
|
+
var import_node_crypto68, import_node_fs112, import_node_path114, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2562;
|
|
89976
89991
|
var init_core_data_model = __esm({
|
|
89977
89992
|
"src/core-data-model.ts"() {
|
|
89978
89993
|
"use strict";
|
|
89979
|
-
|
|
89994
|
+
import_node_crypto68 = require("node:crypto");
|
|
89980
89995
|
import_node_fs112 = require("node:fs");
|
|
89981
89996
|
import_node_path114 = __toESM(require("node:path"), 1);
|
|
89982
89997
|
init_core_data_entity_classes();
|
|
@@ -90095,7 +90110,7 @@ var init_core_data_model = __esm({
|
|
|
90095
90110
|
});
|
|
90096
90111
|
}
|
|
90097
90112
|
};
|
|
90098
|
-
|
|
90113
|
+
sha2562 = (...parts) => (0, import_node_crypto68.createHash)("sha256").update(
|
|
90099
90114
|
Buffer.concat(
|
|
90100
90115
|
parts.map(
|
|
90101
90116
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -92287,7 +92302,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
92287
92302
|
];
|
|
92288
92303
|
const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
|
|
92289
92304
|
const xcode = (0, import_node_child_process57.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
|
|
92290
|
-
const key2 = (0,
|
|
92305
|
+
const key2 = (0, import_node_crypto69.createHash)("sha256").update(
|
|
92291
92306
|
JSON.stringify([
|
|
92292
92307
|
RECIPE,
|
|
92293
92308
|
(0, import_node_child_process57.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
|
|
@@ -92498,12 +92513,12 @@ exec ${quote3(import_node_path115.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
92498
92513
|
);
|
|
92499
92514
|
return directory2;
|
|
92500
92515
|
}
|
|
92501
|
-
var import_node_child_process57,
|
|
92516
|
+
var import_node_child_process57, import_node_crypto69, import_node_fs113, import_node_os24, import_node_path115, import_promises11, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
92502
92517
|
var init_rive_runtime_dependencies = __esm({
|
|
92503
92518
|
"src/rive-runtime-dependencies.ts"() {
|
|
92504
92519
|
"use strict";
|
|
92505
92520
|
import_node_child_process57 = require("node:child_process");
|
|
92506
|
-
|
|
92521
|
+
import_node_crypto69 = require("node:crypto");
|
|
92507
92522
|
import_node_fs113 = __toESM(require("node:fs"), 1);
|
|
92508
92523
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
92509
92524
|
import_node_path115 = __toESM(require("node:path"), 1);
|
|
@@ -93360,7 +93375,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93360
93375
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
93361
93376
|
))
|
|
93362
93377
|
return [...binaries];
|
|
93363
|
-
const hash = (0,
|
|
93378
|
+
const hash = (0, import_node_crypto70.createHash)("sha256");
|
|
93364
93379
|
hash.update(
|
|
93365
93380
|
JSON.stringify([
|
|
93366
93381
|
inputs2.targets,
|
|
@@ -93569,12 +93584,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93569
93584
|
);
|
|
93570
93585
|
return result;
|
|
93571
93586
|
}
|
|
93572
|
-
var import_node_child_process59,
|
|
93587
|
+
var import_node_child_process59, import_node_crypto70, import_node_fs115, import_node_path117, cachedInputs;
|
|
93573
93588
|
var init_swift_cxx_reachable = __esm({
|
|
93574
93589
|
"src/swift-cxx-reachable.ts"() {
|
|
93575
93590
|
"use strict";
|
|
93576
93591
|
import_node_child_process59 = require("node:child_process");
|
|
93577
|
-
|
|
93592
|
+
import_node_crypto70 = require("node:crypto");
|
|
93578
93593
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
93579
93594
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
93580
93595
|
init_is_record();
|
|
@@ -93595,15 +93610,15 @@ function rasterizePdfFiles(inputs2, { imageBytes, imageTotalBytes } = { imageByt
|
|
|
93595
93610
|
const pending = /* @__PURE__ */ new Map();
|
|
93596
93611
|
const renderer = process.platform === "darwin" ? "30774891a9db216d" : "pdfium-1";
|
|
93597
93612
|
const cache = swiftCacheDir();
|
|
93598
|
-
const cached2 = (
|
|
93613
|
+
const cached2 = (sha2564) => import_node_path118.default.join(cache, `swift-pdf-png-${renderer}-${sha2564}.png`);
|
|
93599
93614
|
let remainingBytes = imageTotalBytes;
|
|
93600
|
-
const record5 = ({ file, sha256:
|
|
93615
|
+
const record5 = ({ file, sha256: sha2564 }, bytes) => {
|
|
93601
93616
|
if (bytes.length > imageBytes)
|
|
93602
93617
|
throw new Error(`swift image ${file} raster exceeds the per-image cap`);
|
|
93603
93618
|
remainingBytes -= bytes.length;
|
|
93604
93619
|
if (remainingBytes < 0)
|
|
93605
93620
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
93606
|
-
rendered.set(
|
|
93621
|
+
rendered.set(sha2564, bytes);
|
|
93607
93622
|
};
|
|
93608
93623
|
for (const input of inputs2) {
|
|
93609
93624
|
if (rendered.has(input.sha256) || pending.has(input.sha256)) continue;
|
|
@@ -94065,7 +94080,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
94065
94080
|
if (!response.ok)
|
|
94066
94081
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
94067
94082
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
94068
|
-
if ((0,
|
|
94083
|
+
if ((0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
94069
94084
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
94070
94085
|
return bytes;
|
|
94071
94086
|
});
|
|
@@ -94170,7 +94185,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94170
94185
|
encode(now),
|
|
94171
94186
|
encodeNativeSdkLater({
|
|
94172
94187
|
files: later.map((bytes) => ({
|
|
94173
|
-
sha256: (0,
|
|
94188
|
+
sha256: (0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex"),
|
|
94174
94189
|
byteLength: bytes.length
|
|
94175
94190
|
})),
|
|
94176
94191
|
...needs && {
|
|
@@ -94186,11 +94201,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94186
94201
|
later
|
|
94187
94202
|
};
|
|
94188
94203
|
}
|
|
94189
|
-
var
|
|
94204
|
+
var import_node_crypto71, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
94190
94205
|
var init_swift_sdk_later_data = __esm({
|
|
94191
94206
|
"src/swift-sdk-later-data.ts"() {
|
|
94192
94207
|
"use strict";
|
|
94193
|
-
|
|
94208
|
+
import_node_crypto71 = require("node:crypto");
|
|
94194
94209
|
init_nativeSdkBindingContract();
|
|
94195
94210
|
init_nativeWasmContract();
|
|
94196
94211
|
init_swift_sdk_image();
|
|
@@ -94242,7 +94257,7 @@ function nativeSourceDescriptor(packagePath) {
|
|
|
94242
94257
|
function swiftArtifactContentDigest(bytes) {
|
|
94243
94258
|
let digest2 = swiftArtifactDigests.get(bytes);
|
|
94244
94259
|
if (!digest2) {
|
|
94245
|
-
digest2 = (0,
|
|
94260
|
+
digest2 = (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
|
|
94246
94261
|
swiftArtifactDigests.set(bytes, digest2);
|
|
94247
94262
|
}
|
|
94248
94263
|
return digest2;
|
|
@@ -94370,7 +94385,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
94370
94385
|
const clang = import_node_path119.default.join(toolchainBin, "clang");
|
|
94371
94386
|
const empty = (binary2, file) => {
|
|
94372
94387
|
const source = import_node_path119.default.join(binary2.dir, file);
|
|
94373
|
-
const key2 = (0,
|
|
94388
|
+
const key2 = (0, import_node_crypto72.createHash)("sha256").update(
|
|
94374
94389
|
JSON.stringify([
|
|
94375
94390
|
clang,
|
|
94376
94391
|
sdk2.sysroot,
|
|
@@ -94415,7 +94430,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
94415
94430
|
return new Set(portable.flat());
|
|
94416
94431
|
}
|
|
94417
94432
|
async function swiftPackages(entry, app) {
|
|
94418
|
-
const stamp = (file) => import_node_fs117.default.existsSync(file) ? (0,
|
|
94433
|
+
const stamp = (file) => import_node_fs117.default.existsSync(file) ? (0, import_node_crypto72.createHash)("sha256").update(import_node_fs117.default.readFileSync(file)).digest("hex") : null;
|
|
94419
94434
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
94420
94435
|
module: target.moduleName,
|
|
94421
94436
|
products: target.packageProducts ?? []
|
|
@@ -95584,18 +95599,18 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
95584
95599
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
95585
95600
|
bytes
|
|
95586
95601
|
);
|
|
95587
|
-
const
|
|
95602
|
+
const sha2564 = (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
|
|
95588
95603
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
95589
95604
|
if (!bundle && inputs2["Package.swift"])
|
|
95590
95605
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
95591
95606
|
metalSources[key2] = {
|
|
95592
|
-
sha256:
|
|
95593
|
-
url: `${baseUrl}${RESOURCE_PATH}${
|
|
95607
|
+
sha256: sha2564,
|
|
95608
|
+
url: `${baseUrl}${RESOURCE_PATH}${sha2564}.metal`,
|
|
95594
95609
|
bundlePath: bundle?.path ?? "."
|
|
95595
95610
|
};
|
|
95596
95611
|
metalUploads[key2] = source;
|
|
95597
95612
|
watched.push(file);
|
|
95598
|
-
registered.set(`${
|
|
95613
|
+
registered.set(`${sha2564}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
|
|
95599
95614
|
}
|
|
95600
95615
|
const pdfs = /* @__PURE__ */ new Map();
|
|
95601
95616
|
for (const { file } of found) {
|
|
@@ -95607,7 +95622,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
95607
95622
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
95608
95623
|
pdfs.set(file, {
|
|
95609
95624
|
file: disk,
|
|
95610
|
-
sha256: (0,
|
|
95625
|
+
sha256: (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex")
|
|
95611
95626
|
});
|
|
95612
95627
|
}
|
|
95613
95628
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -95653,7 +95668,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
95653
95668
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
95654
95669
|
}
|
|
95655
95670
|
imageBytes += bytes.length;
|
|
95656
|
-
const hash = (0,
|
|
95671
|
+
const hash = (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
95657
95672
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
95658
95673
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
95659
95674
|
const variant2 = {
|
|
@@ -95959,7 +95974,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
95959
95974
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
95960
95975
|
}
|
|
95961
95976
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
95962
|
-
const hash = (0,
|
|
95977
|
+
const hash = (0, import_node_crypto72.createHash)("sha256");
|
|
95963
95978
|
hash.update(packagePath);
|
|
95964
95979
|
updateSwiftConfigStamp(hash, packagePath);
|
|
95965
95980
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -95988,7 +96003,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
95988
96003
|
return hash.digest("hex").slice(0, 16);
|
|
95989
96004
|
}
|
|
95990
96005
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
95991
|
-
const hash = (0,
|
|
96006
|
+
const hash = (0, import_node_crypto72.createHash)("sha256");
|
|
95992
96007
|
hash.update(compilerSourceDigest);
|
|
95993
96008
|
updateSwiftConfigStamp(hash, packagePath);
|
|
95994
96009
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -96020,7 +96035,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
96020
96035
|
(root) => import_node_fs117.default.existsSync(import_node_path119.default.join(root, "toolchain.json"))
|
|
96021
96036
|
);
|
|
96022
96037
|
if (!moduleRoot) return "";
|
|
96023
|
-
const hash = (0,
|
|
96038
|
+
const hash = (0, import_node_crypto72.createHash)("sha256");
|
|
96024
96039
|
hash.update(moduleRoot);
|
|
96025
96040
|
for (const relative3 of swiftModuleInputFiles(moduleRoot)) {
|
|
96026
96041
|
hash.update(relative3);
|
|
@@ -96030,7 +96045,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
96030
96045
|
}
|
|
96031
96046
|
function otherInputs(input) {
|
|
96032
96047
|
const { files: _files, ...rest } = input;
|
|
96033
|
-
return (0,
|
|
96048
|
+
return (0, import_node_crypto72.createHash)("sha256").update(JSON.stringify(rest)).digest("hex");
|
|
96034
96049
|
}
|
|
96035
96050
|
function icuUrl(origin, artifact) {
|
|
96036
96051
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -96045,7 +96060,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
96045
96060
|
for (const standin of standins) {
|
|
96046
96061
|
if (!standin.prebuilt) continue;
|
|
96047
96062
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
96048
|
-
const digest2 = (0,
|
|
96063
|
+
const digest2 = (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
|
|
96049
96064
|
const dir = import_node_path119.default.join(swiftCacheDir(), "native-archives", digest2);
|
|
96050
96065
|
import_node_fs117.default.mkdirSync(dir, { recursive: true });
|
|
96051
96066
|
const library = import_node_path119.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -96393,7 +96408,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
96393
96408
|
return import_node_path119.default.join(
|
|
96394
96409
|
swiftCacheDir(),
|
|
96395
96410
|
"swift-builds",
|
|
96396
|
-
(0,
|
|
96411
|
+
(0, import_node_crypto72.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
96397
96412
|
);
|
|
96398
96413
|
}
|
|
96399
96414
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -96687,14 +96702,14 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
96687
96702
|
const url = new URL(moduleUrl);
|
|
96688
96703
|
const table = swiftDyldTableReference(url.pathname, module2);
|
|
96689
96704
|
if (!table) return {};
|
|
96690
|
-
const { sha256:
|
|
96705
|
+
const { sha256: sha2564, byteLength } = table;
|
|
96691
96706
|
url.pathname = table.path;
|
|
96692
96707
|
const response = await fetch(url, { signal });
|
|
96693
96708
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
96694
96709
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
96695
|
-
if (bytes.length !== byteLength || (0,
|
|
96710
|
+
if (bytes.length !== byteLength || (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex") !== sha2564)
|
|
96696
96711
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
96697
|
-
return { dyldTable: { sha256:
|
|
96712
|
+
return { dyldTable: { sha256: sha2564, bytes } };
|
|
96698
96713
|
}
|
|
96699
96714
|
function currentStamp(project2, moduleRoot) {
|
|
96700
96715
|
return withXcodeLayout(
|
|
@@ -96778,10 +96793,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
96778
96793
|
sdk2.binding.bytes,
|
|
96779
96794
|
plan
|
|
96780
96795
|
);
|
|
96781
|
-
const digest2 = (0,
|
|
96796
|
+
const digest2 = (0, import_node_crypto72.createHash)("sha256").update(split.binding).digest("hex");
|
|
96782
96797
|
sdkBindingFiles.set(digest2, split.binding);
|
|
96783
96798
|
for (const later of split.later)
|
|
96784
|
-
sdkBindingFiles.set((0,
|
|
96799
|
+
sdkBindingFiles.set((0, import_node_crypto72.createHash)("sha256").update(later).digest("hex"), later);
|
|
96785
96800
|
sdkSplitBindings.set(key2, digest2);
|
|
96786
96801
|
}
|
|
96787
96802
|
function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
@@ -96856,10 +96871,10 @@ async function swiftArtifactAssets(artifact, { sdkUrl, sdkBindingUrl }) {
|
|
|
96856
96871
|
const later = decodeNativeSdkBinding(
|
|
96857
96872
|
bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength)
|
|
96858
96873
|
).later;
|
|
96859
|
-
for (const { sha256:
|
|
96860
|
-
const laterBytes = sdkBindingFiles.get(
|
|
96861
|
-
if (!laterBytes) throw new Error(`swift sdk later data ${
|
|
96862
|
-
assets2.set(`${SDK_BINDING_PATH}${
|
|
96874
|
+
for (const { sha256: sha2564 } of later?.files ?? []) {
|
|
96875
|
+
const laterBytes = sdkBindingFiles.get(sha2564);
|
|
96876
|
+
if (!laterBytes) throw new Error(`swift sdk later data ${sha2564} is not served`);
|
|
96877
|
+
assets2.set(`${SDK_BINDING_PATH}${sha2564}.bin`, {
|
|
96863
96878
|
bytes: laterBytes,
|
|
96864
96879
|
contentType: "application/octet-stream"
|
|
96865
96880
|
});
|
|
@@ -96871,13 +96886,13 @@ async function swiftArtifactAssets(artifact, { sdkUrl, sdkBindingUrl }) {
|
|
|
96871
96886
|
}
|
|
96872
96887
|
return assets2;
|
|
96873
96888
|
}
|
|
96874
|
-
var import_node_async_hooks3, import_node_child_process61,
|
|
96889
|
+
var import_node_async_hooks3, import_node_child_process61, import_node_crypto72, import_node_fs117, import_node_os26, import_node_path119, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, swiftArtifactDigests, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartupParts, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
|
|
96875
96890
|
var init_swift_host = __esm({
|
|
96876
96891
|
"src/swift-host.ts"() {
|
|
96877
96892
|
"use strict";
|
|
96878
96893
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
96879
96894
|
import_node_child_process61 = require("node:child_process");
|
|
96880
|
-
|
|
96895
|
+
import_node_crypto72 = require("node:crypto");
|
|
96881
96896
|
import_node_fs117 = __toESM(require("node:fs"), 1);
|
|
96882
96897
|
import_node_os26 = __toESM(require("node:os"), 1);
|
|
96883
96898
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
@@ -97634,7 +97649,7 @@ function hashTree(root) {
|
|
|
97634
97649
|
for (const entry of import_node_fs120.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
97635
97650
|
if (!entry.isFile()) continue;
|
|
97636
97651
|
const file = import_node_path122.default.join(entry.parentPath, entry.name);
|
|
97637
|
-
hashes[import_node_path122.default.relative(root, file).split(import_node_path122.default.sep).join("/")] = (0,
|
|
97652
|
+
hashes[import_node_path122.default.relative(root, file).split(import_node_path122.default.sep).join("/")] = (0, import_node_crypto73.createHash)("sha256").update(import_node_fs120.default.readFileSync(file)).digest("hex");
|
|
97638
97653
|
}
|
|
97639
97654
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
97640
97655
|
}
|
|
@@ -97684,12 +97699,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
97684
97699
|
files: hashTree(generatedRoot)
|
|
97685
97700
|
};
|
|
97686
97701
|
}
|
|
97687
|
-
var import_node_child_process62,
|
|
97702
|
+
var import_node_child_process62, import_node_crypto73, import_node_fs120, import_node_module15, import_node_path122, import_node_util16, run10, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
97688
97703
|
var init_turbo_codegen_intake = __esm({
|
|
97689
97704
|
"src/turbo-codegen-intake.ts"() {
|
|
97690
97705
|
"use strict";
|
|
97691
97706
|
import_node_child_process62 = require("node:child_process");
|
|
97692
|
-
|
|
97707
|
+
import_node_crypto73 = require("node:crypto");
|
|
97693
97708
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
97694
97709
|
import_node_module15 = require("node:module");
|
|
97695
97710
|
import_node_path122 = __toESM(require("node:path"), 1);
|
|
@@ -98762,7 +98777,7 @@ async function collectTurboSources(options2) {
|
|
|
98762
98777
|
);
|
|
98763
98778
|
const installedHeaders = /* @__PURE__ */ new Map();
|
|
98764
98779
|
const targetPath = (name3) => `Sources/${name3}`;
|
|
98765
|
-
const providerTarget = (name3) => `TurboPackage_${
|
|
98780
|
+
const providerTarget = (name3) => `TurboPackage_${sha2563(name3).slice(0, 16)}`;
|
|
98766
98781
|
const folly = readFollyConfig(reactNative.root);
|
|
98767
98782
|
const baseDefines = [
|
|
98768
98783
|
options2.configuration === "Debug" ? "DEBUG=1" : "NDEBUG",
|
|
@@ -98906,7 +98921,7 @@ async function collectTurboSources(options2) {
|
|
|
98906
98921
|
if (!Buffer.from(text7).equals(bytes))
|
|
98907
98922
|
throw new Error(`TurboModule source is not UTF-8: ${disk}`);
|
|
98908
98923
|
add(key2, text7);
|
|
98909
|
-
result.sources.push({ file: key2, source: disk, sha256:
|
|
98924
|
+
result.sources.push({ file: key2, source: disk, sha256: sha2563(bytes) });
|
|
98910
98925
|
pending.push({ key: key2, targetName, label, root, relative: relative3 });
|
|
98911
98926
|
return key2;
|
|
98912
98927
|
};
|
|
@@ -99719,13 +99734,13 @@ async function collectTurboSources(options2) {
|
|
|
99719
99734
|
let decoratorHasPerformanceLogger = false;
|
|
99720
99735
|
let managerHasDevMenuDecorator = false;
|
|
99721
99736
|
if (fabric) objc = true;
|
|
99722
|
-
for (const { relative: relative3, source, text: text7, sha256:
|
|
99737
|
+
for (const { relative: relative3, source, text: text7, sha256: sha2564, configured } of glogSources()) {
|
|
99723
99738
|
const key2 = `${core}/dependencies/glog/${relative3}`;
|
|
99724
99739
|
add(key2, text7);
|
|
99725
99740
|
result.sources.push({
|
|
99726
99741
|
file: key2,
|
|
99727
99742
|
source,
|
|
99728
|
-
sha256:
|
|
99743
|
+
sha256: sha2564,
|
|
99729
99744
|
...configured && { configured }
|
|
99730
99745
|
});
|
|
99731
99746
|
if (relative3.startsWith("src/glog/"))
|
|
@@ -102008,11 +102023,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
102008
102023
|
}
|
|
102009
102024
|
`;
|
|
102010
102025
|
}
|
|
102011
|
-
var
|
|
102026
|
+
var import_node_crypto74, import_node_fs121, import_node_module16, import_node_path123, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, 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, podspecList, reactNativePods, reactNativePod, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_SHADOW_HANDLE_HOST, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
|
|
102012
102027
|
var init_turbo_source = __esm({
|
|
102013
102028
|
"src/turbo-source.ts"() {
|
|
102014
102029
|
"use strict";
|
|
102015
|
-
|
|
102030
|
+
import_node_crypto74 = require("node:crypto");
|
|
102016
102031
|
import_node_fs121 = __toESM(require("node:fs"), 1);
|
|
102017
102032
|
import_node_module16 = require("node:module");
|
|
102018
102033
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
@@ -102142,7 +102157,7 @@ var init_turbo_source = __esm({
|
|
|
102142
102157
|
];
|
|
102143
102158
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
102144
102159
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
102145
|
-
|
|
102160
|
+
sha2563 = (data) => (0, import_node_crypto74.createHash)("sha256").update(data).digest("hex");
|
|
102146
102161
|
podspecList = podspecAttribute;
|
|
102147
102162
|
reactNativePods = /* @__PURE__ */ new Set([
|
|
102148
102163
|
"React",
|
|
@@ -102977,11 +102992,11 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
102977
102992
|
resources: { ...dependencies?.resources, ...collection.resources }
|
|
102978
102993
|
};
|
|
102979
102994
|
}
|
|
102980
|
-
var
|
|
102995
|
+
var import_node_crypto75, import_node_fs122, import_node_module17, import_node_os27, import_node_path124;
|
|
102981
102996
|
var init_turbo_compile = __esm({
|
|
102982
102997
|
"src/turbo-compile.ts"() {
|
|
102983
102998
|
"use strict";
|
|
102984
|
-
|
|
102999
|
+
import_node_crypto75 = require("node:crypto");
|
|
102985
103000
|
import_node_fs122 = __toESM(require("node:fs"), 1);
|
|
102986
103001
|
import_node_module17 = require("node:module");
|
|
102987
103002
|
import_node_os27 = __toESM(require("node:os"), 1);
|
|
@@ -103181,8 +103196,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
103181
103196
|
);
|
|
103182
103197
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
103183
103198
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
103184
|
-
const headers = (0,
|
|
103185
|
-
const sources = (0,
|
|
103199
|
+
const headers = (0, import_node_crypto76.createHash)("sha256");
|
|
103200
|
+
const sources = (0, import_node_crypto76.createHash)("sha256");
|
|
103186
103201
|
const walk4 = (relative3) => {
|
|
103187
103202
|
for (const file of import_node_fs124.default.readdirSync(import_node_path126.default.join(reactNativeRoot, relative3), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
103188
103203
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -103289,7 +103304,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
103289
103304
|
const file = import_node_path126.default.join(
|
|
103290
103305
|
cacheDir(),
|
|
103291
103306
|
"native-archives",
|
|
103292
|
-
`${(0,
|
|
103307
|
+
`${(0, import_node_crypto76.createHash)("sha256").update(data).digest("hex")}.a`
|
|
103293
103308
|
);
|
|
103294
103309
|
import_node_fs124.default.mkdirSync(import_node_path126.default.dirname(file), { recursive: true });
|
|
103295
103310
|
if (!import_node_fs124.default.existsSync(file)) import_node_fs124.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -103299,11 +103314,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
103299
103314
|
}
|
|
103300
103315
|
}
|
|
103301
103316
|
}
|
|
103302
|
-
var
|
|
103317
|
+
var import_node_crypto76, import_node_fs124, import_node_module18, import_node_path126, import_node_util17, recipe, strings4, building;
|
|
103303
103318
|
var init_react_native_core = __esm({
|
|
103304
103319
|
"src/react-native-core.ts"() {
|
|
103305
103320
|
"use strict";
|
|
103306
|
-
|
|
103321
|
+
import_node_crypto76 = require("node:crypto");
|
|
103307
103322
|
import_node_fs124 = __toESM(require("node:fs"), 1);
|
|
103308
103323
|
import_node_module18 = require("node:module");
|
|
103309
103324
|
import_node_path126 = __toESM(require("node:path"), 1);
|
|
@@ -103329,7 +103344,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
103329
103344
|
const modules = import_node_path127.default.join(moduleRoot, "modules");
|
|
103330
103345
|
const module2 = import_node_path127.default.join(modules, `${name3}.swiftmodule`);
|
|
103331
103346
|
if (!import_node_fs125.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
103332
|
-
const key2 = (0,
|
|
103347
|
+
const key2 = (0, import_node_crypto77.createHash)("sha256").update(import_node_fs125.default.readFileSync(module2)).digest("hex");
|
|
103333
103348
|
const directory2 = import_node_path127.default.join(swiftCacheDir(), "swift-public-names");
|
|
103334
103349
|
const receipt = import_node_path127.default.join(directory2, `${key2}.json`);
|
|
103335
103350
|
if (import_node_fs125.default.existsSync(receipt)) {
|
|
@@ -103412,12 +103427,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
103412
103427
|
}
|
|
103413
103428
|
);
|
|
103414
103429
|
}
|
|
103415
|
-
var import_node_child_process64,
|
|
103430
|
+
var import_node_child_process64, import_node_crypto77, import_node_fs125, import_node_path127, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
103416
103431
|
var init_swift_clang_type_ownership = __esm({
|
|
103417
103432
|
"src/swift-clang-type-ownership.ts"() {
|
|
103418
103433
|
"use strict";
|
|
103419
103434
|
import_node_child_process64 = require("node:child_process");
|
|
103420
|
-
|
|
103435
|
+
import_node_crypto77 = require("node:crypto");
|
|
103421
103436
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
103422
103437
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
103423
103438
|
init_is_record();
|
|
@@ -105085,7 +105100,7 @@ function targetSettings2(units) {
|
|
|
105085
105100
|
}
|
|
105086
105101
|
function oneSDKStamp(oneSDK) {
|
|
105087
105102
|
if (!oneSDK) return "";
|
|
105088
|
-
const hash = (0,
|
|
105103
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
105089
105104
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
105090
105105
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
105091
105106
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -105136,7 +105151,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
105136
105151
|
`;
|
|
105137
105152
|
}
|
|
105138
105153
|
function expoSwiftPreparedKey(base, units, reactProviderStamp) {
|
|
105139
|
-
const hash = (0,
|
|
105154
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
105140
105155
|
hash.update(base);
|
|
105141
105156
|
hash.update(reactProviderStamp);
|
|
105142
105157
|
for (const unit2 of units) {
|
|
@@ -105509,8 +105524,8 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
105509
105524
|
}
|
|
105510
105525
|
return provider;
|
|
105511
105526
|
})() : void 0;
|
|
105512
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
105513
|
-
const key2 = (0,
|
|
105527
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto78.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
105528
|
+
const key2 = (0, import_node_crypto78.createHash)("sha256").update(import_node_fs126.default.realpathSync(root)).digest("hex");
|
|
105514
105529
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
105515
105530
|
const failures = /* @__PURE__ */ new Map();
|
|
105516
105531
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -105804,7 +105819,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
105804
105819
|
await check2(part[0]);
|
|
105805
105820
|
continue;
|
|
105806
105821
|
}
|
|
105807
|
-
const name3 = (0,
|
|
105822
|
+
const name3 = (0, import_node_crypto78.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
105808
105823
|
report(`linking ${part.length} namespaces to isolate failures`);
|
|
105809
105824
|
try {
|
|
105810
105825
|
const built2 = await link(part, `isolate-${name3}`);
|
|
@@ -105877,13 +105892,13 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
105877
105892
|
throw failure2;
|
|
105878
105893
|
}
|
|
105879
105894
|
}
|
|
105880
|
-
var import_node_async_hooks4, import_node_child_process65,
|
|
105895
|
+
var import_node_async_hooks4, import_node_child_process65, import_node_crypto78, import_node_fs126, import_node_module19, import_node_os28, import_node_path128, import_node_url4, import_node_util18, run11, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
105881
105896
|
var init_expo_swift_host = __esm({
|
|
105882
105897
|
"src/expo-swift-host.ts"() {
|
|
105883
105898
|
"use strict";
|
|
105884
105899
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
105885
105900
|
import_node_child_process65 = require("node:child_process");
|
|
105886
|
-
|
|
105901
|
+
import_node_crypto78 = require("node:crypto");
|
|
105887
105902
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
105888
105903
|
import_node_module19 = require("node:module");
|
|
105889
105904
|
import_node_os28 = __toESM(require("node:os"), 1);
|
|
@@ -105939,11 +105954,11 @@ var init_expo_swift_host = __esm({
|
|
|
105939
105954
|
});
|
|
105940
105955
|
|
|
105941
105956
|
// src/nitro-compiler-digest.ts
|
|
105942
|
-
var
|
|
105957
|
+
var import_node_crypto81, import_node_fs129, import_node_path131;
|
|
105943
105958
|
var init_nitro_compiler_digest = __esm({
|
|
105944
105959
|
"src/nitro-compiler-digest.ts"() {
|
|
105945
105960
|
"use strict";
|
|
105946
|
-
|
|
105961
|
+
import_node_crypto81 = require("node:crypto");
|
|
105947
105962
|
import_node_fs129 = require("node:fs");
|
|
105948
105963
|
import_node_path131 = __toESM(require("node:path"), 1);
|
|
105949
105964
|
init_swift_compiler_digest();
|
|
@@ -106081,7 +106096,7 @@ var init_nitro_superset = __esm({
|
|
|
106081
106096
|
init_nitroContract();
|
|
106082
106097
|
init_swift_standin_digest();
|
|
106083
106098
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
106084
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
106099
|
+
NITRO_COMPILER_DIGEST = true ? "9e51ce132e701d77aa700249b4788f66b041f8f00fbd0bac84d9a3c8ed3a7569" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
106085
106100
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
106086
106101
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
106087
106102
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -106142,7 +106157,7 @@ async function selectCompiledNitroProviders(appRoot, answered = peachAnsweredNat
|
|
|
106142
106157
|
}
|
|
106143
106158
|
|
|
106144
106159
|
// src/nitro-compile.ts
|
|
106145
|
-
var
|
|
106160
|
+
var import_node_crypto80 = require("node:crypto");
|
|
106146
106161
|
var import_node_fs128 = __toESM(require("node:fs"), 1);
|
|
106147
106162
|
var import_node_os29 = __toESM(require("node:os"), 1);
|
|
106148
106163
|
var import_node_path130 = __toESM(require("node:path"), 1);
|
|
@@ -106163,7 +106178,7 @@ init_swift_package();
|
|
|
106163
106178
|
init_swift_source_file();
|
|
106164
106179
|
|
|
106165
106180
|
// src/swift-source-pods.ts
|
|
106166
|
-
var
|
|
106181
|
+
var import_node_crypto79 = require("node:crypto");
|
|
106167
106182
|
var import_node_fs127 = __toESM(require("node:fs"), 1);
|
|
106168
106183
|
var import_node_path129 = __toESM(require("node:path"), 1);
|
|
106169
106184
|
init_browser();
|
|
@@ -106206,11 +106221,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
106206
106221
|
"specifications",
|
|
106207
106222
|
`${checksum}.json`
|
|
106208
106223
|
);
|
|
106209
|
-
const sha1 = (value) => (0,
|
|
106224
|
+
const sha1 = (value) => (0, import_node_crypto79.createHash)("sha1").update(value).digest("hex");
|
|
106210
106225
|
let text7;
|
|
106211
106226
|
if (import_node_fs127.default.existsSync(file)) text7 = import_node_fs127.default.readFileSync(file, "utf8");
|
|
106212
106227
|
else {
|
|
106213
|
-
const shard2 = (0,
|
|
106228
|
+
const shard2 = (0, import_node_crypto79.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
106214
106229
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
106215
106230
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
106216
106231
|
if (!response.ok)
|
|
@@ -106339,7 +106354,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
106339
106354
|
"end",
|
|
106340
106355
|
""
|
|
106341
106356
|
].join("\n");
|
|
106342
|
-
const key2 = (0,
|
|
106357
|
+
const key2 = (0, import_node_crypto79.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
106343
106358
|
JSON.stringify(
|
|
106344
106359
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
106345
106360
|
)
|
|
@@ -107106,7 +107121,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
107106
107121
|
input.libraries ??= {};
|
|
107107
107122
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
107108
107123
|
}
|
|
107109
|
-
const key2 = (0,
|
|
107124
|
+
const key2 = (0, import_node_crypto80.createHash)("sha256").update(
|
|
107110
107125
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
107111
107126
|
).update("\0").update(import_node_fs128.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
107112
107127
|
const packagePath = import_node_path130.default.join(import_node_os29.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|