peachsim 0.1.2225 → 0.1.2228
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/bridge-flow-runner.ts +56 -3
- package/cli/commands/control.ts +27 -1
- package/cli/commands/flow.ts +26 -0
- package/cli/commands/package.ts +9 -2
- package/cli/drivers/playwright.ts +1 -0
- package/cli/drivers/types.ts +3 -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 +78 -9
- 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 +76 -7
- 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 +78 -9
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- 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 +4 -4
- 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 +11 -4
- package/dist-lib/metro-production-bundle.mjs +10 -4
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- 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 +54 -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 +153 -23
- package/dist-lib/swift-compile.cjs +68 -4
- package/dist-lib/swift-compile.mjs +67 -4
- 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 +75 -6
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/bundle-parse-receipt.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/native-paragraph.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/metro-fingerprint.d.ts +3 -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/protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +0 -5
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +2 -0
- package/dist-types/packages/peach-kit/src/internal.d.ts +1 -1
- package/dist-types/packages/peach-kit/src/ios-tint.d.ts +2 -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/UIKit.framework/Headers/UIControl.h +0 -26
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +27 -0
- package/sdk/ios/usr/include/ObjectiveC.apinotes +380 -7
- package/src/metro-production-bundle.ts +15 -2
- package/src/swift-compile.ts +77 -2
- package/src/swift-standin-emit.ts +1 -0
- package/src/swift-standins.ts +8 -0
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2228 | (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;
|
|
@@ -44553,7 +44553,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
44553
44553
|
"Equatable",
|
|
44554
44554
|
"CustomStringConvertible",
|
|
44555
44555
|
"CustomDebugStringConvertible"
|
|
44556
|
-
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path141)?.has(name3)
|
|
44556
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path141)?.has(name3.split(/::|\./).pop()) && !options.unconformed?.get(path141)?.has(name3)
|
|
44557
44557
|
)
|
|
44558
44558
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
44559
44559
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -54492,6 +54492,20 @@ function swiftModuleInterface(moduleRoot, name3, interfaceRoot) {
|
|
|
54492
54492
|
if (declared.size === 0) return null;
|
|
54493
54493
|
return { declared, header: clangInterfaceHeader((0, import_node_fs54.readFileSync)(built2, "utf8")) };
|
|
54494
54494
|
}
|
|
54495
|
+
function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
54496
|
+
const superclasses = new Set(
|
|
54497
|
+
[...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1])
|
|
54498
|
+
);
|
|
54499
|
+
return header.replace(/^@import (\w+);$/gm, (statement, name3) => {
|
|
54500
|
+
const dependency = interfaceFor(name3);
|
|
54501
|
+
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
54502
|
+
(name4) => superclasses.has(name4)
|
|
54503
|
+
))
|
|
54504
|
+
return statement;
|
|
54505
|
+
return `${statement}
|
|
54506
|
+
#import ${JSON.stringify(dependency.file)}`;
|
|
54507
|
+
});
|
|
54508
|
+
}
|
|
54495
54509
|
function withoutSwiftDeclarations(text6, declared, interfaceImport) {
|
|
54496
54510
|
const out = [];
|
|
54497
54511
|
let skipping;
|
|
@@ -58870,6 +58884,51 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
58870
58884
|
if ((0, import_node_fs54.existsSync)(linked) && (0, import_node_fs54.statSync)(linked).size <= 8)
|
|
58871
58885
|
(0, import_node_fs54.rmSync)(linked, { force: true });
|
|
58872
58886
|
report("compiling and linking Swift modules");
|
|
58887
|
+
const frameworkInterfaces = /* @__PURE__ */ new Map();
|
|
58888
|
+
const frameworkInterface = (name3) => {
|
|
58889
|
+
if (frameworkInterfaces.has(name3)) return frameworkInterfaces.get(name3);
|
|
58890
|
+
const source = distribution ? import_node_path51.default.join(frameworkRoot, "modules", `${name3}-Swift.h`) : import_node_path51.default.join(
|
|
58891
|
+
prebuilt.modules,
|
|
58892
|
+
"..",
|
|
58893
|
+
`${name3}.build/include/${name3}-Swift.h`
|
|
58894
|
+
);
|
|
58895
|
+
if (!(0, import_node_fs54.existsSync)(source)) {
|
|
58896
|
+
frameworkInterfaces.set(name3, null);
|
|
58897
|
+
return null;
|
|
58898
|
+
}
|
|
58899
|
+
const headers = import_node_path51.default.join(
|
|
58900
|
+
swiftSdkPaths(frameworkRoot, options.toolchainBin).darwin,
|
|
58901
|
+
`System/Library/Frameworks/${name3}.framework/Headers`
|
|
58902
|
+
);
|
|
58903
|
+
const declared = /* @__PURE__ */ new Set();
|
|
58904
|
+
if ((0, import_node_fs54.existsSync)(headers)) {
|
|
58905
|
+
for (const file of (0, import_node_fs54.readdirSync)(headers, {
|
|
58906
|
+
recursive: true,
|
|
58907
|
+
encoding: "utf8"
|
|
58908
|
+
}))
|
|
58909
|
+
if (file.endsWith(".h"))
|
|
58910
|
+
for (const name4 of swiftInterfaceDeclarations(
|
|
58911
|
+
(0, import_node_fs54.readFileSync)(import_node_path51.default.join(headers, file), "utf8")
|
|
58912
|
+
))
|
|
58913
|
+
declared.add(name4);
|
|
58914
|
+
}
|
|
58915
|
+
const header = withoutSwiftDeclarations(
|
|
58916
|
+
clangInterfaceHeader((0, import_node_fs54.readFileSync)(source, "utf8")),
|
|
58917
|
+
declared,
|
|
58918
|
+
`#import <${name3}/${name3}.h>`
|
|
58919
|
+
);
|
|
58920
|
+
const value = {
|
|
58921
|
+
file: import_node_path51.default.join(root, ".build/peach-framework-objc", `${name3}-Swift.h`),
|
|
58922
|
+
header
|
|
58923
|
+
};
|
|
58924
|
+
frameworkInterfaces.set(name3, value);
|
|
58925
|
+
writeBuildFile(
|
|
58926
|
+
value.file,
|
|
58927
|
+
((0, import_node_fs54.existsSync)(import_node_path51.default.join(headers, `${name3}.h`)) ? `#import <${name3}/${name3}.h>
|
|
58928
|
+
` : "") + swiftHeaderWithSuperclassImports(header, frameworkInterface)
|
|
58929
|
+
);
|
|
58930
|
+
return value;
|
|
58931
|
+
};
|
|
58873
58932
|
try {
|
|
58874
58933
|
const headerBuilds = preparation.headerProductTarget ? [
|
|
58875
58934
|
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
@@ -58897,7 +58956,10 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
58897
58956
|
writeBuildFile(
|
|
58898
58957
|
emitted,
|
|
58899
58958
|
withoutSwiftDeclarations(
|
|
58900
|
-
|
|
58959
|
+
swiftHeaderWithSuperclassImports(
|
|
58960
|
+
clangInterfaceHeader((0, import_node_fs54.readFileSync)(original, "utf8")),
|
|
58961
|
+
frameworkInterface
|
|
58962
|
+
),
|
|
58901
58963
|
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
58902
58964
|
`#import <${producer}/${producer}.h>`
|
|
58903
58965
|
)
|
|
@@ -59173,7 +59235,7 @@ var init_swift_compile = __esm({
|
|
|
59173
59235
|
ExpoModulesCore: []
|
|
59174
59236
|
};
|
|
59175
59237
|
OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
59176
|
-
SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
59238
|
+
SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|fileprivate|private)\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
59177
59239
|
kleeneNot = (value) => value === void 0 ? void 0 : !value;
|
|
59178
59240
|
kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
|
|
59179
59241
|
kleeneOr = (left, right) => left === true || right === true ? true : left === false && right === false ? false : void 0;
|
|
@@ -59270,7 +59332,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
59270
59332
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
59271
59333
|
MULTI_MANIFEST_VERSION = 68;
|
|
59272
59334
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
59273
|
-
compilerSourceDigest = true ? "
|
|
59335
|
+
compilerSourceDigest = true ? "280e858b01b1c1393d3765c8d6ff1b3ce4a1a93d7fb7e3dd2d4d3e5f1d5f1ac2" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
59274
59336
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
59275
59337
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
59276
59338
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -65756,7 +65818,7 @@ var init_swift_standin_digest = __esm({
|
|
|
65756
65818
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
65757
65819
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
65758
65820
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
65759
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
65821
|
+
STANDIN_SOURCE_DIGEST = true ? "c157dea0314bab3ba5af4145cc3ba5b8a4d824fa6677166162e49713afe384bb" : standinSourceDigest();
|
|
65760
65822
|
}
|
|
65761
65823
|
});
|
|
65762
65824
|
|
|
@@ -66217,7 +66279,7 @@ var init_package_tree_digest = __esm({
|
|
|
66217
66279
|
|
|
66218
66280
|
// src/expo-native-prebuilt.ts
|
|
66219
66281
|
function expoNativeCompilerDigestValue() {
|
|
66220
|
-
return true ? "
|
|
66282
|
+
return true ? "52d8ecb0a37f0f7a5504161cecd2a17d59f6cff85fdc5cac0ae8f4353362ad1a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
66221
66283
|
}
|
|
66222
66284
|
function readSources(value) {
|
|
66223
66285
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -69615,6 +69677,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
69615
69677
|
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
|
|
69616
69678
|
continue;
|
|
69617
69679
|
}
|
|
69680
|
+
const redundant = /^redundant conformance of '\w+' to protocol '(\w+)'$/.exec(
|
|
69681
|
+
match[3]
|
|
69682
|
+
)?.[1];
|
|
69683
|
+
if (owner && redundant) {
|
|
69684
|
+
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], redundant]));
|
|
69685
|
+
continue;
|
|
69686
|
+
}
|
|
69618
69687
|
if (owner && swiftPaths.has(owner))
|
|
69619
69688
|
throw new Error(
|
|
69620
69689
|
`Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
@@ -86921,7 +86990,7 @@ var init_nitro_superset = __esm({
|
|
|
86921
86990
|
init_nitroContract();
|
|
86922
86991
|
init_swift_standin_digest();
|
|
86923
86992
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
86924
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
86993
|
+
NITRO_COMPILER_DIGEST = true ? "02840899304cd9c2c7928baa6f7a13405d0142f29940e8d6fdbf2569fb60b262" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
86925
86994
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
86926
86995
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
86927
86996
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -87633,7 +87702,7 @@ var init_one_sdk_bundle = __esm({
|
|
|
87633
87702
|
var runtime_companion_default;
|
|
87634
87703
|
var init_runtime_companion = __esm({
|
|
87635
87704
|
"runtime-companion.json"() {
|
|
87636
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
87705
|
+
runtime_companion_default = { abi: 1, sha256: "286145bc3b2ca79a64228c88d8c2e088a592754d61b5855d0388974ee88863fa", file: "node/cli-286145bc3b2ca79a64228c88d8c2e088a592754d61b5855d0388974ee88863fa.cjs" };
|
|
87637
87706
|
}
|
|
87638
87707
|
});
|
|
87639
87708
|
|
|
@@ -98380,12 +98449,12 @@ function viewModelInitializer({ name: name3, signature: signature2 }) {
|
|
|
98380
98449
|
)}) }`;
|
|
98381
98450
|
}
|
|
98382
98451
|
}
|
|
98383
|
-
function windowTheme(
|
|
98452
|
+
function windowTheme(window2) {
|
|
98384
98453
|
return [
|
|
98385
98454
|
" android.view.WindowTheme(",
|
|
98386
|
-
` ${
|
|
98387
|
-
` ${
|
|
98388
|
-
` ${
|
|
98455
|
+
` ${window2.edgeToEdgeEnforced}, ${argb(window2.statusBarColor)}, ${argb(window2.navigationBarColor)},`,
|
|
98456
|
+
` ${window2.statusBarContrastEnforced}, ${window2.navigationBarContrastEnforced},`,
|
|
98457
|
+
` ${window2.lightStatusBar}, ${window2.lightNavigationBar},`,
|
|
98389
98458
|
" ),"
|
|
98390
98459
|
];
|
|
98391
98460
|
}
|
|
@@ -107340,6 +107409,27 @@ var init_agent_identity = __esm({
|
|
|
107340
107409
|
}
|
|
107341
107410
|
});
|
|
107342
107411
|
|
|
107412
|
+
// detox/launch-permissions.ts
|
|
107413
|
+
function buildPermissionSeedScript(seed) {
|
|
107414
|
+
const inbox = JSON.stringify(PERMISSION_BOOT_SEED_STORAGE_KEY);
|
|
107415
|
+
const marker = JSON.stringify(PERMISSION_BOOT_SEED_SENT_KEY);
|
|
107416
|
+
const payload = JSON.stringify(seed);
|
|
107417
|
+
return `(function(){var K=${inbox},M=${marker},S=${payload};
|
|
107418
|
+
if(typeof window!=='undefined'&&window!==window.top)return;
|
|
107419
|
+
try{var nav=typeof performance!=='undefined'&&performance.getEntriesByType?performance.getEntriesByType('navigation')[0]:null;if(nav&&nav.type==='reload')return;}catch(_){/* fall through to the marker */}
|
|
107420
|
+
try{if(sessionStorage.getItem(M))return;sessionStorage.setItem(M,'1');}catch(_){/* storage-less contexts seed every navigation */}
|
|
107421
|
+
try{localStorage.setItem(K,JSON.stringify(S));}catch(_){}})();`;
|
|
107422
|
+
}
|
|
107423
|
+
var PERMISSION_BOOT_SEED_STORAGE_KEY, PERMISSION_BOOT_SEED_SENT_KEY;
|
|
107424
|
+
var init_launch_permissions = __esm({
|
|
107425
|
+
"detox/launch-permissions.ts"() {
|
|
107426
|
+
"use strict";
|
|
107427
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
107428
|
+
PERMISSION_BOOT_SEED_STORAGE_KEY = "peach:permission-boot-seed:v1";
|
|
107429
|
+
PERMISSION_BOOT_SEED_SENT_KEY = "peach:permission-boot-seed:sent:v1";
|
|
107430
|
+
}
|
|
107431
|
+
});
|
|
107432
|
+
|
|
107343
107433
|
// src/app-url.ts
|
|
107344
107434
|
function normalizeAppUrlTarget(target) {
|
|
107345
107435
|
const trimmed = target.trim();
|
|
@@ -109939,6 +110029,7 @@ async function launch(opts) {
|
|
|
109939
110029
|
PEACH_PW_FETCH_PROXY_SPKI: fetchProxySpki,
|
|
109940
110030
|
SOOTSIM_PW_BRIDGE_PORT: opts.bridgePort ? String(opts.bridgePort) : "",
|
|
109941
110031
|
SOOTSIM_PW_HEADLESS: headless ? "1" : "0",
|
|
110032
|
+
PEACH_PW_BOOT_SCRIPT: opts.bootScript ?? "",
|
|
109942
110033
|
SOOTSIM_PW_USERDATADIR: resolveUserDataDir(opts),
|
|
109943
110034
|
SOOTSIM_PW_CDP_PORT: cdpPort ? String(cdpPort) : "",
|
|
109944
110035
|
PEACH_PW_HOST_COMMAND: hostCommand ? JSON.stringify(hostCommand) : "",
|
|
@@ -129538,7 +129629,7 @@ function readWindowTheme(theme, targetSdk, sources) {
|
|
|
129538
129629
|
const optOut = flag("windowOptOutEdgeToEdgeEnforcement");
|
|
129539
129630
|
const edgeToEdgeEnforced = targetSdk > 35 || targetSdk === 35 && !optOut;
|
|
129540
129631
|
const targetQ = targetSdk >= 29;
|
|
129541
|
-
const
|
|
129632
|
+
const window2 = {
|
|
129542
129633
|
edgeToEdgeEnforced,
|
|
129543
129634
|
statusBarContrastEnforced: targetQ && flag("enforceStatusBarContrast"),
|
|
129544
129635
|
navigationBarContrastEnforced: targetQ && flag("enforceNavigationBarContrast", true),
|
|
@@ -129551,7 +129642,7 @@ function readWindowTheme(theme, targetSdk, sources) {
|
|
|
129551
129642
|
const navigationDefault = resourceColor("android", "navigation_bar_default", sources);
|
|
129552
129643
|
const navigationTheme = navigationColor ?? navigationDefault;
|
|
129553
129644
|
const navigationBarColor = navigationTheme === navigationDefault && !edgeToEdgeEnforced ? resourceColor("android", "navigation_bar_compatible", sources) : navigationTheme;
|
|
129554
|
-
if (edgeToEdgeEnforced) return { ...
|
|
129645
|
+
if (edgeToEdgeEnforced) return { ...window2, statusBarColor: 0, navigationBarColor };
|
|
129555
129646
|
if (!flag("windowDrawsSystemBarBackgrounds"))
|
|
129556
129647
|
throw new Error(
|
|
129557
129648
|
`${name3} does not draw system bar backgrounds; Peach draws only theme status bar colors`
|
|
@@ -129559,7 +129650,7 @@ function readWindowTheme(theme, targetSdk, sources) {
|
|
|
129559
129650
|
const color2 = resolveThemeAttribute(name3, "statusBarColor", sources);
|
|
129560
129651
|
if (typeof color2 === "boolean")
|
|
129561
129652
|
throw new Error(`${name3}: statusBarColor is not a color`);
|
|
129562
|
-
return { ...
|
|
129653
|
+
return { ...window2, statusBarColor: color2 ?? 4278190080, navigationBarColor };
|
|
129563
129654
|
}
|
|
129564
129655
|
function enabled(element) {
|
|
129565
129656
|
return element.attributes[`${ANDROID_NS}enabled`] !== "false";
|
|
@@ -132209,8 +132300,15 @@ async function openSim(args, opts) {
|
|
|
132209
132300
|
}
|
|
132210
132301
|
const connectWait = resolveDriverConnectWaitOptions();
|
|
132211
132302
|
opts.signal?.throwIfAborted();
|
|
132303
|
+
const seededLaunchPermissions = driverId === "playwright" && shellUrlPlatform(builtShellUrl) === "ios" && getCliRuntime().render_worker_app_load.isAppBootTargetUrl(builtShellUrl) ? opts.launchPermissions : void 0;
|
|
132212
132304
|
const result = await driver.launch({
|
|
132213
132305
|
url: openUrl2,
|
|
132306
|
+
bootScript: seededLaunchPermissions && buildPermissionSeedScript({
|
|
132307
|
+
appId: null,
|
|
132308
|
+
platform: "ios",
|
|
132309
|
+
presets: seededLaunchPermissions,
|
|
132310
|
+
grantInstallPermissions: false
|
|
132311
|
+
}),
|
|
132214
132312
|
// the shell serves the sim page but its WS bridge may have drifted off
|
|
132215
132313
|
// the shell-port-implied default. inject the bridge this command settled
|
|
132216
132314
|
// on so the page does not reconnect to a stale world. re-deriving it from
|
|
@@ -132235,7 +132333,10 @@ async function openSim(args, opts) {
|
|
|
132235
132333
|
} : void 0),
|
|
132236
132334
|
connectTimeoutMs: connectWait.hostTimeoutMs
|
|
132237
132335
|
});
|
|
132238
|
-
if (opts.resources)
|
|
132336
|
+
if (opts.resources) {
|
|
132337
|
+
opts.resources.driver = { ...result, driverId };
|
|
132338
|
+
opts.resources.launchPermissionsSeeded = seededLaunchPermissions !== void 0 && result.launched;
|
|
132339
|
+
}
|
|
132239
132340
|
opts.signal?.throwIfAborted();
|
|
132240
132341
|
if (!result.launched) {
|
|
132241
132342
|
console.error(` ${driver.name} driver: ${result.message}`);
|
|
@@ -132662,6 +132763,7 @@ var init_control = __esm({
|
|
|
132662
132763
|
init_src();
|
|
132663
132764
|
import_ws7 = require("ws");
|
|
132664
132765
|
init_agent_identity();
|
|
132766
|
+
init_launch_permissions();
|
|
132665
132767
|
init_androidRootModuleContract();
|
|
132666
132768
|
init_app_url();
|
|
132667
132769
|
init_backend_origin();
|
|
@@ -134350,6 +134452,7 @@ var init_recording_access = __esm({
|
|
|
134350
134452
|
var bridge_flow_runner_exports = {};
|
|
134351
134453
|
__export(bridge_flow_runner_exports, {
|
|
134352
134454
|
SootSimBridgeFlowRunner: () => SootSimBridgeFlowRunner,
|
|
134455
|
+
firstPlainLaunchPermissions: () => firstPlainLaunchPermissions,
|
|
134353
134456
|
normalizeFlowScreenshotSpec: () => normalizeFlowScreenshotSpec,
|
|
134354
134457
|
parseFlowSteps: () => parseFlowSteps,
|
|
134355
134458
|
resolveFlowScreenshotPathWithMode: () => resolveFlowScreenshotPathWithMode
|
|
@@ -134600,6 +134703,19 @@ function readBooleanKey(value, key2) {
|
|
|
134600
134703
|
if (!isObjectRecord(value)) return false;
|
|
134601
134704
|
return value[key2] === true;
|
|
134602
134705
|
}
|
|
134706
|
+
function firstPlainLaunchPermissions(steps) {
|
|
134707
|
+
const first = steps[0];
|
|
134708
|
+
if (first === void 0) return null;
|
|
134709
|
+
const step = typeof first === "string" ? normalizeBareStringStep(first) : first;
|
|
134710
|
+
if (!step.launchApp || JSON.stringify(step.launchApp).includes("${")) return null;
|
|
134711
|
+
return plainLaunchPermissions(step.launchApp);
|
|
134712
|
+
}
|
|
134713
|
+
function plainLaunchPermissions(opts) {
|
|
134714
|
+
if (isObjectRecord(opts) && (opts.clearState || opts.clearKeychain === true || opts.resetRuntime === true || opts.stopApp === false || Object.prototype.hasOwnProperty.call(opts, "arguments"))) {
|
|
134715
|
+
return null;
|
|
134716
|
+
}
|
|
134717
|
+
return maestroLaunchPermissions(isObjectRecord(opts) ? opts.permissions : void 0);
|
|
134718
|
+
}
|
|
134603
134719
|
function maestroLaunchPermissions(permissions) {
|
|
134604
134720
|
const entries = isObjectRecord(permissions) ? Object.entries(permissions) : [["all", "allow"]];
|
|
134605
134721
|
const statuses = /* @__PURE__ */ new Map();
|
|
@@ -134896,6 +135012,9 @@ var init_bridge_flow_runner = __esm({
|
|
|
134896
135012
|
this.opts = opts;
|
|
134897
135013
|
}
|
|
134898
135014
|
stepDelay = 0;
|
|
135015
|
+
// the launch permissions the open that started this sim deposited before
|
|
135016
|
+
// its app booted, while that boot is still the app's only one
|
|
135017
|
+
seededLaunchPermissions = null;
|
|
134899
135018
|
// maestro-compatible JS context for the whole flow run (shared with
|
|
134900
135019
|
// runFlow sub-flows): `${...}` templates, runScript, evalScript, output,
|
|
134901
135020
|
// maestro.copiedText. one per runner = one per flow file, like upstream.
|
|
@@ -134947,11 +135066,11 @@ var init_bridge_flow_runner = __esm({
|
|
|
134947
135066
|
const snapshot = await this.callTest(
|
|
134948
135067
|
"getSurfaceMetricsSnapshot"
|
|
134949
135068
|
);
|
|
134950
|
-
const
|
|
134951
|
-
if (!
|
|
135069
|
+
const window2 = snapshot?.window;
|
|
135070
|
+
if (!window2 || typeof window2 !== "object" || !("width" in window2) || !("height" in window2) || typeof window2.width !== "number" || typeof window2.height !== "number" || !Number.isFinite(window2.width) || !Number.isFinite(window2.height) || window2.width <= 0 || window2.height <= 0) {
|
|
134952
135071
|
throw new Error("live screen dimensions are unavailable");
|
|
134953
135072
|
}
|
|
134954
|
-
return { x: 0, y: 0, width:
|
|
135073
|
+
return { x: 0, y: 0, width: window2.width, height: window2.height };
|
|
134955
135074
|
}
|
|
134956
135075
|
// ordered input batch executed inside the page in one round-trip; the
|
|
134957
135076
|
// engine emits agent-cursor actions for every step natively.
|
|
@@ -136377,7 +136496,10 @@ var init_bridge_flow_runner = __esm({
|
|
|
136377
136496
|
if (!this.firstLaunchDone && !this.appStopped) await this.waitForTree(12e4);
|
|
136378
136497
|
await this.clearKeychain();
|
|
136379
136498
|
}
|
|
136380
|
-
|
|
136499
|
+
const bootedByOpen = this.openBootIsLaunch(opts);
|
|
136500
|
+
if (!bootedByOpen) {
|
|
136501
|
+
await this.setLaunchPermissions(isObjectRecord(opts) ? opts.permissions : void 0);
|
|
136502
|
+
}
|
|
136381
136503
|
if (!this.firstLaunchDone) {
|
|
136382
136504
|
this.firstLaunchDone = true;
|
|
136383
136505
|
if (wantsClear) {
|
|
@@ -136411,8 +136533,8 @@ var init_bridge_flow_runner = __esm({
|
|
|
136411
136533
|
await this.waitForTree(12e4);
|
|
136412
136534
|
await this.waitForTree(3e4);
|
|
136413
136535
|
} else {
|
|
136414
|
-
const launched = await this.launchShellAppFromHomeIfNeeded(opts);
|
|
136415
|
-
if (!launched && !wantsForeground) {
|
|
136536
|
+
const launched = !bootedByOpen && await this.launchShellAppFromHomeIfNeeded(opts);
|
|
136537
|
+
if (!launched && !wantsForeground && !bootedByOpen) {
|
|
136416
136538
|
await this.waitForTree(12e4);
|
|
136417
136539
|
await this.reloadGuestAppRuntime({
|
|
136418
136540
|
launchArguments: null,
|
|
@@ -136454,6 +136576,14 @@ var init_bridge_flow_runner = __esm({
|
|
|
136454
136576
|
await this.ensureRecordingStarted();
|
|
136455
136577
|
}
|
|
136456
136578
|
}
|
|
136579
|
+
// maestro sets permissions and then launches. a sim opened with this
|
|
136580
|
+
// step's permissions already deposited has done both in its one boot.
|
|
136581
|
+
openBootIsLaunch(opts) {
|
|
136582
|
+
const seeded = this.seededLaunchPermissions;
|
|
136583
|
+
if (!seeded || this.firstLaunchDone || this.appStopped) return false;
|
|
136584
|
+
const wanted = plainLaunchPermissions(opts);
|
|
136585
|
+
return wanted !== null && wanted.size === seeded.size && [...wanted].every(([kind, status]) => seeded.get(kind) === status);
|
|
136586
|
+
}
|
|
136457
136587
|
async setLaunchPermissions(permissions) {
|
|
136458
136588
|
const statuses = maestroLaunchPermissions(permissions);
|
|
136459
136589
|
const appId = await this.callTest("permissionGuestAppId");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2228 | (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;
|
|
@@ -64,6 +64,7 @@ __export(swift_compile_exports, {
|
|
|
64
64
|
swiftCompileSdkOptions: () => swiftCompileSdkOptions,
|
|
65
65
|
swiftCrossImportFlags: () => swiftCrossImportFlags,
|
|
66
66
|
swiftDistributionAt: () => swiftDistributionAt,
|
|
67
|
+
swiftHeaderWithSuperclassImports: () => swiftHeaderWithSuperclassImports,
|
|
67
68
|
swiftIcuAddress: () => swiftIcuAddress,
|
|
68
69
|
swiftIcuAsset: () => swiftIcuAsset,
|
|
69
70
|
swiftIcuBundleAsset: () => swiftIcuBundleAsset,
|
|
@@ -12105,6 +12106,20 @@ var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIK
|
|
|
12105
12106
|
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
12106
12107
|
"@import Foundation;"
|
|
12107
12108
|
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
12109
|
+
function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
12110
|
+
const superclasses = new Set(
|
|
12111
|
+
[...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1])
|
|
12112
|
+
);
|
|
12113
|
+
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12114
|
+
const dependency = interfaceFor(name2);
|
|
12115
|
+
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12116
|
+
(name3) => superclasses.has(name3)
|
|
12117
|
+
))
|
|
12118
|
+
return statement;
|
|
12119
|
+
return `${statement}
|
|
12120
|
+
#import ${JSON.stringify(dependency.file)}`;
|
|
12121
|
+
});
|
|
12122
|
+
}
|
|
12108
12123
|
var swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
|
|
12109
12124
|
...[
|
|
12110
12125
|
...header.matchAll(
|
|
@@ -12462,7 +12477,7 @@ var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
|
12462
12477
|
function swiftOptionalFramework(name2) {
|
|
12463
12478
|
return OPTIONAL_FRAMEWORKS.has(name2);
|
|
12464
12479
|
}
|
|
12465
|
-
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
12480
|
+
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|fileprivate|private)\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
12466
12481
|
var kleeneNot = (value) => value === void 0 ? void 0 : !value;
|
|
12467
12482
|
var kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
|
|
12468
12483
|
var kleeneOr = (left, right) => left === true || right === true ? true : left === false && right === false ? false : void 0;
|
|
@@ -12963,7 +12978,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12963
12978
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12964
12979
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12965
12980
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12966
|
-
var compilerSourceDigest = true ? "
|
|
12981
|
+
var compilerSourceDigest = true ? "280e858b01b1c1393d3765c8d6ff1b3ce4a1a93d7fb7e3dd2d4d3e5f1d5f1ac2" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12967
12982
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12968
12983
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12969
12984
|
hash.update(`swift-compile
|
|
@@ -17269,6 +17284,51 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17269
17284
|
if ((0, import_node_fs25.existsSync)(linked) && (0, import_node_fs25.statSync)(linked).size <= 8)
|
|
17270
17285
|
(0, import_node_fs25.rmSync)(linked, { force: true });
|
|
17271
17286
|
report("compiling and linking Swift modules");
|
|
17287
|
+
const frameworkInterfaces = /* @__PURE__ */ new Map();
|
|
17288
|
+
const frameworkInterface = (name2) => {
|
|
17289
|
+
if (frameworkInterfaces.has(name2)) return frameworkInterfaces.get(name2);
|
|
17290
|
+
const source = distribution ? import_node_path27.default.join(frameworkRoot, "modules", `${name2}-Swift.h`) : import_node_path27.default.join(
|
|
17291
|
+
prebuilt.modules,
|
|
17292
|
+
"..",
|
|
17293
|
+
`${name2}.build/include/${name2}-Swift.h`
|
|
17294
|
+
);
|
|
17295
|
+
if (!(0, import_node_fs25.existsSync)(source)) {
|
|
17296
|
+
frameworkInterfaces.set(name2, null);
|
|
17297
|
+
return null;
|
|
17298
|
+
}
|
|
17299
|
+
const headers = import_node_path27.default.join(
|
|
17300
|
+
swiftSdkPaths(frameworkRoot, options.toolchainBin).darwin,
|
|
17301
|
+
`System/Library/Frameworks/${name2}.framework/Headers`
|
|
17302
|
+
);
|
|
17303
|
+
const declared = /* @__PURE__ */ new Set();
|
|
17304
|
+
if ((0, import_node_fs25.existsSync)(headers)) {
|
|
17305
|
+
for (const file of (0, import_node_fs25.readdirSync)(headers, {
|
|
17306
|
+
recursive: true,
|
|
17307
|
+
encoding: "utf8"
|
|
17308
|
+
}))
|
|
17309
|
+
if (file.endsWith(".h"))
|
|
17310
|
+
for (const name3 of swiftInterfaceDeclarations(
|
|
17311
|
+
(0, import_node_fs25.readFileSync)(import_node_path27.default.join(headers, file), "utf8")
|
|
17312
|
+
))
|
|
17313
|
+
declared.add(name3);
|
|
17314
|
+
}
|
|
17315
|
+
const header = withoutSwiftDeclarations(
|
|
17316
|
+
clangInterfaceHeader((0, import_node_fs25.readFileSync)(source, "utf8")),
|
|
17317
|
+
declared,
|
|
17318
|
+
`#import <${name2}/${name2}.h>`
|
|
17319
|
+
);
|
|
17320
|
+
const value = {
|
|
17321
|
+
file: import_node_path27.default.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17322
|
+
header
|
|
17323
|
+
};
|
|
17324
|
+
frameworkInterfaces.set(name2, value);
|
|
17325
|
+
writeBuildFile(
|
|
17326
|
+
value.file,
|
|
17327
|
+
((0, import_node_fs25.existsSync)(import_node_path27.default.join(headers, `${name2}.h`)) ? `#import <${name2}/${name2}.h>
|
|
17328
|
+
` : "") + swiftHeaderWithSuperclassImports(header, frameworkInterface)
|
|
17329
|
+
);
|
|
17330
|
+
return value;
|
|
17331
|
+
};
|
|
17272
17332
|
try {
|
|
17273
17333
|
const headerBuilds = preparation.headerProductTarget ? [
|
|
17274
17334
|
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
@@ -17296,7 +17356,10 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17296
17356
|
writeBuildFile(
|
|
17297
17357
|
emitted,
|
|
17298
17358
|
withoutSwiftDeclarations(
|
|
17299
|
-
|
|
17359
|
+
swiftHeaderWithSuperclassImports(
|
|
17360
|
+
clangInterfaceHeader((0, import_node_fs25.readFileSync)(original, "utf8")),
|
|
17361
|
+
frameworkInterface
|
|
17362
|
+
),
|
|
17300
17363
|
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
17301
17364
|
`#import <${producer}/${producer}.h>`
|
|
17302
17365
|
)
|
|
@@ -17472,6 +17535,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17472
17535
|
swiftCompileSdkOptions,
|
|
17473
17536
|
swiftCrossImportFlags,
|
|
17474
17537
|
swiftDistributionAt,
|
|
17538
|
+
swiftHeaderWithSuperclassImports,
|
|
17475
17539
|
swiftIcuAddress,
|
|
17476
17540
|
swiftIcuAsset,
|
|
17477
17541
|
swiftIcuBundleAsset,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2228 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -12084,6 +12084,20 @@ var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIK
|
|
|
12084
12084
|
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
12085
12085
|
"@import Foundation;"
|
|
12086
12086
|
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
12087
|
+
function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
12088
|
+
const superclasses = new Set(
|
|
12089
|
+
[...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1])
|
|
12090
|
+
);
|
|
12091
|
+
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12092
|
+
const dependency = interfaceFor(name2);
|
|
12093
|
+
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12094
|
+
(name3) => superclasses.has(name3)
|
|
12095
|
+
))
|
|
12096
|
+
return statement;
|
|
12097
|
+
return `${statement}
|
|
12098
|
+
#import ${JSON.stringify(dependency.file)}`;
|
|
12099
|
+
});
|
|
12100
|
+
}
|
|
12087
12101
|
var swiftInterfaceDeclarations = (header) => /* @__PURE__ */ new Set([
|
|
12088
12102
|
...[
|
|
12089
12103
|
...header.matchAll(
|
|
@@ -12441,7 +12455,7 @@ var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
|
12441
12455
|
function swiftOptionalFramework(name2) {
|
|
12442
12456
|
return OPTIONAL_FRAMEWORKS.has(name2);
|
|
12443
12457
|
}
|
|
12444
|
-
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
12458
|
+
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|fileprivate|private)\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
12445
12459
|
var kleeneNot = (value) => value === void 0 ? void 0 : !value;
|
|
12446
12460
|
var kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
|
|
12447
12461
|
var kleeneOr = (left, right) => left === true || right === true ? true : left === false && right === false ? false : void 0;
|
|
@@ -12942,7 +12956,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12942
12956
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12943
12957
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12944
12958
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12945
|
-
var compilerSourceDigest = true ? "
|
|
12959
|
+
var compilerSourceDigest = true ? "280e858b01b1c1393d3765c8d6ff1b3ce4a1a93d7fb7e3dd2d4d3e5f1d5f1ac2" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12946
12960
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12947
12961
|
const hash = createHash13("sha256");
|
|
12948
12962
|
hash.update(`swift-compile
|
|
@@ -17248,6 +17262,51 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17248
17262
|
if (existsSync5(linked) && statSync2(linked).size <= 8)
|
|
17249
17263
|
rmSync7(linked, { force: true });
|
|
17250
17264
|
report("compiling and linking Swift modules");
|
|
17265
|
+
const frameworkInterfaces = /* @__PURE__ */ new Map();
|
|
17266
|
+
const frameworkInterface = (name2) => {
|
|
17267
|
+
if (frameworkInterfaces.has(name2)) return frameworkInterfaces.get(name2);
|
|
17268
|
+
const source = distribution ? path27.join(frameworkRoot, "modules", `${name2}-Swift.h`) : path27.join(
|
|
17269
|
+
prebuilt.modules,
|
|
17270
|
+
"..",
|
|
17271
|
+
`${name2}.build/include/${name2}-Swift.h`
|
|
17272
|
+
);
|
|
17273
|
+
if (!existsSync5(source)) {
|
|
17274
|
+
frameworkInterfaces.set(name2, null);
|
|
17275
|
+
return null;
|
|
17276
|
+
}
|
|
17277
|
+
const headers = path27.join(
|
|
17278
|
+
swiftSdkPaths(frameworkRoot, options.toolchainBin).darwin,
|
|
17279
|
+
`System/Library/Frameworks/${name2}.framework/Headers`
|
|
17280
|
+
);
|
|
17281
|
+
const declared = /* @__PURE__ */ new Set();
|
|
17282
|
+
if (existsSync5(headers)) {
|
|
17283
|
+
for (const file of readdirSync8(headers, {
|
|
17284
|
+
recursive: true,
|
|
17285
|
+
encoding: "utf8"
|
|
17286
|
+
}))
|
|
17287
|
+
if (file.endsWith(".h"))
|
|
17288
|
+
for (const name3 of swiftInterfaceDeclarations(
|
|
17289
|
+
readFileSync17(path27.join(headers, file), "utf8")
|
|
17290
|
+
))
|
|
17291
|
+
declared.add(name3);
|
|
17292
|
+
}
|
|
17293
|
+
const header = withoutSwiftDeclarations(
|
|
17294
|
+
clangInterfaceHeader(readFileSync17(source, "utf8")),
|
|
17295
|
+
declared,
|
|
17296
|
+
`#import <${name2}/${name2}.h>`
|
|
17297
|
+
);
|
|
17298
|
+
const value = {
|
|
17299
|
+
file: path27.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17300
|
+
header
|
|
17301
|
+
};
|
|
17302
|
+
frameworkInterfaces.set(name2, value);
|
|
17303
|
+
writeBuildFile(
|
|
17304
|
+
value.file,
|
|
17305
|
+
(existsSync5(path27.join(headers, `${name2}.h`)) ? `#import <${name2}/${name2}.h>
|
|
17306
|
+
` : "") + swiftHeaderWithSuperclassImports(header, frameworkInterface)
|
|
17307
|
+
);
|
|
17308
|
+
return value;
|
|
17309
|
+
};
|
|
17251
17310
|
try {
|
|
17252
17311
|
const headerBuilds = preparation.headerProductTarget ? [
|
|
17253
17312
|
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
@@ -17275,7 +17334,10 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17275
17334
|
writeBuildFile(
|
|
17276
17335
|
emitted,
|
|
17277
17336
|
withoutSwiftDeclarations(
|
|
17278
|
-
|
|
17337
|
+
swiftHeaderWithSuperclassImports(
|
|
17338
|
+
clangInterfaceHeader(readFileSync17(original, "utf8")),
|
|
17339
|
+
frameworkInterface
|
|
17340
|
+
),
|
|
17279
17341
|
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
17280
17342
|
`#import <${producer}/${producer}.h>`
|
|
17281
17343
|
)
|
|
@@ -17450,6 +17512,7 @@ export {
|
|
|
17450
17512
|
swiftCompileSdkOptions,
|
|
17451
17513
|
swiftCrossImportFlags,
|
|
17452
17514
|
swiftDistributionAt,
|
|
17515
|
+
swiftHeaderWithSuperclassImports,
|
|
17453
17516
|
swiftIcuAddress,
|
|
17454
17517
|
swiftIcuAsset,
|
|
17455
17518
|
swiftIcuBundleAsset,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2228 | (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.2228 | (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.2228 | (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.2228 | (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;
|