peachsim 0.1.2017 → 0.1.2019
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/telemetry.ts +19 -0
- 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 +379 -102
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +373 -96
- 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 +378 -101
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +74 -15
- 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 +74 -15
- package/dist-lib/native-app-identity-project.cjs +72 -13
- package/dist-lib/native-app-identity-project.mjs +72 -12
- package/dist-lib/native-app-identity.cjs +5 -2
- package/dist-lib/native-app-identity.mjs +5 -2
- 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 +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- 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 +380 -103
- package/dist-lib/swift-compile.cjs +101 -66
- package/dist-lib/swift-compile.mjs +100 -65
- 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 +26 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +372 -95
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/components/native-ui/context-menu-types.d.ts +84 -0
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/rn-spring.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/native-menu-gesture.d.ts +6 -0
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h +10 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +16 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +7 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +3 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSSortDescriptor.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLConnection.h +1 -1
- package/sdk/ios/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFAuthenticationSession.h +17 -0
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SafariServices.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInputViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPageViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPointerStyle.h +1 -6
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +6 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSession.h +1 -1
- package/sdk/ios/usr/include/objc/NSObject.h +1 -1
- package/sdk/ios/wasm/include/stdlib.h +1 -0
- package/src/nitro-adapter.lock.json +274 -274
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +70 -81
- package/src/swift-distribution.lock.json +14 -12
- package/src/swift-guest-image-ledger.ts +15 -10
- package/src/swift-guest-source-inputs.ts +6 -3
- package/src/swift-guest-source-plan.ts +5 -1
- package/src/swift-objc-compile.ts +2 -2
- package/src/swift-objc-standin.ts +197 -5
- package/src/swift-packages.ts +13 -12
- package/src/swift-shared-sdk.ts +2 -1
- package/src/swift-standin-emit.ts +43 -5
- package/src/swift-standins.ts +41 -2
- package/src/swift-toolchain.ts +24 -0
- package/src/turbo-runtime.lock.json +23 -23
- package/src/xcode-project.ts +55 -1
- package/src/xcode-target-members.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2019 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -2624,6 +2624,24 @@ function swiftSdkOptions() {
|
|
|
2624
2624
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2625
2625
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2626
2626
|
var compilerArchives = {
|
|
2627
|
+
"swift-6.4.0-RELEASE-custom-11345d60dca47496": {
|
|
2628
|
+
identity: "11345d60dca47496",
|
|
2629
|
+
archive: "tar.zst",
|
|
2630
|
+
hosts: {
|
|
2631
|
+
"darwin-arm64": {
|
|
2632
|
+
checksum: "3df74a95c6f3ffa45aaa412027b390c99f9af81f6f6a41bf6d58a1a3079b5b02",
|
|
2633
|
+
manifest: "8e5ed4be6adc967e4c7d955eff004c96d5dc050a589d50e1b3e694b70f9afd63"
|
|
2634
|
+
},
|
|
2635
|
+
"linux-x64": {
|
|
2636
|
+
checksum: "a80e46add069932114bacc18640dc2e6a1a8f2a3ea7306a8ea8614d5cdf6e0e7",
|
|
2637
|
+
manifest: "662d8869534f3cce827b1205973db1f9a1e1d92027005a5bdb6893f9c2a0b39d"
|
|
2638
|
+
},
|
|
2639
|
+
"linux-arm64": {
|
|
2640
|
+
checksum: "4ca69bbc284fc7d54be57c80b744b88cce997d470ff23048795db54e7a6fbcba",
|
|
2641
|
+
manifest: "85df84da2f814b6a71c264b37b83a81965ac33b5d2b465443d60c08cc7bc5dc3"
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
},
|
|
2627
2645
|
"swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
|
|
2628
2646
|
identity: "45bb46301c86fe73",
|
|
2629
2647
|
archive: "tar.gz",
|
|
@@ -2828,7 +2846,12 @@ function privateSwiftDistributionRoot() {
|
|
|
2828
2846
|
const root = process.env[SWIFT_PRIVATE_DISTRIBUTION_ENV]?.trim();
|
|
2829
2847
|
return root ? path4.resolve(root) : null;
|
|
2830
2848
|
}
|
|
2849
|
+
function privateSwiftCompilerRelease() {
|
|
2850
|
+
return process.env.PEACH_SWIFT_PRIVATE_COMPILER_RELEASE?.trim() || null;
|
|
2851
|
+
}
|
|
2831
2852
|
function privateSwiftRelease() {
|
|
2853
|
+
const compiler = privateSwiftCompilerRelease();
|
|
2854
|
+
if (compiler) return compiler;
|
|
2832
2855
|
const root = privateSwiftDistributionRoot();
|
|
2833
2856
|
if (!root) return null;
|
|
2834
2857
|
const manifest = JSON.parse(
|
|
@@ -4064,7 +4087,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4064
4087
|
const overlay = path8.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
|
|
4065
4088
|
const overlayFiles = readdirSync4(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path8.join(entry.parentPath, entry.name)).sort();
|
|
4066
4089
|
const key = JSON.stringify([
|
|
4067
|
-
"
|
|
4090
|
+
"v22",
|
|
4068
4091
|
toolchainBin,
|
|
4069
4092
|
sdk,
|
|
4070
4093
|
frameworks,
|
|
@@ -4120,6 +4143,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4120
4143
|
[path8.join(sysroot, "darwin/System/Library/Frameworks"), frameworks],
|
|
4121
4144
|
...[
|
|
4122
4145
|
"MacTypes.h",
|
|
4146
|
+
"objc/NSObject.h",
|
|
4123
4147
|
"net/if.h",
|
|
4124
4148
|
"notify.h",
|
|
4125
4149
|
"notify.modulemap",
|
|
@@ -6994,13 +7018,18 @@ function createGuestImageLedger(input) {
|
|
|
6994
7018
|
exported.set(definition.alias, definition);
|
|
6995
7019
|
}
|
|
6996
7020
|
const names = [...new Set([...exported.values()].map((definition) => definition.name))];
|
|
6997
|
-
const
|
|
6998
|
-
|
|
6999
|
-
names.
|
|
7021
|
+
const nameOffsets = /* @__PURE__ */ new Map();
|
|
7022
|
+
let nameSize = 0;
|
|
7023
|
+
const nameContents = names.map((name2) => {
|
|
7000
7024
|
const bytes = Buffer.concat([Buffer.from(name2), Buffer.from([0])]);
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7025
|
+
nameOffsets.set(name2, nameSize);
|
|
7026
|
+
nameSize += bytes.length;
|
|
7027
|
+
return [...bytes].map((byte) => `\\${byte.toString(16).padStart(2, "0")}`).join("");
|
|
7028
|
+
}).join("");
|
|
7029
|
+
const ir = [
|
|
7030
|
+
'target triple = "wasm32-unknown-wasip1"',
|
|
7031
|
+
`@.names = private constant [${nameSize} x i8] c"${nameContents}"`
|
|
7032
|
+
];
|
|
7004
7033
|
for (const definition of exported.values()) {
|
|
7005
7034
|
if (definition.kind === "function")
|
|
7006
7035
|
ir.push(
|
|
@@ -7011,7 +7040,7 @@ function createGuestImageLedger(input) {
|
|
|
7011
7040
|
ir.push(`@__peach_dyld_symbols = constant [${exported.size} x { ptr, i32, ptr }] [`);
|
|
7012
7041
|
ir.push(
|
|
7013
7042
|
[...exported.values()].map(
|
|
7014
|
-
(definition) => ` { ptr, i32, ptr } { ptr @.
|
|
7043
|
+
(definition) => ` { ptr, i32, ptr } { ptr getelementptr (i8, ptr @.names, i32 ${nameOffsets.get(definition.name)}), i32 ${definition.image}, ptr @${definition.alias} }`
|
|
7015
7044
|
).join(",\n")
|
|
7016
7045
|
);
|
|
7017
7046
|
ir.push("]", `@__peach_dyld_symbol_count = constant i32 ${exported.size}`);
|
|
@@ -7832,7 +7861,7 @@ function guestSourceImages(graph) {
|
|
|
7832
7861
|
const type = dependency.productType;
|
|
7833
7862
|
let dynamic;
|
|
7834
7863
|
if (type.startsWith("swiftpm.target.")) {
|
|
7835
|
-
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary")
|
|
7864
|
+
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
|
|
7836
7865
|
throw new Error(`unsupported SwiftPM target ${edge.target}`);
|
|
7837
7866
|
dynamic = false;
|
|
7838
7867
|
} else if (type.startsWith("swiftpm.library.")) {
|
|
@@ -9754,10 +9783,11 @@ function sourceGuestRuntimeLinks(options) {
|
|
|
9754
9783
|
const links = [];
|
|
9755
9784
|
const requests = [];
|
|
9756
9785
|
const optionGroups = [
|
|
9757
|
-
{ object: null, flags:
|
|
9758
|
-
|
|
9786
|
+
{ object: null, flags: image.linkerFlags, autoLinked: false },
|
|
9787
|
+
{ object: null, flags: autolink, autoLinked: true },
|
|
9788
|
+
...image.clangLinkOptions.map((options2) => ({ ...options2, autoLinked: true }))
|
|
9759
9789
|
];
|
|
9760
|
-
for (const { object: object3, flags } of optionGroups) {
|
|
9790
|
+
for (const { object: object3, flags, autoLinked } of optionGroups) {
|
|
9761
9791
|
for (let index = 0; index < flags.length; index++) {
|
|
9762
9792
|
const flag = flags[index];
|
|
9763
9793
|
const artifact = artifacts.get(flag);
|
|
@@ -9774,6 +9804,7 @@ function sourceGuestRuntimeLinks(options) {
|
|
|
9774
9804
|
if (flag === "-framework") {
|
|
9775
9805
|
const name3 = flags[++index];
|
|
9776
9806
|
const provider = name3 && frameworkAliases.get(name3);
|
|
9807
|
+
if (!provider && name3 && autoLinked) continue;
|
|
9777
9808
|
if (!provider)
|
|
9778
9809
|
throw new Error(
|
|
9779
9810
|
`source image ${image.id} has unresolved framework linkage ${name3}`
|
|
@@ -11561,13 +11592,14 @@ async function runCompiler(command, args, options, stream = false, quiet) {
|
|
|
11561
11592
|
var WASM_TRIPLE = "wasm32-unknown-wasip1";
|
|
11562
11593
|
var SWIFTPM_PROGRESS = /^\[\d+\/\d+\] /;
|
|
11563
11594
|
var SWIFTPM_NOISE = /^(?:\[\d+\/\d+\] |Building for production\.\.\.$|warning: '--build-system native' has been deprecated)/;
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
)
|
|
11570
|
-
|
|
11595
|
+
function swiftBuildJobs() {
|
|
11596
|
+
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
11597
|
+
return Math.min(
|
|
11598
|
+
4,
|
|
11599
|
+
Math.max(1, Math.floor(os6.availableParallelism() / 2)),
|
|
11600
|
+
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
11601
|
+
);
|
|
11602
|
+
}
|
|
11571
11603
|
var SWIFT_BUILDER_TRANSPORT_MARGIN_MS = 3e5;
|
|
11572
11604
|
var SWIFT_BUILDER_DEFAULT_COMPILE_MS = 18e5;
|
|
11573
11605
|
function swiftBuilderHopTimeoutMs(compileTimeoutMs) {
|
|
@@ -12355,9 +12387,9 @@ var executableLinkFlags = (root) => ` "-Xclang-linker", "-O0",
|
|
|
12355
12387
|
`;
|
|
12356
12388
|
var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quoted, "-Wl,--end-lib"] : [];
|
|
12357
12389
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12358
|
-
var MULTI_MANIFEST_VERSION =
|
|
12390
|
+
var MULTI_MANIFEST_VERSION = 68;
|
|
12359
12391
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12360
|
-
var compilerSourceDigest = true ? "
|
|
12392
|
+
var compilerSourceDigest = true ? "0be1de6e499585bfdd605805a7b9dbaa1f1e8d69f2a1a65d693d7952343a2edb" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12361
12393
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12362
12394
|
const hash = createHash13("sha256");
|
|
12363
12395
|
hash.update(`swift-compile
|
|
@@ -12499,7 +12531,23 @@ function emitSwiftPackageManifest(args) {
|
|
|
12499
12531
|
const distributionLink = args.distributionLink;
|
|
12500
12532
|
if (distribution && distributionLink) {
|
|
12501
12533
|
const isProvider = (object3) => object3.startsWith(`lib/${DARWIN_RECORDS_PREFIX}`);
|
|
12502
|
-
const
|
|
12534
|
+
const sourceModules = new Set(
|
|
12535
|
+
targets.filter(
|
|
12536
|
+
(target) => args.sourceSwiftTargets?.has(target.name) && !args.native?.get(target.name)?.clang
|
|
12537
|
+
).map((target) => swiftTargetModuleName(target.name))
|
|
12538
|
+
);
|
|
12539
|
+
const product = v5.parse(
|
|
12540
|
+
swiftFrameworkProductSchema,
|
|
12541
|
+
JSON.parse(
|
|
12542
|
+
readFileSync16(path27.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
12543
|
+
)
|
|
12544
|
+
);
|
|
12545
|
+
const replacedObjects = new Set(
|
|
12546
|
+
product.objects.filter((object3) => sourceModules.has(swiftTargetModuleName(object3.target))).map((object3) => object3.path)
|
|
12547
|
+
);
|
|
12548
|
+
const available = distribution.objects.filter(
|
|
12549
|
+
(object3) => !isProvider(object3) && !replacedObjects.has(object3)
|
|
12550
|
+
);
|
|
12503
12551
|
const objects = available.filter(
|
|
12504
12552
|
(object3) => !targets.some((target) => object3.startsWith(`lib/${target.name}-`)) && [...OPTIONAL_FRAMEWORKS, "SpriteKit", "PeachBox2D"].every(
|
|
12505
12553
|
(name2) => !object3.startsWith(`lib/${name2}-`) || reachedFrameworks.has(name2)
|
|
@@ -12814,14 +12862,6 @@ function syncSwiftTree(base, files) {
|
|
|
12814
12862
|
var DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
|
|
12815
12863
|
var OS_IOS = /\b(?:os\(\s*iOS\s*\)|targetEnvironment\(\s*simulator\s*\))/g;
|
|
12816
12864
|
var DELEGATE_CLASS = /^class\s+[A-Za-z_]\w*\s*(?:<[^>{]*>)?\s*:[^{]*\b(?:UIApplicationDelegate|UISceneDelegate|UIWindowSceneDelegate)\b[^{]*\{/;
|
|
12817
|
-
var REUSABLE_INIT = /^override(?=\s+(?:(?:public|open|internal)\s+)?init\s*\(\s*(?:style\s*:[^,)]*,\s*reuseIdentifier|reuseIdentifier)\s*:)/;
|
|
12818
|
-
var REUSABLE_VIEW_BASES = [
|
|
12819
|
-
"UICollectionReusableView",
|
|
12820
|
-
"UICollectionViewCell",
|
|
12821
|
-
"UICollectionViewListCell"
|
|
12822
|
-
];
|
|
12823
|
-
var CLASS_BASE = /^class\s+([A-Za-z_]\w*)\s*(?:<[^>{]*>)?\s*:\s*([A-Za-z_][\w.]*)[^{]*\{/;
|
|
12824
|
-
var FRAME_INIT = /^override(?=\s+(?:(?:public|open|internal)\s+)?init\s*\(\s*frame\s*:)/;
|
|
12825
12865
|
function compiledSwiftSources(files, targets, overlayFrameworks) {
|
|
12826
12866
|
const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
|
|
12827
12867
|
return new Map(
|
|
@@ -13601,7 +13641,7 @@ var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
|
13601
13641
|
"import CoreGraphics"
|
|
13602
13642
|
]).join("; ");
|
|
13603
13643
|
function foundationOwnerOf(name2) {
|
|
13604
|
-
if (name2 === "
|
|
13644
|
+
if (name2 === "NSKeyValueObservedChange" || name2 === "NSKeyValueObservation")
|
|
13605
13645
|
return "PeachObjC";
|
|
13606
13646
|
if (name2 === "DispatchData") return "Dispatch";
|
|
13607
13647
|
if (FOUNDATION_NETWORKING_TYPES.has(name2)) return "FoundationNetworking";
|
|
@@ -13621,10 +13661,6 @@ function swiftSourceAsIOS(source, overlayFrameworks, swiftPackage) {
|
|
|
13621
13661
|
}).join("\n");
|
|
13622
13662
|
let out = "";
|
|
13623
13663
|
let copied = 0;
|
|
13624
|
-
const reusableViews = new Set(REUSABLE_VIEW_BASES);
|
|
13625
|
-
const reusableBodies = [];
|
|
13626
|
-
let depth = 0;
|
|
13627
|
-
let opensReusableBody = false;
|
|
13628
13664
|
const sceneLifecycleBodies = /* @__PURE__ */ new Set();
|
|
13629
13665
|
for (const at of tokens) {
|
|
13630
13666
|
const rest = conditioned.slice(at, at + 400);
|
|
@@ -13633,21 +13669,6 @@ function swiftSourceAsIOS(source, overlayFrameworks, swiftPackage) {
|
|
|
13633
13669
|
out += conditioned.slice(copied, at + 1) + " public var _peachUsesSceneLifecycle: Bool { true };";
|
|
13634
13670
|
copied = at + 1;
|
|
13635
13671
|
}
|
|
13636
|
-
depth++;
|
|
13637
|
-
if (opensReusableBody) reusableBodies.push(depth);
|
|
13638
|
-
opensReusableBody = false;
|
|
13639
|
-
continue;
|
|
13640
|
-
}
|
|
13641
|
-
if (rest.startsWith("}")) {
|
|
13642
|
-
if (reusableBodies.at(-1) === depth) reusableBodies.pop();
|
|
13643
|
-
depth--;
|
|
13644
|
-
continue;
|
|
13645
|
-
}
|
|
13646
|
-
if (rest.startsWith("override")) {
|
|
13647
|
-
if (REUSABLE_INIT.test(rest) || reusableBodies.at(-1) === depth && FRAME_INIT.test(rest)) {
|
|
13648
|
-
out += `${conditioned.slice(copied, at)}required`;
|
|
13649
|
-
copied = at + "override".length;
|
|
13650
|
-
}
|
|
13651
13672
|
continue;
|
|
13652
13673
|
}
|
|
13653
13674
|
const imported = conditioned[at - 1] === "." ? null : /^import[ \t]+([A-Za-z_]\w*)(?:[ \t]*\.[ \t]*[A-Za-z_]\w*)+/.exec(rest);
|
|
@@ -13692,11 +13713,6 @@ function swiftSourceAsIOS(source, overlayFrameworks, swiftPackage) {
|
|
|
13692
13713
|
continue;
|
|
13693
13714
|
}
|
|
13694
13715
|
if (rest.startsWith("class")) {
|
|
13695
|
-
const declared = CLASS_BASE.exec(rest);
|
|
13696
|
-
if (declared && reusableViews.has(declared[2].split(".").pop())) {
|
|
13697
|
-
reusableViews.add(declared[1]);
|
|
13698
|
-
opensReusableBody = true;
|
|
13699
|
-
}
|
|
13700
13716
|
const modifiers = conditioned.slice(conditioned.lastIndexOf("\n", at - 1) + 1, at);
|
|
13701
13717
|
const delegateClass = DELEGATE_CLASS.exec(rest);
|
|
13702
13718
|
if (delegateClass && /\bUIApplicationDelegate\b/.test(delegateClass[0])) {
|
|
@@ -14236,7 +14252,7 @@ function swiftCodeScan(source) {
|
|
|
14236
14252
|
else top.parens--;
|
|
14237
14253
|
i++;
|
|
14238
14254
|
} else {
|
|
14239
|
-
const keyword = source.startsWith("class", i) ? "class" : source.startsWith("extension", i) ? "extension" : source.startsWith("override", i) ? "override" : source.startsWith("import", i) ? "import" : source.startsWith("func", i) ? "func" : source.startsWith("UIApplicationMain", i) ? "UIApplicationMain" : source.startsWith("
|
|
14255
|
+
const keyword = source.startsWith("class", i) ? "class" : source.startsWith("extension", i) ? "extension" : source.startsWith("override", i) ? "override" : source.startsWith("import", i) ? "import" : source.startsWith("func", i) ? "func" : source.startsWith("UIApplicationMain", i) ? "UIApplicationMain" : source.startsWith("Foundation", i) ? "Foundation" : source.startsWith("CoreFoundation", i) ? "CoreFoundation" : source.startsWith("ObjectiveC", i) ? "ObjectiveC" : source.startsWith("_LocationEssentials", i) ? "_LocationEssentials" : null;
|
|
14240
14256
|
if (keyword && !/[\w$]/.test(source[i - 1] ?? "") && !/[\w$]/.test(source[i + keyword.length] ?? "")) {
|
|
14241
14257
|
tokens.push(i);
|
|
14242
14258
|
i += keyword.length;
|
|
@@ -15193,6 +15209,7 @@ module ${moduleName}.Swift {
|
|
|
15193
15209
|
return projectOverlayFrameworks;
|
|
15194
15210
|
}
|
|
15195
15211
|
);
|
|
15212
|
+
const libraryEntryFiles = /* @__PURE__ */ new Map();
|
|
15196
15213
|
for (const target of [...targets]) {
|
|
15197
15214
|
if (!target.executable || ![...native.values()].some((value) => value.late?.producers.includes(target.name)))
|
|
15198
15215
|
continue;
|
|
@@ -15248,7 +15265,18 @@ module ${moduleName}.Swift {
|
|
|
15248
15265
|
`mixed executable ${target.name} requires one typed Swift application entry`
|
|
15249
15266
|
);
|
|
15250
15267
|
}
|
|
15251
|
-
if (!nativeEntry)
|
|
15268
|
+
if (!nativeEntry) {
|
|
15269
|
+
compiled.set(entryFile, entrySource);
|
|
15270
|
+
if (path27.basename(entryFile) === "main.swift") {
|
|
15271
|
+
const libraryEntry = path27.posix.join(
|
|
15272
|
+
path27.posix.dirname(entryFile),
|
|
15273
|
+
"PeachApplicationEntry.generated.swift"
|
|
15274
|
+
);
|
|
15275
|
+
if (Object.hasOwn(input.files, libraryEntry))
|
|
15276
|
+
throw new Error(`mixed application entry conflicts with ${libraryEntry}`);
|
|
15277
|
+
libraryEntryFiles.set(entryFile, libraryEntry);
|
|
15278
|
+
}
|
|
15279
|
+
}
|
|
15252
15280
|
const name2 = `${target.name}Executable`;
|
|
15253
15281
|
if (targets.some((candidate) => candidate.name === name2))
|
|
15254
15282
|
throw new Error(`mixed application executable target conflicts with ${name2}`);
|
|
@@ -15396,7 +15424,7 @@ module ${moduleName}.Swift {
|
|
|
15396
15424
|
}
|
|
15397
15425
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
15398
15426
|
if (file === "Package.swift") continue;
|
|
15399
|
-
const destination = path27.join(base, file);
|
|
15427
|
+
const destination = path27.join(base, libraryEntryFiles.get(file) ?? file);
|
|
15400
15428
|
const interfaceModule = /(?:^|\/)(\w+)-Swift\.h$/.exec(file)?.[1];
|
|
15401
15429
|
const localInterface = interfaceModule && swiftTargets.has(interfaceModule) ? `#include ${JSON.stringify(
|
|
15402
15430
|
path27.relative(
|
|
@@ -15455,9 +15483,16 @@ module ${moduleName}.Swift {
|
|
|
15455
15483
|
emitSwiftPackageManifest({
|
|
15456
15484
|
root: layout2.root,
|
|
15457
15485
|
files,
|
|
15458
|
-
targets: manifestTargets
|
|
15486
|
+
targets: manifestTargets.map((target) => ({
|
|
15487
|
+
...target,
|
|
15488
|
+
sources: target.sources?.map((source) => {
|
|
15489
|
+
const entry = libraryEntryFiles.get(path27.posix.join(target.path, source));
|
|
15490
|
+
return entry ? path27.posix.relative(target.path, entry) : source;
|
|
15491
|
+
})
|
|
15492
|
+
})),
|
|
15459
15493
|
packages,
|
|
15460
15494
|
native,
|
|
15495
|
+
sourceSwiftTargets: swiftTargets,
|
|
15461
15496
|
nativeFlags,
|
|
15462
15497
|
nativeImportFlags,
|
|
15463
15498
|
nativeHeaderFlags,
|
|
@@ -16033,7 +16068,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16033
16068
|
"--build-system",
|
|
16034
16069
|
"native",
|
|
16035
16070
|
"-j",
|
|
16036
|
-
|
|
16071
|
+
String(swiftBuildJobs()),
|
|
16037
16072
|
"--package-path",
|
|
16038
16073
|
linkRoot,
|
|
16039
16074
|
"--scratch-path",
|
|
@@ -16051,7 +16086,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16051
16086
|
"-Xswiftc",
|
|
16052
16087
|
"-num-threads",
|
|
16053
16088
|
"-Xswiftc",
|
|
16054
|
-
|
|
16089
|
+
String(swiftBuildJobs()),
|
|
16055
16090
|
...swiftReproducibleBuildFlags([
|
|
16056
16091
|
[path27.dirname(args.toolchainBin), "toolchain"],
|
|
16057
16092
|
[args.moduleRoot, "framework"],
|
|
@@ -16530,7 +16565,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16530
16565
|
"--build-system",
|
|
16531
16566
|
"native",
|
|
16532
16567
|
"-j",
|
|
16533
|
-
|
|
16568
|
+
String(swiftBuildJobs()),
|
|
16534
16569
|
"--package-path",
|
|
16535
16570
|
root,
|
|
16536
16571
|
...swiftCompileSdkOptions(frameworkRoot, options.toolchainBin),
|
|
@@ -16543,7 +16578,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16543
16578
|
"-Xswiftc",
|
|
16544
16579
|
"-num-threads",
|
|
16545
16580
|
"-Xswiftc",
|
|
16546
|
-
|
|
16581
|
+
String(swiftBuildJobs()),
|
|
16547
16582
|
...swiftReproducibleBuildFlags([
|
|
16548
16583
|
[path27.dirname(options.toolchainBin), "toolchain"],
|
|
16549
16584
|
[frameworkRoot, "framework"],
|
|
@@ -16734,7 +16769,6 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16734
16769
|
export {
|
|
16735
16770
|
FOUNDATION_IMPLICIT_MODULES,
|
|
16736
16771
|
MULTI_MANIFEST_VERSION,
|
|
16737
|
-
SWIFT_BUILD_JOBS,
|
|
16738
16772
|
WASM_TRIPLE,
|
|
16739
16773
|
brotliCompressQ11,
|
|
16740
16774
|
brotliCompressQ4,
|
|
@@ -16755,6 +16789,7 @@ export {
|
|
|
16755
16789
|
swiftApplicationEntry,
|
|
16756
16790
|
swiftArtifactHash,
|
|
16757
16791
|
swiftAvailableModules,
|
|
16792
|
+
swiftBuildJobs,
|
|
16758
16793
|
swiftBuilderHopTimeoutMs,
|
|
16759
16794
|
swiftCDefinedNames,
|
|
16760
16795
|
swiftCMainEntry,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2019 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2019 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2019 | (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;
|
|
@@ -42,6 +42,7 @@ __export(swift_toolchain_exports, {
|
|
|
42
42
|
extractSwiftHostCompiler: () => extractSwiftHostCompiler,
|
|
43
43
|
installSwiftWasmSdk: () => installSwiftWasmSdk,
|
|
44
44
|
peachsimPackageRoot: () => peachsimPackageRoot,
|
|
45
|
+
privateSwiftCompilerRelease: () => privateSwiftCompilerRelease,
|
|
45
46
|
privateSwiftDistributionRoot: () => privateSwiftDistributionRoot,
|
|
46
47
|
registerSwiftHostCompiler: () => registerSwiftHostCompiler,
|
|
47
48
|
setSwiftLinuxLibraryPath: () => setSwiftLinuxLibraryPath,
|
|
@@ -108,6 +109,24 @@ function swiftSdkOptions() {
|
|
|
108
109
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
109
110
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
110
111
|
var compilerArchives = {
|
|
112
|
+
"swift-6.4.0-RELEASE-custom-11345d60dca47496": {
|
|
113
|
+
identity: "11345d60dca47496",
|
|
114
|
+
archive: "tar.zst",
|
|
115
|
+
hosts: {
|
|
116
|
+
"darwin-arm64": {
|
|
117
|
+
checksum: "3df74a95c6f3ffa45aaa412027b390c99f9af81f6f6a41bf6d58a1a3079b5b02",
|
|
118
|
+
manifest: "8e5ed4be6adc967e4c7d955eff004c96d5dc050a589d50e1b3e694b70f9afd63"
|
|
119
|
+
},
|
|
120
|
+
"linux-x64": {
|
|
121
|
+
checksum: "a80e46add069932114bacc18640dc2e6a1a8f2a3ea7306a8ea8614d5cdf6e0e7",
|
|
122
|
+
manifest: "662d8869534f3cce827b1205973db1f9a1e1d92027005a5bdb6893f9c2a0b39d"
|
|
123
|
+
},
|
|
124
|
+
"linux-arm64": {
|
|
125
|
+
checksum: "4ca69bbc284fc7d54be57c80b744b88cce997d470ff23048795db54e7a6fbcba",
|
|
126
|
+
manifest: "85df84da2f814b6a71c264b37b83a81965ac33b5d2b465443d60c08cc7bc5dc3"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
111
130
|
"swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
|
|
112
131
|
identity: "45bb46301c86fe73",
|
|
113
132
|
archive: "tar.gz",
|
|
@@ -322,7 +341,12 @@ function privateSwiftDistributionRoot() {
|
|
|
322
341
|
const root = process.env[SWIFT_PRIVATE_DISTRIBUTION_ENV]?.trim();
|
|
323
342
|
return root ? import_node_path.default.resolve(root) : null;
|
|
324
343
|
}
|
|
344
|
+
function privateSwiftCompilerRelease() {
|
|
345
|
+
return process.env.PEACH_SWIFT_PRIVATE_COMPILER_RELEASE?.trim() || null;
|
|
346
|
+
}
|
|
325
347
|
function privateSwiftRelease() {
|
|
348
|
+
const compiler = privateSwiftCompilerRelease();
|
|
349
|
+
if (compiler) return compiler;
|
|
326
350
|
const root = privateSwiftDistributionRoot();
|
|
327
351
|
if (!root) return null;
|
|
328
352
|
const manifest = JSON.parse(
|
|
@@ -945,6 +969,7 @@ function swiftCompilerInstall(release) {
|
|
|
945
969
|
extractSwiftHostCompiler,
|
|
946
970
|
installSwiftWasmSdk,
|
|
947
971
|
peachsimPackageRoot,
|
|
972
|
+
privateSwiftCompilerRelease,
|
|
948
973
|
privateSwiftDistributionRoot,
|
|
949
974
|
registerSwiftHostCompiler,
|
|
950
975
|
setSwiftLinuxLibraryPath,
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2019 | (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 __defProp = Object.defineProperty;
|