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;
|
|
@@ -3062,11 +3062,11 @@ async function installPack(runtimeRoot, prefix, destDir, allowDownload) {
|
|
|
3062
3062
|
await install;
|
|
3063
3063
|
return import_node_fs14.default.existsSync(marker);
|
|
3064
3064
|
}
|
|
3065
|
-
function desktopPackPath(
|
|
3065
|
+
function desktopPackPath(sha2564) {
|
|
3066
3066
|
if (process.platform !== "darwin") return;
|
|
3067
3067
|
const cliDir = import_node_path11.default.dirname(process.execPath);
|
|
3068
3068
|
const resources = cliDir.endsWith("/Contents/Resources/bin") ? import_node_path11.default.dirname(cliDir) : import_node_path11.default.join(MAC_HOST_APP, "Contents/Resources");
|
|
3069
|
-
const file = import_node_path11.default.join(resources, DESKTOP_RUNTIME_PACKS_DIR, `${
|
|
3069
|
+
const file = import_node_path11.default.join(resources, DESKTOP_RUNTIME_PACKS_DIR, `${sha2564}.tar.zst`);
|
|
3070
3070
|
if (import_node_fs14.default.existsSync(file)) return file;
|
|
3071
3071
|
}
|
|
3072
3072
|
var import_node_fs14, import_node_path11, import_node_timers, inflight, packsByRoot, listedByRoot, WARM_DELAY_MS, warming;
|
|
@@ -6177,7 +6177,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
6177
6177
|
|
|
6178
6178
|
// src/swift-compiler-digest.ts
|
|
6179
6179
|
function swiftArchiveCompilerDigestValue() {
|
|
6180
|
-
return true ? "
|
|
6180
|
+
return true ? "faa13b0ae0340e03d058b765e659f5e07b69f8e94793bf99981b3da7ca3bf2bd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
6181
6181
|
}
|
|
6182
6182
|
var import_node_crypto10, import_node_fs25, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
6183
6183
|
var init_swift_compiler_digest = __esm({
|
|
@@ -6323,13 +6323,13 @@ var init_swift_standin_digest = __esm({
|
|
|
6323
6323
|
];
|
|
6324
6324
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
6325
6325
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
6326
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
6326
|
+
STANDIN_SOURCE_DIGEST = true ? "b6aa8eda1952d06a101c0a46227f227fb983255bb2a5f825515d7b9bc6f8650d" : standinSourceDigest();
|
|
6327
6327
|
}
|
|
6328
6328
|
});
|
|
6329
6329
|
|
|
6330
6330
|
// src/expo-native-compiler-digest.ts
|
|
6331
6331
|
function expoNativeCompilerDigestValue() {
|
|
6332
|
-
return true ? "
|
|
6332
|
+
return true ? "d396bac9636107aeb95f7657c77fa10e270f50f4ac8935e007b088b2ef65dfc8" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
6333
6333
|
}
|
|
6334
6334
|
var import_node_crypto12;
|
|
6335
6335
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -9022,9 +9022,9 @@ async function ensureCompose(toolchain) {
|
|
|
9022
9022
|
const downloads = [...toolchain.composeLibraries, toolchain.composeLoader];
|
|
9023
9023
|
const root = import_node_path29.default.join(kotlinHome(), "compose", toolchain.composeArchive.sha256);
|
|
9024
9024
|
const verify = (dir) => {
|
|
9025
|
-
for (const { name: name3, sha256:
|
|
9025
|
+
for (const { name: name3, sha256: sha2564 } of downloads) {
|
|
9026
9026
|
const actual = (0, import_node_crypto14.createHash)("sha256").update(import_node_fs28.default.readFileSync(import_node_path29.default.join(dir, name3))).digest("hex");
|
|
9027
|
-
if (actual !==
|
|
9027
|
+
if (actual !== sha2564)
|
|
9028
9028
|
throw new Error(`Compose input differs from its pin: ${name3}`);
|
|
9029
9029
|
}
|
|
9030
9030
|
};
|
|
@@ -9313,15 +9313,15 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
|
|
|
9313
9313
|
if (!Buffer.from(text7).equals(bytes))
|
|
9314
9314
|
throw new Error(`Nitro dependency header is not UTF-8: ${source}`);
|
|
9315
9315
|
const backport = dependency.backport?.file === relative7 ? dependency.backport : void 0;
|
|
9316
|
-
let
|
|
9316
|
+
let sha2564 = original;
|
|
9317
9317
|
if (backport) {
|
|
9318
9318
|
if (original !== backport.originalSha256)
|
|
9319
9319
|
throw new Error(`${dependency.name} backport original differs: ${relative7}`);
|
|
9320
9320
|
if (!text7.includes(backport.before))
|
|
9321
9321
|
throw new Error(`${dependency.name} backport anchor missing: ${relative7}`);
|
|
9322
9322
|
text7 = text7.replace(backport.before, backport.after);
|
|
9323
|
-
|
|
9324
|
-
if (
|
|
9323
|
+
sha2564 = (0, import_node_crypto15.createHash)("sha256").update(text7).digest("hex");
|
|
9324
|
+
if (sha2564 !== backport.derivedSha256)
|
|
9325
9325
|
throw new Error(`${dependency.name} backport derived source differs: ${relative7}`);
|
|
9326
9326
|
}
|
|
9327
9327
|
return {
|
|
@@ -9329,7 +9329,7 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
|
|
|
9329
9329
|
name: dependency.name,
|
|
9330
9330
|
source,
|
|
9331
9331
|
text: text7,
|
|
9332
|
-
sha256:
|
|
9332
|
+
sha256: sha2564,
|
|
9333
9333
|
...backport && {
|
|
9334
9334
|
derivation: {
|
|
9335
9335
|
upstreamCommit: backport.upstreamCommit,
|
|
@@ -17259,10 +17259,10 @@ function swiftNativePin() {
|
|
|
17259
17259
|
}
|
|
17260
17260
|
return pin;
|
|
17261
17261
|
}
|
|
17262
|
-
function publishedSwiftSdk(
|
|
17262
|
+
function publishedSwiftSdk(sha2564) {
|
|
17263
17263
|
const { sdkRuntime, sdkGuestRuntime } = swiftNativePin().distribution;
|
|
17264
17264
|
return [sdkRuntime, sdkGuestRuntime].find(
|
|
17265
|
-
(publication) => publication?.source ===
|
|
17265
|
+
(publication) => publication?.source === sha2564
|
|
17266
17266
|
);
|
|
17267
17267
|
}
|
|
17268
17268
|
var pin;
|
|
@@ -29379,6 +29379,21 @@ var init_swift_foundation = __esm({
|
|
|
29379
29379
|
}
|
|
29380
29380
|
});
|
|
29381
29381
|
|
|
29382
|
+
// src/sha256.ts
|
|
29383
|
+
function sha256Hex2(input) {
|
|
29384
|
+
if (typeof Bun !== "undefined") {
|
|
29385
|
+
return new Bun.CryptoHasher("sha256").update(input).digest("hex");
|
|
29386
|
+
}
|
|
29387
|
+
return (0, import_node_crypto30.createHash)("sha256").update(input).digest("hex");
|
|
29388
|
+
}
|
|
29389
|
+
var import_node_crypto30;
|
|
29390
|
+
var init_sha256 = __esm({
|
|
29391
|
+
"src/sha256.ts"() {
|
|
29392
|
+
"use strict";
|
|
29393
|
+
import_node_crypto30 = require("node:crypto");
|
|
29394
|
+
}
|
|
29395
|
+
});
|
|
29396
|
+
|
|
29382
29397
|
// src/swift-guest-source-plan.ts
|
|
29383
29398
|
function swiftPackageLinkage(target) {
|
|
29384
29399
|
const linkage = target.machOType === "staticlib" ? "static" : target.machOType === "mh_dylib" ? "dynamic" : null;
|
|
@@ -32030,11 +32045,6 @@ var init_swift_wasm_archive = __esm({
|
|
|
32030
32045
|
});
|
|
32031
32046
|
|
|
32032
32047
|
// src/swift-wasm-prune.ts
|
|
32033
|
-
function sha256Hex2(bytes) {
|
|
32034
|
-
if (typeof Bun !== "undefined")
|
|
32035
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
32036
|
-
return (0, import_node_crypto30.createHash)("sha256").update(bytes).digest("hex");
|
|
32037
|
-
}
|
|
32038
32048
|
function readULEB2(b, o) {
|
|
32039
32049
|
let res = 0;
|
|
32040
32050
|
let shift = 0;
|
|
@@ -33071,7 +33081,7 @@ function swiftPrunedSdkObjectOrigins(sdk2, args, rewritten) {
|
|
|
33071
33081
|
}
|
|
33072
33082
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
33073
33083
|
const archives = import_node_fs58.default.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
33074
|
-
const hash = (0,
|
|
33084
|
+
const hash = (0, import_node_crypto31.createHash)("sha256");
|
|
33075
33085
|
for (const archive of archives) {
|
|
33076
33086
|
hash.update(archive + "\0");
|
|
33077
33087
|
hash.update(swiftFileChecksum(import_node_path59.default.join(sdkWasiDir, archive)));
|
|
@@ -34360,15 +34370,16 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
|
|
|
34360
34370
|
);
|
|
34361
34371
|
import_node_fs58.default.rmSync(rspPath, { force: true });
|
|
34362
34372
|
}
|
|
34363
|
-
var import_node_child_process25,
|
|
34373
|
+
var import_node_child_process25, import_node_crypto31, import_node_fs58, import_node_path59, 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;
|
|
34364
34374
|
var init_swift_wasm_prune = __esm({
|
|
34365
34375
|
"src/swift-wasm-prune.ts"() {
|
|
34366
34376
|
"use strict";
|
|
34367
34377
|
import_node_child_process25 = require("node:child_process");
|
|
34368
|
-
|
|
34378
|
+
import_node_crypto31 = require("node:crypto");
|
|
34369
34379
|
import_node_fs58 = __toESM(require("node:fs"), 1);
|
|
34370
34380
|
import_node_path59 = __toESM(require("node:path"), 1);
|
|
34371
34381
|
v3 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
34382
|
+
init_sha256();
|
|
34372
34383
|
init_swift_guest_source_plan();
|
|
34373
34384
|
init_swift_link_roots();
|
|
34374
34385
|
init_swift_resource_class_names();
|
|
@@ -34482,7 +34493,7 @@ function aliasGuestArchive(options2) {
|
|
|
34482
34493
|
alias,
|
|
34483
34494
|
name: member.name,
|
|
34484
34495
|
ordinal,
|
|
34485
|
-
sha256: (0,
|
|
34496
|
+
sha256: (0, import_node_crypto32.createHash)("sha256").update(member.bytes).digest("hex")
|
|
34486
34497
|
};
|
|
34487
34498
|
});
|
|
34488
34499
|
const response = import_node_path60.default.join(options2.directory, "members.rsp");
|
|
@@ -34495,7 +34506,7 @@ function aliasGuestArchive(options2) {
|
|
|
34495
34506
|
(0, import_node_child_process26.execFileSync)(options2.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
|
|
34496
34507
|
const rewritten = readArMembers((0, import_node_fs59.readFileSync)(archive));
|
|
34497
34508
|
if (rewritten.length !== members2.length || rewritten.some(
|
|
34498
|
-
(member, index) => member.name !== members2[index].alias || (0,
|
|
34509
|
+
(member, index) => member.name !== members2[index].alias || (0, import_node_crypto32.createHash)("sha256").update(member.bytes).digest("hex") !== members2[index].sha256
|
|
34499
34510
|
))
|
|
34500
34511
|
throw new Error(`guest archive changed members ${options2.archive}`);
|
|
34501
34512
|
return { source: options2.archive, archive, members: members2 };
|
|
@@ -34555,12 +34566,12 @@ function aliasGuestLinkIdentities(identities, archives) {
|
|
|
34555
34566
|
}
|
|
34556
34567
|
return result;
|
|
34557
34568
|
}
|
|
34558
|
-
var import_node_child_process26,
|
|
34569
|
+
var import_node_child_process26, import_node_crypto32, import_node_fs59, import_node_path60;
|
|
34559
34570
|
var init_swift_guest_archive = __esm({
|
|
34560
34571
|
"src/swift-guest-archive.ts"() {
|
|
34561
34572
|
"use strict";
|
|
34562
34573
|
import_node_child_process26 = require("node:child_process");
|
|
34563
|
-
|
|
34574
|
+
import_node_crypto32 = require("node:crypto");
|
|
34564
34575
|
import_node_fs59 = require("node:fs");
|
|
34565
34576
|
import_node_path60 = __toESM(require("node:path"), 1);
|
|
34566
34577
|
init_swift_wasm_prune();
|
|
@@ -34574,15 +34585,15 @@ function nativeDyldName(bytes) {
|
|
|
34574
34585
|
name3 += String.fromCharCode(...bytes.subarray(start, start + 4096));
|
|
34575
34586
|
return name3;
|
|
34576
34587
|
}
|
|
34577
|
-
function nativeDyldTablePath(primary,
|
|
34588
|
+
function nativeDyldTablePath(primary, sha2564) {
|
|
34578
34589
|
const prefix = primary.slice(0, primary.lastIndexOf("/") + 1);
|
|
34579
|
-
return prefix +
|
|
34590
|
+
return prefix + sha2564 + (primary.endsWith(".wasm") ? ".dyld" : "");
|
|
34580
34591
|
}
|
|
34581
34592
|
function readNativeDyldTableIndex(section2) {
|
|
34582
34593
|
const bytes = new Uint8Array(section2);
|
|
34583
34594
|
const view = new DataView(section2);
|
|
34584
34595
|
if (bytes.length < 40) throw new Error("native dyld table index is truncated");
|
|
34585
|
-
const
|
|
34596
|
+
const sha2564 = Array.from(
|
|
34586
34597
|
bytes.subarray(0, 32),
|
|
34587
34598
|
(byte) => byte.toString(16).padStart(2, "0")
|
|
34588
34599
|
).join("");
|
|
@@ -34606,7 +34617,7 @@ function readNativeDyldTableIndex(section2) {
|
|
|
34606
34617
|
at = end + 1;
|
|
34607
34618
|
}
|
|
34608
34619
|
if (at !== bytes.length) throw new Error("native dyld table index has trailing bytes");
|
|
34609
|
-
return { sha256:
|
|
34620
|
+
return { sha256: sha2564, byteLength, packs, firsts };
|
|
34610
34621
|
}
|
|
34611
34622
|
var NATIVE_DYLD_TABLE_SECTION, NATIVE_DYLD_PACKS_SECTION;
|
|
34612
34623
|
var init_nativeDyldTableContract = __esm({
|
|
@@ -34630,12 +34641,12 @@ function readNativeLazyParts(section2) {
|
|
|
34630
34641
|
for (let id = 0; id < count; id++) {
|
|
34631
34642
|
const offset = 4 + id * NATIVE_LAZY_PART_BYTES;
|
|
34632
34643
|
const digest3 = new Uint8Array(section2, offset, NATIVE_LAZY_DIGEST_BYTES);
|
|
34633
|
-
const
|
|
34644
|
+
const sha2564 = Array.from(digest3, (byte) => byte.toString(16).padStart(2, "0")).join(
|
|
34634
34645
|
""
|
|
34635
34646
|
);
|
|
34636
34647
|
const byteLength = view.getUint32(offset + NATIVE_LAZY_DIGEST_BYTES, true);
|
|
34637
34648
|
if (!byteLength) throw new Error("native code part has no bytes");
|
|
34638
|
-
parts2.push({ sha256:
|
|
34649
|
+
parts2.push({ sha256: sha2564, byteLength });
|
|
34639
34650
|
}
|
|
34640
34651
|
return { parts: parts2, slotOffset, slotBytes };
|
|
34641
34652
|
}
|
|
@@ -35598,7 +35609,7 @@ function createGuestImageLedger(input) {
|
|
|
35598
35609
|
const digest3 = ({ object: object9 }) => {
|
|
35599
35610
|
let value = digests2.get(object9);
|
|
35600
35611
|
if (value === void 0) {
|
|
35601
|
-
value = (0,
|
|
35612
|
+
value = (0, import_node_crypto33.createHash)("sha256").update(objects2.get(object9).bytes).digest("hex");
|
|
35602
35613
|
digests2.set(object9, value);
|
|
35603
35614
|
}
|
|
35604
35615
|
return value;
|
|
@@ -35813,7 +35824,7 @@ done:
|
|
|
35813
35824
|
attributes #0 = { "wasm-import-module"="${NATIVE_TABLE_IMPORT_MODULE}" "wasm-import-name"="${NATIVE_DYLD_FUNCTION_IMPORT}" }`;
|
|
35814
35825
|
}
|
|
35815
35826
|
function sdkGuestCallerId(product) {
|
|
35816
|
-
const hash = (0,
|
|
35827
|
+
const hash = (0, import_node_crypto33.createHash)("sha256").update(product).digest().readUInt32LE(0);
|
|
35817
35828
|
return (hash | 2147483648) >>> 0;
|
|
35818
35829
|
}
|
|
35819
35830
|
function sdkGuestSymbolName(product, name3) {
|
|
@@ -35891,11 +35902,11 @@ function nameGuestImageAliases(wasm, symbols) {
|
|
|
35891
35902
|
}
|
|
35892
35903
|
return Buffer.concat(parts2);
|
|
35893
35904
|
}
|
|
35894
|
-
var
|
|
35905
|
+
var import_node_crypto33, ByteWriter, OBJC_INIT_RECORD, TABLE_INDEX_RELOCATIONS, sha256PairHex, GUEST_DYLD_VALUES_SECTION, GUEST_LAZY_FUNCTION_BASE, SDK_DYLD_RESOLVER;
|
|
35895
35906
|
var init_swift_guest_image_ledger = __esm({
|
|
35896
35907
|
"src/swift-guest-image-ledger.ts"() {
|
|
35897
35908
|
"use strict";
|
|
35898
|
-
|
|
35909
|
+
import_node_crypto33 = require("node:crypto");
|
|
35899
35910
|
init_nativeWasmContract();
|
|
35900
35911
|
init_swift_sdk_image_wasm();
|
|
35901
35912
|
init_swiftSdkLinkContract();
|
|
@@ -35952,7 +35963,7 @@ var init_swift_guest_image_ledger = __esm({
|
|
|
35952
35963
|
};
|
|
35953
35964
|
OBJC_INIT_RECORD = ".objc_init";
|
|
35954
35965
|
TABLE_INDEX_RELOCATIONS = /* @__PURE__ */ new Set([1, 2, 12, 18, 19, 24]);
|
|
35955
|
-
sha256PairHex = typeof Bun !== "undefined" ? (first, second) => new Bun.CryptoHasher("sha256").update(first).update("\0").update(second).digest("hex") : (first, second) => (0,
|
|
35966
|
+
sha256PairHex = typeof Bun !== "undefined" ? (first, second) => new Bun.CryptoHasher("sha256").update(first).update("\0").update(second).digest("hex") : (first, second) => (0, import_node_crypto33.createHash)("sha256").update(first).update("\0").update(second).digest("hex");
|
|
35956
35967
|
GUEST_DYLD_VALUES_SECTION = "peach_dyld_values";
|
|
35957
35968
|
GUEST_LAZY_FUNCTION_BASE = 2 ** 32;
|
|
35958
35969
|
SDK_DYLD_RESOLVER = "__peach_sdk_dyld_resolve";
|
|
@@ -36444,12 +36455,7 @@ var init_wasm_narrow_boundary = __esm({
|
|
|
36444
36455
|
function sha256Buffer(bytes) {
|
|
36445
36456
|
if (typeof Bun !== "undefined")
|
|
36446
36457
|
return Buffer.from(new Bun.CryptoHasher("sha256").update(bytes).digest());
|
|
36447
|
-
return (0,
|
|
36448
|
-
}
|
|
36449
|
-
function sha256Hex3(bytes) {
|
|
36450
|
-
if (typeof Bun !== "undefined")
|
|
36451
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
36452
|
-
return (0, import_node_crypto33.createHash)("sha256").update(bytes).digest("hex");
|
|
36458
|
+
return (0, import_node_crypto34.createHash)("sha256").update(bytes).digest();
|
|
36453
36459
|
}
|
|
36454
36460
|
function uleb2(value) {
|
|
36455
36461
|
const bytes = [];
|
|
@@ -36540,8 +36546,8 @@ function guestDyldValueRange(map2) {
|
|
|
36540
36546
|
function swiftDyldTableReference(modulePath, module2) {
|
|
36541
36547
|
const section2 = readWasmCustomSection(module2, NATIVE_DYLD_TABLE_SECTION);
|
|
36542
36548
|
if (!section2 || readWasmCustomSection(module2, NATIVE_DYLD_PACKS_SECTION)) return;
|
|
36543
|
-
const { sha256:
|
|
36544
|
-
return { path: nativeDyldTablePath(modulePath,
|
|
36549
|
+
const { sha256: sha2564, byteLength } = readNativeDyldTableIndex(Uint8Array.from(section2).buffer);
|
|
36550
|
+
return { path: nativeDyldTablePath(modulePath, sha2564), sha256: sha2564, byteLength };
|
|
36545
36551
|
}
|
|
36546
36552
|
function splitSwiftDyldTable(wasm) {
|
|
36547
36553
|
const packs = readWasmCustomSection(wasm, NATIVE_DYLD_PACKS_SECTION);
|
|
@@ -36549,16 +36555,17 @@ function splitSwiftDyldTable(wasm) {
|
|
|
36549
36555
|
const bytes = Buffer.from(packs);
|
|
36550
36556
|
return {
|
|
36551
36557
|
module: dropWasmCustomSection(wasm, NATIVE_DYLD_PACKS_SECTION),
|
|
36552
|
-
table: { sha256:
|
|
36558
|
+
table: { sha256: sha256Hex2(bytes), bytes }
|
|
36553
36559
|
};
|
|
36554
36560
|
}
|
|
36555
|
-
var
|
|
36561
|
+
var import_node_crypto34, import_node_zlib4, PACK_BYTES;
|
|
36556
36562
|
var init_swift_guest_dyld_table = __esm({
|
|
36557
36563
|
"src/swift-guest-dyld-table.ts"() {
|
|
36558
36564
|
"use strict";
|
|
36559
|
-
|
|
36565
|
+
import_node_crypto34 = require("node:crypto");
|
|
36560
36566
|
import_node_zlib4 = require("node:zlib");
|
|
36561
36567
|
init_nativeDyldTableContract();
|
|
36568
|
+
init_sha256();
|
|
36562
36569
|
init_swift_guest_image_ledger();
|
|
36563
36570
|
init_swift_guest_linked_spans();
|
|
36564
36571
|
init_wasm_narrow_boundary();
|
|
@@ -37008,7 +37015,7 @@ function selectedGuestManifestInputs(plan, selection, identities, readSelected)
|
|
|
37008
37015
|
throw new Error(
|
|
37009
37016
|
`selected member has no original identity: ${item.artifact}(${item.member})`
|
|
37010
37017
|
);
|
|
37011
|
-
if (origin && (0,
|
|
37018
|
+
if (origin && (0, import_node_crypto35.createHash)("sha256").update(bytes).digest("hex") !== origin.sha256)
|
|
37012
37019
|
throw new Error(
|
|
37013
37020
|
`selected member differs from original: ${item.artifact}(${item.member})`
|
|
37014
37021
|
);
|
|
@@ -37055,7 +37062,7 @@ function createGuestImageManifest(image) {
|
|
|
37055
37062
|
cpuType: -1,
|
|
37056
37063
|
cpuSubtype: 0
|
|
37057
37064
|
};
|
|
37058
|
-
const digest3 = (0,
|
|
37065
|
+
const digest3 = (0, import_node_crypto35.createHash)("sha256");
|
|
37059
37066
|
const sizeBuf = Buffer.allocUnsafe(8);
|
|
37060
37067
|
const add = (bytes) => {
|
|
37061
37068
|
sizeBuf.writeBigUInt64BE(BigInt(bytes.byteLength));
|
|
@@ -37097,11 +37104,11 @@ function createGuestImageManifest(image) {
|
|
|
37097
37104
|
regions: image.regions
|
|
37098
37105
|
};
|
|
37099
37106
|
}
|
|
37100
|
-
var
|
|
37107
|
+
var import_node_crypto35, import_node_fs60, framedLinkOptionsCache;
|
|
37101
37108
|
var init_swift_guest_manifest = __esm({
|
|
37102
37109
|
"src/swift-guest-manifest.ts"() {
|
|
37103
37110
|
"use strict";
|
|
37104
|
-
|
|
37111
|
+
import_node_crypto35 = require("node:crypto");
|
|
37105
37112
|
import_node_fs60 = require("node:fs");
|
|
37106
37113
|
init_swift_guest_link_plan();
|
|
37107
37114
|
init_swift_wasm_prune();
|
|
@@ -37567,11 +37574,11 @@ var init_swift_guest_projection_storage = __esm({
|
|
|
37567
37574
|
function frameworkRuntimeProductId(product) {
|
|
37568
37575
|
return `swift-package/${product.packageName}/${product.product.name}`;
|
|
37569
37576
|
}
|
|
37570
|
-
var
|
|
37577
|
+
var import_node_crypto36, v4, packageSchema;
|
|
37571
37578
|
var init_swift_runtime_products = __esm({
|
|
37572
37579
|
"src/swift-runtime-products.ts"() {
|
|
37573
37580
|
"use strict";
|
|
37574
|
-
|
|
37581
|
+
import_node_crypto36 = require("node:crypto");
|
|
37575
37582
|
v4 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
37576
37583
|
init_is_record();
|
|
37577
37584
|
packageSchema = v4.object({
|
|
@@ -37602,7 +37609,7 @@ function canonicalArchivePath(file) {
|
|
|
37602
37609
|
function sdkArtifactBytes(root, artifact) {
|
|
37603
37610
|
const file = import_node_path61.default.resolve(root, artifact.path);
|
|
37604
37611
|
const linked = (0, import_node_fs61.readFileSync)(file);
|
|
37605
|
-
const hash = (bytes) => (0,
|
|
37612
|
+
const hash = (bytes) => (0, import_node_crypto37.createHash)("sha256").update(bytes).digest("hex");
|
|
37606
37613
|
if (hash(linked) === artifact.sha256) return { source: linked, linked };
|
|
37607
37614
|
if (artifact.kind !== "archive" || artifact.path !== `${SWIFT_SDK_PRODUCT_DIRECTORY}/libFoundation.a`)
|
|
37608
37615
|
throw new Error(`SDK product artifact changed ${file}`);
|
|
@@ -37628,9 +37635,9 @@ function indexSdkMembers(bytes) {
|
|
|
37628
37635
|
);
|
|
37629
37636
|
}
|
|
37630
37637
|
function verifySdkObjectTransform(source, linked, sourceSha256, transformation) {
|
|
37631
|
-
if ((0,
|
|
37638
|
+
if ((0, import_node_crypto37.createHash)("sha256").update(source).digest("hex") !== sourceSha256 || transformation.inputSha256 !== sourceSha256)
|
|
37632
37639
|
throw new Error("SDK object transform input changed");
|
|
37633
|
-
if ((0,
|
|
37640
|
+
if ((0, import_node_crypto37.createHash)("sha256").update(linked).digest("hex") !== transformation.outputSha256 || transformation.kind === "swiftrt" && !Buffer.from(patchSwiftrtObject(source)).equals(linked))
|
|
37634
37641
|
throw new Error("SDK object transform output changed");
|
|
37635
37642
|
}
|
|
37636
37643
|
function readGuestRuntimeCatalogs(sdkRoot, distributionRoot) {
|
|
@@ -37910,7 +37917,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
37910
37917
|
const digest3 = (file) => {
|
|
37911
37918
|
let value = hashes.get(file);
|
|
37912
37919
|
if (!value) {
|
|
37913
|
-
value = (0,
|
|
37920
|
+
value = (0, import_node_crypto37.createHash)("sha256").update((0, import_node_fs61.readFileSync)(file)).digest("hex");
|
|
37914
37921
|
hashes.set(file, value);
|
|
37915
37922
|
}
|
|
37916
37923
|
return value;
|
|
@@ -37978,9 +37985,9 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
37978
37985
|
if (input.member) {
|
|
37979
37986
|
if (original.kind !== "archive")
|
|
37980
37987
|
throw new Error(`SDK input member has no archive ${originalFile}`);
|
|
37981
|
-
const { name: name3, ordinal, sha256:
|
|
37988
|
+
const { name: name3, ordinal, sha256: sha2564 } = input.member;
|
|
37982
37989
|
const member = original.members.find(
|
|
37983
|
-
(entry) => entry.name === name3 && entry.ordinal === ordinal && entry.sha256 ===
|
|
37990
|
+
(entry) => entry.name === name3 && entry.ordinal === ordinal && entry.sha256 === sha2564
|
|
37984
37991
|
);
|
|
37985
37992
|
let records = archiveMembers.get(originalFile);
|
|
37986
37993
|
if (!records) {
|
|
@@ -37988,7 +37995,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
37988
37995
|
archiveMembers.set(originalFile, records);
|
|
37989
37996
|
}
|
|
37990
37997
|
const bytes = records.filter((entry) => entry.name === name3)[ordinal - 1]?.bytes;
|
|
37991
|
-
if (!member || !bytes || (0,
|
|
37998
|
+
if (!member || !bytes || (0, import_node_crypto37.createHash)("sha256").update(bytes).digest("hex") !== sha2564)
|
|
37992
37999
|
throw new Error(`SDK input member changed ${originalFile}(${name3})`);
|
|
37993
38000
|
} else if (original.kind !== "object")
|
|
37994
38001
|
throw new Error(`SDK object input has no member ${originalFile}`);
|
|
@@ -38017,7 +38024,7 @@ function guestSdkProductLinkArtifacts(products, sdk2, inputs2, linkedArchives, r
|
|
|
38017
38024
|
const member = members2.get(key2);
|
|
38018
38025
|
const source = indexed.source.get(key2);
|
|
38019
38026
|
const linked2 = indexed.linked.get(key2);
|
|
38020
|
-
if (!member || !source || !linked2 || (0,
|
|
38027
|
+
if (!member || !source || !linked2 || (0, import_node_crypto37.createHash)("sha256").update(source).digest("hex") !== member.sha256 || (0, import_node_crypto37.createHash)("sha256").update(linked2).digest("hex") !== digest3(origin.original))
|
|
38021
38028
|
throw new Error(`SDK member differs from source product ${origin.original}`);
|
|
38022
38029
|
add({
|
|
38023
38030
|
path: origin.original,
|
|
@@ -38082,7 +38089,7 @@ function guestAliasedSdkArchiveArtifacts(options2) {
|
|
|
38082
38089
|
const key2 = JSON.stringify([member.name, member.ordinal]);
|
|
38083
38090
|
const bytes = sourceMembers[index].get(key2);
|
|
38084
38091
|
const linked = viewMembers[index].get(key2);
|
|
38085
|
-
return bytes !== void 0 && linked !== void 0 && (0,
|
|
38092
|
+
return bytes !== void 0 && linked !== void 0 && (0, import_node_crypto37.createHash)("sha256").update(bytes).digest("hex") === entry.sha256 && (0, import_node_crypto37.createHash)("sha256").update(linked).digest("hex") === member.sha256;
|
|
38086
38093
|
}) ? [product2.id] : []
|
|
38087
38094
|
)
|
|
38088
38095
|
);
|
|
@@ -38115,11 +38122,11 @@ function guestAliasedSdkArchiveArtifacts(options2) {
|
|
|
38115
38122
|
}
|
|
38116
38123
|
return result;
|
|
38117
38124
|
}
|
|
38118
|
-
var
|
|
38125
|
+
var import_node_crypto37, import_node_fs61, import_node_path61, v5, SDK_CONTAINING_IMAGE;
|
|
38119
38126
|
var init_swift_guest_runtime_plan = __esm({
|
|
38120
38127
|
"src/swift-guest-runtime-plan.ts"() {
|
|
38121
38128
|
"use strict";
|
|
38122
|
-
|
|
38129
|
+
import_node_crypto37 = require("node:crypto");
|
|
38123
38130
|
import_node_fs61 = require("node:fs");
|
|
38124
38131
|
import_node_path61 = __toESM(require("node:path"), 1);
|
|
38125
38132
|
v5 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -39955,13 +39962,8 @@ function clangBinaryStamp(file) {
|
|
|
39955
39962
|
const stat2 = (0, import_node_fs64.statSync)(file, { bigint: true });
|
|
39956
39963
|
return [file, stat2.size, stat2.mtimeNs].join(":");
|
|
39957
39964
|
}
|
|
39958
|
-
function sha256Hex4(bytes) {
|
|
39959
|
-
if (typeof Bun !== "undefined")
|
|
39960
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
39961
|
-
return (0, import_node_crypto37.createHash)("sha256").update(bytes).digest("hex");
|
|
39962
|
-
}
|
|
39963
39965
|
function clangWrapperStamp(file) {
|
|
39964
|
-
return
|
|
39966
|
+
return sha256Hex2((0, import_node_fs64.readFileSync)(file));
|
|
39965
39967
|
}
|
|
39966
39968
|
function clangArgsNeedCwd(args) {
|
|
39967
39969
|
const pathFlags = /* @__PURE__ */ new Set([
|
|
@@ -40139,7 +40141,7 @@ function sourceGuestClangLinkOptions(options2) {
|
|
|
40139
40141
|
import_node_path64.default.join(options2.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)
|
|
40140
40142
|
)))
|
|
40141
40143
|
throw new Error(`unsupported source object producer ${file}`);
|
|
40142
|
-
const key2 =
|
|
40144
|
+
const key2 = sha256Hex2(
|
|
40143
40145
|
JSON.stringify([
|
|
40144
40146
|
"clang-link-options/v2",
|
|
40145
40147
|
clangArgsNeedCwd(command.args) ? process.cwd() : null,
|
|
@@ -40150,7 +40152,7 @@ function sourceGuestClangLinkOptions(options2) {
|
|
|
40150
40152
|
clangProducerStamp(file)
|
|
40151
40153
|
])
|
|
40152
40154
|
);
|
|
40153
|
-
const cacheFile = import_node_path64.default.join(cacheDirectory,
|
|
40155
|
+
const cacheFile = import_node_path64.default.join(cacheDirectory, sha256Hex2(file) + ".json");
|
|
40154
40156
|
const cached4 = readClangLinkOptions(cacheFile, key2);
|
|
40155
40157
|
if (cached4) {
|
|
40156
40158
|
validateClangLinkOptions(cached4);
|
|
@@ -40363,7 +40365,7 @@ function sourceGuestRuntimeLinks(options2) {
|
|
|
40363
40365
|
const file = import_node_path64.default.resolve(directory2, alias.moduleMap);
|
|
40364
40366
|
if (!file.startsWith(directory2 + import_node_path64.default.sep))
|
|
40365
40367
|
throw new Error(`invalid framework module map ${alias.moduleMap}`);
|
|
40366
|
-
if ((
|
|
40368
|
+
if (sha256Hex2((0, import_node_fs64.readFileSync)(file)) !== alias.moduleMapSha256)
|
|
40367
40369
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
40368
40370
|
sdkAliases.set(alias.name, {
|
|
40369
40371
|
product: product.id,
|
|
@@ -40419,7 +40421,7 @@ function sourceGuestRuntimeLinks(options2) {
|
|
|
40419
40421
|
const map2 = import_node_path64.default.resolve(root, alias.moduleMap);
|
|
40420
40422
|
if (!map2.startsWith(root + import_node_path64.default.sep))
|
|
40421
40423
|
throw new Error(`invalid framework module map ${alias.moduleMap}`);
|
|
40422
|
-
if ((
|
|
40424
|
+
if (sha256Hex2((0, import_node_fs64.readFileSync)(map2)) !== alias.moduleMapSha256)
|
|
40423
40425
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
40424
40426
|
frameworkAliases.set(alias.name, { kind: "package", targets: closure(alias.targets) });
|
|
40425
40427
|
}
|
|
@@ -40520,15 +40522,15 @@ function logicalGuestLinkOptions(args, identities, roots) {
|
|
|
40520
40522
|
}
|
|
40521
40523
|
return output;
|
|
40522
40524
|
}
|
|
40523
|
-
var import_node_child_process29,
|
|
40525
|
+
var import_node_child_process29, import_node_fs64, import_node_path64, CLANG_TARGET_MODULE_WRAPPER, PARALLEL_REPLAY;
|
|
40524
40526
|
var init_swift_guest_source_inputs = __esm({
|
|
40525
40527
|
"src/swift-guest-source-inputs.ts"() {
|
|
40526
40528
|
"use strict";
|
|
40527
40529
|
import_node_child_process29 = require("node:child_process");
|
|
40528
|
-
import_node_crypto37 = require("node:crypto");
|
|
40529
40530
|
import_node_fs64 = require("node:fs");
|
|
40530
40531
|
import_node_path64 = __toESM(require("node:path"), 1);
|
|
40531
40532
|
init_forked_script_contract();
|
|
40533
|
+
init_sha256();
|
|
40532
40534
|
init_swift_guest_source_plan();
|
|
40533
40535
|
init_swift_runtime_products();
|
|
40534
40536
|
init_swift_wasm_prune();
|
|
@@ -45502,6 +45504,10 @@ ${SWIFT_SDK_IMAGE_VERSION}
|
|
|
45502
45504
|
`).update(inputs2).update(products.length === 0 ? "" : `
|
|
45503
45505
|
products ${products.join(" ")}`).digest("hex").slice(0, 32);
|
|
45504
45506
|
}
|
|
45507
|
+
function swiftSdkImageVariantKey(baseKey, required) {
|
|
45508
|
+
if (!required.length) return baseKey;
|
|
45509
|
+
return (0, import_node_crypto44.createHash)("sha256").update(baseKey).update(JSON.stringify(required)).digest("hex").slice(0, 32);
|
|
45510
|
+
}
|
|
45505
45511
|
function swiftSdkImageEntry(key2, scopedLookups) {
|
|
45506
45512
|
const inputs2 = { image: key2 };
|
|
45507
45513
|
return {
|
|
@@ -45531,15 +45537,15 @@ function cached3(directory2, key2) {
|
|
|
45531
45537
|
return void 0;
|
|
45532
45538
|
}
|
|
45533
45539
|
}
|
|
45534
|
-
function sdkImageAt(directory2, key2,
|
|
45540
|
+
function sdkImageAt(directory2, key2, sha2564) {
|
|
45535
45541
|
refreshSwiftCacheHold(directory2);
|
|
45536
|
-
const cacheKey = `${directory2}\0${
|
|
45542
|
+
const cacheKey = `${directory2}\0${sha2564}`;
|
|
45537
45543
|
let loadedInterface;
|
|
45538
45544
|
return {
|
|
45539
45545
|
key: key2,
|
|
45540
45546
|
directory: directory2,
|
|
45541
45547
|
image: import_node_path73.default.join(directory2, IMAGE_FILE),
|
|
45542
|
-
sha256:
|
|
45548
|
+
sha256: sha2564,
|
|
45543
45549
|
get sdkInterface() {
|
|
45544
45550
|
if (loadedInterface) return loadedInterface;
|
|
45545
45551
|
const memo2 = cachedSdkInterfaces.get(cacheKey);
|
|
@@ -45553,11 +45559,24 @@ function sdkImageAt(directory2, key2, sha2565) {
|
|
|
45553
45559
|
}
|
|
45554
45560
|
async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkImports2 = [], options2) {
|
|
45555
45561
|
const { imports: imports2, products } = swiftSdkImageProducts(moduleRoot, frameworkImports2);
|
|
45556
|
-
const
|
|
45557
|
-
const
|
|
45562
|
+
const images = import_node_path73.default.join(swiftCacheDir(), "swift-sdk-images");
|
|
45563
|
+
const baseKey = swiftSdkImageKey(moduleRoot, scopedLookups, products);
|
|
45564
|
+
const required = [...new Set(options2?.requiredGuestSymbols)].sort();
|
|
45565
|
+
const base2 = cached3(import_node_path73.default.join(images, baseKey), baseKey);
|
|
45566
|
+
if (base2) {
|
|
45567
|
+
if (!required.length) return base2;
|
|
45568
|
+
const { functions, data, tls } = base2.sdkInterface;
|
|
45569
|
+
if (required.every(
|
|
45570
|
+
(name3) => functions[name3] !== void 0 || data[name3] !== void 0 || tls[name3] !== void 0
|
|
45571
|
+
))
|
|
45572
|
+
return base2;
|
|
45573
|
+
}
|
|
45574
|
+
const key2 = swiftSdkImageVariantKey(baseKey, required);
|
|
45575
|
+
const directory2 = import_node_path73.default.join(images, key2);
|
|
45558
45576
|
const existing = cached3(directory2, key2);
|
|
45559
45577
|
if (existing) return existing;
|
|
45560
|
-
|
|
45578
|
+
const distribution = swiftDistributionAt(moduleRoot);
|
|
45579
|
+
if (!options2?.producer && !required.length && !distribution && import_node_path73.default.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
|
|
45561
45580
|
const { produceSwiftSdkImage: produceSwiftSdkImage2 } = await Promise.resolve().then(() => (init_swift_sdk_image_producer(), swift_sdk_image_producer_exports));
|
|
45562
45581
|
await produceSwiftSdkImage2({
|
|
45563
45582
|
moduleRoot,
|
|
@@ -45578,7 +45597,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
45578
45597
|
return cached3(directory2, key2) ?? withSwiftRootLock(directory2, async () => {
|
|
45579
45598
|
const previous = cached3(directory2, key2);
|
|
45580
45599
|
if (previous) return previous;
|
|
45581
|
-
if (
|
|
45600
|
+
if (distribution && !required.length) {
|
|
45582
45601
|
const entry = swiftSdkImageEntry(key2, scopedLookups);
|
|
45583
45602
|
const fetched = fetchNativeEntry("sdk-image", entry.name, entry.key);
|
|
45584
45603
|
if (fetched) {
|
|
@@ -45615,6 +45634,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
45615
45634
|
work,
|
|
45616
45635
|
scopedLookups,
|
|
45617
45636
|
imports2,
|
|
45637
|
+
required,
|
|
45618
45638
|
releaseFrameworks
|
|
45619
45639
|
)
|
|
45620
45640
|
);
|
|
@@ -45623,7 +45643,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
45623
45643
|
}
|
|
45624
45644
|
});
|
|
45625
45645
|
}
|
|
45626
|
-
async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLookups, imports2, releaseFrameworks) {
|
|
45646
|
+
async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLookups, imports2, required, releaseFrameworks) {
|
|
45627
45647
|
(0, import_node_fs73.rmSync)(work, { recursive: true, force: true });
|
|
45628
45648
|
(0, import_node_fs73.mkdirSync)(work, { recursive: true });
|
|
45629
45649
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
@@ -45784,7 +45804,10 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
45784
45804
|
const quote3 = (value) => JSON.stringify(value);
|
|
45785
45805
|
(0, import_node_fs73.writeFileSync)(
|
|
45786
45806
|
import_node_path73.default.join(work, "exports.rsp"),
|
|
45787
|
-
[
|
|
45807
|
+
[
|
|
45808
|
+
...[...defined].map((name3) => quote3(`--export-if-defined=${name3}`)),
|
|
45809
|
+
...required.filter((name3) => !defined.has(name3)).map((name3) => quote3(`--export=${name3}`))
|
|
45810
|
+
].join("\n")
|
|
45788
45811
|
);
|
|
45789
45812
|
const guestServices = import_node_path73.default.join(work, "peach-guest-services.allow");
|
|
45790
45813
|
(0, import_node_fs73.writeFileSync)(guestServices, peachGuestServiceAllowlist);
|
|
@@ -45875,11 +45898,12 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
45875
45898
|
import_node_path73.default.join(work, IMAGE_DIGEST),
|
|
45876
45899
|
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0, import_node_crypto44.createHash)("sha256").update(image).digest("hex")
|
|
45877
45900
|
);
|
|
45878
|
-
|
|
45901
|
+
const baseKey = swiftSdkImageKey(
|
|
45879
45902
|
moduleRoot,
|
|
45880
45903
|
scopedLookups,
|
|
45881
45904
|
swiftSdkImageProducts(moduleRoot, imports2).products
|
|
45882
|
-
)
|
|
45905
|
+
);
|
|
45906
|
+
if (swiftSdkImageVariantKey(baseKey, required) !== key2)
|
|
45883
45907
|
throw new Error("Swift SDK image inputs changed during compilation");
|
|
45884
45908
|
for (const name3 of (0, import_node_fs73.readdirSync)(work))
|
|
45885
45909
|
if (!SWIFT_SDK_IMAGE_FILES.includes(name3))
|
|
@@ -46290,12 +46314,12 @@ function encodeNativeSdkLater(later) {
|
|
|
46290
46314
|
const view = new DataView(bytes.buffer);
|
|
46291
46315
|
view.setUint32(0, files2.length, true);
|
|
46292
46316
|
let at = 4;
|
|
46293
|
-
for (const { sha256:
|
|
46294
|
-
if (!/^[a-f0-9]{64}$/.test(
|
|
46317
|
+
for (const { sha256: sha2564, byteLength } of files2) {
|
|
46318
|
+
if (!/^[a-f0-9]{64}$/.test(sha2564))
|
|
46295
46319
|
throw new Error("Swift SDK later data needs a sha256 digest");
|
|
46296
46320
|
if (!byteLength) throw new Error("Swift SDK later data file is empty");
|
|
46297
46321
|
for (let i = 0; i < LATER_DIGEST_BYTES; i++)
|
|
46298
|
-
bytes[at + i] = Number.parseInt(
|
|
46322
|
+
bytes[at + i] = Number.parseInt(sha2564.slice(i * 2, i * 2 + 2), 16);
|
|
46299
46323
|
view.setUint32(at + LATER_DIGEST_BYTES, byteLength, true);
|
|
46300
46324
|
at += LATER_DIGEST_BYTES + 4;
|
|
46301
46325
|
}
|
|
@@ -46320,13 +46344,13 @@ function decodeNativeSdkLater(trailer) {
|
|
|
46320
46344
|
const files2 = [];
|
|
46321
46345
|
for (let file = 0; file < count; file++) {
|
|
46322
46346
|
if (at + LATER_DIGEST_BYTES + 4 > trailer.byteLength) throw truncated();
|
|
46323
|
-
const
|
|
46347
|
+
const sha2564 = Array.from(
|
|
46324
46348
|
trailer.subarray(at, at + LATER_DIGEST_BYTES),
|
|
46325
46349
|
(byte) => byte.toString(16).padStart(2, "0")
|
|
46326
46350
|
).join("");
|
|
46327
46351
|
const byteLength = view.getUint32(at + LATER_DIGEST_BYTES, true);
|
|
46328
46352
|
if (!byteLength) throw new Error("Swift SDK binding names empty later data");
|
|
46329
|
-
files2.push({ sha256:
|
|
46353
|
+
files2.push({ sha256: sha2564, byteLength });
|
|
46330
46354
|
at += LATER_DIGEST_BYTES + 4;
|
|
46331
46355
|
}
|
|
46332
46356
|
if (!files2.length || at + 4 > trailer.byteLength) throw truncated();
|
|
@@ -47513,8 +47537,8 @@ function createSwiftSdkBinding(linkage, sdk2, usage, projection) {
|
|
|
47513
47537
|
const binding = bindSwiftAppModule(linkage, sdk2);
|
|
47514
47538
|
const { data, liveSlots } = selectSwiftSdkData(sdk2, usage, linkage, projection);
|
|
47515
47539
|
const bytes = Buffer.concat([binding, data]);
|
|
47516
|
-
const
|
|
47517
|
-
return { bytes, sha256:
|
|
47540
|
+
const sha2564 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto45.createHash)("sha256").update(bytes).digest("hex");
|
|
47541
|
+
return { bytes, sha256: sha2564, liveSlots };
|
|
47518
47542
|
}
|
|
47519
47543
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
47520
47544
|
const map2 = readWasmLinkMap(mapFile, false);
|
|
@@ -49219,8 +49243,8 @@ function brotliCompressQ4(bytes, cacheKey) {
|
|
|
49219
49243
|
function brotliCompressQ6(bytes, cacheKey) {
|
|
49220
49244
|
return cachedBrotli(bytes, 6, cacheKey);
|
|
49221
49245
|
}
|
|
49222
|
-
function brotliCompressSwiftSdkBinding(bytes,
|
|
49223
|
-
return cachedBrotli(bytes, 5,
|
|
49246
|
+
function brotliCompressSwiftSdkBinding(bytes, sha2564) {
|
|
49247
|
+
return cachedBrotli(bytes, 5, sha2564);
|
|
49224
49248
|
}
|
|
49225
49249
|
async function memo(cache, key2, load2) {
|
|
49226
49250
|
const cached4 = cache.get(key2);
|
|
@@ -56028,7 +56052,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
56028
56052
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
56029
56053
|
MULTI_MANIFEST_VERSION = 76;
|
|
56030
56054
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
56031
|
-
compilerSourceDigest = true ? "
|
|
56055
|
+
compilerSourceDigest = true ? "3bdbb1d31ba7d202e612a91b60a3b588f9bc94a11990fb114585b3e2521857f5" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
56032
56056
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
56033
56057
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
56034
56058
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -73991,11 +74015,6 @@ end
|
|
|
73991
74015
|
});
|
|
73992
74016
|
|
|
73993
74017
|
// src/bazel-project.ts
|
|
73994
|
-
function sha256Hex5(bytes) {
|
|
73995
|
-
if (typeof Bun !== "undefined")
|
|
73996
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
73997
|
-
return (0, import_node_crypto54.createHash)("sha256").update(bytes).digest("hex");
|
|
73998
|
-
}
|
|
73999
74018
|
function isBazelPackage(input) {
|
|
74000
74019
|
return /^BUILD(?:\.bazel)?$/.test(import_node_path97.default.basename(input)) && import_node_fs94.default.statSync(input).isFile();
|
|
74001
74020
|
}
|
|
@@ -74025,7 +74044,7 @@ function bazelBinary(root) {
|
|
|
74025
74044
|
const expected = (0, import_node_child_process46.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
|
|
74026
74045
|
encoding: "utf8"
|
|
74027
74046
|
}).split(/\s/)[0];
|
|
74028
|
-
const actual = (
|
|
74047
|
+
const actual = sha256Hex2(import_node_fs94.default.readFileSync(partial));
|
|
74029
74048
|
if (actual !== expected) {
|
|
74030
74049
|
import_node_fs94.default.rmSync(partial, { force: true });
|
|
74031
74050
|
throw new Error(`${url} digest ${actual} differs from its release ${expected}`);
|
|
@@ -74750,8 +74769,8 @@ ${published4.map(
|
|
|
74750
74769
|
]
|
|
74751
74770
|
)
|
|
74752
74771
|
]);
|
|
74753
|
-
const digest3 =
|
|
74754
|
-
JSON.stringify([...contents2].map(([file, bytes]) => [file,
|
|
74772
|
+
const digest3 = sha256Hex2(
|
|
74773
|
+
JSON.stringify([...contents2].map(([file, bytes]) => [file, sha256Hex2(bytes)]))
|
|
74755
74774
|
);
|
|
74756
74775
|
const stamp = import_node_path97.default.join(bundle, ".peach-digest");
|
|
74757
74776
|
if (!import_node_fs94.default.existsSync(stamp) || import_node_fs94.default.readFileSync(stamp, "utf8") !== digest3) {
|
|
@@ -74923,6 +74942,7 @@ var init_bazel_project = __esm({
|
|
|
74923
74942
|
import_node_path97 = __toESM(require("node:path"), 1);
|
|
74924
74943
|
init_is_record();
|
|
74925
74944
|
init_plist();
|
|
74945
|
+
init_sha256();
|
|
74926
74946
|
LIBRARY_RULES = /* @__PURE__ */ new Set(["swift_library", "objc_library", "cc_library"]);
|
|
74927
74947
|
QUERIED_RULES = [
|
|
74928
74948
|
"swift_library",
|
|
@@ -75411,7 +75431,7 @@ var init_provenance = __esm({
|
|
|
75411
75431
|
import_node_crypto56 = require("node:crypto");
|
|
75412
75432
|
import_node_fs96 = require("node:fs");
|
|
75413
75433
|
import_node_path99 = require("node:path");
|
|
75414
|
-
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"
|
|
75434
|
+
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_path99.join)(__sootsim_import_meta_dirname, ".."));
|
|
75415
75435
|
}
|
|
75416
75436
|
});
|
|
75417
75437
|
|
|
@@ -76403,12 +76423,12 @@ function catalogDigest(directory2) {
|
|
|
76403
76423
|
const path168 = (0, import_node_path101.join)(dir, entry.name);
|
|
76404
76424
|
if (entry.isDirectory()) walk4(path168);
|
|
76405
76425
|
else if (entry.isFile() && (0, import_node_fs98.statSync)(path168).size <= 64 * 1024 * 1024)
|
|
76406
|
-
hashes.push([(0, import_node_path101.relative)(directory2, path168),
|
|
76426
|
+
hashes.push([(0, import_node_path101.relative)(directory2, path168), sha256Hex2((0, import_node_fs98.readFileSync)(path168))]);
|
|
76407
76427
|
else throw new Error(`Unsupported asset catalog entry: ${path168}`);
|
|
76408
76428
|
}
|
|
76409
76429
|
};
|
|
76410
76430
|
walk4(directory2);
|
|
76411
|
-
return
|
|
76431
|
+
return sha256Hex2(JSON.stringify(hashes));
|
|
76412
76432
|
}
|
|
76413
76433
|
function symbolSource(plan, root) {
|
|
76414
76434
|
const key2 = JSON.stringify([root, plan]);
|
|
@@ -76505,16 +76525,15 @@ function assetSymbolText(plan, root) {
|
|
|
76505
76525
|
if (source.status === "unknown") throw new Error(source.reason);
|
|
76506
76526
|
return source.text;
|
|
76507
76527
|
}
|
|
76508
|
-
var
|
|
76528
|
+
var import_node_fs98, import_node_path101, unprovenAssetSettings, assetSymbolSettingKeys, provenOtherAssetFlags, symbolTexts;
|
|
76509
76529
|
var init_xcode_assets = __esm({
|
|
76510
76530
|
"src/swift-coverage/xcode-assets.ts"() {
|
|
76511
76531
|
"use strict";
|
|
76512
|
-
import_node_crypto57 = require("node:crypto");
|
|
76513
76532
|
import_node_fs98 = require("node:fs");
|
|
76514
76533
|
import_node_path101 = require("node:path");
|
|
76534
|
+
init_sha256();
|
|
76515
76535
|
init_provenance();
|
|
76516
76536
|
init_xcode_asset_symbols();
|
|
76517
|
-
sha2562 = (bytes) => (0, import_node_crypto57.createHash)("sha256").update(bytes).digest("hex");
|
|
76518
76537
|
unprovenAssetSettings = [
|
|
76519
76538
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
76520
76539
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
@@ -77196,7 +77215,7 @@ function normalizedEnums(input) {
|
|
|
77196
77215
|
}
|
|
77197
77216
|
function localizationIdentifier(field, key2) {
|
|
77198
77217
|
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
77199
|
-
const digest3 = (0,
|
|
77218
|
+
const digest3 = (0, import_node_crypto57.createHash)("sha256").update(JSON.stringify([...field, key2])).digest();
|
|
77200
77219
|
return Array.from(
|
|
77201
77220
|
digest3.subarray(0, 6),
|
|
77202
77221
|
(byte) => alphabet[byte % alphabet.length]
|
|
@@ -77521,12 +77540,12 @@ function writeIntentDefinition(input, prefix) {
|
|
|
77521
77540
|
lines.push("</plist>", "");
|
|
77522
77541
|
return lines.join("\n");
|
|
77523
77542
|
}
|
|
77524
|
-
var import_strict4,
|
|
77543
|
+
var import_strict4, import_node_crypto57, typeMetadata, initializeMetadata, widgetArraySizes, defaultReasonMessages;
|
|
77525
77544
|
var init_metadata = __esm({
|
|
77526
77545
|
"src/intent-definition/metadata.ts"() {
|
|
77527
77546
|
"use strict";
|
|
77528
77547
|
import_strict4 = __toESM(require("node:assert/strict"), 1);
|
|
77529
|
-
|
|
77548
|
+
import_node_crypto57 = require("node:crypto");
|
|
77530
77549
|
init_fields();
|
|
77531
77550
|
init_hash_input();
|
|
77532
77551
|
init_siphash();
|
|
@@ -78235,7 +78254,7 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
78235
78254
|
if (prefix) identifier(prefix);
|
|
78236
78255
|
if (module2) identifier(module2);
|
|
78237
78256
|
const source = import_node_fs100.default.readFileSync(definition2);
|
|
78238
|
-
const key2 = (0,
|
|
78257
|
+
const key2 = (0, import_node_crypto58.createHash)("sha256").update(
|
|
78239
78258
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
78240
78259
|
).update("\0").update(source).digest("hex");
|
|
78241
78260
|
const cache = import_node_path103.default.join(derivedDirectory, "IntentDefinitions");
|
|
@@ -78275,11 +78294,11 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
78275
78294
|
import_node_fs100.default.rmSync(stage, { recursive: true, force: true });
|
|
78276
78295
|
}
|
|
78277
78296
|
}
|
|
78278
|
-
var
|
|
78297
|
+
var import_node_crypto58, import_node_fs100, import_node_path103, intentCompilerRevision;
|
|
78279
78298
|
var init_xcode_intents = __esm({
|
|
78280
78299
|
"src/xcode-intents.ts"() {
|
|
78281
78300
|
"use strict";
|
|
78282
|
-
|
|
78301
|
+
import_node_crypto58 = require("node:crypto");
|
|
78283
78302
|
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
78284
78303
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
78285
78304
|
init_fields();
|
|
@@ -78981,7 +79000,7 @@ function loadProject(xcodeproj) {
|
|
|
78981
79000
|
if (!projectFile)
|
|
78982
79001
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
78983
79002
|
const source = import_node_fs101.default.readFileSync(projectFile, "utf8");
|
|
78984
|
-
const digest3 = (0,
|
|
79003
|
+
const digest3 = (0, import_node_crypto59.createHash)("sha256").update(source).digest("hex");
|
|
78985
79004
|
const cached4 = loaded3.get(projectFile);
|
|
78986
79005
|
if (cached4?.digest === digest3) return cached4.project;
|
|
78987
79006
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -79033,7 +79052,7 @@ function xcodeInstallationIdentity() {
|
|
|
79033
79052
|
if (!selected) return null;
|
|
79034
79053
|
const directory2 = import_node_path105.default.extname(selected) === ".app" ? import_node_path105.default.join(selected, "Contents", "Developer") : selected;
|
|
79035
79054
|
const versionFile = `${directory2}/../version.plist`;
|
|
79036
|
-
const version2 = import_node_fs101.default.existsSync(versionFile) ? (0,
|
|
79055
|
+
const version2 = import_node_fs101.default.existsSync(versionFile) ? (0, import_node_crypto59.createHash)("sha256").update(import_node_fs101.default.readFileSync(versionFile)).digest("hex") : null;
|
|
79037
79056
|
return { directory: directory2, version: version2 };
|
|
79038
79057
|
}
|
|
79039
79058
|
function defaultConfiguration(project2) {
|
|
@@ -79517,7 +79536,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
79517
79536
|
);
|
|
79518
79537
|
});
|
|
79519
79538
|
}
|
|
79520
|
-
const signature2 = (0,
|
|
79539
|
+
const signature2 = (0, import_node_crypto59.createHash)("sha256").update(
|
|
79521
79540
|
JSON.stringify([phase, [...settingKeys].map((key3) => [key3, settings(key3)])])
|
|
79522
79541
|
);
|
|
79523
79542
|
for (const file of inputFiles) {
|
|
@@ -79672,7 +79691,7 @@ ${output}`
|
|
|
79672
79691
|
const inputs2 = JSON.stringify([
|
|
79673
79692
|
1,
|
|
79674
79693
|
args,
|
|
79675
|
-
(0,
|
|
79694
|
+
(0, import_node_crypto59.createHash)("sha256").update(import_node_fs101.default.readFileSync(file)).digest("hex")
|
|
79676
79695
|
]);
|
|
79677
79696
|
const developer = settings("DEVELOPER_DIR");
|
|
79678
79697
|
const cached4 = import_node_fs101.default.existsSync(output) && import_node_fs101.default.existsSync(stamp) ? import_node_fs101.default.readFileSync(stamp, "utf8").split("\n") : [];
|
|
@@ -81222,12 +81241,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
81222
81241
|
cocoapods
|
|
81223
81242
|
};
|
|
81224
81243
|
}
|
|
81225
|
-
var import_node_child_process47,
|
|
81244
|
+
var import_node_child_process47, import_node_crypto59, import_node_fs101, import_node_module9, import_node_path105, 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, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
81226
81245
|
var init_xcode_project = __esm({
|
|
81227
81246
|
"src/xcode-project.ts"() {
|
|
81228
81247
|
"use strict";
|
|
81229
81248
|
import_node_child_process47 = require("node:child_process");
|
|
81230
|
-
|
|
81249
|
+
import_node_crypto59 = require("node:crypto");
|
|
81231
81250
|
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
81232
81251
|
import_node_module9 = require("node:module");
|
|
81233
81252
|
import_node_path105 = __toESM(require("node:path"), 1);
|
|
@@ -81436,8 +81455,8 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
81436
81455
|
);
|
|
81437
81456
|
const appRelative = import_node_path106.default.relative(root, app);
|
|
81438
81457
|
const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
|
|
81439
|
-
const hash = (0,
|
|
81440
|
-
const native = (0,
|
|
81458
|
+
const hash = (0, import_node_crypto60.createHash)("sha256");
|
|
81459
|
+
const native = (0, import_node_crypto60.createHash)("sha256");
|
|
81441
81460
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
81442
81461
|
const versionFree = new Set(
|
|
81443
81462
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
@@ -81521,7 +81540,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
81521
81540
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
81522
81541
|
const bytes = await import_node_fs102.default.promises.readFile(file);
|
|
81523
81542
|
content.size = bytes.length;
|
|
81524
|
-
content.digest = (0,
|
|
81543
|
+
content.digest = (0, import_node_crypto60.createHash)("sha256").update(bytes).digest("hex");
|
|
81525
81544
|
fileDigests.set(file, content);
|
|
81526
81545
|
})
|
|
81527
81546
|
);
|
|
@@ -82074,10 +82093,10 @@ function stageCachedQuickCryptoOpenSsl(app) {
|
|
|
82074
82093
|
const opensslDir = import_node_path106.default.join(packageDir, "ios", "openssl");
|
|
82075
82094
|
if (import_node_fs102.default.existsSync(import_node_path106.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
|
|
82076
82095
|
const podspec = import_node_fs102.default.readFileSync(import_node_path106.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
|
|
82077
|
-
const
|
|
82078
|
-
if (!
|
|
82079
|
-
const archive = import_node_path106.default.join(cacheDir(), "pod-archives", `${
|
|
82080
|
-
if (!import_node_fs102.default.existsSync(archive) || (0,
|
|
82096
|
+
const sha2564 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
82097
|
+
if (!sha2564) return;
|
|
82098
|
+
const archive = import_node_path106.default.join(cacheDir(), "pod-archives", `${sha2564}.zip`);
|
|
82099
|
+
if (!import_node_fs102.default.existsSync(archive) || (0, import_node_crypto60.createHash)("sha256").update(import_node_fs102.default.readFileSync(archive)).digest("hex") !== sha2564)
|
|
82081
82100
|
return;
|
|
82082
82101
|
import_node_fs102.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
82083
82102
|
import_node_fs102.default.mkdirSync(opensslDir, { recursive: true });
|
|
@@ -82115,12 +82134,12 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
82115
82134
|
});
|
|
82116
82135
|
});
|
|
82117
82136
|
}
|
|
82118
|
-
var import_node_child_process48,
|
|
82137
|
+
var import_node_child_process48, import_node_crypto60, import_node_fs102, import_node_module10, import_node_os22, import_node_path106, 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;
|
|
82119
82138
|
var init_expo_native_workspace = __esm({
|
|
82120
82139
|
"src/expo-native-workspace.ts"() {
|
|
82121
82140
|
"use strict";
|
|
82122
82141
|
import_node_child_process48 = require("node:child_process");
|
|
82123
|
-
|
|
82142
|
+
import_node_crypto60 = require("node:crypto");
|
|
82124
82143
|
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
82125
82144
|
import_node_module10 = require("node:module");
|
|
82126
82145
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
@@ -82194,7 +82213,7 @@ function run() {
|
|
|
82194
82213
|
|
|
82195
82214
|
// src/expo-discovery-cache.ts
|
|
82196
82215
|
function peachPin() {
|
|
82197
|
-
return (0,
|
|
82216
|
+
return (0, import_node_crypto61.createHash)("sha256").update(
|
|
82198
82217
|
`${FORMAT}\0${expoNativeCompilerDigestValue()}\0${swiftNativePin().distribution.id}\0`
|
|
82199
82218
|
).update(JSON.stringify([...EXPO_EAGER_NATIVE_VIEWS])).update(JSON.stringify([...peachAnsweredNativePackages()].sort())).digest("hex");
|
|
82200
82219
|
}
|
|
@@ -82208,7 +82227,7 @@ function stable(value) {
|
|
|
82208
82227
|
}
|
|
82209
82228
|
async function expoDiscoveryKey(options2) {
|
|
82210
82229
|
const { root, hash } = await hashExpoWorkspace(options2.appRoot, options2.signal);
|
|
82211
|
-
const key2 = (0,
|
|
82230
|
+
const key2 = (0, import_node_crypto61.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");
|
|
82212
82231
|
return { key: key2, root };
|
|
82213
82232
|
}
|
|
82214
82233
|
function expoDiscoveryCacheDir() {
|
|
@@ -82279,7 +82298,7 @@ function readExpoDiscovery(key2) {
|
|
|
82279
82298
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
82280
82299
|
const archive = import_node_path107.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
82281
82300
|
const bytes = import_node_fs103.default.readFileSync(archive);
|
|
82282
|
-
if ((0,
|
|
82301
|
+
if ((0, import_node_crypto61.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
82283
82302
|
return void 0;
|
|
82284
82303
|
const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
|
|
82285
82304
|
const decoded = /* @__PURE__ */ new Map();
|
|
@@ -82353,7 +82372,7 @@ function stampedFileHash(file) {
|
|
|
82353
82372
|
const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
|
|
82354
82373
|
const cached4 = fileHashes.get(file);
|
|
82355
82374
|
if (cached4?.stamp === stamp) return cached4.checksum;
|
|
82356
|
-
const checksum = (0,
|
|
82375
|
+
const checksum = (0, import_node_crypto61.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex");
|
|
82357
82376
|
fileHashes.set(file, { stamp, checksum });
|
|
82358
82377
|
fileHashesChanged = true;
|
|
82359
82378
|
return checksum;
|
|
@@ -82362,7 +82381,7 @@ function saveFileHashes() {
|
|
|
82362
82381
|
if (!fileHashesChanged) return;
|
|
82363
82382
|
fileHashesChanged = false;
|
|
82364
82383
|
const target = fileHashesPath();
|
|
82365
|
-
const temporary = `${target}.${process.pid}.${(0,
|
|
82384
|
+
const temporary = `${target}.${process.pid}.${(0, import_node_crypto61.randomUUID)()}.tmp`;
|
|
82366
82385
|
try {
|
|
82367
82386
|
import_node_fs103.default.mkdirSync(import_node_path107.default.dirname(target), { recursive: true });
|
|
82368
82387
|
import_node_fs103.default.writeFileSync(
|
|
@@ -82417,7 +82436,7 @@ function frameworkDigest(directory2, signal) {
|
|
|
82417
82436
|
if (target !== root && !target.startsWith(`${root}${import_node_path107.default.sep}`))
|
|
82418
82437
|
throw new Error(`framework link escapes its tree: ${relative7}`);
|
|
82419
82438
|
}
|
|
82420
|
-
return (0,
|
|
82439
|
+
return (0, import_node_crypto61.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
82421
82440
|
}
|
|
82422
82441
|
function rewritePreparedPaths(options2) {
|
|
82423
82442
|
const { units, sourceRoot, preparedRoot, signal } = options2;
|
|
@@ -82438,7 +82457,7 @@ function rewritePreparedPaths(options2) {
|
|
|
82438
82457
|
return null;
|
|
82439
82458
|
}
|
|
82440
82459
|
if (!preparedBytes.equals(sourceBytes)) return null;
|
|
82441
|
-
dependencies[sourceFile] = (0,
|
|
82460
|
+
dependencies[sourceFile] = (0, import_node_crypto61.createHash)("sha256").update(sourceBytes).digest("hex");
|
|
82442
82461
|
verifiedFiles.set(preparedFile, sourceFile);
|
|
82443
82462
|
return sourceFile;
|
|
82444
82463
|
};
|
|
@@ -82515,7 +82534,7 @@ function rewritePreparedPaths(options2) {
|
|
|
82515
82534
|
portableDir = import_node_path107.default.join(parent, import_node_path107.default.basename(dir));
|
|
82516
82535
|
if (!import_node_fs103.default.existsSync(portableDir)) {
|
|
82517
82536
|
import_node_fs103.default.mkdirSync(parent, { recursive: true });
|
|
82518
|
-
const tmp = import_node_path107.default.join(parent, `.${process.pid}.${(0,
|
|
82537
|
+
const tmp = import_node_path107.default.join(parent, `.${process.pid}.${(0, import_node_crypto61.randomUUID)()}.tmp`);
|
|
82519
82538
|
try {
|
|
82520
82539
|
import_node_fs103.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
82521
82540
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
@@ -82544,7 +82563,7 @@ function writeExpoDiscovery(options2) {
|
|
|
82544
82563
|
try {
|
|
82545
82564
|
const dir = expoDiscoveryCacheDir();
|
|
82546
82565
|
import_node_fs103.default.mkdirSync(dir, { recursive: true });
|
|
82547
|
-
const tmp = import_node_path107.default.join(dir, `.${options2.key}.${process.pid}.${(0,
|
|
82566
|
+
const tmp = import_node_path107.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto61.randomUUID)()}.tmp`);
|
|
82548
82567
|
if (options2.units === null) {
|
|
82549
82568
|
import_node_fs103.default.writeFileSync(
|
|
82550
82569
|
tmp,
|
|
@@ -82607,8 +82626,8 @@ function writeExpoDiscovery(options2) {
|
|
|
82607
82626
|
}
|
|
82608
82627
|
);
|
|
82609
82628
|
const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
82610
|
-
const archive = (0,
|
|
82611
|
-
const temporary = import_node_path107.default.join(blobDir, "." + (0,
|
|
82629
|
+
const archive = (0, import_node_crypto61.createHash)("sha256").update(contents2).digest("hex");
|
|
82630
|
+
const temporary = import_node_path107.default.join(blobDir, "." + (0, import_node_crypto61.randomUUID)() + ".tmp");
|
|
82612
82631
|
try {
|
|
82613
82632
|
import_node_fs103.default.writeFileSync(temporary, contents2);
|
|
82614
82633
|
import_node_fs103.default.renameSync(temporary, import_node_path107.default.join(blobDir, `${archive}.zst`));
|
|
@@ -82635,11 +82654,11 @@ function writeExpoDiscovery(options2) {
|
|
|
82635
82654
|
return error instanceof Error ? error.message : String(error);
|
|
82636
82655
|
}
|
|
82637
82656
|
}
|
|
82638
|
-
var
|
|
82657
|
+
var import_node_crypto61, import_node_fs103, import_node_path107, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings3, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
|
|
82639
82658
|
var init_expo_discovery_cache = __esm({
|
|
82640
82659
|
"src/expo-discovery-cache.ts"() {
|
|
82641
82660
|
"use strict";
|
|
82642
|
-
|
|
82661
|
+
import_node_crypto61 = require("node:crypto");
|
|
82643
82662
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
82644
82663
|
import_node_path107 = __toESM(require("node:path"), 1);
|
|
82645
82664
|
import_node_zlib7 = require("node:zlib");
|
|
@@ -83074,7 +83093,7 @@ function hashPackageTree(root, options2) {
|
|
|
83074
83093
|
}
|
|
83075
83094
|
};
|
|
83076
83095
|
walk4(root, "");
|
|
83077
|
-
const hash = (0,
|
|
83096
|
+
const hash = (0, import_node_crypto62.createHash)("sha256");
|
|
83078
83097
|
return (async () => {
|
|
83079
83098
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
83080
83099
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
@@ -83095,11 +83114,11 @@ function nativePackageTreeDigest(root) {
|
|
|
83095
83114
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
83096
83115
|
});
|
|
83097
83116
|
}
|
|
83098
|
-
var
|
|
83117
|
+
var import_node_crypto62, import_node_fs106, import_promises13, import_node_path110, READ_AHEAD;
|
|
83099
83118
|
var init_package_tree_digest = __esm({
|
|
83100
83119
|
"src/package-tree-digest.ts"() {
|
|
83101
83120
|
"use strict";
|
|
83102
|
-
|
|
83121
|
+
import_node_crypto62 = require("node:crypto");
|
|
83103
83122
|
import_node_fs106 = require("node:fs");
|
|
83104
83123
|
import_promises13 = require("node:fs/promises");
|
|
83105
83124
|
import_node_path110 = require("node:path");
|
|
@@ -83179,7 +83198,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
83179
83198
|
"swift-pin": JSON.stringify(swiftNativePin()),
|
|
83180
83199
|
answered: JSON.stringify([...peachAnsweredNativePackages()].sort()),
|
|
83181
83200
|
"pods-environment": JSON.stringify(reactNativePodsEnvironment()),
|
|
83182
|
-
fingerprint: (0,
|
|
83201
|
+
fingerprint: (0, import_node_crypto63.createHash)("sha256").update(lines.sort().join("\n")).digest("hex")
|
|
83183
83202
|
},
|
|
83184
83203
|
packages
|
|
83185
83204
|
};
|
|
@@ -83297,7 +83316,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
|
83297
83316
|
}
|
|
83298
83317
|
function servedExpoSwift(appRoot, entry, app) {
|
|
83299
83318
|
if (!entry.expoSwift) return null;
|
|
83300
|
-
const rootId = `${(0,
|
|
83319
|
+
const rootId = `${(0, import_node_crypto63.createHash)("sha256").update(import_node_fs107.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
83301
83320
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
83302
83321
|
const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
83303
83322
|
const infoPlist2 = Buffer.from(installed2).toString("base64");
|
|
@@ -83325,11 +83344,11 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
83325
83344
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
83326
83345
|
);
|
|
83327
83346
|
}
|
|
83328
|
-
var
|
|
83347
|
+
var import_node_crypto63, import_node_fs107, import_node_module13, import_node_path111, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
|
|
83329
83348
|
var init_expo_native_prebuilt = __esm({
|
|
83330
83349
|
"src/expo-native-prebuilt.ts"() {
|
|
83331
83350
|
"use strict";
|
|
83332
|
-
|
|
83351
|
+
import_node_crypto63 = require("node:crypto");
|
|
83333
83352
|
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
83334
83353
|
import_node_module13 = require("node:module");
|
|
83335
83354
|
import_node_path111 = __toESM(require("node:path"), 1);
|
|
@@ -83381,7 +83400,7 @@ function watchNativeInputs(root) {
|
|
|
83381
83400
|
(0, import_node_timers2.clearTimeout)(expiry);
|
|
83382
83401
|
for (const watcher of watchers) watcher.close();
|
|
83383
83402
|
}
|
|
83384
|
-
const inputs2 = { expiry, revision: (0,
|
|
83403
|
+
const inputs2 = { expiry, revision: (0, import_node_crypto64.randomUUID)() };
|
|
83385
83404
|
const watch3 = (directory2, recursive, name3) => {
|
|
83386
83405
|
const watcher = import_node_fs108.default.watch(
|
|
83387
83406
|
directory2,
|
|
@@ -83426,11 +83445,11 @@ function nativeInputRevision(root) {
|
|
|
83426
83445
|
const inputs2 = watchNativeInputs(root);
|
|
83427
83446
|
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
83428
83447
|
}
|
|
83429
|
-
var
|
|
83448
|
+
var import_node_crypto64, import_node_fs108, import_node_path112, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
83430
83449
|
var init_native_preparation = __esm({
|
|
83431
83450
|
"src/native-preparation.ts"() {
|
|
83432
83451
|
"use strict";
|
|
83433
|
-
|
|
83452
|
+
import_node_crypto64 = require("node:crypto");
|
|
83434
83453
|
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
83435
83454
|
import_node_path112 = __toESM(require("node:path"), 1);
|
|
83436
83455
|
import_node_timers2 = require("node:timers");
|
|
@@ -83529,7 +83548,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
|
|
|
83529
83548
|
return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
|
|
83530
83549
|
}
|
|
83531
83550
|
function nativeStaticLibraryRecipe(bytes) {
|
|
83532
|
-
const digest3 = (0,
|
|
83551
|
+
const digest3 = (0, import_node_crypto65.createHash)("sha256").update(bytes).digest("hex");
|
|
83533
83552
|
return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
|
|
83534
83553
|
}
|
|
83535
83554
|
function nativeStaticLibrary(file, recipe2, moduleRoot) {
|
|
@@ -83572,7 +83591,7 @@ function isRustSymbol(name3, demangled) {
|
|
|
83572
83591
|
function rustStaticLibrary(file, moduleRoot) {
|
|
83573
83592
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
83574
83593
|
const bytes = import_node_fs109.default.readFileSync(file);
|
|
83575
|
-
const key2 = (0,
|
|
83594
|
+
const key2 = (0, import_node_crypto65.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
|
|
83576
83595
|
const directory2 = import_node_path113.default.join(cacheDir(), "native-archives", key2);
|
|
83577
83596
|
const archive = import_node_path113.default.join(directory2, "library.a");
|
|
83578
83597
|
if (import_node_fs109.default.existsSync(archive)) return archive;
|
|
@@ -83601,7 +83620,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
83601
83620
|
const members2 = readArMembers(bytes, true);
|
|
83602
83621
|
const seen = /* @__PURE__ */ new Set();
|
|
83603
83622
|
const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
|
|
83604
|
-
const identity2 = name3 + "\0" + (0,
|
|
83623
|
+
const identity2 = name3 + "\0" + (0, import_node_crypto65.createHash)("sha256").update(bytes2).digest("hex");
|
|
83605
83624
|
if (seen.has(identity2)) return false;
|
|
83606
83625
|
seen.add(identity2);
|
|
83607
83626
|
return true;
|
|
@@ -83648,14 +83667,14 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
83648
83667
|
function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
83649
83668
|
if (files2.length === 1) return files2[0];
|
|
83650
83669
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
83651
|
-
const hash = (0,
|
|
83670
|
+
const hash = (0, import_node_crypto65.createHash)("sha256").update(toolchain.release);
|
|
83652
83671
|
for (const file of files2)
|
|
83653
83672
|
hash.update("\0").update(import_node_path113.default.basename(file)).update("\0").update(import_node_fs109.default.readFileSync(file));
|
|
83654
83673
|
const directory2 = import_node_path113.default.join(cacheDir(), "native-archives", hash.digest("hex"));
|
|
83655
83674
|
const archive = import_node_path113.default.join(directory2, "combined.a");
|
|
83656
83675
|
if (import_node_fs109.default.existsSync(archive)) return archive;
|
|
83657
83676
|
import_node_fs109.default.mkdirSync(directory2, { recursive: true });
|
|
83658
|
-
const temporary = import_node_path113.default.join(directory2, `combined-${(0,
|
|
83677
|
+
const temporary = import_node_path113.default.join(directory2, `combined-${(0, import_node_crypto65.randomUUID)()}.a`);
|
|
83659
83678
|
try {
|
|
83660
83679
|
(0, import_node_child_process50.execFileSync)(import_node_path113.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
83661
83680
|
"qcsDL",
|
|
@@ -83668,12 +83687,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
83668
83687
|
}
|
|
83669
83688
|
return archive;
|
|
83670
83689
|
}
|
|
83671
|
-
var import_node_child_process50,
|
|
83690
|
+
var import_node_child_process50, import_node_crypto65, import_node_fs109, import_node_path113, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
83672
83691
|
var init_native_static_libraries = __esm({
|
|
83673
83692
|
"src/native-static-libraries.ts"() {
|
|
83674
83693
|
"use strict";
|
|
83675
83694
|
import_node_child_process50 = require("node:child_process");
|
|
83676
|
-
|
|
83695
|
+
import_node_crypto65 = require("node:crypto");
|
|
83677
83696
|
import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
83678
83697
|
import_node_path113 = __toESM(require("node:path"), 1);
|
|
83679
83698
|
init_home_paths();
|
|
@@ -84285,13 +84304,13 @@ var init_swift_wasm64_wamr = __esm({
|
|
|
84285
84304
|
|
|
84286
84305
|
// src/swift-wasm64-native-source.ts
|
|
84287
84306
|
function deriveSource(file, bytes, backport) {
|
|
84288
|
-
if (!backport || (0,
|
|
84307
|
+
if (!backport || (0, import_node_crypto66.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256)
|
|
84289
84308
|
return null;
|
|
84290
84309
|
const source = bytes.toString("utf8");
|
|
84291
84310
|
const derived = Buffer.from(
|
|
84292
84311
|
"rewrite" in backport ? backport.rewrite(source) : source.replace(backport.before, backport.after)
|
|
84293
84312
|
);
|
|
84294
|
-
if ((0,
|
|
84313
|
+
if ((0, import_node_crypto66.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
|
|
84295
84314
|
throw new Error(`Native source derivation differs: ${file}`);
|
|
84296
84315
|
return {
|
|
84297
84316
|
bytes: derived,
|
|
@@ -84310,11 +84329,11 @@ function deriveWasm64NativeSource(file, bytes) {
|
|
|
84310
84329
|
sourceDerivations.get(name3) ?? headerDerivations.get(name3)
|
|
84311
84330
|
);
|
|
84312
84331
|
}
|
|
84313
|
-
var
|
|
84332
|
+
var import_node_crypto66, import_node_path115, webrtcUnknownArchitecture, boringsslWordSize2, wamrCommit, headerDerivations, sourceDerivations;
|
|
84314
84333
|
var init_swift_wasm64_native_source = __esm({
|
|
84315
84334
|
"src/swift-wasm64-native-source.ts"() {
|
|
84316
84335
|
"use strict";
|
|
84317
|
-
|
|
84336
|
+
import_node_crypto66 = require("node:crypto");
|
|
84318
84337
|
import_node_path115 = __toESM(require("node:path"), 1);
|
|
84319
84338
|
init_swift_wasm64_wamr();
|
|
84320
84339
|
init_swiftWasm64ConfigContract();
|
|
@@ -84774,7 +84793,7 @@ var init_genrule_library_builds = __esm({
|
|
|
84774
84793
|
function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
84775
84794
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
84776
84795
|
const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
84777
|
-
const identity2 = (0,
|
|
84796
|
+
const identity2 = (0, import_node_crypto67.createHash)("sha256").update(
|
|
84778
84797
|
JSON.stringify([
|
|
84779
84798
|
distribution?.id,
|
|
84780
84799
|
distribution?.link,
|
|
@@ -84800,7 +84819,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
84800
84819
|
for (const alias of product.frameworkAliases) {
|
|
84801
84820
|
if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
|
|
84802
84821
|
throw new Error(`framework SDK identity differs for ${alias.name}`);
|
|
84803
|
-
if ((0,
|
|
84822
|
+
if ((0, import_node_crypto67.createHash)("sha256").update(import_node_fs112.default.readFileSync(import_node_path117.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
84804
84823
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
84805
84824
|
const selected = /* @__PURE__ */ new Set();
|
|
84806
84825
|
const reach = (name3) => {
|
|
@@ -84841,7 +84860,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
84841
84860
|
for (const alias of owner.frameworkAliases) {
|
|
84842
84861
|
if (frameworkResponses[alias.name])
|
|
84843
84862
|
throw new Error(`ambiguous declared framework ${alias.name}`);
|
|
84844
|
-
if ((0,
|
|
84863
|
+
if ((0, import_node_crypto67.createHash)("sha256").update(import_node_fs112.default.readFileSync(import_node_path117.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
84845
84864
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
84846
84865
|
const file = import_node_path117.default.join(root, `${alias.name}.rsp`);
|
|
84847
84866
|
import_node_fs112.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
|
|
@@ -84935,11 +84954,11 @@ exec ${shellQuote2(configuration2.compiler)} "$@"
|
|
|
84935
84954
|
};
|
|
84936
84955
|
return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
|
|
84937
84956
|
}
|
|
84938
|
-
var
|
|
84957
|
+
var import_node_crypto67, import_node_fs112, import_node_path117, v7;
|
|
84939
84958
|
var init_native_framework_compiler = __esm({
|
|
84940
84959
|
"src/native-framework-compiler.ts"() {
|
|
84941
84960
|
"use strict";
|
|
84942
|
-
|
|
84961
|
+
import_node_crypto67 = require("node:crypto");
|
|
84943
84962
|
import_node_fs112 = __toESM(require("node:fs"), 1);
|
|
84944
84963
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
84945
84964
|
v7 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -84960,7 +84979,7 @@ function processAlive(pid) {
|
|
|
84960
84979
|
}
|
|
84961
84980
|
function tryAcquireNumberedLock(directory2, detail = "") {
|
|
84962
84981
|
(0, import_node_fs113.mkdirSync)(directory2, { recursive: true });
|
|
84963
|
-
const claim = (0, import_node_path118.join)(directory2, `claim-${process.pid}-${(0,
|
|
84982
|
+
const claim = (0, import_node_path118.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto68.randomUUID)()}`);
|
|
84964
84983
|
for (; ; ) {
|
|
84965
84984
|
const numbers = (0, import_node_fs113.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
|
|
84966
84985
|
const top = Math.max(-1, ...numbers);
|
|
@@ -84999,11 +85018,11 @@ ${detail}` : ""}`);
|
|
|
84999
85018
|
};
|
|
85000
85019
|
}
|
|
85001
85020
|
}
|
|
85002
|
-
var
|
|
85021
|
+
var import_node_crypto68, import_node_fs113, import_node_path118, errorCode2;
|
|
85003
85022
|
var init_numbered_lock = __esm({
|
|
85004
85023
|
"src/numbered-lock.ts"() {
|
|
85005
85024
|
"use strict";
|
|
85006
|
-
|
|
85025
|
+
import_node_crypto68 = require("node:crypto");
|
|
85007
85026
|
import_node_fs113 = require("node:fs");
|
|
85008
85027
|
import_node_path118 = require("node:path");
|
|
85009
85028
|
errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
|
|
@@ -85030,7 +85049,7 @@ function llvmIdentity(toolchainBin, release) {
|
|
|
85030
85049
|
] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
|
|
85031
85050
|
(name3) => swiftFileChecksum(import_node_path119.default.join(toolchainBin, name3))
|
|
85032
85051
|
);
|
|
85033
|
-
const identity2 = (0,
|
|
85052
|
+
const identity2 = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
|
|
85034
85053
|
toolIdentities.set(toolchainBin, identity2);
|
|
85035
85054
|
return identity2;
|
|
85036
85055
|
}
|
|
@@ -85038,7 +85057,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
|
|
|
85038
85057
|
const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
|
|
85039
85058
|
const cached4 = sysrootIdentities.get(key2);
|
|
85040
85059
|
if (cached4) return cached4;
|
|
85041
|
-
const hash = (0,
|
|
85060
|
+
const hash = (0, import_node_crypto69.createHash)("sha256");
|
|
85042
85061
|
const add = (root, relative7) => {
|
|
85043
85062
|
const file = import_node_path119.default.join(root, relative7);
|
|
85044
85063
|
const stat2 = import_node_fs114.default.statSync(file, { throwIfNoEntry: false });
|
|
@@ -85073,7 +85092,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
85073
85092
|
import_node_fs114.default.readFileSync(import_node_path119.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
85074
85093
|
)
|
|
85075
85094
|
);
|
|
85076
|
-
const hash = (0,
|
|
85095
|
+
const hash = (0, import_node_crypto69.createHash)("sha256").update(
|
|
85077
85096
|
JSON.stringify([
|
|
85078
85097
|
headers,
|
|
85079
85098
|
distribution.link,
|
|
@@ -85083,7 +85102,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
85083
85102
|
])
|
|
85084
85103
|
);
|
|
85085
85104
|
const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
|
|
85086
|
-
const objectKey = (0,
|
|
85105
|
+
const objectKey = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
|
|
85087
85106
|
const cache = import_node_path119.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
|
|
85088
85107
|
if (!import_node_fs114.default.existsSync(cache)) {
|
|
85089
85108
|
import_node_fs114.default.mkdirSync(import_node_path119.default.dirname(cache), { recursive: true });
|
|
@@ -85118,7 +85137,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
85118
85137
|
const digest3 = import_node_path119.default.join(temporary, "digest");
|
|
85119
85138
|
import_node_fs114.default.writeFileSync(
|
|
85120
85139
|
digest3,
|
|
85121
|
-
(0,
|
|
85140
|
+
(0, import_node_crypto69.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
|
|
85122
85141
|
);
|
|
85123
85142
|
import_node_fs114.default.renameSync(digest3, cache);
|
|
85124
85143
|
} finally {
|
|
@@ -85173,7 +85192,7 @@ function buildable(declaration) {
|
|
|
85173
85192
|
return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
|
|
85174
85193
|
}
|
|
85175
85194
|
function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
|
|
85176
|
-
const hash = (0,
|
|
85195
|
+
const hash = (0, import_node_crypto69.createHash)("sha256");
|
|
85177
85196
|
const files2 = declaration.sources.filter(
|
|
85178
85197
|
(source) => !source.generator && !source.file.split(import_node_path119.default.sep).includes(".git")
|
|
85179
85198
|
).map((source) => import_node_path119.default.relative(declaration.packageDir, source.file));
|
|
@@ -85307,12 +85326,12 @@ function genruleArchive(declaration, library, moduleRoot) {
|
|
|
85307
85326
|
}
|
|
85308
85327
|
return combined;
|
|
85309
85328
|
}
|
|
85310
|
-
var import_node_child_process53,
|
|
85329
|
+
var import_node_child_process53, import_node_crypto69, import_node_fs114, import_node_os24, import_node_path119, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
|
|
85311
85330
|
var init_genrule_archives = __esm({
|
|
85312
85331
|
"src/genrule-archives.ts"() {
|
|
85313
85332
|
"use strict";
|
|
85314
85333
|
import_node_child_process53 = require("node:child_process");
|
|
85315
|
-
|
|
85334
|
+
import_node_crypto69 = require("node:crypto");
|
|
85316
85335
|
import_node_fs114 = __toESM(require("node:fs"), 1);
|
|
85317
85336
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
85318
85337
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
@@ -85420,7 +85439,7 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
85420
85439
|
function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
|
|
85421
85440
|
if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
|
|
85422
85441
|
const native = simulatorNativeLibrary(artifact());
|
|
85423
|
-
if (!native || (0,
|
|
85442
|
+
if (!native || (0, import_node_crypto70.createHash)("sha256").update(import_node_fs115.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
|
|
85424
85443
|
return standin;
|
|
85425
85444
|
if (configured)
|
|
85426
85445
|
throw new Error(
|
|
@@ -85478,12 +85497,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
85478
85497
|
}
|
|
85479
85498
|
};
|
|
85480
85499
|
}
|
|
85481
|
-
var import_node_child_process54,
|
|
85500
|
+
var import_node_child_process54, import_node_crypto70, import_node_fs115, import_node_os25, import_node_path120, SENTRY_SWIFT_SLICE;
|
|
85482
85501
|
var init_native_swift_slices = __esm({
|
|
85483
85502
|
"src/native-swift-slices.ts"() {
|
|
85484
85503
|
"use strict";
|
|
85485
85504
|
import_node_child_process54 = require("node:child_process");
|
|
85486
|
-
|
|
85505
|
+
import_node_crypto70 = require("node:crypto");
|
|
85487
85506
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
85488
85507
|
import_node_os25 = __toESM(require("node:os"), 1);
|
|
85489
85508
|
import_node_path120 = __toESM(require("node:path"), 1);
|
|
@@ -86291,7 +86310,7 @@ function treeDigest2(root) {
|
|
|
86291
86310
|
}).join("\n");
|
|
86292
86311
|
const memo2 = digests.get(`tree\0${root}`);
|
|
86293
86312
|
if (memo2?.stamp === stamp) return memo2.digest;
|
|
86294
|
-
const hash = (0,
|
|
86313
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
86295
86314
|
for (const name3 of names) {
|
|
86296
86315
|
hash.update(`${name3}\0`);
|
|
86297
86316
|
hash.update(import_node_fs119.default.readFileSync(import_node_path123.default.join(root, name3)));
|
|
@@ -86338,7 +86357,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
86338
86357
|
const found4 = locateXcframework(import_node_path123.default.join(dir, "tree"));
|
|
86339
86358
|
if (found4) return { dir: found4, digest: stored.sha };
|
|
86340
86359
|
}
|
|
86341
|
-
const sha2 = (0,
|
|
86360
|
+
const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(binary2.dir)).digest("hex");
|
|
86342
86361
|
if (sha2 !== stored?.sha || !locateXcframework(import_node_path123.default.join(dir, "tree"))) {
|
|
86343
86362
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
86344
86363
|
import_node_fs119.default.mkdirSync(import_node_path123.default.join(dir, "tree"), { recursive: true });
|
|
@@ -86350,7 +86369,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
86350
86369
|
return { dir: found3, digest: sha2 };
|
|
86351
86370
|
}
|
|
86352
86371
|
if (stored && import_node_fs119.default.existsSync(archive)) {
|
|
86353
|
-
const sha2 = (0,
|
|
86372
|
+
const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
86354
86373
|
if (sha2 !== expected)
|
|
86355
86374
|
throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
|
|
86356
86375
|
const found3 = locateXcframework(import_node_path123.default.join(dir, "tree"));
|
|
@@ -86359,7 +86378,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
86359
86378
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
86360
86379
|
import_node_fs119.default.mkdirSync(import_node_path123.default.join(dir, "tree"), { recursive: true });
|
|
86361
86380
|
exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
|
|
86362
|
-
const sha = (0,
|
|
86381
|
+
const sha = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
86363
86382
|
if (sha !== expected) {
|
|
86364
86383
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
86365
86384
|
throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
|
|
@@ -86484,7 +86503,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
86484
86503
|
});
|
|
86485
86504
|
}
|
|
86486
86505
|
}
|
|
86487
|
-
const declaredDigest = (0,
|
|
86506
|
+
const declaredDigest = (0, import_node_crypto71.createHash)("sha256");
|
|
86488
86507
|
for (const framework of providedFrameworks)
|
|
86489
86508
|
declaredDigest.update(`provided/${import_node_path123.default.relative(artifact.dir, framework)}\0`);
|
|
86490
86509
|
for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
|
|
@@ -86554,7 +86573,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
86554
86573
|
import_node_fs119.default.copyFileSync(surface.modulemap, modulemap);
|
|
86555
86574
|
}
|
|
86556
86575
|
}
|
|
86557
|
-
const contents2 = (0,
|
|
86576
|
+
const contents2 = (0, import_node_crypto71.createHash)("sha256");
|
|
86558
86577
|
for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
|
|
86559
86578
|
const modulemap = import_node_path123.default.join(
|
|
86560
86579
|
pending2,
|
|
@@ -87969,7 +87988,7 @@ function crateSourceRoots(manifest, searchRoot) {
|
|
|
87969
87988
|
return roots;
|
|
87970
87989
|
}
|
|
87971
87990
|
function crateSourceDigest(manifest, searchRoot) {
|
|
87972
|
-
const hash = (0,
|
|
87991
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
87973
87992
|
const walk4 = (dir, root) => {
|
|
87974
87993
|
for (const entry of import_node_fs119.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
|
|
87975
87994
|
const full = import_node_path123.default.join(dir, entry.name);
|
|
@@ -88416,7 +88435,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
88416
88435
|
...swiftSources.flags,
|
|
88417
88436
|
...swiftSources.sources.flatMap((source) => [
|
|
88418
88437
|
source,
|
|
88419
|
-
(0,
|
|
88438
|
+
(0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(import_node_path123.default.join(binary2.dir, source))).digest("hex")
|
|
88420
88439
|
])
|
|
88421
88440
|
);
|
|
88422
88441
|
continue;
|
|
@@ -88452,7 +88471,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
88452
88471
|
);
|
|
88453
88472
|
}
|
|
88454
88473
|
}
|
|
88455
|
-
return (0,
|
|
88474
|
+
return (0, import_node_crypto71.createHash)("sha256").update(parts2.join("\0")).digest("hex");
|
|
88456
88475
|
}
|
|
88457
88476
|
function missingArtifactGap(binary2) {
|
|
88458
88477
|
if (swiftBinaryOnDisk(binary2)) return null;
|
|
@@ -88534,7 +88553,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
88534
88553
|
return NO_IMPORTABLE_SURFACE;
|
|
88535
88554
|
}
|
|
88536
88555
|
const configured = new Map(Object.entries(behavior));
|
|
88537
|
-
const hash = (0,
|
|
88556
|
+
const hash = (0, import_node_crypto71.createHash)("sha256").update(
|
|
88538
88557
|
standinGenerationInputs([binary2], toolchain, behavior)
|
|
88539
88558
|
);
|
|
88540
88559
|
hash.update(digest3);
|
|
@@ -88774,7 +88793,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
88774
88793
|
);
|
|
88775
88794
|
if (binary2.moduleSources !== void 0)
|
|
88776
88795
|
frameworkInputs.push(
|
|
88777
|
-
`${binary2.target}\0${(0,
|
|
88796
|
+
`${binary2.target}\0${(0, import_node_crypto71.createHash)("sha256").update(
|
|
88778
88797
|
[iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
|
|
88779
88798
|
"\0"
|
|
88780
88799
|
)
|
|
@@ -88815,7 +88834,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
88815
88834
|
import_node_fs119.default.mkdirSync(sourceFrameworks);
|
|
88816
88835
|
const frameworks = {
|
|
88817
88836
|
dirs: [...frameworkDirs, sourceFrameworks].sort(),
|
|
88818
|
-
digest: (0,
|
|
88837
|
+
digest: (0, import_node_crypto71.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
88819
88838
|
surfaces: frameworkSurfaces
|
|
88820
88839
|
};
|
|
88821
88840
|
const siblings = new Map(
|
|
@@ -88934,12 +88953,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
88934
88953
|
import_node_fs119.default.rmSync(modules, { recursive: true, force: true });
|
|
88935
88954
|
}
|
|
88936
88955
|
}
|
|
88937
|
-
var import_node_child_process56,
|
|
88956
|
+
var import_node_child_process56, import_node_crypto71, import_node_fs119, import_node_path123, 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;
|
|
88938
88957
|
var init_swift_standins = __esm({
|
|
88939
88958
|
"src/swift-standins.ts"() {
|
|
88940
88959
|
"use strict";
|
|
88941
88960
|
import_node_child_process56 = require("node:child_process");
|
|
88942
|
-
|
|
88961
|
+
import_node_crypto71 = require("node:crypto");
|
|
88943
88962
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
88944
88963
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
88945
88964
|
init_forked_script_contract();
|
|
@@ -88969,7 +88988,7 @@ var init_swift_standins = __esm({
|
|
|
88969
88988
|
init_swiftTargetContract();
|
|
88970
88989
|
TRIPLE = SWIFT_WASM_TRIPLE;
|
|
88971
88990
|
cacheDir5 = import_node_path123.default.join(cacheDir(), "swift-standins");
|
|
88972
|
-
key = (...parts2) => (0,
|
|
88991
|
+
key = (...parts2) => (0, import_node_crypto71.createHash)("sha256").update(parts2.join("\0")).digest("hex").slice(0, 32);
|
|
88973
88992
|
digests = /* @__PURE__ */ new Map();
|
|
88974
88993
|
isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
|
|
88975
88994
|
OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
|
|
@@ -89129,11 +89148,6 @@ function compiledFrameworkImports(app, products) {
|
|
|
89129
89148
|
}
|
|
89130
89149
|
return imports2;
|
|
89131
89150
|
}
|
|
89132
|
-
function sha256Hex6(bytes) {
|
|
89133
|
-
if (typeof Bun !== "undefined")
|
|
89134
|
-
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
89135
|
-
return (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex");
|
|
89136
|
-
}
|
|
89137
89151
|
function regularFileStamp(file) {
|
|
89138
89152
|
const stat2 = import_node_fs120.default.lstatSync(file, { bigint: true, throwIfNoEntry: false });
|
|
89139
89153
|
if (!stat2 || !stat2.isFile()) return null;
|
|
@@ -89147,7 +89161,7 @@ function verifyRetainedFile(work, file, hash, stamps) {
|
|
|
89147
89161
|
if (typeof expectedStamp === "string" && regularFileStamp(resolved) === expectedStamp)
|
|
89148
89162
|
return true;
|
|
89149
89163
|
if (!import_node_fs120.default.existsSync(resolved)) return false;
|
|
89150
|
-
return
|
|
89164
|
+
return sha256Hex2(readPackageFile(work, resolved, Infinity)) === hash;
|
|
89151
89165
|
}
|
|
89152
89166
|
function recordRetainedStamps(work, files2) {
|
|
89153
89167
|
const stamps = {};
|
|
@@ -89164,7 +89178,7 @@ function cachedBinaryFileDigest(file) {
|
|
|
89164
89178
|
const memory = binaryFileDigests.get(real);
|
|
89165
89179
|
if (memory?.stamp === stamp) return memory.digest;
|
|
89166
89180
|
const dir = import_node_path124.default.join(swiftCacheDir(), "swift-binary-digests");
|
|
89167
|
-
const record6 = import_node_path124.default.join(dir, `${
|
|
89181
|
+
const record6 = import_node_path124.default.join(dir, `${sha256Hex2(real)}.json`);
|
|
89168
89182
|
if (import_node_fs120.default.existsSync(record6)) {
|
|
89169
89183
|
const saved = JSON.parse(import_node_fs120.default.readFileSync(record6, "utf8"));
|
|
89170
89184
|
if (isRecord(saved) && saved.stamp === stamp && typeof saved.digest === "string") {
|
|
@@ -89172,10 +89186,10 @@ function cachedBinaryFileDigest(file) {
|
|
|
89172
89186
|
return saved.digest;
|
|
89173
89187
|
}
|
|
89174
89188
|
}
|
|
89175
|
-
const digest3 =
|
|
89189
|
+
const digest3 = sha256Hex2(import_node_fs120.default.readFileSync(real));
|
|
89176
89190
|
binaryFileDigests.set(real, { stamp, digest: digest3 });
|
|
89177
89191
|
import_node_fs120.default.mkdirSync(dir, { recursive: true });
|
|
89178
|
-
const partial = `${record6}.${process.pid}.${(0,
|
|
89192
|
+
const partial = `${record6}.${process.pid}.${(0, import_node_crypto72.randomUUID)()}`;
|
|
89179
89193
|
import_node_fs120.default.writeFileSync(partial, JSON.stringify({ stamp, digest: digest3 }));
|
|
89180
89194
|
import_node_fs120.default.renameSync(partial, record6);
|
|
89181
89195
|
return digest3;
|
|
@@ -89713,7 +89727,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
89713
89727
|
const staged = withFrameworkCompanionImports(original);
|
|
89714
89728
|
if (staged !== original) sources.set(file, Buffer.from(staged));
|
|
89715
89729
|
}
|
|
89716
|
-
const digest3 =
|
|
89730
|
+
const digest3 = sha256Hex2;
|
|
89717
89731
|
const providers = /* @__PURE__ */ new Map();
|
|
89718
89732
|
for (const target of targets) {
|
|
89719
89733
|
if (!supplied.has(target.moduleName)) continue;
|
|
@@ -90069,7 +90083,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
|
|
|
90069
90083
|
products
|
|
90070
90084
|
);
|
|
90071
90085
|
const checkouts = remoteSwiftCheckouts(app.rootDir);
|
|
90072
|
-
const digest3 =
|
|
90086
|
+
const digest3 = sha256Hex2;
|
|
90073
90087
|
const inputs2 = Object.fromEntries(
|
|
90074
90088
|
[...sources].map(([file, bytes]) => [file, digest3(bytes)])
|
|
90075
90089
|
);
|
|
@@ -90451,16 +90465,17 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
90451
90465
|
import_node_fs120.default.closeSync(descriptor);
|
|
90452
90466
|
}
|
|
90453
90467
|
}
|
|
90454
|
-
var import_node_child_process57,
|
|
90468
|
+
var import_node_child_process57, import_node_crypto72, import_node_fs120, import_node_path124, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT, binaryFileDigests, objcInputSnapshots;
|
|
90455
90469
|
var init_swift_objc_compile = __esm({
|
|
90456
90470
|
"src/swift-objc-compile.ts"() {
|
|
90457
90471
|
"use strict";
|
|
90458
90472
|
import_node_child_process57 = require("node:child_process");
|
|
90459
|
-
|
|
90473
|
+
import_node_crypto72 = require("node:crypto");
|
|
90460
90474
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
90461
90475
|
import_node_path124 = __toESM(require("node:path"), 1);
|
|
90462
90476
|
init_mapLimit();
|
|
90463
90477
|
init_is_record();
|
|
90478
|
+
init_sha256();
|
|
90464
90479
|
init_swift_objc_import();
|
|
90465
90480
|
init_swift_objc_runtime();
|
|
90466
90481
|
init_swift_objc_standin();
|
|
@@ -94546,19 +94561,19 @@ function u32(value) {
|
|
|
94546
94561
|
}
|
|
94547
94562
|
function propertyHash(property) {
|
|
94548
94563
|
const transient = property.kind === "attribute" && property.transient;
|
|
94549
|
-
const base2 =
|
|
94564
|
+
const base2 = sha2562(
|
|
94550
94565
|
property.name,
|
|
94551
94566
|
[(property.optional ? 1 : 0) | (transient ? 2 : 0), 0],
|
|
94552
94567
|
property.modifier ?? ""
|
|
94553
94568
|
);
|
|
94554
94569
|
if (property.kind === "attribute")
|
|
94555
|
-
return
|
|
94570
|
+
return sha2562(
|
|
94556
94571
|
base2,
|
|
94557
94572
|
u32(property.type),
|
|
94558
94573
|
property.type === 1e3 && property.flags & EXTERNAL_BINARY ? [1] : [],
|
|
94559
94574
|
property.flags & PRESERVE_AFTER_DELETION ? [1] : []
|
|
94560
94575
|
);
|
|
94561
|
-
return
|
|
94576
|
+
return sha2562(
|
|
94562
94577
|
base2,
|
|
94563
94578
|
property.destination,
|
|
94564
94579
|
property.inverse ?? "",
|
|
@@ -94573,7 +94588,7 @@ function entityHashes(model) {
|
|
|
94573
94588
|
...item.parent === null ? [] : allProperties(byName2.get(item.parent)),
|
|
94574
94589
|
...item.properties
|
|
94575
94590
|
];
|
|
94576
|
-
const hash = (item) =>
|
|
94591
|
+
const hash = (item) => sha2562(
|
|
94577
94592
|
item.name,
|
|
94578
94593
|
[item.abstract ? 1 : 0],
|
|
94579
94594
|
item.parent === null ? [] : hash(byName2.get(item.parent)),
|
|
@@ -94601,7 +94616,7 @@ function compileCoreDataModel(directory2) {
|
|
|
94601
94616
|
files2[`${name3}.momd/${version2}.mom`] = archiveModel(model);
|
|
94602
94617
|
const entities = entityHashes(model);
|
|
94603
94618
|
hashes[version2] = Object.fromEntries(entities);
|
|
94604
|
-
checksums[version2] =
|
|
94619
|
+
checksums[version2] = sha2562(...entities.map(([, hash]) => hash)).toString("base64");
|
|
94605
94620
|
}
|
|
94606
94621
|
const named = (0, import_node_fs124.existsSync)(import_node_path128.default.join(directory2, ".xccurrentversion")) ? {
|
|
94607
94622
|
NSManagedObjectModel_CurrentVersionName: import_node_path128.default.basename(
|
|
@@ -94624,11 +94639,11 @@ function coreDataModelDirectories(files2) {
|
|
|
94624
94639
|
}
|
|
94625
94640
|
return [...models].sort();
|
|
94626
94641
|
}
|
|
94627
|
-
var
|
|
94642
|
+
var import_node_crypto73, import_node_fs124, import_node_path128, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2562;
|
|
94628
94643
|
var init_core_data_model = __esm({
|
|
94629
94644
|
"src/core-data-model.ts"() {
|
|
94630
94645
|
"use strict";
|
|
94631
|
-
|
|
94646
|
+
import_node_crypto73 = require("node:crypto");
|
|
94632
94647
|
import_node_fs124 = require("node:fs");
|
|
94633
94648
|
import_node_path128 = __toESM(require("node:path"), 1);
|
|
94634
94649
|
init_core_data_entity_classes();
|
|
@@ -94747,7 +94762,7 @@ var init_core_data_model = __esm({
|
|
|
94747
94762
|
});
|
|
94748
94763
|
}
|
|
94749
94764
|
};
|
|
94750
|
-
|
|
94765
|
+
sha2562 = (...parts2) => (0, import_node_crypto73.createHash)("sha256").update(
|
|
94751
94766
|
Buffer.concat(
|
|
94752
94767
|
parts2.map(
|
|
94753
94768
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -96939,7 +96954,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
96939
96954
|
];
|
|
96940
96955
|
const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
|
|
96941
96956
|
const xcode = (0, import_node_child_process59.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
|
|
96942
|
-
const key2 = (0,
|
|
96957
|
+
const key2 = (0, import_node_crypto74.createHash)("sha256").update(
|
|
96943
96958
|
JSON.stringify([
|
|
96944
96959
|
RECIPE,
|
|
96945
96960
|
(0, import_node_child_process59.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
|
|
@@ -97150,12 +97165,12 @@ exec ${quote3(import_node_path129.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
97150
97165
|
);
|
|
97151
97166
|
return directory2;
|
|
97152
97167
|
}
|
|
97153
|
-
var import_node_child_process59,
|
|
97168
|
+
var import_node_child_process59, import_node_crypto74, import_node_fs125, import_node_os26, import_node_path129, import_promises15, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
97154
97169
|
var init_rive_runtime_dependencies = __esm({
|
|
97155
97170
|
"src/rive-runtime-dependencies.ts"() {
|
|
97156
97171
|
"use strict";
|
|
97157
97172
|
import_node_child_process59 = require("node:child_process");
|
|
97158
|
-
|
|
97173
|
+
import_node_crypto74 = require("node:crypto");
|
|
97159
97174
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
97160
97175
|
import_node_os26 = __toESM(require("node:os"), 1);
|
|
97161
97176
|
import_node_path129 = __toESM(require("node:path"), 1);
|
|
@@ -98012,7 +98027,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
98012
98027
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
98013
98028
|
))
|
|
98014
98029
|
return [...binaries];
|
|
98015
|
-
const hash = (0,
|
|
98030
|
+
const hash = (0, import_node_crypto75.createHash)("sha256");
|
|
98016
98031
|
hash.update(
|
|
98017
98032
|
JSON.stringify([
|
|
98018
98033
|
inputs2.targets,
|
|
@@ -98221,12 +98236,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
98221
98236
|
);
|
|
98222
98237
|
return result;
|
|
98223
98238
|
}
|
|
98224
|
-
var import_node_child_process61,
|
|
98239
|
+
var import_node_child_process61, import_node_crypto75, import_node_fs127, import_node_path131, cachedInputs;
|
|
98225
98240
|
var init_swift_cxx_reachable = __esm({
|
|
98226
98241
|
"src/swift-cxx-reachable.ts"() {
|
|
98227
98242
|
"use strict";
|
|
98228
98243
|
import_node_child_process61 = require("node:child_process");
|
|
98229
|
-
|
|
98244
|
+
import_node_crypto75 = require("node:crypto");
|
|
98230
98245
|
import_node_fs127 = __toESM(require("node:fs"), 1);
|
|
98231
98246
|
import_node_path131 = __toESM(require("node:path"), 1);
|
|
98232
98247
|
init_is_record();
|
|
@@ -98247,15 +98262,15 @@ function rasterizePdfFiles(inputs2, { imageBytes, imageTotalBytes } = { imageByt
|
|
|
98247
98262
|
const pending2 = /* @__PURE__ */ new Map();
|
|
98248
98263
|
const renderer = process.platform === "darwin" ? "30774891a9db216d" : "pdfium-1";
|
|
98249
98264
|
const cache = swiftCacheDir();
|
|
98250
|
-
const cached4 = (
|
|
98265
|
+
const cached4 = (sha2564) => import_node_path132.default.join(cache, `swift-pdf-png-${renderer}-${sha2564}.png`);
|
|
98251
98266
|
let remainingBytes = imageTotalBytes;
|
|
98252
|
-
const record6 = ({ file, sha256:
|
|
98267
|
+
const record6 = ({ file, sha256: sha2564 }, bytes) => {
|
|
98253
98268
|
if (bytes.length > imageBytes)
|
|
98254
98269
|
throw new Error(`swift image ${file} raster exceeds the per-image cap`);
|
|
98255
98270
|
remainingBytes -= bytes.length;
|
|
98256
98271
|
if (remainingBytes < 0)
|
|
98257
98272
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
98258
|
-
rendered.set(
|
|
98273
|
+
rendered.set(sha2564, bytes);
|
|
98259
98274
|
};
|
|
98260
98275
|
for (const input of inputs2) {
|
|
98261
98276
|
if (rendered.has(input.sha256) || pending2.has(input.sha256)) continue;
|
|
@@ -98717,7 +98732,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
98717
98732
|
if (!response.ok)
|
|
98718
98733
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
98719
98734
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
98720
|
-
if ((0,
|
|
98735
|
+
if ((0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
98721
98736
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
98722
98737
|
return bytes;
|
|
98723
98738
|
});
|
|
@@ -98822,7 +98837,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
98822
98837
|
encode2(now),
|
|
98823
98838
|
encodeNativeSdkLater({
|
|
98824
98839
|
files: later.map((bytes) => ({
|
|
98825
|
-
sha256: (0,
|
|
98840
|
+
sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex"),
|
|
98826
98841
|
byteLength: bytes.length
|
|
98827
98842
|
})),
|
|
98828
98843
|
...needs && {
|
|
@@ -98838,11 +98853,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
98838
98853
|
later
|
|
98839
98854
|
};
|
|
98840
98855
|
}
|
|
98841
|
-
var
|
|
98856
|
+
var import_node_crypto76, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
98842
98857
|
var init_swift_sdk_later_data = __esm({
|
|
98843
98858
|
"src/swift-sdk-later-data.ts"() {
|
|
98844
98859
|
"use strict";
|
|
98845
|
-
|
|
98860
|
+
import_node_crypto76 = require("node:crypto");
|
|
98846
98861
|
init_nativeSdkBindingContract();
|
|
98847
98862
|
init_nativeWasmContract();
|
|
98848
98863
|
init_swift_sdk_image();
|
|
@@ -99440,7 +99455,7 @@ function gpuChromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
|
|
|
99440
99455
|
async function launchWithPauseAwareDeadline(launch, opts) {
|
|
99441
99456
|
const budget = typeof opts.timeout === "number" ? opts.timeout : DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
99442
99457
|
if (budget === 0) return launch(opts);
|
|
99443
|
-
const marker = `--peach-launch-id=${(0,
|
|
99458
|
+
const marker = `--peach-launch-id=${(0, import_node_crypto77.randomUUID)()}`;
|
|
99444
99459
|
let expired = false;
|
|
99445
99460
|
const cleanupAttempted = [];
|
|
99446
99461
|
const lookupFailed = [];
|
|
@@ -99597,13 +99612,13 @@ async function launchReapedChrome(launch, opts = {}, rendererTarget, policy = {}
|
|
|
99597
99612
|
policy.admission
|
|
99598
99613
|
);
|
|
99599
99614
|
}
|
|
99600
|
-
var childProcess, import_node_child_process64,
|
|
99615
|
+
var childProcess, import_node_child_process64, import_node_crypto77, fs80, os23, path116, LINUX_CHROME_SCOPE_ENV, discoveredChromePids, discoveredChromeProcesses, reapPids, installed, signalShutdownClaimed, PLAYWRIGHT_DISABLED_FEATURES, PLAYWRIGHT_ENABLED_FEATURES, DISABLED_FEATURES, DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
99601
99616
|
var init_reap_browser = __esm({
|
|
99602
99617
|
"src/reap-browser.ts"() {
|
|
99603
99618
|
"use strict";
|
|
99604
99619
|
childProcess = __toESM(require("node:child_process"), 1);
|
|
99605
99620
|
import_node_child_process64 = require("node:child_process");
|
|
99606
|
-
|
|
99621
|
+
import_node_crypto77 = require("node:crypto");
|
|
99607
99622
|
fs80 = __toESM(require("node:fs"), 1);
|
|
99608
99623
|
os23 = __toESM(require("node:os"), 1);
|
|
99609
99624
|
path116 = __toESM(require("node:path"), 1);
|
|
@@ -101057,7 +101072,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
|
|
|
101057
101072
|
const part = await guard((0, import_node_path134.join)(directory2, `side-${id}.wasm`), lazy, env);
|
|
101058
101073
|
const bytes = (0, import_node_fs132.readFileSync)(part.file);
|
|
101059
101074
|
assertWasmCodeOnly(bytes);
|
|
101060
|
-
return { ...part, slots: slots2, sha256: (0,
|
|
101075
|
+
return { ...part, slots: slots2, sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") };
|
|
101061
101076
|
}
|
|
101062
101077
|
);
|
|
101063
101078
|
const dyldGroups = parts2.flatMap(
|
|
@@ -101082,9 +101097,9 @@ function sealNativeWasmSplit(split2, initialPages) {
|
|
|
101082
101097
|
const slotOffset = 4 + split2.sides.length * NATIVE_LAZY_PART_BYTES;
|
|
101083
101098
|
const inventory = Buffer.alloc(slotOffset + (lastSlot + 1) * 2);
|
|
101084
101099
|
inventory.writeUInt32LE(split2.sides.length, 0);
|
|
101085
|
-
for (const [id, { sha256:
|
|
101100
|
+
for (const [id, { sha256: sha2564, byteLength, slots }] of split2.sides.entries()) {
|
|
101086
101101
|
const offset = 4 + id * NATIVE_LAZY_PART_BYTES;
|
|
101087
|
-
inventory.write(
|
|
101102
|
+
inventory.write(sha2564, offset, NATIVE_LAZY_DIGEST_BYTES, "hex");
|
|
101088
101103
|
inventory.writeUInt32LE(byteLength, offset + NATIVE_LAZY_DIGEST_BYTES);
|
|
101089
101104
|
for (const slot of slots) inventory.writeUInt16LE(id + 1, slotOffset + slot * 2);
|
|
101090
101105
|
}
|
|
@@ -101125,12 +101140,12 @@ function describePart(file) {
|
|
|
101125
101140
|
);
|
|
101126
101141
|
return { file, functions, byteLength: bytes.byteLength };
|
|
101127
101142
|
}
|
|
101128
|
-
var import_node_child_process66,
|
|
101143
|
+
var import_node_child_process66, import_node_crypto78, import_node_fs132, import_node_os28, import_node_path134, import_node_util16, run10, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
|
|
101129
101144
|
var init_wasm_lazy_split = __esm({
|
|
101130
101145
|
"src/wasm-lazy-split.ts"() {
|
|
101131
101146
|
"use strict";
|
|
101132
101147
|
import_node_child_process66 = require("node:child_process");
|
|
101133
|
-
|
|
101148
|
+
import_node_crypto78 = require("node:crypto");
|
|
101134
101149
|
import_node_fs132 = require("node:fs");
|
|
101135
101150
|
import_node_os28 = require("node:os");
|
|
101136
101151
|
import_node_path134 = require("node:path");
|
|
@@ -101361,7 +101376,7 @@ async function storeStartupSplit(work, profile, parent, cache, partCodeBytes) {
|
|
|
101361
101376
|
const result = {
|
|
101362
101377
|
primary: delivery.primary,
|
|
101363
101378
|
parts: new Map(
|
|
101364
|
-
split2.sides.map(({ sha256:
|
|
101379
|
+
split2.sides.map(({ sha256: sha2564 }, index) => [sha2564, delivery.sides[index]])
|
|
101365
101380
|
),
|
|
101366
101381
|
...partCodeBytes === void 0 ? {} : {
|
|
101367
101382
|
source: digest2(work.bytes),
|
|
@@ -101567,11 +101582,11 @@ async function bootSwiftPreview(launch, profile) {
|
|
|
101567
101582
|
server.close();
|
|
101568
101583
|
}
|
|
101569
101584
|
}
|
|
101570
|
-
var
|
|
101585
|
+
var import_node_crypto79, import_node_fs133, import_node_http3, import_node_https2, import_node_os29, import_node_path135, packageName, guestPath, appPath, profileWindowMs, profileQuietMs, digest2, partDigest, platform;
|
|
101571
101586
|
var init_swift_startup_split = __esm({
|
|
101572
101587
|
"src/swift-startup-split.ts"() {
|
|
101573
101588
|
"use strict";
|
|
101574
|
-
|
|
101589
|
+
import_node_crypto79 = require("node:crypto");
|
|
101575
101590
|
import_node_fs133 = require("node:fs");
|
|
101576
101591
|
import_node_http3 = require("node:http");
|
|
101577
101592
|
import_node_https2 = require("node:https");
|
|
@@ -101596,7 +101611,7 @@ var init_swift_startup_split = __esm({
|
|
|
101596
101611
|
appPath = "/__peach/swift/startup.wasm";
|
|
101597
101612
|
profileWindowMs = 3e4;
|
|
101598
101613
|
profileQuietMs = 2e3;
|
|
101599
|
-
digest2 = (bytes) => (0,
|
|
101614
|
+
digest2 = (bytes) => (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
|
|
101600
101615
|
partDigest = /^[a-f0-9]{64}$/;
|
|
101601
101616
|
platform = `${process.platform}-${process.arch}`;
|
|
101602
101617
|
}
|
|
@@ -101621,7 +101636,7 @@ async function readAsset(url, digest3, contentType2 = "application/wasm") {
|
|
|
101621
101636
|
`published Swift SDK asset ${digest3} answered HTTP ${response.status}`
|
|
101622
101637
|
);
|
|
101623
101638
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
101624
|
-
if ((0,
|
|
101639
|
+
if ((0, import_node_crypto80.createHash)("sha256").update(bytes).digest("hex") !== digest3)
|
|
101625
101640
|
throw new Error(`published Swift SDK asset ${digest3} digest mismatch`);
|
|
101626
101641
|
return { bytes, contentType: contentType2, digest: digest3 };
|
|
101627
101642
|
}
|
|
@@ -101637,7 +101652,7 @@ async function readPublishedSwiftSdkParts(url, module2) {
|
|
|
101637
101652
|
const [dyld] = WebAssembly.Module.customSections(module2, NATIVE_DYLD_TABLE_SECTION);
|
|
101638
101653
|
if (lazy.length > 1) throw new Error("native code has more than one part inventory");
|
|
101639
101654
|
const parts2 = lazy[0] ? readNativeLazyParts(lazy[0]).parts : [];
|
|
101640
|
-
const assets2 = new Map(parts2.map(({ sha256:
|
|
101655
|
+
const assets2 = new Map(parts2.map(({ sha256: sha2564, byteLength }) => [sha2564, byteLength]));
|
|
101641
101656
|
let dyldDigest;
|
|
101642
101657
|
if (dyld && !WebAssembly.Module.customSections(module2, NATIVE_DYLD_PACKS_SECTION).length) {
|
|
101643
101658
|
const table = readNativeDyldTableIndex(dyld);
|
|
@@ -101656,11 +101671,11 @@ async function readPublishedSwiftSdkParts(url, module2) {
|
|
|
101656
101671
|
}
|
|
101657
101672
|
);
|
|
101658
101673
|
}
|
|
101659
|
-
var
|
|
101674
|
+
var import_node_crypto80;
|
|
101660
101675
|
var init_published_swift_sdk = __esm({
|
|
101661
101676
|
"src/published-swift-sdk.ts"() {
|
|
101662
101677
|
"use strict";
|
|
101663
|
-
|
|
101678
|
+
import_node_crypto80 = require("node:crypto");
|
|
101664
101679
|
init_mapLimit();
|
|
101665
101680
|
init_nativeDyldTableContract();
|
|
101666
101681
|
init_nativeWasmContract();
|
|
@@ -101705,7 +101720,7 @@ function* filesUnder(absolute) {
|
|
|
101705
101720
|
}
|
|
101706
101721
|
function hashFile(absolutePath) {
|
|
101707
101722
|
try {
|
|
101708
|
-
return (0,
|
|
101723
|
+
return (0, import_node_crypto81.createHash)("sha1").update((0, import_node_fs134.readFileSync)(absolutePath)).digest("hex");
|
|
101709
101724
|
} catch {
|
|
101710
101725
|
return null;
|
|
101711
101726
|
}
|
|
@@ -101839,11 +101854,11 @@ function findStaleRoutes(monorepoRoot, routes2) {
|
|
|
101839
101854
|
}
|
|
101840
101855
|
return stale;
|
|
101841
101856
|
}
|
|
101842
|
-
var
|
|
101857
|
+
var import_node_crypto81, import_node_fs134, import_node_path136, DEV_BUILD_REBUILD_COMMAND, RECORD_DIR, PEACHSIM_ENGINE_INPUTS, ENGINE_SOURCES, ROUTES, STANDALONE_ENGINE_ROUTES, EXCLUDED_DIR_NAMES;
|
|
101843
101858
|
var init_dev_build_freshness = __esm({
|
|
101844
101859
|
"cli/dev-build-freshness.ts"() {
|
|
101845
101860
|
"use strict";
|
|
101846
|
-
|
|
101861
|
+
import_node_crypto81 = require("node:crypto");
|
|
101847
101862
|
import_node_fs134 = require("node:fs");
|
|
101848
101863
|
import_node_path136 = require("node:path");
|
|
101849
101864
|
DEV_BUILD_REBUILD_COMMAND = "bun run build:peach";
|
|
@@ -101970,7 +101985,7 @@ function nativeSourceFiles(packagePath) {
|
|
|
101970
101985
|
function swiftArtifactContentDigest(bytes) {
|
|
101971
101986
|
let digest3 = swiftArtifactDigests.get(bytes);
|
|
101972
101987
|
if (!digest3) {
|
|
101973
|
-
digest3 = (0,
|
|
101988
|
+
digest3 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
101974
101989
|
swiftArtifactDigests.set(bytes, digest3);
|
|
101975
101990
|
}
|
|
101976
101991
|
return digest3;
|
|
@@ -102098,7 +102113,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
102098
102113
|
const clang = import_node_path137.default.join(toolchainBin, "clang");
|
|
102099
102114
|
const empty = (binary2, file) => {
|
|
102100
102115
|
const source = import_node_path137.default.join(binary2.dir, file);
|
|
102101
|
-
const key2 = (0,
|
|
102116
|
+
const key2 = (0, import_node_crypto82.createHash)("sha256").update(
|
|
102102
102117
|
JSON.stringify([
|
|
102103
102118
|
clang,
|
|
102104
102119
|
sdk2.sysroot,
|
|
@@ -102143,7 +102158,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
102143
102158
|
return new Set(portable.flat());
|
|
102144
102159
|
}
|
|
102145
102160
|
async function swiftPackages(entry, app) {
|
|
102146
|
-
const stamp = (file) => import_node_fs135.default.existsSync(file) ? (0,
|
|
102161
|
+
const stamp = (file) => import_node_fs135.default.existsSync(file) ? (0, import_node_crypto82.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex") : null;
|
|
102147
102162
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
102148
102163
|
module: target.moduleName,
|
|
102149
102164
|
products: target.packageProducts ?? []
|
|
@@ -103312,18 +103327,18 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
103312
103327
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
103313
103328
|
bytes
|
|
103314
103329
|
);
|
|
103315
|
-
const
|
|
103330
|
+
const sha2564 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
103316
103331
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
103317
103332
|
if (!bundle && inputs2["Package.swift"])
|
|
103318
103333
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
103319
103334
|
metalSources[key2] = {
|
|
103320
|
-
sha256:
|
|
103321
|
-
url: `${baseUrl}${RESOURCE_PATH}${
|
|
103335
|
+
sha256: sha2564,
|
|
103336
|
+
url: `${baseUrl}${RESOURCE_PATH}${sha2564}.metal`,
|
|
103322
103337
|
bundlePath: bundle?.path ?? "."
|
|
103323
103338
|
};
|
|
103324
103339
|
metalUploads[key2] = source;
|
|
103325
103340
|
watched.push(file);
|
|
103326
|
-
registered.set(`${
|
|
103341
|
+
registered.set(`${sha2564}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
|
|
103327
103342
|
}
|
|
103328
103343
|
const pdfs = /* @__PURE__ */ new Map();
|
|
103329
103344
|
for (const { file } of found2) {
|
|
@@ -103335,7 +103350,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
103335
103350
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
103336
103351
|
pdfs.set(file, {
|
|
103337
103352
|
file: disk,
|
|
103338
|
-
sha256: (0,
|
|
103353
|
+
sha256: (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex")
|
|
103339
103354
|
});
|
|
103340
103355
|
}
|
|
103341
103356
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -103381,7 +103396,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
103381
103396
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
103382
103397
|
}
|
|
103383
103398
|
imageBytes += bytes.length;
|
|
103384
|
-
const hash = (0,
|
|
103399
|
+
const hash = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
103385
103400
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
103386
103401
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
103387
103402
|
const variant2 = {
|
|
@@ -103690,7 +103705,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
103690
103705
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
103691
103706
|
}
|
|
103692
103707
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
103693
|
-
const hash = (0,
|
|
103708
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
103694
103709
|
hash.update(packagePath);
|
|
103695
103710
|
updateSwiftConfigStamp(hash, packagePath);
|
|
103696
103711
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -103719,7 +103734,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
103719
103734
|
return hash.digest("hex").slice(0, 16);
|
|
103720
103735
|
}
|
|
103721
103736
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
103722
|
-
const hash = (0,
|
|
103737
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
103723
103738
|
hash.update(compilerSourceDigest);
|
|
103724
103739
|
updateSwiftConfigStamp(hash, packagePath);
|
|
103725
103740
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -103751,7 +103766,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
103751
103766
|
(root) => import_node_fs135.default.existsSync(import_node_path137.default.join(root, "toolchain.json"))
|
|
103752
103767
|
);
|
|
103753
103768
|
if (!moduleRoot) return "";
|
|
103754
|
-
const hash = (0,
|
|
103769
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
103755
103770
|
hash.update(moduleRoot);
|
|
103756
103771
|
for (const relative7 of swiftModuleInputFiles(moduleRoot)) {
|
|
103757
103772
|
hash.update(relative7);
|
|
@@ -103761,7 +103776,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
103761
103776
|
}
|
|
103762
103777
|
function otherInputs(input) {
|
|
103763
103778
|
const { files: _files, ...rest } = input;
|
|
103764
|
-
return (0,
|
|
103779
|
+
return (0, import_node_crypto82.createHash)("sha256").update(JSON.stringify(rest)).digest("hex");
|
|
103765
103780
|
}
|
|
103766
103781
|
function icuUrl(origin, artifact) {
|
|
103767
103782
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -103776,7 +103791,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
103776
103791
|
for (const standin of standins) {
|
|
103777
103792
|
if (!standin.prebuilt) continue;
|
|
103778
103793
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
103779
|
-
const digest3 = (0,
|
|
103794
|
+
const digest3 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
103780
103795
|
const dir = import_node_path137.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
103781
103796
|
import_node_fs135.default.mkdirSync(dir, { recursive: true });
|
|
103782
103797
|
const library = import_node_path137.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -104124,7 +104139,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
104124
104139
|
return import_node_path137.default.join(
|
|
104125
104140
|
swiftCacheDir(),
|
|
104126
104141
|
"swift-builds",
|
|
104127
|
-
(0,
|
|
104142
|
+
(0, import_node_crypto82.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
104128
104143
|
);
|
|
104129
104144
|
}
|
|
104130
104145
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -104418,14 +104433,14 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
104418
104433
|
const url = new URL(moduleUrl);
|
|
104419
104434
|
const table = swiftDyldTableReference(url.pathname, module2);
|
|
104420
104435
|
if (!table) return {};
|
|
104421
|
-
const { sha256:
|
|
104436
|
+
const { sha256: sha2564, byteLength } = table;
|
|
104422
104437
|
url.pathname = table.path;
|
|
104423
104438
|
const response = await fetch(url, { signal });
|
|
104424
104439
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
104425
104440
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
104426
|
-
if (bytes.length !== byteLength || (0,
|
|
104441
|
+
if (bytes.length !== byteLength || (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex") !== sha2564)
|
|
104427
104442
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
104428
|
-
return { dyldTable: { sha256:
|
|
104443
|
+
return { dyldTable: { sha256: sha2564, bytes } };
|
|
104429
104444
|
}
|
|
104430
104445
|
function currentStamp(project2, moduleRoot) {
|
|
104431
104446
|
return withXcodeLayout(
|
|
@@ -104714,10 +104729,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
104714
104729
|
sdk2.binding.bytes,
|
|
104715
104730
|
plan
|
|
104716
104731
|
);
|
|
104717
|
-
const digest3 = (0,
|
|
104732
|
+
const digest3 = (0, import_node_crypto82.createHash)("sha256").update(split2.binding).digest("hex");
|
|
104718
104733
|
sdkBindingFiles.set(digest3, split2.binding);
|
|
104719
104734
|
for (const later of split2.later)
|
|
104720
|
-
sdkBindingFiles.set((0,
|
|
104735
|
+
sdkBindingFiles.set((0, import_node_crypto82.createHash)("sha256").update(later).digest("hex"), later);
|
|
104721
104736
|
sdkSplitBindings.set(key2, digest3);
|
|
104722
104737
|
}
|
|
104723
104738
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -104796,7 +104811,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
104796
104811
|
const { key: key2 } = sdk2;
|
|
104797
104812
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
104798
104813
|
const requireCurrentProfile = import_node_path137.default.basename(import_node_path137.default.dirname(normalizedPackage)) === "one-native-controls";
|
|
104799
|
-
const app = (0,
|
|
104814
|
+
const app = (0, import_node_crypto82.createHash)("sha256").update(
|
|
104800
104815
|
JSON.stringify([
|
|
104801
104816
|
normalizedPackage,
|
|
104802
104817
|
launch.environment,
|
|
@@ -104830,7 +104845,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
104830
104845
|
app,
|
|
104831
104846
|
requireCurrentProfile
|
|
104832
104847
|
);
|
|
104833
|
-
const name3 = (0,
|
|
104848
|
+
const name3 = (0, import_node_crypto82.createHash)("sha256").update(split2.primary).digest("hex");
|
|
104834
104849
|
sdkPieces2.set(name3, split2.primary);
|
|
104835
104850
|
for (const [digest3, bytes] of split2.parts) sdkPieces2.set(digest3, bytes);
|
|
104836
104851
|
sdkStartupParts.set(name3, split2.parts);
|
|
@@ -105059,10 +105074,10 @@ async function swiftArtifactAssets(artifact, { sdkUrl, sdkBindingUrl }) {
|
|
|
105059
105074
|
const later = decodeNativeSdkBinding(
|
|
105060
105075
|
bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength)
|
|
105061
105076
|
).later;
|
|
105062
|
-
for (const { sha256:
|
|
105063
|
-
const laterBytes = sdkBindingFiles.get(
|
|
105064
|
-
if (!laterBytes) throw new Error(`swift sdk later data ${
|
|
105065
|
-
assets2.set(`${SDK_BINDING_PATH}${
|
|
105077
|
+
for (const { sha256: sha2564 } of later?.files ?? []) {
|
|
105078
|
+
const laterBytes = sdkBindingFiles.get(sha2564);
|
|
105079
|
+
if (!laterBytes) throw new Error(`swift sdk later data ${sha2564} is not served`);
|
|
105080
|
+
assets2.set(`${SDK_BINDING_PATH}${sha2564}.bin`, {
|
|
105066
105081
|
bytes: laterBytes,
|
|
105067
105082
|
contentType: "application/octet-stream"
|
|
105068
105083
|
});
|
|
@@ -105074,13 +105089,13 @@ async function swiftArtifactAssets(artifact, { sdkUrl, sdkBindingUrl }) {
|
|
|
105074
105089
|
}
|
|
105075
105090
|
return assets2;
|
|
105076
105091
|
}
|
|
105077
|
-
var import_node_async_hooks3, import_node_child_process67,
|
|
105092
|
+
var import_node_async_hooks3, import_node_child_process67, import_node_crypto82, import_node_fs135, import_node_os30, import_node_path137, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, 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, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, publishedSdkPieces, publishedSdkMirrors, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
|
|
105078
105093
|
var init_swift_host = __esm({
|
|
105079
105094
|
"src/swift-host.ts"() {
|
|
105080
105095
|
"use strict";
|
|
105081
105096
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
105082
105097
|
import_node_child_process67 = require("node:child_process");
|
|
105083
|
-
|
|
105098
|
+
import_node_crypto82 = require("node:crypto");
|
|
105084
105099
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
105085
105100
|
import_node_os30 = __toESM(require("node:os"), 1);
|
|
105086
105101
|
import_node_path137 = __toESM(require("node:path"), 1);
|
|
@@ -105842,7 +105857,7 @@ function hashTree(root) {
|
|
|
105842
105857
|
for (const entry of import_node_fs138.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
105843
105858
|
if (!entry.isFile()) continue;
|
|
105844
105859
|
const file = import_node_path140.default.join(entry.parentPath, entry.name);
|
|
105845
|
-
hashes[import_node_path140.default.relative(root, file).split(import_node_path140.default.sep).join("/")] = (0,
|
|
105860
|
+
hashes[import_node_path140.default.relative(root, file).split(import_node_path140.default.sep).join("/")] = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs138.default.readFileSync(file)).digest("hex");
|
|
105846
105861
|
}
|
|
105847
105862
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
105848
105863
|
}
|
|
@@ -105892,12 +105907,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
105892
105907
|
files: hashTree(generatedRoot)
|
|
105893
105908
|
};
|
|
105894
105909
|
}
|
|
105895
|
-
var import_node_child_process68,
|
|
105910
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run11, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
105896
105911
|
var init_turbo_codegen_intake = __esm({
|
|
105897
105912
|
"src/turbo-codegen-intake.ts"() {
|
|
105898
105913
|
"use strict";
|
|
105899
105914
|
import_node_child_process68 = require("node:child_process");
|
|
105900
|
-
|
|
105915
|
+
import_node_crypto83 = require("node:crypto");
|
|
105901
105916
|
import_node_fs138 = __toESM(require("node:fs"), 1);
|
|
105902
105917
|
import_node_module17 = require("node:module");
|
|
105903
105918
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
@@ -106970,7 +106985,7 @@ async function collectTurboSources(options2) {
|
|
|
106970
106985
|
);
|
|
106971
106986
|
const installedHeaders = /* @__PURE__ */ new Map();
|
|
106972
106987
|
const targetPath = (name3) => `Sources/${name3}`;
|
|
106973
|
-
const providerTarget = (name3) => `TurboPackage_${
|
|
106988
|
+
const providerTarget = (name3) => `TurboPackage_${sha2563(name3).slice(0, 16)}`;
|
|
106974
106989
|
const folly = readFollyConfig(reactNative.root);
|
|
106975
106990
|
const baseDefines = [
|
|
106976
106991
|
options2.configuration === "Debug" ? "DEBUG=1" : "NDEBUG",
|
|
@@ -107114,7 +107129,7 @@ async function collectTurboSources(options2) {
|
|
|
107114
107129
|
if (!Buffer.from(text7).equals(bytes))
|
|
107115
107130
|
throw new Error(`TurboModule source is not UTF-8: ${disk}`);
|
|
107116
107131
|
add(key2, text7);
|
|
107117
|
-
result.sources.push({ file: key2, source: disk, sha256:
|
|
107132
|
+
result.sources.push({ file: key2, source: disk, sha256: sha2563(bytes) });
|
|
107118
107133
|
pending2.push({ key: key2, targetName, label, root, relative: relative7 });
|
|
107119
107134
|
return key2;
|
|
107120
107135
|
};
|
|
@@ -107927,13 +107942,13 @@ async function collectTurboSources(options2) {
|
|
|
107927
107942
|
let decoratorHasPerformanceLogger = false;
|
|
107928
107943
|
let managerHasDevMenuDecorator = false;
|
|
107929
107944
|
if (fabric) objc = true;
|
|
107930
|
-
for (const { relative: relative7, source, text: text7, sha256:
|
|
107945
|
+
for (const { relative: relative7, source, text: text7, sha256: sha2564, configured } of glogSources()) {
|
|
107931
107946
|
const key2 = `${core}/dependencies/glog/${relative7}`;
|
|
107932
107947
|
add(key2, text7);
|
|
107933
107948
|
result.sources.push({
|
|
107934
107949
|
file: key2,
|
|
107935
107950
|
source,
|
|
107936
|
-
sha256:
|
|
107951
|
+
sha256: sha2564,
|
|
107937
107952
|
...configured && { configured }
|
|
107938
107953
|
});
|
|
107939
107954
|
if (relative7.startsWith("src/glog/"))
|
|
@@ -110216,11 +110231,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
110216
110231
|
}
|
|
110217
110232
|
`;
|
|
110218
110233
|
}
|
|
110219
|
-
var
|
|
110234
|
+
var import_node_crypto84, import_node_fs139, import_node_module18, import_node_path141, 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;
|
|
110220
110235
|
var init_turbo_source = __esm({
|
|
110221
110236
|
"src/turbo-source.ts"() {
|
|
110222
110237
|
"use strict";
|
|
110223
|
-
|
|
110238
|
+
import_node_crypto84 = require("node:crypto");
|
|
110224
110239
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
110225
110240
|
import_node_module18 = require("node:module");
|
|
110226
110241
|
import_node_path141 = __toESM(require("node:path"), 1);
|
|
@@ -110350,7 +110365,7 @@ var init_turbo_source = __esm({
|
|
|
110350
110365
|
];
|
|
110351
110366
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
110352
110367
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
110353
|
-
|
|
110368
|
+
sha2563 = (data) => (0, import_node_crypto84.createHash)("sha256").update(data).digest("hex");
|
|
110354
110369
|
podspecList = podspecAttribute;
|
|
110355
110370
|
reactNativePods = /* @__PURE__ */ new Set([
|
|
110356
110371
|
"React",
|
|
@@ -111237,7 +111252,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped, cor
|
|
|
111237
111252
|
}
|
|
111238
111253
|
async function prepareTurboCompileInput(options2) {
|
|
111239
111254
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
111240
|
-
const key2 = (0,
|
|
111255
|
+
const key2 = (0, import_node_crypto85.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs140.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs140.default.realpathSync(options2.moduleRoot)).digest("hex");
|
|
111241
111256
|
const scratch2 = import_node_path142.default.join(import_node_os31.default.tmpdir(), "peach-turbo-swift", key2);
|
|
111242
111257
|
import_node_fs140.default.mkdirSync(scratch2, { recursive: true });
|
|
111243
111258
|
const codegenDir = import_node_fs140.default.mkdtempSync(import_node_path142.default.join(scratch2, "codegen-"));
|
|
@@ -111479,11 +111494,11 @@ async function compileTurboModule(options2) {
|
|
|
111479
111494
|
collection
|
|
111480
111495
|
};
|
|
111481
111496
|
}
|
|
111482
|
-
var
|
|
111497
|
+
var import_node_crypto85, import_node_fs140, import_node_module19, import_node_os31, import_node_path142;
|
|
111483
111498
|
var init_turbo_compile = __esm({
|
|
111484
111499
|
"src/turbo-compile.ts"() {
|
|
111485
111500
|
"use strict";
|
|
111486
|
-
|
|
111501
|
+
import_node_crypto85 = require("node:crypto");
|
|
111487
111502
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
111488
111503
|
import_node_module19 = require("node:module");
|
|
111489
111504
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
@@ -111683,8 +111698,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
111683
111698
|
);
|
|
111684
111699
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
111685
111700
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
111686
|
-
const headers = (0,
|
|
111687
|
-
const sources = (0,
|
|
111701
|
+
const headers = (0, import_node_crypto86.createHash)("sha256");
|
|
111702
|
+
const sources = (0, import_node_crypto86.createHash)("sha256");
|
|
111688
111703
|
const walk4 = (relative7) => {
|
|
111689
111704
|
for (const file of import_node_fs142.default.readdirSync(import_node_path144.default.join(reactNativeRoot, relative7), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
111690
111705
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -111791,7 +111806,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
111791
111806
|
const file = import_node_path144.default.join(
|
|
111792
111807
|
cacheDir(),
|
|
111793
111808
|
"native-archives",
|
|
111794
|
-
`${(0,
|
|
111809
|
+
`${(0, import_node_crypto86.createHash)("sha256").update(data).digest("hex")}.a`
|
|
111795
111810
|
);
|
|
111796
111811
|
import_node_fs142.default.mkdirSync(import_node_path144.default.dirname(file), { recursive: true });
|
|
111797
111812
|
if (!import_node_fs142.default.existsSync(file)) import_node_fs142.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -111801,11 +111816,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
111801
111816
|
}
|
|
111802
111817
|
}
|
|
111803
111818
|
}
|
|
111804
|
-
var
|
|
111819
|
+
var import_node_crypto86, import_node_fs142, import_node_module20, import_node_path144, import_node_util18, recipe, strings4, building;
|
|
111805
111820
|
var init_react_native_core = __esm({
|
|
111806
111821
|
"src/react-native-core.ts"() {
|
|
111807
111822
|
"use strict";
|
|
111808
|
-
|
|
111823
|
+
import_node_crypto86 = require("node:crypto");
|
|
111809
111824
|
import_node_fs142 = __toESM(require("node:fs"), 1);
|
|
111810
111825
|
import_node_module20 = require("node:module");
|
|
111811
111826
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
@@ -111831,7 +111846,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
111831
111846
|
const modules = import_node_path145.default.join(moduleRoot, "modules");
|
|
111832
111847
|
const module2 = import_node_path145.default.join(modules, `${name3}.swiftmodule`);
|
|
111833
111848
|
if (!import_node_fs143.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
111834
|
-
const key2 = (0,
|
|
111849
|
+
const key2 = (0, import_node_crypto87.createHash)("sha256").update(import_node_fs143.default.readFileSync(module2)).digest("hex");
|
|
111835
111850
|
const directory2 = import_node_path145.default.join(swiftCacheDir(), "swift-public-names");
|
|
111836
111851
|
const receipt = import_node_path145.default.join(directory2, `${key2}.json`);
|
|
111837
111852
|
if (import_node_fs143.default.existsSync(receipt)) {
|
|
@@ -111914,12 +111929,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
111914
111929
|
}
|
|
111915
111930
|
);
|
|
111916
111931
|
}
|
|
111917
|
-
var import_node_child_process70,
|
|
111932
|
+
var import_node_child_process70, import_node_crypto87, import_node_fs143, import_node_path145, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
111918
111933
|
var init_swift_clang_type_ownership = __esm({
|
|
111919
111934
|
"src/swift-clang-type-ownership.ts"() {
|
|
111920
111935
|
"use strict";
|
|
111921
111936
|
import_node_child_process70 = require("node:child_process");
|
|
111922
|
-
|
|
111937
|
+
import_node_crypto87 = require("node:crypto");
|
|
111923
111938
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
111924
111939
|
import_node_path145 = __toESM(require("node:path"), 1);
|
|
111925
111940
|
init_is_record();
|
|
@@ -113599,7 +113614,7 @@ function targetSettings2(units) {
|
|
|
113599
113614
|
}
|
|
113600
113615
|
function oneSDKStamp(oneSDK) {
|
|
113601
113616
|
if (!oneSDK) return "";
|
|
113602
|
-
const hash = (0,
|
|
113617
|
+
const hash = (0, import_node_crypto88.createHash)("sha256");
|
|
113603
113618
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
113604
113619
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
113605
113620
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -113650,7 +113665,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
113650
113665
|
`;
|
|
113651
113666
|
}
|
|
113652
113667
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
113653
|
-
const hash = (0,
|
|
113668
|
+
const hash = (0, import_node_crypto88.createHash)("sha256");
|
|
113654
113669
|
hash.update(base2);
|
|
113655
113670
|
hash.update(reactProviderStamp);
|
|
113656
113671
|
for (const unit2 of units) {
|
|
@@ -114023,8 +114038,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
114023
114038
|
}
|
|
114024
114039
|
return provider;
|
|
114025
114040
|
})() : void 0;
|
|
114026
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
114027
|
-
const key2 = (0,
|
|
114041
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto88.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
114042
|
+
const key2 = (0, import_node_crypto88.createHash)("sha256").update(import_node_fs144.default.realpathSync(root)).digest("hex");
|
|
114028
114043
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
114029
114044
|
const failures = /* @__PURE__ */ new Map();
|
|
114030
114045
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -114318,7 +114333,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
114318
114333
|
await check2(part[0]);
|
|
114319
114334
|
continue;
|
|
114320
114335
|
}
|
|
114321
|
-
const name3 = (0,
|
|
114336
|
+
const name3 = (0, import_node_crypto88.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
114322
114337
|
report(`linking ${part.length} namespaces to isolate failures`);
|
|
114323
114338
|
try {
|
|
114324
114339
|
const built2 = await link(part, `isolate-${name3}`);
|
|
@@ -114503,13 +114518,13 @@ ${diagnostics}`}`
|
|
|
114503
114518
|
}
|
|
114504
114519
|
return true;
|
|
114505
114520
|
}
|
|
114506
|
-
var import_node_async_hooks4, import_node_child_process71,
|
|
114521
|
+
var import_node_async_hooks4, import_node_child_process71, import_node_crypto88, import_node_fs144, import_node_module21, import_node_os32, import_node_path146, import_node_url7, import_node_util19, run12, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
114507
114522
|
var init_expo_swift_host = __esm({
|
|
114508
114523
|
"src/expo-swift-host.ts"() {
|
|
114509
114524
|
"use strict";
|
|
114510
114525
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
114511
114526
|
import_node_child_process71 = require("node:child_process");
|
|
114512
|
-
|
|
114527
|
+
import_node_crypto88 = require("node:crypto");
|
|
114513
114528
|
import_node_fs144 = __toESM(require("node:fs"), 1);
|
|
114514
114529
|
import_node_module21 = require("node:module");
|
|
114515
114530
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
@@ -118437,10 +118452,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
118437
118452
|
}
|
|
118438
118453
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
118439
118454
|
const directory2 = prepareStagedDirectory();
|
|
118440
|
-
const inputDigest = (0,
|
|
118455
|
+
const inputDigest = (0, import_node_crypto90.createHash)("sha256").update(input).digest("hex");
|
|
118441
118456
|
const index = import_node_path154.default.join(
|
|
118442
118457
|
directory2,
|
|
118443
|
-
`derived-${(0,
|
|
118458
|
+
`derived-${(0, import_node_crypto90.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
118444
118459
|
);
|
|
118445
118460
|
const recorded = import_node_fs152.default.existsSync(index) ? import_node_fs152.default.readFileSync(index, "utf8") : "";
|
|
118446
118461
|
if (STAGED_NAME.test(recorded) && import_node_fs152.default.existsSync(import_node_path154.default.join(directory2, recorded))) {
|
|
@@ -118451,7 +118466,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
118451
118466
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
118452
118467
|
}
|
|
118453
118468
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
118454
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
118469
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto90.randomUUID)());
|
|
118455
118470
|
try {
|
|
118456
118471
|
import_node_fs152.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
118457
118472
|
flag: "wx"
|
|
@@ -118470,7 +118485,7 @@ function metroIndexName(url) {
|
|
|
118470
118485
|
url.searchParams.get("unstable_path"),
|
|
118471
118486
|
hashes[0]
|
|
118472
118487
|
]);
|
|
118473
|
-
return `metro-${(0,
|
|
118488
|
+
return `metro-${(0, import_node_crypto90.createHash)("sha256").update(key2).digest("hex")}`;
|
|
118474
118489
|
}
|
|
118475
118490
|
function metroRequestIndex(rawUrl) {
|
|
118476
118491
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -118498,7 +118513,7 @@ function prepareStagedDirectory() {
|
|
|
118498
118513
|
return directory2;
|
|
118499
118514
|
}
|
|
118500
118515
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
118501
|
-
const digest3 = (0,
|
|
118516
|
+
const digest3 = (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex");
|
|
118502
118517
|
extension = extension.toLowerCase();
|
|
118503
118518
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
118504
118519
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -118507,7 +118522,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
118507
118522
|
if (import_node_fs152.default.existsSync(destination)) {
|
|
118508
118523
|
import_node_fs152.default.utimesSync(destination, new Date(now), new Date(now));
|
|
118509
118524
|
} else {
|
|
118510
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
118525
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto90.randomUUID)());
|
|
118511
118526
|
try {
|
|
118512
118527
|
import_node_fs152.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
118513
118528
|
import_node_fs152.default.renameSync(temporary, destination);
|
|
@@ -118579,12 +118594,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
118579
118594
|
throw error;
|
|
118580
118595
|
}
|
|
118581
118596
|
}
|
|
118582
|
-
var import_node_async_hooks5,
|
|
118597
|
+
var import_node_async_hooks5, import_node_crypto90, import_node_fs152, import_node_path154, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
|
|
118583
118598
|
var init_staged_host_files = __esm({
|
|
118584
118599
|
"src/host/staged-host-files.ts"() {
|
|
118585
118600
|
"use strict";
|
|
118586
118601
|
import_node_async_hooks5 = require("node:async_hooks");
|
|
118587
|
-
|
|
118602
|
+
import_node_crypto90 = require("node:crypto");
|
|
118588
118603
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
118589
118604
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
118590
118605
|
init_uttype_mime();
|
|
@@ -118632,7 +118647,7 @@ function writeGeneratedFile(file, content) {
|
|
|
118632
118647
|
if (!error || typeof error !== "object" || !("code" in error) || error.code !== "ENOENT")
|
|
118633
118648
|
throw error;
|
|
118634
118649
|
}
|
|
118635
|
-
const temporary = (0, import_node_path156.join)((0, import_node_path156.dirname)(file), `.${(0, import_node_path156.basename)(file)}.${(0,
|
|
118650
|
+
const temporary = (0, import_node_path156.join)((0, import_node_path156.dirname)(file), `.${(0, import_node_path156.basename)(file)}.${(0, import_node_crypto91.randomUUID)()}.tmp`);
|
|
118636
118651
|
try {
|
|
118637
118652
|
(0, import_node_fs154.writeFileSync)(temporary, content);
|
|
118638
118653
|
(0, import_node_fs154.renameSync)(temporary, file);
|
|
@@ -119740,7 +119755,7 @@ function nativeSourceContract(file, source) {
|
|
|
119740
119755
|
enums,
|
|
119741
119756
|
defaultView
|
|
119742
119757
|
});
|
|
119743
|
-
const hash = (0,
|
|
119758
|
+
const hash = (0, import_node_crypto91.createHash)("sha256").update(canonical).digest("hex");
|
|
119744
119759
|
const declarations = structs.map(
|
|
119745
119760
|
(struct) => `export interface ${struct.name} {${struct.fields.map((field) => ` ${field.name}${field.optional ? "?" : ""}: ${field.type};`).join("")} }`
|
|
119746
119761
|
);
|
|
@@ -119875,7 +119890,7 @@ function renderSwiftSourceGlue(packageId, contracts, linkedViews = false) {
|
|
|
119875
119890
|
throw new Error(`swift package ${packageId} declares ${name3} twice`);
|
|
119876
119891
|
names.add(name3);
|
|
119877
119892
|
}
|
|
119878
|
-
const hash = (0,
|
|
119893
|
+
const hash = (0, import_node_crypto91.createHash)("sha256").update(JSON.stringify({ packageId, modules, views })).digest("hex");
|
|
119879
119894
|
const hasMain = contracts.some((contract) => contract.defaultView);
|
|
119880
119895
|
const bodyName = `OneNativeSourceBody_${packageId}`;
|
|
119881
119896
|
const className2 = `OneNativeSource_${packageId}`;
|
|
@@ -120260,11 +120275,11 @@ function renderSwiftSourceGlue(packageId, contracts, linkedViews = false) {
|
|
|
120260
120275
|
].join("\n");
|
|
120261
120276
|
return { hash, source };
|
|
120262
120277
|
}
|
|
120263
|
-
var
|
|
120278
|
+
var import_node_crypto91, import_node_fs154, import_node_path156, GENERATED_HEADER, DECLARATION_MODIFIERS, PLAIN_ATTRIBUTES, STRUCT_MEMBER_WORDS;
|
|
120264
120279
|
var init_nativeSourceContract = __esm({
|
|
120265
120280
|
"../one-bundler/src/nativeSourceContract.ts"() {
|
|
120266
120281
|
"use strict";
|
|
120267
|
-
|
|
120282
|
+
import_node_crypto91 = require("node:crypto");
|
|
120268
120283
|
import_node_fs154 = require("node:fs");
|
|
120269
120284
|
import_node_path156 = require("node:path");
|
|
120270
120285
|
init_swiftPackageId();
|
|
@@ -120336,7 +120351,7 @@ function chunkKey2(lines) {
|
|
|
120336
120351
|
return lines.map((item) => item.text).join("\n");
|
|
120337
120352
|
}
|
|
120338
120353
|
function stableShardIndex(key2, shardCount) {
|
|
120339
|
-
return (0,
|
|
120354
|
+
return (0, import_node_crypto92.createHash)("sha256").update(key2).digest().readUInt32BE(0) % shardCount;
|
|
120340
120355
|
}
|
|
120341
120356
|
function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SHARDS) {
|
|
120342
120357
|
if (shardCount <= 1 || !name3.endsWith(".swift") || name3.endsWith(".types.swift") || source.length < ONE_SDK_BINDING_SHARD_MIN_BYTES) {
|
|
@@ -120580,11 +120595,11 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
|
|
|
120580
120595
|
};
|
|
120581
120596
|
});
|
|
120582
120597
|
}
|
|
120583
|
-
var
|
|
120598
|
+
var import_node_crypto92, import_node_path157, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES;
|
|
120584
120599
|
var init_one_sdk_shard = __esm({
|
|
120585
120600
|
"../peach-globals/build/one-sdk-shard.ts"() {
|
|
120586
120601
|
"use strict";
|
|
120587
|
-
|
|
120602
|
+
import_node_crypto92 = require("node:crypto");
|
|
120588
120603
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
120589
120604
|
init_swift_source_mask();
|
|
120590
120605
|
ONE_SDK_BINDING_SHARDS = 8;
|
|
@@ -124666,7 +124681,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2, appPackages
|
|
|
124666
124681
|
""
|
|
124667
124682
|
].join("\n");
|
|
124668
124683
|
}
|
|
124669
|
-
const digest3 = (0,
|
|
124684
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256").update(manifest);
|
|
124670
124685
|
for (const [name3, source] of files2)
|
|
124671
124686
|
digest3.update(name3).update("\0").update(source).update("\0");
|
|
124672
124687
|
const key2 = digest3.digest("hex").slice(0, 16);
|
|
@@ -124689,11 +124704,11 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2, appPackages
|
|
|
124689
124704
|
...oneSDKShards.size ? { oneSDKShards } : {}
|
|
124690
124705
|
};
|
|
124691
124706
|
}
|
|
124692
|
-
var
|
|
124707
|
+
var import_node_crypto93, import_node_fs157, import_node_module22, import_node_path160, import_node_url8, ONE_SDK_DEFINES, GUEST_ENTRY, BRIDGE_SWIFT, ONE_SDK_RUNTIME_SOURCES, ONE_NATIVE_STYLE_SHARDS, ONE_NATIVE_STYLE_SHARD_MIN_BYTES, DIRECT_HOST_SWIFT_SEEDS, DIRECT_HOST_IOS_FILES;
|
|
124693
124708
|
var init_one_native_controls_package = __esm({
|
|
124694
124709
|
"src/one-native-controls-package.ts"() {
|
|
124695
124710
|
"use strict";
|
|
124696
|
-
|
|
124711
|
+
import_node_crypto93 = require("node:crypto");
|
|
124697
124712
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
124698
124713
|
import_node_module22 = require("node:module");
|
|
124699
124714
|
import_node_path160 = __toESM(require("node:path"), 1);
|
|
@@ -126028,7 +126043,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
126028
126043
|
if (!Buffer.from(text7).equals(bytes))
|
|
126029
126044
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
126030
126045
|
files2.set(name3, text7);
|
|
126031
|
-
sources[import_node_path162.default.relative(root, file).split(import_node_path162.default.sep).join("/")] = (0,
|
|
126046
|
+
sources[import_node_path162.default.relative(root, file).split(import_node_path162.default.sep).join("/")] = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
|
|
126032
126047
|
}
|
|
126033
126048
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
126034
126049
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -126052,17 +126067,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
126052
126067
|
return {
|
|
126053
126068
|
metadata: source.widget,
|
|
126054
126069
|
projectRoot: source.root,
|
|
126055
|
-
appIdentity: (0,
|
|
126070
|
+
appIdentity: (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
126056
126071
|
bundleUrl,
|
|
126057
126072
|
packageUrl,
|
|
126058
126073
|
urlSchemes: source.urlSchemes
|
|
126059
126074
|
};
|
|
126060
126075
|
}
|
|
126061
|
-
var
|
|
126076
|
+
var import_node_crypto94, import_node_fs159, import_node_path162, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
126062
126077
|
var init_one_widget_metadata = __esm({
|
|
126063
126078
|
"src/one-widget-metadata.ts"() {
|
|
126064
126079
|
"use strict";
|
|
126065
|
-
|
|
126080
|
+
import_node_crypto94 = require("node:crypto");
|
|
126066
126081
|
import_node_fs159 = __toESM(require("node:fs"), 1);
|
|
126067
126082
|
import_node_path162 = __toESM(require("node:path"), 1);
|
|
126068
126083
|
init_is_record();
|
|
@@ -126096,7 +126111,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
126096
126111
|
const packagePath = import_node_path163.default.join(
|
|
126097
126112
|
import_node_os34.default.tmpdir(),
|
|
126098
126113
|
"peach-one-widgets",
|
|
126099
|
-
(0,
|
|
126114
|
+
(0, import_node_crypto95.createHash)("sha256").update(root).digest("hex"),
|
|
126100
126115
|
ONE_WIDGET_PACKAGE
|
|
126101
126116
|
);
|
|
126102
126117
|
import_node_fs160.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -126110,11 +126125,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
126110
126125
|
widget
|
|
126111
126126
|
};
|
|
126112
126127
|
}
|
|
126113
|
-
var
|
|
126128
|
+
var import_node_crypto95, import_node_fs160, import_node_os34, import_node_path163;
|
|
126114
126129
|
var init_one_widget_package = __esm({
|
|
126115
126130
|
"src/one-widget-package.ts"() {
|
|
126116
126131
|
"use strict";
|
|
126117
|
-
|
|
126132
|
+
import_node_crypto95 = require("node:crypto");
|
|
126118
126133
|
import_node_fs160 = __toESM(require("node:fs"), 1);
|
|
126119
126134
|
import_node_os34 = __toESM(require("node:os"), 1);
|
|
126120
126135
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
@@ -126330,7 +126345,7 @@ var init_android_view_classes = __esm({
|
|
|
126330
126345
|
|
|
126331
126346
|
// src/java-module-abi.ts
|
|
126332
126347
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
126333
|
-
const digest3 = (0,
|
|
126348
|
+
const digest3 = (0, import_node_crypto96.createHash)("sha256");
|
|
126334
126349
|
const parent = import_node_path165.default.join(kotlinHome(), "java-specs");
|
|
126335
126350
|
import_node_fs162.default.mkdirSync(parent, { recursive: true });
|
|
126336
126351
|
const work = import_node_fs162.default.mkdtempSync(import_node_path165.default.join(parent, ".read-"));
|
|
@@ -126427,12 +126442,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
126427
126442
|
);
|
|
126428
126443
|
return library;
|
|
126429
126444
|
}
|
|
126430
|
-
var import_node_child_process74,
|
|
126445
|
+
var import_node_child_process74, import_node_crypto96, import_node_fs162, import_node_path165, import_node_util20, run13, JAVA_BINDINGS_INITIALIZER;
|
|
126431
126446
|
var init_java_module_abi = __esm({
|
|
126432
126447
|
"src/java-module-abi.ts"() {
|
|
126433
126448
|
"use strict";
|
|
126434
126449
|
import_node_child_process74 = require("node:child_process");
|
|
126435
|
-
|
|
126450
|
+
import_node_crypto96 = require("node:crypto");
|
|
126436
126451
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
126437
126452
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
126438
126453
|
import_node_util20 = require("node:util");
|
|
@@ -126760,7 +126775,7 @@ function zipSources(bytes, where) {
|
|
|
126760
126775
|
return entries2;
|
|
126761
126776
|
}
|
|
126762
126777
|
function extract(bytes, where) {
|
|
126763
|
-
const key2 = (0,
|
|
126778
|
+
const key2 = (0, import_node_crypto97.createHash)("sha256").update(bytes).digest("hex");
|
|
126764
126779
|
const cached4 = pending.get(key2);
|
|
126765
126780
|
if (cached4) return cached4;
|
|
126766
126781
|
const request = (async () => {
|
|
@@ -126809,11 +126824,11 @@ function readSourcesJar(archive, where) {
|
|
|
126809
126824
|
function readMavenSourcesArchive(archive) {
|
|
126810
126825
|
return extract(readSourcesJar(archive, archive), archive);
|
|
126811
126826
|
}
|
|
126812
|
-
var
|
|
126827
|
+
var import_node_crypto97, import_node_fs164, import_node_os35, import_node_path167, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
|
|
126813
126828
|
var init_kotlin_maven_sources = __esm({
|
|
126814
126829
|
"src/kotlin-maven-sources.ts"() {
|
|
126815
126830
|
"use strict";
|
|
126816
|
-
|
|
126831
|
+
import_node_crypto97 = require("node:crypto");
|
|
126817
126832
|
import_node_fs164 = __toESM(require("node:fs"), 1);
|
|
126818
126833
|
import_node_os35 = __toESM(require("node:os"), 1);
|
|
126819
126834
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
@@ -126854,7 +126869,7 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
126854
126869
|
])
|
|
126855
126870
|
];
|
|
126856
126871
|
const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
126857
|
-
const suffix = (0,
|
|
126872
|
+
const suffix = (0, import_node_crypto98.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
|
|
126858
126873
|
const klib = import_node_path168.default.join(input.output, `${name3}-${suffix}.klib`);
|
|
126859
126874
|
const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
|
|
126860
126875
|
const abiPairs = java.length ? dependencies.flatMap(
|
|
@@ -126896,11 +126911,11 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
126896
126911
|
}
|
|
126897
126912
|
return [...compiled.values()].map(({ klib }) => klib);
|
|
126898
126913
|
}
|
|
126899
|
-
var
|
|
126914
|
+
var import_node_crypto98, import_node_fs165, import_node_path168;
|
|
126900
126915
|
var init_kotlin_gradle_library_plan = __esm({
|
|
126901
126916
|
"src/kotlin-gradle-library-plan.ts"() {
|
|
126902
126917
|
"use strict";
|
|
126903
|
-
|
|
126918
|
+
import_node_crypto98 = require("node:crypto");
|
|
126904
126919
|
import_node_fs165 = __toESM(require("node:fs"), 1);
|
|
126905
126920
|
import_node_path168 = __toESM(require("node:path"), 1);
|
|
126906
126921
|
init_kotlin_library_sources();
|
|
@@ -127136,17 +127151,17 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
127136
127151
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
127137
127152
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
127138
127153
|
const bytes = import_node_fs166.default.readFileSync(target);
|
|
127139
|
-
if (bytes.length !== expected.bytes || (0,
|
|
127154
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto99.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
127140
127155
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
127141
127156
|
}
|
|
127142
127157
|
return manifest;
|
|
127143
127158
|
}
|
|
127144
127159
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
127145
|
-
const
|
|
127160
|
+
const sha2564 = (0, import_node_crypto99.createHash)("sha256").update(archive).digest("hex");
|
|
127146
127161
|
const parent = import_node_path169.default.join(kotlinHome(), "sdk");
|
|
127147
|
-
const root = import_node_path169.default.join(parent,
|
|
127162
|
+
const root = import_node_path169.default.join(parent, sha2564);
|
|
127148
127163
|
if (import_node_fs166.default.existsSync(root))
|
|
127149
|
-
return { root, sha256:
|
|
127164
|
+
return { root, sha256: sha2564, manifest: verifyKotlinSdkDirectory(root, compiler) };
|
|
127150
127165
|
import_node_fs166.default.mkdirSync(parent, { recursive: true });
|
|
127151
127166
|
const work = import_node_fs166.default.mkdtempSync(import_node_path169.default.join(parent, ".install-"));
|
|
127152
127167
|
try {
|
|
@@ -127166,17 +127181,17 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
127166
127181
|
if (!import_node_fs166.default.existsSync(root)) throw error;
|
|
127167
127182
|
verifyKotlinSdkDirectory(root, compiler);
|
|
127168
127183
|
}
|
|
127169
|
-
return { root, sha256:
|
|
127184
|
+
return { root, sha256: sha2564, manifest };
|
|
127170
127185
|
} finally {
|
|
127171
127186
|
import_node_fs166.default.rmSync(work, { recursive: true, force: true });
|
|
127172
127187
|
}
|
|
127173
127188
|
}
|
|
127174
|
-
var import_node_child_process76,
|
|
127189
|
+
var import_node_child_process76, import_node_crypto99, import_node_fs166, import_node_path169, import_node_util21, run14;
|
|
127175
127190
|
var init_kotlin_sdk = __esm({
|
|
127176
127191
|
"src/kotlin-sdk.ts"() {
|
|
127177
127192
|
"use strict";
|
|
127178
127193
|
import_node_child_process76 = require("node:child_process");
|
|
127179
|
-
|
|
127194
|
+
import_node_crypto99 = require("node:crypto");
|
|
127180
127195
|
import_node_fs166 = __toESM(require("node:fs"), 1);
|
|
127181
127196
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
127182
127197
|
import_node_util21 = require("node:util");
|
|
@@ -127312,7 +127327,7 @@ function peachKotlinModuleRoot() {
|
|
|
127312
127327
|
if (!IS_STANDALONE) return import_node_path170.default.join(peachsimPackageRoot(), "kotlin");
|
|
127313
127328
|
if (installedRoot) return installedRoot;
|
|
127314
127329
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
127315
|
-
const digest3 = (0,
|
|
127330
|
+
const digest3 = (0, import_node_crypto100.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
127316
127331
|
const parent = import_node_path170.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
127317
127332
|
const root = import_node_path170.default.join(parent, digest3);
|
|
127318
127333
|
import_node_fs167.default.mkdirSync(parent, { recursive: true });
|
|
@@ -127341,11 +127356,11 @@ function peachKotlinModuleRoot() {
|
|
|
127341
127356
|
installedRoot = root;
|
|
127342
127357
|
return root;
|
|
127343
127358
|
}
|
|
127344
|
-
var
|
|
127359
|
+
var import_node_crypto100, import_node_fs167, import_node_path170, installedRoot;
|
|
127345
127360
|
var init_kotlin_module = __esm({
|
|
127346
127361
|
"src/kotlin-module.ts"() {
|
|
127347
127362
|
"use strict";
|
|
127348
|
-
|
|
127363
|
+
import_node_crypto100 = require("node:crypto");
|
|
127349
127364
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
127350
127365
|
import_node_path170 = __toESM(require("node:path"), 1);
|
|
127351
127366
|
init_standalone();
|
|
@@ -127379,7 +127394,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
127379
127394
|
const parent = import_node_path171.default.join(kotlinHome(), "gradle-sources");
|
|
127380
127395
|
import_node_fs168.default.mkdirSync(parent, { recursive: true });
|
|
127381
127396
|
const work = import_node_fs168.default.mkdtempSync(import_node_path171.default.join(parent, ".query-"));
|
|
127382
|
-
const task = `peachAndroidSources${(0,
|
|
127397
|
+
const task = `peachAndroidSources${(0, import_node_crypto101.randomBytes)(8).toString("hex")}`;
|
|
127383
127398
|
const script = import_node_path171.default.join(work, "sources.gradle");
|
|
127384
127399
|
const encoded = Buffer.from(
|
|
127385
127400
|
JSON.stringify({
|
|
@@ -127531,12 +127546,12 @@ function readDependencySources(value) {
|
|
|
127531
127546
|
};
|
|
127532
127547
|
});
|
|
127533
127548
|
}
|
|
127534
|
-
var import_node_child_process77,
|
|
127549
|
+
var import_node_child_process77, import_node_crypto101, import_node_fs168, import_node_path171, import_node_util22, run15, modelQuery;
|
|
127535
127550
|
var init_android_gradle_sources = __esm({
|
|
127536
127551
|
"src/android-gradle-sources.ts"() {
|
|
127537
127552
|
"use strict";
|
|
127538
127553
|
import_node_child_process77 = require("node:child_process");
|
|
127539
|
-
|
|
127554
|
+
import_node_crypto101 = require("node:crypto");
|
|
127540
127555
|
import_node_fs168 = __toESM(require("node:fs"), 1);
|
|
127541
127556
|
import_node_path171 = __toESM(require("node:path"), 1);
|
|
127542
127557
|
import_node_util22 = require("node:util");
|
|
@@ -127951,7 +127966,7 @@ function readExpoTypes(output) {
|
|
|
127951
127966
|
});
|
|
127952
127967
|
}
|
|
127953
127968
|
async function scanSources(tool, parse17, toolchain, moduleRoot, files2) {
|
|
127954
|
-
const digest3 = (0,
|
|
127969
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
127955
127970
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
127956
127971
|
digest3.update(import_node_fs169.default.readFileSync(import_node_path172.default.join(moduleRoot, "sdk.tar.gz")));
|
|
127957
127972
|
digest3.update(tool);
|
|
@@ -128613,7 +128628,7 @@ async function compileKotlin(input, origin) {
|
|
|
128613
128628
|
bytes: import_node_fs169.default.readFileSync(file)
|
|
128614
128629
|
}));
|
|
128615
128630
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
128616
|
-
const digest3 = (0,
|
|
128631
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256");
|
|
128617
128632
|
digest3.update(
|
|
128618
128633
|
JSON.stringify({
|
|
128619
128634
|
format: BUILD_FORMAT,
|
|
@@ -128635,7 +128650,7 @@ async function compileKotlin(input, origin) {
|
|
|
128635
128650
|
...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
|
|
128636
128651
|
]);
|
|
128637
128652
|
for (const file of files2) {
|
|
128638
|
-
digest3.update((0,
|
|
128653
|
+
digest3.update((0, import_node_crypto102.createHash)("sha256").update(import_node_fs169.default.readFileSync(file)).digest());
|
|
128639
128654
|
}
|
|
128640
128655
|
}
|
|
128641
128656
|
if (viewModels) digest3.update(viewModels.toolClass);
|
|
@@ -128927,12 +128942,12 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
128927
128942
|
}
|
|
128928
128943
|
return true;
|
|
128929
128944
|
}
|
|
128930
|
-
var import_node_child_process78,
|
|
128945
|
+
var import_node_child_process78, import_node_crypto102, import_node_fs169, import_node_module23, import_node_path172, import_node_util23, run16, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal3, CONTENT_TYPES;
|
|
128931
128946
|
var init_kotlin_host = __esm({
|
|
128932
128947
|
"src/kotlin-host.ts"() {
|
|
128933
128948
|
"use strict";
|
|
128934
128949
|
import_node_child_process78 = require("node:child_process");
|
|
128935
|
-
|
|
128950
|
+
import_node_crypto102 = require("node:crypto");
|
|
128936
128951
|
import_node_fs169 = __toESM(require("node:fs"), 1);
|
|
128937
128952
|
import_node_module23 = require("node:module");
|
|
128938
128953
|
import_node_path172 = __toESM(require("node:path"), 1);
|
|
@@ -129288,7 +129303,7 @@ async function readManagedExpoIdentity(root, platform3, iosTarget, bridgeOrigin)
|
|
|
129288
129303
|
url.searchParams.set("root", root);
|
|
129289
129304
|
const response = await nodeHttpFetch(url.href);
|
|
129290
129305
|
if (response.ok && response.headers.get("content-type") === revisionType) {
|
|
129291
|
-
const environment = (0,
|
|
129306
|
+
const environment = (0, import_node_crypto103.createHash)("sha256").update(JSON.stringify(Object.entries(process.env).sort())).digest("hex");
|
|
129292
129307
|
const inputs2 = Buffer.from(
|
|
129293
129308
|
JSON.stringify([
|
|
129294
129309
|
await response.text(),
|
|
@@ -129344,11 +129359,11 @@ function handleManagedExpoInputs(req, res, url) {
|
|
|
129344
129359
|
res.writeHead(200, { "Content-Type": revisionType });
|
|
129345
129360
|
res.end(revision);
|
|
129346
129361
|
}
|
|
129347
|
-
var
|
|
129362
|
+
var import_node_crypto103, import_node_fs171, import_node_path174, revisionType;
|
|
129348
129363
|
var init_managed_expo_identity = __esm({
|
|
129349
129364
|
"src/managed-expo-identity.ts"() {
|
|
129350
129365
|
"use strict";
|
|
129351
|
-
|
|
129366
|
+
import_node_crypto103 = require("node:crypto");
|
|
129352
129367
|
import_node_fs171 = __toESM(require("node:fs"), 1);
|
|
129353
129368
|
import_node_path174 = __toESM(require("node:path"), 1);
|
|
129354
129369
|
init_backend_origin();
|
|
@@ -129463,8 +129478,8 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
129463
129478
|
const ext = import_node_path177.default.extname(file);
|
|
129464
129479
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
129465
129480
|
if (ext.toLowerCase() === ".pdf") {
|
|
129466
|
-
const
|
|
129467
|
-
const png = rasterizePdfFiles([{ file: members2.get(file), sha256:
|
|
129481
|
+
const sha2564 = (0, import_node_crypto104.createHash)("sha256").update(bytes).digest("hex");
|
|
129482
|
+
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2564 }]).get(sha2564);
|
|
129468
129483
|
return stageHostBytes(png, origin, ".png");
|
|
129469
129484
|
}
|
|
129470
129485
|
return stageHostBytes(bytes, origin, ext);
|
|
@@ -129476,11 +129491,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
129476
129491
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
129477
129492
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
129478
129493
|
}
|
|
129479
|
-
var
|
|
129494
|
+
var import_node_crypto104, import_node_fs173, import_node_path177;
|
|
129480
129495
|
var init_expo_widget_assets = __esm({
|
|
129481
129496
|
"src/expo-widget-assets.ts"() {
|
|
129482
129497
|
"use strict";
|
|
129483
|
-
|
|
129498
|
+
import_node_crypto104 = require("node:crypto");
|
|
129484
129499
|
import_node_fs173 = __toESM(require("node:fs"), 1);
|
|
129485
129500
|
import_node_path177 = __toESM(require("node:path"), 1);
|
|
129486
129501
|
init_app_catalog();
|
|
@@ -129535,11 +129550,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
129535
129550
|
"specifications",
|
|
129536
129551
|
`${checksum}.json`
|
|
129537
129552
|
);
|
|
129538
|
-
const sha1 = (value) => (0,
|
|
129553
|
+
const sha1 = (value) => (0, import_node_crypto105.createHash)("sha1").update(value).digest("hex");
|
|
129539
129554
|
let text7;
|
|
129540
129555
|
if (import_node_fs174.default.existsSync(file)) text7 = import_node_fs174.default.readFileSync(file, "utf8");
|
|
129541
129556
|
else {
|
|
129542
|
-
const shard2 = (0,
|
|
129557
|
+
const shard2 = (0, import_node_crypto105.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
129543
129558
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
129544
129559
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
129545
129560
|
if (!response.ok)
|
|
@@ -129668,7 +129683,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
129668
129683
|
"end",
|
|
129669
129684
|
""
|
|
129670
129685
|
].join("\n");
|
|
129671
|
-
const key2 = (0,
|
|
129686
|
+
const key2 = (0, import_node_crypto105.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
129672
129687
|
JSON.stringify(
|
|
129673
129688
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
129674
129689
|
)
|
|
@@ -129737,11 +129752,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
129737
129752
|
);
|
|
129738
129753
|
});
|
|
129739
129754
|
}
|
|
129740
|
-
var
|
|
129755
|
+
var import_node_crypto105, import_node_fs174, import_node_path178, APP, record5, project, podModuleName;
|
|
129741
129756
|
var init_swift_source_pods = __esm({
|
|
129742
129757
|
"src/swift-source-pods.ts"() {
|
|
129743
129758
|
"use strict";
|
|
129744
|
-
|
|
129759
|
+
import_node_crypto105 = require("node:crypto");
|
|
129745
129760
|
import_node_fs174 = __toESM(require("node:fs"), 1);
|
|
129746
129761
|
import_node_path178 = __toESM(require("node:path"), 1);
|
|
129747
129762
|
init_browser();
|
|
@@ -130422,7 +130437,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
130422
130437
|
input.libraries ??= {};
|
|
130423
130438
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
130424
130439
|
}
|
|
130425
|
-
const key2 = (0,
|
|
130440
|
+
const key2 = (0, import_node_crypto106.createHash)("sha256").update(
|
|
130426
130441
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
130427
130442
|
).update("\0").update(import_node_fs175.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
130428
130443
|
const packagePath = import_node_path179.default.join(import_node_os36.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -130478,11 +130493,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
130478
130493
|
...sources(import_node_path179.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
130479
130494
|
];
|
|
130480
130495
|
}
|
|
130481
|
-
var
|
|
130496
|
+
var import_node_crypto106, import_node_fs175, import_node_os36, import_node_path179, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
|
|
130482
130497
|
var init_nitro_compile = __esm({
|
|
130483
130498
|
"src/nitro-compile.ts"() {
|
|
130484
130499
|
"use strict";
|
|
130485
|
-
|
|
130500
|
+
import_node_crypto106 = require("node:crypto");
|
|
130486
130501
|
import_node_fs175 = __toESM(require("node:fs"), 1);
|
|
130487
130502
|
import_node_os36 = __toESM(require("node:os"), 1);
|
|
130488
130503
|
import_node_path179 = __toESM(require("node:path"), 1);
|
|
@@ -130559,11 +130574,11 @@ var init_nitro_compile = __esm({
|
|
|
130559
130574
|
});
|
|
130560
130575
|
|
|
130561
130576
|
// src/nitro-compiler-digest.ts
|
|
130562
|
-
var
|
|
130577
|
+
var import_node_crypto107, import_node_fs176, import_node_path180;
|
|
130563
130578
|
var init_nitro_compiler_digest = __esm({
|
|
130564
130579
|
"src/nitro-compiler-digest.ts"() {
|
|
130565
130580
|
"use strict";
|
|
130566
|
-
|
|
130581
|
+
import_node_crypto107 = require("node:crypto");
|
|
130567
130582
|
import_node_fs176 = require("node:fs");
|
|
130568
130583
|
import_node_path180 = __toESM(require("node:path"), 1);
|
|
130569
130584
|
init_swift_compiler_digest();
|
|
@@ -130701,7 +130716,7 @@ var init_nitro_superset = __esm({
|
|
|
130701
130716
|
init_nitroContract();
|
|
130702
130717
|
init_swift_standin_digest();
|
|
130703
130718
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
130704
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
130719
|
+
NITRO_COMPILER_DIGEST = true ? "9e51ce132e701d77aa700249b4788f66b041f8f00fbd0bac84d9a3c8ed3a7569" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
130705
130720
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
130706
130721
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
130707
130722
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -131067,7 +131082,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
131067
131082
|
const packagePath = import_node_path184.default.join(
|
|
131068
131083
|
swiftCacheDir(),
|
|
131069
131084
|
"peach-one-sdk-swift",
|
|
131070
|
-
(0,
|
|
131085
|
+
(0, import_node_crypto108.createHash)("sha256").update(import_node_fs179.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
131071
131086
|
"sdk"
|
|
131072
131087
|
);
|
|
131073
131088
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -131114,11 +131129,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
131114
131129
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
131115
131130
|
};
|
|
131116
131131
|
}
|
|
131117
|
-
var
|
|
131132
|
+
var import_node_crypto108, import_node_fs179, import_node_path184, ONE_SDK_ROUTE, handleOneSDKRequest;
|
|
131118
131133
|
var init_one_sdk_bundle = __esm({
|
|
131119
131134
|
"src/one-sdk-bundle.ts"() {
|
|
131120
131135
|
"use strict";
|
|
131121
|
-
|
|
131136
|
+
import_node_crypto108 = require("node:crypto");
|
|
131122
131137
|
import_node_fs179 = __toESM(require("node:fs"), 1);
|
|
131123
131138
|
import_node_path184 = __toESM(require("node:path"), 1);
|
|
131124
131139
|
init_one_sdk_shard();
|
|
@@ -131809,11 +131824,11 @@ function readSharedDesktopAuthSession() {
|
|
|
131809
131824
|
return null;
|
|
131810
131825
|
}
|
|
131811
131826
|
}
|
|
131812
|
-
var
|
|
131827
|
+
var import_node_crypto109, import_node_fs183, import_node_path189, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
131813
131828
|
var init_shared_session = __esm({
|
|
131814
131829
|
"src/auth/shared-session.ts"() {
|
|
131815
131830
|
"use strict";
|
|
131816
|
-
|
|
131831
|
+
import_node_crypto109 = require("node:crypto");
|
|
131817
131832
|
import_node_fs183 = require("node:fs");
|
|
131818
131833
|
import_node_path189 = require("node:path");
|
|
131819
131834
|
init_home_paths();
|
|
@@ -131851,7 +131866,7 @@ var init_run_rnx = __esm({
|
|
|
131851
131866
|
// cli/secure-file.ts
|
|
131852
131867
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
131853
131868
|
(0, import_node_fs184.mkdirSync)((0, import_node_path190.dirname)(filepath), { recursive: true });
|
|
131854
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
131869
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto110.randomUUID)()}`;
|
|
131855
131870
|
let descriptor = null;
|
|
131856
131871
|
try {
|
|
131857
131872
|
descriptor = (0, import_node_fs184.openSync)(temporary, "wx", 384);
|
|
@@ -131868,11 +131883,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
131868
131883
|
throw error;
|
|
131869
131884
|
}
|
|
131870
131885
|
}
|
|
131871
|
-
var
|
|
131886
|
+
var import_node_crypto110, import_node_fs184, import_node_path190;
|
|
131872
131887
|
var init_secure_file = __esm({
|
|
131873
131888
|
"cli/secure-file.ts"() {
|
|
131874
131889
|
"use strict";
|
|
131875
|
-
|
|
131890
|
+
import_node_crypto110 = require("node:crypto");
|
|
131876
131891
|
import_node_fs184 = require("node:fs");
|
|
131877
131892
|
import_node_path190 = require("node:path");
|
|
131878
131893
|
}
|
|
@@ -132650,6 +132665,11 @@ async function sha256HexBytes(bytes) {
|
|
|
132650
132665
|
for (const byte of new Uint8Array(digest3)) hex += byte.toString(16).padStart(2, "0");
|
|
132651
132666
|
return hex;
|
|
132652
132667
|
}
|
|
132668
|
+
async function sha256Hex3(input) {
|
|
132669
|
+
return sha256HexBytes(
|
|
132670
|
+
typeof input === "string" ? new TextEncoder().encode(input) : input
|
|
132671
|
+
);
|
|
132672
|
+
}
|
|
132653
132673
|
async function assertSelfContainedMetroArtifactAssets(bundle) {
|
|
132654
132674
|
return visitVerifiedMetroArtifactAssets(
|
|
132655
132675
|
bundle,
|
|
@@ -132749,24 +132769,24 @@ async function separateMetroArtifactAssets(bundle) {
|
|
|
132749
132769
|
entry = { fileUris: [], fileHashes: [], scales: descriptor.scales };
|
|
132750
132770
|
entries2.set(key2, entry);
|
|
132751
132771
|
}
|
|
132752
|
-
const
|
|
132772
|
+
const sha2564 = descriptor.fileHashes?.[index];
|
|
132753
132773
|
const scale = descriptor.scales[index];
|
|
132754
|
-
if (!
|
|
132774
|
+
if (!sha2564 || scale === void 0) {
|
|
132755
132775
|
throw new Error("verified Metro asset variant is incomplete");
|
|
132756
132776
|
}
|
|
132757
132777
|
const filename = metroAssetScaleFilename(descriptor.name, descriptor.type, scale);
|
|
132758
|
-
const uri = `${PEACH_BUNDLE_ASSET_PREFIX}${
|
|
132778
|
+
const uri = `${PEACH_BUNDLE_ASSET_PREFIX}${sha2564}/${encodeURIComponent(filename)}`;
|
|
132759
132779
|
if (!resources.has(uri)) {
|
|
132760
132780
|
resources.set(uri, {
|
|
132761
132781
|
uri,
|
|
132762
|
-
sha256:
|
|
132782
|
+
sha256: sha2564,
|
|
132763
132783
|
contentType: metroAssetContentType(descriptor.type),
|
|
132764
132784
|
bytes,
|
|
132765
132785
|
byteLength: bytes.byteLength
|
|
132766
132786
|
});
|
|
132767
132787
|
}
|
|
132768
132788
|
entry.fileUris.push(uri);
|
|
132769
|
-
entry.fileHashes.push(
|
|
132789
|
+
entry.fileHashes.push(sha2564);
|
|
132770
132790
|
},
|
|
132771
132791
|
(site) => {
|
|
132772
132792
|
const entry = entries2.get(assetDescriptorKey(site.descriptor));
|
|
@@ -134061,7 +134081,7 @@ async function buildRnxCloudArtifact(bundle, options2 = {}) {
|
|
|
134061
134081
|
}
|
|
134062
134082
|
const composed = composeRnxCloudDebugSourceMap(bundleSourceMap, sections);
|
|
134063
134083
|
sourceMap = {
|
|
134064
|
-
id: `sha256:${await
|
|
134084
|
+
id: `sha256:${await sha256Hex3(composed.json)}`,
|
|
134065
134085
|
bytes: composed.bytes,
|
|
134066
134086
|
json: composed.json,
|
|
134067
134087
|
resolved: composed.resolved,
|
|
@@ -134082,7 +134102,7 @@ async function buildRnxCloudArtifact(bundle, options2 = {}) {
|
|
|
134082
134102
|
version: 2,
|
|
134083
134103
|
mode,
|
|
134084
134104
|
source: {
|
|
134085
|
-
sha256: await
|
|
134105
|
+
sha256: await sha256Hex3(bundle),
|
|
134086
134106
|
bytes: Buffer.byteLength(bundle, "utf8")
|
|
134087
134107
|
},
|
|
134088
134108
|
modules,
|
|
@@ -134093,7 +134113,7 @@ async function buildRnxCloudArtifact(bundle, options2 = {}) {
|
|
|
134093
134113
|
assets: { ...assets2, encodedBytes: artifactEncoded },
|
|
134094
134114
|
debug: sourceMap ? { sourceMap: { id: sourceMap.id, bytes: sourceMap.bytes } } : null,
|
|
134095
134115
|
artifact: {
|
|
134096
|
-
sha256: await
|
|
134116
|
+
sha256: await sha256Hex3(code),
|
|
134097
134117
|
bytes: artifactBytes
|
|
134098
134118
|
}
|
|
134099
134119
|
}
|
|
@@ -134234,11 +134254,11 @@ function createCloudSession(input) {
|
|
|
134234
134254
|
}
|
|
134235
134255
|
return session;
|
|
134236
134256
|
}
|
|
134237
|
-
var
|
|
134257
|
+
var import_node_crypto111, import_node_fs186, import_node_path192, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET;
|
|
134238
134258
|
var init_cloud_session = __esm({
|
|
134239
134259
|
"cli/cloud-session.ts"() {
|
|
134240
134260
|
"use strict";
|
|
134241
|
-
|
|
134261
|
+
import_node_crypto111 = require("node:crypto");
|
|
134242
134262
|
import_node_fs186 = require("node:fs");
|
|
134243
134263
|
import_node_path192 = require("node:path");
|
|
134244
134264
|
init_backend_origin();
|
|
@@ -134500,7 +134520,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
134500
134520
|
return { directory: directory2, files: files2, truncated };
|
|
134501
134521
|
}
|
|
134502
134522
|
function metroDescriptorHash(scaleBytes) {
|
|
134503
|
-
const hasher = (0,
|
|
134523
|
+
const hasher = (0, import_node_crypto112.createHash)("md5");
|
|
134504
134524
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
134505
134525
|
return hasher.digest("hex");
|
|
134506
134526
|
}
|
|
@@ -134529,7 +134549,7 @@ function distinctByContent(directory2, options2) {
|
|
|
134529
134549
|
} catch {
|
|
134530
134550
|
continue;
|
|
134531
134551
|
}
|
|
134532
|
-
const digest3 = (0,
|
|
134552
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(bytes).digest("hex");
|
|
134533
134553
|
if (!byContent.has(digest3)) byContent.set(digest3, relative7);
|
|
134534
134554
|
}
|
|
134535
134555
|
return [...byContent.values()];
|
|
@@ -134577,7 +134597,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
134577
134597
|
continue;
|
|
134578
134598
|
}
|
|
134579
134599
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
134580
|
-
const digest3 = (0,
|
|
134600
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(file).digest("hex");
|
|
134581
134601
|
return descriptor.scales.some(
|
|
134582
134602
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
134583
134603
|
);
|
|
@@ -134602,7 +134622,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
134602
134622
|
const file = (0, import_node_path194.join)(dest.directory, relative7);
|
|
134603
134623
|
let digest3 = fileDigests2.get(file);
|
|
134604
134624
|
if (digest3 === void 0) {
|
|
134605
|
-
digest3 = (0,
|
|
134625
|
+
digest3 = (0, import_node_crypto112.createHash)("sha256").update((0, import_node_fs188.readFileSync)(file)).digest("hex");
|
|
134606
134626
|
fileDigests2.set(file, digest3);
|
|
134607
134627
|
}
|
|
134608
134628
|
return [scale, digest3];
|
|
@@ -134891,7 +134911,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
134891
134911
|
}
|
|
134892
134912
|
return {
|
|
134893
134913
|
bytes,
|
|
134894
|
-
sha256: (0,
|
|
134914
|
+
sha256: (0, import_node_crypto112.createHash)("sha256").update(bytes).digest("hex"),
|
|
134895
134915
|
receipt: artifact.receipt,
|
|
134896
134916
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
134897
134917
|
warnings
|
|
@@ -134996,11 +135016,11 @@ async function createCloudBox(options2) {
|
|
|
134996
135016
|
warnings: artifact.warnings
|
|
134997
135017
|
};
|
|
134998
135018
|
}
|
|
134999
|
-
var
|
|
135019
|
+
var import_node_crypto112, import_node_fs188, import_node_path194, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS;
|
|
135000
135020
|
var init_cloud_client = __esm({
|
|
135001
135021
|
"cli/cloud-client.ts"() {
|
|
135002
135022
|
"use strict";
|
|
135003
|
-
|
|
135023
|
+
import_node_crypto112 = require("node:crypto");
|
|
135004
135024
|
import_node_fs188 = require("node:fs");
|
|
135005
135025
|
import_node_path194 = require("node:path");
|
|
135006
135026
|
import_node_vm = require("node:vm");
|
|
@@ -135182,14 +135202,14 @@ init_oneNativeControlsContract();
|
|
|
135182
135202
|
var ONE_NATIVE_CONTROLS_RELEASE_BUNDLE = "one-native-controls-release.tar.gz";
|
|
135183
135203
|
var ONE_NATIVE_CONTROLS_RELEASE_PIN = "one-native-controls.sha256";
|
|
135184
135204
|
var ONE_NATIVE_CONTROLS_STAGED_BUNDLE = `.vite/${ONE_NATIVE_CONTROLS_RELEASE_BUNDLE}`;
|
|
135185
|
-
function oneNativeControlsReleaseObject(
|
|
135186
|
-
return `native/swift-package/${ONE_NATIVE_CONTROLS_PACKAGE}/releases/${
|
|
135205
|
+
function oneNativeControlsReleaseObject(sha2564) {
|
|
135206
|
+
return `native/swift-package/${ONE_NATIVE_CONTROLS_PACKAGE}/releases/${sha2564}.tar.gz`;
|
|
135187
135207
|
}
|
|
135188
135208
|
function parseOneNativeControlsReleasePin(pin2, file) {
|
|
135189
|
-
const
|
|
135190
|
-
if (!/^[a-f0-9]{64}$/.test(
|
|
135209
|
+
const sha2564 = pin2.trim();
|
|
135210
|
+
if (!/^[a-f0-9]{64}$/.test(sha2564))
|
|
135191
135211
|
throw new Error(`invalid OneNativeControls release digest at ${file}`);
|
|
135192
|
-
return
|
|
135212
|
+
return sha2564;
|
|
135193
135213
|
}
|
|
135194
135214
|
|
|
135195
135215
|
// src/one-native-controls-release.ts
|
|
@@ -135209,22 +135229,22 @@ function isOneNativeControlsReleaseAsset(pathname) {
|
|
|
135209
135229
|
async function serveOneNativeControlsRelease(req, res, pathname, runtime) {
|
|
135210
135230
|
const pin2 = import_node_path8.default.join(runtime, ONE_NATIVE_CONTROLS_RELEASE_PIN);
|
|
135211
135231
|
if (!import_node_fs10.default.existsSync(pin2)) return false;
|
|
135212
|
-
const
|
|
135213
|
-
const destDir = import_node_path8.default.join(cacheDir(), "one-native-controls",
|
|
135232
|
+
const sha2564 = parseOneNativeControlsReleasePin(import_node_fs10.default.readFileSync(pin2, "utf8"), pin2);
|
|
135233
|
+
const destDir = import_node_path8.default.join(cacheDir(), "one-native-controls", sha2564);
|
|
135214
135234
|
const metadata = pathname === ONE_NATIVE_CONTROLS_METADATA_PATH;
|
|
135215
135235
|
if (metadata && !import_node_fs10.default.existsSync(import_node_path8.default.join(destDir, METADATA_FILE))) {
|
|
135216
|
-
let pending2 = installing.get(
|
|
135236
|
+
let pending2 = installing.get(sha2564);
|
|
135217
135237
|
if (!pending2) {
|
|
135218
135238
|
const staged = import_node_path8.default.join(runtime, ONE_NATIVE_CONTROLS_STAGED_BUNDLE);
|
|
135219
135239
|
pending2 = installVerifiedTarball({
|
|
135220
|
-
url: `${NATIVE_PREBUILT_ORIGIN}/${oneNativeControlsReleaseObject(
|
|
135240
|
+
url: `${NATIVE_PREBUILT_ORIGIN}/${oneNativeControlsReleaseObject(sha2564)}`,
|
|
135221
135241
|
localPath: import_node_fs10.default.existsSync(staged) ? staged : void 0,
|
|
135222
|
-
digest: { algorithm: "sha256", encoding: "hex", value:
|
|
135242
|
+
digest: { algorithm: "sha256", encoding: "hex", value: sha2564 },
|
|
135223
135243
|
destDir,
|
|
135224
135244
|
installedMarker: METADATA_FILE,
|
|
135225
135245
|
label: ONE_NATIVE_CONTROLS_PACKAGE
|
|
135226
|
-
}).finally(() => installing.delete(
|
|
135227
|
-
installing.set(
|
|
135246
|
+
}).finally(() => installing.delete(sha2564));
|
|
135247
|
+
installing.set(sha2564, pending2);
|
|
135228
135248
|
}
|
|
135229
135249
|
await pending2;
|
|
135230
135250
|
}
|
|
@@ -136781,7 +136801,7 @@ init_app_package_handler();
|
|
|
136781
136801
|
init_fetch_proxy_handler();
|
|
136782
136802
|
|
|
136783
136803
|
// src/host/fetch-proxy-transport.ts
|
|
136784
|
-
var
|
|
136804
|
+
var import_node_crypto89 = require("node:crypto");
|
|
136785
136805
|
var import_node_fs148 = require("node:fs");
|
|
136786
136806
|
var import_node_http23 = require("node:http2");
|
|
136787
136807
|
var import_node_path150 = __toESM(require("node:path"), 1);
|
|
@@ -136814,7 +136834,7 @@ async function createIdentity() {
|
|
|
136814
136834
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
136815
136835
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
136816
136836
|
{
|
|
136817
|
-
serialNumber: (0,
|
|
136837
|
+
serialNumber: (0, import_node_crypto89.randomBytes)(16).toString("hex"),
|
|
136818
136838
|
name: "CN=localhost",
|
|
136819
136839
|
notBefore: new Date(Date.now() - 6e4),
|
|
136820
136840
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -136833,7 +136853,7 @@ async function createIdentity() {
|
|
|
136833
136853
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
136834
136854
|
-----END PRIVATE KEY-----
|
|
136835
136855
|
`,
|
|
136836
|
-
spki: (0,
|
|
136856
|
+
spki: (0, import_node_crypto89.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
136837
136857
|
};
|
|
136838
136858
|
}
|
|
136839
136859
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|