peachsim 0.1.2624 → 0.1.2626
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/diagnose-native.ts +717 -0
- package/cli/commands/perf-native.ts +120 -51
- 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 +424 -339
- 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-DH6VFUJ3.mjs → acorn-JXJYSAIN.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-YOD53JTM.mjs → chunk-26TN2VTX.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-T7C6Z5UH.mjs → chunk-2NVWTTQ4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LT533AHJ.mjs → chunk-2R77YMAI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XONCLAVA.mjs → chunk-4KZSU4Q6.mjs} +21 -13
- package/dist-lib/esm-chunks/{chunk-IMI2NE4A.mjs → chunk-5STOTQGG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HKPKCJI5.mjs → chunk-5TQNPFPN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OLAYY7SG.mjs → chunk-5UEXET5Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LMWSFXYN.mjs → chunk-62JXISPM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-A2WMBGJO.mjs → chunk-7ASIV44B.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-JHMD4G4V.mjs → chunk-AETFJFSQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UJORQHAE.mjs → chunk-AVFNDICR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AV7G5PTE.mjs → chunk-BFQUJ4RC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-265THLTP.mjs → chunk-BSNIUHSI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CM2NU5MS.mjs → chunk-F6KLM535.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-LOQBWIPM.mjs → chunk-HESCA2JF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N4ZJZUCO.mjs → chunk-IYJG62ST.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QNXV766K.mjs → chunk-LBDHHUER.mjs} +81 -15
- package/dist-lib/esm-chunks/{chunk-EFQFJ7M6.mjs → chunk-LWOZ3LUO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3XA5HYI5.mjs → chunk-T4ZKKV6P.mjs} +9 -8
- package/dist-lib/esm-chunks/{chunk-2YHIYKY2.mjs → chunk-UD7ON4ZV.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-LCO2EXKF.mjs → chunk-V4CRDOYA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LD7Z3NDO.mjs → chunk-WC43FELF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QZ5HTMWV.mjs → chunk-XCUDQYYK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VH4BJS5V.mjs → chunk-YPBNNV6N.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-MDVTDJ65.mjs → metro-layout-parser-E34XATI4.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-ZN7I4FYC.mjs → swift-package-prebuilt-73BSTPFQ.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-DUVE2OXH.mjs → swift-sdk-app-module-L7AT6SCB.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-YSWQBCYV.mjs → swift-sdk-image-5NH574IM.mjs} +16 -18
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-MZ235WSK.mjs → swift-sdk-image-producer-YVZHH2LX.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +325 -240
- 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 +428 -343
- package/dist-lib/host/fetch-proxy-handler.cjs +76 -8
- 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 +4 -3
- 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 +87 -86
- package/dist-lib/public-origins-lib.json +69 -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 +465 -380
- package/dist-lib/swift-compile.cjs +142 -62
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/react-native-core-build.ts +12 -12
- package/src/react-native-core.ts +3 -7
- package/src/swift-compiler-digest.ts +37 -10
- package/src/swift-distribution-contract.ts +6 -1
- package/src/swift-distribution.lock.json +4 -2
- package/src/swift-sdk-image-recipe.ts +20 -0
- package/src/swift-sdk-image.ts +2 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2626 | (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;
|
|
@@ -2684,7 +2684,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
2684
2684
|
});
|
|
2685
2685
|
|
|
2686
2686
|
// src/swift-compiler-digest.ts
|
|
2687
|
-
var import_node_crypto2, import_node_fs6, import_node_path4;
|
|
2687
|
+
var import_node_crypto2, import_node_fs6, import_node_path4, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
2688
2688
|
var init_swift_compiler_digest = __esm({
|
|
2689
2689
|
"src/swift-compiler-digest.ts"() {
|
|
2690
2690
|
"use strict";
|
|
@@ -2692,6 +2692,72 @@ var init_swift_compiler_digest = __esm({
|
|
|
2692
2692
|
import_node_fs6 = require("node:fs");
|
|
2693
2693
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
2694
2694
|
init_swift_objc_sdk_tree();
|
|
2695
|
+
SWIFT_DIGEST_SOURCES = [
|
|
2696
|
+
"swift-compile.ts",
|
|
2697
|
+
"swift-sdk-surface.ts",
|
|
2698
|
+
"swift-wasm-archive.ts",
|
|
2699
|
+
"swift-lexical.ts",
|
|
2700
|
+
"swift-header-compiler.ts",
|
|
2701
|
+
"swift-header-dependencies.ts",
|
|
2702
|
+
"swift-reproducible.ts",
|
|
2703
|
+
"write-build-file.ts",
|
|
2704
|
+
"xcode-header-search.ts",
|
|
2705
|
+
"case-insensitive-header-overlay.ts",
|
|
2706
|
+
"swift-package.ts",
|
|
2707
|
+
"swift-package-prebuilt.ts",
|
|
2708
|
+
"swift-package-prebuilt-targets.ts",
|
|
2709
|
+
"swift-objc-prebuilt.ts",
|
|
2710
|
+
"swift-objc-prebuilt-catalog.ts",
|
|
2711
|
+
"swift-toolchain.ts",
|
|
2712
|
+
"swift-shared-sdk.ts",
|
|
2713
|
+
"swift-distribution-mirror.ts",
|
|
2714
|
+
"swift-design-time.ts",
|
|
2715
|
+
"binaryen.lock.json",
|
|
2716
|
+
"swift-root-lock.ts",
|
|
2717
|
+
"process-table.ts",
|
|
2718
|
+
"swift-link-roots.ts",
|
|
2719
|
+
"swift-wasm-prune.ts",
|
|
2720
|
+
"wasm-optimize.ts",
|
|
2721
|
+
"wasm-features.ts",
|
|
2722
|
+
"wasm-narrow-boundary.ts",
|
|
2723
|
+
"../../peach-kit/src/nativeWasmContract.ts",
|
|
2724
|
+
"swift-guest-image-ledger.ts",
|
|
2725
|
+
"swift-guest-archive.ts",
|
|
2726
|
+
"swift-guest-link-plan.ts",
|
|
2727
|
+
"swift-guest-link.ts",
|
|
2728
|
+
"swift-guest-compile.ts",
|
|
2729
|
+
"swift-guest-dyld-functions.ts",
|
|
2730
|
+
"swift-guest-linked-spans.ts",
|
|
2731
|
+
"swift-guest-source-plan.ts",
|
|
2732
|
+
"swift-guest-runtime-plan.ts",
|
|
2733
|
+
"swift-guest-source-inputs.ts",
|
|
2734
|
+
"swift-guest-manifest.ts",
|
|
2735
|
+
"swift-guest-projection.ts",
|
|
2736
|
+
"swift-guest-projection-storage.ts",
|
|
2737
|
+
"swiftGuestImageContract.ts",
|
|
2738
|
+
"swift-runtime-products.ts",
|
|
2739
|
+
"swift-sdk-app-module.ts",
|
|
2740
|
+
"swift-sdk-image-map.ts",
|
|
2741
|
+
"swift-sdk-image-wasm.ts",
|
|
2742
|
+
"swift-sdk-image.ts",
|
|
2743
|
+
"../../peach-kit/src/nativeSdkBindingContract.ts",
|
|
2744
|
+
"swiftRuntimeProductContract.ts",
|
|
2745
|
+
"swiftTargetContract.ts",
|
|
2746
|
+
"swift-objc-import.ts",
|
|
2747
|
+
"swiftContract.ts",
|
|
2748
|
+
"swift-objc-platform.ts",
|
|
2749
|
+
"swift-objc-standin.ts",
|
|
2750
|
+
"swift-objc-sdk.ts"
|
|
2751
|
+
];
|
|
2752
|
+
LINKED_IMAGE_SOURCES = /* @__PURE__ */ new Set([
|
|
2753
|
+
"binaryen.lock.json",
|
|
2754
|
+
"swift-sdk-app-module.ts",
|
|
2755
|
+
"swift-sdk-image.ts",
|
|
2756
|
+
"wasm-optimize.ts"
|
|
2757
|
+
]);
|
|
2758
|
+
SWIFT_ARCHIVE_DIGEST_SOURCES = SWIFT_DIGEST_SOURCES.filter(
|
|
2759
|
+
(file) => !LINKED_IMAGE_SOURCES.has(file)
|
|
2760
|
+
);
|
|
2695
2761
|
}
|
|
2696
2762
|
});
|
|
2697
2763
|
|
|
@@ -18928,6 +18994,21 @@ var init_swift_root_lock = __esm({
|
|
|
18928
18994
|
}
|
|
18929
18995
|
});
|
|
18930
18996
|
|
|
18997
|
+
// src/swift-sdk-image-recipe.ts
|
|
18998
|
+
var import_node_crypto24, SWIFT_SDK_IMAGE_VERSION, swiftSdkImageScope, SWIFT_SDK_IMAGE_RECIPE;
|
|
18999
|
+
var init_swift_sdk_image_recipe = __esm({
|
|
19000
|
+
"src/swift-sdk-image-recipe.ts"() {
|
|
19001
|
+
"use strict";
|
|
19002
|
+
import_node_crypto24 = require("node:crypto");
|
|
19003
|
+
init_wasm_optimize();
|
|
19004
|
+
SWIFT_SDK_IMAGE_VERSION = 13;
|
|
19005
|
+
swiftSdkImageScope = (scopedLookups) => scopedLookups ? "guest image scopes 9\n" : "unscoped constructor order 1\n";
|
|
19006
|
+
SWIFT_SDK_IMAGE_RECIPE = (0, import_node_crypto24.createHash)("sha256").update(`swift-sdk-image
|
|
19007
|
+
${SWIFT_SDK_IMAGE_VERSION}
|
|
19008
|
+
`).update(WASM_LOWER_IDENTITY).update(swiftSdkImageScope(false)).update(swiftSdkImageScope(true)).digest("hex").slice(0, 16);
|
|
19009
|
+
}
|
|
19010
|
+
});
|
|
19011
|
+
|
|
18931
19012
|
// src/swift-sdk-image-producer.ts
|
|
18932
19013
|
var swift_sdk_image_producer_exports = {};
|
|
18933
19014
|
__export(swift_sdk_image_producer_exports, {
|
|
@@ -18968,7 +19049,7 @@ function applySwiftSdkProducerEnvironment(environment) {
|
|
|
18968
19049
|
}
|
|
18969
19050
|
}
|
|
18970
19051
|
function writeSwiftSdkProducerResult(file, launchId, error) {
|
|
18971
|
-
const temporary = `${file}.${(0,
|
|
19052
|
+
const temporary = `${file}.${(0, import_node_crypto25.randomUUID)()}`;
|
|
18972
19053
|
(0, import_node_fs36.writeFileSync)(temporary, JSON.stringify({ launchId, error: error ?? null }));
|
|
18973
19054
|
(0, import_node_fs36.renameSync)(temporary, file);
|
|
18974
19055
|
}
|
|
@@ -19080,7 +19161,7 @@ async function produceSwiftSdkImage(input) {
|
|
|
19080
19161
|
}
|
|
19081
19162
|
}
|
|
19082
19163
|
const repo = import_node_path36.default.resolve(input.moduleRoot, "../..");
|
|
19083
|
-
const launchId = (0,
|
|
19164
|
+
const launchId = (0, import_node_crypto25.randomUUID)();
|
|
19084
19165
|
const directory2 = import_node_path36.default.join(root, launchId);
|
|
19085
19166
|
const requestFile = import_node_path36.default.join(directory2, "request.json");
|
|
19086
19167
|
const sessionFile2 = import_node_path36.default.join(directory2, "session");
|
|
@@ -19178,12 +19259,12 @@ async function produceSwiftSdkImage(input) {
|
|
|
19178
19259
|
await (0, import_promises5.setTimeout)(2e3, void 0, { signal: input.signal });
|
|
19179
19260
|
}
|
|
19180
19261
|
}
|
|
19181
|
-
var import_node_child_process23,
|
|
19262
|
+
var import_node_child_process23, import_node_crypto25, import_node_fs36, import_node_path36, import_promises5, import_node_util6, run, environmentNames, launcher;
|
|
19182
19263
|
var init_swift_sdk_image_producer = __esm({
|
|
19183
19264
|
"src/swift-sdk-image-producer.ts"() {
|
|
19184
19265
|
"use strict";
|
|
19185
19266
|
import_node_child_process23 = require("node:child_process");
|
|
19186
|
-
|
|
19267
|
+
import_node_crypto25 = require("node:crypto");
|
|
19187
19268
|
import_node_fs36 = require("node:fs");
|
|
19188
19269
|
import_node_path36 = __toESM(require("node:path"), 1);
|
|
19189
19270
|
import_promises5 = require("node:timers/promises");
|
|
@@ -19223,7 +19304,6 @@ __export(swift_sdk_image_exports, {
|
|
|
19223
19304
|
SWIFT_SDK_APP_TABLE_BASE: () => SWIFT_SDK_APP_TABLE_BASE,
|
|
19224
19305
|
SWIFT_SDK_IMAGE_BUNDLE: () => SWIFT_SDK_IMAGE_BUNDLE,
|
|
19225
19306
|
SWIFT_SDK_IMAGE_FILES: () => SWIFT_SDK_IMAGE_FILES,
|
|
19226
|
-
SWIFT_SDK_IMAGE_VERSION: () => SWIFT_SDK_IMAGE_VERSION,
|
|
19227
19307
|
SWIFT_SDK_MEMORY_BASE: () => SWIFT_SDK_MEMORY_BASE,
|
|
19228
19308
|
SWIFT_SDK_PIECE_FIELDS: () => SWIFT_SDK_PIECE_FIELDS,
|
|
19229
19309
|
buildSwiftSdkImage: () => buildSwiftSdkImage,
|
|
@@ -19258,9 +19338,9 @@ function swiftSdkImageProducts(moduleRoot, frameworkImports) {
|
|
|
19258
19338
|
function swiftSdkImageKey(moduleRoot, scopedLookups = false, products = []) {
|
|
19259
19339
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
19260
19340
|
const inputs = distribution ? swiftSdkDistributionInputs(distribution) : swiftModuleDigest(moduleRoot);
|
|
19261
|
-
return (0,
|
|
19341
|
+
return (0, import_node_crypto26.createHash)("sha256").update(`swift-sdk-image
|
|
19262
19342
|
${SWIFT_SDK_IMAGE_VERSION}
|
|
19263
|
-
`).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(scopedLookups
|
|
19343
|
+
`).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(swiftSdkImageScope(scopedLookups)).update(inputs).update(products.length === 0 ? "" : `
|
|
19264
19344
|
products ${products.join(" ")}`).digest("hex").slice(0, 32);
|
|
19265
19345
|
}
|
|
19266
19346
|
function swiftSdkImageEntry(key, scopedLookups) {
|
|
@@ -19349,7 +19429,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
19349
19429
|
stage
|
|
19350
19430
|
]);
|
|
19351
19431
|
const image = cached(stage, key);
|
|
19352
|
-
if (!image || (0,
|
|
19432
|
+
if (!image || (0, import_node_crypto26.createHash)("sha256").update((0, import_node_fs37.readFileSync)(image.image)).digest("hex") !== image.sha256)
|
|
19353
19433
|
throw new Error(`invalid published Swift SDK image ${key}`);
|
|
19354
19434
|
(0, import_node_fs37.rmSync)(directory, { recursive: true, force: true });
|
|
19355
19435
|
(0, import_node_fs37.renameSync)(stage, directory);
|
|
@@ -19619,7 +19699,7 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, scopedLookups
|
|
|
19619
19699
|
(0, import_node_fs37.writeFileSync)(import_node_path37.default.join(work, INTERFACE_FILE), JSON.stringify(sdkInterface));
|
|
19620
19700
|
(0, import_node_fs37.writeFileSync)(
|
|
19621
19701
|
import_node_path37.default.join(work, IMAGE_DIGEST),
|
|
19622
|
-
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0,
|
|
19702
|
+
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0, import_node_crypto26.createHash)("sha256").update(image).digest("hex")
|
|
19623
19703
|
);
|
|
19624
19704
|
if (swiftSdkImageKey(
|
|
19625
19705
|
moduleRoot,
|
|
@@ -19888,12 +19968,12 @@ function readSwiftSdkManifest(image) {
|
|
|
19888
19968
|
}));
|
|
19889
19969
|
return setBoundedCache(cachedSdkManifests, cacheKey, { manifest, block, segments });
|
|
19890
19970
|
}
|
|
19891
|
-
var import_node_child_process24,
|
|
19971
|
+
var import_node_child_process24, import_node_crypto26, import_node_fs37, import_node_path37, import_node_util7, run2, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, SWIFT_SDK_APP_TABLE_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
|
|
19892
19972
|
var init_swift_sdk_image = __esm({
|
|
19893
19973
|
"src/swift-sdk-image.ts"() {
|
|
19894
19974
|
"use strict";
|
|
19895
19975
|
import_node_child_process24 = require("node:child_process");
|
|
19896
|
-
|
|
19976
|
+
import_node_crypto26 = require("node:crypto");
|
|
19897
19977
|
import_node_fs37 = require("node:fs");
|
|
19898
19978
|
import_node_path37 = __toESM(require("node:path"), 1);
|
|
19899
19979
|
import_node_util7 = require("node:util");
|
|
@@ -19905,13 +19985,13 @@ var init_swift_sdk_image = __esm({
|
|
|
19905
19985
|
init_swift_root_lock();
|
|
19906
19986
|
init_swift_sdk_guest_lookups();
|
|
19907
19987
|
init_swift_sdk_image_map();
|
|
19988
|
+
init_swift_sdk_image_recipe();
|
|
19908
19989
|
init_swift_sdk_image_wasm();
|
|
19909
19990
|
init_swift_toolchain();
|
|
19910
19991
|
init_swift_wasm_prune();
|
|
19911
19992
|
init_swiftTargetContract();
|
|
19912
19993
|
init_wasm_optimize();
|
|
19913
19994
|
run2 = (0, import_node_util7.promisify)(import_node_child_process24.execFile);
|
|
19914
|
-
SWIFT_SDK_IMAGE_VERSION = 13;
|
|
19915
19995
|
SWIFT_SDK_APP_MEMORY_BASE = 8372224;
|
|
19916
19996
|
SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024;
|
|
19917
19997
|
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
@@ -20437,7 +20517,7 @@ async function linkSwiftAppModule(options) {
|
|
|
20437
20517
|
lazy,
|
|
20438
20518
|
KEEP_WASM_NAMES
|
|
20439
20519
|
])
|
|
20440
|
-
).update(bytes).digest("hex") : (0,
|
|
20520
|
+
).update(bytes).digest("hex") : (0, import_node_crypto27.createHash)("sha256").update(
|
|
20441
20521
|
JSON.stringify([
|
|
20442
20522
|
loweringCache.compilerDigest,
|
|
20443
20523
|
optimize,
|
|
@@ -21056,7 +21136,7 @@ function createSwiftSdkBinding(linkage, sdk, usage, projection) {
|
|
|
21056
21136
|
bindSwiftAppModule(linkage, sdk),
|
|
21057
21137
|
selectSwiftSdkData(sdk, usage, linkage, projection)
|
|
21058
21138
|
]);
|
|
21059
|
-
const sha2562 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0,
|
|
21139
|
+
const sha2562 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto27.createHash)("sha256").update(bytes).digest("hex");
|
|
21060
21140
|
return { bytes, sha256: sha2562 };
|
|
21061
21141
|
}
|
|
21062
21142
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
@@ -21603,12 +21683,12 @@ function partitionParent(section2) {
|
|
|
21603
21683
|
"__objc_class_refs"
|
|
21604
21684
|
].find((name3) => section2 === name3 || section2.startsWith(`${name3}.`));
|
|
21605
21685
|
}
|
|
21606
|
-
var import_node_child_process25,
|
|
21686
|
+
var import_node_child_process25, import_node_crypto27, import_node_fs38, import_node_path38, import_node_util8, import_node_zlib4, run3, RELOCATION_WIDTHS, GLOBAL_INDEX, TLS_SLEB64, SDK_TLS_HELPER, SDK_TLS_DELTA, OBJC_SECTION_BOUNDARY, uleb4, sleb2, encodedName2, SCANNED, RUN_GAP;
|
|
21607
21687
|
var init_swift_sdk_app_module = __esm({
|
|
21608
21688
|
"src/swift-sdk-app-module.ts"() {
|
|
21609
21689
|
"use strict";
|
|
21610
21690
|
import_node_child_process25 = require("node:child_process");
|
|
21611
|
-
|
|
21691
|
+
import_node_crypto27 = require("node:crypto");
|
|
21612
21692
|
import_node_fs38 = require("node:fs");
|
|
21613
21693
|
import_node_path38 = __toESM(require("node:path"), 1);
|
|
21614
21694
|
import_node_util8 = require("node:util");
|
|
@@ -22314,7 +22394,7 @@ function compilerCheckpoint(root, recipe, args, header) {
|
|
|
22314
22394
|
}
|
|
22315
22395
|
if (!objects.length) return;
|
|
22316
22396
|
const outputs = [module2, header, map[""].dependencies, ...objects];
|
|
22317
|
-
const digest = (0,
|
|
22397
|
+
const digest = (0, import_node_crypto28.createHash)("sha256").update(recipe).update(JSON.stringify(args)).update(mapText);
|
|
22318
22398
|
for (const flag of args) {
|
|
22319
22399
|
if (!flag.startsWith("@")) continue;
|
|
22320
22400
|
const response = flag.slice(1);
|
|
@@ -22408,11 +22488,11 @@ async function withSwiftHeaderCompiler(root, toolchainBin, recipe, producers, bu
|
|
|
22408
22488
|
(0, import_node_fs40.rmSync)(directory, { recursive: true, force: true });
|
|
22409
22489
|
}
|
|
22410
22490
|
}
|
|
22411
|
-
var
|
|
22491
|
+
var import_node_crypto28, import_node_fs40, import_node_http, import_node_path40, SWIFT_HEADER_COMPILER_WRAPPER, argument, client;
|
|
22412
22492
|
var init_swift_header_compiler = __esm({
|
|
22413
22493
|
"src/swift-header-compiler.ts"() {
|
|
22414
22494
|
"use strict";
|
|
22415
|
-
|
|
22495
|
+
import_node_crypto28 = require("node:crypto");
|
|
22416
22496
|
import_node_fs40 = require("node:fs");
|
|
22417
22497
|
import_node_http = require("node:http");
|
|
22418
22498
|
import_node_path40 = __toESM(require("node:path"), 1);
|
|
@@ -22676,7 +22756,7 @@ var init_icuData = __esm({
|
|
|
22676
22756
|
|
|
22677
22757
|
// src/swift-icu.ts
|
|
22678
22758
|
async function cachedBrotli(bytes, quality, cacheKey) {
|
|
22679
|
-
const key = cacheKey && /^[a-f0-9]{64}$/.test(cacheKey) ? cacheKey : (0,
|
|
22759
|
+
const key = cacheKey && /^[a-f0-9]{64}$/.test(cacheKey) ? cacheKey : (0, import_node_crypto29.createHash)("sha256").update(bytes).digest("hex");
|
|
22680
22760
|
const cacheId = `${quality}:${key}`;
|
|
22681
22761
|
const cached2 = brotliMemoryCache.get(cacheId);
|
|
22682
22762
|
if (cached2) return cached2;
|
|
@@ -22694,7 +22774,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
22694
22774
|
});
|
|
22695
22775
|
try {
|
|
22696
22776
|
await (0, import_promises6.mkdir)(dir, { recursive: true });
|
|
22697
|
-
const tmp = `${file}.${(0,
|
|
22777
|
+
const tmp = `${file}.${(0, import_node_crypto29.randomUUID)()}.tmp`;
|
|
22698
22778
|
await (0, import_promises6.writeFile)(tmp, compressed);
|
|
22699
22779
|
await (0, import_promises6.rename)(tmp, file);
|
|
22700
22780
|
} catch {
|
|
@@ -22732,7 +22812,7 @@ function swiftIcuAsset(toolchainBin, sdk) {
|
|
|
22732
22812
|
JSON.stringify([toolchainBin, sdk, swiftSdkOptions()]),
|
|
22733
22813
|
async () => {
|
|
22734
22814
|
const zipped = await deflate(await swiftIcuData(toolchainBin, sdk));
|
|
22735
|
-
return { sha256: (0,
|
|
22815
|
+
return { sha256: (0, import_node_crypto29.createHash)("sha256").update(zipped).digest("hex"), gzip: zipped };
|
|
22736
22816
|
}
|
|
22737
22817
|
);
|
|
22738
22818
|
}
|
|
@@ -22834,7 +22914,7 @@ function swiftIcuPacked(icu) {
|
|
|
22834
22914
|
)
|
|
22835
22915
|
);
|
|
22836
22916
|
await (0, import_promises6.mkdir)(import_node_path42.default.dirname(file), { recursive: true });
|
|
22837
|
-
const tmp = `${file}.${(0,
|
|
22917
|
+
const tmp = `${file}.${(0, import_node_crypto29.randomUUID)()}.tmp`;
|
|
22838
22918
|
await (0, import_promises6.writeFile)(tmp, packed);
|
|
22839
22919
|
await (0, import_promises6.rename)(tmp, file);
|
|
22840
22920
|
return packed;
|
|
@@ -22847,12 +22927,12 @@ async function swiftIcuBundleAsset(icu) {
|
|
|
22847
22927
|
contentType: "application/octet-stream"
|
|
22848
22928
|
};
|
|
22849
22929
|
}
|
|
22850
|
-
var import_node_child_process27,
|
|
22930
|
+
var import_node_child_process27, import_node_crypto29, import_node_fs41, import_promises6, import_node_os11, import_node_path42, import_node_util9, import_node_zlib5, run4, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, brotliMemoryCache, packedFiles;
|
|
22851
22931
|
var init_swift_icu = __esm({
|
|
22852
22932
|
"src/swift-icu.ts"() {
|
|
22853
22933
|
"use strict";
|
|
22854
22934
|
import_node_child_process27 = require("node:child_process");
|
|
22855
|
-
|
|
22935
|
+
import_node_crypto29 = require("node:crypto");
|
|
22856
22936
|
import_node_fs41 = require("node:fs");
|
|
22857
22937
|
import_promises6 = require("node:fs/promises");
|
|
22858
22938
|
import_node_os11 = __toESM(require("node:os"), 1);
|
|
@@ -23123,7 +23203,7 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
|
|
|
23123
23203
|
);
|
|
23124
23204
|
if (!modules.length) return [];
|
|
23125
23205
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
23126
|
-
const compiler = (0,
|
|
23206
|
+
const compiler = (0, import_node_crypto30.createHash)("sha256").update(import_node_fs43.default.readFileSync(clang)).digest("hex");
|
|
23127
23207
|
return [
|
|
23128
23208
|
'case "$module" in',
|
|
23129
23209
|
` ${modules.join("|")}) exec ${[
|
|
@@ -23141,12 +23221,12 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
|
|
|
23141
23221
|
"esac"
|
|
23142
23222
|
];
|
|
23143
23223
|
}
|
|
23144
|
-
var import_node_child_process29,
|
|
23224
|
+
var import_node_child_process29, import_node_crypto30, import_node_fs43, import_node_path44, quote;
|
|
23145
23225
|
var init_swift_objc_prebuilt = __esm({
|
|
23146
23226
|
"src/swift-objc-prebuilt.ts"() {
|
|
23147
23227
|
"use strict";
|
|
23148
23228
|
import_node_child_process29 = require("node:child_process");
|
|
23149
|
-
|
|
23229
|
+
import_node_crypto30 = require("node:crypto");
|
|
23150
23230
|
import_node_fs43 = __toESM(require("node:fs"), 1);
|
|
23151
23231
|
import_node_path44 = __toESM(require("node:path"), 1);
|
|
23152
23232
|
init_internal_child_contract();
|
|
@@ -23499,7 +23579,7 @@ function swiftPackagePrebuiltEntries(input, moduleRoot, toolchainBin) {
|
|
|
23499
23579
|
([file, source]) => !/\.(?:swift|c|h|inc|modulemap)$/.test(file) || file.endsWith(".swift") && swiftImportNames(source, available).some((name4) => !available.has(name4))
|
|
23500
23580
|
))
|
|
23501
23581
|
return [];
|
|
23502
|
-
const hash = (0,
|
|
23582
|
+
const hash = (0, import_node_crypto31.createHash)("sha256");
|
|
23503
23583
|
for (const entry of files.sort(
|
|
23504
23584
|
([left], [right]) => left < right ? -1 : left > right ? 1 : 0
|
|
23505
23585
|
))
|
|
@@ -23566,11 +23646,11 @@ function useSwiftPackagePrebuilts(input, moduleRoot, toolchainBin) {
|
|
|
23566
23646
|
}
|
|
23567
23647
|
return resolved;
|
|
23568
23648
|
}
|
|
23569
|
-
var
|
|
23649
|
+
var import_node_crypto31, import_node_fs46, import_node_path48, PACKAGE_RECIPE;
|
|
23570
23650
|
var init_swift_package_prebuilt = __esm({
|
|
23571
23651
|
"src/swift-package-prebuilt.ts"() {
|
|
23572
23652
|
"use strict";
|
|
23573
|
-
|
|
23653
|
+
import_node_crypto31 = require("node:crypto");
|
|
23574
23654
|
import_node_fs46 = __toESM(require("node:fs"), 1);
|
|
23575
23655
|
import_node_path48 = __toESM(require("node:path"), 1);
|
|
23576
23656
|
init_native_prebuilt();
|
|
@@ -23797,7 +23877,7 @@ function swiftObjCSelectorOptions(moduleRoot) {
|
|
|
23797
23877
|
`;
|
|
23798
23878
|
if (!(0, import_node_fs47.existsSync)(map) || (0, import_node_fs47.readFileSync)(map, "utf8") !== content) {
|
|
23799
23879
|
(0, import_node_fs47.mkdirSync)(import_node_path49.default.dirname(map), { recursive: true });
|
|
23800
|
-
const partial = `${map}.${(0,
|
|
23880
|
+
const partial = `${map}.${(0, import_node_crypto32.randomUUID)()}`;
|
|
23801
23881
|
(0, import_node_fs47.writeFileSync)(partial, content);
|
|
23802
23882
|
(0, import_node_fs47.renameSync)(partial, map);
|
|
23803
23883
|
}
|
|
@@ -23825,7 +23905,7 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin, release, signal, lea
|
|
|
23825
23905
|
return { libraries, executables };
|
|
23826
23906
|
}
|
|
23827
23907
|
function swiftProjectBuildKey(moduleRoot, release) {
|
|
23828
|
-
return (0,
|
|
23908
|
+
return (0, import_node_crypto32.createHash)("sha256").update(`swift-framework/v2\0${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
|
|
23829
23909
|
}
|
|
23830
23910
|
function sameStringList(left, right) {
|
|
23831
23911
|
if (left === right) return true;
|
|
@@ -24073,7 +24153,7 @@ function distributionClangModuleOptions(root, modules) {
|
|
|
24073
24153
|
function providedModulesPath(root, modules, excluded) {
|
|
24074
24154
|
if (!excluded || excluded.size === 0) return modules;
|
|
24075
24155
|
const entries2 = (0, import_node_fs47.readdirSync)(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
|
|
24076
|
-
const key = (0,
|
|
24156
|
+
const key = (0, import_node_crypto32.createHash)("sha256").update(JSON.stringify([modules, entries2])).update([...excluded].sort().join("\0")).digest("hex").slice(0, 16);
|
|
24077
24157
|
const directory = import_node_path49.default.join(root, `.peach-modules-${key}`);
|
|
24078
24158
|
const complete = import_node_path49.default.join(directory, ".complete");
|
|
24079
24159
|
if (!(0, import_node_fs47.existsSync)(complete)) {
|
|
@@ -24158,10 +24238,10 @@ function swiftArtifactHash(input, release, moduleRoot) {
|
|
|
24158
24238
|
function sha256Digest(value) {
|
|
24159
24239
|
if (typeof Bun !== "undefined")
|
|
24160
24240
|
return new Bun.CryptoHasher("sha256").update(value).digest();
|
|
24161
|
-
return (0,
|
|
24241
|
+
return (0, import_node_crypto32.createHash)("sha256").update(value).digest();
|
|
24162
24242
|
}
|
|
24163
24243
|
function swiftCompileInputHash(input, release) {
|
|
24164
|
-
const hash = (0,
|
|
24244
|
+
const hash = (0, import_node_crypto32.createHash)("sha256");
|
|
24165
24245
|
hash.update(`swift-compile
|
|
24166
24246
|
${release}
|
|
24167
24247
|
`);
|
|
@@ -24368,7 +24448,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
24368
24448
|
].join("\n") + "\n";
|
|
24369
24449
|
distributionLinkPath = distributionLink.path.replace(
|
|
24370
24450
|
/\.rsp$/,
|
|
24371
|
-
`-${(0,
|
|
24451
|
+
`-${(0, import_node_crypto32.createHash)("sha256").update(list).digest("hex").slice(0, 12)}.rsp`
|
|
24372
24452
|
);
|
|
24373
24453
|
distributionLink.files.set(distributionLinkPath, list);
|
|
24374
24454
|
}
|
|
@@ -24389,7 +24469,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
24389
24469
|
const endRun = () => {
|
|
24390
24470
|
if (run5.length >= MODULE_MAP_RESPONSE_FILE_RUN) {
|
|
24391
24471
|
const lines = run5.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
24392
|
-
const digest2 = (0,
|
|
24472
|
+
const digest2 = (0, import_node_crypto32.createHash)("sha256").update(lines).digest("hex");
|
|
24393
24473
|
const file2 = import_node_path49.default.join(args.root, ".peach-clang-arguments", `${digest2}.rsp`);
|
|
24394
24474
|
args.files.set(file2, lines);
|
|
24395
24475
|
flags.push(`@${file2}`);
|
|
@@ -24413,7 +24493,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
24413
24493
|
}
|
|
24414
24494
|
endRun();
|
|
24415
24495
|
const content = JSON.stringify(flags);
|
|
24416
|
-
const digest = (0,
|
|
24496
|
+
const digest = (0, import_node_crypto32.createHash)("sha256").update(content).digest("hex");
|
|
24417
24497
|
const file = import_node_path49.default.join(args.root, ".peach-manifest-arguments", `${digest}.json`);
|
|
24418
24498
|
args.files.set(file, content);
|
|
24419
24499
|
return `peachCompilerArguments(${JSON.stringify(file)})`;
|
|
@@ -24425,7 +24505,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
24425
24505
|
const macros = compactSwiftClangDefines(swiftClangSearchArguments(flags));
|
|
24426
24506
|
const compact = args.coalescibleOverlays ? compactSwiftClangOverlays(macros, args.coalescibleOverlays) : macros;
|
|
24427
24507
|
const content = compact.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
24428
|
-
const digest = (0,
|
|
24508
|
+
const digest = (0, import_node_crypto32.createHash)("sha256").update(content).digest("hex");
|
|
24429
24509
|
const file = import_node_path49.default.join(args.root, ".peach-swift-arguments", `${digest}.rsp`);
|
|
24430
24510
|
args.files.set(file, content);
|
|
24431
24511
|
return JSON.stringify([`@${file}`]);
|
|
@@ -26073,7 +26153,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
26073
26153
|
)
|
|
26074
26154
|
];
|
|
26075
26155
|
const moduleFlag = perFile.some((flag) => flag.startsWith("-fmodule-name=")) ? [] : [`-fmodule-name=${swiftTargetModuleName(target.name)}`];
|
|
26076
|
-
const identity = (0,
|
|
26156
|
+
const identity = (0, import_node_crypto32.createHash)("sha256").update(
|
|
26077
26157
|
JSON.stringify([
|
|
26078
26158
|
cxx,
|
|
26079
26159
|
quoteDirs,
|
|
@@ -26436,7 +26516,7 @@ module ${moduleName}.Swift {
|
|
|
26436
26516
|
])
|
|
26437
26517
|
(0, import_node_fs47.rmSync)(cache, { recursive: true, force: true });
|
|
26438
26518
|
files.set(frameworkSearchRecord, frameworkSearch);
|
|
26439
|
-
const modulePlan = (0,
|
|
26519
|
+
const modulePlan = (0, import_node_crypto32.createHash)("sha256").update(
|
|
26440
26520
|
swiftModuleInputFiles(moduleRoot).join("\n")
|
|
26441
26521
|
);
|
|
26442
26522
|
if (!distribution) {
|
|
@@ -26445,7 +26525,7 @@ module ${moduleName}.Swift {
|
|
|
26445
26525
|
modulePlan.update(
|
|
26446
26526
|
Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
|
|
26447
26527
|
);
|
|
26448
|
-
const resourcePlan = (0,
|
|
26528
|
+
const resourcePlan = (0, import_node_crypto32.createHash)("sha256").update(
|
|
26449
26529
|
JSON.stringify(
|
|
26450
26530
|
resourceTargets.filter((target) => target.resources).map((target) => [
|
|
26451
26531
|
target.name,
|
|
@@ -26753,7 +26833,7 @@ ${entry}`);
|
|
|
26753
26833
|
);
|
|
26754
26834
|
for (const [target, data] of Object.entries(input.libraries ?? {})) {
|
|
26755
26835
|
const bytes = Buffer.from(data, "base64");
|
|
26756
|
-
const digest = (0,
|
|
26836
|
+
const digest = (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex");
|
|
26757
26837
|
if (input.binaryModules?.[target] && packageTargets.has(target)) {
|
|
26758
26838
|
const objects = import_node_path49.default.join(
|
|
26759
26839
|
layout2.root,
|
|
@@ -27405,7 +27485,7 @@ function readCompiledArtifact(directory, hash) {
|
|
|
27405
27485
|
return null;
|
|
27406
27486
|
const bytes = (0, import_node_fs47.readFileSync)(import_node_path49.default.join(directory, "app.wasm"));
|
|
27407
27487
|
const gzip2 = (0, import_node_fs47.readFileSync)(import_node_path49.default.join(directory, "icu.gz"));
|
|
27408
|
-
if ((0,
|
|
27488
|
+
if ((0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto32.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
27409
27489
|
return null;
|
|
27410
27490
|
let sdk;
|
|
27411
27491
|
if ("sdk" in receipt) {
|
|
@@ -27413,7 +27493,7 @@ function readCompiledArtifact(directory, hash) {
|
|
|
27413
27493
|
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string")
|
|
27414
27494
|
return null;
|
|
27415
27495
|
const binding = (0, import_node_fs47.readFileSync)(import_node_path49.default.join(directory, "sdk-binding.bin"));
|
|
27416
|
-
if ((0,
|
|
27496
|
+
if ((0, import_node_crypto32.createHash)("sha256").update(binding).digest("hex") !== image.binding)
|
|
27417
27497
|
return null;
|
|
27418
27498
|
sdk = {
|
|
27419
27499
|
key: image.key,
|
|
@@ -27441,7 +27521,7 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
27441
27521
|
import_node_path49.default.join(pending, "artifact.json"),
|
|
27442
27522
|
JSON.stringify({
|
|
27443
27523
|
hash: artifact.hash,
|
|
27444
|
-
wasm: (0,
|
|
27524
|
+
wasm: (0, import_node_crypto32.createHash)("sha256").update(artifact.bytes).digest("hex"),
|
|
27445
27525
|
icu: artifact.icu.sha256,
|
|
27446
27526
|
sdk: artifact.sdk && {
|
|
27447
27527
|
key: artifact.sdk.key,
|
|
@@ -27790,7 +27870,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
27790
27870
|
const unoptimized = args.input.unoptimized === true;
|
|
27791
27871
|
const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
|
|
27792
27872
|
const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
|
|
27793
|
-
const receiptKey = (0,
|
|
27873
|
+
const receiptKey = (0, import_node_crypto32.createHash)("sha256").update(
|
|
27794
27874
|
JSON.stringify([
|
|
27795
27875
|
"framework-products/v2",
|
|
27796
27876
|
args.frameworkKey,
|
|
@@ -27957,7 +28037,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
27957
28037
|
const archiveBase = import_node_path49.default.join(scratch2, "products-lib");
|
|
27958
28038
|
(0, import_node_fs47.mkdirSync)(archiveBase, { recursive: true });
|
|
27959
28039
|
const archiveRoot = import_node_path49.default.join(archiveBase, receiptKey);
|
|
27960
|
-
const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0,
|
|
28040
|
+
const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0, import_node_crypto32.randomUUID)()}`;
|
|
27961
28041
|
const stagedArchive = import_node_path49.default.join(stagedArchiveRoot, "lib");
|
|
27962
28042
|
(0, import_node_fs47.mkdirSync)(stagedArchive, { recursive: true });
|
|
27963
28043
|
const archived = /* @__PURE__ */ new Map();
|
|
@@ -28000,7 +28080,7 @@ ${args.frameworkKey}`,
|
|
|
28000
28080
|
const receiptsDir = import_node_path49.default.join(scratch2, "products-ready");
|
|
28001
28081
|
(0, import_node_fs47.mkdirSync)(receiptsDir, { recursive: true });
|
|
28002
28082
|
const receiptFile = import_node_path49.default.join(receiptsDir, `${receiptKey}.json`);
|
|
28003
|
-
const partialReceipt = `${receiptFile}.${process.pid}.${(0,
|
|
28083
|
+
const partialReceipt = `${receiptFile}.${process.pid}.${(0, import_node_crypto32.randomUUID)()}`;
|
|
28004
28084
|
(0, import_node_fs47.writeFileSync)(
|
|
28005
28085
|
partialReceipt,
|
|
28006
28086
|
JSON.stringify({
|
|
@@ -28172,7 +28252,7 @@ function mirrorTree2(source, target, skip) {
|
|
|
28172
28252
|
if (existing?.isFile() && existing.size === stat.size && (existing.mtimeMs === stat.mtimeMs || (0, import_node_fs47.readFileSync)(from).equals((0, import_node_fs47.readFileSync)(to))))
|
|
28173
28253
|
continue;
|
|
28174
28254
|
if (existing) (0, import_node_fs47.rmSync)(to, { recursive: true, force: true });
|
|
28175
|
-
const partial = `${to}.${(0,
|
|
28255
|
+
const partial = `${to}.${(0, import_node_crypto32.randomUUID)()}`;
|
|
28176
28256
|
(0, import_node_fs47.copyFileSync)(from, partial);
|
|
28177
28257
|
if (stat.mtimeMs > Date.now()) (0, import_node_fs47.utimesSync)(partial, stat.atime, stat.mtime);
|
|
28178
28258
|
(0, import_node_fs47.renameSync)(partial, to);
|
|
@@ -28232,7 +28312,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
|
|
|
28232
28312
|
return stagedModule;
|
|
28233
28313
|
}
|
|
28234
28314
|
function swiftLinkStamp(args) {
|
|
28235
|
-
const hash = (0,
|
|
28315
|
+
const hash = (0, import_node_crypto32.createHash)("sha256");
|
|
28236
28316
|
hash.update(`swift-link/v1
|
|
28237
28317
|
${args.frameworkKey}
|
|
28238
28318
|
`);
|
|
@@ -28360,7 +28440,7 @@ async function compileSwiftProjectOnce(sources, options) {
|
|
|
28360
28440
|
const inputHash = swiftCompileInputHash(input, options.release);
|
|
28361
28441
|
const moduleDigest = swiftModuleDigest(moduleRoot);
|
|
28362
28442
|
const sourceHash = inputHash.copy().update(moduleDigest).digest("hex");
|
|
28363
|
-
const hash = sdkImage ? (0,
|
|
28443
|
+
const hash = sdkImage ? (0, import_node_crypto32.createHash)("sha256").update(`${sourceHash}
|
|
28364
28444
|
sdk module ${sdkImage.key}`).digest("hex") : sourceHash;
|
|
28365
28445
|
const frameworkKey = swiftProjectBuildKey(moduleRoot, options.release);
|
|
28366
28446
|
const sharedRoot = import_node_path49.default.join(swiftCacheDir(), "swift-projects", hash);
|
|
@@ -28457,7 +28537,7 @@ ${cap}` : "";
|
|
|
28457
28537
|
}
|
|
28458
28538
|
const baseRoot = root;
|
|
28459
28539
|
const canPoolBuildRoot = !options.intermediates && !options.project && !options.linkOnly && import_node_path49.default.basename(import_node_path49.default.dirname(baseRoot)) === "swift-builds";
|
|
28460
|
-
const buildShape = canPoolBuildRoot ? (0,
|
|
28540
|
+
const buildShape = canPoolBuildRoot ? (0, import_node_crypto32.createHash)("sha256").update(
|
|
28461
28541
|
JSON.stringify([
|
|
28462
28542
|
frameworkKey,
|
|
28463
28543
|
Boolean(sdkImage),
|
|
@@ -28946,17 +29026,17 @@ ${cap}` : "";
|
|
|
28946
29026
|
}
|
|
28947
29027
|
const receipt = import_node_path49.default.join(
|
|
28948
29028
|
checkpoints,
|
|
28949
|
-
(0,
|
|
29029
|
+
(0, import_node_crypto32.createHash)("sha256").update(target).digest("hex")
|
|
28950
29030
|
);
|
|
28951
29031
|
const headers = producers.map(headerPaths);
|
|
28952
29032
|
for (const header of headers)
|
|
28953
29033
|
if ((0, import_node_fs47.existsSync)(header.original)) publishHeader(header);
|
|
28954
29034
|
const fingerprint = () => {
|
|
28955
|
-
const digest = (0,
|
|
29035
|
+
const digest = (0, import_node_crypto32.createHash)("sha256").update(recipe);
|
|
28956
29036
|
for (const { original, emitted } of headers) {
|
|
28957
29037
|
if (!(0, import_node_fs47.existsSync)(original) || !(0, import_node_fs47.existsSync)(emitted)) return;
|
|
28958
29038
|
digest.update(
|
|
28959
|
-
(0,
|
|
29039
|
+
(0, import_node_crypto32.createHash)("sha256").update((0, import_node_fs47.readFileSync)(emitted)).digest()
|
|
28960
29040
|
);
|
|
28961
29041
|
}
|
|
28962
29042
|
return digest.digest("hex");
|
|
@@ -29169,11 +29249,11 @@ ${cap}` : "";
|
|
|
29169
29249
|
options.signal
|
|
29170
29250
|
);
|
|
29171
29251
|
}
|
|
29172
|
-
var import_node_child_process31,
|
|
29252
|
+
var import_node_child_process31, import_node_crypto32, import_node_fs47, import_node_os13, import_node_path49, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
|
|
29173
29253
|
var init_swift_compile = __esm({
|
|
29174
29254
|
"src/swift-compile.ts"() {
|
|
29175
29255
|
import_node_child_process31 = require("node:child_process");
|
|
29176
|
-
|
|
29256
|
+
import_node_crypto32 = require("node:crypto");
|
|
29177
29257
|
import_node_fs47 = require("node:fs");
|
|
29178
29258
|
import_node_os13 = __toESM(require("node:os"), 1);
|
|
29179
29259
|
import_node_path49 = __toESM(require("node:path"), 1);
|
|
@@ -29401,7 +29481,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
29401
29481
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
29402
29482
|
MULTI_MANIFEST_VERSION = 76;
|
|
29403
29483
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
29404
|
-
compilerSourceDigest = true ? "
|
|
29484
|
+
compilerSourceDigest = true ? "169122685e250113f128b79efc78f9868f581da36ab083c174056ab99b87b629" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
29405
29485
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
29406
29486
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
29407
29487
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2626 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
MULTI_MANIFEST_VERSION,
|
|
4
4
|
WASM_TRIPLE,
|
|
@@ -40,8 +40,8 @@ import {
|
|
|
40
40
|
withNativeSourceGlue,
|
|
41
41
|
wrapUIApplicationMainEntry,
|
|
42
42
|
writeSwiftProject
|
|
43
|
-
} from "./esm-chunks/chunk-
|
|
44
|
-
import "./esm-chunks/chunk-
|
|
43
|
+
} from "./esm-chunks/chunk-LBDHHUER.mjs";
|
|
44
|
+
import "./esm-chunks/chunk-26TN2VTX.mjs";
|
|
45
45
|
import {
|
|
46
46
|
FOUNDATION_IMPLICIT_MODULES,
|
|
47
47
|
REACH_STAGED_FRAMEWORKS,
|
|
@@ -66,15 +66,15 @@ import {
|
|
|
66
66
|
swiftSdkPaths,
|
|
67
67
|
withFrameworkCompanionImports,
|
|
68
68
|
withoutSwiftDeclarations
|
|
69
|
-
} from "./esm-chunks/chunk-
|
|
70
|
-
import "./esm-chunks/chunk-
|
|
71
|
-
import "./esm-chunks/chunk-
|
|
72
|
-
import "./esm-chunks/chunk-
|
|
73
|
-
import "./esm-chunks/chunk-
|
|
74
|
-
import "./esm-chunks/chunk-
|
|
75
|
-
import "./esm-chunks/chunk-
|
|
76
|
-
import "./esm-chunks/chunk-
|
|
77
|
-
import "./esm-chunks/chunk-
|
|
69
|
+
} from "./esm-chunks/chunk-T4ZKKV6P.mjs";
|
|
70
|
+
import "./esm-chunks/chunk-5STOTQGG.mjs";
|
|
71
|
+
import "./esm-chunks/chunk-5UEXET5Y.mjs";
|
|
72
|
+
import "./esm-chunks/chunk-IYJG62ST.mjs";
|
|
73
|
+
import "./esm-chunks/chunk-XCUDQYYK.mjs";
|
|
74
|
+
import "./esm-chunks/chunk-BSNIUHSI.mjs";
|
|
75
|
+
import "./esm-chunks/chunk-2R77YMAI.mjs";
|
|
76
|
+
import "./esm-chunks/chunk-BFQUJ4RC.mjs";
|
|
77
|
+
import "./esm-chunks/chunk-WC43FELF.mjs";
|
|
78
78
|
export {
|
|
79
79
|
FOUNDATION_IMPLICIT_MODULES,
|
|
80
80
|
MULTI_MANIFEST_VERSION,
|