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
package/dist-lib/skills.cjs
CHANGED
|
@@ -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;
|
|
@@ -33296,11 +33296,11 @@ function attachLocalIcon(result, buildIconProxyUrl) {
|
|
|
33296
33296
|
const rawIcon = result.iconPath;
|
|
33297
33297
|
if (!rawIcon || result.iconUrl) return;
|
|
33298
33298
|
if (rawIcon.startsWith("http://") || rawIcon.startsWith("https://")) return;
|
|
33299
|
-
const
|
|
33300
|
-
if (
|
|
33299
|
+
const assetPath2 = localIconPathCache.get(result.port);
|
|
33300
|
+
if (assetPath2 === null || localIconProbeInFlight.has(result.port)) return;
|
|
33301
33301
|
const hostname2 = normalizeHostname(new URL(result.bundleUrl).hostname);
|
|
33302
|
-
if (
|
|
33303
|
-
const localUrl = buildLoopbackProbeBaseUrl("http:", hostname2, result.port) +
|
|
33302
|
+
if (assetPath2 !== void 0) {
|
|
33303
|
+
const localUrl = buildLoopbackProbeBaseUrl("http:", hostname2, result.port) + assetPath2;
|
|
33304
33304
|
result.iconUrl = buildIconProxyUrl ? buildIconProxyUrl(localUrl) : localUrl;
|
|
33305
33305
|
return;
|
|
33306
33306
|
}
|
|
@@ -36170,7 +36170,7 @@ var init_swift_standin_digest = __esm({
|
|
|
36170
36170
|
|
|
36171
36171
|
// src/expo-native-compiler-digest.ts
|
|
36172
36172
|
function expoNativeCompilerDigestValue() {
|
|
36173
|
-
return true ? "
|
|
36173
|
+
return true ? "dd83e9c30fee5c97e767ecb9f63c6bec77ad8438a8313718d1927d1a4f6fab43" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
36174
36174
|
}
|
|
36175
36175
|
var import_node_crypto13;
|
|
36176
36176
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -63452,6 +63452,27 @@ var init_nativeDyldTableContract = __esm({
|
|
|
63452
63452
|
});
|
|
63453
63453
|
|
|
63454
63454
|
// ../peach-kit/src/nativeWasmContract.ts
|
|
63455
|
+
function readNativeLazyParts(section2) {
|
|
63456
|
+
if (section2.byteLength < 4) throw new Error("native code part inventory is truncated");
|
|
63457
|
+
const view = new DataView(section2);
|
|
63458
|
+
const count = view.getUint32(0, true);
|
|
63459
|
+
const slotOffset = 4 + count * NATIVE_LAZY_PART_BYTES;
|
|
63460
|
+
const slotBytes = section2.byteLength - slotOffset;
|
|
63461
|
+
if (count === 0 || count > NATIVE_LAZY_MAX_PARTS || slotBytes <= 0 || slotBytes % 2)
|
|
63462
|
+
throw new Error("native code part inventory is malformed");
|
|
63463
|
+
const parts2 = [];
|
|
63464
|
+
for (let id = 0; id < count; id++) {
|
|
63465
|
+
const offset = 4 + id * NATIVE_LAZY_PART_BYTES;
|
|
63466
|
+
const digest3 = new Uint8Array(section2, offset, NATIVE_LAZY_DIGEST_BYTES);
|
|
63467
|
+
const sha2565 = Array.from(digest3, (byte) => byte.toString(16).padStart(2, "0")).join(
|
|
63468
|
+
""
|
|
63469
|
+
);
|
|
63470
|
+
const byteLength = view.getUint32(offset + NATIVE_LAZY_DIGEST_BYTES, true);
|
|
63471
|
+
if (!byteLength) throw new Error("native code part has no bytes");
|
|
63472
|
+
parts2.push({ sha256: sha2565, byteLength });
|
|
63473
|
+
}
|
|
63474
|
+
return { parts: parts2, slotOffset, slotBytes };
|
|
63475
|
+
}
|
|
63455
63476
|
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;
|
|
63456
63477
|
var init_nativeWasmContract = __esm({
|
|
63457
63478
|
"../peach-kit/src/nativeWasmContract.ts"() {
|
|
@@ -124343,6 +124364,71 @@ var init_swift_startup_split = __esm({
|
|
|
124343
124364
|
}
|
|
124344
124365
|
});
|
|
124345
124366
|
|
|
124367
|
+
// src/published-swift-sdk.ts
|
|
124368
|
+
var published_swift_sdk_exports = {};
|
|
124369
|
+
__export(published_swift_sdk_exports, {
|
|
124370
|
+
readPublishedSwiftSdk: () => readPublishedSwiftSdk,
|
|
124371
|
+
readPublishedSwiftSdkParts: () => readPublishedSwiftSdkParts
|
|
124372
|
+
});
|
|
124373
|
+
function assetPath(digest3) {
|
|
124374
|
+
return `/__peach/published-sdk/${digest3}`;
|
|
124375
|
+
}
|
|
124376
|
+
async function readAsset(url, digest3, contentType2 = "application/wasm") {
|
|
124377
|
+
const response = await fetch(url, {
|
|
124378
|
+
redirect: "error",
|
|
124379
|
+
signal: AbortSignal.timeout(3e4)
|
|
124380
|
+
});
|
|
124381
|
+
if (!response.ok)
|
|
124382
|
+
throw new Error(
|
|
124383
|
+
`published Swift SDK asset ${digest3} answered HTTP ${response.status}`
|
|
124384
|
+
);
|
|
124385
|
+
const bytes = Buffer.from(await response.arrayBuffer());
|
|
124386
|
+
if ((0, import_node_crypto81.createHash)("sha256").update(bytes).digest("hex") !== digest3)
|
|
124387
|
+
throw new Error(`published Swift SDK asset ${digest3} digest mismatch`);
|
|
124388
|
+
return { bytes, contentType: contentType2, digest: digest3 };
|
|
124389
|
+
}
|
|
124390
|
+
async function readPublishedSwiftSdk(url, origin = "https://contrast.dev") {
|
|
124391
|
+
if (url.origin !== origin || url.username || url.password || url.search || url.hash)
|
|
124392
|
+
return null;
|
|
124393
|
+
const digest3 = /^\/compile\/asset\/([a-f0-9]{64})$/.exec(url.pathname)?.[1];
|
|
124394
|
+
if (!digest3) return null;
|
|
124395
|
+
return { path: assetPath(digest3), asset: await readAsset(url, digest3) };
|
|
124396
|
+
}
|
|
124397
|
+
async function readPublishedSwiftSdkParts(url, module2) {
|
|
124398
|
+
const lazy = WebAssembly.Module.customSections(module2, NATIVE_LAZY_SECTION);
|
|
124399
|
+
const [dyld] = WebAssembly.Module.customSections(module2, NATIVE_DYLD_TABLE_SECTION);
|
|
124400
|
+
if (lazy.length > 1) throw new Error("native code has more than one part inventory");
|
|
124401
|
+
const parts2 = lazy[0] ? readNativeLazyParts(lazy[0]).parts : [];
|
|
124402
|
+
const assets2 = new Map(parts2.map(({ sha256: sha2565, byteLength }) => [sha2565, byteLength]));
|
|
124403
|
+
let dyldDigest;
|
|
124404
|
+
if (dyld && !WebAssembly.Module.customSections(module2, NATIVE_DYLD_PACKS_SECTION).length) {
|
|
124405
|
+
const table = readNativeDyldTableIndex(dyld);
|
|
124406
|
+
dyldDigest = table.sha256;
|
|
124407
|
+
assets2.set(table.sha256, table.byteLength);
|
|
124408
|
+
}
|
|
124409
|
+
return mapLimit(
|
|
124410
|
+
[...assets2],
|
|
124411
|
+
12,
|
|
124412
|
+
async ([digest3, byteLength]) => {
|
|
124413
|
+
const contentType2 = digest3 === dyldDigest ? "application/octet-stream" : void 0;
|
|
124414
|
+
const asset = await readAsset(new URL(digest3, url), digest3, contentType2);
|
|
124415
|
+
if (asset.bytes.byteLength !== byteLength)
|
|
124416
|
+
throw new Error(`published Swift SDK asset ${digest3} length mismatch`);
|
|
124417
|
+
return [assetPath(digest3), asset];
|
|
124418
|
+
}
|
|
124419
|
+
);
|
|
124420
|
+
}
|
|
124421
|
+
var import_node_crypto81;
|
|
124422
|
+
var init_published_swift_sdk = __esm({
|
|
124423
|
+
"src/published-swift-sdk.ts"() {
|
|
124424
|
+
"use strict";
|
|
124425
|
+
import_node_crypto81 = require("node:crypto");
|
|
124426
|
+
init_mapLimit();
|
|
124427
|
+
init_nativeDyldTableContract();
|
|
124428
|
+
init_nativeWasmContract();
|
|
124429
|
+
}
|
|
124430
|
+
});
|
|
124431
|
+
|
|
124346
124432
|
// cli/dev-build-freshness.ts
|
|
124347
124433
|
var dev_build_freshness_exports = {};
|
|
124348
124434
|
__export(dev_build_freshness_exports, {
|
|
@@ -124381,7 +124467,7 @@ function* filesUnder(absolute) {
|
|
|
124381
124467
|
}
|
|
124382
124468
|
function hashFile(absolutePath) {
|
|
124383
124469
|
try {
|
|
124384
|
-
return (0,
|
|
124470
|
+
return (0, import_node_crypto82.createHash)("sha1").update((0, import_node_fs134.readFileSync)(absolutePath)).digest("hex");
|
|
124385
124471
|
} catch {
|
|
124386
124472
|
return null;
|
|
124387
124473
|
}
|
|
@@ -124515,11 +124601,11 @@ function findStaleRoutes(monorepoRoot, routes2) {
|
|
|
124515
124601
|
}
|
|
124516
124602
|
return stale;
|
|
124517
124603
|
}
|
|
124518
|
-
var
|
|
124604
|
+
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;
|
|
124519
124605
|
var init_dev_build_freshness = __esm({
|
|
124520
124606
|
"cli/dev-build-freshness.ts"() {
|
|
124521
124607
|
"use strict";
|
|
124522
|
-
|
|
124608
|
+
import_node_crypto82 = require("node:crypto");
|
|
124523
124609
|
import_node_fs134 = require("node:fs");
|
|
124524
124610
|
import_node_path136 = require("node:path");
|
|
124525
124611
|
DEV_BUILD_REBUILD_COMMAND = "bun run build:peach";
|
|
@@ -124632,6 +124718,7 @@ __export(swift_host_exports, {
|
|
|
124632
124718
|
icuUrl: () => icuUrl,
|
|
124633
124719
|
installedWorkspaceInput: () => installedWorkspaceInput,
|
|
124634
124720
|
linkedModuleRoots: () => linkedModuleRoots,
|
|
124721
|
+
localPublishedSwiftSdkUrl: () => localPublishedSwiftSdkUrl,
|
|
124635
124722
|
nativeSourceDescriptor: () => nativeSourceDescriptor,
|
|
124636
124723
|
nativeSourceFiles: () => nativeSourceFiles,
|
|
124637
124724
|
openSwiftFile: () => openSwiftFile,
|
|
@@ -124687,7 +124774,7 @@ function nativeSourceFiles(packagePath) {
|
|
|
124687
124774
|
function swiftArtifactContentDigest(bytes) {
|
|
124688
124775
|
let digest3 = swiftArtifactDigests.get(bytes);
|
|
124689
124776
|
if (!digest3) {
|
|
124690
|
-
digest3 = (0,
|
|
124777
|
+
digest3 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
124691
124778
|
swiftArtifactDigests.set(bytes, digest3);
|
|
124692
124779
|
}
|
|
124693
124780
|
return digest3;
|
|
@@ -124838,7 +124925,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
124838
124925
|
const clang = import_node_path137.default.join(toolchainBin, "clang");
|
|
124839
124926
|
const empty = (binary2, file) => {
|
|
124840
124927
|
const source = import_node_path137.default.join(binary2.dir, file);
|
|
124841
|
-
const key2 = (0,
|
|
124928
|
+
const key2 = (0, import_node_crypto83.createHash)("sha256").update(
|
|
124842
124929
|
JSON.stringify([
|
|
124843
124930
|
clang,
|
|
124844
124931
|
sdk2.sysroot,
|
|
@@ -124883,7 +124970,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
124883
124970
|
return new Set(portable.flat());
|
|
124884
124971
|
}
|
|
124885
124972
|
async function swiftPackages(entry, app) {
|
|
124886
|
-
const stamp = (file) => import_node_fs135.default.existsSync(file) ? (0,
|
|
124973
|
+
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;
|
|
124887
124974
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
124888
124975
|
module: target.moduleName,
|
|
124889
124976
|
products: target.packageProducts ?? []
|
|
@@ -126052,7 +126139,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
126052
126139
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
126053
126140
|
bytes
|
|
126054
126141
|
);
|
|
126055
|
-
const sha2565 = (0,
|
|
126142
|
+
const sha2565 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
126056
126143
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
126057
126144
|
if (!bundle && inputs2["Package.swift"])
|
|
126058
126145
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -126075,7 +126162,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
126075
126162
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
126076
126163
|
pdfs.set(file, {
|
|
126077
126164
|
file: disk,
|
|
126078
|
-
sha256: (0,
|
|
126165
|
+
sha256: (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex")
|
|
126079
126166
|
});
|
|
126080
126167
|
}
|
|
126081
126168
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -126121,7 +126208,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
126121
126208
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
126122
126209
|
}
|
|
126123
126210
|
imageBytes += bytes.length;
|
|
126124
|
-
const hash = (0,
|
|
126211
|
+
const hash = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
126125
126212
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
126126
126213
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
126127
126214
|
const variant2 = {
|
|
@@ -126430,7 +126517,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
126430
126517
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
126431
126518
|
}
|
|
126432
126519
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
126433
|
-
const hash = (0,
|
|
126520
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
126434
126521
|
hash.update(packagePath);
|
|
126435
126522
|
updateSwiftConfigStamp(hash, packagePath);
|
|
126436
126523
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -126459,7 +126546,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
126459
126546
|
return hash.digest("hex").slice(0, 16);
|
|
126460
126547
|
}
|
|
126461
126548
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
126462
|
-
const hash = (0,
|
|
126549
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
126463
126550
|
hash.update(compilerSourceDigest);
|
|
126464
126551
|
updateSwiftConfigStamp(hash, packagePath);
|
|
126465
126552
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -126491,7 +126578,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
126491
126578
|
(root) => import_node_fs135.default.existsSync(import_node_path137.default.join(root, "toolchain.json"))
|
|
126492
126579
|
);
|
|
126493
126580
|
if (!moduleRoot) return "";
|
|
126494
|
-
const hash = (0,
|
|
126581
|
+
const hash = (0, import_node_crypto83.createHash)("sha256");
|
|
126495
126582
|
hash.update(moduleRoot);
|
|
126496
126583
|
for (const relative7 of swiftModuleInputFiles(moduleRoot)) {
|
|
126497
126584
|
hash.update(relative7);
|
|
@@ -126501,7 +126588,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
126501
126588
|
}
|
|
126502
126589
|
function otherInputs(input) {
|
|
126503
126590
|
const { files: _files, ...rest } = input;
|
|
126504
|
-
return (0,
|
|
126591
|
+
return (0, import_node_crypto83.createHash)("sha256").update(JSON.stringify(rest)).digest("hex");
|
|
126505
126592
|
}
|
|
126506
126593
|
function entryRootId(packagePath, file) {
|
|
126507
126594
|
const relative7 = import_node_path137.default.relative(packagePath, file).split(import_node_path137.default.sep).join(import_node_path137.default.posix.sep);
|
|
@@ -126523,7 +126610,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
126523
126610
|
for (const standin of standins) {
|
|
126524
126611
|
if (!standin.prebuilt) continue;
|
|
126525
126612
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
126526
|
-
const digest3 = (0,
|
|
126613
|
+
const digest3 = (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex");
|
|
126527
126614
|
const dir = import_node_path137.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
126528
126615
|
import_node_fs135.default.mkdirSync(dir, { recursive: true });
|
|
126529
126616
|
const library = import_node_path137.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -126871,7 +126958,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
126871
126958
|
return import_node_path137.default.join(
|
|
126872
126959
|
swiftCacheDir(),
|
|
126873
126960
|
"swift-builds",
|
|
126874
|
-
(0,
|
|
126961
|
+
(0, import_node_crypto83.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
126875
126962
|
);
|
|
126876
126963
|
}
|
|
126877
126964
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -127170,7 +127257,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
127170
127257
|
const response = await fetch(url, { signal });
|
|
127171
127258
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
127172
127259
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
127173
|
-
if (bytes.length !== byteLength || (0,
|
|
127260
|
+
if (bytes.length !== byteLength || (0, import_node_crypto83.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
127174
127261
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
127175
127262
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
127176
127263
|
}
|
|
@@ -127424,6 +127511,31 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
127424
127511
|
}
|
|
127425
127512
|
return metadata(origin, await startup, sdkDigest);
|
|
127426
127513
|
}
|
|
127514
|
+
async function localPublishedSwiftSdkUrl(url, origin) {
|
|
127515
|
+
const { sdkRuntime, sdkGuestRuntime } = swiftNativePin().distribution;
|
|
127516
|
+
if (url !== sdkRuntime?.url && url !== sdkGuestRuntime?.url) return url;
|
|
127517
|
+
let mirror = publishedSdkMirrors.get(url);
|
|
127518
|
+
if (!mirror) {
|
|
127519
|
+
mirror = (async () => {
|
|
127520
|
+
const { readPublishedSwiftSdk: readPublishedSwiftSdk2, readPublishedSwiftSdkParts: readPublishedSwiftSdkParts2 } = await Promise.resolve().then(() => (init_published_swift_sdk(), published_swift_sdk_exports));
|
|
127521
|
+
const address = new URL(url);
|
|
127522
|
+
const primary = await readPublishedSwiftSdk2(address, address.origin);
|
|
127523
|
+
if (!primary) throw new Error(`invalid published Swift SDK URL ${url}`);
|
|
127524
|
+
const module2 = new WebAssembly.Module(Uint8Array.from(primary.asset.bytes));
|
|
127525
|
+
const parts2 = await readPublishedSwiftSdkParts2(address, module2);
|
|
127526
|
+
for (const [, asset] of parts2) {
|
|
127527
|
+
const suffix = asset.contentType === "application/wasm" ? "wasm" : "dyld";
|
|
127528
|
+
publishedSdkPieces.set(`${SDK_PATH}${asset.digest}.${suffix}`, asset);
|
|
127529
|
+
}
|
|
127530
|
+
const pathname = `${SDK_PATH}${primary.asset.digest}.wasm`;
|
|
127531
|
+
publishedSdkPieces.set(pathname, primary.asset);
|
|
127532
|
+
return pathname;
|
|
127533
|
+
})();
|
|
127534
|
+
mirror.catch(() => publishedSdkMirrors.delete(url));
|
|
127535
|
+
publishedSdkMirrors.set(url, mirror);
|
|
127536
|
+
}
|
|
127537
|
+
return origin + await mirror;
|
|
127538
|
+
}
|
|
127427
127539
|
async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
127428
127540
|
const key2 = `${sdk2.binding.sha256}:${splitKey}`;
|
|
127429
127541
|
if (sdkSplitBindings.has(key2)) return;
|
|
@@ -127436,10 +127548,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
127436
127548
|
sdk2.binding.bytes,
|
|
127437
127549
|
plan
|
|
127438
127550
|
);
|
|
127439
|
-
const digest3 = (0,
|
|
127551
|
+
const digest3 = (0, import_node_crypto83.createHash)("sha256").update(split.binding).digest("hex");
|
|
127440
127552
|
sdkBindingFiles.set(digest3, split.binding);
|
|
127441
127553
|
for (const later of split.later)
|
|
127442
|
-
sdkBindingFiles.set((0,
|
|
127554
|
+
sdkBindingFiles.set((0, import_node_crypto83.createHash)("sha256").update(later).digest("hex"), later);
|
|
127443
127555
|
sdkSplitBindings.set(key2, digest3);
|
|
127444
127556
|
}
|
|
127445
127557
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -127518,7 +127630,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, run
|
|
|
127518
127630
|
const { key: key2 } = sdk2;
|
|
127519
127631
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
127520
127632
|
const requireCurrentProfile = import_node_path137.default.basename(import_node_path137.default.dirname(normalizedPackage)) === "one-native-controls";
|
|
127521
|
-
const app = (0,
|
|
127633
|
+
const app = (0, import_node_crypto83.createHash)("sha256").update(
|
|
127522
127634
|
JSON.stringify([
|
|
127523
127635
|
normalizedPackage,
|
|
127524
127636
|
launch2.environment,
|
|
@@ -127552,7 +127664,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, run
|
|
|
127552
127664
|
app,
|
|
127553
127665
|
requireCurrentProfile
|
|
127554
127666
|
);
|
|
127555
|
-
const name3 = (0,
|
|
127667
|
+
const name3 = (0, import_node_crypto83.createHash)("sha256").update(split.primary).digest("hex");
|
|
127556
127668
|
sdkPieces2.set(name3, split.primary);
|
|
127557
127669
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
127558
127670
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -127611,6 +127723,14 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
127611
127723
|
return true;
|
|
127612
127724
|
}
|
|
127613
127725
|
if (pathname.startsWith(SDK_PATH)) {
|
|
127726
|
+
const published4 = publishedSdkPieces.get(pathname);
|
|
127727
|
+
if (published4) {
|
|
127728
|
+
res.setHeader("access-control-allow-origin", "*");
|
|
127729
|
+
res.setHeader("cache-control", "public, max-age=31536000, immutable");
|
|
127730
|
+
res.setHeader("content-type", published4.contentType);
|
|
127731
|
+
res.end(published4.bytes);
|
|
127732
|
+
return true;
|
|
127733
|
+
}
|
|
127614
127734
|
const name3 = pathname.slice(SDK_PATH.length).replace(/\.wasm$/, "");
|
|
127615
127735
|
const piece = sdkPieces2.get(name3);
|
|
127616
127736
|
let imageKey;
|
|
@@ -127821,13 +127941,13 @@ function disposeSwiftProject(packagePath, signal) {
|
|
|
127821
127941
|
xcodeProjects().delete(packagePath);
|
|
127822
127942
|
sourceEntries().delete(packagePath);
|
|
127823
127943
|
}
|
|
127824
|
-
var import_node_async_hooks3, import_node_child_process67,
|
|
127944
|
+
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;
|
|
127825
127945
|
var init_swift_host = __esm({
|
|
127826
127946
|
"src/swift-host.ts"() {
|
|
127827
127947
|
"use strict";
|
|
127828
127948
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
127829
127949
|
import_node_child_process67 = require("node:child_process");
|
|
127830
|
-
|
|
127950
|
+
import_node_crypto83 = require("node:crypto");
|
|
127831
127951
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
127832
127952
|
import_node_os30 = __toESM(require("node:os"), 1);
|
|
127833
127953
|
import_node_path137 = __toESM(require("node:path"), 1);
|
|
@@ -127962,6 +128082,8 @@ var init_swift_host = __esm({
|
|
|
127962
128082
|
sdkStartupParts = /* @__PURE__ */ new Map();
|
|
127963
128083
|
sdkStartupPlans = /* @__PURE__ */ new Map();
|
|
127964
128084
|
sdkPieces2 = /* @__PURE__ */ new Map();
|
|
128085
|
+
publishedSdkPieces = /* @__PURE__ */ new Map();
|
|
128086
|
+
publishedSdkMirrors = /* @__PURE__ */ new Map();
|
|
127965
128087
|
sdkSplitBindings = /* @__PURE__ */ new Map();
|
|
127966
128088
|
sdkBindingFiles = /* @__PURE__ */ new Map();
|
|
127967
128089
|
servedSdkBinding = (sdk2, sdkDigest) => sdkDigest && sdkSplitBindings.get(`${sdk2.binding.sha256}:${sdkDigest}`) || sdk2.binding.sha256;
|
|
@@ -128587,7 +128709,7 @@ function hashTree(root) {
|
|
|
128587
128709
|
for (const entry of import_node_fs138.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
128588
128710
|
if (!entry.isFile()) continue;
|
|
128589
128711
|
const file = import_node_path140.default.join(entry.parentPath, entry.name);
|
|
128590
|
-
hashes[import_node_path140.default.relative(root, file).split(import_node_path140.default.sep).join("/")] = (0,
|
|
128712
|
+
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");
|
|
128591
128713
|
}
|
|
128592
128714
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
128593
128715
|
}
|
|
@@ -128637,12 +128759,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
128637
128759
|
files: hashTree(generatedRoot)
|
|
128638
128760
|
};
|
|
128639
128761
|
}
|
|
128640
|
-
var import_node_child_process68,
|
|
128762
|
+
var import_node_child_process68, import_node_crypto84, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run12, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
128641
128763
|
var init_turbo_codegen_intake = __esm({
|
|
128642
128764
|
"src/turbo-codegen-intake.ts"() {
|
|
128643
128765
|
"use strict";
|
|
128644
128766
|
import_node_child_process68 = require("node:child_process");
|
|
128645
|
-
|
|
128767
|
+
import_node_crypto84 = require("node:crypto");
|
|
128646
128768
|
import_node_fs138 = __toESM(require("node:fs"), 1);
|
|
128647
128769
|
import_node_module17 = require("node:module");
|
|
128648
128770
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
@@ -132961,11 +133083,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
132961
133083
|
}
|
|
132962
133084
|
`;
|
|
132963
133085
|
}
|
|
132964
|
-
var
|
|
133086
|
+
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;
|
|
132965
133087
|
var init_turbo_source = __esm({
|
|
132966
133088
|
"src/turbo-source.ts"() {
|
|
132967
133089
|
"use strict";
|
|
132968
|
-
|
|
133090
|
+
import_node_crypto85 = require("node:crypto");
|
|
132969
133091
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
132970
133092
|
import_node_module18 = require("node:module");
|
|
132971
133093
|
import_node_path141 = __toESM(require("node:path"), 1);
|
|
@@ -133095,7 +133217,7 @@ var init_turbo_source = __esm({
|
|
|
133095
133217
|
];
|
|
133096
133218
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
133097
133219
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
133098
|
-
sha2564 = (data) => (0,
|
|
133220
|
+
sha2564 = (data) => (0, import_node_crypto85.createHash)("sha256").update(data).digest("hex");
|
|
133099
133221
|
podspecList = podspecAttribute;
|
|
133100
133222
|
reactNativePods = /* @__PURE__ */ new Set([
|
|
133101
133223
|
"React",
|
|
@@ -133982,7 +134104,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped, cor
|
|
|
133982
134104
|
}
|
|
133983
134105
|
async function prepareTurboCompileInput(options2) {
|
|
133984
134106
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
133985
|
-
const key2 = (0,
|
|
134107
|
+
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");
|
|
133986
134108
|
const scratch2 = import_node_path142.default.join(import_node_os31.default.tmpdir(), "peach-turbo-swift", key2);
|
|
133987
134109
|
import_node_fs140.default.mkdirSync(scratch2, { recursive: true });
|
|
133988
134110
|
const codegenDir = import_node_fs140.default.mkdtempSync(import_node_path142.default.join(scratch2, "codegen-"));
|
|
@@ -134224,11 +134346,11 @@ async function compileTurboModule(options2) {
|
|
|
134224
134346
|
collection
|
|
134225
134347
|
};
|
|
134226
134348
|
}
|
|
134227
|
-
var
|
|
134349
|
+
var import_node_crypto86, import_node_fs140, import_node_module19, import_node_os31, import_node_path142;
|
|
134228
134350
|
var init_turbo_compile = __esm({
|
|
134229
134351
|
"src/turbo-compile.ts"() {
|
|
134230
134352
|
"use strict";
|
|
134231
|
-
|
|
134353
|
+
import_node_crypto86 = require("node:crypto");
|
|
134232
134354
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
134233
134355
|
import_node_module19 = require("node:module");
|
|
134234
134356
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
@@ -134428,8 +134550,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
134428
134550
|
);
|
|
134429
134551
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
134430
134552
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
134431
|
-
const headers = (0,
|
|
134432
|
-
const sources = (0,
|
|
134553
|
+
const headers = (0, import_node_crypto87.createHash)("sha256");
|
|
134554
|
+
const sources = (0, import_node_crypto87.createHash)("sha256");
|
|
134433
134555
|
const walk4 = (relative7) => {
|
|
134434
134556
|
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)) {
|
|
134435
134557
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -134536,7 +134658,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
134536
134658
|
const file = import_node_path144.default.join(
|
|
134537
134659
|
cacheDir(),
|
|
134538
134660
|
"native-archives",
|
|
134539
|
-
`${(0,
|
|
134661
|
+
`${(0, import_node_crypto87.createHash)("sha256").update(data).digest("hex")}.a`
|
|
134540
134662
|
);
|
|
134541
134663
|
import_node_fs142.default.mkdirSync(import_node_path144.default.dirname(file), { recursive: true });
|
|
134542
134664
|
if (!import_node_fs142.default.existsSync(file)) import_node_fs142.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -134546,11 +134668,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
134546
134668
|
}
|
|
134547
134669
|
}
|
|
134548
134670
|
}
|
|
134549
|
-
var
|
|
134671
|
+
var import_node_crypto87, import_node_fs142, import_node_module20, import_node_path144, import_node_util18, recipe, strings4, building;
|
|
134550
134672
|
var init_react_native_core = __esm({
|
|
134551
134673
|
"src/react-native-core.ts"() {
|
|
134552
134674
|
"use strict";
|
|
134553
|
-
|
|
134675
|
+
import_node_crypto87 = require("node:crypto");
|
|
134554
134676
|
import_node_fs142 = __toESM(require("node:fs"), 1);
|
|
134555
134677
|
import_node_module20 = require("node:module");
|
|
134556
134678
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
@@ -134576,7 +134698,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
134576
134698
|
const modules = import_node_path145.default.join(moduleRoot, "modules");
|
|
134577
134699
|
const module2 = import_node_path145.default.join(modules, `${name3}.swiftmodule`);
|
|
134578
134700
|
if (!import_node_fs143.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
134579
|
-
const key2 = (0,
|
|
134701
|
+
const key2 = (0, import_node_crypto88.createHash)("sha256").update(import_node_fs143.default.readFileSync(module2)).digest("hex");
|
|
134580
134702
|
const directory2 = import_node_path145.default.join(swiftCacheDir(), "swift-public-names");
|
|
134581
134703
|
const receipt = import_node_path145.default.join(directory2, `${key2}.json`);
|
|
134582
134704
|
if (import_node_fs143.default.existsSync(receipt)) {
|
|
@@ -134659,12 +134781,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
134659
134781
|
}
|
|
134660
134782
|
);
|
|
134661
134783
|
}
|
|
134662
|
-
var import_node_child_process70,
|
|
134784
|
+
var import_node_child_process70, import_node_crypto88, import_node_fs143, import_node_path145, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
134663
134785
|
var init_swift_clang_type_ownership = __esm({
|
|
134664
134786
|
"src/swift-clang-type-ownership.ts"() {
|
|
134665
134787
|
"use strict";
|
|
134666
134788
|
import_node_child_process70 = require("node:child_process");
|
|
134667
|
-
|
|
134789
|
+
import_node_crypto88 = require("node:crypto");
|
|
134668
134790
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
134669
134791
|
import_node_path145 = __toESM(require("node:path"), 1);
|
|
134670
134792
|
init_is_record();
|
|
@@ -136340,7 +136462,7 @@ function targetSettings2(units) {
|
|
|
136340
136462
|
}
|
|
136341
136463
|
function oneSDKStamp(oneSDK) {
|
|
136342
136464
|
if (!oneSDK) return "";
|
|
136343
|
-
const hash = (0,
|
|
136465
|
+
const hash = (0, import_node_crypto89.createHash)("sha256");
|
|
136344
136466
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
136345
136467
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
136346
136468
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -136391,7 +136513,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
136391
136513
|
`;
|
|
136392
136514
|
}
|
|
136393
136515
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
136394
|
-
const hash = (0,
|
|
136516
|
+
const hash = (0, import_node_crypto89.createHash)("sha256");
|
|
136395
136517
|
hash.update(base2);
|
|
136396
136518
|
hash.update(reactProviderStamp);
|
|
136397
136519
|
for (const unit2 of units) {
|
|
@@ -136764,8 +136886,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136764
136886
|
}
|
|
136765
136887
|
return provider;
|
|
136766
136888
|
})() : void 0;
|
|
136767
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
136768
|
-
const key2 = (0,
|
|
136889
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto89.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
136890
|
+
const key2 = (0, import_node_crypto89.createHash)("sha256").update(import_node_fs144.default.realpathSync(root)).digest("hex");
|
|
136769
136891
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
136770
136892
|
const failures = /* @__PURE__ */ new Map();
|
|
136771
136893
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -137059,7 +137181,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
137059
137181
|
await check2(part[0]);
|
|
137060
137182
|
continue;
|
|
137061
137183
|
}
|
|
137062
|
-
const name3 = (0,
|
|
137184
|
+
const name3 = (0, import_node_crypto89.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
137063
137185
|
report(`linking ${part.length} namespaces to isolate failures`);
|
|
137064
137186
|
try {
|
|
137065
137187
|
const built2 = await link(part, `isolate-${name3}`);
|
|
@@ -137203,10 +137325,22 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
137203
137325
|
key2,
|
|
137204
137326
|
flightKey,
|
|
137205
137327
|
url.searchParams,
|
|
137206
|
-
() =>
|
|
137207
|
-
|
|
137208
|
-
|
|
137209
|
-
|
|
137328
|
+
async () => {
|
|
137329
|
+
const result = await withConfiguredNativeSources(
|
|
137330
|
+
key2,
|
|
137331
|
+
() => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
|
|
137332
|
+
);
|
|
137333
|
+
if (!result) return result;
|
|
137334
|
+
const modules = await Promise.all(
|
|
137335
|
+
result.modules.map(
|
|
137336
|
+
async (module2) => module2.sdkUrl ? {
|
|
137337
|
+
...module2,
|
|
137338
|
+
sdkUrl: await localPublishedSwiftSdkUrl(module2.sdkUrl, assetOrigin)
|
|
137339
|
+
} : module2
|
|
137340
|
+
)
|
|
137341
|
+
);
|
|
137342
|
+
return { ...result, modules };
|
|
137343
|
+
},
|
|
137210
137344
|
(result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
|
|
137211
137345
|
);
|
|
137212
137346
|
if (!res.destroyed) {
|
|
@@ -137232,13 +137366,13 @@ ${diagnostics}`}`
|
|
|
137232
137366
|
}
|
|
137233
137367
|
return true;
|
|
137234
137368
|
}
|
|
137235
|
-
var import_node_async_hooks4, import_node_child_process71,
|
|
137369
|
+
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, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
137236
137370
|
var init_expo_swift_host = __esm({
|
|
137237
137371
|
"src/expo-swift-host.ts"() {
|
|
137238
137372
|
"use strict";
|
|
137239
137373
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
137240
137374
|
import_node_child_process71 = require("node:child_process");
|
|
137241
|
-
|
|
137375
|
+
import_node_crypto89 = require("node:crypto");
|
|
137242
137376
|
import_node_fs144 = __toESM(require("node:fs"), 1);
|
|
137243
137377
|
import_node_module21 = require("node:module");
|
|
137244
137378
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
@@ -140515,7 +140649,7 @@ async function createIdentity() {
|
|
|
140515
140649
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
140516
140650
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
140517
140651
|
{
|
|
140518
|
-
serialNumber: (0,
|
|
140652
|
+
serialNumber: (0, import_node_crypto90.randomBytes)(16).toString("hex"),
|
|
140519
140653
|
name: "CN=localhost",
|
|
140520
140654
|
notBefore: new Date(Date.now() - 6e4),
|
|
140521
140655
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -140534,7 +140668,7 @@ async function createIdentity() {
|
|
|
140534
140668
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
140535
140669
|
-----END PRIVATE KEY-----
|
|
140536
140670
|
`,
|
|
140537
|
-
spki: (0,
|
|
140671
|
+
spki: (0, import_node_crypto90.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
140538
140672
|
};
|
|
140539
140673
|
}
|
|
140540
140674
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|
|
@@ -140608,11 +140742,11 @@ async function startFetchProxyTransport(identityPath, hasLiveSims = () => false)
|
|
|
140608
140742
|
);
|
|
140609
140743
|
}
|
|
140610
140744
|
}
|
|
140611
|
-
var
|
|
140745
|
+
var import_node_crypto90, import_node_fs148, import_node_http23, import_node_path150, import_x5092;
|
|
140612
140746
|
var init_fetch_proxy_transport = __esm({
|
|
140613
140747
|
"src/host/fetch-proxy-transport.ts"() {
|
|
140614
140748
|
"use strict";
|
|
140615
|
-
|
|
140749
|
+
import_node_crypto90 = require("node:crypto");
|
|
140616
140750
|
import_node_fs148 = require("node:fs");
|
|
140617
140751
|
import_node_http23 = require("node:http2");
|
|
140618
140752
|
import_node_path150 = __toESM(require("node:path"), 1);
|
|
@@ -141844,10 +141978,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
141844
141978
|
}
|
|
141845
141979
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
141846
141980
|
const directory2 = prepareStagedDirectory();
|
|
141847
|
-
const inputDigest = (0,
|
|
141981
|
+
const inputDigest = (0, import_node_crypto91.createHash)("sha256").update(input).digest("hex");
|
|
141848
141982
|
const index = import_node_path154.default.join(
|
|
141849
141983
|
directory2,
|
|
141850
|
-
`derived-${(0,
|
|
141984
|
+
`derived-${(0, import_node_crypto91.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
141851
141985
|
);
|
|
141852
141986
|
const recorded = import_node_fs152.default.existsSync(index) ? import_node_fs152.default.readFileSync(index, "utf8") : "";
|
|
141853
141987
|
if (STAGED_NAME.test(recorded) && import_node_fs152.default.existsSync(import_node_path154.default.join(directory2, recorded))) {
|
|
@@ -141858,7 +141992,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
141858
141992
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
141859
141993
|
}
|
|
141860
141994
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
141861
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
141995
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto91.randomUUID)());
|
|
141862
141996
|
try {
|
|
141863
141997
|
import_node_fs152.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
141864
141998
|
flag: "wx"
|
|
@@ -141885,7 +142019,7 @@ function stageHostMetroAssets(assets2, origin) {
|
|
|
141885
142019
|
const name3 = staged.pathname.slice(STAGED_PREFIX.length);
|
|
141886
142020
|
const destination = import_node_path154.default.join(directory2, index);
|
|
141887
142021
|
stagedCapture.getStore()?.add(index);
|
|
141888
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
142022
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto91.randomUUID)());
|
|
141889
142023
|
try {
|
|
141890
142024
|
import_node_fs152.default.writeFileSync(temporary, name3, { flag: "wx" });
|
|
141891
142025
|
try {
|
|
@@ -141910,7 +142044,7 @@ function metroIndexName(url) {
|
|
|
141910
142044
|
url.searchParams.get("unstable_path"),
|
|
141911
142045
|
hashes[0]
|
|
141912
142046
|
]);
|
|
141913
|
-
return `metro-${(0,
|
|
142047
|
+
return `metro-${(0, import_node_crypto91.createHash)("sha256").update(key2).digest("hex")}`;
|
|
141914
142048
|
}
|
|
141915
142049
|
function metroRequestIndex(rawUrl) {
|
|
141916
142050
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -141938,7 +142072,7 @@ function prepareStagedDirectory() {
|
|
|
141938
142072
|
return directory2;
|
|
141939
142073
|
}
|
|
141940
142074
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
141941
|
-
const digest3 = (0,
|
|
142075
|
+
const digest3 = (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex");
|
|
141942
142076
|
extension = extension.toLowerCase();
|
|
141943
142077
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
141944
142078
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -141947,7 +142081,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
141947
142081
|
if (import_node_fs152.default.existsSync(destination)) {
|
|
141948
142082
|
import_node_fs152.default.utimesSync(destination, new Date(now), new Date(now));
|
|
141949
142083
|
} else {
|
|
141950
|
-
const temporary = import_node_path154.default.join(directory2, (0,
|
|
142084
|
+
const temporary = import_node_path154.default.join(directory2, (0, import_node_crypto91.randomUUID)());
|
|
141951
142085
|
try {
|
|
141952
142086
|
import_node_fs152.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
141953
142087
|
import_node_fs152.default.renameSync(temporary, destination);
|
|
@@ -142019,12 +142153,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
142019
142153
|
throw error;
|
|
142020
142154
|
}
|
|
142021
142155
|
}
|
|
142022
|
-
var import_node_async_hooks5,
|
|
142156
|
+
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;
|
|
142023
142157
|
var init_staged_host_files = __esm({
|
|
142024
142158
|
"src/host/staged-host-files.ts"() {
|
|
142025
142159
|
"use strict";
|
|
142026
142160
|
import_node_async_hooks5 = require("node:async_hooks");
|
|
142027
|
-
|
|
142161
|
+
import_node_crypto91 = require("node:crypto");
|
|
142028
142162
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
142029
142163
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
142030
142164
|
init_uttype_mime();
|
|
@@ -144550,7 +144684,7 @@ function chunkKey2(lines) {
|
|
|
144550
144684
|
return lines.map((item) => item.text).join("\n");
|
|
144551
144685
|
}
|
|
144552
144686
|
function stableShardIndex(key2, shardCount) {
|
|
144553
|
-
return (0,
|
|
144687
|
+
return (0, import_node_crypto92.createHash)("sha256").update(key2).digest().readUInt32BE(0) % shardCount;
|
|
144554
144688
|
}
|
|
144555
144689
|
function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SHARDS) {
|
|
144556
144690
|
if (shardCount <= 1 || !name3.endsWith(".swift") || name3.endsWith(".types.swift") || source.length < ONE_SDK_BINDING_SHARD_MIN_BYTES) {
|
|
@@ -144794,11 +144928,11 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
|
|
|
144794
144928
|
};
|
|
144795
144929
|
});
|
|
144796
144930
|
}
|
|
144797
|
-
var
|
|
144931
|
+
var import_node_crypto92, import_node_path157, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES;
|
|
144798
144932
|
var init_shard = __esm({
|
|
144799
144933
|
"src/one-sdk/shard.ts"() {
|
|
144800
144934
|
"use strict";
|
|
144801
|
-
|
|
144935
|
+
import_node_crypto92 = require("node:crypto");
|
|
144802
144936
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
144803
144937
|
init_swift_compile();
|
|
144804
144938
|
ONE_SDK_BINDING_SHARDS = 8;
|
|
@@ -145868,7 +146002,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
145868
146002
|
""
|
|
145869
146003
|
].join("\n");
|
|
145870
146004
|
}
|
|
145871
|
-
const digest3 = (0,
|
|
146005
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256").update(manifest);
|
|
145872
146006
|
for (const [name3, source] of files2)
|
|
145873
146007
|
digest3.update(name3).update("\0").update(source).update("\0");
|
|
145874
146008
|
const key2 = digest3.digest("hex").slice(0, 16);
|
|
@@ -145891,11 +146025,11 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
145891
146025
|
...oneSDKShards.size ? { oneSDKShards } : {}
|
|
145892
146026
|
};
|
|
145893
146027
|
}
|
|
145894
|
-
var
|
|
146028
|
+
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;
|
|
145895
146029
|
var init_one_native_controls_package = __esm({
|
|
145896
146030
|
"src/one-native-controls-package.ts"() {
|
|
145897
146031
|
"use strict";
|
|
145898
|
-
|
|
146032
|
+
import_node_crypto93 = require("node:crypto");
|
|
145899
146033
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
145900
146034
|
import_node_module22 = require("node:module");
|
|
145901
146035
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
@@ -147243,7 +147377,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
147243
147377
|
if (!Buffer.from(text7).equals(bytes))
|
|
147244
147378
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
147245
147379
|
files2.set(name3, text7);
|
|
147246
|
-
sources[import_node_path160.default.relative(root, file).split(import_node_path160.default.sep).join("/")] = (0,
|
|
147380
|
+
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");
|
|
147247
147381
|
}
|
|
147248
147382
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
147249
147383
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -147267,17 +147401,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
147267
147401
|
return {
|
|
147268
147402
|
metadata: source.widget,
|
|
147269
147403
|
projectRoot: source.root,
|
|
147270
|
-
appIdentity: (0,
|
|
147404
|
+
appIdentity: (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
147271
147405
|
bundleUrl,
|
|
147272
147406
|
packageUrl,
|
|
147273
147407
|
urlSchemes: source.urlSchemes
|
|
147274
147408
|
};
|
|
147275
147409
|
}
|
|
147276
|
-
var
|
|
147410
|
+
var import_node_crypto94, import_node_fs157, import_node_path160, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
147277
147411
|
var init_one_widget_metadata = __esm({
|
|
147278
147412
|
"src/one-widget-metadata.ts"() {
|
|
147279
147413
|
"use strict";
|
|
147280
|
-
|
|
147414
|
+
import_node_crypto94 = require("node:crypto");
|
|
147281
147415
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
147282
147416
|
import_node_path160 = __toESM(require("node:path"), 1);
|
|
147283
147417
|
init_is_record();
|
|
@@ -147311,7 +147445,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
147311
147445
|
const packagePath = import_node_path161.default.join(
|
|
147312
147446
|
import_node_os34.default.tmpdir(),
|
|
147313
147447
|
"peach-one-widgets",
|
|
147314
|
-
(0,
|
|
147448
|
+
(0, import_node_crypto95.createHash)("sha256").update(root).digest("hex"),
|
|
147315
147449
|
ONE_WIDGET_PACKAGE
|
|
147316
147450
|
);
|
|
147317
147451
|
import_node_fs158.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -147325,11 +147459,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
147325
147459
|
widget
|
|
147326
147460
|
};
|
|
147327
147461
|
}
|
|
147328
|
-
var
|
|
147462
|
+
var import_node_crypto95, import_node_fs158, import_node_os34, import_node_path161;
|
|
147329
147463
|
var init_one_widget_package = __esm({
|
|
147330
147464
|
"src/one-widget-package.ts"() {
|
|
147331
147465
|
"use strict";
|
|
147332
|
-
|
|
147466
|
+
import_node_crypto95 = require("node:crypto");
|
|
147333
147467
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
147334
147468
|
import_node_os34 = __toESM(require("node:os"), 1);
|
|
147335
147469
|
import_node_path161 = __toESM(require("node:path"), 1);
|
|
@@ -147545,7 +147679,7 @@ var init_android_view_classes = __esm({
|
|
|
147545
147679
|
|
|
147546
147680
|
// src/java-module-abi.ts
|
|
147547
147681
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
147548
|
-
const digest3 = (0,
|
|
147682
|
+
const digest3 = (0, import_node_crypto96.createHash)("sha256");
|
|
147549
147683
|
const parent = import_node_path163.default.join(kotlinHome(), "java-specs");
|
|
147550
147684
|
import_node_fs160.default.mkdirSync(parent, { recursive: true });
|
|
147551
147685
|
const work = import_node_fs160.default.mkdtempSync(import_node_path163.default.join(parent, ".read-"));
|
|
@@ -147642,12 +147776,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
147642
147776
|
);
|
|
147643
147777
|
return library;
|
|
147644
147778
|
}
|
|
147645
|
-
var import_node_child_process74,
|
|
147779
|
+
var import_node_child_process74, import_node_crypto96, import_node_fs160, import_node_path163, import_node_util20, run14, JAVA_BINDINGS_INITIALIZER;
|
|
147646
147780
|
var init_java_module_abi = __esm({
|
|
147647
147781
|
"src/java-module-abi.ts"() {
|
|
147648
147782
|
"use strict";
|
|
147649
147783
|
import_node_child_process74 = require("node:child_process");
|
|
147650
|
-
|
|
147784
|
+
import_node_crypto96 = require("node:crypto");
|
|
147651
147785
|
import_node_fs160 = __toESM(require("node:fs"), 1);
|
|
147652
147786
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
147653
147787
|
import_node_util20 = require("node:util");
|
|
@@ -148081,7 +148215,7 @@ function zipSources(bytes, where) {
|
|
|
148081
148215
|
return entries2;
|
|
148082
148216
|
}
|
|
148083
148217
|
function extract(bytes, where) {
|
|
148084
|
-
const key2 = (0,
|
|
148218
|
+
const key2 = (0, import_node_crypto97.createHash)("sha256").update(bytes).digest("hex");
|
|
148085
148219
|
const cached5 = pending.get(key2);
|
|
148086
148220
|
if (cached5) return cached5;
|
|
148087
148221
|
const request = (async () => {
|
|
@@ -148192,11 +148326,11 @@ async function kotlinSources(bytes, where) {
|
|
|
148192
148326
|
if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
|
|
148193
148327
|
return kotlin;
|
|
148194
148328
|
}
|
|
148195
|
-
var
|
|
148329
|
+
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;
|
|
148196
148330
|
var init_kotlin_maven_sources = __esm({
|
|
148197
148331
|
"src/kotlin-maven-sources.ts"() {
|
|
148198
148332
|
"use strict";
|
|
148199
|
-
|
|
148333
|
+
import_node_crypto97 = require("node:crypto");
|
|
148200
148334
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
148201
148335
|
import_node_os35 = __toESM(require("node:os"), 1);
|
|
148202
148336
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
@@ -148286,7 +148420,7 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
148286
148420
|
])
|
|
148287
148421
|
];
|
|
148288
148422
|
const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
148289
|
-
const suffix = (0,
|
|
148423
|
+
const suffix = (0, import_node_crypto98.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
|
|
148290
148424
|
const klib = import_node_path166.default.join(input.output, `${name3}-${suffix}.klib`);
|
|
148291
148425
|
const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
|
|
148292
148426
|
const abiPairs = java.length ? dependencies.flatMap(
|
|
@@ -148328,11 +148462,11 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
148328
148462
|
}
|
|
148329
148463
|
return [...compiled.values()].map(({ klib }) => klib);
|
|
148330
148464
|
}
|
|
148331
|
-
var
|
|
148465
|
+
var import_node_crypto98, import_node_fs163, import_node_path166;
|
|
148332
148466
|
var init_kotlin_gradle_library_plan = __esm({
|
|
148333
148467
|
"src/kotlin-gradle-library-plan.ts"() {
|
|
148334
148468
|
"use strict";
|
|
148335
|
-
|
|
148469
|
+
import_node_crypto98 = require("node:crypto");
|
|
148336
148470
|
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
148337
148471
|
import_node_path166 = __toESM(require("node:path"), 1);
|
|
148338
148472
|
init_kotlin_library_sources();
|
|
@@ -148568,13 +148702,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
148568
148702
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
148569
148703
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
148570
148704
|
const bytes = import_node_fs164.default.readFileSync(target);
|
|
148571
|
-
if (bytes.length !== expected.bytes || (0,
|
|
148705
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto99.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
148572
148706
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
148573
148707
|
}
|
|
148574
148708
|
return manifest;
|
|
148575
148709
|
}
|
|
148576
148710
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
148577
|
-
const sha2565 = (0,
|
|
148711
|
+
const sha2565 = (0, import_node_crypto99.createHash)("sha256").update(archive).digest("hex");
|
|
148578
148712
|
const parent = import_node_path167.default.join(kotlinHome(), "sdk");
|
|
148579
148713
|
const root = import_node_path167.default.join(parent, sha2565);
|
|
148580
148714
|
if (import_node_fs164.default.existsSync(root))
|
|
@@ -148603,12 +148737,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
148603
148737
|
import_node_fs164.default.rmSync(work, { recursive: true, force: true });
|
|
148604
148738
|
}
|
|
148605
148739
|
}
|
|
148606
|
-
var import_node_child_process76,
|
|
148740
|
+
var import_node_child_process76, import_node_crypto99, import_node_fs164, import_node_path167, import_node_util21, run15;
|
|
148607
148741
|
var init_kotlin_sdk = __esm({
|
|
148608
148742
|
"src/kotlin-sdk.ts"() {
|
|
148609
148743
|
"use strict";
|
|
148610
148744
|
import_node_child_process76 = require("node:child_process");
|
|
148611
|
-
|
|
148745
|
+
import_node_crypto99 = require("node:crypto");
|
|
148612
148746
|
import_node_fs164 = __toESM(require("node:fs"), 1);
|
|
148613
148747
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
148614
148748
|
import_node_util21 = require("node:util");
|
|
@@ -148744,7 +148878,7 @@ function peachKotlinModuleRoot() {
|
|
|
148744
148878
|
if (!IS_STANDALONE) return import_node_path168.default.join(peachsimPackageRoot(), "kotlin");
|
|
148745
148879
|
if (installedRoot) return installedRoot;
|
|
148746
148880
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
148747
|
-
const digest3 = (0,
|
|
148881
|
+
const digest3 = (0, import_node_crypto100.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
148748
148882
|
const parent = import_node_path168.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
148749
148883
|
const root = import_node_path168.default.join(parent, digest3);
|
|
148750
148884
|
import_node_fs165.default.mkdirSync(parent, { recursive: true });
|
|
@@ -148773,11 +148907,11 @@ function peachKotlinModuleRoot() {
|
|
|
148773
148907
|
installedRoot = root;
|
|
148774
148908
|
return root;
|
|
148775
148909
|
}
|
|
148776
|
-
var
|
|
148910
|
+
var import_node_crypto100, import_node_fs165, import_node_path168, installedRoot;
|
|
148777
148911
|
var init_kotlin_module = __esm({
|
|
148778
148912
|
"src/kotlin-module.ts"() {
|
|
148779
148913
|
"use strict";
|
|
148780
|
-
|
|
148914
|
+
import_node_crypto100 = require("node:crypto");
|
|
148781
148915
|
import_node_fs165 = __toESM(require("node:fs"), 1);
|
|
148782
148916
|
import_node_path168 = __toESM(require("node:path"), 1);
|
|
148783
148917
|
init_standalone();
|
|
@@ -148811,7 +148945,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
148811
148945
|
const parent = import_node_path169.default.join(kotlinHome(), "gradle-sources");
|
|
148812
148946
|
import_node_fs166.default.mkdirSync(parent, { recursive: true });
|
|
148813
148947
|
const work = import_node_fs166.default.mkdtempSync(import_node_path169.default.join(parent, ".query-"));
|
|
148814
|
-
const task = `peachAndroidSources${(0,
|
|
148948
|
+
const task = `peachAndroidSources${(0, import_node_crypto101.randomBytes)(8).toString("hex")}`;
|
|
148815
148949
|
const script = import_node_path169.default.join(work, "sources.gradle");
|
|
148816
148950
|
const encoded = Buffer.from(
|
|
148817
148951
|
JSON.stringify({
|
|
@@ -148963,12 +149097,12 @@ function readDependencySources(value) {
|
|
|
148963
149097
|
};
|
|
148964
149098
|
});
|
|
148965
149099
|
}
|
|
148966
|
-
var import_node_child_process77,
|
|
149100
|
+
var import_node_child_process77, import_node_crypto101, import_node_fs166, import_node_path169, import_node_util22, run16, modelQuery;
|
|
148967
149101
|
var init_android_gradle_sources = __esm({
|
|
148968
149102
|
"src/android-gradle-sources.ts"() {
|
|
148969
149103
|
"use strict";
|
|
148970
149104
|
import_node_child_process77 = require("node:child_process");
|
|
148971
|
-
|
|
149105
|
+
import_node_crypto101 = require("node:crypto");
|
|
148972
149106
|
import_node_fs166 = __toESM(require("node:fs"), 1);
|
|
148973
149107
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
148974
149108
|
import_node_util22 = require("node:util");
|
|
@@ -149383,7 +149517,7 @@ function readExpoTypes(output) {
|
|
|
149383
149517
|
});
|
|
149384
149518
|
}
|
|
149385
149519
|
async function scanSources(tool, parse19, toolchain, moduleRoot, files2) {
|
|
149386
|
-
const digest3 = (0,
|
|
149520
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
149387
149521
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
149388
149522
|
digest3.update(import_node_fs167.default.readFileSync(import_node_path170.default.join(moduleRoot, "sdk.tar.gz")));
|
|
149389
149523
|
digest3.update(tool);
|
|
@@ -150045,7 +150179,7 @@ async function compileKotlin(input, origin) {
|
|
|
150045
150179
|
bytes: import_node_fs167.default.readFileSync(file)
|
|
150046
150180
|
}));
|
|
150047
150181
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
150048
|
-
const digest3 = (0,
|
|
150182
|
+
const digest3 = (0, import_node_crypto102.createHash)("sha256");
|
|
150049
150183
|
digest3.update(
|
|
150050
150184
|
JSON.stringify({
|
|
150051
150185
|
format: BUILD_FORMAT,
|
|
@@ -150067,7 +150201,7 @@ async function compileKotlin(input, origin) {
|
|
|
150067
150201
|
...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
|
|
150068
150202
|
]);
|
|
150069
150203
|
for (const file of files2) {
|
|
150070
|
-
digest3.update((0,
|
|
150204
|
+
digest3.update((0, import_node_crypto102.createHash)("sha256").update(import_node_fs167.default.readFileSync(file)).digest());
|
|
150071
150205
|
}
|
|
150072
150206
|
}
|
|
150073
150207
|
if (viewModels) digest3.update(viewModels.toolClass);
|
|
@@ -150359,12 +150493,12 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
150359
150493
|
}
|
|
150360
150494
|
return true;
|
|
150361
150495
|
}
|
|
150362
|
-
var import_node_child_process78,
|
|
150496
|
+
var import_node_child_process78, import_node_crypto102, import_node_fs167, import_node_module23, import_node_path170, import_node_util23, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
|
|
150363
150497
|
var init_kotlin_host = __esm({
|
|
150364
150498
|
"src/kotlin-host.ts"() {
|
|
150365
150499
|
"use strict";
|
|
150366
150500
|
import_node_child_process78 = require("node:child_process");
|
|
150367
|
-
|
|
150501
|
+
import_node_crypto102 = require("node:crypto");
|
|
150368
150502
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
150369
150503
|
import_node_module23 = require("node:module");
|
|
150370
150504
|
import_node_path170 = __toESM(require("node:path"), 1);
|
|
@@ -150720,7 +150854,7 @@ async function readManagedExpoIdentity(root, platform3, iosTarget, bridgeOrigin)
|
|
|
150720
150854
|
url.searchParams.set("root", root);
|
|
150721
150855
|
const response = await nodeHttpFetch(url.href);
|
|
150722
150856
|
if (response.ok && response.headers.get("content-type") === revisionType) {
|
|
150723
|
-
const environment = (0,
|
|
150857
|
+
const environment = (0, import_node_crypto103.createHash)("sha256").update(JSON.stringify(Object.entries(process.env).sort())).digest("hex");
|
|
150724
150858
|
const inputs2 = Buffer.from(
|
|
150725
150859
|
JSON.stringify([
|
|
150726
150860
|
await response.text(),
|
|
@@ -150776,11 +150910,11 @@ function handleManagedExpoInputs(req, res, url) {
|
|
|
150776
150910
|
res.writeHead(200, { "Content-Type": revisionType });
|
|
150777
150911
|
res.end(revision);
|
|
150778
150912
|
}
|
|
150779
|
-
var
|
|
150913
|
+
var import_node_crypto103, import_node_fs169, import_node_path172, revisionType;
|
|
150780
150914
|
var init_managed_expo_identity = __esm({
|
|
150781
150915
|
"src/managed-expo-identity.ts"() {
|
|
150782
150916
|
"use strict";
|
|
150783
|
-
|
|
150917
|
+
import_node_crypto103 = require("node:crypto");
|
|
150784
150918
|
import_node_fs169 = __toESM(require("node:fs"), 1);
|
|
150785
150919
|
import_node_path172 = __toESM(require("node:path"), 1);
|
|
150786
150920
|
init_backend_origin();
|
|
@@ -151000,7 +151134,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
151000
151134
|
const ext = import_node_path175.default.extname(file);
|
|
151001
151135
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
151002
151136
|
if (ext.toLowerCase() === ".pdf") {
|
|
151003
|
-
const sha2565 = (0,
|
|
151137
|
+
const sha2565 = (0, import_node_crypto104.createHash)("sha256").update(bytes).digest("hex");
|
|
151004
151138
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
151005
151139
|
return stageHostBytes(png, origin, ".png");
|
|
151006
151140
|
}
|
|
@@ -151013,11 +151147,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
151013
151147
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
151014
151148
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
151015
151149
|
}
|
|
151016
|
-
var
|
|
151150
|
+
var import_node_crypto104, import_node_fs171, import_node_path175;
|
|
151017
151151
|
var init_expo_widget_assets = __esm({
|
|
151018
151152
|
"src/expo-widget-assets.ts"() {
|
|
151019
151153
|
"use strict";
|
|
151020
|
-
|
|
151154
|
+
import_node_crypto104 = require("node:crypto");
|
|
151021
151155
|
import_node_fs171 = __toESM(require("node:fs"), 1);
|
|
151022
151156
|
import_node_path175 = __toESM(require("node:path"), 1);
|
|
151023
151157
|
init_app_catalog();
|
|
@@ -151072,11 +151206,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
151072
151206
|
"specifications",
|
|
151073
151207
|
`${checksum}.json`
|
|
151074
151208
|
);
|
|
151075
|
-
const sha1 = (value) => (0,
|
|
151209
|
+
const sha1 = (value) => (0, import_node_crypto105.createHash)("sha1").update(value).digest("hex");
|
|
151076
151210
|
let text7;
|
|
151077
151211
|
if (import_node_fs172.default.existsSync(file)) text7 = import_node_fs172.default.readFileSync(file, "utf8");
|
|
151078
151212
|
else {
|
|
151079
|
-
const shard2 = (0,
|
|
151213
|
+
const shard2 = (0, import_node_crypto105.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
151080
151214
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
151081
151215
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
151082
151216
|
if (!response.ok)
|
|
@@ -151205,7 +151339,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
151205
151339
|
"end",
|
|
151206
151340
|
""
|
|
151207
151341
|
].join("\n");
|
|
151208
|
-
const key2 = (0,
|
|
151342
|
+
const key2 = (0, import_node_crypto105.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
151209
151343
|
JSON.stringify(
|
|
151210
151344
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
151211
151345
|
)
|
|
@@ -151274,11 +151408,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
151274
151408
|
);
|
|
151275
151409
|
});
|
|
151276
151410
|
}
|
|
151277
|
-
var
|
|
151411
|
+
var import_node_crypto105, import_node_fs172, import_node_path176, APP, record5, project, podModuleName;
|
|
151278
151412
|
var init_swift_source_pods = __esm({
|
|
151279
151413
|
"src/swift-source-pods.ts"() {
|
|
151280
151414
|
"use strict";
|
|
151281
|
-
|
|
151415
|
+
import_node_crypto105 = require("node:crypto");
|
|
151282
151416
|
import_node_fs172 = __toESM(require("node:fs"), 1);
|
|
151283
151417
|
import_node_path176 = __toESM(require("node:path"), 1);
|
|
151284
151418
|
init_browser();
|
|
@@ -151959,7 +152093,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
151959
152093
|
input.libraries ??= {};
|
|
151960
152094
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
151961
152095
|
}
|
|
151962
|
-
const key2 = (0,
|
|
152096
|
+
const key2 = (0, import_node_crypto106.createHash)("sha256").update(
|
|
151963
152097
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
151964
152098
|
).update("\0").update(import_node_fs173.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
151965
152099
|
const packagePath = import_node_path177.default.join(import_node_os36.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -152015,11 +152149,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
152015
152149
|
...sources(import_node_path177.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
152016
152150
|
];
|
|
152017
152151
|
}
|
|
152018
|
-
var
|
|
152152
|
+
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;
|
|
152019
152153
|
var init_nitro_compile = __esm({
|
|
152020
152154
|
"src/nitro-compile.ts"() {
|
|
152021
152155
|
"use strict";
|
|
152022
|
-
|
|
152156
|
+
import_node_crypto106 = require("node:crypto");
|
|
152023
152157
|
import_node_fs173 = __toESM(require("node:fs"), 1);
|
|
152024
152158
|
import_node_os36 = __toESM(require("node:os"), 1);
|
|
152025
152159
|
import_node_path177 = __toESM(require("node:path"), 1);
|
|
@@ -152096,11 +152230,11 @@ var init_nitro_compile = __esm({
|
|
|
152096
152230
|
});
|
|
152097
152231
|
|
|
152098
152232
|
// src/nitro-compiler-digest.ts
|
|
152099
|
-
var
|
|
152233
|
+
var import_node_crypto107, import_node_fs174, import_node_path178;
|
|
152100
152234
|
var init_nitro_compiler_digest = __esm({
|
|
152101
152235
|
"src/nitro-compiler-digest.ts"() {
|
|
152102
152236
|
"use strict";
|
|
152103
|
-
|
|
152237
|
+
import_node_crypto107 = require("node:crypto");
|
|
152104
152238
|
import_node_fs174 = require("node:fs");
|
|
152105
152239
|
import_node_path178 = __toESM(require("node:path"), 1);
|
|
152106
152240
|
init_swift_compiler_digest();
|
|
@@ -152238,7 +152372,7 @@ var init_nitro_superset = __esm({
|
|
|
152238
152372
|
init_nitroContract();
|
|
152239
152373
|
init_swift_standin_digest();
|
|
152240
152374
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
152241
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
152375
|
+
NITRO_COMPILER_DIGEST = true ? "2cc931ba112a51e34cbca543692c5cd5965c2fcc760351c9766eda8362cf2df8" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
152242
152376
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
152243
152377
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
152244
152378
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -152604,7 +152738,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
152604
152738
|
const packagePath = import_node_path182.default.join(
|
|
152605
152739
|
swiftCacheDir(),
|
|
152606
152740
|
"peach-one-sdk-swift",
|
|
152607
|
-
(0,
|
|
152741
|
+
(0, import_node_crypto108.createHash)("sha256").update(import_node_fs177.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
152608
152742
|
"sdk"
|
|
152609
152743
|
);
|
|
152610
152744
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -152651,11 +152785,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
152651
152785
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
152652
152786
|
};
|
|
152653
152787
|
}
|
|
152654
|
-
var
|
|
152788
|
+
var import_node_crypto108, import_node_fs177, import_node_path182, ONE_SDK_ROUTE, handleOneSDKRequest;
|
|
152655
152789
|
var init_one_sdk_bundle = __esm({
|
|
152656
152790
|
"src/one-sdk-bundle.ts"() {
|
|
152657
152791
|
"use strict";
|
|
152658
|
-
|
|
152792
|
+
import_node_crypto108 = require("node:crypto");
|
|
152659
152793
|
import_node_fs177 = __toESM(require("node:fs"), 1);
|
|
152660
152794
|
import_node_path182 = __toESM(require("node:path"), 1);
|
|
152661
152795
|
init_expo_native_workspace();
|
|
@@ -153373,7 +153507,7 @@ function writeSharedDesktopAuthSession(session) {
|
|
|
153373
153507
|
validatedAt: session.validatedAt ?? same?.validatedAt,
|
|
153374
153508
|
accountId: session.accountId?.trim() || same?.accountId
|
|
153375
153509
|
};
|
|
153376
|
-
const temporary = `${filepath}.${process.pid}.${(0,
|
|
153510
|
+
const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto109.randomUUID)()}.tmp`;
|
|
153377
153511
|
try {
|
|
153378
153512
|
(0, import_node_fs181.writeFileSync)(temporary, JSON.stringify(normalized, null, 2) + "\n", {
|
|
153379
153513
|
mode: 384,
|
|
@@ -153425,11 +153559,11 @@ async function refreshSharedDesktopAuthSession(originOverride) {
|
|
|
153425
153559
|
return readSharedDesktopAuthSession();
|
|
153426
153560
|
}
|
|
153427
153561
|
}
|
|
153428
|
-
var
|
|
153562
|
+
var import_node_crypto109, import_node_fs181, import_node_path187, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
153429
153563
|
var init_shared_session = __esm({
|
|
153430
153564
|
"src/auth/shared-session.ts"() {
|
|
153431
153565
|
"use strict";
|
|
153432
|
-
|
|
153566
|
+
import_node_crypto109 = require("node:crypto");
|
|
153433
153567
|
import_node_fs181 = require("node:fs");
|
|
153434
153568
|
import_node_path187 = require("node:path");
|
|
153435
153569
|
init_home_paths();
|
|
@@ -153470,7 +153604,7 @@ var init_run_rnx = __esm({
|
|
|
153470
153604
|
// cli/secure-file.ts
|
|
153471
153605
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
153472
153606
|
(0, import_node_fs182.mkdirSync)((0, import_node_path188.dirname)(filepath), { recursive: true });
|
|
153473
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
153607
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto110.randomUUID)()}`;
|
|
153474
153608
|
let descriptor = null;
|
|
153475
153609
|
try {
|
|
153476
153610
|
descriptor = (0, import_node_fs182.openSync)(temporary, "wx", 384);
|
|
@@ -153487,11 +153621,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
153487
153621
|
throw error;
|
|
153488
153622
|
}
|
|
153489
153623
|
}
|
|
153490
|
-
var
|
|
153624
|
+
var import_node_crypto110, import_node_fs182, import_node_path188;
|
|
153491
153625
|
var init_secure_file = __esm({
|
|
153492
153626
|
"cli/secure-file.ts"() {
|
|
153493
153627
|
"use strict";
|
|
153494
|
-
|
|
153628
|
+
import_node_crypto110 = require("node:crypto");
|
|
153495
153629
|
import_node_fs182 = require("node:fs");
|
|
153496
153630
|
import_node_path188 = require("node:path");
|
|
153497
153631
|
}
|
|
@@ -156000,7 +156134,7 @@ function projectSessionFile() {
|
|
|
156000
156134
|
}
|
|
156001
156135
|
dir = parent;
|
|
156002
156136
|
}
|
|
156003
|
-
const key2 = (0,
|
|
156137
|
+
const key2 = (0, import_node_crypto111.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
|
|
156004
156138
|
return (0, import_node_path190.join)(rnxHomeDir(), "remote-sessions", `${key2}.json`);
|
|
156005
156139
|
}
|
|
156006
156140
|
function readCloudSession() {
|
|
@@ -156014,11 +156148,11 @@ function readCloudSession() {
|
|
|
156014
156148
|
}
|
|
156015
156149
|
return parseCloudSession(saved.session);
|
|
156016
156150
|
}
|
|
156017
|
-
var
|
|
156151
|
+
var import_node_crypto111, import_node_fs184, import_node_path190, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
|
|
156018
156152
|
var init_cloud_session = __esm({
|
|
156019
156153
|
"cli/cloud-session.ts"() {
|
|
156020
156154
|
"use strict";
|
|
156021
|
-
|
|
156155
|
+
import_node_crypto111 = require("node:crypto");
|
|
156022
156156
|
import_node_fs184 = require("node:fs");
|
|
156023
156157
|
import_node_path190 = require("node:path");
|
|
156024
156158
|
init_backend_origin();
|
|
@@ -156900,7 +157034,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
156900
157034
|
return { directory: directory2, files: files2, truncated };
|
|
156901
157035
|
}
|
|
156902
157036
|
function metroDescriptorHash(scaleBytes) {
|
|
156903
|
-
const hasher = (0,
|
|
157037
|
+
const hasher = (0, import_node_crypto112.createHash)("md5");
|
|
156904
157038
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
156905
157039
|
return hasher.digest("hex");
|
|
156906
157040
|
}
|
|
@@ -156929,7 +157063,7 @@ function distinctByContent(directory2, options2) {
|
|
|
156929
157063
|
} catch {
|
|
156930
157064
|
continue;
|
|
156931
157065
|
}
|
|
156932
|
-
const digest3 = (0,
|
|
157066
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(bytes).digest("hex");
|
|
156933
157067
|
if (!byContent.has(digest3)) byContent.set(digest3, relative7);
|
|
156934
157068
|
}
|
|
156935
157069
|
return [...byContent.values()];
|
|
@@ -156977,7 +157111,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
156977
157111
|
continue;
|
|
156978
157112
|
}
|
|
156979
157113
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
156980
|
-
const digest3 = (0,
|
|
157114
|
+
const digest3 = (0, import_node_crypto112.createHash)("md5").update(file).digest("hex");
|
|
156981
157115
|
return descriptor.scales.some(
|
|
156982
157116
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
156983
157117
|
);
|
|
@@ -157002,7 +157136,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
157002
157136
|
const file = (0, import_node_path192.join)(dest.directory, relative7);
|
|
157003
157137
|
let digest3 = fileDigests2.get(file);
|
|
157004
157138
|
if (digest3 === void 0) {
|
|
157005
|
-
digest3 = (0,
|
|
157139
|
+
digest3 = (0, import_node_crypto112.createHash)("sha256").update((0, import_node_fs186.readFileSync)(file)).digest("hex");
|
|
157006
157140
|
fileDigests2.set(file, digest3);
|
|
157007
157141
|
}
|
|
157008
157142
|
return [scale, digest3];
|
|
@@ -157157,14 +157291,14 @@ async function producePreviewArtifact(bundlePath) {
|
|
|
157157
157291
|
prepared.code
|
|
157158
157292
|
);
|
|
157159
157293
|
const bytes = Buffer.from(annotated, "utf8");
|
|
157160
|
-
const sha2565 = (0,
|
|
157294
|
+
const sha2565 = (0, import_node_crypto112.createHash)("sha256").update(bytes).digest("hex");
|
|
157161
157295
|
return {
|
|
157162
157296
|
bytes,
|
|
157163
157297
|
sha256: sha2565,
|
|
157164
157298
|
minified: false,
|
|
157165
157299
|
receipt: {
|
|
157166
157300
|
source: {
|
|
157167
|
-
sha256: (0,
|
|
157301
|
+
sha256: (0, import_node_crypto112.createHash)("sha256").update(prepared.source).digest("hex"),
|
|
157168
157302
|
bytes: Buffer.byteLength(prepared.source, "utf8")
|
|
157169
157303
|
},
|
|
157170
157304
|
artifact: { sha256: sha2565, bytes: bytes.byteLength }
|
|
@@ -157320,7 +157454,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
157320
157454
|
}
|
|
157321
157455
|
return {
|
|
157322
157456
|
bytes,
|
|
157323
|
-
sha256: (0,
|
|
157457
|
+
sha256: (0, import_node_crypto112.createHash)("sha256").update(bytes).digest("hex"),
|
|
157324
157458
|
receipt: artifact.receipt,
|
|
157325
157459
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
157326
157460
|
warnings
|
|
@@ -157836,11 +157970,11 @@ async function closeCloudSession(session) {
|
|
|
157836
157970
|
throw responseError(response.status, text7);
|
|
157837
157971
|
}
|
|
157838
157972
|
}
|
|
157839
|
-
var
|
|
157973
|
+
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, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, SceneBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
|
|
157840
157974
|
var init_cloud_client = __esm({
|
|
157841
157975
|
"cli/cloud-client.ts"() {
|
|
157842
157976
|
"use strict";
|
|
157843
|
-
|
|
157977
|
+
import_node_crypto112 = require("node:crypto");
|
|
157844
157978
|
import_node_fs186 = require("node:fs");
|
|
157845
157979
|
import_node_path192 = require("node:path");
|
|
157846
157980
|
import_node_vm = require("node:vm");
|
|
@@ -157913,7 +158047,7 @@ var init_cloud_client = __esm({
|
|
|
157913
158047
|
const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
|
|
157914
158048
|
const agent = commandAgent(command);
|
|
157915
158049
|
const body = {
|
|
157916
|
-
id: (0,
|
|
158050
|
+
id: (0, import_node_crypto112.randomUUID)(),
|
|
157917
158051
|
claimId: this.session.claimId,
|
|
157918
158052
|
command: cloudCommand(agent ? { ...command, agent } : command)
|
|
157919
158053
|
};
|
|
@@ -157983,7 +158117,7 @@ var init_cloud_client = __esm({
|
|
|
157983
158117
|
plane = "cloud";
|
|
157984
158118
|
async send(command, options2) {
|
|
157985
158119
|
const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
|
|
157986
|
-
const id = (0,
|
|
158120
|
+
const id = (0, import_node_crypto112.randomUUID)();
|
|
157987
158121
|
const agent = commandAgent(command);
|
|
157988
158122
|
const payload = cloudCommand(agent ? { ...command, agent } : command);
|
|
157989
158123
|
let response;
|
|
@@ -162119,11 +162253,11 @@ function splashImageUrls(spec) {
|
|
|
162119
162253
|
if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
|
|
162120
162254
|
return [...urls];
|
|
162121
162255
|
}
|
|
162122
|
-
var
|
|
162256
|
+
var import_node_crypto113, import_node_module29, require2;
|
|
162123
162257
|
var init_app_splash = __esm({
|
|
162124
162258
|
"cli/app-splash.ts"() {
|
|
162125
162259
|
"use strict";
|
|
162126
|
-
|
|
162260
|
+
import_node_crypto113 = require("node:crypto");
|
|
162127
162261
|
import_node_module29 = require("node:module");
|
|
162128
162262
|
init_backend_origin();
|
|
162129
162263
|
init_cli_runtime();
|
|
@@ -162177,7 +162311,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
162177
162311
|
);
|
|
162178
162312
|
const sidecar = import_node_path197.default.posix.dirname(manifestEntry);
|
|
162179
162313
|
const appRoot = import_node_path197.default.posix.dirname(sidecar);
|
|
162180
|
-
const digest3 = (0,
|
|
162314
|
+
const digest3 = (0, import_node_crypto114.createHash)("sha256").update(import_node_fs191.default.readFileSync(file)).digest("hex");
|
|
162181
162315
|
const out = import_node_path197.default.join(cacheDir(), "app-binaries", digest3);
|
|
162182
162316
|
const bundlePath = import_node_path197.default.join(out, "main.js");
|
|
162183
162317
|
const extracted = import_node_path197.default.join(out, "extracted");
|
|
@@ -162195,7 +162329,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
162195
162329
|
const bundle = (0, import_node_zlib12.brotliDecompressSync)(
|
|
162196
162330
|
import_node_fs191.default.readFileSync(import_node_path197.default.join(extracted, sidecar, PEACH_SIDECAR_BUNDLE))
|
|
162197
162331
|
);
|
|
162198
|
-
if ((0,
|
|
162332
|
+
if ((0, import_node_crypto114.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
|
|
162199
162333
|
throw new Error(`${binary2}: the peach sidecar bundle does not match its manifest`);
|
|
162200
162334
|
const assets2 = manifest.platform === "ios" ? import_node_path197.default.join(extracted, appRoot, "assets") : import_node_path197.default.join(extracted, sidecar, PEACH_SIDECAR_ASSETS);
|
|
162201
162335
|
if (import_node_fs191.default.existsSync(assets2)) import_node_fs191.default.renameSync(assets2, import_node_path197.default.join(out, "assets"));
|
|
@@ -162215,12 +162349,12 @@ function extractAppBinaryBundle(binary2) {
|
|
|
162215
162349
|
);
|
|
162216
162350
|
return { bundlePath, platform: platform3 };
|
|
162217
162351
|
}
|
|
162218
|
-
var import_node_child_process81,
|
|
162352
|
+
var import_node_child_process81, import_node_crypto114, import_node_fs191, import_node_path197, import_node_zlib12;
|
|
162219
162353
|
var init_binary_sidecar = __esm({
|
|
162220
162354
|
"cli/binary-sidecar.ts"() {
|
|
162221
162355
|
"use strict";
|
|
162222
162356
|
import_node_child_process81 = require("node:child_process");
|
|
162223
|
-
|
|
162357
|
+
import_node_crypto114 = require("node:crypto");
|
|
162224
162358
|
import_node_fs191 = __toESM(require("node:fs"), 1);
|
|
162225
162359
|
import_node_path197 = __toESM(require("node:path"), 1);
|
|
162226
162360
|
import_node_zlib12 = require("node:zlib");
|
|
@@ -163056,7 +163190,7 @@ var init_core = __esm({
|
|
|
163056
163190
|
// cli/output-redaction.ts
|
|
163057
163191
|
function mask(value) {
|
|
163058
163192
|
if (MASKED.test(value)) return value;
|
|
163059
|
-
return `<redacted:${(0,
|
|
163193
|
+
return `<redacted:${(0, import_node_crypto115.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
|
|
163060
163194
|
}
|
|
163061
163195
|
function maskQuoted(quoted2) {
|
|
163062
163196
|
return `${quoted2[0]}${mask(quoted2.slice(1, -1))}${quoted2[0]}`;
|
|
@@ -163178,11 +163312,11 @@ function redactText(text7, configurationOnly, decodedString = false) {
|
|
|
163178
163312
|
(line, prefix, name3, value) => SECRET_NAME.test(name3) ? `${prefix}${mask(value)}` : line
|
|
163179
163313
|
).replace(EMAIL, mask).replace(OPAQUE_ID, mask);
|
|
163180
163314
|
}
|
|
163181
|
-
var
|
|
163315
|
+
var import_node_crypto115, import_node_util26, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
|
|
163182
163316
|
var init_output_redaction = __esm({
|
|
163183
163317
|
"cli/output-redaction.ts"() {
|
|
163184
163318
|
"use strict";
|
|
163185
|
-
|
|
163319
|
+
import_node_crypto115 = require("node:crypto");
|
|
163186
163320
|
import_node_util26 = require("node:util");
|
|
163187
163321
|
init_config();
|
|
163188
163322
|
SECRET_NAME = /^(?:[\w-]*(?:api[-_]?key|token|secret|password|passwd|authorization|cookie|signature|credential)s?|auth|sig|email|uid|[\w-]*(?:user|account|local|device|installation|client|app|project|sender|measurement|tenant)[-_]?id)$/i;
|
|
@@ -163685,7 +163819,7 @@ function macDesktopLaunchHome(bridgePort) {
|
|
|
163685
163819
|
const dev = readDevBridgeLockfiles().find(
|
|
163686
163820
|
(lock) => lock.bridgePort === bridgePort && isDevBridgeLockfileFresh(lock)
|
|
163687
163821
|
);
|
|
163688
|
-
const homeKey = (0,
|
|
163822
|
+
const homeKey = (0, import_node_crypto116.createHash)("sha256").update(home).digest("hex");
|
|
163689
163823
|
const dir = (0, import_path7.join)((0, import_os4.tmpdir)(), "peach-desktop-launch", homeKey, String(bridgePort));
|
|
163690
163824
|
(0, import_fs8.mkdirSync)(dir, { recursive: true });
|
|
163691
163825
|
if ((0, import_fs8.existsSync)(home)) {
|
|
@@ -163791,13 +163925,13 @@ function buildMacLaunchUrl(url, opts, nativeApp = false) {
|
|
|
163791
163925
|
}
|
|
163792
163926
|
return deepLink.toString();
|
|
163793
163927
|
}
|
|
163794
|
-
var import_child_process6, import_fs8,
|
|
163928
|
+
var import_child_process6, import_fs8, import_node_crypto116, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
|
|
163795
163929
|
var init_desktop_companion = __esm({
|
|
163796
163930
|
"cli/desktop-companion.ts"() {
|
|
163797
163931
|
"use strict";
|
|
163798
163932
|
import_child_process6 = require("child_process");
|
|
163799
163933
|
import_fs8 = require("fs");
|
|
163800
|
-
|
|
163934
|
+
import_node_crypto116 = require("node:crypto");
|
|
163801
163935
|
import_os4 = require("os");
|
|
163802
163936
|
import_path7 = require("path");
|
|
163803
163937
|
import_url2 = require("url");
|
|
@@ -164532,11 +164666,11 @@ function trackCliDiagnostic(diagnostic) {
|
|
|
164532
164666
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
164533
164667
|
});
|
|
164534
164668
|
}
|
|
164535
|
-
var
|
|
164669
|
+
var import_node_crypto117, import_node_fs192, import_node_os38, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
|
|
164536
164670
|
var init_telemetry = __esm({
|
|
164537
164671
|
"cli/telemetry.ts"() {
|
|
164538
164672
|
"use strict";
|
|
164539
|
-
|
|
164673
|
+
import_node_crypto117 = require("node:crypto");
|
|
164540
164674
|
import_node_fs192 = require("node:fs");
|
|
164541
164675
|
import_node_os38 = require("node:os");
|
|
164542
164676
|
init_event_identity();
|
|
@@ -170291,18 +170425,18 @@ function stageAppBundleResources(appDir, origin, iosTarget, environment) {
|
|
|
170291
170425
|
const content = bytes[index];
|
|
170292
170426
|
result[base2] = {
|
|
170293
170427
|
uri: urls[index],
|
|
170294
|
-
sha256: (0,
|
|
170428
|
+
sha256: (0, import_node_crypto118.createHash)("sha256").update(content).digest("hex"),
|
|
170295
170429
|
contentType: preferredMimeType(base2) ?? "application/octet-stream",
|
|
170296
170430
|
byteLength: content.byteLength
|
|
170297
170431
|
};
|
|
170298
170432
|
});
|
|
170299
170433
|
return result;
|
|
170300
170434
|
}
|
|
170301
|
-
var
|
|
170435
|
+
var import_node_crypto118, import_node_fs195, import_node_path199;
|
|
170302
170436
|
var init_app_bundle_resources = __esm({
|
|
170303
170437
|
"cli/app-bundle-resources.ts"() {
|
|
170304
170438
|
"use strict";
|
|
170305
|
-
|
|
170439
|
+
import_node_crypto118 = require("node:crypto");
|
|
170306
170440
|
import_node_fs195 = __toESM(require("node:fs"), 1);
|
|
170307
170441
|
import_node_path199 = __toESM(require("node:path"), 1);
|
|
170308
170442
|
init_uttype_mime();
|
|
@@ -170440,7 +170574,7 @@ function materialSymbolFontAssets(fontPaths) {
|
|
|
170440
170574
|
const directory2 = import_node_path200.default.dirname(selected[0]);
|
|
170441
170575
|
const codepointsFile = import_node_path200.default.join(directory2, "MaterialSymbols.codepoints");
|
|
170442
170576
|
const mirroredFile = import_node_path200.default.join(directory2, "MaterialSymbols.mirrored");
|
|
170443
|
-
const digest3 = (0,
|
|
170577
|
+
const digest3 = (0, import_node_crypto119.createHash)("md5");
|
|
170444
170578
|
for (const asset of [...selected, codepointsFile, mirroredFile].sort(
|
|
170445
170579
|
(a, b) => import_node_path200.default.basename(a) < import_node_path200.default.basename(b) ? -1 : import_node_path200.default.basename(a) > import_node_path200.default.basename(b) ? 1 : 0
|
|
170446
170580
|
)) {
|
|
@@ -170452,11 +170586,11 @@ function materialSymbolFontAssets(fontPaths) {
|
|
|
170452
170586
|
mirroredPath: mirroredFile
|
|
170453
170587
|
};
|
|
170454
170588
|
}
|
|
170455
|
-
var
|
|
170589
|
+
var import_node_crypto119, import_node_fs196, import_node_module30, import_node_path200;
|
|
170456
170590
|
var init_material_symbol_fonts2 = __esm({
|
|
170457
170591
|
"cli/material-symbol-fonts.ts"() {
|
|
170458
170592
|
"use strict";
|
|
170459
|
-
|
|
170593
|
+
import_node_crypto119 = require("node:crypto");
|
|
170460
170594
|
import_node_fs196 = __toESM(require("node:fs"), 1);
|
|
170461
170595
|
import_node_module30 = require("node:module");
|
|
170462
170596
|
import_node_path200 = __toESM(require("node:path"), 1);
|
|
@@ -170695,11 +170829,11 @@ function discoverNativeLinkedAppFontAssets(opts) {
|
|
|
170695
170829
|
materialSymbols: materialSymbolFontAssets(materialFonts)
|
|
170696
170830
|
};
|
|
170697
170831
|
}
|
|
170698
|
-
var
|
|
170832
|
+
var import_node_crypto120, import_node_fs197, import_node_module31, import_node_path201, require3;
|
|
170699
170833
|
var init_app_fonts = __esm({
|
|
170700
170834
|
"cli/app-fonts.ts"() {
|
|
170701
170835
|
"use strict";
|
|
170702
|
-
|
|
170836
|
+
import_node_crypto120 = require("node:crypto");
|
|
170703
170837
|
import_node_fs197 = __toESM(require("node:fs"), 1);
|
|
170704
170838
|
import_node_module31 = require("node:module");
|
|
170705
170839
|
import_node_path201 = __toESM(require("node:path"), 1);
|
|
@@ -171914,11 +172048,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
|
|
|
171914
172048
|
return import_node_fs199.default.readFileSync(import_node_path203.default.join(search.dest.directory, relative7));
|
|
171915
172049
|
});
|
|
171916
172050
|
const verified2 = perFile && hashes ? bytes.every((content, i) => {
|
|
171917
|
-
const hash = (0,
|
|
172051
|
+
const hash = (0, import_node_crypto121.createHash)("md5").update(content).digest("hex");
|
|
171918
172052
|
return descriptor.scales.some(
|
|
171919
172053
|
(scale, j) => scale === scales[i] && hashes[j] === hash
|
|
171920
172054
|
);
|
|
171921
|
-
}) : scales.length === descriptor.scales.length && (0,
|
|
172055
|
+
}) : scales.length === descriptor.scales.length && (0, import_node_crypto121.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
|
|
171922
172056
|
if (!verified2)
|
|
171923
172057
|
throw new Error(`Metro asset changed while staging: ${descriptor.name}`);
|
|
171924
172058
|
scales.forEach((scale, i) => {
|
|
@@ -171945,11 +172079,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
|
|
|
171945
172079
|
});
|
|
171946
172080
|
stageHostMetroAssets(staged, origin);
|
|
171947
172081
|
}
|
|
171948
|
-
var
|
|
172082
|
+
var import_node_crypto121, import_node_fs199, import_node_path203;
|
|
171949
172083
|
var init_metro_bundle_assets = __esm({
|
|
171950
172084
|
"cli/metro-bundle-assets.ts"() {
|
|
171951
172085
|
"use strict";
|
|
171952
|
-
|
|
172086
|
+
import_node_crypto121 = require("node:crypto");
|
|
171953
172087
|
import_node_fs199 = __toESM(require("node:fs"), 1);
|
|
171954
172088
|
import_node_path203 = __toESM(require("node:path"), 1);
|
|
171955
172089
|
init_metroAssetArtifact();
|
|
@@ -172114,7 +172248,7 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
|
|
|
172114
172248
|
` dev-login not available (${devResult.error}); falling back to browser`
|
|
172115
172249
|
);
|
|
172116
172250
|
}
|
|
172117
|
-
const state = (0,
|
|
172251
|
+
const state = (0, import_node_crypto122.randomBytes)(16).toString("hex");
|
|
172118
172252
|
const LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
172119
172253
|
const result = await new Promise((resolve16) => {
|
|
172120
172254
|
let timer;
|
|
@@ -172223,11 +172357,11 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
|
|
|
172223
172357
|
dev: false
|
|
172224
172358
|
};
|
|
172225
172359
|
}
|
|
172226
|
-
var
|
|
172360
|
+
var import_node_crypto122, import_node_http4, import_promises21, REMOTE_DEFAULT_ORIGIN, DEV_LOGIN_WARMUP_MS;
|
|
172227
172361
|
var init_login = __esm({
|
|
172228
172362
|
"cli/commands/login.ts"() {
|
|
172229
172363
|
"use strict";
|
|
172230
|
-
|
|
172364
|
+
import_node_crypto122 = require("node:crypto");
|
|
172231
172365
|
import_node_http4 = __toESM(require("node:http"), 1);
|
|
172232
172366
|
import_promises21 = require("node:readline/promises");
|
|
172233
172367
|
init_shared_session();
|
|
@@ -172439,7 +172573,7 @@ async function requireAccount(commandLabel, options2 = {}, signedInAgain = false
|
|
|
172439
172573
|
if (auth.kind === "github") return;
|
|
172440
172574
|
const header = authHeaderValue(auth);
|
|
172441
172575
|
const origin = await billingOriginFor(auth);
|
|
172442
|
-
const credential = (0,
|
|
172576
|
+
const credential = (0, import_node_crypto123.createHash)("sha256").update(`${origin}
|
|
172443
172577
|
${header}`).digest("hex");
|
|
172444
172578
|
const check2 = readCheck();
|
|
172445
172579
|
const known = check2?.credential === credential ? check2 : null;
|
|
@@ -172487,11 +172621,11 @@ ${header}`).digest("hex");
|
|
|
172487
172621
|
`${name3} could not reach ${origin} to verify your account${status ? ` (${status})` : ""}; connect once and run it again`
|
|
172488
172622
|
);
|
|
172489
172623
|
}
|
|
172490
|
-
var
|
|
172624
|
+
var import_node_crypto123, import_node_fs200, import_node_path204, import_zod5, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
|
|
172491
172625
|
var init_account_gate = __esm({
|
|
172492
172626
|
"cli/account-gate.ts"() {
|
|
172493
172627
|
"use strict";
|
|
172494
|
-
|
|
172628
|
+
import_node_crypto123 = require("node:crypto");
|
|
172495
172629
|
import_node_fs200 = require("node:fs");
|
|
172496
172630
|
import_node_path204 = __toESM(require("node:path"), 1);
|
|
172497
172631
|
import_zod5 = require("peachsim/vendor/zod");
|