peachsim 0.1.2220 → 0.1.2222
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/compat.ts +4 -4
- package/cli/commands/inspect.ts +4 -4
- package/cli/commands/report-issue.ts +1 -1
- package/cli/runtime-compat.ts +7 -2
- 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 +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +475 -381
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +3 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +472 -379
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +695 -574
- package/dist-lib/host/fetch-proxy-handler.cjs +10 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +8232 -7815
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +8146 -7737
- package/dist-lib/native-app-identity-project.cjs +331 -13
- package/dist-lib/native-app-identity-project.mjs +331 -13
- package/dist-lib/native-app-identity.cjs +16 -3
- package/dist-lib/native-app-identity.mjs +16 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -24
- package/dist-lib/public-origins-lib.json +99 -96
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- 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 +1 -1
- package/dist-lib/skills.cjs +532 -420
- package/dist-lib/swift-compile.cjs +84 -49
- package/dist-lib/swift-compile.mjs +84 -49
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +158 -69
- package/dist-lib/vite.cjs +2930 -2800
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-host-terser.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +1 -2
- package/dist-types/packages/peach-kit/src/internal.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/ios-tint.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +25 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +4 -4
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +5 -5
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +9 -9
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +7 -7
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutConstraint.h +1 -8
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UILayoutPriority.h +11 -0
- package/src/cli-runtime.ts +1 -0
- package/src/expo-native-workspace.ts +14 -10
- package/src/expo-workspace-exclusion.ts +10 -7
- package/src/react-native-autolinking.ts +2 -1
- package/src/runtime-delivery.ts +7 -0
- package/src/swift-compile.ts +90 -54
- package/src/swift-coverage/xcode-assets.ts +4 -2
- package/src/swift-host.ts +53 -14
- package/src/swift-objc-import.ts +4 -0
- package/src/wasm-optimize.ts +5 -1
- package/src/xcode-project.ts +26 -5
- package/src/xcode-target-members.ts +25 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2222 | (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;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "29c2661be4b952101c9b9b8fd861560e6ce63b25dd4464f47475aaf72024f4fe", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "25505683ca29a0b380413bf2a5026d4967eacf886e35bc11ece6e15317e5bb02", "home-paths.ts": "d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "b6e04100805ba81f14d751383416fd4aab46901a6f94f5b62f831e66c28001c1", "xcode-target-members.ts": "d49af77a690cff481b38333b5f63f6600123b1bb57f410b0adb298b010d2047b", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -1044,6 +1044,7 @@ function createRuntimeDelivery(product) {
|
|
|
1044
1044
|
verify: product.verifyInstall,
|
|
1045
1045
|
label: `runtime ${version2}`
|
|
1046
1046
|
});
|
|
1047
|
+
await product.afterInstall?.(destDir);
|
|
1047
1048
|
if (setActive) product.writeActiveRuntime(version2);
|
|
1048
1049
|
pruneLocalRetention({ protectVersions });
|
|
1049
1050
|
return {
|
|
@@ -2566,6 +2567,7 @@ function autolinkerJson(command, output2) {
|
|
|
2566
2567
|
}
|
|
2567
2568
|
}
|
|
2568
2569
|
async function cliAdvertises(cli, args, token, appRoot, signal) {
|
|
2570
|
+
const started = Date.now();
|
|
2569
2571
|
const { stdout, stderr } = await run3("node", [cli, ...args], {
|
|
2570
2572
|
cwd: appRoot,
|
|
2571
2573
|
signal,
|
|
@@ -2575,7 +2577,7 @@ async function cliAdvertises(cli, args, token, appRoot, signal) {
|
|
|
2575
2577
|
});
|
|
2576
2578
|
if (!stdout.trim())
|
|
2577
2579
|
throw new Error(
|
|
2578
|
-
`${cli} ${args.join(" ")}
|
|
2580
|
+
`${cli} ${args.join(" ")} exited 0 after ${Date.now() - started}ms with empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
|
|
2579
2581
|
);
|
|
2580
2582
|
return stdout.includes(token);
|
|
2581
2583
|
}
|
|
@@ -12524,6 +12526,302 @@ var init_plist = __esm({
|
|
|
12524
12526
|
}
|
|
12525
12527
|
});
|
|
12526
12528
|
|
|
12529
|
+
// src/ios-sdk-frameworks.json
|
|
12530
|
+
var ios_sdk_frameworks_default;
|
|
12531
|
+
var init_ios_sdk_frameworks = __esm({
|
|
12532
|
+
"src/ios-sdk-frameworks.json"() {
|
|
12533
|
+
ios_sdk_frameworks_default = {
|
|
12534
|
+
sdk: "iphonesimulator27.1",
|
|
12535
|
+
frameworks: [
|
|
12536
|
+
"ARKit",
|
|
12537
|
+
"AVFAudio",
|
|
12538
|
+
"AVFoundation",
|
|
12539
|
+
"AVKit",
|
|
12540
|
+
"AVRouting",
|
|
12541
|
+
"Accelerate",
|
|
12542
|
+
"Accessibility",
|
|
12543
|
+
"AccessoryLiveActivities",
|
|
12544
|
+
"AccessoryNotifications",
|
|
12545
|
+
"AccessorySetupKit",
|
|
12546
|
+
"AccessoryTransportExtension",
|
|
12547
|
+
"Accounts",
|
|
12548
|
+
"ActivityKit",
|
|
12549
|
+
"AdAttributionKit",
|
|
12550
|
+
"AdServices",
|
|
12551
|
+
"AdSupport",
|
|
12552
|
+
"AddressBook",
|
|
12553
|
+
"AddressBookUI",
|
|
12554
|
+
"AlarmKit",
|
|
12555
|
+
"AppClip",
|
|
12556
|
+
"AppIntents",
|
|
12557
|
+
"AppIntentsTypeSupport",
|
|
12558
|
+
"AppMigrationKit",
|
|
12559
|
+
"AppTrackingTransparency",
|
|
12560
|
+
"AssetsLibrary",
|
|
12561
|
+
"AudioToolbox",
|
|
12562
|
+
"AudioUnit",
|
|
12563
|
+
"AuthenticationServices",
|
|
12564
|
+
"AutomatedDeviceEnrollment",
|
|
12565
|
+
"AutomaticAssessmentConfiguration",
|
|
12566
|
+
"BackgroundAssets",
|
|
12567
|
+
"BackgroundTasks",
|
|
12568
|
+
"BrowserEngineCore",
|
|
12569
|
+
"BrowserEngineKit",
|
|
12570
|
+
"BrowserKit",
|
|
12571
|
+
"BusinessChat",
|
|
12572
|
+
"CFNetwork",
|
|
12573
|
+
"CallKit",
|
|
12574
|
+
"CarKey",
|
|
12575
|
+
"CarPlay",
|
|
12576
|
+
"Charts",
|
|
12577
|
+
"ClassKit",
|
|
12578
|
+
"ClassKitUI",
|
|
12579
|
+
"ClockKit",
|
|
12580
|
+
"CloudKit",
|
|
12581
|
+
"ColorSync",
|
|
12582
|
+
"Combine",
|
|
12583
|
+
"ComputeGraph",
|
|
12584
|
+
"ContactProvider",
|
|
12585
|
+
"Contacts",
|
|
12586
|
+
"ContactsUI",
|
|
12587
|
+
"CoreAudio",
|
|
12588
|
+
"CoreAudioKit",
|
|
12589
|
+
"CoreAudioTypes",
|
|
12590
|
+
"CoreBluetooth",
|
|
12591
|
+
"CoreData",
|
|
12592
|
+
"CoreFoundation",
|
|
12593
|
+
"CoreGraphics",
|
|
12594
|
+
"CoreHaptics",
|
|
12595
|
+
"CoreImage",
|
|
12596
|
+
"CoreLocation",
|
|
12597
|
+
"CoreLocationUI",
|
|
12598
|
+
"CoreMIDI",
|
|
12599
|
+
"CoreML",
|
|
12600
|
+
"CoreMedia",
|
|
12601
|
+
"CoreMotion",
|
|
12602
|
+
"CoreNFC",
|
|
12603
|
+
"CoreServices",
|
|
12604
|
+
"CoreSpotlight",
|
|
12605
|
+
"CoreTelephony",
|
|
12606
|
+
"CoreText",
|
|
12607
|
+
"CoreTransferable",
|
|
12608
|
+
"CoreVideo",
|
|
12609
|
+
"CreateMLComponents",
|
|
12610
|
+
"CryptoKit",
|
|
12611
|
+
"CryptoTokenKit",
|
|
12612
|
+
"DataDetection",
|
|
12613
|
+
"DeclaredAgeRange",
|
|
12614
|
+
"DeveloperToolsSupport",
|
|
12615
|
+
"DeviceActivity",
|
|
12616
|
+
"DeviceCheck",
|
|
12617
|
+
"DeviceDiscoveryExtension",
|
|
12618
|
+
"DeviceDiscoveryUI",
|
|
12619
|
+
"EnergyKit",
|
|
12620
|
+
"EventKit",
|
|
12621
|
+
"EventKitUI",
|
|
12622
|
+
"ExposureNotification",
|
|
12623
|
+
"ExtensionFoundation",
|
|
12624
|
+
"ExtensionKit",
|
|
12625
|
+
"ExternalAccessory",
|
|
12626
|
+
"FamilyControls",
|
|
12627
|
+
"FileProvider",
|
|
12628
|
+
"FileProviderUI",
|
|
12629
|
+
"FinanceKit",
|
|
12630
|
+
"FinanceKitUI",
|
|
12631
|
+
"Foundation",
|
|
12632
|
+
"FoundationModels",
|
|
12633
|
+
"GLKit",
|
|
12634
|
+
"GSS",
|
|
12635
|
+
"GameController",
|
|
12636
|
+
"GameKit",
|
|
12637
|
+
"GameSave",
|
|
12638
|
+
"GameplayKit",
|
|
12639
|
+
"GeoToolbox",
|
|
12640
|
+
"GroupActivities",
|
|
12641
|
+
"HealthKit",
|
|
12642
|
+
"HealthKitUI",
|
|
12643
|
+
"HomeKit",
|
|
12644
|
+
"IOKit",
|
|
12645
|
+
"IOSurface",
|
|
12646
|
+
"IdentityDocumentServices",
|
|
12647
|
+
"IdentityDocumentServicesUI",
|
|
12648
|
+
"IdentityLookup",
|
|
12649
|
+
"IdentityLookupUI",
|
|
12650
|
+
"ImageCaptureCore",
|
|
12651
|
+
"ImageIO",
|
|
12652
|
+
"ImagePlayground",
|
|
12653
|
+
"ImmersiveMediaSupport",
|
|
12654
|
+
"Intents",
|
|
12655
|
+
"IntentsUI",
|
|
12656
|
+
"JavaScriptCore",
|
|
12657
|
+
"LinkPresentation",
|
|
12658
|
+
"LinkSecurity",
|
|
12659
|
+
"LiveCommunicationKit",
|
|
12660
|
+
"LocalAuthentication",
|
|
12661
|
+
"LocalAuthenticationEmbeddedUI",
|
|
12662
|
+
"LockedCameraCapture",
|
|
12663
|
+
"ManagedApp",
|
|
12664
|
+
"ManagedAppDistribution",
|
|
12665
|
+
"ManagedSettings",
|
|
12666
|
+
"ManagedSettingsUI",
|
|
12667
|
+
"MapKit",
|
|
12668
|
+
"MarketplaceKit",
|
|
12669
|
+
"Matter",
|
|
12670
|
+
"MatterSupport",
|
|
12671
|
+
"MediaAccessibility",
|
|
12672
|
+
"MediaIntelligence",
|
|
12673
|
+
"MediaIntents",
|
|
12674
|
+
"MediaPlayer",
|
|
12675
|
+
"MediaToolbox",
|
|
12676
|
+
"MessageUI",
|
|
12677
|
+
"Messages",
|
|
12678
|
+
"Metal",
|
|
12679
|
+
"MetalKit",
|
|
12680
|
+
"MetalPerformancePrimitives",
|
|
12681
|
+
"MetalPerformanceShaders",
|
|
12682
|
+
"MetalPerformanceShadersGraph",
|
|
12683
|
+
"MetricKit",
|
|
12684
|
+
"MobileCoreServices",
|
|
12685
|
+
"ModelIO",
|
|
12686
|
+
"MultipeerConnectivity",
|
|
12687
|
+
"MusicKit",
|
|
12688
|
+
"MusicUnderstanding",
|
|
12689
|
+
"NaturalLanguage",
|
|
12690
|
+
"NearbyInteraction",
|
|
12691
|
+
"Network",
|
|
12692
|
+
"NetworkExtension",
|
|
12693
|
+
"NotificationCenter",
|
|
12694
|
+
"NowPlaying",
|
|
12695
|
+
"OSLog",
|
|
12696
|
+
"OpenAL",
|
|
12697
|
+
"OpenGLES",
|
|
12698
|
+
"PDFKit",
|
|
12699
|
+
"PHASE",
|
|
12700
|
+
"PaperKit",
|
|
12701
|
+
"PassKit",
|
|
12702
|
+
"PencilKit",
|
|
12703
|
+
"PermissionKit",
|
|
12704
|
+
"Photos",
|
|
12705
|
+
"PhotosUI",
|
|
12706
|
+
"ProximityReader",
|
|
12707
|
+
"PushKit",
|
|
12708
|
+
"PushToTalk",
|
|
12709
|
+
"QuartzCore",
|
|
12710
|
+
"QuickLook",
|
|
12711
|
+
"QuickLookThumbnailing",
|
|
12712
|
+
"RealityFoundation",
|
|
12713
|
+
"RealityKit",
|
|
12714
|
+
"RelevanceKit",
|
|
12715
|
+
"ReplayKit",
|
|
12716
|
+
"RoomPlan",
|
|
12717
|
+
"SafariServices",
|
|
12718
|
+
"SafetyKit",
|
|
12719
|
+
"SceneKit",
|
|
12720
|
+
"ScreenTime",
|
|
12721
|
+
"SecureElementCredential",
|
|
12722
|
+
"Security",
|
|
12723
|
+
"SecurityUI",
|
|
12724
|
+
"SensitiveContentAnalysis",
|
|
12725
|
+
"SensorKit",
|
|
12726
|
+
"ServicesAccountLinking",
|
|
12727
|
+
"SharedWithYou",
|
|
12728
|
+
"SharedWithYouCore",
|
|
12729
|
+
"ShazamKit",
|
|
12730
|
+
"Social",
|
|
12731
|
+
"SoundAnalysis",
|
|
12732
|
+
"Speech",
|
|
12733
|
+
"SpriteKit",
|
|
12734
|
+
"StateReporting",
|
|
12735
|
+
"StoreKit",
|
|
12736
|
+
"SuggestedActions",
|
|
12737
|
+
"SwiftData",
|
|
12738
|
+
"SwiftUI",
|
|
12739
|
+
"SwiftUICore",
|
|
12740
|
+
"Symbols",
|
|
12741
|
+
"SystemConfiguration",
|
|
12742
|
+
"SystemExtensions",
|
|
12743
|
+
"TabularData",
|
|
12744
|
+
"TelephonyMessagingKit",
|
|
12745
|
+
"TipKit",
|
|
12746
|
+
"TouchController",
|
|
12747
|
+
"Translation",
|
|
12748
|
+
"TranslationUIProvider",
|
|
12749
|
+
"TrustInsights",
|
|
12750
|
+
"Twitter",
|
|
12751
|
+
"UIKit",
|
|
12752
|
+
"USDKit",
|
|
12753
|
+
"UniformTypeIdentifiers",
|
|
12754
|
+
"UserNotifications",
|
|
12755
|
+
"UserNotificationsUI",
|
|
12756
|
+
"VideoSubscriberAccount",
|
|
12757
|
+
"VideoToolbox",
|
|
12758
|
+
"Vision",
|
|
12759
|
+
"VisionKit",
|
|
12760
|
+
"WatchConnectivity",
|
|
12761
|
+
"WeatherKit",
|
|
12762
|
+
"WebKit",
|
|
12763
|
+
"WiFiAware",
|
|
12764
|
+
"WidgetKit",
|
|
12765
|
+
"WorkoutKit",
|
|
12766
|
+
"_AVKit_SwiftUI",
|
|
12767
|
+
"_AdAttributionKit_StoreKit",
|
|
12768
|
+
"_AppIntents_HealthKit",
|
|
12769
|
+
"_AppIntents_SwiftUI",
|
|
12770
|
+
"_AppIntents_UIKit",
|
|
12771
|
+
"_AuthenticationServices_SwiftUI",
|
|
12772
|
+
"_Contacts_AppIntents",
|
|
12773
|
+
"_CoreData_CloudKit",
|
|
12774
|
+
"_CoreLocationUI_SwiftUI",
|
|
12775
|
+
"_CoreNFC_UIKit",
|
|
12776
|
+
"_CoreSpotlight_FoundationModels",
|
|
12777
|
+
"_DataDetection_SwiftUI",
|
|
12778
|
+
"_DeviceActivity_SwiftUI",
|
|
12779
|
+
"_DeviceDiscoveryUI_SwiftUI",
|
|
12780
|
+
"_FinanceKit_AppIntents",
|
|
12781
|
+
"_FoundationModels_SwiftUI",
|
|
12782
|
+
"_FoundationModels_UIKit",
|
|
12783
|
+
"_GameController_SwiftUI",
|
|
12784
|
+
"_GeoToolbox_AppIntents",
|
|
12785
|
+
"_GroupActivities_UIKit",
|
|
12786
|
+
"_HomeKit_SwiftUI",
|
|
12787
|
+
"_Intents_TipKit",
|
|
12788
|
+
"_LinkPresentation_AppIntents",
|
|
12789
|
+
"_LocationEssentials",
|
|
12790
|
+
"_MapKit_SwiftUI",
|
|
12791
|
+
"_MarketplaceKit_UIKit",
|
|
12792
|
+
"_MediaIntents_AppIntents",
|
|
12793
|
+
"_MediaPlayer_AppIntents",
|
|
12794
|
+
"_MusicKit_SwiftUI",
|
|
12795
|
+
"_NowPlaying_AppIntents",
|
|
12796
|
+
"_PassKit_SwiftUI",
|
|
12797
|
+
"_PermissionKit_SwiftUI",
|
|
12798
|
+
"_PermissionKit_UIKit",
|
|
12799
|
+
"_PhotosUI_SwiftUI",
|
|
12800
|
+
"_PhotosUI_WidgetKit",
|
|
12801
|
+
"_Photos_AppIntents",
|
|
12802
|
+
"_QuickLook_SwiftUI",
|
|
12803
|
+
"_RealityKit_ComputeGraph",
|
|
12804
|
+
"_RealityKit_SwiftUI",
|
|
12805
|
+
"_RelevanceKit_MapKit",
|
|
12806
|
+
"_SceneKit_SwiftUI",
|
|
12807
|
+
"_SecureElementCredential_SwiftUI",
|
|
12808
|
+
"_SecureElementCredential_UIKit",
|
|
12809
|
+
"_SharedWithYou_AppIntents",
|
|
12810
|
+
"_SpriteKit_SwiftUI",
|
|
12811
|
+
"_StoreKit_SwiftUI",
|
|
12812
|
+
"_SwiftData_CoreData",
|
|
12813
|
+
"_SwiftData_SwiftUI",
|
|
12814
|
+
"_Translation_SwiftUI",
|
|
12815
|
+
"_USDKit_RealityKit",
|
|
12816
|
+
"_UserNotifications_AppIntents",
|
|
12817
|
+
"_WebKit_SwiftUI",
|
|
12818
|
+
"_WorkoutKit_SwiftUI",
|
|
12819
|
+
"iAd"
|
|
12820
|
+
]
|
|
12821
|
+
};
|
|
12822
|
+
}
|
|
12823
|
+
});
|
|
12824
|
+
|
|
12527
12825
|
// src/android-string-value.ts
|
|
12528
12826
|
var init_android_string_value = __esm({
|
|
12529
12827
|
"src/android-string-value.ts"() {
|
|
@@ -12829,8 +13127,20 @@ function xcodeTargetMemberVisitor(objects) {
|
|
|
12829
13127
|
for (const id of refs) {
|
|
12830
13128
|
const file = resolvePath(id);
|
|
12831
13129
|
if (file === null) continue;
|
|
12832
|
-
if (phase.isa === "PBXSourcesBuildPhase")
|
|
12833
|
-
|
|
13130
|
+
if (phase.isa === "PBXSourcesBuildPhase") {
|
|
13131
|
+
visit3(file, "source");
|
|
13132
|
+
continue;
|
|
13133
|
+
}
|
|
13134
|
+
const ref = objects[id];
|
|
13135
|
+
const type = isDict(ref) ? str(ref.lastKnownFileType) ?? str(ref.explicitFileType) ?? "" : "";
|
|
13136
|
+
const root = file.replace(/[\\/]+$/, "");
|
|
13137
|
+
const folder = FOLDER_REFERENCE.test(type) ? root.split(/[\\/]/).pop() : void 0;
|
|
13138
|
+
for (const inner of filesUnder(file))
|
|
13139
|
+
visit3(
|
|
13140
|
+
inner,
|
|
13141
|
+
"resource",
|
|
13142
|
+
folder && `${folder}/${inner.slice(root.length + 1).replaceAll("\\", "/")}`
|
|
13143
|
+
);
|
|
12834
13144
|
}
|
|
12835
13145
|
}
|
|
12836
13146
|
}
|
|
@@ -12868,13 +13178,14 @@ function xcodeTargetMemberVisitor(objects) {
|
|
|
12868
13178
|
}
|
|
12869
13179
|
};
|
|
12870
13180
|
}
|
|
12871
|
-
var NEVER_MEMBER, BUNDLE_DIR;
|
|
13181
|
+
var NEVER_MEMBER, FOLDER_REFERENCE, BUNDLE_DIR;
|
|
12872
13182
|
var init_xcode_target_members = __esm({
|
|
12873
13183
|
"src/xcode-target-members.ts"() {
|
|
12874
13184
|
"use strict";
|
|
12875
13185
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12876
13186
|
init_openstep_plist();
|
|
12877
13187
|
NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
|
|
13188
|
+
FOLDER_REFERENCE = /^(?:folder|wrapper\.scnassets)$/;
|
|
12878
13189
|
BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
|
|
12879
13190
|
}
|
|
12880
13191
|
});
|
|
@@ -14958,12 +15269,13 @@ function planAssetSymbols(resources, root, settings) {
|
|
|
14958
15269
|
"2": ["ipad"],
|
|
14959
15270
|
"1,2": ["iphone", "ipad"],
|
|
14960
15271
|
"1,7": ["iphone"],
|
|
15272
|
+
"1,3,7": ["iphone"],
|
|
14961
15273
|
"1,2,6": ["iphone", "ipad"],
|
|
14962
15274
|
"1,2,7": ["iphone", "ipad"]
|
|
14963
15275
|
}[families];
|
|
14964
15276
|
if (!devices2)
|
|
14965
15277
|
return unknown2(
|
|
14966
|
-
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
|
|
15278
|
+
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
|
|
14967
15279
|
);
|
|
14968
15280
|
const plan = {
|
|
14969
15281
|
catalogs: catalogs.map((path112) => ({
|
|
@@ -26921,6 +27233,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
26921
27233
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
26922
27234
|
[
|
|
26923
27235
|
"-Oz",
|
|
27236
|
+
...KEEP_WASM_NAMES ? ["-g"] : [],
|
|
26924
27237
|
...skipPasses.flatMap((pass) => ["--skip-pass", pass]),
|
|
26925
27238
|
...FEATURES.map((feature) => `--enable-${feature}`),
|
|
26926
27239
|
file,
|
|
@@ -26954,7 +27267,7 @@ async function installWasmOpt() {
|
|
|
26954
27267
|
async function optimizeWasm(file, output2, skipPasses = []) {
|
|
26955
27268
|
await runWasmOpt(file, output2, skipPasses, await installWasmOpt());
|
|
26956
27269
|
}
|
|
26957
|
-
var import_node_fs44, import_node_path42, import_wasm_opt, FEATURES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
|
|
27270
|
+
var import_node_fs44, import_node_path42, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, WASM_OPTIMIZE_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
|
|
26958
27271
|
var init_wasm_optimize = __esm({
|
|
26959
27272
|
"src/wasm-optimize.ts"() {
|
|
26960
27273
|
"use strict";
|
|
@@ -26977,7 +27290,8 @@ var init_wasm_optimize = __esm({
|
|
|
26977
27290
|
"reference-types",
|
|
26978
27291
|
"sign-ext"
|
|
26979
27292
|
];
|
|
26980
|
-
|
|
27293
|
+
KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
|
|
27294
|
+
WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}${KEEP_WASM_NAMES ? " -g" : ""}`;
|
|
26981
27295
|
PINNED_BINARYEN_VERSION = "132";
|
|
26982
27296
|
BINARYEN_RELEASES = /* @__PURE__ */ new Map([
|
|
26983
27297
|
[
|
|
@@ -27770,7 +28084,7 @@ function swiftSubmoduleImports(sources) {
|
|
|
27770
28084
|
}
|
|
27771
28085
|
return imports2;
|
|
27772
28086
|
}
|
|
27773
|
-
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
28087
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set(), swiftHeader) {
|
|
27774
28088
|
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
27775
28089
|
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
27776
28090
|
return [
|
|
@@ -27778,6 +28092,7 @@ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new S
|
|
|
27778
28092
|
...headers.map(
|
|
27779
28093
|
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
27780
28094
|
),
|
|
28095
|
+
...swiftHeader ? [" module Swift {", ` ${header(swiftHeader)}`, " requires objc", " }"] : [],
|
|
27781
28096
|
" export *",
|
|
27782
28097
|
"}",
|
|
27783
28098
|
""
|
|
@@ -29053,6 +29368,7 @@ ${release}
|
|
|
29053
29368
|
`);
|
|
29054
29369
|
hash.update(compilerSourceDigest);
|
|
29055
29370
|
if (input.oneModule) hash.update("one-module\n");
|
|
29371
|
+
if (KEEP_WASM_NAMES) hash.update("names\n");
|
|
29056
29372
|
hash.update(swiftModuleDigest(moduleRoot));
|
|
29057
29373
|
if (input.optimize) hash.update(`optimize
|
|
29058
29374
|
${WASM_OPTIMIZE_IDENTITY}
|
|
@@ -29164,7 +29480,14 @@ function toolsetOrdersLibcxxBeforeDarwinOverlay(options) {
|
|
|
29164
29480
|
return libcxx >= 0 && overlay > libcxx;
|
|
29165
29481
|
}
|
|
29166
29482
|
function emitSwiftPackageManifest(args) {
|
|
29167
|
-
const {
|
|
29483
|
+
const {
|
|
29484
|
+
targets,
|
|
29485
|
+
siblings,
|
|
29486
|
+
moduleRoot,
|
|
29487
|
+
oneModule,
|
|
29488
|
+
gameProducts: gameProducts2 = [],
|
|
29489
|
+
distribution
|
|
29490
|
+
} = args;
|
|
29168
29491
|
const prebuilt = args.prebuilt;
|
|
29169
29492
|
const linkedObjects = Boolean(distribution || prebuilt);
|
|
29170
29493
|
const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
|
|
@@ -29193,9 +29516,8 @@ function emitSwiftPackageManifest(args) {
|
|
|
29193
29516
|
for (const name3 of [...siblings.values()].flat())
|
|
29194
29517
|
if (OPTIONAL_FRAMEWORKS.has(name3) && !targets.some((target) => target.name === name3))
|
|
29195
29518
|
reach(name3);
|
|
29196
|
-
|
|
29197
|
-
for (const name3 of [
|
|
29198
|
-
}
|
|
29519
|
+
for (const product of gameProducts2)
|
|
29520
|
+
for (const name3 of GAME_REACH[product] ?? []) reach(name3);
|
|
29199
29521
|
let distributionLinkPath;
|
|
29200
29522
|
const distributionLink = args.distributionLink;
|
|
29201
29523
|
if (distribution && distributionLink) {
|
|
@@ -29218,7 +29540,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
29218
29540
|
(object6) => !isProvider(object6) && !replacedObjects.has(object6)
|
|
29219
29541
|
);
|
|
29220
29542
|
const objects = available.filter(
|
|
29221
|
-
(object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS,
|
|
29543
|
+
(object6) => !targets.some((target) => object6.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, ...GAME_FAMILY, "PeachBox2D"].every(
|
|
29222
29544
|
(name3) => !object6.startsWith(`lib/${name3}-`) || reachedFrameworks.has(name3)
|
|
29223
29545
|
)
|
|
29224
29546
|
);
|
|
@@ -29335,6 +29657,10 @@ function emitSwiftPackageManifest(args) {
|
|
|
29335
29657
|
includeImportContext(dependency);
|
|
29336
29658
|
const importedNativeFlags = [
|
|
29337
29659
|
...args.nativeImportFlags?.get(target.name) ?? [],
|
|
29660
|
+
...[...importContext].flatMap((name3) => {
|
|
29661
|
+
const map2 = name3 === target.name ? void 0 : args.nativeSwiftHeaderMaps?.get(name3);
|
|
29662
|
+
return map2 ? ["-fmodule-map-file=" + map2] : [];
|
|
29663
|
+
}),
|
|
29338
29664
|
...[...importContext].flatMap((name3) => args.native?.get(name3)?.importFlags ?? []),
|
|
29339
29665
|
...[...importContext].flatMap((name3) => {
|
|
29340
29666
|
const flags = targets.find((target2) => target2.name === name3)?.swiftFlags ?? [];
|
|
@@ -29377,7 +29703,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
29377
29703
|
...linkedObjects || clang && !target.executable ? [] : [
|
|
29378
29704
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
29379
29705
|
...oneModule ? [ONE_PRODUCT] : [],
|
|
29380
|
-
...
|
|
29706
|
+
...gameProducts2.map(gameProduct)
|
|
29381
29707
|
],
|
|
29382
29708
|
...(siblings.get(target.name) ?? []).flatMap(
|
|
29383
29709
|
(dependency) => clang && // textual native headers can include one another without imposing
|
|
@@ -29409,7 +29735,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
29409
29735
|
.unsafeFlags(${flagArray(`[
|
|
29410
29736
|
${REACTOR_FLAG}${executableLinkFlags(args.root)} "-Xlinker", "--export-if-defined=__main_argc_argv"${library},
|
|
29411
29737
|
]`)}),
|
|
29412
|
-
.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
|
|
29738
|
+
${KEEP_WASM_NAMES ? "" : '.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),'}
|
|
29413
29739
|
]` : librarySettings.length > 0 ? `,
|
|
29414
29740
|
linkerSettings: [${librarySettings.join(", ")}]` : "";
|
|
29415
29741
|
const cDefines = macroSettings(target.cDefines);
|
|
@@ -30597,6 +30923,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30597
30923
|
)
|
|
30598
30924
|
);
|
|
30599
30925
|
const importModuleMaps = /* @__PURE__ */ new Map();
|
|
30926
|
+
const sourceModuleMaps = /* @__PURE__ */ new Map();
|
|
30600
30927
|
const generatedModuleMaps = [];
|
|
30601
30928
|
for (const target of targets) {
|
|
30602
30929
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
@@ -30831,6 +31158,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30831
31158
|
stageTargetFile(target.name, import_node_path51.default.join(layout2.root, modulemap), moduleContents, {
|
|
30832
31159
|
allowExisting: true
|
|
30833
31160
|
});
|
|
31161
|
+
sourceModuleMaps.set(swiftTargetModuleName(target.name), {
|
|
31162
|
+
path: import_node_path51.default.join(layout2.root, modulemap),
|
|
31163
|
+
contents: moduleContents.toString()
|
|
31164
|
+
});
|
|
30834
31165
|
if (modulemap.endsWith("/Modules/module.modulemap")) {
|
|
30835
31166
|
const framework = import_node_path51.default.posix.dirname(import_node_path51.default.posix.dirname(modulemap));
|
|
30836
31167
|
for (const [, header] of moduleContents.toString().matchAll(/\bheader\s+"([^"]+)"/g))
|
|
@@ -31105,6 +31436,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
31105
31436
|
if (native.size > 0) (0, import_node_fs53.mkdirSync)(headerDirectory, { recursive: true });
|
|
31106
31437
|
const headerAliasFlags = Object.keys(input.headerAliases ?? {}).length > 0 ? ["-ivfsoverlay", headerSearch.files[0]] : [];
|
|
31107
31438
|
const nativeHeaderFlags = [...headerAliasFlags];
|
|
31439
|
+
const nativeSwiftHeaderMaps = /* @__PURE__ */ new Map();
|
|
31108
31440
|
const originalMaps = /* @__PURE__ */ new Map();
|
|
31109
31441
|
for (const target of input.nativeTargets ?? []) {
|
|
31110
31442
|
for (const flag of [...target.flags, ...target.cxxFlags]) {
|
|
@@ -31135,30 +31467,33 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
31135
31467
|
);
|
|
31136
31468
|
const moduleName2 = swiftTargetModuleName(name3);
|
|
31137
31469
|
const originalMap = originalMaps.get(moduleName2);
|
|
31138
|
-
const
|
|
31139
|
-
|
|
31470
|
+
const stagedMap = sourceModuleMaps.get(moduleName2);
|
|
31471
|
+
const originalPath = originalMap ? import_node_path51.default.join(layout2.root, originalMap) : stagedMap?.path;
|
|
31472
|
+
const originalContents = originalMap ? input.files[originalMap] : stagedMap?.contents;
|
|
31473
|
+
const originalTokens = originalContents ? moduleMapTokens(originalContents) : [];
|
|
31474
|
+
if (originalPath && originalTokens.some(
|
|
31140
31475
|
(token, index) => token === "module" && (originalTokens[index + 1] === "Swift" || originalTokens[index + 1] === `${moduleName2}.Swift`)
|
|
31141
31476
|
)) {
|
|
31142
|
-
nativeHeaderFlags.push("-fmodule-map-file=" +
|
|
31477
|
+
nativeHeaderFlags.push("-fmodule-map-file=" + originalPath);
|
|
31478
|
+
nativeSwiftHeaderMaps.set(name3, originalPath);
|
|
31143
31479
|
continue;
|
|
31144
31480
|
}
|
|
31145
31481
|
files2.set(
|
|
31146
31482
|
modulemap,
|
|
31147
|
-
|
|
31483
|
+
originalPath ? `extern module ${moduleName2} ${JSON.stringify(originalPath)}
|
|
31148
31484
|
module ${moduleName2}.Swift {
|
|
31149
31485
|
header ${JSON.stringify(import_node_path51.default.join(headerDirectory, name3 + "-Swift.h"))}
|
|
31150
31486
|
requires objc
|
|
31151
31487
|
}
|
|
31152
31488
|
` : swiftObjCModuleMap(
|
|
31153
31489
|
moduleName2,
|
|
31154
|
-
[
|
|
31155
|
-
|
|
31156
|
-
|
|
31157
|
-
],
|
|
31158
|
-
submoduleImports.get(moduleName2)
|
|
31490
|
+
(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path51.default.join(layout2.root, header)),
|
|
31491
|
+
submoduleImports.get(moduleName2),
|
|
31492
|
+
import_node_path51.default.join(headerDirectory, name3 + "-Swift.h")
|
|
31159
31493
|
)
|
|
31160
31494
|
);
|
|
31161
31495
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
31496
|
+
nativeSwiftHeaderMaps.set(name3, modulemap);
|
|
31162
31497
|
}
|
|
31163
31498
|
const modulePlan = (0, import_node_crypto23.createHash)("sha256").update(
|
|
31164
31499
|
swiftModuleInputFiles(moduleRoot).join("\n")
|
|
@@ -31409,14 +31744,17 @@ module ${moduleName2}.Swift {
|
|
|
31409
31744
|
manifest = manifest.replace(product, `${product}
|
|
31410
31745
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
31411
31746
|
}
|
|
31412
|
-
|
|
31747
|
+
const games = gameProducts(input.files);
|
|
31748
|
+
if (games.length > 0) {
|
|
31413
31749
|
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
31414
31750
|
if (!manifest.includes(anchor))
|
|
31415
31751
|
throw new Error(
|
|
31416
|
-
"scripts/contrast-app-Package.swift lost the line the
|
|
31752
|
+
"scripts/contrast-app-Package.swift lost the line the game products link at"
|
|
31417
31753
|
);
|
|
31418
|
-
manifest = manifest.replace(
|
|
31419
|
-
|
|
31754
|
+
manifest = manifest.replace(
|
|
31755
|
+
anchor,
|
|
31756
|
+
[anchor, ...games.map((name3) => `${gameProduct(name3)},`)].join("\n ")
|
|
31757
|
+
);
|
|
31420
31758
|
}
|
|
31421
31759
|
files2.set(import_node_path51.default.join(layout2.root, "Package.swift"), manifest + moduleFiles);
|
|
31422
31760
|
} else {
|
|
@@ -31515,6 +31853,7 @@ module ${moduleName2}.Swift {
|
|
|
31515
31853
|
nativeFlags,
|
|
31516
31854
|
nativeImportFlags,
|
|
31517
31855
|
nativeHeaderFlags,
|
|
31856
|
+
nativeSwiftHeaderMaps,
|
|
31518
31857
|
nativeHeaderDeclarations,
|
|
31519
31858
|
objcImplementationModules: new Set(
|
|
31520
31859
|
targets.filter(
|
|
@@ -31530,7 +31869,7 @@ module ${moduleName2}.Swift {
|
|
|
31530
31869
|
siblings: moduleSiblings,
|
|
31531
31870
|
moduleRoot,
|
|
31532
31871
|
oneModule: input.oneModule,
|
|
31533
|
-
|
|
31872
|
+
gameProducts: gameProducts(input.files),
|
|
31534
31873
|
distribution: distribution ?? void 0,
|
|
31535
31874
|
moduleExcludes,
|
|
31536
31875
|
deferDarwinOverlay: native.size > 0 && toolsetOrdersLibcxxBeforeDarwinOverlay(
|
|
@@ -31672,30 +32011,30 @@ module ${moduleName2}.Swift {
|
|
|
31672
32011
|
)
|
|
31673
32012
|
])
|
|
31674
32013
|
);
|
|
32014
|
+
const producerSet = /* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers]);
|
|
32015
|
+
const orderedProducers = [];
|
|
31675
32016
|
const included = /* @__PURE__ */ new Set();
|
|
31676
32017
|
const include = (name3) => {
|
|
31677
32018
|
if (included.has(name3)) return;
|
|
31678
32019
|
included.add(name3);
|
|
31679
32020
|
for (const dependency of dependencies.get(name3) ?? []) include(dependency);
|
|
32021
|
+
if (producerSet.has(name3)) orderedProducers.push(name3);
|
|
31680
32022
|
};
|
|
31681
|
-
for (const producer of
|
|
32023
|
+
for (const producer of producerSet)
|
|
31682
32024
|
for (const dependency of dependencies.get(producer) ?? []) include(dependency);
|
|
32025
|
+
const needsHeaderStages = [...producerSet].some((name3) => included.has(name3));
|
|
32026
|
+
for (const producer of producerSet) include(producer);
|
|
31683
32027
|
return {
|
|
31684
32028
|
nativeBuildTargets: [...native].flatMap(([name3, plan]) => [
|
|
31685
32029
|
...!plan.mixed && plan.sources.length > 0 ? [name3] : [],
|
|
31686
32030
|
...plan.groups?.map((group) => group.name) ?? (plan.late ? [plan.late.name] : [])
|
|
31687
32031
|
]),
|
|
31688
|
-
headerProducers:
|
|
31689
|
-
.../* @__PURE__ */ new Set([
|
|
31690
|
-
...Object.keys(nativeHeaderDeclarations),
|
|
31691
|
-
...producers.filter((name3) => !included.has(name3))
|
|
31692
|
-
])
|
|
31693
|
-
],
|
|
32032
|
+
headerProducers: orderedProducers,
|
|
31694
32033
|
emittedHeaderProducers: [
|
|
31695
32034
|
.../* @__PURE__ */ new Set([...Object.keys(nativeHeaderDeclarations), ...producers])
|
|
31696
32035
|
],
|
|
31697
32036
|
nativeHeaderDeclarations,
|
|
31698
|
-
headerProductTarget,
|
|
32037
|
+
headerProductTarget: needsHeaderStages ? void 0 : headerProductTarget,
|
|
31699
32038
|
targetFailures,
|
|
31700
32039
|
generatedOwners,
|
|
31701
32040
|
targetToolset
|
|
@@ -31929,14 +32268,9 @@ function linkedFrameworkTargets(moduleRoot, input) {
|
|
|
31929
32268
|
))
|
|
31930
32269
|
reach(match[1]);
|
|
31931
32270
|
}
|
|
31932
|
-
|
|
31933
|
-
|
|
31934
|
-
const wanted = [
|
|
31935
|
-
"PeachApp",
|
|
31936
|
-
...input.oneModule ? ["One"] : [],
|
|
31937
|
-
...importsSpriteKit(input.files) ? ["SpriteKit"] : [],
|
|
31938
|
-
...reached
|
|
31939
|
-
];
|
|
32271
|
+
const games = gameProducts(input.files);
|
|
32272
|
+
for (const product of games) for (const name3 of GAME_REACH[product] ?? []) reach(name3);
|
|
32273
|
+
const wanted = ["PeachApp", ...input.oneModule ? ["One"] : [], ...games, ...reached];
|
|
31940
32274
|
const linked = [...new Set(wanted)].filter((name3) => libraries.has(name3));
|
|
31941
32275
|
if (!linked.includes("PeachApp"))
|
|
31942
32276
|
throw new Error("swift-compile: the framework package declares no PeachApp library");
|
|
@@ -32839,7 +33173,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
32839
33173
|
options.signal
|
|
32840
33174
|
);
|
|
32841
33175
|
}
|
|
32842
|
-
var import_node_child_process28, import_node_crypto23, import_node_fs53, import_node_os11, import_node_path51, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT,
|
|
33176
|
+
var import_node_child_process28, import_node_crypto23, import_node_fs53, import_node_os11, import_node_path51, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, FOUNDATION_IMPLICIT_MODULES, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, DIRECTIVE, OS_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
|
|
32843
33177
|
var init_swift_compile = __esm({
|
|
32844
33178
|
"src/swift-compile.ts"() {
|
|
32845
33179
|
"use strict";
|
|
@@ -32882,7 +33216,10 @@ var init_swift_compile = __esm({
|
|
|
32882
33216
|
SWIFTPM_NOISE = /^(?:\[\d+\/\d+\] |Building for production\.\.\.$|warning: '--build-system native' has been deprecated)/;
|
|
32883
33217
|
SWIFT_BUILDER_TRANSPORT_MARGIN_MS = 3e5;
|
|
32884
33218
|
SWIFT_BUILDER_DEFAULT_COMPILE_MS = 18e5;
|
|
32885
|
-
clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
|
|
33219
|
+
clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
|
|
33220
|
+
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
33221
|
+
"@import Foundation;"
|
|
33222
|
+
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
32886
33223
|
swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
|
|
32887
33224
|
...[
|
|
32888
33225
|
...header.matchAll(
|
|
@@ -32910,7 +33247,8 @@ var init_swift_compile = __esm({
|
|
|
32910
33247
|
PeachCFNetwork: [],
|
|
32911
33248
|
JavaScriptCore: ["PeachJavaScriptCore"],
|
|
32912
33249
|
PeachJavaScriptCore: [],
|
|
32913
|
-
GameplayKit
|
|
33250
|
+
// GameplayKit names SpriteKit and SceneKit nodes, as on iOS
|
|
33251
|
+
GameplayKit: ["SpriteKit", "SceneKit", "PeachBox2D", "simd", "GLKit"],
|
|
32914
33252
|
simd: [],
|
|
32915
33253
|
ModelIO: ["simd"],
|
|
32916
33254
|
GLKit: ["ModelIO"],
|
|
@@ -33022,10 +33360,21 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
33022
33360
|
}
|
|
33023
33361
|
];
|
|
33024
33362
|
ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
33025
|
-
|
|
33026
|
-
|
|
33027
|
-
|
|
33028
|
-
|
|
33363
|
+
GAME_FAMILY = ["SpriteKit", "SceneKit"];
|
|
33364
|
+
gameProducts = (files2) => {
|
|
33365
|
+
const imported = new Set(
|
|
33366
|
+
Object.entries(files2).flatMap(
|
|
33367
|
+
([file, contents]) => file.endsWith(".swift") ? swiftImportNames(contents) : []
|
|
33368
|
+
)
|
|
33369
|
+
);
|
|
33370
|
+
if (imported.has("SceneKit")) return [...GAME_FAMILY];
|
|
33371
|
+
return imported.has("SpriteKit") ? ["SpriteKit"] : [];
|
|
33372
|
+
};
|
|
33373
|
+
gameProduct = (name3) => `.product(name: "${name3}", package: "sootsim-swift")`;
|
|
33374
|
+
GAME_REACH = {
|
|
33375
|
+
SpriteKit: ["SpriteKit", "PeachBox2D", "simd", "GLKit"],
|
|
33376
|
+
SceneKit: ["SceneKit"]
|
|
33377
|
+
};
|
|
33029
33378
|
FOUNDATION_IMPLICIT_MODULES = [
|
|
33030
33379
|
"PeachObjC",
|
|
33031
33380
|
"Dispatch",
|
|
@@ -33052,7 +33401,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
33052
33401
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
33053
33402
|
MULTI_MANIFEST_VERSION = 68;
|
|
33054
33403
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
33055
|
-
compilerSourceDigest = true ? "
|
|
33404
|
+
compilerSourceDigest = true ? "eba60b7a2e9485f928a6ec2e544e10d84b2b33430be66b9e069c9797a927af86" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
33056
33405
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
33057
33406
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
33058
33407
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -33383,8 +33732,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
33383
33732
|
"NSURLProtectionSpaceHTTPS",
|
|
33384
33733
|
"NSURLProtectionSpaceHTTPSProxy",
|
|
33385
33734
|
"NSURLProtectionSpaceSOCKSProxy",
|
|
33386
|
-
"NSURLSessionDownloadTaskResumeData",
|
|
33387
|
-
"NSURLSessionTransferSizeUnknown",
|
|
33388
33735
|
"NSURLSessionUploadTaskResumeData",
|
|
33389
33736
|
"NSUTF16BigEndianStringEncoding",
|
|
33390
33737
|
"NSUTF16LittleEndianStringEncoding",
|
|
@@ -35705,6 +36052,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
35705
36052
|
const allSources = /* @__PURE__ */ new Set();
|
|
35706
36053
|
const headers = /* @__PURE__ */ new Set();
|
|
35707
36054
|
const resources = /* @__PURE__ */ new Set();
|
|
36055
|
+
const resourceNames = {};
|
|
35708
36056
|
const scriptForOutput = /* @__PURE__ */ new Map();
|
|
35709
36057
|
const copiedFiles = [];
|
|
35710
36058
|
let generatedInfoPlist = false;
|
|
@@ -35874,13 +36222,14 @@ ${output2}`
|
|
|
35874
36222
|
xcodePathResolver(project2.objects, project2.projectDir, import_node_path56.default.join, settings),
|
|
35875
36223
|
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs57.default.existsSync(file) ? [file] : [],
|
|
35876
36224
|
import_node_path56.default.join,
|
|
35877
|
-
(file, kind) => {
|
|
36225
|
+
(file, kind, bundleName) => {
|
|
35878
36226
|
if (kind === "header") {
|
|
35879
36227
|
headers.add(file);
|
|
35880
36228
|
return;
|
|
35881
36229
|
}
|
|
35882
36230
|
if (kind === "resource") {
|
|
35883
36231
|
resources.add(file);
|
|
36232
|
+
if (bundleName) resourceNames[file] = bundleName;
|
|
35884
36233
|
return;
|
|
35885
36234
|
}
|
|
35886
36235
|
if (!import_node_fs57.default.existsSync(file)) {
|
|
@@ -36004,6 +36353,7 @@ ${output2}`
|
|
|
36004
36353
|
return {
|
|
36005
36354
|
sources: [...sources].sort(),
|
|
36006
36355
|
resources: [...resources].sort(),
|
|
36356
|
+
resourceNames,
|
|
36007
36357
|
copiedFiles,
|
|
36008
36358
|
generatedInfoPlist,
|
|
36009
36359
|
allSources: [...allSources].sort(),
|
|
@@ -37248,10 +37598,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
37248
37598
|
byProduct.has(import_node_path56.default.basename(rawPath)))
|
|
37249
37599
|
continue;
|
|
37250
37600
|
const resolved = fileId ? project2.resolvePath(fileId) : null;
|
|
37251
|
-
if (fileId && resolved !== null && !import_node_fs57.default.existsSync(resolved))
|
|
37252
|
-
|
|
37253
|
-
|
|
37254
|
-
|
|
37601
|
+
if (fileId && resolved !== null && !import_node_fs57.default.existsSync(resolved)) {
|
|
37602
|
+
if (!ios_sdk_frameworks_default.frameworks.includes(name3))
|
|
37603
|
+
throw new Error(
|
|
37604
|
+
`${str(target.name) ?? "target"}: linked framework ${name3} (${fileId}) points at missing ${resolved} in ${project2.projectFile}`
|
|
37605
|
+
);
|
|
37606
|
+
sdkFrameworks.add(name3);
|
|
37607
|
+
continue;
|
|
37608
|
+
}
|
|
37255
37609
|
if (!binaryFrameworks.get(name3)) binaryFrameworks.set(name3, resolved);
|
|
37256
37610
|
}
|
|
37257
37611
|
}
|
|
@@ -37328,7 +37682,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
37328
37682
|
...linkedProducts.flatMap(
|
|
37329
37683
|
({ source }) => source.kind === "local" && import_node_fs57.default.existsSync(source.dir) ? [source.dir] : []
|
|
37330
37684
|
),
|
|
37331
|
-
...new Set(podSourceDirs)
|
|
37685
|
+
...new Set(podSourceDirs),
|
|
37686
|
+
// a target's own files may sit beside the project, such as an asset
|
|
37687
|
+
// catalog one folder up, and xcode builds them from there
|
|
37688
|
+
...new Set(
|
|
37689
|
+
[...module2.allSources, ...module2.resources].filter((file) => import_node_fs57.default.existsSync(file)).map((file) => import_node_path56.default.dirname(file))
|
|
37690
|
+
)
|
|
37332
37691
|
].map((dir) => import_node_fs57.default.realpathSync.native(dir))
|
|
37333
37692
|
),
|
|
37334
37693
|
projectFiles: [
|
|
@@ -37373,6 +37732,7 @@ var init_xcode_project = __esm({
|
|
|
37373
37732
|
import_node_fs57 = __toESM(require("node:fs"), 1);
|
|
37374
37733
|
import_node_path56 = __toESM(require("node:path"), 1);
|
|
37375
37734
|
import_plist2 = __toESM(require("plist"), 1);
|
|
37735
|
+
init_ios_sdk_frameworks();
|
|
37376
37736
|
init_is_record();
|
|
37377
37737
|
init_native_app_identity();
|
|
37378
37738
|
init_prepared_xcode_phases();
|
|
@@ -37516,7 +37876,7 @@ var init_swift_standin_digest = __esm({
|
|
|
37516
37876
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
37517
37877
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
37518
37878
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
37519
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
37879
|
+
STANDIN_SOURCE_DIGEST = true ? "1a62599378cd7cdf32385f588eb3f983f07ea222d145ec5b6dc34cce9104f46c" : standinSourceDigest();
|
|
37520
37880
|
}
|
|
37521
37881
|
});
|
|
37522
37882
|
|
|
@@ -45384,302 +45744,6 @@ var init_core_data_entity_classes = __esm({
|
|
|
45384
45744
|
}
|
|
45385
45745
|
});
|
|
45386
45746
|
|
|
45387
|
-
// src/ios-sdk-frameworks.json
|
|
45388
|
-
var ios_sdk_frameworks_default;
|
|
45389
|
-
var init_ios_sdk_frameworks = __esm({
|
|
45390
|
-
"src/ios-sdk-frameworks.json"() {
|
|
45391
|
-
ios_sdk_frameworks_default = {
|
|
45392
|
-
sdk: "iphonesimulator27.1",
|
|
45393
|
-
frameworks: [
|
|
45394
|
-
"ARKit",
|
|
45395
|
-
"AVFAudio",
|
|
45396
|
-
"AVFoundation",
|
|
45397
|
-
"AVKit",
|
|
45398
|
-
"AVRouting",
|
|
45399
|
-
"Accelerate",
|
|
45400
|
-
"Accessibility",
|
|
45401
|
-
"AccessoryLiveActivities",
|
|
45402
|
-
"AccessoryNotifications",
|
|
45403
|
-
"AccessorySetupKit",
|
|
45404
|
-
"AccessoryTransportExtension",
|
|
45405
|
-
"Accounts",
|
|
45406
|
-
"ActivityKit",
|
|
45407
|
-
"AdAttributionKit",
|
|
45408
|
-
"AdServices",
|
|
45409
|
-
"AdSupport",
|
|
45410
|
-
"AddressBook",
|
|
45411
|
-
"AddressBookUI",
|
|
45412
|
-
"AlarmKit",
|
|
45413
|
-
"AppClip",
|
|
45414
|
-
"AppIntents",
|
|
45415
|
-
"AppIntentsTypeSupport",
|
|
45416
|
-
"AppMigrationKit",
|
|
45417
|
-
"AppTrackingTransparency",
|
|
45418
|
-
"AssetsLibrary",
|
|
45419
|
-
"AudioToolbox",
|
|
45420
|
-
"AudioUnit",
|
|
45421
|
-
"AuthenticationServices",
|
|
45422
|
-
"AutomatedDeviceEnrollment",
|
|
45423
|
-
"AutomaticAssessmentConfiguration",
|
|
45424
|
-
"BackgroundAssets",
|
|
45425
|
-
"BackgroundTasks",
|
|
45426
|
-
"BrowserEngineCore",
|
|
45427
|
-
"BrowserEngineKit",
|
|
45428
|
-
"BrowserKit",
|
|
45429
|
-
"BusinessChat",
|
|
45430
|
-
"CFNetwork",
|
|
45431
|
-
"CallKit",
|
|
45432
|
-
"CarKey",
|
|
45433
|
-
"CarPlay",
|
|
45434
|
-
"Charts",
|
|
45435
|
-
"ClassKit",
|
|
45436
|
-
"ClassKitUI",
|
|
45437
|
-
"ClockKit",
|
|
45438
|
-
"CloudKit",
|
|
45439
|
-
"ColorSync",
|
|
45440
|
-
"Combine",
|
|
45441
|
-
"ComputeGraph",
|
|
45442
|
-
"ContactProvider",
|
|
45443
|
-
"Contacts",
|
|
45444
|
-
"ContactsUI",
|
|
45445
|
-
"CoreAudio",
|
|
45446
|
-
"CoreAudioKit",
|
|
45447
|
-
"CoreAudioTypes",
|
|
45448
|
-
"CoreBluetooth",
|
|
45449
|
-
"CoreData",
|
|
45450
|
-
"CoreFoundation",
|
|
45451
|
-
"CoreGraphics",
|
|
45452
|
-
"CoreHaptics",
|
|
45453
|
-
"CoreImage",
|
|
45454
|
-
"CoreLocation",
|
|
45455
|
-
"CoreLocationUI",
|
|
45456
|
-
"CoreMIDI",
|
|
45457
|
-
"CoreML",
|
|
45458
|
-
"CoreMedia",
|
|
45459
|
-
"CoreMotion",
|
|
45460
|
-
"CoreNFC",
|
|
45461
|
-
"CoreServices",
|
|
45462
|
-
"CoreSpotlight",
|
|
45463
|
-
"CoreTelephony",
|
|
45464
|
-
"CoreText",
|
|
45465
|
-
"CoreTransferable",
|
|
45466
|
-
"CoreVideo",
|
|
45467
|
-
"CreateMLComponents",
|
|
45468
|
-
"CryptoKit",
|
|
45469
|
-
"CryptoTokenKit",
|
|
45470
|
-
"DataDetection",
|
|
45471
|
-
"DeclaredAgeRange",
|
|
45472
|
-
"DeveloperToolsSupport",
|
|
45473
|
-
"DeviceActivity",
|
|
45474
|
-
"DeviceCheck",
|
|
45475
|
-
"DeviceDiscoveryExtension",
|
|
45476
|
-
"DeviceDiscoveryUI",
|
|
45477
|
-
"EnergyKit",
|
|
45478
|
-
"EventKit",
|
|
45479
|
-
"EventKitUI",
|
|
45480
|
-
"ExposureNotification",
|
|
45481
|
-
"ExtensionFoundation",
|
|
45482
|
-
"ExtensionKit",
|
|
45483
|
-
"ExternalAccessory",
|
|
45484
|
-
"FamilyControls",
|
|
45485
|
-
"FileProvider",
|
|
45486
|
-
"FileProviderUI",
|
|
45487
|
-
"FinanceKit",
|
|
45488
|
-
"FinanceKitUI",
|
|
45489
|
-
"Foundation",
|
|
45490
|
-
"FoundationModels",
|
|
45491
|
-
"GLKit",
|
|
45492
|
-
"GSS",
|
|
45493
|
-
"GameController",
|
|
45494
|
-
"GameKit",
|
|
45495
|
-
"GameSave",
|
|
45496
|
-
"GameplayKit",
|
|
45497
|
-
"GeoToolbox",
|
|
45498
|
-
"GroupActivities",
|
|
45499
|
-
"HealthKit",
|
|
45500
|
-
"HealthKitUI",
|
|
45501
|
-
"HomeKit",
|
|
45502
|
-
"IOKit",
|
|
45503
|
-
"IOSurface",
|
|
45504
|
-
"IdentityDocumentServices",
|
|
45505
|
-
"IdentityDocumentServicesUI",
|
|
45506
|
-
"IdentityLookup",
|
|
45507
|
-
"IdentityLookupUI",
|
|
45508
|
-
"ImageCaptureCore",
|
|
45509
|
-
"ImageIO",
|
|
45510
|
-
"ImagePlayground",
|
|
45511
|
-
"ImmersiveMediaSupport",
|
|
45512
|
-
"Intents",
|
|
45513
|
-
"IntentsUI",
|
|
45514
|
-
"JavaScriptCore",
|
|
45515
|
-
"LinkPresentation",
|
|
45516
|
-
"LinkSecurity",
|
|
45517
|
-
"LiveCommunicationKit",
|
|
45518
|
-
"LocalAuthentication",
|
|
45519
|
-
"LocalAuthenticationEmbeddedUI",
|
|
45520
|
-
"LockedCameraCapture",
|
|
45521
|
-
"ManagedApp",
|
|
45522
|
-
"ManagedAppDistribution",
|
|
45523
|
-
"ManagedSettings",
|
|
45524
|
-
"ManagedSettingsUI",
|
|
45525
|
-
"MapKit",
|
|
45526
|
-
"MarketplaceKit",
|
|
45527
|
-
"Matter",
|
|
45528
|
-
"MatterSupport",
|
|
45529
|
-
"MediaAccessibility",
|
|
45530
|
-
"MediaIntelligence",
|
|
45531
|
-
"MediaIntents",
|
|
45532
|
-
"MediaPlayer",
|
|
45533
|
-
"MediaToolbox",
|
|
45534
|
-
"MessageUI",
|
|
45535
|
-
"Messages",
|
|
45536
|
-
"Metal",
|
|
45537
|
-
"MetalKit",
|
|
45538
|
-
"MetalPerformancePrimitives",
|
|
45539
|
-
"MetalPerformanceShaders",
|
|
45540
|
-
"MetalPerformanceShadersGraph",
|
|
45541
|
-
"MetricKit",
|
|
45542
|
-
"MobileCoreServices",
|
|
45543
|
-
"ModelIO",
|
|
45544
|
-
"MultipeerConnectivity",
|
|
45545
|
-
"MusicKit",
|
|
45546
|
-
"MusicUnderstanding",
|
|
45547
|
-
"NaturalLanguage",
|
|
45548
|
-
"NearbyInteraction",
|
|
45549
|
-
"Network",
|
|
45550
|
-
"NetworkExtension",
|
|
45551
|
-
"NotificationCenter",
|
|
45552
|
-
"NowPlaying",
|
|
45553
|
-
"OSLog",
|
|
45554
|
-
"OpenAL",
|
|
45555
|
-
"OpenGLES",
|
|
45556
|
-
"PDFKit",
|
|
45557
|
-
"PHASE",
|
|
45558
|
-
"PaperKit",
|
|
45559
|
-
"PassKit",
|
|
45560
|
-
"PencilKit",
|
|
45561
|
-
"PermissionKit",
|
|
45562
|
-
"Photos",
|
|
45563
|
-
"PhotosUI",
|
|
45564
|
-
"ProximityReader",
|
|
45565
|
-
"PushKit",
|
|
45566
|
-
"PushToTalk",
|
|
45567
|
-
"QuartzCore",
|
|
45568
|
-
"QuickLook",
|
|
45569
|
-
"QuickLookThumbnailing",
|
|
45570
|
-
"RealityFoundation",
|
|
45571
|
-
"RealityKit",
|
|
45572
|
-
"RelevanceKit",
|
|
45573
|
-
"ReplayKit",
|
|
45574
|
-
"RoomPlan",
|
|
45575
|
-
"SafariServices",
|
|
45576
|
-
"SafetyKit",
|
|
45577
|
-
"SceneKit",
|
|
45578
|
-
"ScreenTime",
|
|
45579
|
-
"SecureElementCredential",
|
|
45580
|
-
"Security",
|
|
45581
|
-
"SecurityUI",
|
|
45582
|
-
"SensitiveContentAnalysis",
|
|
45583
|
-
"SensorKit",
|
|
45584
|
-
"ServicesAccountLinking",
|
|
45585
|
-
"SharedWithYou",
|
|
45586
|
-
"SharedWithYouCore",
|
|
45587
|
-
"ShazamKit",
|
|
45588
|
-
"Social",
|
|
45589
|
-
"SoundAnalysis",
|
|
45590
|
-
"Speech",
|
|
45591
|
-
"SpriteKit",
|
|
45592
|
-
"StateReporting",
|
|
45593
|
-
"StoreKit",
|
|
45594
|
-
"SuggestedActions",
|
|
45595
|
-
"SwiftData",
|
|
45596
|
-
"SwiftUI",
|
|
45597
|
-
"SwiftUICore",
|
|
45598
|
-
"Symbols",
|
|
45599
|
-
"SystemConfiguration",
|
|
45600
|
-
"SystemExtensions",
|
|
45601
|
-
"TabularData",
|
|
45602
|
-
"TelephonyMessagingKit",
|
|
45603
|
-
"TipKit",
|
|
45604
|
-
"TouchController",
|
|
45605
|
-
"Translation",
|
|
45606
|
-
"TranslationUIProvider",
|
|
45607
|
-
"TrustInsights",
|
|
45608
|
-
"Twitter",
|
|
45609
|
-
"UIKit",
|
|
45610
|
-
"USDKit",
|
|
45611
|
-
"UniformTypeIdentifiers",
|
|
45612
|
-
"UserNotifications",
|
|
45613
|
-
"UserNotificationsUI",
|
|
45614
|
-
"VideoSubscriberAccount",
|
|
45615
|
-
"VideoToolbox",
|
|
45616
|
-
"Vision",
|
|
45617
|
-
"VisionKit",
|
|
45618
|
-
"WatchConnectivity",
|
|
45619
|
-
"WeatherKit",
|
|
45620
|
-
"WebKit",
|
|
45621
|
-
"WiFiAware",
|
|
45622
|
-
"WidgetKit",
|
|
45623
|
-
"WorkoutKit",
|
|
45624
|
-
"_AVKit_SwiftUI",
|
|
45625
|
-
"_AdAttributionKit_StoreKit",
|
|
45626
|
-
"_AppIntents_HealthKit",
|
|
45627
|
-
"_AppIntents_SwiftUI",
|
|
45628
|
-
"_AppIntents_UIKit",
|
|
45629
|
-
"_AuthenticationServices_SwiftUI",
|
|
45630
|
-
"_Contacts_AppIntents",
|
|
45631
|
-
"_CoreData_CloudKit",
|
|
45632
|
-
"_CoreLocationUI_SwiftUI",
|
|
45633
|
-
"_CoreNFC_UIKit",
|
|
45634
|
-
"_CoreSpotlight_FoundationModels",
|
|
45635
|
-
"_DataDetection_SwiftUI",
|
|
45636
|
-
"_DeviceActivity_SwiftUI",
|
|
45637
|
-
"_DeviceDiscoveryUI_SwiftUI",
|
|
45638
|
-
"_FinanceKit_AppIntents",
|
|
45639
|
-
"_FoundationModels_SwiftUI",
|
|
45640
|
-
"_FoundationModels_UIKit",
|
|
45641
|
-
"_GameController_SwiftUI",
|
|
45642
|
-
"_GeoToolbox_AppIntents",
|
|
45643
|
-
"_GroupActivities_UIKit",
|
|
45644
|
-
"_HomeKit_SwiftUI",
|
|
45645
|
-
"_Intents_TipKit",
|
|
45646
|
-
"_LinkPresentation_AppIntents",
|
|
45647
|
-
"_LocationEssentials",
|
|
45648
|
-
"_MapKit_SwiftUI",
|
|
45649
|
-
"_MarketplaceKit_UIKit",
|
|
45650
|
-
"_MediaIntents_AppIntents",
|
|
45651
|
-
"_MediaPlayer_AppIntents",
|
|
45652
|
-
"_MusicKit_SwiftUI",
|
|
45653
|
-
"_NowPlaying_AppIntents",
|
|
45654
|
-
"_PassKit_SwiftUI",
|
|
45655
|
-
"_PermissionKit_SwiftUI",
|
|
45656
|
-
"_PermissionKit_UIKit",
|
|
45657
|
-
"_PhotosUI_SwiftUI",
|
|
45658
|
-
"_PhotosUI_WidgetKit",
|
|
45659
|
-
"_Photos_AppIntents",
|
|
45660
|
-
"_QuickLook_SwiftUI",
|
|
45661
|
-
"_RealityKit_ComputeGraph",
|
|
45662
|
-
"_RealityKit_SwiftUI",
|
|
45663
|
-
"_RelevanceKit_MapKit",
|
|
45664
|
-
"_SceneKit_SwiftUI",
|
|
45665
|
-
"_SecureElementCredential_SwiftUI",
|
|
45666
|
-
"_SecureElementCredential_UIKit",
|
|
45667
|
-
"_SharedWithYou_AppIntents",
|
|
45668
|
-
"_SpriteKit_SwiftUI",
|
|
45669
|
-
"_StoreKit_SwiftUI",
|
|
45670
|
-
"_SwiftData_CoreData",
|
|
45671
|
-
"_SwiftData_SwiftUI",
|
|
45672
|
-
"_Translation_SwiftUI",
|
|
45673
|
-
"_USDKit_RealityKit",
|
|
45674
|
-
"_UserNotifications_AppIntents",
|
|
45675
|
-
"_WebKit_SwiftUI",
|
|
45676
|
-
"_WorkoutKit_SwiftUI",
|
|
45677
|
-
"iAd"
|
|
45678
|
-
]
|
|
45679
|
-
};
|
|
45680
|
-
}
|
|
45681
|
-
});
|
|
45682
|
-
|
|
45683
45747
|
// src/swift-cxx-reachable.ts
|
|
45684
45748
|
function cxxTrace(stderr) {
|
|
45685
45749
|
const files2 = [];
|
|
@@ -47199,6 +47263,17 @@ function isPackageSource(file) {
|
|
|
47199
47263
|
function sourceFiles(root) {
|
|
47200
47264
|
return packageFiles(root, false).filter(isPackageSource);
|
|
47201
47265
|
}
|
|
47266
|
+
function xcodeFlatResources(app) {
|
|
47267
|
+
if (!app) return /* @__PURE__ */ new Set();
|
|
47268
|
+
return new Set(
|
|
47269
|
+
app.resources.filter(
|
|
47270
|
+
(file) => !Object.hasOwn(app.resourceNames, file) && !file.split(import_node_path83.default.sep).some((segment) => segment.endsWith(".xcassets"))
|
|
47271
|
+
)
|
|
47272
|
+
);
|
|
47273
|
+
}
|
|
47274
|
+
function bundleResourcePath(flatResources, disk, file) {
|
|
47275
|
+
return flatResources.has(disk) && !file.split("/").includes("Resources") ? `Resources/${file}` : file;
|
|
47276
|
+
}
|
|
47202
47277
|
function resourceCandidateFiles(root) {
|
|
47203
47278
|
return packageFiles(root, false).filter(
|
|
47204
47279
|
(file) => !isPackageSource(file) && !file.endsWith(".xcconfig") && !["project.pbxproj", "project.xcproj", "Package.resolved"].includes(
|
|
@@ -47271,12 +47346,24 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
47271
47346
|
const disk = byRelative.get(file);
|
|
47272
47347
|
return !disk || !layout2?.targetDirs.get(disk)?.startsWith(`${XCODE_FRAMEWORKS_DIR}/`);
|
|
47273
47348
|
});
|
|
47274
|
-
const
|
|
47275
|
-
|
|
47276
|
-
|
|
47277
|
-
|
|
47278
|
-
|
|
47279
|
-
|
|
47349
|
+
const flatResources = xcodeFlatResources(layout2?.app);
|
|
47350
|
+
const bundled = new Map(
|
|
47351
|
+
relative4.map((file) => [
|
|
47352
|
+
bundleResourcePath(flatResources, byRelative.get(file), file),
|
|
47353
|
+
file
|
|
47354
|
+
])
|
|
47355
|
+
);
|
|
47356
|
+
const found = enumerateBundleImages(
|
|
47357
|
+
[...bundled.keys()],
|
|
47358
|
+
(file) => readContents2(bundled.get(file) ?? file),
|
|
47359
|
+
(marked) => {
|
|
47360
|
+
const file = bundled.get(marked) ?? marked;
|
|
47361
|
+
const disk = byRelative.get(file);
|
|
47362
|
+
if (!disk) throw new Error(`image source ${file} has no input file`);
|
|
47363
|
+
const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
|
|
47364
|
+
return swiftResourceBundleForFile(bundles, key2)?.path ?? ".";
|
|
47365
|
+
}
|
|
47366
|
+
).map((image) => ({ ...image, file: bundled.get(image.file) ?? image.file }));
|
|
47280
47367
|
const colors = enumerateBundleColors(catalogFiles, readContents2);
|
|
47281
47368
|
const symbols = enumerateBundleSymbols(catalogFiles, readContents2, (file) => {
|
|
47282
47369
|
const disk = byRelative.get(file);
|
|
@@ -47460,15 +47547,20 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
|
|
|
47460
47547
|
}
|
|
47461
47548
|
}
|
|
47462
47549
|
const groups = /* @__PURE__ */ new Map();
|
|
47463
|
-
const
|
|
47550
|
+
const flatResources = xcodeFlatResources(xcode?.app);
|
|
47464
47551
|
for (const file of relative4) {
|
|
47465
47552
|
const disk = import_node_path83.default.join(packagePath, ...file.split("/"));
|
|
47553
|
+
const folderName = xcode?.app.resourceNames[disk];
|
|
47554
|
+
if (folderName) {
|
|
47555
|
+
watched.push(file);
|
|
47556
|
+
addFile(folderName, readPackageFile2(packagePath, disk, limits.resourceBytes));
|
|
47557
|
+
continue;
|
|
47558
|
+
}
|
|
47466
47559
|
const key2 = xcode ? xcodeInputKey(xcode, disk, file) : file;
|
|
47467
47560
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
47468
47561
|
const bundlePath = bundle?.path ?? ".";
|
|
47469
47562
|
const group = groups.get(bundlePath) ?? /* @__PURE__ */ new Map();
|
|
47470
|
-
|
|
47471
|
-
group.set(resource, disk);
|
|
47563
|
+
group.set(bundleResourcePath(flatResources, disk, file), disk);
|
|
47472
47564
|
groups.set(bundlePath, group);
|
|
47473
47565
|
}
|
|
47474
47566
|
for (const bundle of bundles) {
|
|
@@ -54008,7 +54100,7 @@ var init_nitro_superset = __esm({
|
|
|
54008
54100
|
init_nitroContract();
|
|
54009
54101
|
init_swift_standin_digest();
|
|
54010
54102
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
54011
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
54103
|
+
NITRO_COMPILER_DIGEST = true ? "a4a039ea02c6f6891931ee5a3d0136be472592ea109f8bc1b947d9d235a9559c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
54012
54104
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
54013
54105
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
54014
54106
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -54029,7 +54121,7 @@ var init_nitro_superset = __esm({
|
|
|
54029
54121
|
var runtime_companion_default;
|
|
54030
54122
|
var init_runtime_companion = __esm({
|
|
54031
54123
|
"runtime-companion.json"() {
|
|
54032
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
54124
|
+
runtime_companion_default = { abi: 1, sha256: "6b48c0f7ae1d87e581af7cf445b2eaad2e1a4aa8fad23a00e1ae90916b2bbc02", file: "node/cli-6b48c0f7ae1d87e581af7cf445b2eaad2e1a4aa8fad23a00e1ae90916b2bbc02.cjs" };
|
|
54033
54125
|
}
|
|
54034
54126
|
});
|
|
54035
54127
|
|
|
@@ -54090,6 +54182,7 @@ function getCliRuntime() {
|
|
|
54090
54182
|
"Incompatible Peach runtime companion ABI; run `peach runtime install`"
|
|
54091
54183
|
);
|
|
54092
54184
|
}
|
|
54185
|
+
runtime.provideTerser(() => import("terser"));
|
|
54093
54186
|
loaded2 = { root, runtime };
|
|
54094
54187
|
return runtime;
|
|
54095
54188
|
}
|
|
@@ -54109,6 +54202,223 @@ var init_cli_runtime = __esm({
|
|
|
54109
54202
|
}
|
|
54110
54203
|
});
|
|
54111
54204
|
|
|
54205
|
+
// src/runtime-packs.ts
|
|
54206
|
+
var runtime_packs_exports = {};
|
|
54207
|
+
__export(runtime_packs_exports, {
|
|
54208
|
+
ensureRuntimePackFor: () => ensureRuntimePackFor
|
|
54209
|
+
});
|
|
54210
|
+
function listedFiles(runtimeRoot) {
|
|
54211
|
+
let listed = listedByRoot.get(runtimeRoot);
|
|
54212
|
+
if (listed) return listed;
|
|
54213
|
+
listed = /* @__PURE__ */ new Map();
|
|
54214
|
+
for (const [pack, entry] of Object.entries(readPacks(runtimeRoot) ?? {}))
|
|
54215
|
+
for (const file of entry.files ?? []) {
|
|
54216
|
+
const name3 = import_node_path102.default.posix.basename(file);
|
|
54217
|
+
listed.set(name3, [...listed.get(name3) ?? [], { file, pack }]);
|
|
54218
|
+
}
|
|
54219
|
+
listedByRoot.set(runtimeRoot, listed);
|
|
54220
|
+
return listed;
|
|
54221
|
+
}
|
|
54222
|
+
function readPacks(runtimeRoot) {
|
|
54223
|
+
const cached3 = packsByRoot.get(runtimeRoot);
|
|
54224
|
+
if (cached3 !== void 0) return cached3;
|
|
54225
|
+
const file = import_node_path102.default.join(runtimeRoot, RUNTIME_PACKS_FILE);
|
|
54226
|
+
if (!import_node_fs103.default.existsSync(file)) {
|
|
54227
|
+
packsByRoot.set(runtimeRoot, null);
|
|
54228
|
+
return null;
|
|
54229
|
+
}
|
|
54230
|
+
const parsed = JSON.parse(import_node_fs103.default.readFileSync(file, "utf8"));
|
|
54231
|
+
const packs = {};
|
|
54232
|
+
if (typeof parsed !== "object" || parsed === null)
|
|
54233
|
+
throw new Error(`${file} is not an object`);
|
|
54234
|
+
for (const [prefix, entry] of Object.entries(parsed)) {
|
|
54235
|
+
if (typeof entry?.file !== "string" || typeof entry?.sha256 !== "string")
|
|
54236
|
+
throw new Error(`${file} entry ${prefix} lacks file and sha256`);
|
|
54237
|
+
const files2 = entry.files;
|
|
54238
|
+
if (files2 !== void 0 && !(Array.isArray(files2) && files2.every((f) => typeof f === "string")))
|
|
54239
|
+
throw new Error(`${file} entry ${prefix} has files that are not paths`);
|
|
54240
|
+
packs[prefix] = {
|
|
54241
|
+
file: entry.file,
|
|
54242
|
+
sha256: entry.sha256,
|
|
54243
|
+
...files2 ? { files: files2 } : {}
|
|
54244
|
+
};
|
|
54245
|
+
}
|
|
54246
|
+
packsByRoot.set(runtimeRoot, packs);
|
|
54247
|
+
return packs;
|
|
54248
|
+
}
|
|
54249
|
+
async function ensureRuntimePackFor(runtimeRoot, pathname) {
|
|
54250
|
+
warmRuntimePacks(runtimeRoot);
|
|
54251
|
+
const prefix = RUNTIME_PACK_PREFIXES.find(
|
|
54252
|
+
(candidate) => pathname.includes(`/${candidate}`)
|
|
54253
|
+
);
|
|
54254
|
+
if (prefix) {
|
|
54255
|
+
await installNamedPack(runtimeRoot, prefix);
|
|
54256
|
+
return;
|
|
54257
|
+
}
|
|
54258
|
+
const listed = listedFiles(runtimeRoot).get(import_node_path102.default.posix.basename(pathname))?.find(({ file }) => pathname.endsWith(`/${file}`));
|
|
54259
|
+
if (listed) {
|
|
54260
|
+
if (!import_node_fs103.default.existsSync(import_node_path102.default.join(runtimeRoot, listed.file)))
|
|
54261
|
+
await installNamedPack(runtimeRoot, listed.pack);
|
|
54262
|
+
return;
|
|
54263
|
+
}
|
|
54264
|
+
const at = pathname.indexOf(`/${RUNTIME_MERGE_PACK_DIR}`);
|
|
54265
|
+
if (at === -1) return;
|
|
54266
|
+
const tenantDir = import_node_path102.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
54267
|
+
const rel = pathname.slice(at + RUNTIME_MERGE_PACK_DIR.length + 1);
|
|
54268
|
+
if (!/\.m?js$/.test(rel) || import_node_fs103.default.existsSync(import_node_path102.default.join(tenantDir, rel))) return;
|
|
54269
|
+
await installNamedPack(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
54270
|
+
}
|
|
54271
|
+
function installNamedPack(runtimeRoot, name3) {
|
|
54272
|
+
if (name3 === RUNTIME_MERGE_PACK_DIR) {
|
|
54273
|
+
const tenantDir = import_node_path102.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
54274
|
+
return mergePack(
|
|
54275
|
+
runtimeRoot,
|
|
54276
|
+
name3,
|
|
54277
|
+
import_node_path102.default.join(tenantDir, RUNTIME_MERGE_PACK_INSTALL),
|
|
54278
|
+
tenantDir
|
|
54279
|
+
);
|
|
54280
|
+
}
|
|
54281
|
+
if (readPacks(runtimeRoot)?.[name3]?.files)
|
|
54282
|
+
return mergePack(
|
|
54283
|
+
runtimeRoot,
|
|
54284
|
+
name3,
|
|
54285
|
+
import_node_path102.default.join(runtimeRoot, `.pack-${name3}`),
|
|
54286
|
+
runtimeRoot
|
|
54287
|
+
);
|
|
54288
|
+
return installPack(runtimeRoot, name3, import_node_path102.default.join(runtimeRoot, name3.slice(0, -1)));
|
|
54289
|
+
}
|
|
54290
|
+
function warmRuntimePacks(runtimeRoot) {
|
|
54291
|
+
if (warming.has(runtimeRoot)) return;
|
|
54292
|
+
warming.add(runtimeRoot);
|
|
54293
|
+
const warm = async () => {
|
|
54294
|
+
for (const name3 of Object.keys(readPacks(runtimeRoot) ?? {}))
|
|
54295
|
+
if (!await installNamedPack(runtimeRoot, name3)) return;
|
|
54296
|
+
};
|
|
54297
|
+
const schedule = import_node_timers2.setTimeout;
|
|
54298
|
+
schedule(() => void warm(), WARM_DELAY_MS).unref();
|
|
54299
|
+
}
|
|
54300
|
+
async function mergePack(runtimeRoot, name3, installDir, targetDir) {
|
|
54301
|
+
if (import_node_fs103.default.existsSync(import_node_path102.default.join(installDir, RUNTIME_MERGE_PACK_MERGED))) return true;
|
|
54302
|
+
if (!await installPack(runtimeRoot, name3, installDir)) return false;
|
|
54303
|
+
const link = (sub) => {
|
|
54304
|
+
for (const entry of import_node_fs103.default.readdirSync(import_node_path102.default.join(installDir, sub), {
|
|
54305
|
+
withFileTypes: true
|
|
54306
|
+
})) {
|
|
54307
|
+
const child = import_node_path102.default.join(sub, entry.name);
|
|
54308
|
+
if (entry.isDirectory()) {
|
|
54309
|
+
import_node_fs103.default.mkdirSync(import_node_path102.default.join(targetDir, child), { recursive: true });
|
|
54310
|
+
link(child);
|
|
54311
|
+
} else if (entry.name !== RUNTIME_PACK_MARKER) {
|
|
54312
|
+
try {
|
|
54313
|
+
import_node_fs103.default.linkSync(import_node_path102.default.join(installDir, child), import_node_path102.default.join(targetDir, child));
|
|
54314
|
+
} catch (error) {
|
|
54315
|
+
if (!(error instanceof Error && "code" in error && error.code === "EEXIST"))
|
|
54316
|
+
throw error;
|
|
54317
|
+
}
|
|
54318
|
+
}
|
|
54319
|
+
}
|
|
54320
|
+
};
|
|
54321
|
+
try {
|
|
54322
|
+
link("");
|
|
54323
|
+
import_node_fs103.default.writeFileSync(import_node_path102.default.join(installDir, RUNTIME_MERGE_PACK_MERGED), "");
|
|
54324
|
+
return true;
|
|
54325
|
+
} catch (error) {
|
|
54326
|
+
console.error(
|
|
54327
|
+
`[peach] ${name3} pack merge failed: ${error instanceof Error ? error.message : String(error)}`
|
|
54328
|
+
);
|
|
54329
|
+
return false;
|
|
54330
|
+
}
|
|
54331
|
+
}
|
|
54332
|
+
async function installPack(runtimeRoot, prefix, destDir) {
|
|
54333
|
+
const marker = import_node_path102.default.join(destDir, RUNTIME_PACK_MARKER);
|
|
54334
|
+
if (import_node_fs103.default.existsSync(marker)) return true;
|
|
54335
|
+
const pack = readPacks(runtimeRoot)?.[prefix];
|
|
54336
|
+
if (!pack) return true;
|
|
54337
|
+
let install = inflight.get(destDir);
|
|
54338
|
+
if (!install) {
|
|
54339
|
+
const version2 = import_node_path102.default.basename(runtimeRoot);
|
|
54340
|
+
const url = new URL(pack.file, rnxRuntime.tarballUrl(version2));
|
|
54341
|
+
url.searchParams.set("sha256", pack.sha256);
|
|
54342
|
+
install = installVerifiedTarball({
|
|
54343
|
+
url: url.toString(),
|
|
54344
|
+
digest: { algorithm: "sha256", encoding: "hex", value: pack.sha256 },
|
|
54345
|
+
destDir,
|
|
54346
|
+
installedMarker: RUNTIME_PACK_MARKER,
|
|
54347
|
+
label: `peach runtime ${version2} pack ${prefix}`
|
|
54348
|
+
}).catch((error) => {
|
|
54349
|
+
console.error(
|
|
54350
|
+
`[peach] ${prefix} pack download failed: ${error instanceof Error ? error.message : String(error)}`
|
|
54351
|
+
);
|
|
54352
|
+
}).finally(() => inflight.delete(destDir));
|
|
54353
|
+
inflight.set(destDir, install);
|
|
54354
|
+
}
|
|
54355
|
+
await install;
|
|
54356
|
+
return import_node_fs103.default.existsSync(marker);
|
|
54357
|
+
}
|
|
54358
|
+
var import_node_fs103, import_node_path102, import_node_timers2, inflight, packsByRoot, listedByRoot, WARM_DELAY_MS, warming;
|
|
54359
|
+
var init_runtime_packs = __esm({
|
|
54360
|
+
"src/runtime-packs.ts"() {
|
|
54361
|
+
"use strict";
|
|
54362
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
54363
|
+
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
54364
|
+
import_node_path102 = __toESM(require("node:path"), 1);
|
|
54365
|
+
import_node_timers2 = require("node:timers");
|
|
54366
|
+
init_src();
|
|
54367
|
+
init_runtime_delivery();
|
|
54368
|
+
inflight = /* @__PURE__ */ new Map();
|
|
54369
|
+
packsByRoot = /* @__PURE__ */ new Map();
|
|
54370
|
+
listedByRoot = /* @__PURE__ */ new Map();
|
|
54371
|
+
WARM_DELAY_MS = 3e4;
|
|
54372
|
+
warming = /* @__PURE__ */ new Set();
|
|
54373
|
+
}
|
|
54374
|
+
});
|
|
54375
|
+
|
|
54376
|
+
// src/runtime-delivery.ts
|
|
54377
|
+
var DEFAULT_RUNTIME_CDN_ORIGIN, RNX_CHANGELOG_URL, RNX_CHANGELOG_API_URL, RNX_RUNTIME_PRODUCT, rnxRuntime;
|
|
54378
|
+
var init_runtime_delivery = __esm({
|
|
54379
|
+
"src/runtime-delivery.ts"() {
|
|
54380
|
+
"use strict";
|
|
54381
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
54382
|
+
init_src();
|
|
54383
|
+
init_cli_runtime();
|
|
54384
|
+
init_home_paths();
|
|
54385
|
+
init_public_brand();
|
|
54386
|
+
DEFAULT_RUNTIME_CDN_ORIGIN = peachPublicBrand.origin;
|
|
54387
|
+
RNX_CHANGELOG_URL = `${peachPublicBrand.origin}/changelog`;
|
|
54388
|
+
RNX_CHANGELOG_API_URL = `${peachPublicBrand.origin}/api/changelog/sootsim`;
|
|
54389
|
+
RNX_RUNTIME_PRODUCT = {
|
|
54390
|
+
id: "peach",
|
|
54391
|
+
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
54392
|
+
manifestPath: "/runtimes/manifest.json",
|
|
54393
|
+
tarballPath: (version2) => `/runtimes/sootsim-runtime-${version2}.tar.zst`,
|
|
54394
|
+
// the engine runtime is a static SPA: shell at the root, engine/ and
|
|
54395
|
+
// engine-tenant/ beneath it. index.html is what the daemon and the
|
|
54396
|
+
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
54397
|
+
installedMarker: "index.html",
|
|
54398
|
+
verifyInstall: ensureCliCompanion,
|
|
54399
|
+
// canvaskit's ganesh backend is a runtime pack because a browser with WebGPU
|
|
54400
|
+
// never runs it, but linux and CI browsers usually have no GPU and always do
|
|
54401
|
+
afterInstall: async (dir) => {
|
|
54402
|
+
if (process.platform !== "linux" && !process.env.CI) return;
|
|
54403
|
+
const { ensureRuntimePackFor: ensureRuntimePackFor2 } = await Promise.resolve().then(() => (init_runtime_packs(), runtime_packs_exports));
|
|
54404
|
+
await ensureRuntimePackFor2(dir, "/engine/canvaskit-ganesh.wasm");
|
|
54405
|
+
},
|
|
54406
|
+
env: {
|
|
54407
|
+
cdnOrigin: "PEACH_CDN_ORIGIN",
|
|
54408
|
+
channel: "PEACH_RUNTIME_CHANNEL"
|
|
54409
|
+
},
|
|
54410
|
+
ensureHome: ensureRnxHome,
|
|
54411
|
+
configFile: configFilePath,
|
|
54412
|
+
runtimesDir,
|
|
54413
|
+
runtimeDir,
|
|
54414
|
+
cacheDir,
|
|
54415
|
+
readActiveRuntime,
|
|
54416
|
+
writeActiveRuntime
|
|
54417
|
+
};
|
|
54418
|
+
rnxRuntime = createRuntimeDelivery(RNX_RUNTIME_PRODUCT);
|
|
54419
|
+
}
|
|
54420
|
+
});
|
|
54421
|
+
|
|
54112
54422
|
// src/node-http-fetch.ts
|
|
54113
54423
|
var node_http_fetch_exports = {};
|
|
54114
54424
|
__export(node_http_fetch_exports, {
|
|
@@ -61785,7 +62095,7 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
|
|
|
61785
62095
|
listed.stdout.split("\0").filter(Boolean).map((entry) => entry.replace(/\/$/, ""))
|
|
61786
62096
|
);
|
|
61787
62097
|
const ignoreFiles = /* @__PURE__ */ new Map();
|
|
61788
|
-
return (relative4) => {
|
|
62098
|
+
return (relative4, knownDirectory) => {
|
|
61789
62099
|
const parts = relative4.split(import_node_path18.default.sep);
|
|
61790
62100
|
const linked = linkedPackages.some(
|
|
61791
62101
|
(directory2) => relative4.startsWith(directory2 + import_node_path18.default.sep)
|
|
@@ -61797,16 +62107,16 @@ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
|
|
|
61797
62107
|
}
|
|
61798
62108
|
if (portable && relative4) {
|
|
61799
62109
|
let excluded = false;
|
|
61800
|
-
const isDirectory3 = import_node_fs21.default.lstatSync(import_node_path18.default.join(root, relative4)).isDirectory();
|
|
62110
|
+
const isDirectory3 = knownDirectory ?? import_node_fs21.default.lstatSync(import_node_path18.default.join(root, relative4)).isDirectory();
|
|
61801
62111
|
for (let index = 0; index < parts.length; index++) {
|
|
61802
62112
|
const directory2 = parts.slice(0, index).join(import_node_path18.default.sep);
|
|
61803
62113
|
let rules2 = ignoreFiles.get(directory2);
|
|
61804
|
-
if (
|
|
61805
|
-
rules2 = (0, import_ignore.default)();
|
|
62114
|
+
if (rules2 === void 0) {
|
|
61806
62115
|
const file = import_node_path18.default.join(root, directory2, ".gitignore");
|
|
61807
|
-
|
|
62116
|
+
rules2 = import_node_fs21.default.existsSync(file) ? (0, import_ignore.default)().add(import_node_fs21.default.readFileSync(file, "utf8")) : null;
|
|
61808
62117
|
ignoreFiles.set(directory2, rules2);
|
|
61809
62118
|
}
|
|
62119
|
+
if (!rules2) continue;
|
|
61810
62120
|
const item = parts.slice(index).join("/");
|
|
61811
62121
|
const result = rules2.test(isDirectory3 ? `${item}/` : item);
|
|
61812
62122
|
if (result.ignored) excluded = true;
|
|
@@ -62398,7 +62708,7 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
|
|
|
62398
62708
|
signal?.throwIfAborted();
|
|
62399
62709
|
const file = import_node_path62.default.join(directory2, entry.name);
|
|
62400
62710
|
const relative4 = import_node_path62.default.relative(root, file);
|
|
62401
|
-
if (excluded(relative4)) continue;
|
|
62711
|
+
if (excluded(relative4, entry.isDirectory())) continue;
|
|
62402
62712
|
hash.update(`${relative4}\0`);
|
|
62403
62713
|
if (entry.isSymbolicLink()) {
|
|
62404
62714
|
const link = `link\0${await import_node_fs63.default.promises.readlink(file)}\0`;
|
|
@@ -62526,8 +62836,10 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
|
|
|
62526
62836
|
if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
|
|
62527
62837
|
return;
|
|
62528
62838
|
import_node_fs63.default.mkdirSync(import_node_path62.default.dirname(target), { recursive: true });
|
|
62529
|
-
|
|
62530
|
-
import_node_fs63.default.
|
|
62839
|
+
const staged = `${target}.${process.pid}.peach-sync`;
|
|
62840
|
+
import_node_fs63.default.copyFileSync(file, staged);
|
|
62841
|
+
import_node_fs63.default.utimesSync(staged, source.atime, source.mtime);
|
|
62842
|
+
import_node_fs63.default.renameSync(staged, target);
|
|
62531
62843
|
};
|
|
62532
62844
|
const walkInstalled = (directory2) => {
|
|
62533
62845
|
for (const entry of import_node_fs63.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
@@ -62545,7 +62857,7 @@ function syncChangedFiles(root, work, appRelative, excluded, installed) {
|
|
|
62545
62857
|
walkInstalled(file);
|
|
62546
62858
|
continue;
|
|
62547
62859
|
}
|
|
62548
|
-
if (excluded(relative4) || entry.isSymbolicLink() || !sourceIos && relative4 === import_node_path62.default.join(appRelative, "ios"))
|
|
62860
|
+
if (excluded(relative4, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative4 === import_node_path62.default.join(appRelative, "ios"))
|
|
62549
62861
|
continue;
|
|
62550
62862
|
if (entry.isDirectory()) walk3(file);
|
|
62551
62863
|
else if (entry.isFile()) {
|
|
@@ -63435,7 +63747,7 @@ init_swift_native_pin();
|
|
|
63435
63747
|
init_xcode_project();
|
|
63436
63748
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
63437
63749
|
function expoNativeCompilerDigestValue() {
|
|
63438
|
-
return true ? "
|
|
63750
|
+
return true ? "db679f96e034ef5a3e217e2553ec748fa11d5dd68cd9247dd7bcae61a03d42a1" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
63439
63751
|
}
|
|
63440
63752
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
63441
63753
|
function readSources(value) {
|
|
@@ -68286,199 +68598,8 @@ var handleOneSDKRequest = compiledModuleRequestHandler(
|
|
|
68286
68598
|
init_process_liveness();
|
|
68287
68599
|
init_public_brand();
|
|
68288
68600
|
init_runtime_assets();
|
|
68289
|
-
|
|
68290
|
-
|
|
68291
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
68292
|
-
init_src();
|
|
68293
|
-
init_cli_runtime();
|
|
68294
|
-
init_home_paths();
|
|
68295
|
-
init_public_brand();
|
|
68296
|
-
var DEFAULT_RUNTIME_CDN_ORIGIN = peachPublicBrand.origin;
|
|
68297
|
-
var RNX_CHANGELOG_URL = `${peachPublicBrand.origin}/changelog`;
|
|
68298
|
-
var RNX_CHANGELOG_API_URL = `${peachPublicBrand.origin}/api/changelog/sootsim`;
|
|
68299
|
-
var RNX_RUNTIME_PRODUCT = {
|
|
68300
|
-
id: "peach",
|
|
68301
|
-
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
68302
|
-
manifestPath: "/runtimes/manifest.json",
|
|
68303
|
-
tarballPath: (version2) => `/runtimes/sootsim-runtime-${version2}.tar.zst`,
|
|
68304
|
-
// the engine runtime is a static SPA: shell at the root, engine/ and
|
|
68305
|
-
// engine-tenant/ beneath it. index.html is what the daemon and the
|
|
68306
|
-
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
68307
|
-
installedMarker: "index.html",
|
|
68308
|
-
verifyInstall: ensureCliCompanion,
|
|
68309
|
-
env: {
|
|
68310
|
-
cdnOrigin: "PEACH_CDN_ORIGIN",
|
|
68311
|
-
channel: "PEACH_RUNTIME_CHANNEL"
|
|
68312
|
-
},
|
|
68313
|
-
ensureHome: ensureRnxHome,
|
|
68314
|
-
configFile: configFilePath,
|
|
68315
|
-
runtimesDir,
|
|
68316
|
-
runtimeDir,
|
|
68317
|
-
cacheDir,
|
|
68318
|
-
readActiveRuntime,
|
|
68319
|
-
writeActiveRuntime
|
|
68320
|
-
};
|
|
68321
|
-
var rnxRuntime = createRuntimeDelivery(RNX_RUNTIME_PRODUCT);
|
|
68322
|
-
|
|
68323
|
-
// src/runtime-packs.ts
|
|
68324
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
68325
|
-
var import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
68326
|
-
var import_node_path102 = __toESM(require("node:path"), 1);
|
|
68327
|
-
var import_node_timers2 = require("node:timers");
|
|
68328
|
-
init_src();
|
|
68329
|
-
var inflight = /* @__PURE__ */ new Map();
|
|
68330
|
-
var packsByRoot = /* @__PURE__ */ new Map();
|
|
68331
|
-
var listedByRoot = /* @__PURE__ */ new Map();
|
|
68332
|
-
function listedFiles(runtimeRoot) {
|
|
68333
|
-
let listed = listedByRoot.get(runtimeRoot);
|
|
68334
|
-
if (listed) return listed;
|
|
68335
|
-
listed = /* @__PURE__ */ new Map();
|
|
68336
|
-
for (const [pack, entry] of Object.entries(readPacks(runtimeRoot) ?? {}))
|
|
68337
|
-
for (const file of entry.files ?? []) {
|
|
68338
|
-
const name3 = import_node_path102.default.posix.basename(file);
|
|
68339
|
-
listed.set(name3, [...listed.get(name3) ?? [], { file, pack }]);
|
|
68340
|
-
}
|
|
68341
|
-
listedByRoot.set(runtimeRoot, listed);
|
|
68342
|
-
return listed;
|
|
68343
|
-
}
|
|
68344
|
-
function readPacks(runtimeRoot) {
|
|
68345
|
-
const cached3 = packsByRoot.get(runtimeRoot);
|
|
68346
|
-
if (cached3 !== void 0) return cached3;
|
|
68347
|
-
const file = import_node_path102.default.join(runtimeRoot, RUNTIME_PACKS_FILE);
|
|
68348
|
-
if (!import_node_fs103.default.existsSync(file)) {
|
|
68349
|
-
packsByRoot.set(runtimeRoot, null);
|
|
68350
|
-
return null;
|
|
68351
|
-
}
|
|
68352
|
-
const parsed = JSON.parse(import_node_fs103.default.readFileSync(file, "utf8"));
|
|
68353
|
-
const packs = {};
|
|
68354
|
-
if (typeof parsed !== "object" || parsed === null)
|
|
68355
|
-
throw new Error(`${file} is not an object`);
|
|
68356
|
-
for (const [prefix, entry] of Object.entries(parsed)) {
|
|
68357
|
-
if (typeof entry?.file !== "string" || typeof entry?.sha256 !== "string")
|
|
68358
|
-
throw new Error(`${file} entry ${prefix} lacks file and sha256`);
|
|
68359
|
-
const files2 = entry.files;
|
|
68360
|
-
if (files2 !== void 0 && !(Array.isArray(files2) && files2.every((f) => typeof f === "string")))
|
|
68361
|
-
throw new Error(`${file} entry ${prefix} has files that are not paths`);
|
|
68362
|
-
packs[prefix] = {
|
|
68363
|
-
file: entry.file,
|
|
68364
|
-
sha256: entry.sha256,
|
|
68365
|
-
...files2 ? { files: files2 } : {}
|
|
68366
|
-
};
|
|
68367
|
-
}
|
|
68368
|
-
packsByRoot.set(runtimeRoot, packs);
|
|
68369
|
-
return packs;
|
|
68370
|
-
}
|
|
68371
|
-
async function ensureRuntimePackFor(runtimeRoot, pathname) {
|
|
68372
|
-
warmRuntimePacks(runtimeRoot);
|
|
68373
|
-
const prefix = RUNTIME_PACK_PREFIXES.find(
|
|
68374
|
-
(candidate) => pathname.includes(`/${candidate}`)
|
|
68375
|
-
);
|
|
68376
|
-
if (prefix) {
|
|
68377
|
-
await installNamedPack(runtimeRoot, prefix);
|
|
68378
|
-
return;
|
|
68379
|
-
}
|
|
68380
|
-
const listed = listedFiles(runtimeRoot).get(import_node_path102.default.posix.basename(pathname))?.find(({ file }) => pathname.endsWith(`/${file}`));
|
|
68381
|
-
if (listed) {
|
|
68382
|
-
if (!import_node_fs103.default.existsSync(import_node_path102.default.join(runtimeRoot, listed.file)))
|
|
68383
|
-
await installNamedPack(runtimeRoot, listed.pack);
|
|
68384
|
-
return;
|
|
68385
|
-
}
|
|
68386
|
-
const at = pathname.indexOf(`/${RUNTIME_MERGE_PACK_DIR}`);
|
|
68387
|
-
if (at === -1) return;
|
|
68388
|
-
const tenantDir = import_node_path102.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
68389
|
-
const rel = pathname.slice(at + RUNTIME_MERGE_PACK_DIR.length + 1);
|
|
68390
|
-
if (!/\.m?js$/.test(rel) || import_node_fs103.default.existsSync(import_node_path102.default.join(tenantDir, rel))) return;
|
|
68391
|
-
await installNamedPack(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
68392
|
-
}
|
|
68393
|
-
function installNamedPack(runtimeRoot, name3) {
|
|
68394
|
-
if (name3 === RUNTIME_MERGE_PACK_DIR) {
|
|
68395
|
-
const tenantDir = import_node_path102.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
68396
|
-
return mergePack(
|
|
68397
|
-
runtimeRoot,
|
|
68398
|
-
name3,
|
|
68399
|
-
import_node_path102.default.join(tenantDir, RUNTIME_MERGE_PACK_INSTALL),
|
|
68400
|
-
tenantDir
|
|
68401
|
-
);
|
|
68402
|
-
}
|
|
68403
|
-
if (readPacks(runtimeRoot)?.[name3]?.files)
|
|
68404
|
-
return mergePack(
|
|
68405
|
-
runtimeRoot,
|
|
68406
|
-
name3,
|
|
68407
|
-
import_node_path102.default.join(runtimeRoot, `.pack-${name3}`),
|
|
68408
|
-
runtimeRoot
|
|
68409
|
-
);
|
|
68410
|
-
return installPack(runtimeRoot, name3, import_node_path102.default.join(runtimeRoot, name3.slice(0, -1)));
|
|
68411
|
-
}
|
|
68412
|
-
var WARM_DELAY_MS = 3e4;
|
|
68413
|
-
var warming = /* @__PURE__ */ new Set();
|
|
68414
|
-
function warmRuntimePacks(runtimeRoot) {
|
|
68415
|
-
if (warming.has(runtimeRoot)) return;
|
|
68416
|
-
warming.add(runtimeRoot);
|
|
68417
|
-
const warm = async () => {
|
|
68418
|
-
for (const name3 of Object.keys(readPacks(runtimeRoot) ?? {}))
|
|
68419
|
-
if (!await installNamedPack(runtimeRoot, name3)) return;
|
|
68420
|
-
};
|
|
68421
|
-
const schedule = import_node_timers2.setTimeout;
|
|
68422
|
-
schedule(() => void warm(), WARM_DELAY_MS).unref();
|
|
68423
|
-
}
|
|
68424
|
-
async function mergePack(runtimeRoot, name3, installDir, targetDir) {
|
|
68425
|
-
if (import_node_fs103.default.existsSync(import_node_path102.default.join(installDir, RUNTIME_MERGE_PACK_MERGED))) return true;
|
|
68426
|
-
if (!await installPack(runtimeRoot, name3, installDir)) return false;
|
|
68427
|
-
const link = (sub) => {
|
|
68428
|
-
for (const entry of import_node_fs103.default.readdirSync(import_node_path102.default.join(installDir, sub), {
|
|
68429
|
-
withFileTypes: true
|
|
68430
|
-
})) {
|
|
68431
|
-
const child = import_node_path102.default.join(sub, entry.name);
|
|
68432
|
-
if (entry.isDirectory()) {
|
|
68433
|
-
import_node_fs103.default.mkdirSync(import_node_path102.default.join(targetDir, child), { recursive: true });
|
|
68434
|
-
link(child);
|
|
68435
|
-
} else if (entry.name !== RUNTIME_PACK_MARKER) {
|
|
68436
|
-
try {
|
|
68437
|
-
import_node_fs103.default.linkSync(import_node_path102.default.join(installDir, child), import_node_path102.default.join(targetDir, child));
|
|
68438
|
-
} catch (error) {
|
|
68439
|
-
if (!(error instanceof Error && "code" in error && error.code === "EEXIST"))
|
|
68440
|
-
throw error;
|
|
68441
|
-
}
|
|
68442
|
-
}
|
|
68443
|
-
}
|
|
68444
|
-
};
|
|
68445
|
-
try {
|
|
68446
|
-
link("");
|
|
68447
|
-
import_node_fs103.default.writeFileSync(import_node_path102.default.join(installDir, RUNTIME_MERGE_PACK_MERGED), "");
|
|
68448
|
-
return true;
|
|
68449
|
-
} catch (error) {
|
|
68450
|
-
console.error(
|
|
68451
|
-
`[peach] ${name3} pack merge failed: ${error instanceof Error ? error.message : String(error)}`
|
|
68452
|
-
);
|
|
68453
|
-
return false;
|
|
68454
|
-
}
|
|
68455
|
-
}
|
|
68456
|
-
async function installPack(runtimeRoot, prefix, destDir) {
|
|
68457
|
-
const marker = import_node_path102.default.join(destDir, RUNTIME_PACK_MARKER);
|
|
68458
|
-
if (import_node_fs103.default.existsSync(marker)) return true;
|
|
68459
|
-
const pack = readPacks(runtimeRoot)?.[prefix];
|
|
68460
|
-
if (!pack) return true;
|
|
68461
|
-
let install = inflight.get(destDir);
|
|
68462
|
-
if (!install) {
|
|
68463
|
-
const version2 = import_node_path102.default.basename(runtimeRoot);
|
|
68464
|
-
const url = new URL(pack.file, rnxRuntime.tarballUrl(version2));
|
|
68465
|
-
url.searchParams.set("sha256", pack.sha256);
|
|
68466
|
-
install = installVerifiedTarball({
|
|
68467
|
-
url: url.toString(),
|
|
68468
|
-
digest: { algorithm: "sha256", encoding: "hex", value: pack.sha256 },
|
|
68469
|
-
destDir,
|
|
68470
|
-
installedMarker: RUNTIME_PACK_MARKER,
|
|
68471
|
-
label: `peach runtime ${version2} pack ${prefix}`
|
|
68472
|
-
}).catch((error) => {
|
|
68473
|
-
console.error(
|
|
68474
|
-
`[peach] ${prefix} pack download failed: ${error instanceof Error ? error.message : String(error)}`
|
|
68475
|
-
);
|
|
68476
|
-
}).finally(() => inflight.delete(destDir));
|
|
68477
|
-
inflight.set(destDir, install);
|
|
68478
|
-
}
|
|
68479
|
-
await install;
|
|
68480
|
-
return import_node_fs103.default.existsSync(marker);
|
|
68481
|
-
}
|
|
68601
|
+
init_runtime_delivery();
|
|
68602
|
+
init_runtime_packs();
|
|
68482
68603
|
|
|
68483
68604
|
// src/turbo-bundle.ts
|
|
68484
68605
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|