peachsim 0.1.1964 → 0.1.1966
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +162 -31
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +160 -30
- 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 +161 -31
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2 -2
- 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 +2 -2
- 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 +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +162 -31
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +159 -29
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +15 -1
- package/package.json +1 -1
- package/src/swift-objc-standin.ts +7 -1
- package/src/swift-packages.ts +13 -1
- package/src/swift-standin-emit.ts +16 -3
- package/src/swift-standins.ts +145 -18
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1966 | (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;
|
|
@@ -42919,7 +42919,12 @@ function splitTopLevel(text6, separator) {
|
|
|
42919
42919
|
function emitSwiftStandin(sourceGraphs, options) {
|
|
42920
42920
|
const imported = new Set(options.imports);
|
|
42921
42921
|
const importedTypeModules = options.importedTypeModules ?? /* @__PURE__ */ new Map();
|
|
42922
|
-
const
|
|
42922
|
+
const ownIds = new Set(
|
|
42923
|
+
sourceGraphs.flatMap(
|
|
42924
|
+
(graph) => graph.symbols.map((symbol2) => symbol2.identifier.precise)
|
|
42925
|
+
)
|
|
42926
|
+
);
|
|
42927
|
+
const graphs = [...sourceGraphs, ...options.dependencyGraphs ?? []].map(
|
|
42923
42928
|
(graph) => qualifyImportedTypes(graph, imported, importedTypeModules)
|
|
42924
42929
|
);
|
|
42925
42930
|
const nativeObjcProtocols = objcProtocolsInSwiftSignatures(graphs);
|
|
@@ -43503,7 +43508,8 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
43503
43508
|
)
|
|
43504
43509
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
43505
43510
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
43506
|
-
if (!parentSymbol
|
|
43511
|
+
if (!parentSymbol || !ownIds.has(parentSymbol.identifier.precise))
|
|
43512
|
+
list2.push(standinMarker);
|
|
43507
43513
|
const open = symbol2.accessLevel === "open" && (!parentSymbol || parentSymbol.accessLevel === "open");
|
|
43508
43514
|
const objcName = /^c:objc\(cs\)(\w+)$/.exec(id)?.[1];
|
|
43509
43515
|
emit(
|
|
@@ -43853,7 +43859,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
43853
43859
|
return match ? [`${match[1]}|${LEADING_ATTRS.exec(text(symbol2))[2]}`] : [];
|
|
43854
43860
|
})
|
|
43855
43861
|
);
|
|
43856
|
-
const roots = [...byId.values()].filter(
|
|
43862
|
+
const roots = [...byId.values()].filter(
|
|
43863
|
+
(symbol2) => ownIds.has(symbol2.identifier.precise) && !owner.has(symbol2.identifier.precise) && !unavailable(symbol2)
|
|
43864
|
+
).filter((symbol2) => {
|
|
43857
43865
|
const name3 = /^c:@M@[^@]+@F@([^@]+)$/.exec(symbol2.identifier.precise)?.[1];
|
|
43858
43866
|
return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
|
|
43859
43867
|
}).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
|
|
@@ -43865,6 +43873,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
43865
43873
|
for (const [name3, members2] of [...external].sort(([a], [b]) => a.localeCompare(b))) {
|
|
43866
43874
|
const seen = /* @__PURE__ */ new Set();
|
|
43867
43875
|
const kept = members2.filter((member) => {
|
|
43876
|
+
if (!ownIds.has(member.identifier.precise)) return false;
|
|
43868
43877
|
const key2 = `${member.kind.identifier}|${text(member)}`;
|
|
43869
43878
|
if (unavailable(member) || seen.has(key2)) return false;
|
|
43870
43879
|
seen.add(key2);
|
|
@@ -44347,7 +44356,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44347
44356
|
if (name3.endsWith(".swiftinterface"))
|
|
44348
44357
|
import_node_fs32.default.writeFileSync(
|
|
44349
44358
|
import_node_path29.default.join(to, name3),
|
|
44350
|
-
import_node_fs32.default.readFileSync(import_node_path29.default.join(from, name3), "utf8").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.")
|
|
44359
|
+
import_node_fs32.default.readFileSync(import_node_path29.default.join(from, name3), "utf8").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.").replace(
|
|
44360
|
+
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
44361
|
+
"Foundation.NSData."
|
|
44362
|
+
)
|
|
44351
44363
|
);
|
|
44352
44364
|
}
|
|
44353
44365
|
} else {
|
|
@@ -57143,7 +57155,7 @@ var init_swift_compile = __esm({
|
|
|
57143
57155
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
57144
57156
|
MULTI_MANIFEST_VERSION = 66;
|
|
57145
57157
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
57146
|
-
compilerSourceDigest = true ? "
|
|
57158
|
+
compilerSourceDigest = true ? "43445ac597f2b7673127e43186400d0f6863caf82dafb48c31ce3b516719ce13" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
57147
57159
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
57148
57160
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
57149
57161
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -63479,7 +63491,7 @@ var init_swift_standin_digest = __esm({
|
|
|
63479
63491
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
63480
63492
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
63481
63493
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
63482
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
63494
|
+
STANDIN_SOURCE_DIGEST = true ? "05087ee542759092b4dbe08e7a7c0a03416fa45a27f3c2e9b633d6d5ce98186a" : standinSourceDigest();
|
|
63483
63495
|
}
|
|
63484
63496
|
});
|
|
63485
63497
|
|
|
@@ -64209,7 +64221,7 @@ var init_expo_native_prebuilt = __esm({
|
|
|
64209
64221
|
init_swift_native_pin();
|
|
64210
64222
|
init_xcode_project();
|
|
64211
64223
|
EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
64212
|
-
EXPO_NATIVE_COMPILER_DIGEST = true ? "
|
|
64224
|
+
EXPO_NATIVE_COMPILER_DIGEST = true ? "9fd2ff84edb7b369a3643fb86c96987ded6cba6ac0477de1cb94ecd8e4b6f59a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
64213
64225
|
IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
64214
64226
|
expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
|
|
64215
64227
|
isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
@@ -65048,6 +65060,11 @@ function resolveSwiftPackages(options) {
|
|
|
65048
65060
|
if (claimed.has(key2)) return true;
|
|
65049
65061
|
const target = pkg.manifest.targets.get(name3);
|
|
65050
65062
|
if (!target || target.type !== "regular" || placeholderPackage(pkg)) return false;
|
|
65063
|
+
const files2 = swiftTargetFiles(pkg.manifest, target);
|
|
65064
|
+
if (files2.every(
|
|
65065
|
+
(file) => file.endsWith(".swift") && import_node_fs69.default.readFileSync(file, "utf8").trim() === ""
|
|
65066
|
+
))
|
|
65067
|
+
return false;
|
|
65051
65068
|
claimed.add(key2);
|
|
65052
65069
|
provided.delete(name3);
|
|
65053
65070
|
for (const dependency of target.dependencies) {
|
|
@@ -65155,7 +65172,7 @@ function resolveSwiftPackages(options) {
|
|
|
65155
65172
|
if (provided.has(name3) && placeholderPackage(pkg)) return;
|
|
65156
65173
|
for (const dependency of pkg.manifest.targets.get(name3)?.dependencies ?? []) {
|
|
65157
65174
|
if (dependency.kind === "target") visit3(pkg, dependency.name);
|
|
65158
|
-
else {
|
|
65175
|
+
else if (!provided.has(dependency.name)) {
|
|
65159
65176
|
const nested = dependencyPackage(pkg, dependency);
|
|
65160
65177
|
if (nested && typeof nested !== "string")
|
|
65161
65178
|
for (const root of nested.manifest.products.get(dependency.name)?.targets ?? [])
|
|
@@ -65164,6 +65181,7 @@ function resolveSwiftPackages(options) {
|
|
|
65164
65181
|
}
|
|
65165
65182
|
};
|
|
65166
65183
|
for (const { product, source } of listed) {
|
|
65184
|
+
if (provided.has(product)) continue;
|
|
65167
65185
|
const pkg = source.kind === "unnamed" ? unnamed(source, product) : packages.get(sourceKey(source));
|
|
65168
65186
|
if (!pkg || typeof pkg === "string") continue;
|
|
65169
65187
|
for (const root of pkg.manifest.products.get(product)?.targets ?? [])
|
|
@@ -65988,11 +66006,11 @@ ${uikit}${body}`
|
|
|
65988
66006
|
function binaryHeaderSearchPaths(binary2, root, declaredFrameworks) {
|
|
65989
66007
|
const artifact = xcframework(binary2);
|
|
65990
66008
|
const slice = simulatorSlice(artifact.dir);
|
|
65991
|
-
const found = surfaces(artifact.dir, slice);
|
|
66009
|
+
const found = surfaces(artifact.dir, binary2.target, slice);
|
|
65992
66010
|
const frameworks = [
|
|
65993
66011
|
...new Set(
|
|
65994
66012
|
found.flatMap(
|
|
65995
|
-
(surface) => "modulemap" in surface && import_node_path71.default.basename(import_node_path71.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path71.default.dirname(
|
|
66013
|
+
(surface) => "modulemap" in surface && import_node_path71.default.basename(import_node_path71.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path71.default.dirname(surface.headers)] : []
|
|
65996
66014
|
)
|
|
65997
66015
|
)
|
|
65998
66016
|
];
|
|
@@ -66057,8 +66075,21 @@ function binaryHeaderSearchPaths(binary2, root, declaredFrameworks) {
|
|
|
66057
66075
|
import_node_path71.default.join(pending, "frameworks", import_node_path71.default.basename(framework), part),
|
|
66058
66076
|
{ recursive: true, dereference: true }
|
|
66059
66077
|
);
|
|
66078
|
+
const surface = found.find(
|
|
66079
|
+
(item) => "headers" in item && import_node_path71.default.dirname(item.headers) === framework
|
|
66080
|
+
);
|
|
66081
|
+
if (surface && "modulemap" in surface) {
|
|
66082
|
+
const modules = import_node_path71.default.join(
|
|
66083
|
+
pending,
|
|
66084
|
+
"frameworks",
|
|
66085
|
+
import_node_path71.default.basename(framework),
|
|
66086
|
+
"Modules"
|
|
66087
|
+
);
|
|
66088
|
+
import_node_fs73.default.mkdirSync(modules, { recursive: true });
|
|
66089
|
+
import_node_fs73.default.copyFileSync(surface.modulemap, import_node_path71.default.join(modules, "module.modulemap"));
|
|
66090
|
+
}
|
|
66060
66091
|
}
|
|
66061
|
-
for (const [index, directory2] of headers.entries())
|
|
66092
|
+
for (const [index, directory2] of headers.entries()) {
|
|
66062
66093
|
import_node_fs73.default.cpSync(directory2, import_node_path71.default.join(pending, "headers", String(index)), {
|
|
66063
66094
|
recursive: true,
|
|
66064
66095
|
dereference: true,
|
|
@@ -66066,6 +66097,15 @@ function binaryHeaderSearchPaths(binary2, root, declaredFrameworks) {
|
|
|
66066
66097
|
filter: (source) => import_node_fs73.default.statSync(source).isDirectory() ? import_node_path71.default.dirname(source) !== directory2 || !import_node_path71.default.basename(source).startsWith("ios-") : !isBinaryLibraryFile(source)
|
|
66067
66098
|
} : {}
|
|
66068
66099
|
});
|
|
66100
|
+
const surface = found.find(
|
|
66101
|
+
(item) => "headers" in item && item.headers === directory2
|
|
66102
|
+
);
|
|
66103
|
+
if (surface && "modulemap" in surface)
|
|
66104
|
+
import_node_fs73.default.copyFileSync(
|
|
66105
|
+
surface.modulemap,
|
|
66106
|
+
import_node_path71.default.join(pending, "headers", String(index), "module.modulemap")
|
|
66107
|
+
);
|
|
66108
|
+
}
|
|
66069
66109
|
const contents = (0, import_node_crypto39.createHash)("sha256");
|
|
66070
66110
|
for (const relative5 of import_node_fs73.default.readdirSync(pending, { recursive: true, encoding: "utf8" }).sort()) {
|
|
66071
66111
|
const file = import_node_path71.default.join(pending, relative5);
|
|
@@ -66119,7 +66159,7 @@ function simulatorSlice(xcframeworkDir) {
|
|
|
66119
66159
|
const slice = import_node_fs73.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
66120
66160
|
return slice ? import_node_path71.default.join(xcframeworkDir, slice) : null;
|
|
66121
66161
|
}
|
|
66122
|
-
function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
66162
|
+
function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)) {
|
|
66123
66163
|
const standaloneMap = import_node_path71.default.join(xcframeworkDir, "module.modulemap");
|
|
66124
66164
|
if (import_node_fs73.default.existsSync(standaloneMap)) {
|
|
66125
66165
|
const module2 = moduleMapName(import_node_fs73.default.readFileSync(standaloneMap, "utf8"));
|
|
@@ -66140,7 +66180,16 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
|
66140
66180
|
(name3) => name3.endsWith(".swiftinterface") && !name3.endsWith(".private.swiftinterface") && !name3.endsWith(".package.swiftinterface")
|
|
66141
66181
|
);
|
|
66142
66182
|
const chosen = interfaces.find((name3) => name3.startsWith("arm64-")) ?? interfaces[0] ?? null;
|
|
66143
|
-
|
|
66183
|
+
let modulemap = import_node_path71.default.join(framework, "Modules", "module.modulemap");
|
|
66184
|
+
const headers2 = import_node_path71.default.join(framework, "Headers");
|
|
66185
|
+
if (!import_node_fs73.default.existsSync(modulemap) && files(headers2, (name3) => name3.endsWith(".h")).length) {
|
|
66186
|
+
const umbrella = import_node_fs73.default.existsSync(import_node_path71.default.join(headers2, `${module2}.h`)) ? `umbrella header "${module2}.h"` : 'umbrella "Headers"';
|
|
66187
|
+
modulemap = generatedModuleMap(
|
|
66188
|
+
`framework module ${module2} { ${umbrella} export * module * { export * } }
|
|
66189
|
+
`,
|
|
66190
|
+
true
|
|
66191
|
+
);
|
|
66192
|
+
}
|
|
66144
66193
|
if (chosen) {
|
|
66145
66194
|
const privateInterface = import_node_path71.default.join(
|
|
66146
66195
|
swiftmodule,
|
|
@@ -66172,8 +66221,33 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
|
66172
66221
|
const module2 = moduleMapName(import_node_fs73.default.readFileSync(modulemap, "utf8"));
|
|
66173
66222
|
if (module2) found.push(headerSurface(module2, modulemap, import_node_path71.default.dirname(modulemap)));
|
|
66174
66223
|
}
|
|
66224
|
+
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
66225
|
+
const module2 = swiftTargetModuleName(target);
|
|
66226
|
+
const modulemap = generatedModuleMap(
|
|
66227
|
+
`module ${module2} { umbrella "." export * }
|
|
66228
|
+
`,
|
|
66229
|
+
false
|
|
66230
|
+
);
|
|
66231
|
+
found.push(headerSurface(module2, modulemap, headers));
|
|
66232
|
+
}
|
|
66175
66233
|
return found;
|
|
66176
66234
|
}
|
|
66235
|
+
function generatedModuleMap(text6, framework) {
|
|
66236
|
+
const dir = import_node_path71.default.join(
|
|
66237
|
+
cacheDir4,
|
|
66238
|
+
"modulemaps",
|
|
66239
|
+
key(text6),
|
|
66240
|
+
framework ? "Modules" : "Headers"
|
|
66241
|
+
);
|
|
66242
|
+
import_node_fs73.default.mkdirSync(dir, { recursive: true });
|
|
66243
|
+
const file = import_node_path71.default.join(dir, "module.modulemap");
|
|
66244
|
+
if (!import_node_fs73.default.existsSync(file)) {
|
|
66245
|
+
const pending = `${file}.${process.pid}.tmp`;
|
|
66246
|
+
import_node_fs73.default.writeFileSync(pending, text6);
|
|
66247
|
+
import_node_fs73.default.renameSync(pending, file);
|
|
66248
|
+
}
|
|
66249
|
+
return file;
|
|
66250
|
+
}
|
|
66177
66251
|
function peachModuleDirs(toolchain, imports2, sdkIncludes) {
|
|
66178
66252
|
const { moduleRoot, toolchainBin } = toolchain;
|
|
66179
66253
|
if (swiftDistributionAt(moduleRoot)) return [import_node_path71.default.join(moduleRoot, "modules")];
|
|
@@ -66593,18 +66667,39 @@ function wasmFlags(toolchain, imports2) {
|
|
|
66593
66667
|
...toolchain.standinModules ? ["-I", toolchain.standinModules] : []
|
|
66594
66668
|
];
|
|
66595
66669
|
}
|
|
66596
|
-
function objcStandin(surface, binary2, toolchain, work, behavior) {
|
|
66670
|
+
function objcStandin(surface, binary2, toolchain, work, behavior, frameworks, siblings) {
|
|
66597
66671
|
const view = objcView(
|
|
66598
66672
|
surface,
|
|
66599
66673
|
toolchain.toolchainBin,
|
|
66600
66674
|
import_node_path71.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
|
|
66601
66675
|
cacheDir4,
|
|
66602
|
-
import_node_path71.default.join(work, "objc")
|
|
66676
|
+
import_node_path71.default.join(work, "objc"),
|
|
66677
|
+
void 0,
|
|
66678
|
+
frameworks.dirs
|
|
66603
66679
|
);
|
|
66604
66680
|
const provided = new Set(swiftPeachModules(toolchain.moduleRoot));
|
|
66605
66681
|
const headerModules = view.imports.filter(
|
|
66606
|
-
(name3) => !STANDIN_IMPORTS.includes(name3) && provided.has(name3)
|
|
66682
|
+
(name3) => !STANDIN_IMPORTS.includes(name3) && (provided.has(name3) || siblings.has(name3))
|
|
66607
66683
|
);
|
|
66684
|
+
const dependencyGraphs = headerModules.flatMap((module2) => {
|
|
66685
|
+
const dependency = frameworks.surfaces.get(module2);
|
|
66686
|
+
if (!dependency || module2 === surface.module) return [];
|
|
66687
|
+
return objcView(
|
|
66688
|
+
{
|
|
66689
|
+
module: dependency.module,
|
|
66690
|
+
modulemap: dependency.modulemap,
|
|
66691
|
+
headers: dependency.headers
|
|
66692
|
+
},
|
|
66693
|
+
toolchain.toolchainBin,
|
|
66694
|
+
import_node_path71.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
|
|
66695
|
+
cacheDir4,
|
|
66696
|
+
import_node_path71.default.join(work, "dependencies", module2),
|
|
66697
|
+
void 0,
|
|
66698
|
+
frameworks.dirs.filter(
|
|
66699
|
+
(dir) => !import_node_fs73.default.existsSync(import_node_path71.default.join(dir, `${module2}.framework`))
|
|
66700
|
+
)
|
|
66701
|
+
).graphs;
|
|
66702
|
+
});
|
|
66608
66703
|
return graphStandin(
|
|
66609
66704
|
surface.module,
|
|
66610
66705
|
view.graphs,
|
|
@@ -66621,10 +66716,16 @@ function objcStandin(surface, binary2, toolchain, work, behavior) {
|
|
|
66621
66716
|
(dependency) => swiftTargetModuleName(dependency.module)
|
|
66622
66717
|
) ?? []
|
|
66623
66718
|
])
|
|
66624
|
-
]
|
|
66719
|
+
],
|
|
66720
|
+
false,
|
|
66721
|
+
/* @__PURE__ */ new Map(),
|
|
66722
|
+
null,
|
|
66723
|
+
/* @__PURE__ */ new Map(),
|
|
66724
|
+
/* @__PURE__ */ new Map(),
|
|
66725
|
+
dependencyGraphs
|
|
66625
66726
|
);
|
|
66626
66727
|
}
|
|
66627
|
-
function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map()) {
|
|
66728
|
+
function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = []) {
|
|
66628
66729
|
const paths = new Set(
|
|
66629
66730
|
graphs.flatMap(
|
|
66630
66731
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -66680,6 +66781,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, b
|
|
|
66680
66781
|
objcProperties,
|
|
66681
66782
|
inheritedConformances,
|
|
66682
66783
|
projections,
|
|
66784
|
+
dependencyGraphs,
|
|
66683
66785
|
...placeholder ? { exported: placeholder.exported, placeholder: binary2.placeholder.gap } : {}
|
|
66684
66786
|
});
|
|
66685
66787
|
for (const entry of skipped) {
|
|
@@ -67345,6 +67447,11 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
|
|
|
67345
67447
|
}))
|
|
67346
67448
|
});
|
|
67347
67449
|
} else {
|
|
67450
|
+
const absent = missingArtifactGap(binary2);
|
|
67451
|
+
if (absent !== null) {
|
|
67452
|
+
gaps.set(binary2.target, absent);
|
|
67453
|
+
continue;
|
|
67454
|
+
}
|
|
67348
67455
|
const resolved = xcframework(binary2);
|
|
67349
67456
|
const dir = import_node_path71.default.join(artifact, String(index), import_node_path71.default.basename(resolved.dir));
|
|
67350
67457
|
import_node_fs73.default.cpSync(resolved.dir, dir, { recursive: true, dereference: true });
|
|
@@ -67480,7 +67587,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
67480
67587
|
const modules = new Set(
|
|
67481
67588
|
binaries.flatMap((binary2) => {
|
|
67482
67589
|
try {
|
|
67483
|
-
return binary2.publicHeaders !== void 0 || binary2.placeholder !== void 0 ? [swiftTargetModuleName(binary2.target)] : surfaces(xcframework(binary2).dir).map(
|
|
67590
|
+
return binary2.publicHeaders !== void 0 || binary2.placeholder !== void 0 ? [swiftTargetModuleName(binary2.target)] : surfaces(xcframework(binary2).dir, binary2.target).map(
|
|
67591
|
+
(surface) => surface.module
|
|
67592
|
+
);
|
|
67484
67593
|
} catch {
|
|
67485
67594
|
return [];
|
|
67486
67595
|
}
|
|
@@ -67513,7 +67622,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
67513
67622
|
if (binary2.publicHeaders !== void 0 && swiftTargetModuleName(binary2.target) !== binary2.target)
|
|
67514
67623
|
parts.push(`module/${swiftTargetModuleName(binary2.target)}`);
|
|
67515
67624
|
try {
|
|
67516
|
-
if (binary2.publicHeaders === void 0 && surfaces(xcframework(binary2).dir).some(
|
|
67625
|
+
if (binary2.publicHeaders === void 0 && surfaces(xcframework(binary2).dir, binary2.target).some(
|
|
67626
|
+
(surface) => surface.kind === "swift"
|
|
67627
|
+
))
|
|
67517
67628
|
parts.push(`interface-emulation/${WASI_EMULATION.join(",")}`);
|
|
67518
67629
|
parts.push(
|
|
67519
67630
|
binary2.target,
|
|
@@ -67541,10 +67652,14 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
67541
67652
|
}
|
|
67542
67653
|
return (0, import_node_crypto39.createHash)("sha256").update(parts.join("\0")).digest("hex");
|
|
67543
67654
|
}
|
|
67655
|
+
function missingArtifactGap(binary2) {
|
|
67656
|
+
if (swiftBinaryOnDisk(binary2)) return null;
|
|
67657
|
+
return `${import_node_path71.default.relative(process.cwd(), binary2.dir) || binary2.dir} is not on disk, and Xcode fails without it too; run the script that downloads or builds it, then run again`;
|
|
67658
|
+
}
|
|
67544
67659
|
async function binaryStandins(binary2, toolchain, provided, behavior, frameworks, siblings) {
|
|
67545
67660
|
if (provided.has(binary2.target)) return [];
|
|
67546
|
-
|
|
67547
|
-
|
|
67661
|
+
const absent = missingArtifactGap(binary2);
|
|
67662
|
+
if (absent !== null) return absent;
|
|
67548
67663
|
import_node_fs73.default.mkdirSync(cacheDir4, { recursive: true });
|
|
67549
67664
|
const work = import_node_fs73.default.mkdtempSync(import_node_path71.default.join(cacheDir4, "work-"));
|
|
67550
67665
|
let all;
|
|
@@ -67596,7 +67711,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
67596
67711
|
].join("\0");
|
|
67597
67712
|
} else {
|
|
67598
67713
|
const artifact = xcframework(binary2);
|
|
67599
|
-
all = surfaces(artifact.dir);
|
|
67714
|
+
all = surfaces(artifact.dir, binary2.target);
|
|
67600
67715
|
digest3 = artifact.digest;
|
|
67601
67716
|
}
|
|
67602
67717
|
} catch (error) {
|
|
@@ -67615,7 +67730,8 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
67615
67730
|
);
|
|
67616
67731
|
hash.update(digest3);
|
|
67617
67732
|
hash.update([...siblings].sort().join("\0"));
|
|
67618
|
-
if (found.some((surface) => surface.kind === "mixed"
|
|
67733
|
+
if (found.some((surface) => surface.kind === "mixed" || surface.kind === "objc"))
|
|
67734
|
+
hash.update(frameworks.digest);
|
|
67619
67735
|
for (const surface of found) {
|
|
67620
67736
|
hash.update(`${surface.kind}\0${surface.module}\0`);
|
|
67621
67737
|
for (const file of surface.kind === "swift" ? [surface.interface] : surface.kind === "source" ? surface.sources : [
|
|
@@ -67692,7 +67808,9 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
67692
67808
|
binary2,
|
|
67693
67809
|
toolchain,
|
|
67694
67810
|
dir,
|
|
67695
|
-
new Map(Object.entries(configured.get(surface.module) ?? {}))
|
|
67811
|
+
new Map(Object.entries(configured.get(surface.module) ?? {})),
|
|
67812
|
+
frameworks,
|
|
67813
|
+
siblings
|
|
67696
67814
|
) : binary2.cxxHeaders ? await cxxStandin(surface, binary2, toolchain, dir) : cStandin(surface, binary2, toolchain, dir)
|
|
67697
67815
|
);
|
|
67698
67816
|
} catch (error) {
|
|
@@ -67737,6 +67855,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
67737
67855
|
import_node_fs73.default.mkdirSync(cacheDir4, { recursive: true });
|
|
67738
67856
|
const modules = import_node_fs73.default.mkdtempSync(import_node_path71.default.join(cacheDir4, "modules-"));
|
|
67739
67857
|
const frameworkDirs = /* @__PURE__ */ new Set();
|
|
67858
|
+
const frameworkSurfaces = /* @__PURE__ */ new Map();
|
|
67740
67859
|
const frameworkInputs = [];
|
|
67741
67860
|
const byModule = new Map(
|
|
67742
67861
|
binaries.map((binary2) => [swiftTargetModuleName(binary2.target), binary2])
|
|
@@ -67760,16 +67879,26 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
67760
67879
|
frameworkInputs.push(`${binary2.target}\0${artifact.digest}`);
|
|
67761
67880
|
const imports2 = /* @__PURE__ */ new Set();
|
|
67762
67881
|
interfaceImports.set(binary2, imports2);
|
|
67763
|
-
for (const surface of surfaces(artifact.dir)) {
|
|
67882
|
+
for (const surface of surfaces(artifact.dir, binary2.target)) {
|
|
67764
67883
|
byModule.set(surface.module, binary2);
|
|
67765
67884
|
if (surface.kind === "swift" || surface.kind === "mixed")
|
|
67766
67885
|
for (const module2 of swiftImportNames(
|
|
67767
67886
|
import_node_fs73.default.readFileSync(surface.interface, "utf8")
|
|
67768
67887
|
))
|
|
67769
67888
|
imports2.add(module2);
|
|
67889
|
+
if (surface.kind === "objc" || surface.kind === "mixed")
|
|
67890
|
+
for (const file of files(surface.headers, (name3) => name3.endsWith(".h")))
|
|
67891
|
+
for (const module2 of clangImportNames(
|
|
67892
|
+
import_node_fs73.default.readFileSync(import_node_path71.default.join(surface.headers, file), "utf8")
|
|
67893
|
+
))
|
|
67894
|
+
imports2.add(module2);
|
|
67770
67895
|
if (surface.kind === "c") continue;
|
|
67896
|
+
if (surface.kind === "objc" || surface.kind === "mixed")
|
|
67897
|
+
frameworkSurfaces.set(surface.module, surface);
|
|
67898
|
+
if (surface.kind !== "swift" && import_node_path71.default.basename(import_node_path71.default.dirname(surface.modulemap)) !== "Modules")
|
|
67899
|
+
continue;
|
|
67771
67900
|
frameworkDirs.add(
|
|
67772
|
-
surface.kind === "swift" ? import_node_path71.default.resolve(surface.interface, "../../../..") : import_node_path71.default.resolve(surface.
|
|
67901
|
+
surface.kind === "swift" ? import_node_path71.default.resolve(surface.interface, "../../../..") : import_node_path71.default.resolve(surface.headers, "../..")
|
|
67773
67902
|
);
|
|
67774
67903
|
}
|
|
67775
67904
|
} catch {
|
|
@@ -67778,7 +67907,8 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
67778
67907
|
const generatedToolchain = { ...toolchain, standinModules: modules };
|
|
67779
67908
|
const frameworks = {
|
|
67780
67909
|
dirs: [...frameworkDirs].sort(),
|
|
67781
|
-
digest: (0, import_node_crypto39.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex")
|
|
67910
|
+
digest: (0, import_node_crypto39.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
67911
|
+
surfaces: frameworkSurfaces
|
|
67782
67912
|
};
|
|
67783
67913
|
const siblings = new Map(
|
|
67784
67914
|
binaries.map((binary2) => [
|
|
@@ -67822,7 +67952,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
67822
67952
|
siblings.get(binary2)
|
|
67823
67953
|
);
|
|
67824
67954
|
console.error(
|
|
67825
|
-
`[swift-standins] ${binary2.target} ${typeof result === "string" ? `gap: ${result}` : "ready"} in ${Date.now() - started}ms`
|
|
67955
|
+
`[swift-standins] ${binary2.target} ${typeof result === "string" ? `gap: ${gapText(result)}` : "ready"} in ${Date.now() - started}ms`
|
|
67826
67956
|
);
|
|
67827
67957
|
if (typeof result === "string") {
|
|
67828
67958
|
gaps.set(binary2.target, result);
|
|
@@ -67883,6 +68013,7 @@ var init_swift_standins = __esm({
|
|
|
67883
68013
|
init_swift_cxx_standin();
|
|
67884
68014
|
init_swift_objc_standin();
|
|
67885
68015
|
init_swift_package();
|
|
68016
|
+
init_swift_packages();
|
|
67886
68017
|
init_swift_shared_sdk();
|
|
67887
68018
|
init_swift_standin_digest();
|
|
67888
68019
|
init_swift_standin_emit();
|
|
@@ -82418,7 +82549,7 @@ var init_nitro_superset = __esm({
|
|
|
82418
82549
|
init_swift_standin_digest();
|
|
82419
82550
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
82420
82551
|
packageVersion = (root) => JSON.parse((0, import_node_fs92.readFileSync)((0, import_node_path90.join)(root, "package.json"), "utf8")).version;
|
|
82421
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
82552
|
+
NITRO_COMPILER_DIGEST = true ? "3ad21cbda2a2bd818f67e1ab27dcd9d6d1397386d5e1cf00a7b9539969ac577a" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
82422
82553
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
82423
82554
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
82424
82555
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1966 | (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;
|
|
@@ -12377,7 +12377,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12377
12377
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12378
12378
|
var MULTI_MANIFEST_VERSION = 66;
|
|
12379
12379
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12380
|
-
var compilerSourceDigest = true ? "
|
|
12380
|
+
var compilerSourceDigest = true ? "43445ac597f2b7673127e43186400d0f6863caf82dafb48c31ce3b516719ce13" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12381
12381
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12382
12382
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12383
12383
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1966 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -12359,7 +12359,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12359
12359
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12360
12360
|
var MULTI_MANIFEST_VERSION = 66;
|
|
12361
12361
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12362
|
-
var compilerSourceDigest = true ? "
|
|
12362
|
+
var compilerSourceDigest = true ? "43445ac597f2b7673127e43186400d0f6863caf82dafb48c31ce3b516719ce13" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12363
12363
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12364
12364
|
const hash = createHash13("sha256");
|
|
12365
12365
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1966 | (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.1966 | (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.1966 | (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.1966 | (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;
|