peachsim 0.1.2719 → 0.1.2721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/perf.ts +1 -1
- package/cli/outbound-endpoints.ts +5 -1
- 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 +3 -3
- 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-HLQBIO7G.mjs → acorn-4E7A2U6H.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-CQP4HSKG.mjs → chunk-45ZGCECG.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-JUSFNEWF.mjs → chunk-4MCMTJ5G.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-32TJO7WG.mjs → chunk-6BADNUEZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TSUIL6TM.mjs → chunk-6HFZ3KYE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V2QAYBA3.mjs → chunk-766BYMYK.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-3WFNLPIU.mjs → chunk-AGAZXCR6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N2GLWCEA.mjs → chunk-ASCVO5WF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UVEXH4V2.mjs → chunk-EA5QOVFS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5HJKEUYR.mjs → chunk-EYLPUO4C.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NIO7JC4J.mjs → chunk-FLWACONK.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-O3FZOIGH.mjs → chunk-HEGLUEU6.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-LYD3A7T7.mjs → chunk-HTSRPV4F.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TC5ZX4NL.mjs → chunk-NB2RYUYI.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-7TPKT32X.mjs → chunk-NW7WBVST.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4QGSHANC.mjs → chunk-QAB422ER.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SWI2TIBZ.mjs → chunk-TNGIOIJO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7OZLNI34.mjs → chunk-VNCW7FO2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JNFVFHX5.mjs → chunk-VYHXAXFB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NSODIIEB.mjs → chunk-WXWTKAZH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LBNY5QNU.mjs → chunk-XDXQJWZV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-U7CB3CY6.mjs → chunk-Y6HDSV4D.mjs} +14 -14
- package/dist-lib/esm-chunks/{chunk-UG3ORZJI.mjs → chunk-YF27YRKF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5MR53PPJ.mjs → chunk-ZBMTCF2K.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-QVZUMAKM.mjs → chunk-ZWLMKCDO.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-E2RGWSGY.mjs → metro-layout-parser-5X5IZMI6.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-FSTJUGGZ.mjs → swift-package-prebuilt-XX3SEWCB.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-AZCNTESQ.mjs → swift-sdk-app-module-IMWGUZW6.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-TDF7S65H.mjs → swift-sdk-image-YS4NE4FU.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-G26I7GG5.mjs → swift-sdk-image-producer-7LXMFVAY.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +3 -3
- 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 +271 -138
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- 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 +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- 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 +85 -85
- package/dist-lib/public-origins-lib.json +66 -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 +312 -178
- package/dist-lib/swift-compile.cjs +1 -1
- 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/package.json +1 -1
- package/src/expo-swift-host.ts +17 -3
- package/src/published-swift-sdk.ts +72 -0
- package/src/swift-host.ts +39 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2721 | (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;
|
|
@@ -5012,11 +5012,11 @@ function attachLocalIcon(result, buildIconProxyUrl) {
|
|
|
5012
5012
|
const rawIcon = result.iconPath;
|
|
5013
5013
|
if (!rawIcon || result.iconUrl) return;
|
|
5014
5014
|
if (rawIcon.startsWith("http://") || rawIcon.startsWith("https://")) return;
|
|
5015
|
-
const
|
|
5016
|
-
if (
|
|
5015
|
+
const assetPath2 = localIconPathCache.get(result.port);
|
|
5016
|
+
if (assetPath2 === null || localIconProbeInFlight.has(result.port)) return;
|
|
5017
5017
|
const hostname2 = normalizeHostname(new URL(result.bundleUrl).hostname);
|
|
5018
|
-
if (
|
|
5019
|
-
const localUrl = buildLoopbackProbeBaseUrl("http:", hostname2, result.port) +
|
|
5018
|
+
if (assetPath2 !== void 0) {
|
|
5019
|
+
const localUrl = buildLoopbackProbeBaseUrl("http:", hostname2, result.port) + assetPath2;
|
|
5020
5020
|
result.iconUrl = buildIconProxyUrl ? buildIconProxyUrl(localUrl) : localUrl;
|
|
5021
5021
|
return;
|
|
5022
5022
|
}
|
|
@@ -6328,7 +6328,7 @@ var init_swift_standin_digest = __esm({
|
|
|
6328
6328
|
|
|
6329
6329
|
// src/expo-native-compiler-digest.ts
|
|
6330
6330
|
function expoNativeCompilerDigestValue() {
|
|
6331
|
-
return true ? "
|
|
6331
|
+
return true ? "dd83e9c30fee5c97e767ecb9f63c6bec77ad8438a8313718d1927d1a4f6fab43" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
6332
6332
|
}
|
|
6333
6333
|
var import_node_crypto12;
|
|
6334
6334
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -33661,6 +33661,27 @@ var init_nativeDyldTableContract = __esm({
|
|
|
33661
33661
|
});
|
|
33662
33662
|
|
|
33663
33663
|
// ../peach-kit/src/nativeWasmContract.ts
|
|
33664
|
+
function readNativeLazyParts(section2) {
|
|
33665
|
+
if (section2.byteLength < 4) throw new Error("native code part inventory is truncated");
|
|
33666
|
+
const view = new DataView(section2);
|
|
33667
|
+
const count = view.getUint32(0, true);
|
|
33668
|
+
const slotOffset = 4 + count * NATIVE_LAZY_PART_BYTES;
|
|
33669
|
+
const slotBytes = section2.byteLength - slotOffset;
|
|
33670
|
+
if (count === 0 || count > NATIVE_LAZY_MAX_PARTS || slotBytes <= 0 || slotBytes % 2)
|
|
33671
|
+
throw new Error("native code part inventory is malformed");
|
|
33672
|
+
const parts2 = [];
|
|
33673
|
+
for (let id = 0; id < count; id++) {
|
|
33674
|
+
const offset = 4 + id * NATIVE_LAZY_PART_BYTES;
|
|
33675
|
+
const digest3 = new Uint8Array(section2, offset, NATIVE_LAZY_DIGEST_BYTES);
|
|
33676
|
+
const sha2565 = Array.from(digest3, (byte) => byte.toString(16).padStart(2, "0")).join(
|
|
33677
|
+
""
|
|
33678
|
+
);
|
|
33679
|
+
const byteLength = view.getUint32(offset + NATIVE_LAZY_DIGEST_BYTES, true);
|
|
33680
|
+
if (!byteLength) throw new Error("native code part has no bytes");
|
|
33681
|
+
parts2.push({ sha256: sha2565, byteLength });
|
|
33682
|
+
}
|
|
33683
|
+
return { parts: parts2, slotOffset, slotBytes };
|
|
33684
|
+
}
|
|
33664
33685
|
var NATIVE_IMAGE_SECTION, NATIVE_TABLE_ABI, NATIVE_TABLE_IMPORT_MODULE, NATIVE_TABLE_ADAPT_IMPORT, NATIVE_DYLD_FUNCTION_IMPORT, NATIVE_DYLD_PLACE_EXPORT, NATIVE_DYLD_SECTION, NATIVE_LAZY_IMPORT_MODULE, NATIVE_SDK_IMPORT_MODULE, NATIVE_SDK_THUNK_SECTION, NATIVE_LAZY_SLOT_IMPORT, NATIVE_LAZY_SECTION, NATIVE_LAZY_DIGEST_BYTES, NATIVE_LAZY_PART_BYTES, NATIVE_LAZY_MAX_PARTS, NATIVE_PROFILE_SECTION, NATIVE_PROFILE_IMPORT, NATIVE_PROFILE_MEMORY, NATIVE_PROFILE_DUMP, NATIVE_PROFILE_ENDPOINT, SWIFT_ARTIFACT_SHA256_HEADER, NATIVE_TABLE_RESERVE_SLOTS;
|
|
33665
33686
|
var init_nativeWasmContract = __esm({
|
|
33666
33687
|
"../peach-kit/src/nativeWasmContract.ts"() {
|
|
@@ -100965,6 +100986,71 @@ var init_swift_startup_split = __esm({
|
|
|
100965
100986
|
}
|
|
100966
100987
|
});
|
|
100967
100988
|
|
|
100989
|
+
// src/published-swift-sdk.ts
|
|
100990
|
+
var published_swift_sdk_exports = {};
|
|
100991
|
+
__export(published_swift_sdk_exports, {
|
|
100992
|
+
readPublishedSwiftSdk: () => readPublishedSwiftSdk,
|
|
100993
|
+
readPublishedSwiftSdkParts: () => readPublishedSwiftSdkParts
|
|
100994
|
+
});
|
|
100995
|
+
function assetPath(digest3) {
|
|
100996
|
+
return `/__peach/published-sdk/${digest3}`;
|
|
100997
|
+
}
|
|
100998
|
+
async function readAsset(url, digest3, contentType2 = "application/wasm") {
|
|
100999
|
+
const response = await fetch(url, {
|
|
101000
|
+
redirect: "error",
|
|
101001
|
+
signal: AbortSignal.timeout(3e4)
|
|
101002
|
+
});
|
|
101003
|
+
if (!response.ok)
|
|
101004
|
+
throw new Error(
|
|
101005
|
+
`published Swift SDK asset ${digest3} answered HTTP ${response.status}`
|
|
101006
|
+
);
|
|
101007
|
+
const bytes = Buffer.from(await response.arrayBuffer());
|
|
101008
|
+
if ((0, import_node_crypto81.createHash)("sha256").update(bytes).digest("hex") !== digest3)
|
|
101009
|
+
throw new Error(`published Swift SDK asset ${digest3} digest mismatch`);
|
|
101010
|
+
return { bytes, contentType: contentType2, digest: digest3 };
|
|
101011
|
+
}
|
|
101012
|
+
async function readPublishedSwiftSdk(url, origin = "https://contrast.dev") {
|
|
101013
|
+
if (url.origin !== origin || url.username || url.password || url.search || url.hash)
|
|
101014
|
+
return null;
|
|
101015
|
+
const digest3 = /^\/compile\/asset\/([a-f0-9]{64})$/.exec(url.pathname)?.[1];
|
|
101016
|
+
if (!digest3) return null;
|
|
101017
|
+
return { path: assetPath(digest3), asset: await readAsset(url, digest3) };
|
|
101018
|
+
}
|
|
101019
|
+
async function readPublishedSwiftSdkParts(url, module2) {
|
|
101020
|
+
const lazy = WebAssembly.Module.customSections(module2, NATIVE_LAZY_SECTION);
|
|
101021
|
+
const [dyld] = WebAssembly.Module.customSections(module2, NATIVE_DYLD_TABLE_SECTION);
|
|
101022
|
+
if (lazy.length > 1) throw new Error("native code has more than one part inventory");
|
|
101023
|
+
const parts2 = lazy[0] ? readNativeLazyParts(lazy[0]).parts : [];
|
|
101024
|
+
const assets2 = new Map(parts2.map(({ sha256: sha2565, byteLength }) => [sha2565, byteLength]));
|
|
101025
|
+
let dyldDigest;
|
|
101026
|
+
if (dyld && !WebAssembly.Module.customSections(module2, NATIVE_DYLD_PACKS_SECTION).length) {
|
|
101027
|
+
const table = readNativeDyldTableIndex(dyld);
|
|
101028
|
+
dyldDigest = table.sha256;
|
|
101029
|
+
assets2.set(table.sha256, table.byteLength);
|
|
101030
|
+
}
|
|
101031
|
+
return mapLimit(
|
|
101032
|
+
[...assets2],
|
|
101033
|
+
12,
|
|
101034
|
+
async ([digest3, byteLength]) => {
|
|
101035
|
+
const contentType2 = digest3 === dyldDigest ? "application/octet-stream" : void 0;
|
|
101036
|
+
const asset = await readAsset(new URL(digest3, url), digest3, contentType2);
|
|
101037
|
+
if (asset.bytes.byteLength !== byteLength)
|
|
101038
|
+
throw new Error(`published Swift SDK asset ${digest3} length mismatch`);
|
|
101039
|
+
return [assetPath(digest3), asset];
|
|
101040
|
+
}
|
|
101041
|
+
);
|
|
101042
|
+
}
|
|
101043
|
+
var import_node_crypto81;
|
|
101044
|
+
var init_published_swift_sdk = __esm({
|
|
101045
|
+
"src/published-swift-sdk.ts"() {
|
|
101046
|
+
"use strict";
|
|
101047
|
+
import_node_crypto81 = require("node:crypto");
|
|
101048
|
+
init_mapLimit();
|
|
101049
|
+
init_nativeDyldTableContract();
|
|
101050
|
+
init_nativeWasmContract();
|
|
101051
|
+
}
|
|
101052
|
+
});
|
|
101053
|
+
|
|
100968
101054
|
// cli/dev-build-freshness.ts
|
|
100969
101055
|
var dev_build_freshness_exports = {};
|
|
100970
101056
|
__export(dev_build_freshness_exports, {
|
|
@@ -101003,7 +101089,7 @@ function* filesUnder(absolute) {
|
|
|
101003
101089
|
}
|
|
101004
101090
|
function hashFile(absolutePath) {
|
|
101005
101091
|
try {
|
|
101006
|
-
return (0,
|
|
101092
|
+
return (0, import_node_crypto82.createHash)("sha1").update((0, import_node_fs134.readFileSync)(absolutePath)).digest("hex");
|
|
101007
101093
|
} catch {
|
|
101008
101094
|
return null;
|
|
101009
101095
|
}
|
|
@@ -101137,11 +101223,11 @@ function findStaleRoutes(monorepoRoot, routes2) {
|
|
|
101137
101223
|
}
|
|
101138
101224
|
return stale;
|
|
101139
101225
|
}
|
|
101140
|
-
var
|
|
101226
|
+
var import_node_crypto82, import_node_fs134, import_node_path136, DEV_BUILD_REBUILD_COMMAND, RECORD_DIR, PEACHSIM_ENGINE_INPUTS, ENGINE_SOURCES, ROUTES, STANDALONE_ENGINE_ROUTES, EXCLUDED_DIR_NAMES;
|
|
101141
101227
|
var init_dev_build_freshness = __esm({
|
|
101142
101228
|
"cli/dev-build-freshness.ts"() {
|
|
101143
101229
|
"use strict";
|
|
101144
|
-
|
|
101230
|
+
import_node_crypto82 = require("node:crypto");
|
|
101145
101231
|
import_node_fs134 = require("node:fs");
|
|
101146
101232
|
import_node_path136 = require("node:path");
|
|
101147
101233
|
DEV_BUILD_REBUILD_COMMAND = "bun run build:peach";
|
|
@@ -101268,7 +101354,7 @@ function nativeSourceFiles(packagePath) {
|
|
|
101268
101354
|
function swiftArtifactContentDigest(bytes) {
|
|
101269
101355
|
let digest3 = swiftArtifactDigests.get(bytes);
|
|
101270
101356
|
if (!digest3) {
|
|
101271
|
-
digest3 = (0,
|
|
101357
|
+
digest3 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
101272
101358
|
swiftArtifactDigests.set(bytes, digest3);
|
|
101273
101359
|
}
|
|
101274
101360
|
return digest3;
|
|
@@ -101396,7 +101482,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
101396
101482
|
const clang = import_node_path137.default.join(toolchainBin, "clang");
|
|
101397
101483
|
const empty = (binary2, file) => {
|
|
101398
101484
|
const source = import_node_path137.default.join(binary2.dir, file);
|
|
101399
|
-
const key2 = (0,
|
|
101485
|
+
const key2 = (0, import_node_crypto83.createHash)("sha256").update(
|
|
101400
101486
|
JSON.stringify([
|
|
101401
101487
|
clang,
|
|
101402
101488
|
sdk2.sysroot,
|
|
@@ -101441,7 +101527,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
101441
101527
|
return new Set(portable.flat());
|
|
101442
101528
|
}
|
|
101443
101529
|
async function swiftPackages(entry, app) {
|
|
101444
|
-
const stamp = (file) => import_node_fs135.default.existsSync(file) ? (0,
|
|
101530
|
+
const stamp = (file) => import_node_fs135.default.existsSync(file) ? (0, import_node_crypto83.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex") : null;
|
|
101445
101531
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
101446
101532
|
module: target.moduleName,
|
|
101447
101533
|
products: target.packageProducts ?? []
|
|
@@ -102610,7 +102696,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
102610
102696
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
102611
102697
|
bytes
|
|
102612
102698
|
);
|
|
102613
|
-
const sha2565 = (0,
|
|
102699
|
+
const sha2565 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
102614
102700
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
102615
102701
|
if (!bundle && inputs2["Package.swift"])
|
|
102616
102702
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -102633,7 +102719,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
102633
102719
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
102634
102720
|
pdfs.set(file, {
|
|
102635
102721
|
file: disk,
|
|
102636
|
-
sha256: (0,
|
|
102722
|
+
sha256: (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex")
|
|
102637
102723
|
});
|
|
102638
102724
|
}
|
|
102639
102725
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -102679,7 +102765,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
102679
102765
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
102680
102766
|
}
|
|
102681
102767
|
imageBytes += bytes.length;
|
|
102682
|
-
const hash = (0,
|
|
102768
|
+
const hash = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
102683
102769
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
102684
102770
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
102685
102771
|
const variant2 = {
|
|
@@ -102988,7 +103074,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
102988
103074
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
102989
103075
|
}
|
|
102990
103076
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
102991
|
-
const hash = (0,
|
|
103077
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
102992
103078
|
hash.update(packagePath);
|
|
102993
103079
|
updateSwiftConfigStamp(hash, packagePath);
|
|
102994
103080
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -103017,7 +103103,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
103017
103103
|
return hash.digest("hex").slice(0, 16);
|
|
103018
103104
|
}
|
|
103019
103105
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
103020
|
-
const hash = (0,
|
|
103106
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
103021
103107
|
hash.update(compilerSourceDigest);
|
|
103022
103108
|
updateSwiftConfigStamp(hash, packagePath);
|
|
103023
103109
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -103049,7 +103135,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
103049
103135
|
(root) => import_node_fs135.default.existsSync(import_node_path137.default.join(root, "toolchain.json"))
|
|
103050
103136
|
);
|
|
103051
103137
|
if (!moduleRoot) return "";
|
|
103052
|
-
const hash = (0,
|
|
103138
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
103053
103139
|
hash.update(moduleRoot);
|
|
103054
103140
|
for (const relative6 of swiftModuleInputFiles(moduleRoot)) {
|
|
103055
103141
|
hash.update(relative6);
|
|
@@ -103059,7 +103145,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
103059
103145
|
}
|
|
103060
103146
|
function otherInputs(input) {
|
|
103061
103147
|
const { files: _files, ...rest } = input;
|
|
103062
|
-
return (0,
|
|
103148
|
+
return (0, import_node_crypto83.createHash)("sha256").update(JSON.stringify(rest)).digest("hex");
|
|
103063
103149
|
}
|
|
103064
103150
|
function icuUrl(origin, artifact) {
|
|
103065
103151
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -103074,7 +103160,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
103074
103160
|
for (const standin of standins) {
|
|
103075
103161
|
if (!standin.prebuilt) continue;
|
|
103076
103162
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
103077
|
-
const digest3 = (0,
|
|
103163
|
+
const digest3 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
103078
103164
|
const dir = import_node_path137.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
103079
103165
|
import_node_fs135.default.mkdirSync(dir, { recursive: true });
|
|
103080
103166
|
const library = import_node_path137.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -103422,7 +103508,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
103422
103508
|
return import_node_path137.default.join(
|
|
103423
103509
|
swiftCacheDir(),
|
|
103424
103510
|
"swift-builds",
|
|
103425
|
-
(0,
|
|
103511
|
+
(0, import_node_crypto83.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
103426
103512
|
);
|
|
103427
103513
|
}
|
|
103428
103514
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -103721,7 +103807,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
103721
103807
|
const response = await fetch(url, { signal });
|
|
103722
103808
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
103723
103809
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
103724
|
-
if (bytes.length !== byteLength || (0,
|
|
103810
|
+
if (bytes.length !== byteLength || (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
103725
103811
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
103726
103812
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
103727
103813
|
}
|
|
@@ -103975,6 +104061,31 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
103975
104061
|
}
|
|
103976
104062
|
return metadata(origin, await startup, sdkDigest);
|
|
103977
104063
|
}
|
|
104064
|
+
async function localPublishedSwiftSdkUrl(url, origin) {
|
|
104065
|
+
const { sdkRuntime, sdkGuestRuntime } = swiftNativePin().distribution;
|
|
104066
|
+
if (url !== sdkRuntime?.url && url !== sdkGuestRuntime?.url) return url;
|
|
104067
|
+
let mirror = publishedSdkMirrors.get(url);
|
|
104068
|
+
if (!mirror) {
|
|
104069
|
+
mirror = (async () => {
|
|
104070
|
+
const { readPublishedSwiftSdk: readPublishedSwiftSdk2, readPublishedSwiftSdkParts: readPublishedSwiftSdkParts2 } = await Promise.resolve().then(() => (init_published_swift_sdk(), published_swift_sdk_exports));
|
|
104071
|
+
const address = new URL(url);
|
|
104072
|
+
const primary = await readPublishedSwiftSdk2(address, address.origin);
|
|
104073
|
+
if (!primary) throw new Error(`invalid published Swift SDK URL ${url}`);
|
|
104074
|
+
const module2 = new WebAssembly.Module(Uint8Array.from(primary.asset.bytes));
|
|
104075
|
+
const parts2 = await readPublishedSwiftSdkParts2(address, module2);
|
|
104076
|
+
for (const [, asset] of parts2) {
|
|
104077
|
+
const suffix = asset.contentType === "application/wasm" ? "wasm" : "dyld";
|
|
104078
|
+
publishedSdkPieces.set(`${SDK_PATH}${asset.digest}.${suffix}`, asset);
|
|
104079
|
+
}
|
|
104080
|
+
const pathname = `${SDK_PATH}${primary.asset.digest}.wasm`;
|
|
104081
|
+
publishedSdkPieces.set(pathname, primary.asset);
|
|
104082
|
+
return pathname;
|
|
104083
|
+
})();
|
|
104084
|
+
mirror.catch(() => publishedSdkMirrors.delete(url));
|
|
104085
|
+
publishedSdkMirrors.set(url, mirror);
|
|
104086
|
+
}
|
|
104087
|
+
return origin + await mirror;
|
|
104088
|
+
}
|
|
103978
104089
|
async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
103979
104090
|
const key2 = `${sdk2.binding.sha256}:${splitKey}`;
|
|
103980
104091
|
if (sdkSplitBindings.has(key2)) return;
|
|
@@ -103987,10 +104098,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
103987
104098
|
sdk2.binding.bytes,
|
|
103988
104099
|
plan
|
|
103989
104100
|
);
|
|
103990
|
-
const digest3 = (0,
|
|
104101
|
+
const digest3 = (0, import_node_crypto83.createHash)("sha256").update(split.binding).digest("hex");
|
|
103991
104102
|
sdkBindingFiles.set(digest3, split.binding);
|
|
103992
104103
|
for (const later of split.later)
|
|
103993
|
-
sdkBindingFiles.set((0,
|
|
104104
|
+
sdkBindingFiles.set((0, import_node_crypto83.createHash)("sha256").update(later).digest("hex"), later);
|
|
103994
104105
|
sdkSplitBindings.set(key2, digest3);
|
|
103995
104106
|
}
|
|
103996
104107
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -104069,7 +104180,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
104069
104180
|
const { key: key2 } = sdk2;
|
|
104070
104181
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
104071
104182
|
const requireCurrentProfile = import_node_path137.default.basename(import_node_path137.default.dirname(normalizedPackage)) === "one-native-controls";
|
|
104072
|
-
const app = (0,
|
|
104183
|
+
const app = (0, import_node_crypto83.createHash)("sha256").update(
|
|
104073
104184
|
JSON.stringify([
|
|
104074
104185
|
normalizedPackage,
|
|
104075
104186
|
launch.environment,
|
|
@@ -104103,7 +104214,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
104103
104214
|
app,
|
|
104104
104215
|
requireCurrentProfile
|
|
104105
104216
|
);
|
|
104106
|
-
const name3 = (0,
|
|
104217
|
+
const name3 = (0, import_node_crypto83.createHash)("sha256").update(split.primary).digest("hex");
|
|
104107
104218
|
sdkPieces2.set(name3, split.primary);
|
|
104108
104219
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
104109
104220
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -104162,6 +104273,14 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
104162
104273
|
return true;
|
|
104163
104274
|
}
|
|
104164
104275
|
if (pathname.startsWith(SDK_PATH)) {
|
|
104276
|
+
const published4 = publishedSdkPieces.get(pathname);
|
|
104277
|
+
if (published4) {
|
|
104278
|
+
res.setHeader("access-control-allow-origin", "*");
|
|
104279
|
+
res.setHeader("cache-control", "public, max-age=31536000, immutable");
|
|
104280
|
+
res.setHeader("content-type", published4.contentType);
|
|
104281
|
+
res.end(published4.bytes);
|
|
104282
|
+
return true;
|
|
104283
|
+
}
|
|
104165
104284
|
const name3 = pathname.slice(SDK_PATH.length).replace(/\.wasm$/, "");
|
|
104166
104285
|
const piece = sdkPieces2.get(name3);
|
|
104167
104286
|
let imageKey;
|
|
@@ -104339,13 +104458,13 @@ async function swiftArtifactAssets(artifact, { sdkUrl, sdkBindingUrl }) {
|
|
|
104339
104458
|
}
|
|
104340
104459
|
return assets2;
|
|
104341
104460
|
}
|
|
104342
|
-
var import_node_async_hooks3, import_node_child_process67,
|
|
104461
|
+
var import_node_async_hooks3, import_node_child_process67, import_node_crypto83, 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;
|
|
104343
104462
|
var init_swift_host = __esm({
|
|
104344
104463
|
"src/swift-host.ts"() {
|
|
104345
104464
|
"use strict";
|
|
104346
104465
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
104347
104466
|
import_node_child_process67 = require("node:child_process");
|
|
104348
|
-
|
|
104467
|
+
import_node_crypto83 = require("node:crypto");
|
|
104349
104468
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
104350
104469
|
import_node_os30 = __toESM(require("node:os"), 1);
|
|
104351
104470
|
import_node_path137 = __toESM(require("node:path"), 1);
|
|
@@ -104480,6 +104599,8 @@ var init_swift_host = __esm({
|
|
|
104480
104599
|
sdkStartupParts = /* @__PURE__ */ new Map();
|
|
104481
104600
|
sdkStartupPlans = /* @__PURE__ */ new Map();
|
|
104482
104601
|
sdkPieces2 = /* @__PURE__ */ new Map();
|
|
104602
|
+
publishedSdkPieces = /* @__PURE__ */ new Map();
|
|
104603
|
+
publishedSdkMirrors = /* @__PURE__ */ new Map();
|
|
104483
104604
|
sdkSplitBindings = /* @__PURE__ */ new Map();
|
|
104484
104605
|
sdkBindingFiles = /* @__PURE__ */ new Map();
|
|
104485
104606
|
servedSdkBinding = (sdk2, sdkDigest) => sdkDigest && sdkSplitBindings.get(`${sdk2.binding.sha256}:${sdkDigest}`) || sdk2.binding.sha256;
|
|
@@ -105105,7 +105226,7 @@ function hashTree(root) {
|
|
|
105105
105226
|
for (const entry of import_node_fs138.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
105106
105227
|
if (!entry.isFile()) continue;
|
|
105107
105228
|
const file = import_node_path140.default.join(entry.parentPath, entry.name);
|
|
105108
|
-
hashes[import_node_path140.default.relative(root, file).split(import_node_path140.default.sep).join("/")] = (0,
|
|
105229
|
+
hashes[import_node_path140.default.relative(root, file).split(import_node_path140.default.sep).join("/")] = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs138.default.readFileSync(file)).digest("hex");
|
|
105109
105230
|
}
|
|
105110
105231
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
105111
105232
|
}
|
|
@@ -105155,12 +105276,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
105155
105276
|
files: hashTree(generatedRoot)
|
|
105156
105277
|
};
|
|
105157
105278
|
}
|
|
105158
|
-
var import_node_child_process68,
|
|
105279
|
+
var import_node_child_process68, import_node_crypto84, 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;
|
|
105159
105280
|
var init_turbo_codegen_intake = __esm({
|
|
105160
105281
|
"src/turbo-codegen-intake.ts"() {
|
|
105161
105282
|
"use strict";
|
|
105162
105283
|
import_node_child_process68 = require("node:child_process");
|
|
105163
|
-
|
|
105284
|
+
import_node_crypto84 = require("node:crypto");
|
|
105164
105285
|
import_node_fs138 = __toESM(require("node:fs"), 1);
|
|
105165
105286
|
import_node_module17 = require("node:module");
|
|
105166
105287
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
@@ -109479,11 +109600,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
109479
109600
|
}
|
|
109480
109601
|
`;
|
|
109481
109602
|
}
|
|
109482
|
-
var
|
|
109603
|
+
var import_node_crypto85, 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, sha2564, podspecList, reactNativePods, reactNativePod, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_SHADOW_HANDLE_HOST, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
|
|
109483
109604
|
var init_turbo_source = __esm({
|
|
109484
109605
|
"src/turbo-source.ts"() {
|
|
109485
109606
|
"use strict";
|
|
109486
|
-
|
|
109607
|
+
import_node_crypto85 = require("node:crypto");
|
|
109487
109608
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
109488
109609
|
import_node_module18 = require("node:module");
|
|
109489
109610
|
import_node_path141 = __toESM(require("node:path"), 1);
|
|
@@ -109613,7 +109734,7 @@ var init_turbo_source = __esm({
|
|
|
109613
109734
|
];
|
|
109614
109735
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
109615
109736
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
109616
|
-
sha2564 = (data) => (0,
|
|
109737
|
+
sha2564 = (data) => (0, import_node_crypto85.createHash)("sha256").update(data).digest("hex");
|
|
109617
109738
|
podspecList = podspecAttribute;
|
|
109618
109739
|
reactNativePods = /* @__PURE__ */ new Set([
|
|
109619
109740
|
"React",
|
|
@@ -110500,7 +110621,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped, cor
|
|
|
110500
110621
|
}
|
|
110501
110622
|
async function prepareTurboCompileInput(options2) {
|
|
110502
110623
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
110503
|
-
const key2 = (0,
|
|
110624
|
+
const key2 = (0, import_node_crypto86.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");
|
|
110504
110625
|
const scratch2 = import_node_path142.default.join(import_node_os31.default.tmpdir(), "peach-turbo-swift", key2);
|
|
110505
110626
|
import_node_fs140.default.mkdirSync(scratch2, { recursive: true });
|
|
110506
110627
|
const codegenDir = import_node_fs140.default.mkdtempSync(import_node_path142.default.join(scratch2, "codegen-"));
|
|
@@ -110742,11 +110863,11 @@ async function compileTurboModule(options2) {
|
|
|
110742
110863
|
collection
|
|
110743
110864
|
};
|
|
110744
110865
|
}
|
|
110745
|
-
var
|
|
110866
|
+
var import_node_crypto86, import_node_fs140, import_node_module19, import_node_os31, import_node_path142;
|
|
110746
110867
|
var init_turbo_compile = __esm({
|
|
110747
110868
|
"src/turbo-compile.ts"() {
|
|
110748
110869
|
"use strict";
|
|
110749
|
-
|
|
110870
|
+
import_node_crypto86 = require("node:crypto");
|
|
110750
110871
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
110751
110872
|
import_node_module19 = require("node:module");
|
|
110752
110873
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
@@ -110946,8 +111067,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
110946
111067
|
);
|
|
110947
111068
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
110948
111069
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
110949
|
-
const headers = (0,
|
|
110950
|
-
const sources = (0,
|
|
111070
|
+
const headers = (0, import_node_crypto87.createHash)("sha256");
|
|
111071
|
+
const sources = (0, import_node_crypto87.createHash)("sha256");
|
|
110951
111072
|
const walk4 = (relative6) => {
|
|
110952
111073
|
for (const file of import_node_fs142.default.readdirSync(import_node_path144.default.join(reactNativeRoot, relative6), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
110953
111074
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -111054,7 +111175,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
111054
111175
|
const file = import_node_path144.default.join(
|
|
111055
111176
|
cacheDir(),
|
|
111056
111177
|
"native-archives",
|
|
111057
|
-
`${(0,
|
|
111178
|
+
`${(0, import_node_crypto87.createHash)("sha256").update(data).digest("hex")}.a`
|
|
111058
111179
|
);
|
|
111059
111180
|
import_node_fs142.default.mkdirSync(import_node_path144.default.dirname(file), { recursive: true });
|
|
111060
111181
|
if (!import_node_fs142.default.existsSync(file)) import_node_fs142.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -111064,11 +111185,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
111064
111185
|
}
|
|
111065
111186
|
}
|
|
111066
111187
|
}
|
|
111067
|
-
var
|
|
111188
|
+
var import_node_crypto87, import_node_fs142, import_node_module20, import_node_path144, import_node_util18, recipe, strings4, building;
|
|
111068
111189
|
var init_react_native_core = __esm({
|
|
111069
111190
|
"src/react-native-core.ts"() {
|
|
111070
111191
|
"use strict";
|
|
111071
|
-
|
|
111192
|
+
import_node_crypto87 = require("node:crypto");
|
|
111072
111193
|
import_node_fs142 = __toESM(require("node:fs"), 1);
|
|
111073
111194
|
import_node_module20 = require("node:module");
|
|
111074
111195
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
@@ -111094,7 +111215,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
111094
111215
|
const modules = import_node_path145.default.join(moduleRoot, "modules");
|
|
111095
111216
|
const module2 = import_node_path145.default.join(modules, `${name3}.swiftmodule`);
|
|
111096
111217
|
if (!import_node_fs143.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
111097
|
-
const key2 = (0,
|
|
111218
|
+
const key2 = (0, import_node_crypto88.createHash)("sha256").update(import_node_fs143.default.readFileSync(module2)).digest("hex");
|
|
111098
111219
|
const directory2 = import_node_path145.default.join(swiftCacheDir(), "swift-public-names");
|
|
111099
111220
|
const receipt = import_node_path145.default.join(directory2, `${key2}.json`);
|
|
111100
111221
|
if (import_node_fs143.default.existsSync(receipt)) {
|
|
@@ -111177,12 +111298,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
111177
111298
|
}
|
|
111178
111299
|
);
|
|
111179
111300
|
}
|
|
111180
|
-
var import_node_child_process70,
|
|
111301
|
+
var import_node_child_process70, import_node_crypto88, import_node_fs143, import_node_path145, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
111181
111302
|
var init_swift_clang_type_ownership = __esm({
|
|
111182
111303
|
"src/swift-clang-type-ownership.ts"() {
|
|
111183
111304
|
"use strict";
|
|
111184
111305
|
import_node_child_process70 = require("node:child_process");
|
|
111185
|
-
|
|
111306
|
+
import_node_crypto88 = require("node:crypto");
|
|
111186
111307
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
111187
111308
|
import_node_path145 = __toESM(require("node:path"), 1);
|
|
111188
111309
|
init_is_record();
|
|
@@ -112858,7 +112979,7 @@ function targetSettings2(units) {
|
|
|
112858
112979
|
}
|
|
112859
112980
|
function oneSDKStamp(oneSDK) {
|
|
112860
112981
|
if (!oneSDK) return "";
|
|
112861
|
-
const hash = (0,
|
|
112982
|
+
const hash = (0, import_node_crypto89.createHash)("sha256");
|
|
112862
112983
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
112863
112984
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
112864
112985
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -112909,7 +113030,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
112909
113030
|
`;
|
|
112910
113031
|
}
|
|
112911
113032
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
112912
|
-
const hash = (0,
|
|
113033
|
+
const hash = (0, import_node_crypto89.createHash)("sha256");
|
|
112913
113034
|
hash.update(base2);
|
|
112914
113035
|
hash.update(reactProviderStamp);
|
|
112915
113036
|
for (const unit2 of units) {
|
|
@@ -113282,8 +113403,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113282
113403
|
}
|
|
113283
113404
|
return provider;
|
|
113284
113405
|
})() : void 0;
|
|
113285
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
113286
|
-
const key2 = (0,
|
|
113406
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto89.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
113407
|
+
const key2 = (0, import_node_crypto89.createHash)("sha256").update(import_node_fs144.default.realpathSync(root)).digest("hex");
|
|
113287
113408
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
113288
113409
|
const failures = /* @__PURE__ */ new Map();
|
|
113289
113410
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -113577,7 +113698,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113577
113698
|
await check2(part[0]);
|
|
113578
113699
|
continue;
|
|
113579
113700
|
}
|
|
113580
|
-
const name3 = (0,
|
|
113701
|
+
const name3 = (0, import_node_crypto89.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
113581
113702
|
report(`linking ${part.length} namespaces to isolate failures`);
|
|
113582
113703
|
try {
|
|
113583
113704
|
const built2 = await link(part, `isolate-${name3}`);
|
|
@@ -113721,10 +113842,22 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
113721
113842
|
key2,
|
|
113722
113843
|
flightKey,
|
|
113723
113844
|
url.searchParams,
|
|
113724
|
-
() =>
|
|
113725
|
-
|
|
113726
|
-
|
|
113727
|
-
|
|
113845
|
+
async () => {
|
|
113846
|
+
const result = await withConfiguredNativeSources(
|
|
113847
|
+
key2,
|
|
113848
|
+
() => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
|
|
113849
|
+
);
|
|
113850
|
+
if (!result) return result;
|
|
113851
|
+
const modules = await Promise.all(
|
|
113852
|
+
result.modules.map(
|
|
113853
|
+
async (module2) => module2.sdkUrl ? {
|
|
113854
|
+
...module2,
|
|
113855
|
+
sdkUrl: await localPublishedSwiftSdkUrl(module2.sdkUrl, assetOrigin)
|
|
113856
|
+
} : module2
|
|
113857
|
+
)
|
|
113858
|
+
);
|
|
113859
|
+
return { ...result, modules };
|
|
113860
|
+
},
|
|
113728
113861
|
(result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
|
|
113729
113862
|
);
|
|
113730
113863
|
if (!res.destroyed) {
|
|
@@ -113750,13 +113883,13 @@ ${diagnostics}`}`
|
|
|
113750
113883
|
}
|
|
113751
113884
|
return true;
|
|
113752
113885
|
}
|
|
113753
|
-
var import_node_async_hooks4, import_node_child_process71,
|
|
113886
|
+
var import_node_async_hooks4, import_node_child_process71, import_node_crypto89, 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;
|
|
113754
113887
|
var init_expo_swift_host = __esm({
|
|
113755
113888
|
"src/expo-swift-host.ts"() {
|
|
113756
113889
|
"use strict";
|
|
113757
113890
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
113758
113891
|
import_node_child_process71 = require("node:child_process");
|
|
113759
|
-
|
|
113892
|
+
import_node_crypto89 = require("node:crypto");
|
|
113760
113893
|
import_node_fs144 = __toESM(require("node:fs"), 1);
|
|
113761
113894
|
import_node_module21 = require("node:module");
|
|
113762
113895
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
@@ -117685,10 +117818,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
117685
117818
|
}
|
|
117686
117819
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
117687
117820
|
const directory2 = prepareStagedDirectory();
|
|
117688
|
-
const inputDigest = (0,
|
|
117821
|
+
const inputDigest = (0, import_node_crypto91.createHash)("sha256").update(input).digest("hex");
|
|
117689
117822
|
const index = import_node_path154.default.join(
|
|
117690
117823
|
directory2,
|
|
117691
|
-
`derived-${(0,
|
|
117824
|
+
`derived-${(0, import_node_crypto91.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
117692
117825
|
);
|
|
117693
117826
|
const recorded = import_node_fs152.default.existsSync(index) ? import_node_fs152.default.readFileSync(index, "utf8") : "";
|
|
117694
117827
|
if (STAGED_NAME.test(recorded) && import_node_fs152.default.existsSync(import_node_path154.default.join(directory2, recorded))) {
|
|
@@ -117699,7 +117832,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
117699
117832
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
117700
117833
|
}
|
|
117701
117834
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
117702
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
117835
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto91.randomUUID)());
|
|
117703
117836
|
try {
|
|
117704
117837
|
import_node_fs152.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
117705
117838
|
flag: "wx"
|
|
@@ -117718,7 +117851,7 @@ function metroIndexName(url) {
|
|
|
117718
117851
|
url.searchParams.get("unstable_path"),
|
|
117719
117852
|
hashes[0]
|
|
117720
117853
|
]);
|
|
117721
|
-
return `metro-${(0,
|
|
117854
|
+
return `metro-${(0, import_node_crypto91.createHash)("sha256").update(key2).digest("hex")}`;
|
|
117722
117855
|
}
|
|
117723
117856
|
function metroRequestIndex(rawUrl) {
|
|
117724
117857
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -117746,7 +117879,7 @@ function prepareStagedDirectory() {
|
|
|
117746
117879
|
return directory2;
|
|
117747
117880
|
}
|
|
117748
117881
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
117749
|
-
const digest3 = (0,
|
|
117882
|
+
const digest3 = (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex");
|
|
117750
117883
|
extension = extension.toLowerCase();
|
|
117751
117884
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
117752
117885
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -117755,7 +117888,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
117755
117888
|
if (import_node_fs152.default.existsSync(destination)) {
|
|
117756
117889
|
import_node_fs152.default.utimesSync(destination, new Date(now), new Date(now));
|
|
117757
117890
|
} else {
|
|
117758
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
117891
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto91.randomUUID)());
|
|
117759
117892
|
try {
|
|
117760
117893
|
import_node_fs152.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
117761
117894
|
import_node_fs152.default.renameSync(temporary, destination);
|
|
@@ -117827,12 +117960,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
117827
117960
|
throw error;
|
|
117828
117961
|
}
|
|
117829
117962
|
}
|
|
117830
|
-
var import_node_async_hooks5,
|
|
117963
|
+
var import_node_async_hooks5, import_node_crypto91, import_node_fs152, import_node_path154, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
|
|
117831
117964
|
var init_staged_host_files = __esm({
|
|
117832
117965
|
"src/host/staged-host-files.ts"() {
|
|
117833
117966
|
"use strict";
|
|
117834
117967
|
import_node_async_hooks5 = require("node:async_hooks");
|
|
117835
|
-
|
|
117968
|
+
import_node_crypto91 = require("node:crypto");
|
|
117836
117969
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
117837
117970
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
117838
117971
|
init_uttype_mime();
|
|
@@ -120358,7 +120491,7 @@ function chunkKey2(lines) {
|
|
|
120358
120491
|
return lines.map((item) => item.text).join("\n");
|
|
120359
120492
|
}
|
|
120360
120493
|
function stableShardIndex(key2, shardCount) {
|
|
120361
|
-
return (0,
|
|
120494
|
+
return (0, import_node_crypto92.createHash)("sha256").update(key2).digest().readUInt32BE(0) % shardCount;
|
|
120362
120495
|
}
|
|
120363
120496
|
function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SHARDS) {
|
|
120364
120497
|
if (shardCount <= 1 || !name3.endsWith(".swift") || name3.endsWith(".types.swift") || source.length < ONE_SDK_BINDING_SHARD_MIN_BYTES) {
|
|
@@ -120602,11 +120735,11 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
|
|
|
120602
120735
|
};
|
|
120603
120736
|
});
|
|
120604
120737
|
}
|
|
120605
|
-
var
|
|
120738
|
+
var import_node_crypto92, import_node_path157, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES;
|
|
120606
120739
|
var init_shard = __esm({
|
|
120607
120740
|
"src/one-sdk/shard.ts"() {
|
|
120608
120741
|
"use strict";
|
|
120609
|
-
|
|
120742
|
+
import_node_crypto92 = require("node:crypto");
|
|
120610
120743
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
120611
120744
|
init_swift_compile();
|
|
120612
120745
|
ONE_SDK_BINDING_SHARDS = 8;
|
|
@@ -121676,7 +121809,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
121676
121809
|
""
|
|
121677
121810
|
].join("\n");
|
|
121678
121811
|
}
|
|
121679
|
-
const digest3 = (0,
|
|
121812
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256").update(manifest);
|
|
121680
121813
|
for (const [name3, source] of files2)
|
|
121681
121814
|
digest3.update(name3).update("\0").update(source).update("\0");
|
|
121682
121815
|
const key2 = digest3.digest("hex").slice(0, 16);
|
|
@@ -121699,11 +121832,11 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
121699
121832
|
...oneSDKShards.size ? { oneSDKShards } : {}
|
|
121700
121833
|
};
|
|
121701
121834
|
}
|
|
121702
|
-
var
|
|
121835
|
+
var import_node_crypto93, import_node_fs155, import_node_module22, import_node_path158, import_node_url8, ONE_SDK_DEFINES, BRIDGE_SWIFT, GUEST_MAIN_SWIFT, ONE_SDK_RUNTIME_SOURCES, ONE_NATIVE_STYLE_SHARDS, ONE_NATIVE_STYLE_SHARD_MIN_BYTES, DIRECT_HOST_SWIFT_SEEDS, DIRECT_HOST_IOS_FILES;
|
|
121703
121836
|
var init_one_native_controls_package = __esm({
|
|
121704
121837
|
"src/one-native-controls-package.ts"() {
|
|
121705
121838
|
"use strict";
|
|
121706
|
-
|
|
121839
|
+
import_node_crypto93 = require("node:crypto");
|
|
121707
121840
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
121708
121841
|
import_node_module22 = require("node:module");
|
|
121709
121842
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
@@ -123051,7 +123184,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
123051
123184
|
if (!Buffer.from(text7).equals(bytes))
|
|
123052
123185
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
123053
123186
|
files2.set(name3, text7);
|
|
123054
|
-
sources[import_node_path160.default.relative(root, file).split(import_node_path160.default.sep).join("/")] = (0,
|
|
123187
|
+
sources[import_node_path160.default.relative(root, file).split(import_node_path160.default.sep).join("/")] = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
|
|
123055
123188
|
}
|
|
123056
123189
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
123057
123190
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -123075,17 +123208,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
123075
123208
|
return {
|
|
123076
123209
|
metadata: source.widget,
|
|
123077
123210
|
projectRoot: source.root,
|
|
123078
|
-
appIdentity: (0,
|
|
123211
|
+
appIdentity: (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
123079
123212
|
bundleUrl,
|
|
123080
123213
|
packageUrl,
|
|
123081
123214
|
urlSchemes: source.urlSchemes
|
|
123082
123215
|
};
|
|
123083
123216
|
}
|
|
123084
|
-
var
|
|
123217
|
+
var import_node_crypto94, import_node_fs157, import_node_path160, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
123085
123218
|
var init_one_widget_metadata = __esm({
|
|
123086
123219
|
"src/one-widget-metadata.ts"() {
|
|
123087
123220
|
"use strict";
|
|
123088
|
-
|
|
123221
|
+
import_node_crypto94 = require("node:crypto");
|
|
123089
123222
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
123090
123223
|
import_node_path160 = __toESM(require("node:path"), 1);
|
|
123091
123224
|
init_is_record();
|
|
@@ -123119,7 +123252,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
123119
123252
|
const packagePath = import_node_path161.default.join(
|
|
123120
123253
|
import_node_os34.default.tmpdir(),
|
|
123121
123254
|
"peach-one-widgets",
|
|
123122
|
-
(0,
|
|
123255
|
+
(0, import_node_crypto95.createHash)("sha256").update(root).digest("hex"),
|
|
123123
123256
|
ONE_WIDGET_PACKAGE
|
|
123124
123257
|
);
|
|
123125
123258
|
import_node_fs158.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -123133,11 +123266,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
123133
123266
|
widget
|
|
123134
123267
|
};
|
|
123135
123268
|
}
|
|
123136
|
-
var
|
|
123269
|
+
var import_node_crypto95, import_node_fs158, import_node_os34, import_node_path161;
|
|
123137
123270
|
var init_one_widget_package = __esm({
|
|
123138
123271
|
"src/one-widget-package.ts"() {
|
|
123139
123272
|
"use strict";
|
|
123140
|
-
|
|
123273
|
+
import_node_crypto95 = require("node:crypto");
|
|
123141
123274
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
123142
123275
|
import_node_os34 = __toESM(require("node:os"), 1);
|
|
123143
123276
|
import_node_path161 = __toESM(require("node:path"), 1);
|
|
@@ -123353,7 +123486,7 @@ var init_android_view_classes = __esm({
|
|
|
123353
123486
|
|
|
123354
123487
|
// src/java-module-abi.ts
|
|
123355
123488
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
123356
|
-
const digest3 = (0,
|
|
123489
|
+
const digest3 = (0, import_node_crypto96.createHash)("sha256");
|
|
123357
123490
|
const parent = import_node_path163.default.join(kotlinHome(), "java-specs");
|
|
123358
123491
|
import_node_fs160.default.mkdirSync(parent, { recursive: true });
|
|
123359
123492
|
const work = import_node_fs160.default.mkdtempSync(import_node_path163.default.join(parent, ".read-"));
|
|
@@ -123450,12 +123583,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
123450
123583
|
);
|
|
123451
123584
|
return library;
|
|
123452
123585
|
}
|
|
123453
|
-
var import_node_child_process74,
|
|
123586
|
+
var import_node_child_process74, import_node_crypto96, import_node_fs160, import_node_path163, import_node_util20, run13, JAVA_BINDINGS_INITIALIZER;
|
|
123454
123587
|
var init_java_module_abi = __esm({
|
|
123455
123588
|
"src/java-module-abi.ts"() {
|
|
123456
123589
|
"use strict";
|
|
123457
123590
|
import_node_child_process74 = require("node:child_process");
|
|
123458
|
-
|
|
123591
|
+
import_node_crypto96 = require("node:crypto");
|
|
123459
123592
|
import_node_fs160 = __toESM(require("node:fs"), 1);
|
|
123460
123593
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
123461
123594
|
import_node_util20 = require("node:util");
|
|
@@ -123783,7 +123916,7 @@ function zipSources(bytes, where) {
|
|
|
123783
123916
|
return entries2;
|
|
123784
123917
|
}
|
|
123785
123918
|
function extract(bytes, where) {
|
|
123786
|
-
const key2 = (0,
|
|
123919
|
+
const key2 = (0, import_node_crypto97.createHash)("sha256").update(bytes).digest("hex");
|
|
123787
123920
|
const cached4 = pending.get(key2);
|
|
123788
123921
|
if (cached4) return cached4;
|
|
123789
123922
|
const request = (async () => {
|
|
@@ -123832,11 +123965,11 @@ function readSourcesJar(archive, where) {
|
|
|
123832
123965
|
function readMavenSourcesArchive(archive) {
|
|
123833
123966
|
return extract(readSourcesJar(archive, archive), archive);
|
|
123834
123967
|
}
|
|
123835
|
-
var
|
|
123968
|
+
var import_node_crypto97, import_node_fs162, import_node_os35, import_node_path165, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
|
|
123836
123969
|
var init_kotlin_maven_sources = __esm({
|
|
123837
123970
|
"src/kotlin-maven-sources.ts"() {
|
|
123838
123971
|
"use strict";
|
|
123839
|
-
|
|
123972
|
+
import_node_crypto97 = require("node:crypto");
|
|
123840
123973
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
123841
123974
|
import_node_os35 = __toESM(require("node:os"), 1);
|
|
123842
123975
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
@@ -123877,7 +124010,7 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
123877
124010
|
])
|
|
123878
124011
|
];
|
|
123879
124012
|
const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
123880
|
-
const suffix = (0,
|
|
124013
|
+
const suffix = (0, import_node_crypto98.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
|
|
123881
124014
|
const klib = import_node_path166.default.join(input.output, `${name3}-${suffix}.klib`);
|
|
123882
124015
|
const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
|
|
123883
124016
|
const abiPairs = java.length ? dependencies.flatMap(
|
|
@@ -123919,11 +124052,11 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
123919
124052
|
}
|
|
123920
124053
|
return [...compiled.values()].map(({ klib }) => klib);
|
|
123921
124054
|
}
|
|
123922
|
-
var
|
|
124055
|
+
var import_node_crypto98, import_node_fs163, import_node_path166;
|
|
123923
124056
|
var init_kotlin_gradle_library_plan = __esm({
|
|
123924
124057
|
"src/kotlin-gradle-library-plan.ts"() {
|
|
123925
124058
|
"use strict";
|
|
123926
|
-
|
|
124059
|
+
import_node_crypto98 = require("node:crypto");
|
|
123927
124060
|
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
123928
124061
|
import_node_path166 = __toESM(require("node:path"), 1);
|
|
123929
124062
|
init_kotlin_library_sources();
|
|
@@ -124159,13 +124292,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
124159
124292
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
124160
124293
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
124161
124294
|
const bytes = import_node_fs164.default.readFileSync(target);
|
|
124162
|
-
if (bytes.length !== expected.bytes || (0,
|
|
124295
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto99.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
124163
124296
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
124164
124297
|
}
|
|
124165
124298
|
return manifest;
|
|
124166
124299
|
}
|
|
124167
124300
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
124168
|
-
const sha2565 = (0,
|
|
124301
|
+
const sha2565 = (0, import_node_crypto99.createHash)("sha256").update(archive).digest("hex");
|
|
124169
124302
|
const parent = import_node_path167.default.join(kotlinHome(), "sdk");
|
|
124170
124303
|
const root = import_node_path167.default.join(parent, sha2565);
|
|
124171
124304
|
if (import_node_fs164.default.existsSync(root))
|
|
@@ -124194,12 +124327,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
124194
124327
|
import_node_fs164.default.rmSync(work, { recursive: true, force: true });
|
|
124195
124328
|
}
|
|
124196
124329
|
}
|
|
124197
|
-
var import_node_child_process76,
|
|
124330
|
+
var import_node_child_process76, import_node_crypto99, import_node_fs164, import_node_path167, import_node_util21, run14;
|
|
124198
124331
|
var init_kotlin_sdk = __esm({
|
|
124199
124332
|
"src/kotlin-sdk.ts"() {
|
|
124200
124333
|
"use strict";
|
|
124201
124334
|
import_node_child_process76 = require("node:child_process");
|
|
124202
|
-
|
|
124335
|
+
import_node_crypto99 = require("node:crypto");
|
|
124203
124336
|
import_node_fs164 = __toESM(require("node:fs"), 1);
|
|
124204
124337
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
124205
124338
|
import_node_util21 = require("node:util");
|
|
@@ -124335,7 +124468,7 @@ function peachKotlinModuleRoot() {
|
|
|
124335
124468
|
if (!IS_STANDALONE) return import_node_path168.default.join(peachsimPackageRoot(), "kotlin");
|
|
124336
124469
|
if (installedRoot) return installedRoot;
|
|
124337
124470
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
124338
|
-
const digest3 = (0,
|
|
124471
|
+
const digest3 = (0, import_node_crypto100.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
124339
124472
|
const parent = import_node_path168.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
124340
124473
|
const root = import_node_path168.default.join(parent, digest3);
|
|
124341
124474
|
import_node_fs165.default.mkdirSync(parent, { recursive: true });
|
|
@@ -124364,11 +124497,11 @@ function peachKotlinModuleRoot() {
|
|
|
124364
124497
|
installedRoot = root;
|
|
124365
124498
|
return root;
|
|
124366
124499
|
}
|
|
124367
|
-
var
|
|
124500
|
+
var import_node_crypto100, import_node_fs165, import_node_path168, installedRoot;
|
|
124368
124501
|
var init_kotlin_module = __esm({
|
|
124369
124502
|
"src/kotlin-module.ts"() {
|
|
124370
124503
|
"use strict";
|
|
124371
|
-
|
|
124504
|
+
import_node_crypto100 = require("node:crypto");
|
|
124372
124505
|
import_node_fs165 = __toESM(require("node:fs"), 1);
|
|
124373
124506
|
import_node_path168 = __toESM(require("node:path"), 1);
|
|
124374
124507
|
init_standalone();
|
|
@@ -124402,7 +124535,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
124402
124535
|
const parent = import_node_path169.default.join(kotlinHome(), "gradle-sources");
|
|
124403
124536
|
import_node_fs166.default.mkdirSync(parent, { recursive: true });
|
|
124404
124537
|
const work = import_node_fs166.default.mkdtempSync(import_node_path169.default.join(parent, ".query-"));
|
|
124405
|
-
const task = `peachAndroidSources${(0,
|
|
124538
|
+
const task = `peachAndroidSources${(0, import_node_crypto101.randomBytes)(8).toString("hex")}`;
|
|
124406
124539
|
const script = import_node_path169.default.join(work, "sources.gradle");
|
|
124407
124540
|
const encoded = Buffer.from(
|
|
124408
124541
|
JSON.stringify({
|
|
@@ -124554,12 +124687,12 @@ function readDependencySources(value) {
|
|
|
124554
124687
|
};
|
|
124555
124688
|
});
|
|
124556
124689
|
}
|
|
124557
|
-
var import_node_child_process77,
|
|
124690
|
+
var import_node_child_process77, import_node_crypto101, import_node_fs166, import_node_path169, import_node_util22, run15, modelQuery;
|
|
124558
124691
|
var init_android_gradle_sources = __esm({
|
|
124559
124692
|
"src/android-gradle-sources.ts"() {
|
|
124560
124693
|
"use strict";
|
|
124561
124694
|
import_node_child_process77 = require("node:child_process");
|
|
124562
|
-
|
|
124695
|
+
import_node_crypto101 = require("node:crypto");
|
|
124563
124696
|
import_node_fs166 = __toESM(require("node:fs"), 1);
|
|
124564
124697
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
124565
124698
|
import_node_util22 = require("node:util");
|
|
@@ -124974,7 +125107,7 @@ function readExpoTypes(output) {
|
|
|
124974
125107
|
});
|
|
124975
125108
|
}
|
|
124976
125109
|
async function scanSources(tool, parse17, toolchain, moduleRoot, files2) {
|
|
124977
|
-
const digest3 = (0,
|
|
125110
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
124978
125111
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
124979
125112
|
digest3.update(import_node_fs167.default.readFileSync(import_node_path170.default.join(moduleRoot, "sdk.tar.gz")));
|
|
124980
125113
|
digest3.update(tool);
|
|
@@ -125636,7 +125769,7 @@ async function compileKotlin(input, origin) {
|
|
|
125636
125769
|
bytes: import_node_fs167.default.readFileSync(file)
|
|
125637
125770
|
}));
|
|
125638
125771
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
125639
|
-
const digest3 = (0,
|
|
125772
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256");
|
|
125640
125773
|
digest3.update(
|
|
125641
125774
|
JSON.stringify({
|
|
125642
125775
|
format: BUILD_FORMAT,
|
|
@@ -125658,7 +125791,7 @@ async function compileKotlin(input, origin) {
|
|
|
125658
125791
|
...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
|
|
125659
125792
|
]);
|
|
125660
125793
|
for (const file of files2) {
|
|
125661
|
-
digest3.update((0,
|
|
125794
|
+
digest3.update((0, import_node_crypto102.createHash)("sha256").update(import_node_fs167.default.readFileSync(file)).digest());
|
|
125662
125795
|
}
|
|
125663
125796
|
}
|
|
125664
125797
|
if (viewModels) digest3.update(viewModels.toolClass);
|
|
@@ -125950,12 +126083,12 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
125950
126083
|
}
|
|
125951
126084
|
return true;
|
|
125952
126085
|
}
|
|
125953
|
-
var import_node_child_process78,
|
|
126086
|
+
var import_node_child_process78, import_node_crypto102, import_node_fs167, import_node_module23, import_node_path170, 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;
|
|
125954
126087
|
var init_kotlin_host = __esm({
|
|
125955
126088
|
"src/kotlin-host.ts"() {
|
|
125956
126089
|
"use strict";
|
|
125957
126090
|
import_node_child_process78 = require("node:child_process");
|
|
125958
|
-
|
|
126091
|
+
import_node_crypto102 = require("node:crypto");
|
|
125959
126092
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
125960
126093
|
import_node_module23 = require("node:module");
|
|
125961
126094
|
import_node_path170 = __toESM(require("node:path"), 1);
|
|
@@ -126311,7 +126444,7 @@ async function readManagedExpoIdentity(root, platform3, iosTarget, bridgeOrigin)
|
|
|
126311
126444
|
url.searchParams.set("root", root);
|
|
126312
126445
|
const response = await nodeHttpFetch(url.href);
|
|
126313
126446
|
if (response.ok && response.headers.get("content-type") === revisionType) {
|
|
126314
|
-
const environment = (0,
|
|
126447
|
+
const environment = (0, import_node_crypto103.createHash)("sha256").update(JSON.stringify(Object.entries(process.env).sort())).digest("hex");
|
|
126315
126448
|
const inputs2 = Buffer.from(
|
|
126316
126449
|
JSON.stringify([
|
|
126317
126450
|
await response.text(),
|
|
@@ -126367,11 +126500,11 @@ function handleManagedExpoInputs(req, res, url) {
|
|
|
126367
126500
|
res.writeHead(200, { "Content-Type": revisionType });
|
|
126368
126501
|
res.end(revision);
|
|
126369
126502
|
}
|
|
126370
|
-
var
|
|
126503
|
+
var import_node_crypto103, import_node_fs169, import_node_path172, revisionType;
|
|
126371
126504
|
var init_managed_expo_identity = __esm({
|
|
126372
126505
|
"src/managed-expo-identity.ts"() {
|
|
126373
126506
|
"use strict";
|
|
126374
|
-
|
|
126507
|
+
import_node_crypto103 = require("node:crypto");
|
|
126375
126508
|
import_node_fs169 = __toESM(require("node:fs"), 1);
|
|
126376
126509
|
import_node_path172 = __toESM(require("node:path"), 1);
|
|
126377
126510
|
init_backend_origin();
|
|
@@ -126486,7 +126619,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
126486
126619
|
const ext = import_node_path175.default.extname(file);
|
|
126487
126620
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
126488
126621
|
if (ext.toLowerCase() === ".pdf") {
|
|
126489
|
-
const sha2565 = (0,
|
|
126622
|
+
const sha2565 = (0, import_node_crypto104.createHash)("sha256").update(bytes).digest("hex");
|
|
126490
126623
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
126491
126624
|
return stageHostBytes(png, origin, ".png");
|
|
126492
126625
|
}
|
|
@@ -126499,11 +126632,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
126499
126632
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
126500
126633
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
126501
126634
|
}
|
|
126502
|
-
var
|
|
126635
|
+
var import_node_crypto104, import_node_fs171, import_node_path175;
|
|
126503
126636
|
var init_expo_widget_assets = __esm({
|
|
126504
126637
|
"src/expo-widget-assets.ts"() {
|
|
126505
126638
|
"use strict";
|
|
126506
|
-
|
|
126639
|
+
import_node_crypto104 = require("node:crypto");
|
|
126507
126640
|
import_node_fs171 = __toESM(require("node:fs"), 1);
|
|
126508
126641
|
import_node_path175 = __toESM(require("node:path"), 1);
|
|
126509
126642
|
init_app_catalog();
|
|
@@ -126558,11 +126691,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
126558
126691
|
"specifications",
|
|
126559
126692
|
`${checksum}.json`
|
|
126560
126693
|
);
|
|
126561
|
-
const sha1 = (value) => (0,
|
|
126694
|
+
const sha1 = (value) => (0, import_node_crypto105.createHash)("sha1").update(value).digest("hex");
|
|
126562
126695
|
let text7;
|
|
126563
126696
|
if (import_node_fs172.default.existsSync(file)) text7 = import_node_fs172.default.readFileSync(file, "utf8");
|
|
126564
126697
|
else {
|
|
126565
|
-
const shard2 = (0,
|
|
126698
|
+
const shard2 = (0, import_node_crypto105.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
126566
126699
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
126567
126700
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
126568
126701
|
if (!response.ok)
|
|
@@ -126691,7 +126824,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
126691
126824
|
"end",
|
|
126692
126825
|
""
|
|
126693
126826
|
].join("\n");
|
|
126694
|
-
const key2 = (0,
|
|
126827
|
+
const key2 = (0, import_node_crypto105.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
126695
126828
|
JSON.stringify(
|
|
126696
126829
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
126697
126830
|
)
|
|
@@ -126760,11 +126893,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
126760
126893
|
);
|
|
126761
126894
|
});
|
|
126762
126895
|
}
|
|
126763
|
-
var
|
|
126896
|
+
var import_node_crypto105, import_node_fs172, import_node_path176, APP, record5, project, podModuleName;
|
|
126764
126897
|
var init_swift_source_pods = __esm({
|
|
126765
126898
|
"src/swift-source-pods.ts"() {
|
|
126766
126899
|
"use strict";
|
|
126767
|
-
|
|
126900
|
+
import_node_crypto105 = require("node:crypto");
|
|
126768
126901
|
import_node_fs172 = __toESM(require("node:fs"), 1);
|
|
126769
126902
|
import_node_path176 = __toESM(require("node:path"), 1);
|
|
126770
126903
|
init_browser();
|
|
@@ -127445,7 +127578,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
127445
127578
|
input.libraries ??= {};
|
|
127446
127579
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
127447
127580
|
}
|
|
127448
|
-
const key2 = (0,
|
|
127581
|
+
const key2 = (0, import_node_crypto106.createHash)("sha256").update(
|
|
127449
127582
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
127450
127583
|
).update("\0").update(import_node_fs173.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
127451
127584
|
const packagePath = import_node_path177.default.join(import_node_os36.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -127501,11 +127634,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
127501
127634
|
...sources(import_node_path177.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
127502
127635
|
];
|
|
127503
127636
|
}
|
|
127504
|
-
var
|
|
127637
|
+
var import_node_crypto106, import_node_fs173, import_node_os36, import_node_path177, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
|
|
127505
127638
|
var init_nitro_compile = __esm({
|
|
127506
127639
|
"src/nitro-compile.ts"() {
|
|
127507
127640
|
"use strict";
|
|
127508
|
-
|
|
127641
|
+
import_node_crypto106 = require("node:crypto");
|
|
127509
127642
|
import_node_fs173 = __toESM(require("node:fs"), 1);
|
|
127510
127643
|
import_node_os36 = __toESM(require("node:os"), 1);
|
|
127511
127644
|
import_node_path177 = __toESM(require("node:path"), 1);
|
|
@@ -127582,11 +127715,11 @@ var init_nitro_compile = __esm({
|
|
|
127582
127715
|
});
|
|
127583
127716
|
|
|
127584
127717
|
// src/nitro-compiler-digest.ts
|
|
127585
|
-
var
|
|
127718
|
+
var import_node_crypto107, import_node_fs174, import_node_path178;
|
|
127586
127719
|
var init_nitro_compiler_digest = __esm({
|
|
127587
127720
|
"src/nitro-compiler-digest.ts"() {
|
|
127588
127721
|
"use strict";
|
|
127589
|
-
|
|
127722
|
+
import_node_crypto107 = require("node:crypto");
|
|
127590
127723
|
import_node_fs174 = require("node:fs");
|
|
127591
127724
|
import_node_path178 = __toESM(require("node:path"), 1);
|
|
127592
127725
|
init_swift_compiler_digest();
|
|
@@ -127724,7 +127857,7 @@ var init_nitro_superset = __esm({
|
|
|
127724
127857
|
init_nitroContract();
|
|
127725
127858
|
init_swift_standin_digest();
|
|
127726
127859
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
127727
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
127860
|
+
NITRO_COMPILER_DIGEST = true ? "2cc931ba112a51e34cbca543692c5cd5965c2fcc760351c9766eda8362cf2df8" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
127728
127861
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
127729
127862
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
127730
127863
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -128090,7 +128223,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
128090
128223
|
const packagePath = import_node_path182.default.join(
|
|
128091
128224
|
swiftCacheDir(),
|
|
128092
128225
|
"peach-one-sdk-swift",
|
|
128093
|
-
(0,
|
|
128226
|
+
(0, import_node_crypto108.createHash)("sha256").update(import_node_fs177.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
128094
128227
|
"sdk"
|
|
128095
128228
|
);
|
|
128096
128229
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -128137,11 +128270,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
128137
128270
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
128138
128271
|
};
|
|
128139
128272
|
}
|
|
128140
|
-
var
|
|
128273
|
+
var import_node_crypto108, import_node_fs177, import_node_path182, ONE_SDK_ROUTE, handleOneSDKRequest;
|
|
128141
128274
|
var init_one_sdk_bundle = __esm({
|
|
128142
128275
|
"src/one-sdk-bundle.ts"() {
|
|
128143
128276
|
"use strict";
|
|
128144
|
-
|
|
128277
|
+
import_node_crypto108 = require("node:crypto");
|
|
128145
128278
|
import_node_fs177 = __toESM(require("node:fs"), 1);
|
|
128146
128279
|
import_node_path182 = __toESM(require("node:path"), 1);
|
|
128147
128280
|
init_expo_native_workspace();
|
|
@@ -128832,11 +128965,11 @@ function readSharedDesktopAuthSession() {
|
|
|
128832
128965
|
return null;
|
|
128833
128966
|
}
|
|
128834
128967
|
}
|
|
128835
|
-
var
|
|
128968
|
+
var import_node_crypto109, import_node_fs181, import_node_path187, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
128836
128969
|
var init_shared_session = __esm({
|
|
128837
128970
|
"src/auth/shared-session.ts"() {
|
|
128838
128971
|
"use strict";
|
|
128839
|
-
|
|
128972
|
+
import_node_crypto109 = require("node:crypto");
|
|
128840
128973
|
import_node_fs181 = require("node:fs");
|
|
128841
128974
|
import_node_path187 = require("node:path");
|
|
128842
128975
|
init_home_paths();
|
|
@@ -128874,7 +129007,7 @@ var init_run_rnx = __esm({
|
|
|
128874
129007
|
// cli/secure-file.ts
|
|
128875
129008
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
128876
129009
|
(0, import_node_fs182.mkdirSync)((0, import_node_path188.dirname)(filepath), { recursive: true });
|
|
128877
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
129010
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto110.randomUUID)()}`;
|
|
128878
129011
|
let descriptor = null;
|
|
128879
129012
|
try {
|
|
128880
129013
|
descriptor = (0, import_node_fs182.openSync)(temporary, "wx", 384);
|
|
@@ -128891,11 +129024,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
128891
129024
|
throw error;
|
|
128892
129025
|
}
|
|
128893
129026
|
}
|
|
128894
|
-
var
|
|
129027
|
+
var import_node_crypto110, import_node_fs182, import_node_path188;
|
|
128895
129028
|
var init_secure_file = __esm({
|
|
128896
129029
|
"cli/secure-file.ts"() {
|
|
128897
129030
|
"use strict";
|
|
128898
|
-
|
|
129031
|
+
import_node_crypto110 = require("node:crypto");
|
|
128899
129032
|
import_node_fs182 = require("node:fs");
|
|
128900
129033
|
import_node_path188 = require("node:path");
|
|
128901
129034
|
}
|
|
@@ -131257,11 +131390,11 @@ function createCloudSession(input) {
|
|
|
131257
131390
|
}
|
|
131258
131391
|
return session;
|
|
131259
131392
|
}
|
|
131260
|
-
var
|
|
131393
|
+
var import_node_crypto111, import_node_fs184, import_node_path190, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET;
|
|
131261
131394
|
var init_cloud_session = __esm({
|
|
131262
131395
|
"cli/cloud-session.ts"() {
|
|
131263
131396
|
"use strict";
|
|
131264
|
-
|
|
131397
|
+
import_node_crypto111 = require("node:crypto");
|
|
131265
131398
|
import_node_fs184 = require("node:fs");
|
|
131266
131399
|
import_node_path190 = require("node:path");
|
|
131267
131400
|
init_backend_origin();
|
|
@@ -131523,7 +131656,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
131523
131656
|
return { directory: directory2, files: files2, truncated };
|
|
131524
131657
|
}
|
|
131525
131658
|
function metroDescriptorHash(scaleBytes) {
|
|
131526
|
-
const hasher = (0,
|
|
131659
|
+
const hasher = (0, import_node_crypto112.createHash)("md5");
|
|
131527
131660
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
131528
131661
|
return hasher.digest("hex");
|
|
131529
131662
|
}
|
|
@@ -131552,7 +131685,7 @@ function distinctByContent(directory2, options2) {
|
|
|
131552
131685
|
} catch {
|
|
131553
131686
|
continue;
|
|
131554
131687
|
}
|
|
131555
|
-
const digest3 = (0,
|
|
131688
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(bytes).digest("hex");
|
|
131556
131689
|
if (!byContent.has(digest3)) byContent.set(digest3, relative6);
|
|
131557
131690
|
}
|
|
131558
131691
|
return [...byContent.values()];
|
|
@@ -131600,7 +131733,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
131600
131733
|
continue;
|
|
131601
131734
|
}
|
|
131602
131735
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
131603
|
-
const digest3 = (0,
|
|
131736
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(file).digest("hex");
|
|
131604
131737
|
return descriptor.scales.some(
|
|
131605
131738
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
131606
131739
|
);
|
|
@@ -131625,7 +131758,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
131625
131758
|
const file = (0, import_node_path192.join)(dest.directory, relative6);
|
|
131626
131759
|
let digest3 = fileDigests2.get(file);
|
|
131627
131760
|
if (digest3 === void 0) {
|
|
131628
|
-
digest3 = (0,
|
|
131761
|
+
digest3 = (0, import_node_crypto112.createHash)("sha256").update((0, import_node_fs186.readFileSync)(file)).digest("hex");
|
|
131629
131762
|
fileDigests2.set(file, digest3);
|
|
131630
131763
|
}
|
|
131631
131764
|
return [scale, digest3];
|
|
@@ -131914,7 +132047,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
131914
132047
|
}
|
|
131915
132048
|
return {
|
|
131916
132049
|
bytes,
|
|
131917
|
-
sha256: (0,
|
|
132050
|
+
sha256: (0, import_node_crypto112.createHash)("sha256").update(bytes).digest("hex"),
|
|
131918
132051
|
receipt: artifact.receipt,
|
|
131919
132052
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
131920
132053
|
warnings
|
|
@@ -132019,11 +132152,11 @@ async function createCloudBox(options2) {
|
|
|
132019
132152
|
warnings: artifact.warnings
|
|
132020
132153
|
};
|
|
132021
132154
|
}
|
|
132022
|
-
var
|
|
132155
|
+
var import_node_crypto112, import_node_fs186, import_node_path192, 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;
|
|
132023
132156
|
var init_cloud_client = __esm({
|
|
132024
132157
|
"cli/cloud-client.ts"() {
|
|
132025
132158
|
"use strict";
|
|
132026
|
-
|
|
132159
|
+
import_node_crypto112 = require("node:crypto");
|
|
132027
132160
|
import_node_fs186 = require("node:fs");
|
|
132028
132161
|
import_node_path192 = require("node:path");
|
|
132029
132162
|
import_node_vm = require("node:vm");
|
|
@@ -133804,7 +133937,7 @@ init_app_package_handler();
|
|
|
133804
133937
|
init_fetch_proxy_handler();
|
|
133805
133938
|
|
|
133806
133939
|
// src/host/fetch-proxy-transport.ts
|
|
133807
|
-
var
|
|
133940
|
+
var import_node_crypto90 = require("node:crypto");
|
|
133808
133941
|
var import_node_fs148 = require("node:fs");
|
|
133809
133942
|
var import_node_http23 = require("node:http2");
|
|
133810
133943
|
var import_node_path150 = __toESM(require("node:path"), 1);
|
|
@@ -133837,7 +133970,7 @@ async function createIdentity() {
|
|
|
133837
133970
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
133838
133971
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
133839
133972
|
{
|
|
133840
|
-
serialNumber: (0,
|
|
133973
|
+
serialNumber: (0, import_node_crypto90.randomBytes)(16).toString("hex"),
|
|
133841
133974
|
name: "CN=localhost",
|
|
133842
133975
|
notBefore: new Date(Date.now() - 6e4),
|
|
133843
133976
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -133856,7 +133989,7 @@ async function createIdentity() {
|
|
|
133856
133989
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
133857
133990
|
-----END PRIVATE KEY-----
|
|
133858
133991
|
`,
|
|
133859
|
-
spki: (0,
|
|
133992
|
+
spki: (0, import_node_crypto90.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
133860
133993
|
};
|
|
133861
133994
|
}
|
|
133862
133995
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|