peachsim 0.1.2428 → 0.1.2429
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/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 +173 -66
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +163 -56
- 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 +181 -74
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -6
- 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 +9 -6
- 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 +9 -6
- package/dist-lib/native-app-identity-project.cjs +6 -3
- package/dist-lib/native-app-identity-project.mjs +6 -3
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- 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 +194 -85
- package/dist-lib/swift-compile.cjs +35 -22
- package/dist-lib/swift-compile.mjs +35 -22
- 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 +159 -52
- package/dist-lib/vite.cjs +6 -6
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +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/protocol.d.ts +7 -0
- package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/locationBridgeContract.d.ts +20 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityMigrationPolicy.h +17 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +6 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h +15 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreDescription.h +10 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSBase.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSImportExtension.h +21 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h +17 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h +154 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndexDescription.h +19 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h +86 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h +95 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Categories.h +19 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Documents.h +71 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Events.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h +138 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Images.h +116 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Media.h +235 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Messaging.h +99 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Places.h +96 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSuggestion.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSUserQuery.h +73 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.h +29 -0
- package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +2 -2
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +1 -1
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +1 -1
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +3 -3
- package/src/core-data-model.ts +112 -5
- package/src/swift-compile.ts +34 -11
- package/src/swift-objc-import.ts +19 -13
- package/src/xcode-project.ts +5 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2429 | (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;
|
|
@@ -12502,20 +12502,21 @@ function compactSwiftClangOverlays(flags, generated) {
|
|
|
12502
12502
|
}
|
|
12503
12503
|
return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
|
|
12504
12504
|
}
|
|
12505
|
-
var
|
|
12506
|
-
function
|
|
12505
|
+
var SUBMODULE_IMPORT = /^[ \t]*(?:(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?|@import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*;.*)$/gm;
|
|
12506
|
+
function submoduleImports(sources) {
|
|
12507
12507
|
const imports = /* @__PURE__ */ new Map();
|
|
12508
12508
|
for (const source of sources)
|
|
12509
|
-
for (const
|
|
12509
|
+
for (const match of source.matchAll(SUBMODULE_IMPORT)) {
|
|
12510
|
+
const module2 = match[1] ?? match[3];
|
|
12510
12511
|
const names = imports.get(module2) ?? /* @__PURE__ */ new Set();
|
|
12511
|
-
names.add(
|
|
12512
|
+
names.add(match[2] ?? match[4]);
|
|
12512
12513
|
imports.set(module2, names);
|
|
12513
12514
|
}
|
|
12514
12515
|
return imports;
|
|
12515
12516
|
}
|
|
12516
12517
|
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set(), swiftHeader) {
|
|
12517
12518
|
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
12518
|
-
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
12519
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "").replace(/[^A-Za-z0-9_]/g, "_").replace(/^(?=\d)/, "_");
|
|
12519
12520
|
return [
|
|
12520
12521
|
`module ${module2} {`,
|
|
12521
12522
|
...headers.map(
|
|
@@ -13116,8 +13117,8 @@ function swiftModuleInterface(moduleRoot, name2, interfaceRoot) {
|
|
|
13116
13117
|
if (declared.size === 0) return null;
|
|
13117
13118
|
return { declared, header: clangInterfaceHeader((0, import_node_fs26.readFileSync)(built, "utf8")) };
|
|
13118
13119
|
}
|
|
13119
|
-
var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
|
|
13120
|
-
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
13120
|
+
var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(/^@import (\w+?)(?:Enums|Constants);$/gm, "@import $1;").replace(
|
|
13121
|
+
/^@import (?:CoreFoundation|FoundationNetworking|PeachFoundation);$/gm,
|
|
13121
13122
|
"@import Foundation;"
|
|
13122
13123
|
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
13123
13124
|
var objcEnumerations = (header) => [
|
|
@@ -13548,7 +13549,7 @@ var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|file
|
|
|
13548
13549
|
var kleeneNot = (value) => value === void 0 ? void 0 : !value;
|
|
13549
13550
|
var kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
|
|
13550
13551
|
var kleeneOr = (left, right) => left === true || right === true ? true : left === false && right === false ? false : void 0;
|
|
13551
|
-
function swiftCondition(text2, available) {
|
|
13552
|
+
function swiftCondition(text2, available, defines) {
|
|
13552
13553
|
const tokens = text2.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
13553
13554
|
let index = 0;
|
|
13554
13555
|
const atom = () => {
|
|
@@ -13561,6 +13562,7 @@ function swiftCondition(text2, available) {
|
|
|
13561
13562
|
}
|
|
13562
13563
|
if (token === "true") return true;
|
|
13563
13564
|
if (token === "false") return false;
|
|
13565
|
+
if (defines && /^[A-Za-z_]\w*$/.test(token ?? "")) return defines.has(token);
|
|
13564
13566
|
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
13565
13567
|
if (!call) return void 0;
|
|
13566
13568
|
const [, name2, argument2] = call;
|
|
@@ -13589,7 +13591,7 @@ function swiftCondition(text2, available) {
|
|
|
13589
13591
|
};
|
|
13590
13592
|
return either();
|
|
13591
13593
|
}
|
|
13592
|
-
function* swiftConditionalLines(contents2, available) {
|
|
13594
|
+
function* swiftConditionalLines(contents2, available, defines) {
|
|
13593
13595
|
const frames = [];
|
|
13594
13596
|
for (const line of swiftCodeMask(contents2).split("\n")) {
|
|
13595
13597
|
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
@@ -13597,12 +13599,12 @@ function* swiftConditionalLines(contents2, available) {
|
|
|
13597
13599
|
const [, kind, rest] = directive;
|
|
13598
13600
|
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
13599
13601
|
if (kind === "if") {
|
|
13600
|
-
const active = swiftCondition(condition, available);
|
|
13602
|
+
const active = swiftCondition(condition, available, defines);
|
|
13601
13603
|
frames.push({ active, taken: active });
|
|
13602
13604
|
} else if (kind === "endif") frames.pop();
|
|
13603
13605
|
else if (frames.length > 0) {
|
|
13604
13606
|
const frame = frames[frames.length - 1];
|
|
13605
|
-
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
13607
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available, defines);
|
|
13606
13608
|
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
13607
13609
|
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
13608
13610
|
}
|
|
@@ -14056,7 +14058,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
14056
14058
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
14057
14059
|
var MULTI_MANIFEST_VERSION = 72;
|
|
14058
14060
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
14059
|
-
var compilerSourceDigest = true ? "
|
|
14061
|
+
var compilerSourceDigest = true ? "5ed6ce65e80a661269e2ae1a70eb7df501b75d5c5fd45c3cfc87cf1db220d611" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
14060
14062
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
14061
14063
|
const hash = (0, import_node_crypto15.createHash)("sha256");
|
|
14062
14064
|
hash.update(`swift-compile
|
|
@@ -14523,6 +14525,17 @@ function emitSwiftPackageManifest(args) {
|
|
|
14523
14525
|
...args.nativeHeaderFlags ?? []
|
|
14524
14526
|
];
|
|
14525
14527
|
const owner = targets.find((target) => target.name === name2);
|
|
14528
|
+
const context = /* @__PURE__ */ new Set();
|
|
14529
|
+
const visit = (dependency) => {
|
|
14530
|
+
if (context.has(dependency)) return;
|
|
14531
|
+
context.add(dependency);
|
|
14532
|
+
for (const next of siblings.get(dependency) ?? []) visit(next);
|
|
14533
|
+
};
|
|
14534
|
+
if (native.mixed)
|
|
14535
|
+
for (const dependency of siblings.get(name2) ?? []) visit(dependency);
|
|
14536
|
+
const contextFlags = [...context].flatMap(
|
|
14537
|
+
(dependency) => args.native?.get(dependency)?.importFlags ?? []
|
|
14538
|
+
);
|
|
14526
14539
|
return late ? (native.groups ?? [
|
|
14527
14540
|
{
|
|
14528
14541
|
name: late.name,
|
|
@@ -14537,9 +14550,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
14537
14550
|
` path: ${JSON.stringify(group.path)},`,
|
|
14538
14551
|
` sources: ${JSON.stringify(group.sources)},`,
|
|
14539
14552
|
` publicHeadersPath: ${JSON.stringify(native.groups ? "include" : "PeachSwiftImplementation")},`,
|
|
14540
|
-
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
|
|
14553
|
+
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags, ...contextFlags]))})],`,
|
|
14541
14554
|
...group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source)) ? [
|
|
14542
|
-
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
|
|
14555
|
+
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags, ...contextFlags]))})]),`
|
|
14543
14556
|
] : [" ),"]
|
|
14544
14557
|
]) : [];
|
|
14545
14558
|
}),
|
|
@@ -15448,8 +15461,8 @@ function swiftApplicationEntry(file, source) {
|
|
|
15448
15461
|
}
|
|
15449
15462
|
return false;
|
|
15450
15463
|
}
|
|
15451
|
-
function swiftTypedApplicationEntry(source) {
|
|
15452
|
-
const code = [...swiftConditionalLines(swiftCodeMask(source))].map(({ line, active }) => active === false ? " ".repeat(line.length) : line).join("\n");
|
|
15464
|
+
function swiftTypedApplicationEntry(source, defines) {
|
|
15465
|
+
const code = [...swiftConditionalLines(swiftCodeMask(source), void 0, defines)].map(({ line, active }) => active === false ? " ".repeat(line.length) : line).join("\n");
|
|
15453
15466
|
const match = /@main\b[\s\S]*?\b(?:struct|class|enum)\s+([A-Za-z_]\w*)/.exec(code);
|
|
15454
15467
|
return match ? { index: match.index, name: match[1] } : null;
|
|
15455
15468
|
}
|
|
@@ -16140,9 +16153,9 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
16140
16153
|
clangImportedModules.add(name2);
|
|
16141
16154
|
}
|
|
16142
16155
|
}
|
|
16143
|
-
const
|
|
16156
|
+
const submoduleImports2 = submoduleImports(
|
|
16144
16157
|
Object.entries(input.files).flatMap(
|
|
16145
|
-
([file, contents2]) =>
|
|
16158
|
+
([file, contents2]) => /\.(?:swift|h|m|mm)$/.test(file) ? [contents2.toString()] : []
|
|
16146
16159
|
)
|
|
16147
16160
|
);
|
|
16148
16161
|
const headerDirectory = import_node_path28.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
@@ -16533,7 +16546,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
16533
16546
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
16534
16547
|
swiftTargetModuleName(target.name),
|
|
16535
16548
|
roots2.map((file) => import_node_path28.default.join(layout2.root, file)),
|
|
16536
|
-
|
|
16549
|
+
submoduleImports2.get(swiftTargetModuleName(target.name))
|
|
16537
16550
|
);
|
|
16538
16551
|
if (moduleContents === void 0)
|
|
16539
16552
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -16875,7 +16888,7 @@ module ${moduleName}.Swift {
|
|
|
16875
16888
|
` : swiftObjCModuleMap(
|
|
16876
16889
|
moduleName,
|
|
16877
16890
|
(input.nativeTargets?.find((target) => target.name === name2)?.publicHeaders ?? []).map((header) => import_node_path28.default.join(layout2.root, header)),
|
|
16878
|
-
|
|
16891
|
+
submoduleImports2.get(moduleName),
|
|
16879
16892
|
import_node_path28.default.join(headerDirectory, name2 + "-Swift.h")
|
|
16880
16893
|
)
|
|
16881
16894
|
);
|
|
@@ -16963,7 +16976,7 @@ module ${moduleName}.Swift {
|
|
|
16963
16976
|
)
|
|
16964
16977
|
);
|
|
16965
16978
|
const mains = entries.flatMap(([file, source]) => {
|
|
16966
|
-
const entry = swiftTypedApplicationEntry(source);
|
|
16979
|
+
const entry = swiftTypedApplicationEntry(source, new Set(target.defines ?? []));
|
|
16967
16980
|
return entry ? [{ file, source, ...entry }] : [];
|
|
16968
16981
|
});
|
|
16969
16982
|
let entryFile = "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2429 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -12481,20 +12481,21 @@ function compactSwiftClangOverlays(flags, generated) {
|
|
|
12481
12481
|
}
|
|
12482
12482
|
return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
|
|
12483
12483
|
}
|
|
12484
|
-
var
|
|
12485
|
-
function
|
|
12484
|
+
var SUBMODULE_IMPORT = /^[ \t]*(?:(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?|@import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*;.*)$/gm;
|
|
12485
|
+
function submoduleImports(sources) {
|
|
12486
12486
|
const imports = /* @__PURE__ */ new Map();
|
|
12487
12487
|
for (const source of sources)
|
|
12488
|
-
for (const
|
|
12488
|
+
for (const match of source.matchAll(SUBMODULE_IMPORT)) {
|
|
12489
|
+
const module = match[1] ?? match[3];
|
|
12489
12490
|
const names = imports.get(module) ?? /* @__PURE__ */ new Set();
|
|
12490
|
-
names.add(
|
|
12491
|
+
names.add(match[2] ?? match[4]);
|
|
12491
12492
|
imports.set(module, names);
|
|
12492
12493
|
}
|
|
12493
12494
|
return imports;
|
|
12494
12495
|
}
|
|
12495
12496
|
function swiftObjCModuleMap(module, headers, submodules = /* @__PURE__ */ new Set(), swiftHeader) {
|
|
12496
12497
|
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
12497
|
-
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
12498
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "").replace(/[^A-Za-z0-9_]/g, "_").replace(/^(?=\d)/, "_");
|
|
12498
12499
|
return [
|
|
12499
12500
|
`module ${module} {`,
|
|
12500
12501
|
...headers.map(
|
|
@@ -13115,8 +13116,8 @@ function swiftModuleInterface(moduleRoot, name2, interfaceRoot) {
|
|
|
13115
13116
|
if (declared.size === 0) return null;
|
|
13116
13117
|
return { declared, header: clangInterfaceHeader(readFileSync18(built, "utf8")) };
|
|
13117
13118
|
}
|
|
13118
|
-
var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(
|
|
13119
|
-
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
13119
|
+
var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIKitText);$/gm, "@import UIKit;").replace(/^@import (\w+?)(?:Enums|Constants);$/gm, "@import $1;").replace(
|
|
13120
|
+
/^@import (?:CoreFoundation|FoundationNetworking|PeachFoundation);$/gm,
|
|
13120
13121
|
"@import Foundation;"
|
|
13121
13122
|
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
13122
13123
|
var objcEnumerations = (header) => [
|
|
@@ -13547,7 +13548,7 @@ var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|file
|
|
|
13547
13548
|
var kleeneNot = (value) => value === void 0 ? void 0 : !value;
|
|
13548
13549
|
var kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
|
|
13549
13550
|
var kleeneOr = (left, right) => left === true || right === true ? true : left === false && right === false ? false : void 0;
|
|
13550
|
-
function swiftCondition(text2, available) {
|
|
13551
|
+
function swiftCondition(text2, available, defines) {
|
|
13551
13552
|
const tokens = text2.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
13552
13553
|
let index = 0;
|
|
13553
13554
|
const atom = () => {
|
|
@@ -13560,6 +13561,7 @@ function swiftCondition(text2, available) {
|
|
|
13560
13561
|
}
|
|
13561
13562
|
if (token === "true") return true;
|
|
13562
13563
|
if (token === "false") return false;
|
|
13564
|
+
if (defines && /^[A-Za-z_]\w*$/.test(token ?? "")) return defines.has(token);
|
|
13563
13565
|
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
13564
13566
|
if (!call) return void 0;
|
|
13565
13567
|
const [, name2, argument2] = call;
|
|
@@ -13588,7 +13590,7 @@ function swiftCondition(text2, available) {
|
|
|
13588
13590
|
};
|
|
13589
13591
|
return either();
|
|
13590
13592
|
}
|
|
13591
|
-
function* swiftConditionalLines(contents2, available) {
|
|
13593
|
+
function* swiftConditionalLines(contents2, available, defines) {
|
|
13592
13594
|
const frames = [];
|
|
13593
13595
|
for (const line of swiftCodeMask(contents2).split("\n")) {
|
|
13594
13596
|
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
@@ -13596,12 +13598,12 @@ function* swiftConditionalLines(contents2, available) {
|
|
|
13596
13598
|
const [, kind, rest] = directive;
|
|
13597
13599
|
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
13598
13600
|
if (kind === "if") {
|
|
13599
|
-
const active = swiftCondition(condition, available);
|
|
13601
|
+
const active = swiftCondition(condition, available, defines);
|
|
13600
13602
|
frames.push({ active, taken: active });
|
|
13601
13603
|
} else if (kind === "endif") frames.pop();
|
|
13602
13604
|
else if (frames.length > 0) {
|
|
13603
13605
|
const frame = frames[frames.length - 1];
|
|
13604
|
-
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
13606
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available, defines);
|
|
13605
13607
|
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
13606
13608
|
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
13607
13609
|
}
|
|
@@ -14055,7 +14057,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
14055
14057
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
14056
14058
|
var MULTI_MANIFEST_VERSION = 72;
|
|
14057
14059
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
14058
|
-
var compilerSourceDigest = true ? "
|
|
14060
|
+
var compilerSourceDigest = true ? "5ed6ce65e80a661269e2ae1a70eb7df501b75d5c5fd45c3cfc87cf1db220d611" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
14059
14061
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
14060
14062
|
const hash = createHash15("sha256");
|
|
14061
14063
|
hash.update(`swift-compile
|
|
@@ -14522,6 +14524,17 @@ function emitSwiftPackageManifest(args) {
|
|
|
14522
14524
|
...args.nativeHeaderFlags ?? []
|
|
14523
14525
|
];
|
|
14524
14526
|
const owner = targets.find((target) => target.name === name2);
|
|
14527
|
+
const context = /* @__PURE__ */ new Set();
|
|
14528
|
+
const visit = (dependency) => {
|
|
14529
|
+
if (context.has(dependency)) return;
|
|
14530
|
+
context.add(dependency);
|
|
14531
|
+
for (const next of siblings.get(dependency) ?? []) visit(next);
|
|
14532
|
+
};
|
|
14533
|
+
if (native.mixed)
|
|
14534
|
+
for (const dependency of siblings.get(name2) ?? []) visit(dependency);
|
|
14535
|
+
const contextFlags = [...context].flatMap(
|
|
14536
|
+
(dependency) => args.native?.get(dependency)?.importFlags ?? []
|
|
14537
|
+
);
|
|
14525
14538
|
return late ? (native.groups ?? [
|
|
14526
14539
|
{
|
|
14527
14540
|
name: late.name,
|
|
@@ -14536,9 +14549,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
14536
14549
|
` path: ${JSON.stringify(group.path)},`,
|
|
14537
14550
|
` sources: ${JSON.stringify(group.sources)},`,
|
|
14538
14551
|
` publicHeadersPath: ${JSON.stringify(native.groups ? "include" : "PeachSwiftImplementation")},`,
|
|
14539
|
-
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
|
|
14552
|
+
` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags, ...contextFlags]))})],`,
|
|
14540
14553
|
...group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source)) ? [
|
|
14541
|
-
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
|
|
14554
|
+
` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags, ...contextFlags]))})]),`
|
|
14542
14555
|
] : [" ),"]
|
|
14543
14556
|
]) : [];
|
|
14544
14557
|
}),
|
|
@@ -15447,8 +15460,8 @@ function swiftApplicationEntry(file, source) {
|
|
|
15447
15460
|
}
|
|
15448
15461
|
return false;
|
|
15449
15462
|
}
|
|
15450
|
-
function swiftTypedApplicationEntry(source) {
|
|
15451
|
-
const code = [...swiftConditionalLines(swiftCodeMask(source))].map(({ line, active }) => active === false ? " ".repeat(line.length) : line).join("\n");
|
|
15463
|
+
function swiftTypedApplicationEntry(source, defines) {
|
|
15464
|
+
const code = [...swiftConditionalLines(swiftCodeMask(source), void 0, defines)].map(({ line, active }) => active === false ? " ".repeat(line.length) : line).join("\n");
|
|
15452
15465
|
const match = /@main\b[\s\S]*?\b(?:struct|class|enum)\s+([A-Za-z_]\w*)/.exec(code);
|
|
15453
15466
|
return match ? { index: match.index, name: match[1] } : null;
|
|
15454
15467
|
}
|
|
@@ -16139,9 +16152,9 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
16139
16152
|
clangImportedModules.add(name2);
|
|
16140
16153
|
}
|
|
16141
16154
|
}
|
|
16142
|
-
const
|
|
16155
|
+
const submoduleImports2 = submoduleImports(
|
|
16143
16156
|
Object.entries(input.files).flatMap(
|
|
16144
|
-
([file, contents2]) =>
|
|
16157
|
+
([file, contents2]) => /\.(?:swift|h|m|mm)$/.test(file) ? [contents2.toString()] : []
|
|
16145
16158
|
)
|
|
16146
16159
|
);
|
|
16147
16160
|
const headerDirectory = path30.join(layout2.root, ".build", "peach-cxx-headers");
|
|
@@ -16532,7 +16545,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
16532
16545
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
16533
16546
|
swiftTargetModuleName(target.name),
|
|
16534
16547
|
roots2.map((file) => path30.join(layout2.root, file)),
|
|
16535
|
-
|
|
16548
|
+
submoduleImports2.get(swiftTargetModuleName(target.name))
|
|
16536
16549
|
);
|
|
16537
16550
|
if (moduleContents === void 0)
|
|
16538
16551
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -16874,7 +16887,7 @@ module ${moduleName}.Swift {
|
|
|
16874
16887
|
` : swiftObjCModuleMap(
|
|
16875
16888
|
moduleName,
|
|
16876
16889
|
(input.nativeTargets?.find((target) => target.name === name2)?.publicHeaders ?? []).map((header) => path30.join(layout2.root, header)),
|
|
16877
|
-
|
|
16890
|
+
submoduleImports2.get(moduleName),
|
|
16878
16891
|
path30.join(headerDirectory, name2 + "-Swift.h")
|
|
16879
16892
|
)
|
|
16880
16893
|
);
|
|
@@ -16962,7 +16975,7 @@ module ${moduleName}.Swift {
|
|
|
16962
16975
|
)
|
|
16963
16976
|
);
|
|
16964
16977
|
const mains = entries.flatMap(([file, source]) => {
|
|
16965
|
-
const entry = swiftTypedApplicationEntry(source);
|
|
16978
|
+
const entry = swiftTypedApplicationEntry(source, new Set(target.defines ?? []));
|
|
16966
16979
|
return entry ? [{ file, source, ...entry }] : [];
|
|
16967
16980
|
});
|
|
16968
16981
|
let entryFile = "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2429 | (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.2429 | (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.2429 | (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;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2429 | (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;
|