peachsim 0.1.2247 → 0.1.2249
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/bin.ts +5 -0
- package/cli/bridge-flow-runner.ts +28 -2
- package/cli/cloud-dispatch.ts +2 -0
- package/cli/commands/control.ts +2 -2
- package/cli/commands/coverage-swift.ts +3 -3
- package/cli/commands/inspect/settling.ts +35 -4
- package/cli/commands/shell-url.ts +6 -0
- package/cli/commands/skills.ts +6 -3
- package/cli/drivers/playwright.ts +2 -0
- package/dist-lib/agent-daemon-client.cjs +1 -29
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -10
- 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 +4300 -4531
- 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 +32 -315
- package/dist-lib/dev-bundle-resolution.cjs +1 -12
- package/dist-lib/expo-swift-bundle.cjs +3579 -3864
- 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 +4376 -4682
- package/dist-lib/host/fetch-proxy-handler.cjs +97 -713
- 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 +669 -1116
- 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 +3 -24
- 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 -10
- package/dist-lib/metro-production-bundle.mjs +1 -12
- package/dist-lib/metro.cjs +546 -975
- package/dist-lib/native-app-identity-project.cjs +299 -592
- package/dist-lib/native-app-identity-project.mjs +11 -232
- 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 +28 -96
- package/dist-lib/public-origins-lib.json +172 -1058
- 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 -34
- package/dist-lib/sdk.cjs +31 -7
- package/dist-lib/sdk.mjs +31 -7
- package/dist-lib/skills.cjs +4960 -5345
- package/dist-lib/swift-compile.cjs +1185 -1107
- package/dist-lib/swift-compile.mjs +137 -54
- 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 +1568 -1672
- package/dist-lib/vite.cjs +173 -763
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +10 -2
- package/dist-types/packages/peach-globals/src/globalsContract.d.ts +5 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/wasm/include/math.h +1 -1
- package/sdk/ios/wasm/include/pthread.h +1 -1
- package/src/assetCatalogContract.ts +6 -0
- package/src/kotlin-module.ts +3 -3
- package/src/sfSymbolMetricsContract.ts +73 -37
- package/src/swift-compile.ts +99 -7
- package/src/swift-coverage/provenance.ts +4 -4
- package/src/swift-guest-image-ledger.ts +10 -5
- package/src/swift-guest-link.ts +20 -14
- package/src/swift-objc-sdk.ts +34 -21
- package/src/swift-objc-standin.ts +7 -7
- package/src/swift-standins.ts +11 -8
- package/src/swift-wasm-prune.ts +30 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -2577,15 +2577,6 @@ import path3 from "node:path";
|
|
|
2577
2577
|
// src/swift-objc-sdk-tree.ts
|
|
2578
2578
|
import { readdirSync as readdirSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
2579
2579
|
import path2 from "node:path";
|
|
2580
|
-
function readIosSdkTree(root) {
|
|
2581
|
-
return readdirSync3(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => {
|
|
2582
|
-
const file = path2.join(entry.parentPath, entry.name);
|
|
2583
|
-
return [
|
|
2584
|
-
path2.relative(root, file).split(path2.sep).join("/"),
|
|
2585
|
-
readFileSync4(file, "utf8")
|
|
2586
|
-
];
|
|
2587
|
-
}).sort(([a], [b]) => a < b ? -1 : 1);
|
|
2588
|
-
}
|
|
2589
2580
|
|
|
2590
2581
|
// src/swift-darwin-records.ts
|
|
2591
2582
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
@@ -3317,23 +3308,6 @@ function isRecord(value) {
|
|
|
3317
3308
|
// src/swift-objc-sdk.ts
|
|
3318
3309
|
import path6 from "node:path";
|
|
3319
3310
|
var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
|
|
3320
|
-
var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
|
|
3321
|
-
var tree = typeof __PEACH_BUNDLED_IOS_SDK__ === "undefined" ? readIosSdkTree(path6.join(peachsimPackageRoot(), "sdk", "ios")) : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => a < b ? -1 : 1);
|
|
3322
|
-
var IOS_SDK_HEADERS = {};
|
|
3323
|
-
var IOS_SDK_OVERLAYS = {};
|
|
3324
|
-
for (const [file, text2] of tree) {
|
|
3325
|
-
const module = OVERLAY_PATH.exec(file)?.[1];
|
|
3326
|
-
if (module === void 0) {
|
|
3327
|
-
IOS_SDK_HEADERS[file] = text2;
|
|
3328
|
-
continue;
|
|
3329
|
-
}
|
|
3330
|
-
const header = `// swift-interface-format-version: 1.0
|
|
3331
|
-
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}
|
|
3332
|
-
`;
|
|
3333
|
-
if (!text2.startsWith(header))
|
|
3334
|
-
throw new Error(`sdk overlay ${file} has the wrong interface header`);
|
|
3335
|
-
IOS_SDK_OVERLAYS[module] = text2.slice(header.length);
|
|
3336
|
-
}
|
|
3337
3311
|
|
|
3338
3312
|
// src/swift-package.ts
|
|
3339
3313
|
function swiftImplicitResourcePaths(paths) {
|
|
@@ -5548,7 +5522,11 @@ function parseWasmObjectBytes(file, buf, isDist, symbolFlagOffsets) {
|
|
|
5548
5522
|
objcClassSymToTypePrefix,
|
|
5549
5523
|
typePrefixesInObj,
|
|
5550
5524
|
rootFuncs,
|
|
5551
|
-
rootSegs
|
|
5525
|
+
rootSegs,
|
|
5526
|
+
segPayloadRanges: sEnds.map((end, i) => [
|
|
5527
|
+
dataStart + sPayloadStarts[i],
|
|
5528
|
+
dataStart + end
|
|
5529
|
+
])
|
|
5552
5530
|
};
|
|
5553
5531
|
}
|
|
5554
5532
|
function parseWasmObjectCached(file, isDist, useCache) {
|
|
@@ -6208,9 +6186,29 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
6208
6186
|
"$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufC",
|
|
6209
6187
|
"$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufc"
|
|
6210
6188
|
]);
|
|
6189
|
+
const objectBytes = /* @__PURE__ */ new Map();
|
|
6190
|
+
const keepObjCClassesNamedInSegment = (obj, segIdx) => {
|
|
6191
|
+
const range = obj.segPayloadRanges[segIdx];
|
|
6192
|
+
if (!range) return;
|
|
6193
|
+
let bytes = objectBytes.get(obj);
|
|
6194
|
+
if (!bytes) objectBytes.set(obj, bytes = fs4.readFileSync(obj.file));
|
|
6195
|
+
const text2 = bytes.toString("latin1", range[0], range[1]);
|
|
6196
|
+
for (const match of text2.matchAll(/So(\d+)/g)) {
|
|
6197
|
+
const start = match.index + 2 + match[1].length;
|
|
6198
|
+
const length = Number(match[1]);
|
|
6199
|
+
if (text2[start + length] !== "C") continue;
|
|
6200
|
+
const symbol = `._OBJC_CLASS_${text2.slice(start, start + length)}`;
|
|
6201
|
+
for (const provider of lazyProviders.get(symbol) ?? []) {
|
|
6202
|
+
eagerDynamicObjects.add(provider);
|
|
6203
|
+
extractObject(provider);
|
|
6204
|
+
activateSymbolInObj(provider, provider.symNames.indexOf(symbol));
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
};
|
|
6211
6208
|
while (workQueue.length > 0) {
|
|
6212
6209
|
const item = workQueue.pop();
|
|
6213
6210
|
const obj = item.obj;
|
|
6211
|
+
if (item.kind === "seg") keepObjCClassesNamedInSegment(obj, item.idx);
|
|
6214
6212
|
let relocs;
|
|
6215
6213
|
if (item.kind === "func") {
|
|
6216
6214
|
relocs = obj.funcRelocs[item.idx];
|
|
@@ -7060,8 +7058,12 @@ function createGuestImageLedger(input) {
|
|
|
7060
7058
|
}
|
|
7061
7059
|
}
|
|
7062
7060
|
}
|
|
7061
|
+
const nameBytes = /* @__PURE__ */ new Map();
|
|
7062
|
+
for (const definition of definitions)
|
|
7063
|
+
if (!nameBytes.has(definition.name))
|
|
7064
|
+
nameBytes.set(definition.name, Buffer.from(definition.name));
|
|
7063
7065
|
definitions.sort(
|
|
7064
|
-
(a, b) => Buffer.compare(
|
|
7066
|
+
(a, b) => Buffer.compare(nameBytes.get(a.name), nameBytes.get(b.name)) || a.image - b.image
|
|
7065
7067
|
);
|
|
7066
7068
|
const preserveCanonical = /* @__PURE__ */ new Set();
|
|
7067
7069
|
const definitionsByName = Map.groupBy(definitions, (definition) => definition.name);
|
|
@@ -7091,12 +7093,12 @@ function createGuestImageLedger(input) {
|
|
|
7091
7093
|
preserveCanonical.add(name2);
|
|
7092
7094
|
for (const name2 of input.commandLineSymbols ?? []) preserveCanonical.add(name2);
|
|
7093
7095
|
const bindingsByImage = /* @__PURE__ */ new Map();
|
|
7096
|
+
const definitionsByImage = Map.groupBy(definitions, (definition) => definition.image);
|
|
7094
7097
|
for (const caller of input.callers) {
|
|
7095
7098
|
const bindings = /* @__PURE__ */ new Map();
|
|
7096
7099
|
const seen = /* @__PURE__ */ new Map();
|
|
7097
7100
|
for (const image of [caller.image, ...caller.next])
|
|
7098
|
-
for (const definition of
|
|
7099
|
-
if (definition.image !== image) continue;
|
|
7101
|
+
for (const definition of definitionsByImage.get(image) ?? []) {
|
|
7100
7102
|
const previous = seen.get(definition.name);
|
|
7101
7103
|
if (previous?.image === definition.image) {
|
|
7102
7104
|
if (previous.weak && !definition.weak) {
|
|
@@ -7136,8 +7138,9 @@ function createGuestImageLedger(input) {
|
|
|
7136
7138
|
definitionsByAlias.set(definition.alias, definition);
|
|
7137
7139
|
}
|
|
7138
7140
|
const objects = units.map(({ image, object: object3, aliases, functionImports }) => {
|
|
7139
|
-
const
|
|
7140
|
-
|
|
7141
|
+
const shared = bindingsByImage.get(image);
|
|
7142
|
+
const own = startup.get(object3.path);
|
|
7143
|
+
const bindings = own ? new Map([...shared, ...own]) : shared;
|
|
7141
7144
|
for (const [name2, type] of functionImports) {
|
|
7142
7145
|
const alias = bindings.get(name2);
|
|
7143
7146
|
const provider = alias === void 0 ? void 0 : definitionsByAlias.get(alias);
|
|
@@ -8986,6 +8989,7 @@ function linkGuestImages(options) {
|
|
|
8986
8989
|
);
|
|
8987
8990
|
}
|
|
8988
8991
|
const archives = /* @__PURE__ */ new Map();
|
|
8992
|
+
const memberBytes = /* @__PURE__ */ new Map();
|
|
8989
8993
|
const prepare = (provider2) => {
|
|
8990
8994
|
const trace = runLink("discovery", [
|
|
8991
8995
|
...withOutput(args, discovery, true),
|
|
@@ -9029,20 +9033,23 @@ function linkGuestImages(options) {
|
|
|
9029
9033
|
}
|
|
9030
9034
|
const objectsByImage = /* @__PURE__ */ new Map();
|
|
9031
9035
|
for (const image of plan.images) objectsByImage.set(image.id, []);
|
|
9036
|
+
const artifacts = new Map(plan.artifacts.map((artifact) => [artifact.path, artifact]));
|
|
9032
9037
|
for (const item of selected2) {
|
|
9033
|
-
const artifact =
|
|
9034
|
-
(candidate) => candidate.path === item.artifact
|
|
9035
|
-
);
|
|
9038
|
+
const artifact = artifacts.get(item.artifact);
|
|
9036
9039
|
const image = selectedGuestInputImage(artifact, item.member);
|
|
9037
9040
|
let bytes;
|
|
9038
9041
|
if (item.member === null) bytes = fs5.readFileSync(item.artifact);
|
|
9039
9042
|
else {
|
|
9040
|
-
let
|
|
9041
|
-
if (!
|
|
9042
|
-
members = readArMembers(fs5.readFileSync(item.artifact));
|
|
9043
|
+
let byName = memberBytes.get(item.artifact);
|
|
9044
|
+
if (!byName) {
|
|
9045
|
+
const members = readArMembers(fs5.readFileSync(item.artifact));
|
|
9043
9046
|
archives.set(item.artifact, members);
|
|
9047
|
+
byName = /* @__PURE__ */ new Map();
|
|
9048
|
+
for (const member of members)
|
|
9049
|
+
if (!byName.has(member.name)) byName.set(member.name, member.bytes);
|
|
9050
|
+
memberBytes.set(item.artifact, byName);
|
|
9044
9051
|
}
|
|
9045
|
-
bytes =
|
|
9052
|
+
bytes = byName.get(item.member);
|
|
9046
9053
|
}
|
|
9047
9054
|
const objects = objectsByImage.get(image);
|
|
9048
9055
|
if (!objects) throw new Error(`unknown image ${image}`);
|
|
@@ -9075,10 +9082,11 @@ function linkGuestImages(options) {
|
|
|
9075
9082
|
const { selected, ledger } = prepared;
|
|
9076
9083
|
const replacements = /* @__PURE__ */ new Map();
|
|
9077
9084
|
const linkedOwners = /* @__PURE__ */ new Map();
|
|
9085
|
+
const ledgerObjects = new Map(ledger.objects.map((item) => [item.path, item]));
|
|
9078
9086
|
for (const [index, artifact] of plan.artifacts.entries()) {
|
|
9079
9087
|
const prefix = `${artifact.path}(`;
|
|
9080
9088
|
if (artifact.kind === "object") {
|
|
9081
|
-
const object3 =
|
|
9089
|
+
const object3 = ledgerObjects.get(artifact.path);
|
|
9082
9090
|
if (!object3) continue;
|
|
9083
9091
|
const output2 = path14.join(directory, `object-${index}.o`);
|
|
9084
9092
|
fs5.writeFileSync(output2, object3.bytes);
|
|
@@ -9098,9 +9106,7 @@ function linkGuestImages(options) {
|
|
|
9098
9106
|
const output = path14.join(directory, `archive-${index}.a`);
|
|
9099
9107
|
const inputs = members.map((member) => {
|
|
9100
9108
|
const memberOutput = path14.join(memberDir, member.name);
|
|
9101
|
-
const rewritten =
|
|
9102
|
-
(item) => item.path === `${prefix}${member.name})`
|
|
9103
|
-
);
|
|
9109
|
+
const rewritten = ledgerObjects.get(`${prefix}${member.name})`);
|
|
9104
9110
|
fs5.writeFileSync(memberOutput, rewritten?.bytes ?? member.bytes);
|
|
9105
9111
|
if (rewritten) {
|
|
9106
9112
|
linkedOwners.set(
|
|
@@ -9439,10 +9445,13 @@ function selectedGuestSymbolInputs(plan, selected) {
|
|
|
9439
9445
|
else {
|
|
9440
9446
|
let members = archives.get(item.artifact);
|
|
9441
9447
|
if (!members) {
|
|
9442
|
-
members =
|
|
9448
|
+
members = Map.groupBy(
|
|
9449
|
+
readArMembers(fs5.readFileSync(item.artifact)),
|
|
9450
|
+
(member) => member.name
|
|
9451
|
+
);
|
|
9443
9452
|
archives.set(item.artifact, members);
|
|
9444
9453
|
}
|
|
9445
|
-
const matching = members.
|
|
9454
|
+
const matching = members.get(item.member) ?? [];
|
|
9446
9455
|
if (matching.length !== 1)
|
|
9447
9456
|
throw new Error(
|
|
9448
9457
|
`ambiguous selected symbol input ${item.artifact}(${item.member})`
|
|
@@ -12169,6 +12178,52 @@ var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIK
|
|
|
12169
12178
|
/^@import (?:CoreFoundation|FoundationNetworking);$/gm,
|
|
12170
12179
|
"@import Foundation;"
|
|
12171
12180
|
).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
|
|
12181
|
+
var objcEnumerations = (header) => [
|
|
12182
|
+
...header.matchAll(
|
|
12183
|
+
/^\s*typedef\s+(?:NS|CF|SWIFT)_\w*(?:ENUM|OPTIONS)\w*\s*\(\s*\w+\s*,\s*(\w+)\b/gm
|
|
12184
|
+
)
|
|
12185
|
+
].map((match) => match[1]);
|
|
12186
|
+
function nativelyDeclaredFunctions(generated, headers) {
|
|
12187
|
+
const candidates = [
|
|
12188
|
+
...new Set(
|
|
12189
|
+
[...generated.matchAll(/^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(/gm)].map(
|
|
12190
|
+
(match) => match[1]
|
|
12191
|
+
)
|
|
12192
|
+
)
|
|
12193
|
+
];
|
|
12194
|
+
if (candidates.length === 0) return [];
|
|
12195
|
+
const declaration = new RegExp(`^[^\\n#/*]*?\\b(${candidates.join("|")})\\s*\\(`, "gm");
|
|
12196
|
+
const found = /* @__PURE__ */ new Set();
|
|
12197
|
+
for (const header of headers)
|
|
12198
|
+
for (const match of header.matchAll(declaration)) found.add(match[1]);
|
|
12199
|
+
return [...found];
|
|
12200
|
+
}
|
|
12201
|
+
var sdkDeclarationOwners = /* @__PURE__ */ new Map();
|
|
12202
|
+
function sdkObjCDeclarationOwners(frameworks) {
|
|
12203
|
+
const known = sdkDeclarationOwners.get(frameworks);
|
|
12204
|
+
if (known) return known;
|
|
12205
|
+
const owners = /* @__PURE__ */ new Map();
|
|
12206
|
+
for (const framework of readdirSync8(frameworks))
|
|
12207
|
+
if (framework.endsWith(".framework")) {
|
|
12208
|
+
const headers = path27.join(frameworks, framework, "Headers");
|
|
12209
|
+
if (existsSync5(headers)) {
|
|
12210
|
+
for (const file of readdirSync8(headers, { recursive: true, encoding: "utf8" }))
|
|
12211
|
+
if (file.endsWith(".h")) {
|
|
12212
|
+
const header = readFileSync17(path27.join(headers, file), "utf8");
|
|
12213
|
+
for (const name2 of [
|
|
12214
|
+
...swiftInterfaceDeclarations(header),
|
|
12215
|
+
...objcEnumerations(header),
|
|
12216
|
+
...[
|
|
12217
|
+
...header.matchAll(/^[A-Z_]*_(?:EXTERN|EXPORT)\b[^;(\n]*?\b(\w+)\s*\(/gm)
|
|
12218
|
+
].map((match) => match[1])
|
|
12219
|
+
])
|
|
12220
|
+
owners.set(name2, framework.slice(0, -".framework".length));
|
|
12221
|
+
}
|
|
12222
|
+
}
|
|
12223
|
+
}
|
|
12224
|
+
sdkDeclarationOwners.set(frameworks, owners);
|
|
12225
|
+
return owners;
|
|
12226
|
+
}
|
|
12172
12227
|
function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
12173
12228
|
const superclasses = new Set(
|
|
12174
12229
|
[...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1])
|
|
@@ -12213,6 +12268,10 @@ function withoutSwiftDeclarations(text2, declared, interfaceImport) {
|
|
|
12213
12268
|
const name2 = /^\s*(?:[A-Z_]\w*(?:\([^()\n]*\))?\s+)*@(?:protocol|interface)\s+(\w+)\s*(?=[:<{]|$)/.exec(
|
|
12214
12269
|
line
|
|
12215
12270
|
)?.[1];
|
|
12271
|
+
const external = /^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(.*\)[^;\n]*;\s*$/.exec(
|
|
12272
|
+
line
|
|
12273
|
+
)?.[1];
|
|
12274
|
+
if (external && declared.has(external)) continue;
|
|
12216
12275
|
const enumeration = /^\s*typedef\s+(?:NS_ENUM|NS_OPTIONS|SWIFT_ENUM(?:_NAMED)?)\s*\(\s*\w+\s*,\s*(\w+)\b/.exec(
|
|
12217
12276
|
line
|
|
12218
12277
|
)?.[1];
|
|
@@ -13043,7 +13102,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
13043
13102
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
13044
13103
|
var MULTI_MANIFEST_VERSION = 68;
|
|
13045
13104
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
13046
|
-
var compilerSourceDigest = true ? "
|
|
13105
|
+
var compilerSourceDigest = true ? "660487c29d9a45fcb5a83e23f25f239be6cc1cc7338a3a2c2f756a4c985ae043" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
13047
13106
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
13048
13107
|
const hash = createHash13("sha256");
|
|
13049
13108
|
hash.update(`swift-compile
|
|
@@ -17377,11 +17436,28 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17377
17436
|
))
|
|
17378
17437
|
declared.add(name3);
|
|
17379
17438
|
}
|
|
17380
|
-
const
|
|
17439
|
+
const own = withoutSwiftDeclarations(
|
|
17381
17440
|
clangInterfaceHeader(readFileSync17(source, "utf8")),
|
|
17382
17441
|
declared,
|
|
17383
17442
|
`#import <${name2}/${name2}.h>`
|
|
17384
17443
|
);
|
|
17444
|
+
const owners = sdkObjCDeclarationOwners(path27.dirname(path27.dirname(headers)));
|
|
17445
|
+
const foreign = /* @__PURE__ */ new Map();
|
|
17446
|
+
for (const declaration of [
|
|
17447
|
+
...swiftInterfaceDeclarations(own),
|
|
17448
|
+
...objcEnumerations(own),
|
|
17449
|
+
...[...own.matchAll(/^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(/gm)].map(
|
|
17450
|
+
(match) => match[1]
|
|
17451
|
+
)
|
|
17452
|
+
]) {
|
|
17453
|
+
const owner = owners.get(declaration);
|
|
17454
|
+
if (owner && owner !== name2) foreign.set(declaration, owner);
|
|
17455
|
+
}
|
|
17456
|
+
const header = foreign.size ? withoutSwiftDeclarations(
|
|
17457
|
+
own,
|
|
17458
|
+
new Set(foreign.keys()),
|
|
17459
|
+
[...new Set(foreign.values())].map((owner) => `#import <${owner}/${owner}.h>`).join("\n")
|
|
17460
|
+
) : own;
|
|
17385
17461
|
const value = {
|
|
17386
17462
|
file: path27.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17387
17463
|
header,
|
|
@@ -17418,18 +17494,25 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17418
17494
|
`${producer}-Swift.h`
|
|
17419
17495
|
);
|
|
17420
17496
|
const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
|
|
17421
|
-
if (existsSync5(original))
|
|
17497
|
+
if (existsSync5(original)) {
|
|
17498
|
+
const generated = clangInterfaceHeader(readFileSync17(original, "utf8"));
|
|
17422
17499
|
writeBuildFile(
|
|
17423
17500
|
emitted,
|
|
17424
17501
|
withoutSwiftDeclarations(
|
|
17425
|
-
swiftHeaderWithSuperclassImports(
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17502
|
+
swiftHeaderWithSuperclassImports(generated, frameworkInterface),
|
|
17503
|
+
/* @__PURE__ */ new Set([
|
|
17504
|
+
...preparation.nativeHeaderDeclarations[producer] ?? [],
|
|
17505
|
+
...nativelyDeclaredFunctions(
|
|
17506
|
+
generated,
|
|
17507
|
+
Object.entries(input.files).filter(
|
|
17508
|
+
([name2]) => name2.endsWith(".h") && !name2.endsWith("-Swift.h")
|
|
17509
|
+
).map(([, source]) => source)
|
|
17510
|
+
)
|
|
17511
|
+
]),
|
|
17430
17512
|
`#import <${producer}/${producer}.h>`
|
|
17431
17513
|
)
|
|
17432
17514
|
);
|
|
17515
|
+
}
|
|
17433
17516
|
}
|
|
17434
17517
|
}
|
|
17435
17518
|
const checkpoints = path27.join(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (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.2249 | (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.2249 | (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.2249 | (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;
|