peachsim 0.1.2406 → 0.1.2409
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/agent-note.ts +231 -0
- package/cli/cloud-client.ts +8 -3
- package/cli/cloud-dispatch.ts +1 -1
- package/cli/command-agent.ts +122 -0
- package/cli/commands/agent.ts +29 -26
- package/cli/commands/stream.ts +11 -7
- package/cli/main.ts +16 -2
- package/cli/outbound-endpoints.ts +15 -0
- package/cli/ws-bridge.ts +4 -1
- package/dist-lib/agent-daemon-client.cjs +23 -3
- 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 +205 -62
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +20 -1
- package/dist-lib/cloud-contract.mjs +18 -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 +1630 -1513
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +203 -60
- 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 +394 -102
- package/dist-lib/host/fetch-proxy-handler.cjs +5 -5
- 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 +392 -272
- 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 +5 -5
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -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 +70 -60
- 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 +1199 -821
- package/dist-lib/swift-compile.cjs +197 -55
- package/dist-lib/swift-compile.mjs +197 -55
- 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 +213 -58
- package/dist-lib/vite.cjs +5 -5
- 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-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +7 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/skills/peach-setup/SKILL.md +8 -3
- package/src/agent-daemon-client.ts +35 -2
- package/src/agent-prompt.ts +68 -0
- package/src/bridge-contract.ts +4 -0
- package/src/canvas-agent-note-delivery.ts +83 -0
- package/src/cloud-contract.ts +30 -0
- package/src/host/agent-host.ts +128 -18
- package/src/swift-compile.ts +124 -66
- package/src/swift-host.ts +2 -1
- package/src/swift-objc-import.ts +99 -0
- package/src/swift-packages.ts +1 -0
- package/src/swift-shared-sdk.ts +2 -1
- package/src/xcode-header-search.ts +33 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2409 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2409 | (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;
|
|
@@ -7099,7 +7099,7 @@ var swiftCoverageProvenance;
|
|
|
7099
7099
|
var init_provenance = __esm({
|
|
7100
7100
|
"src/swift-coverage/provenance.ts"() {
|
|
7101
7101
|
"use strict";
|
|
7102
|
-
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"
|
|
7102
|
+
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"092e07d3f9154f5aaf9f7c668f16c933c3ac5d8c57e5c32df0222ae6f785eaf7","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
|
|
7103
7103
|
}
|
|
7104
7104
|
});
|
|
7105
7105
|
|
|
@@ -16319,7 +16319,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
|
|
|
16319
16319
|
const overlayFiles = (0, import_node_fs39.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path37.default.join(entry.parentPath, entry.name)).sort();
|
|
16320
16320
|
const key2 = JSON.stringify([
|
|
16321
16321
|
// bump the recipe when the transformation changes; bundling changes function text.
|
|
16322
|
-
"
|
|
16322
|
+
"v25",
|
|
16323
16323
|
[...WEAKEN_FOUNDATION_SYMS],
|
|
16324
16324
|
toolchainBin,
|
|
16325
16325
|
sdk2,
|
|
@@ -16379,6 +16379,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
|
|
|
16379
16379
|
"objc/NSObject.h",
|
|
16380
16380
|
"ObjectiveC.apinotes",
|
|
16381
16381
|
"net/if.h",
|
|
16382
|
+
"netinet/tcp.h",
|
|
16382
16383
|
"notify.h",
|
|
16383
16384
|
"notify.modulemap",
|
|
16384
16385
|
"module.modulemap",
|
|
@@ -24008,6 +24009,61 @@ function swiftClangImporterFlags(flags) {
|
|
|
24008
24009
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
24009
24010
|
);
|
|
24010
24011
|
}
|
|
24012
|
+
function compactSwiftClangDefines(flags) {
|
|
24013
|
+
const definitions = /* @__PURE__ */ new Map();
|
|
24014
|
+
const macros = [];
|
|
24015
|
+
for (let index = 0; index < flags.length; index++) {
|
|
24016
|
+
if (flags[index].startsWith("@")) return flags;
|
|
24017
|
+
if (flags[index] !== "-Xcc") continue;
|
|
24018
|
+
const flag = flags[++index];
|
|
24019
|
+
if (flag === void 0 || flags[index - 2] === "-Xfrontend" || flag === "-Xclang" || flag === "-Xpreprocessor" || flag.startsWith("-Wp,") || flag.startsWith("--config") || flag.startsWith("@"))
|
|
24020
|
+
return flags;
|
|
24021
|
+
if (CLANG_PATH_OPTIONS.has(flag) && flags[index + 1] === "-Xcc") {
|
|
24022
|
+
index += 2;
|
|
24023
|
+
continue;
|
|
24024
|
+
}
|
|
24025
|
+
if (!flag.startsWith("-D") && !flag.startsWith("-U")) continue;
|
|
24026
|
+
const name3 = /^-[DU]([A-Za-z_$][\w$]*)(?=[(=]|$)/.exec(flag)?.[1];
|
|
24027
|
+
if (!name3) return flags;
|
|
24028
|
+
const previous = definitions.get(name3);
|
|
24029
|
+
definitions.set(name3, previous === void 0 || previous === flag ? flag : null);
|
|
24030
|
+
macros.push({ index, name: name3, flag });
|
|
24031
|
+
}
|
|
24032
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24033
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
24034
|
+
for (const { index, name: name3, flag } of macros) {
|
|
24035
|
+
if (definitions.get(name3) !== flag) continue;
|
|
24036
|
+
if (seen.has(name3)) {
|
|
24037
|
+
duplicates.add(index - 1);
|
|
24038
|
+
duplicates.add(index);
|
|
24039
|
+
}
|
|
24040
|
+
seen.add(name3);
|
|
24041
|
+
}
|
|
24042
|
+
return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
|
|
24043
|
+
}
|
|
24044
|
+
function compactSwiftClangOverlays(flags, generated) {
|
|
24045
|
+
if (generated.size === 0) return flags;
|
|
24046
|
+
const overlays = /* @__PURE__ */ new Map();
|
|
24047
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
24048
|
+
for (let index = 0; index < flags.length; index++) {
|
|
24049
|
+
const flag = flags[index];
|
|
24050
|
+
if (flag.startsWith("@")) return flags;
|
|
24051
|
+
if (flag === "-Xcc" && flags[index - 1] === "-Xfrontend") return flags;
|
|
24052
|
+
if (flags[index - 1] === "-Xcc" && (flag.startsWith("--config") || flag === "-Xclang"))
|
|
24053
|
+
return flags;
|
|
24054
|
+
if (!flag.startsWith("-ivfsoverlay") && !flag.startsWith("-vfsoverlay")) continue;
|
|
24055
|
+
if (flag !== "-ivfsoverlay" || flags[index - 1] !== "-Xcc" || flags[index + 1] !== "-Xcc")
|
|
24056
|
+
return flags;
|
|
24057
|
+
const file = flags[index + 2];
|
|
24058
|
+
if (file === void 0 || !generated.has(file)) return flags;
|
|
24059
|
+
const previous = overlays.get(file);
|
|
24060
|
+
if (previous !== void 0)
|
|
24061
|
+
for (let offset = -1; offset < 3; offset++) duplicates.add(previous + offset);
|
|
24062
|
+
overlays.set(file, index);
|
|
24063
|
+
index += 2;
|
|
24064
|
+
}
|
|
24065
|
+
return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
|
|
24066
|
+
}
|
|
24011
24067
|
function swiftSubmoduleImports(sources) {
|
|
24012
24068
|
const imports2 = /* @__PURE__ */ new Map();
|
|
24013
24069
|
for (const source of sources)
|
|
@@ -24032,7 +24088,7 @@ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new S
|
|
|
24032
24088
|
""
|
|
24033
24089
|
].join("\n");
|
|
24034
24090
|
}
|
|
24035
|
-
var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
|
|
24091
|
+
var SWIFT_OBJC_INTEROP_FLAGS, CLANG_PATH_OPTIONS, SWIFT_SUBMODULE_IMPORT;
|
|
24036
24092
|
var init_swift_objc_import = __esm({
|
|
24037
24093
|
"src/swift-objc-import.ts"() {
|
|
24038
24094
|
"use strict";
|
|
@@ -24046,6 +24102,23 @@ var init_swift_objc_import = __esm({
|
|
|
24046
24102
|
"-Xcc",
|
|
24047
24103
|
"-fblocks"
|
|
24048
24104
|
];
|
|
24105
|
+
CLANG_PATH_OPTIONS = /* @__PURE__ */ new Set([
|
|
24106
|
+
"-I",
|
|
24107
|
+
"-F",
|
|
24108
|
+
"-idirafter",
|
|
24109
|
+
"-iframework",
|
|
24110
|
+
"-iframeworkwithsysroot",
|
|
24111
|
+
"-imacros",
|
|
24112
|
+
"-include",
|
|
24113
|
+
"-iprefix",
|
|
24114
|
+
"-iquote",
|
|
24115
|
+
"-isystem",
|
|
24116
|
+
"-isysroot",
|
|
24117
|
+
"-ivfsoverlay",
|
|
24118
|
+
"-iwithprefix",
|
|
24119
|
+
"-iwithprefixbefore",
|
|
24120
|
+
"--sysroot"
|
|
24121
|
+
]);
|
|
24049
24122
|
SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
24050
24123
|
}
|
|
24051
24124
|
});
|
|
@@ -24415,6 +24488,30 @@ var init_swift_uniform_type_constants = __esm({
|
|
|
24415
24488
|
});
|
|
24416
24489
|
|
|
24417
24490
|
// src/xcode-header-search.ts
|
|
24491
|
+
function coalescibleHeaderOverlays(files2) {
|
|
24492
|
+
const aliases = /* @__PURE__ */ new Map();
|
|
24493
|
+
const key2 = (file) => file.replace(/[A-Z]/g, (letter) => letter.toLowerCase());
|
|
24494
|
+
const index = (directory2, entry) => {
|
|
24495
|
+
const name3 = import_node_path52.default.resolve(directory2, entry.name);
|
|
24496
|
+
if (entry.type === "directory")
|
|
24497
|
+
return entry.contents.every((child) => index(name3, child));
|
|
24498
|
+
const source = entry["external-contents"];
|
|
24499
|
+
const previous = aliases.get(key2(name3));
|
|
24500
|
+
if (previous !== void 0 && previous !== source) return false;
|
|
24501
|
+
aliases.set(key2(name3), source);
|
|
24502
|
+
return true;
|
|
24503
|
+
};
|
|
24504
|
+
for (const file of files2) {
|
|
24505
|
+
const overlay = JSON.parse(import_node_fs54.default.readFileSync(file, "utf8"));
|
|
24506
|
+
if (!overlay.roots.every((entry) => index(import_node_path52.default.dirname(file), entry)))
|
|
24507
|
+
return /* @__PURE__ */ new Set();
|
|
24508
|
+
}
|
|
24509
|
+
for (const file of [...files2, ...aliases.values()]) {
|
|
24510
|
+
const source = aliases.get(key2(import_node_path52.default.normalize(file)));
|
|
24511
|
+
if (source !== void 0 && source !== file) return /* @__PURE__ */ new Set();
|
|
24512
|
+
}
|
|
24513
|
+
return files2;
|
|
24514
|
+
}
|
|
24418
24515
|
function headerMap(entries) {
|
|
24419
24516
|
const unique = /* @__PURE__ */ new Map();
|
|
24420
24517
|
for (const entry of entries)
|
|
@@ -25339,6 +25436,15 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
25339
25436
|
)
|
|
25340
25437
|
);
|
|
25341
25438
|
const names = /* @__PURE__ */ new Set([...frameworks, ...targets.map((target) => target.name)]);
|
|
25439
|
+
const entriesByPrefix = new Map(
|
|
25440
|
+
targets.map(({ path: path79 }) => [path79 === "." ? "" : `${path79}/`, []])
|
|
25441
|
+
);
|
|
25442
|
+
for (const entry of Object.entries(files2)) {
|
|
25443
|
+
const [file] = entry;
|
|
25444
|
+
entriesByPrefix.get("")?.push(entry);
|
|
25445
|
+
for (let end = file.indexOf("/"); end !== -1; end = file.indexOf("/", end + 1))
|
|
25446
|
+
entriesByPrefix.get(file.slice(0, end + 1))?.push(entry);
|
|
25447
|
+
}
|
|
25342
25448
|
const siblings = /* @__PURE__ */ new Map();
|
|
25343
25449
|
for (const target of targets) {
|
|
25344
25450
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
@@ -25352,8 +25458,11 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
25352
25458
|
(dependency) => dependency.kind === "target" && dependency.name !== target.name && names.has(dependency.name) || dependency.kind === "product" && dependency.package === "sootsim-swift" && OPTIONAL_FRAMEWORKS.has(dependency.name) ? [dependency.name] : []
|
|
25353
25459
|
)
|
|
25354
25460
|
);
|
|
25355
|
-
|
|
25356
|
-
|
|
25461
|
+
const nested = target.sources === void 0 ? targets.flatMap(
|
|
25462
|
+
(candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) ? [`${candidate.path}/`] : []
|
|
25463
|
+
) : [];
|
|
25464
|
+
for (const [file, contents2] of entriesByPrefix.get(prefix) ?? []) {
|
|
25465
|
+
if (file === "Package.swift") continue;
|
|
25357
25466
|
const relative3 = file.slice(prefix.length);
|
|
25358
25467
|
if (target.sources !== void 0 && !target.sources.some(
|
|
25359
25468
|
(source) => source === "." || relative3 === source || relative3.startsWith(`${source}/`)
|
|
@@ -25363,10 +25472,7 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
25363
25472
|
(excluded) => relative3 === excluded || relative3.startsWith(`${excluded}/`)
|
|
25364
25473
|
))
|
|
25365
25474
|
continue;
|
|
25366
|
-
if (
|
|
25367
|
-
(candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
|
|
25368
|
-
))
|
|
25369
|
-
continue;
|
|
25475
|
+
if (nested.some((path79) => file.startsWith(path79))) continue;
|
|
25370
25476
|
const imports2 = file.endsWith(".swift") ? swiftImportNames(contents2) : SWIFT_NATIVE_SOURCE_EXTENSIONS.some((extension) => file.endsWith(extension)) ? clangImportNames(contents2, ownsHeader) : [];
|
|
25371
25477
|
for (const name3 of imports2) {
|
|
25372
25478
|
if (names.has(name3) && name3 !== target.name && !(target.dependencies !== void 0 && localNames.has(name3)))
|
|
@@ -25611,7 +25717,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
25611
25717
|
const flags = JSON.parse(literal2.replace(/,\s*]$/, "]")).filter(
|
|
25612
25718
|
(flag, index, all) => !mapsPackageModule(flag) && !(flag === "-Xcc" && mapsPackageModule(all[index + 1] ?? ""))
|
|
25613
25719
|
);
|
|
25614
|
-
const
|
|
25720
|
+
const macros = compactSwiftClangDefines(flags);
|
|
25721
|
+
const compact = args.coalescibleOverlays ? compactSwiftClangOverlays(macros, args.coalescibleOverlays) : macros;
|
|
25722
|
+
const content = compact.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
25615
25723
|
const digest3 = (0, import_node_crypto24.createHash)("sha256").update(content).digest("hex");
|
|
25616
25724
|
const file = import_node_path53.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
|
|
25617
25725
|
args.files.set(file, content);
|
|
@@ -25702,7 +25810,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
25702
25810
|
].map((flag) => `, ${JSON.stringify(flag)}`).join("");
|
|
25703
25811
|
const header = args.headerDirectory && (args.nativeHeaderDeclarations?.[target.name] || [...args.native?.values() ?? []].some(
|
|
25704
25812
|
(value) => value.late?.producers.includes(target.name)
|
|
25705
|
-
)) ? `, "-emit-objc-header-path", ${JSON.stringify(import_node_path53.default.join(args.headerDirectory, `${target.name}-Swift
|
|
25813
|
+
)) ? `, "-emit-objc-header-path", ${JSON.stringify(import_node_path53.default.join(args.headerDirectory, `${target.name}-Swift.original.h`))}` : "";
|
|
25706
25814
|
const clangMode = target.cxxInterop ? "" : ', "-Xcc", "-fno-cxx-modules"';
|
|
25707
25815
|
const deployment = `, "-Xfrontend", "-peach-ios-deployment-target", "-Xfrontend", ${JSON.stringify(target.iosDeploymentTarget ?? SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET)}`;
|
|
25708
25816
|
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation}${interoperability}${defines}${features}${upcoming} .unsafeFlags(${swiftFlagArray(`["-Osize", "-Xfrontend", "-enable-cross-import-overlays"${overlayFlags}${FOUNDATION_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}${imports2}${nativeImportFlags}${objcFlags}${header}${clangMode}${deployment}${upstream}]`)})]`;
|
|
@@ -27784,6 +27892,9 @@ module ${moduleName}.Swift {
|
|
|
27784
27892
|
nativeHeaderDeclarations[module2] = [...declared];
|
|
27785
27893
|
}
|
|
27786
27894
|
const nativeFlags = native.size > 0 ? /* @__PURE__ */ new Map() : void 0;
|
|
27895
|
+
const generatedOverlays = new Set(
|
|
27896
|
+
headerSearch.files.filter((file) => file.endsWith(".yaml"))
|
|
27897
|
+
);
|
|
27787
27898
|
if (nativeFlags) {
|
|
27788
27899
|
const toolchainBin = nativeToolchain();
|
|
27789
27900
|
const headers = import_node_path53.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "darwin");
|
|
@@ -27804,8 +27915,11 @@ module ${moduleName}.Swift {
|
|
|
27804
27915
|
throw new Error(
|
|
27805
27916
|
target.name + ": missing or unsupported declared iOS deployment target " + JSON.stringify(version2)
|
|
27806
27917
|
);
|
|
27918
|
+
const sdkIntake = objcSdkIntakeFlags(headers, toolchainBin, minimum);
|
|
27919
|
+
const sdkOverlay = sdkIntake.indexOf("-ivfsoverlay");
|
|
27920
|
+
if (sdkOverlay >= 0) generatedOverlays.add(sdkIntake[sdkOverlay + 1]);
|
|
27807
27921
|
const intake = [
|
|
27808
|
-
...
|
|
27922
|
+
...sdkIntake,
|
|
27809
27923
|
"-ivfsoverlay",
|
|
27810
27924
|
headerSearch.files[0],
|
|
27811
27925
|
"-I",
|
|
@@ -27974,6 +28088,7 @@ module ${moduleName}.Swift {
|
|
|
27974
28088
|
sourceSwiftTargets: swiftTargets,
|
|
27975
28089
|
nativeFlags,
|
|
27976
28090
|
nativeImportFlags,
|
|
28091
|
+
coalescibleOverlays: nativeFlags ? coalescibleHeaderOverlays(generatedOverlays) : void 0,
|
|
27977
28092
|
nativeHeaderFlags,
|
|
27978
28093
|
nativeSwiftHeaderMaps,
|
|
27979
28094
|
nativeHeaderDeclarations,
|
|
@@ -29272,6 +29387,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
29272
29387
|
report("compiling and linking Swift modules");
|
|
29273
29388
|
const frameworkInterfaces = /* @__PURE__ */ new Map();
|
|
29274
29389
|
const nativeDeclarations = /* @__PURE__ */ new Map();
|
|
29390
|
+
const nativeHeaders = Object.entries(input.files).filter(([name3]) => name3.endsWith(".h") && !name3.endsWith("-Swift.h")).map(([, source]) => source);
|
|
29275
29391
|
for (const [file, contents2] of Object.entries(input.files)) {
|
|
29276
29392
|
if (!file.endsWith(".modulemap")) continue;
|
|
29277
29393
|
const name3 = moduleMapName(contents2);
|
|
@@ -29359,54 +29475,83 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
29359
29475
|
);
|
|
29360
29476
|
return value;
|
|
29361
29477
|
};
|
|
29362
|
-
|
|
29363
|
-
|
|
29364
|
-
|
|
29365
|
-
|
|
29366
|
-
|
|
29367
|
-
|
|
29368
|
-
|
|
29369
|
-
|
|
29478
|
+
const compileApp = async () => {
|
|
29479
|
+
const stages = [
|
|
29480
|
+
...preparation.headerBuilds,
|
|
29481
|
+
...preparation.nativeProductTarget ? [{ target: preparation.nativeProductTarget, producers: [] }] : []
|
|
29482
|
+
];
|
|
29483
|
+
const checkpoints = import_node_path53.default.join(root, ".build", "peach-product-checkpoints");
|
|
29484
|
+
const recipe2 = (0, import_node_crypto24.createHash)("sha256").update(hash).update((0, import_node_fs55.readFileSync)(import_node_path53.default.join(root, "Package.swift"))).update(JSON.stringify(buildArgs)).digest("hex");
|
|
29485
|
+
for (const { target, producers } of stages) {
|
|
29486
|
+
const receipt = import_node_path53.default.join(
|
|
29487
|
+
checkpoints,
|
|
29488
|
+
(0, import_node_crypto24.createHash)("sha256").update(target).digest("hex")
|
|
29370
29489
|
);
|
|
29371
|
-
|
|
29372
|
-
const
|
|
29490
|
+
const headers = producers.map((producer) => {
|
|
29491
|
+
const stem = import_node_path53.default.join(
|
|
29373
29492
|
root,
|
|
29374
29493
|
".build",
|
|
29375
29494
|
"peach-cxx-headers",
|
|
29376
|
-
`${producer}-Swift
|
|
29495
|
+
`${producer}-Swift`
|
|
29377
29496
|
);
|
|
29378
|
-
|
|
29379
|
-
|
|
29380
|
-
|
|
29381
|
-
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29389
|
-
|
|
29390
|
-
generated,
|
|
29391
|
-
Object.entries(input.files).filter(
|
|
29392
|
-
([name3]) => name3.endsWith(".h") && !name3.endsWith("-Swift.h")
|
|
29393
|
-
).map(([, source]) => source)
|
|
29394
|
-
)
|
|
29395
|
-
]),
|
|
29396
|
-
`#import <${producer}/${producer}.h>`
|
|
29397
|
-
)
|
|
29497
|
+
return {
|
|
29498
|
+
producer,
|
|
29499
|
+
original: `${stem}.original.h`,
|
|
29500
|
+
emitted: `${stem}.h`
|
|
29501
|
+
};
|
|
29502
|
+
});
|
|
29503
|
+
const fingerprint = () => {
|
|
29504
|
+
const digest3 = (0, import_node_crypto24.createHash)("sha256").update(recipe2);
|
|
29505
|
+
for (const { emitted } of headers) {
|
|
29506
|
+
if (!(0, import_node_fs55.existsSync)(emitted)) return;
|
|
29507
|
+
digest3.update(
|
|
29508
|
+
(0, import_node_crypto24.createHash)("sha256").update((0, import_node_fs55.readFileSync)(emitted)).digest()
|
|
29398
29509
|
);
|
|
29399
29510
|
}
|
|
29400
|
-
|
|
29401
|
-
|
|
29402
|
-
|
|
29511
|
+
return digest3.digest("hex");
|
|
29512
|
+
};
|
|
29513
|
+
if (!options.project && (0, import_node_fs55.existsSync)(receipt) && (0, import_node_fs55.readFileSync)(receipt, "utf8") === fingerprint())
|
|
29514
|
+
continue;
|
|
29515
|
+
if (!options.project) (0, import_node_fs55.rmSync)(receipt, { force: true });
|
|
29516
|
+
for (const { producer, original } of headers)
|
|
29517
|
+
if (!(0, import_node_fs55.existsSync)(original))
|
|
29518
|
+
(0, import_node_fs55.rmSync)(
|
|
29519
|
+
import_node_path53.default.join(
|
|
29520
|
+
root,
|
|
29521
|
+
".build",
|
|
29522
|
+
WASM_TRIPLE,
|
|
29523
|
+
"release",
|
|
29524
|
+
"Modules",
|
|
29525
|
+
`${swiftTargetModuleName(producer)}.swiftmodule`
|
|
29526
|
+
),
|
|
29527
|
+
{ force: true }
|
|
29528
|
+
);
|
|
29403
29529
|
await runCompiler(
|
|
29404
29530
|
swift,
|
|
29405
|
-
[...buildArgs, "--target",
|
|
29531
|
+
[...buildArgs, "--target", target],
|
|
29406
29532
|
appOptions,
|
|
29407
29533
|
SWIFTPM_PROGRESS,
|
|
29408
29534
|
SWIFTPM_NOISE
|
|
29409
29535
|
);
|
|
29536
|
+
for (const { producer, original, emitted } of headers) {
|
|
29537
|
+
const generated = clangInterfaceHeader((0, import_node_fs55.readFileSync)(original, "utf8"));
|
|
29538
|
+
writeBuildFile(
|
|
29539
|
+
emitted,
|
|
29540
|
+
withoutSwiftDeclarations(
|
|
29541
|
+
swiftHeaderWithSuperclassImports(generated, frameworkInterface),
|
|
29542
|
+
/* @__PURE__ */ new Set([
|
|
29543
|
+
...preparation.nativeHeaderDeclarations[producer] ?? [],
|
|
29544
|
+
...nativelyDeclaredFunctions(generated, nativeHeaders)
|
|
29545
|
+
]),
|
|
29546
|
+
`#import <${producer}/${producer}.h>`
|
|
29547
|
+
)
|
|
29548
|
+
);
|
|
29549
|
+
}
|
|
29550
|
+
if (!options.project) {
|
|
29551
|
+
(0, import_node_fs55.mkdirSync)(checkpoints, { recursive: true });
|
|
29552
|
+
(0, import_node_fs55.writeFileSync)(`${receipt}.partial`, fingerprint());
|
|
29553
|
+
(0, import_node_fs55.renameSync)(`${receipt}.partial`, receipt);
|
|
29554
|
+
}
|
|
29410
29555
|
}
|
|
29411
29556
|
await runCompiler(
|
|
29412
29557
|
swift,
|
|
@@ -29415,6 +29560,9 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
29415
29560
|
SWIFTPM_PROGRESS,
|
|
29416
29561
|
SWIFTPM_NOISE
|
|
29417
29562
|
);
|
|
29563
|
+
};
|
|
29564
|
+
try {
|
|
29565
|
+
await compileApp();
|
|
29418
29566
|
} catch (error) {
|
|
29419
29567
|
const output3 = outputOf(error);
|
|
29420
29568
|
const moduleCache = import_node_path53.default.join(
|
|
@@ -29427,13 +29575,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
29427
29575
|
if (output3.includes("was compiled with module cache path") && (0, import_node_fs55.existsSync)(moduleCache)) {
|
|
29428
29576
|
(0, import_node_fs55.rmSync)(moduleCache, { recursive: true, force: true });
|
|
29429
29577
|
try {
|
|
29430
|
-
await
|
|
29431
|
-
swift,
|
|
29432
|
-
buildArgs,
|
|
29433
|
-
appOptions,
|
|
29434
|
-
SWIFTPM_PROGRESS,
|
|
29435
|
-
SWIFTPM_NOISE
|
|
29436
|
-
);
|
|
29578
|
+
await compileApp();
|
|
29437
29579
|
} catch (retryError) {
|
|
29438
29580
|
throw new Error(
|
|
29439
29581
|
[
|
|
@@ -29764,9 +29906,9 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
29764
29906
|
`;
|
|
29765
29907
|
darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...quoted2, "-Wl,--end-lib"] : [];
|
|
29766
29908
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
29767
|
-
MULTI_MANIFEST_VERSION =
|
|
29909
|
+
MULTI_MANIFEST_VERSION = 71;
|
|
29768
29910
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
29769
|
-
compilerSourceDigest = true ? "
|
|
29911
|
+
compilerSourceDigest = true ? "d287f3ad479477c70004707c1336f37c9baeb81aef1880544a5ca236e088ca16" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
29770
29912
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
29771
29913
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
29772
29914
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -34011,7 +34153,7 @@ var init_swift_standin_digest = __esm({
|
|
|
34011
34153
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
34012
34154
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
34013
34155
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
34014
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
34156
|
+
STANDIN_SOURCE_DIGEST = true ? "f2b2c9a5d56b4cc06d8934ce5600587dcf7893acdf17158203975d997dbd387e" : standinSourceDigest();
|
|
34015
34157
|
}
|
|
34016
34158
|
});
|
|
34017
34159
|
|
|
@@ -35108,6 +35250,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
|
|
|
35108
35250
|
}
|
|
35109
35251
|
function fetchedCheckout(checkouts, identity2, pin2) {
|
|
35110
35252
|
const dir = import_node_path72.default.join(checkouts, identity2);
|
|
35253
|
+
if (preparedSwiftPin(checkouts, identity2, pin2.location, pin2.revision)) return dir;
|
|
35111
35254
|
const head = import_node_path72.default.join(dir, ".git", "HEAD");
|
|
35112
35255
|
if (!verified.has(checkoutKey(dir, pin2)) || !import_node_fs73.default.existsSync(head) || import_node_fs73.default.readFileSync(head, "utf8").trim() !== pin2.revision)
|
|
35113
35256
|
throw new Error(
|
|
@@ -43496,7 +43639,7 @@ async function swiftPackages(entry, app) {
|
|
|
43496
43639
|
] : []
|
|
43497
43640
|
);
|
|
43498
43641
|
let reached = [...cached2.binaries.filter((binary2) => binary2.reached), ...vendored];
|
|
43499
|
-
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
|
|
43642
|
+
const standinArtifact = (binary2) => !binary2.rustCrate && (binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0);
|
|
43500
43643
|
const artifacts = reached.filter(standinArtifact);
|
|
43501
43644
|
if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
|
|
43502
43645
|
const { provided } = entry;
|
|
@@ -56541,7 +56684,7 @@ init_swift_native_pin();
|
|
|
56541
56684
|
init_xcode_project();
|
|
56542
56685
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
56543
56686
|
function expoNativeCompilerDigestValue() {
|
|
56544
|
-
return true ? "
|
|
56687
|
+
return true ? "07e205f69ed280a405ff8ed7b8e6259e8752f107f8768d265a02d97d85bafdee" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
56545
56688
|
}
|
|
56546
56689
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
56547
56690
|
function readSources(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2409 | (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;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2409 | (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;
|