peachsim 0.1.1653 → 0.1.1655
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/app-stubs.ts +97 -14
- package/cli/bridge-diagnostics.ts +10 -7
- package/cli/cloud-client.ts +11 -2
- package/cli/commands/doctor.ts +20 -10
- package/cli/commands/inspect/core.ts +2 -1
- package/cli/commands/inspect/shared.ts +2 -0
- package/cli/commands/inspect.ts +11 -2
- package/cli/output-redaction.ts +22 -6
- package/cli/pause-aware-timeout.ts +24 -10
- package/cli/ws-bridge.ts +17 -1
- 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 +277 -244
- 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 +47 -12
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +276 -243
- 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 +320 -246
- package/dist-lib/host/fetch-proxy-handler.cjs +191 -31
- 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 +633 -373
- 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 +62 -14
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- 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/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 +23 -23
- package/dist-lib/public-origins-lib.json +62 -54
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +535 -380
- package/dist-lib/swift-compile.cjs +258 -197
- package/dist-lib/swift-compile.mjs +257 -197
- 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 +276 -243
- package/dist-lib/vite.cjs +385 -200
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +1 -0
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +10 -7
- package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/visible-frame.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/observability/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +38 -0
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +9 -0
- package/package.json +5 -1
- package/runtime-companion.json +1 -1
- package/src/bridge-contract.ts +2 -0
- package/src/bundleGlobalFooter.ts +9 -0
- package/src/host/fetch-proxy-handler.ts +54 -0
- package/src/sfSymbolMetricsContract.ts +268 -0
- package/src/swift-compile.ts +302 -238
- package/src/swift-distribution.lock.json +20 -46
- package/src/swift-objc-metadata.ts +21 -7
- package/src/swift-objc-sdk.ts +13 -0
- package/src/swiftContract.ts +2 -0
- package/src/vite-plugin-one.ts +161 -16
- package/src/host/lease-owner.test.ts +0 -49
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -24314,6 +24314,19 @@ __attribute__((swift_bridge("Swift.String")))
|
|
|
24314
24314
|
- (void)appendFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
|
|
24315
24315
|
+ (NSMutableString *)stringWithCapacity:(NSUInteger)capacity;
|
|
24316
24316
|
@end
|
|
24317
|
+
NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
|
|
24318
|
+
@interface NSSimpleCString : NSString {
|
|
24319
|
+
@package
|
|
24320
|
+
char *bytes;
|
|
24321
|
+
int numBytes;
|
|
24322
|
+
#if __LP64__
|
|
24323
|
+
int _unused;
|
|
24324
|
+
#endif
|
|
24325
|
+
}
|
|
24326
|
+
@end
|
|
24327
|
+
NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
|
|
24328
|
+
@interface NSConstantString : NSSimpleCString
|
|
24329
|
+
@end
|
|
24317
24330
|
@interface NSAttributedString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
|
|
24318
24331
|
@property (readonly, copy) NSString *string;
|
|
24319
24332
|
@end
|
|
@@ -27285,6 +27298,11 @@ var SWIFTPM_NOISE = /^(?:\[\d+\/\d+\] |Building for production\.\.\.$|warning: '
|
|
|
27285
27298
|
var BUILD_JOBS = String(
|
|
27286
27299
|
Math.min(4, Math.max(1, Math.floor(import_node_os4.default.availableParallelism() / 2)))
|
|
27287
27300
|
);
|
|
27301
|
+
var SWIFT_BUILDER_TRANSPORT_MARGIN_MS = 3e5;
|
|
27302
|
+
var SWIFT_BUILDER_DEFAULT_COMPILE_MS = 18e5;
|
|
27303
|
+
function swiftBuilderHopTimeoutMs(compileTimeoutMs) {
|
|
27304
|
+
return (compileTimeoutMs ?? SWIFT_BUILDER_DEFAULT_COMPILE_MS) + SWIFT_BUILDER_TRANSPORT_MARGIN_MS;
|
|
27305
|
+
}
|
|
27288
27306
|
function swiftDistributionAt(root) {
|
|
27289
27307
|
const file = import_node_path7.default.join(root, SWIFT_DISTRIBUTION_MANIFEST);
|
|
27290
27308
|
if (!(0, import_node_fs6.existsSync)(file)) return null;
|
|
@@ -27673,7 +27691,7 @@ var EXECUTABLE_LINK_FLAGS = ` "-Xclang-linker", "-O0",
|
|
|
27673
27691
|
`;
|
|
27674
27692
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
27675
27693
|
var MULTI_MANIFEST_VERSION = 39;
|
|
27676
|
-
var compilerSourceDigest = true ? "
|
|
27694
|
+
var compilerSourceDigest = true ? "042e57f70d169ec5fd94262a87fc4d50da0c31cc6a6c329e56f12d4b7c5484a1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
27677
27695
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
27678
27696
|
const hash2 = (0, import_node_crypto7.createHash)("sha256");
|
|
27679
27697
|
hash2.update(`swift-compile
|
|
@@ -31870,6 +31888,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
31870
31888
|
] : compileTargets(input);
|
|
31871
31889
|
const files2 = /* @__PURE__ */ new Map();
|
|
31872
31890
|
const native = /* @__PURE__ */ new Map();
|
|
31891
|
+
const targetFailures = [];
|
|
31873
31892
|
const bySourcePath = [...targets].sort(
|
|
31874
31893
|
(left, right) => right.path.length - left.path.length
|
|
31875
31894
|
);
|
|
@@ -31920,188 +31939,212 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
31920
31939
|
if (units.length === 0) continue;
|
|
31921
31940
|
const settings = input.nativeTargets?.find((value) => value.name === target.name);
|
|
31922
31941
|
if (entries.some(([file]) => file.endsWith(".swift")) || settings && units.some(([file]) => /\.mm?$/.test(file))) {
|
|
31923
|
-
|
|
31924
|
-
|
|
31925
|
-
|
|
31942
|
+
const swift = entries.some(([file]) => file.endsWith(".swift"));
|
|
31943
|
+
try {
|
|
31944
|
+
if (!settings)
|
|
31945
|
+
throw new Error(
|
|
31946
|
+
`mixed target ${target.name} requires its original native target settings; SwiftPM does not compile mixed source targets`
|
|
31947
|
+
);
|
|
31948
|
+
const headers = settings.headers;
|
|
31949
|
+
const roots2 = settings.bridgingHeader ? [settings.bridgingHeader] : settings.publicHeaders;
|
|
31950
|
+
for (const file of headers) {
|
|
31951
|
+
const destination = import_node_path7.default.join(layout.root, file);
|
|
31952
|
+
(0, import_node_fs6.mkdirSync)(import_node_path7.default.dirname(destination), { recursive: true });
|
|
31953
|
+
(0, import_node_fs6.writeFileSync)(destination, input.files[file]);
|
|
31954
|
+
}
|
|
31955
|
+
const search = [
|
|
31956
|
+
.../* @__PURE__ */ new Set([
|
|
31957
|
+
...settings?.headerSearchPaths ?? [],
|
|
31958
|
+
...headers.map((file) => import_node_path7.default.posix.dirname(file))
|
|
31959
|
+
])
|
|
31960
|
+
].flatMap((dir) => ["-I", import_node_path7.default.join(layout.root, dir)]);
|
|
31961
|
+
const pin = distribution ?? JSON.parse((0, import_node_fs6.readFileSync)(import_node_path7.default.join(moduleRoot, "toolchain.json"), "utf8"));
|
|
31962
|
+
const release = pin.release;
|
|
31963
|
+
const toolchainBin = swiftToolchain(release, swiftModuleSdk(moduleRoot));
|
|
31964
|
+
const sdkHeaders = materializeObjcSdk(
|
|
31965
|
+
import_node_path7.default.join(layout.root, ".build", "peach-objc-sdk")
|
|
31926
31966
|
);
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
|
|
31930
|
-
|
|
31931
|
-
|
|
31932
|
-
|
|
31933
|
-
|
|
31934
|
-
|
|
31935
|
-
|
|
31936
|
-
|
|
31937
|
-
|
|
31938
|
-
|
|
31939
|
-
|
|
31940
|
-
|
|
31941
|
-
|
|
31942
|
-
|
|
31943
|
-
|
|
31944
|
-
|
|
31945
|
-
|
|
31946
|
-
|
|
31947
|
-
|
|
31948
|
-
|
|
31949
|
-
|
|
31950
|
-
|
|
31951
|
-
|
|
31952
|
-
|
|
31953
|
-
|
|
31954
|
-
|
|
31955
|
-
|
|
31956
|
-
|
|
31957
|
-
|
|
31958
|
-
|
|
31959
|
-
|
|
31960
|
-
|
|
31961
|
-
|
|
31962
|
-
|
|
31963
|
-
|
|
31964
|
-
|
|
31965
|
-
|
|
31966
|
-
|
|
31967
|
-
|
|
31968
|
-
|
|
31969
|
-
|
|
31970
|
-
|
|
31971
|
-
|
|
31972
|
-
|
|
31973
|
-
|
|
31974
|
-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
31981
|
-
const accessorUnit = `${prefix}${OBJC_RESOURCE_ACCESSOR_BODY}`;
|
|
31982
|
-
if (accessor && (input.files[accessorUnit] !== void 0 || input.files[`${prefix}${OBJC_RESOURCE_ACCESSOR_HEADER}`] !== void 0))
|
|
31983
|
-
throw new Error(`target ${target.name} already contains its resource accessor`);
|
|
31984
|
-
const nativeUnits = accessor ? [...units, [accessorUnit, accessor.body]] : units;
|
|
31985
|
-
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
31986
|
-
if (accessor) {
|
|
31987
|
-
files2.set(accessorHeader, accessor.header);
|
|
31988
|
-
files2.set(import_node_path7.default.join(layout.root, accessorUnit), accessor.body);
|
|
31989
|
-
}
|
|
31990
|
-
const sourceHeaders = import_node_path7.default.join(
|
|
31991
|
-
layout.root,
|
|
31992
|
-
".build",
|
|
31993
|
-
"peach-objc-originals",
|
|
31994
|
-
target.name
|
|
31995
|
-
);
|
|
31996
|
-
(0, import_node_fs6.mkdirSync)(sourceHeaders, { recursive: true });
|
|
31997
|
-
const modulemap = import_node_path7.default.join(sourceHeaders, "module.modulemap");
|
|
31998
|
-
(0, import_node_fs6.writeFileSync)(
|
|
31999
|
-
modulemap,
|
|
32000
|
-
`module ${swiftTargetModuleName(target.name)} {
|
|
31967
|
+
const stageFlags = (flags2, sdkInclude) => flags2.map(
|
|
31968
|
+
(flag) => flag.replaceAll(SWIFT_NATIVE_INPUT_ROOT, layout.root).replaceAll(SWIFT_NATIVE_SDK_INCLUDE, sdkInclude)
|
|
31969
|
+
);
|
|
31970
|
+
const originalFlags = [
|
|
31971
|
+
...settings?.flags ?? [],
|
|
31972
|
+
...search,
|
|
31973
|
+
...(settings?.frameworkSearchPaths ?? []).flatMap((dir) => [
|
|
31974
|
+
"-F",
|
|
31975
|
+
import_node_path7.default.join(layout.root, dir)
|
|
31976
|
+
]),
|
|
31977
|
+
"-I",
|
|
31978
|
+
headerDirectory
|
|
31979
|
+
];
|
|
31980
|
+
const flags = stageFlags(
|
|
31981
|
+
originalFlags,
|
|
31982
|
+
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
31983
|
+
);
|
|
31984
|
+
const prefixHeader = settings?.prefixHeader ? ["-include", import_node_path7.default.join(layout.root, settings.prefixHeader)] : [];
|
|
31985
|
+
const bundleName = entries.some(([file]) => file.endsWith(".swift")) ? void 0 : swiftObjCResourceBundleName({
|
|
31986
|
+
target: target.name,
|
|
31987
|
+
path: target.path,
|
|
31988
|
+
resources: resourceTargets.find((candidate) => candidate.name === target.name)?.resources ?? false,
|
|
31989
|
+
usesBundleMacro: entries.some(
|
|
31990
|
+
([file, contents]) => /\.(?:c|cc|cpp|cxx|m|mm|h|hpp|hh|hxx)$/.test(file) && /\bSWIFTPM_MODULE_BUNDLE\b/.test(contents)
|
|
31991
|
+
),
|
|
31992
|
+
bundles: input.resourceBundles
|
|
31993
|
+
});
|
|
31994
|
+
const accessor = bundleName === void 0 ? void 0 : swiftObjCResourceAccessor(bundleName);
|
|
31995
|
+
const accessorHeader = import_node_path7.default.join(
|
|
31996
|
+
layout.root,
|
|
31997
|
+
target.path,
|
|
31998
|
+
OBJC_RESOURCE_ACCESSOR_HEADER
|
|
31999
|
+
);
|
|
32000
|
+
const accessorUnit = `${prefix}${OBJC_RESOURCE_ACCESSOR_BODY}`;
|
|
32001
|
+
if (accessor && (input.files[accessorUnit] !== void 0 || input.files[`${prefix}${OBJC_RESOURCE_ACCESSOR_HEADER}`] !== void 0))
|
|
32002
|
+
throw new Error(`target ${target.name} already contains its resource accessor`);
|
|
32003
|
+
const nativeUnits = accessor ? [...units, [accessorUnit, accessor.body]] : units;
|
|
32004
|
+
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
32005
|
+
if (accessor) {
|
|
32006
|
+
files2.set(accessorHeader, accessor.header);
|
|
32007
|
+
files2.set(import_node_path7.default.join(layout.root, accessorUnit), accessor.body);
|
|
32008
|
+
}
|
|
32009
|
+
if (roots2.length) {
|
|
32010
|
+
const sourceHeaders = import_node_path7.default.join(
|
|
32011
|
+
layout.root,
|
|
32012
|
+
".build",
|
|
32013
|
+
"peach-objc-originals",
|
|
32014
|
+
target.name
|
|
32015
|
+
);
|
|
32016
|
+
(0, import_node_fs6.mkdirSync)(sourceHeaders, { recursive: true });
|
|
32017
|
+
const modulemap = import_node_path7.default.join(sourceHeaders, "module.modulemap");
|
|
32018
|
+
(0, import_node_fs6.writeFileSync)(
|
|
32019
|
+
modulemap,
|
|
32020
|
+
`module ${swiftTargetModuleName(target.name)} {
|
|
32001
32021
|
${roots2.map((file) => `header ${JSON.stringify(import_node_path7.default.join(layout.root, file))}`).join("\n")}
|
|
32002
32022
|
export *
|
|
32003
32023
|
}
|
|
32004
32024
|
`
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32025
|
+
);
|
|
32026
|
+
const view = objcView(
|
|
32027
|
+
{
|
|
32028
|
+
module: swiftTargetModuleName(target.name),
|
|
32029
|
+
headers: sourceHeaders,
|
|
32030
|
+
modulemap
|
|
32031
|
+
},
|
|
32032
|
+
toolchainBin,
|
|
32033
|
+
import_node_path7.default.join(moduleRoot, "ios-simulator-stdlib"),
|
|
32034
|
+
import_node_path7.default.join(layout.root, ".build", "peach-objc-sdk"),
|
|
32035
|
+
import_node_path7.default.join(layout.root, ".build", "peach-objc-imports", target.name),
|
|
32036
|
+
{
|
|
32037
|
+
flags: stageFlags(originalFlags, import_node_path7.default.join(sdkHeaders, "usr/include")),
|
|
32038
|
+
target: `arm64-apple-ios${settings?.deploymentTarget ?? "16.0"}-simulator`
|
|
32039
|
+
}
|
|
32040
|
+
);
|
|
32041
|
+
const defined = /* @__PURE__ */ new Set();
|
|
32042
|
+
const declarations = (node) => {
|
|
32043
|
+
if (!node || typeof node !== "object") return;
|
|
32044
|
+
const name3 = Reflect.get(node, "name");
|
|
32045
|
+
if (Reflect.get(node, "kind") === "ObjCInterfaceDecl" && Reflect.get(node, "super") && typeof name3 === "string")
|
|
32046
|
+
defined.add(name3);
|
|
32047
|
+
const children = Reflect.get(node, "inner");
|
|
32048
|
+
if (Array.isArray(children)) for (const child of children) declarations(child);
|
|
32049
|
+
};
|
|
32050
|
+
declarations(view.clangAST);
|
|
32051
|
+
const foreignTypes = /* @__PURE__ */ new Map();
|
|
32052
|
+
for (const graph of view.graphs)
|
|
32053
|
+
for (const symbol of graph.symbols) {
|
|
32054
|
+
const nativeName = /^c:objc\(cs\)(\w+)$/.exec(
|
|
32055
|
+
symbol.identifier.precise
|
|
32056
|
+
)?.[1];
|
|
32057
|
+
if (nativeName && defined.has(nativeName))
|
|
32058
|
+
foreignTypes.set(symbol.pathComponents[0], nativeName);
|
|
32059
|
+
}
|
|
32060
|
+
imports.set(target.name, {
|
|
32061
|
+
view,
|
|
32062
|
+
classes: [...foreignTypes.values()],
|
|
32063
|
+
headers: roots2.map((file) => import_node_path7.default.join(layout.root, file)),
|
|
32064
|
+
foreignTypes
|
|
32065
|
+
});
|
|
32033
32066
|
}
|
|
32034
|
-
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
const groups = /* @__PURE__ */ new Map();
|
|
32042
|
-
for (const [file] of nativeUnits) {
|
|
32043
|
-
const origin = settings?.sourceDirectories[file];
|
|
32044
|
-
if (origin) (0, import_node_fs6.mkdirSync)(import_node_path7.default.join(layout.root, origin), { recursive: true });
|
|
32045
|
-
const perFile = [
|
|
32046
|
-
...origin ? ["-iquote", import_node_path7.default.join(layout.root, origin)] : [],
|
|
32047
|
-
...stageFlags(
|
|
32048
|
-
settings?.fileFlags[file] ?? [],
|
|
32049
|
-
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
32050
|
-
)
|
|
32051
|
-
];
|
|
32052
|
-
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
32053
|
-
const identity = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
|
|
32054
|
-
const group = groups.get(identity) ?? {
|
|
32055
|
-
name: `${target.name}SwiftImplementation_${identity}`,
|
|
32056
|
-
sources: [],
|
|
32057
|
-
flags: [...flags, ...prefixHeader, ...accessorFlags, ...perFile],
|
|
32058
|
-
cxxFlags: [
|
|
32059
|
-
...flags,
|
|
32060
|
-
...prefixHeader,
|
|
32061
|
-
...accessorFlags,
|
|
32067
|
+
const thunks = roots2.length ? ["PeachObjCImports.generated.m"] : [];
|
|
32068
|
+
const groups = /* @__PURE__ */ new Map();
|
|
32069
|
+
for (const [file] of nativeUnits) {
|
|
32070
|
+
const origin = settings?.sourceDirectories[file];
|
|
32071
|
+
if (origin) (0, import_node_fs6.mkdirSync)(import_node_path7.default.join(layout.root, origin), { recursive: true });
|
|
32072
|
+
const perFile = [
|
|
32073
|
+
...origin ? ["-iquote", import_node_path7.default.join(layout.root, origin)] : [],
|
|
32062
32074
|
...stageFlags(
|
|
32063
|
-
|
|
32075
|
+
settings?.fileFlags[file] ?? [],
|
|
32064
32076
|
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
32065
|
-
)
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
32072
|
-
|
|
32073
|
-
|
|
32074
|
-
|
|
32075
|
-
|
|
32076
|
-
|
|
32077
|
-
|
|
32078
|
-
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32082
|
-
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
path: target.path,
|
|
32087
|
-
includeDirectory: include2,
|
|
32088
|
-
sources: nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
32089
|
-
lateSources: [...nativeUnits.map(([file]) => file.slice(prefix.length)), thunk],
|
|
32090
|
-
exclude: [
|
|
32091
|
-
...entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length)),
|
|
32092
|
-
...accessor ? [OBJC_RESOURCE_ACCESSOR_HEADER, OBJC_RESOURCE_ACCESSOR_BODY] : [],
|
|
32093
|
-
thunk,
|
|
32094
|
-
"include"
|
|
32095
|
-
],
|
|
32096
|
-
groups: [...groups.values()],
|
|
32097
|
-
late: {
|
|
32098
|
-
name: `${target.name}SwiftImplementation`,
|
|
32099
|
-
producers: [
|
|
32100
|
-
target.name,
|
|
32101
|
-
...(target.dependencies ?? []).filter((dependency) => swiftTargets.has(dependency.name)).map((dependency) => dependency.name)
|
|
32102
|
-
]
|
|
32077
|
+
)
|
|
32078
|
+
];
|
|
32079
|
+
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
32080
|
+
const identity = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
|
|
32081
|
+
const group = groups.get(identity) ?? {
|
|
32082
|
+
name: `${target.name}SwiftImplementation_${identity}`,
|
|
32083
|
+
sources: [],
|
|
32084
|
+
flags: [...flags, ...prefixHeader, ...accessorFlags, ...perFile],
|
|
32085
|
+
cxxFlags: [
|
|
32086
|
+
...flags,
|
|
32087
|
+
...prefixHeader,
|
|
32088
|
+
...accessorFlags,
|
|
32089
|
+
...stageFlags(
|
|
32090
|
+
cxx ? settings.cxxFlags : [],
|
|
32091
|
+
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
32092
|
+
),
|
|
32093
|
+
...perFile
|
|
32094
|
+
]
|
|
32095
|
+
};
|
|
32096
|
+
group.sources.push(file.slice(prefix.length));
|
|
32097
|
+
groups.set(identity, group);
|
|
32103
32098
|
}
|
|
32104
|
-
|
|
32099
|
+
if (thunks.length)
|
|
32100
|
+
groups.set("imports", {
|
|
32101
|
+
name: `${target.name}ObjCImports`,
|
|
32102
|
+
sources: thunks,
|
|
32103
|
+
flags: [...flags, "-fobjc-arc"],
|
|
32104
|
+
cxxFlags: [...flags, "-fobjc-arc"]
|
|
32105
|
+
});
|
|
32106
|
+
const include2 = import_node_path7.default.join(layout.root, target.path, "include");
|
|
32107
|
+
files2.set(
|
|
32108
|
+
import_node_path7.default.join(include2, "module.modulemap"),
|
|
32109
|
+
`module ${target.name}ImplementationDeclarations { export * }
|
|
32110
|
+
`
|
|
32111
|
+
);
|
|
32112
|
+
native.set(target.name, {
|
|
32113
|
+
mixed: true,
|
|
32114
|
+
path: target.path,
|
|
32115
|
+
includeDirectory: include2,
|
|
32116
|
+
sources: nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
32117
|
+
lateSources: [
|
|
32118
|
+
...nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
32119
|
+
...thunks
|
|
32120
|
+
],
|
|
32121
|
+
exclude: [
|
|
32122
|
+
...entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length)),
|
|
32123
|
+
...accessor ? [OBJC_RESOURCE_ACCESSOR_HEADER, OBJC_RESOURCE_ACCESSOR_BODY] : [],
|
|
32124
|
+
...thunks,
|
|
32125
|
+
"include"
|
|
32126
|
+
],
|
|
32127
|
+
groups: [...groups.values()],
|
|
32128
|
+
late: {
|
|
32129
|
+
name: `${target.name}SwiftImplementation`,
|
|
32130
|
+
producers: [
|
|
32131
|
+
target.name,
|
|
32132
|
+
...(target.dependencies ?? []).filter((dependency) => swiftTargets.has(dependency.name)).map((dependency) => dependency.name)
|
|
32133
|
+
]
|
|
32134
|
+
}
|
|
32135
|
+
});
|
|
32136
|
+
} catch (error) {
|
|
32137
|
+
if (!swift || !(error instanceof Error)) throw error;
|
|
32138
|
+
targetFailures.push(`${target.name}: ${error.message}`);
|
|
32139
|
+
native.set(target.name, {
|
|
32140
|
+
mixed: true,
|
|
32141
|
+
path: target.path,
|
|
32142
|
+
includeDirectory: import_node_path7.default.join(layout.root, target.path, "include"),
|
|
32143
|
+
sources: [],
|
|
32144
|
+
lateSources: [],
|
|
32145
|
+
exclude: entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length))
|
|
32146
|
+
});
|
|
32147
|
+
}
|
|
32105
32148
|
continue;
|
|
32106
32149
|
}
|
|
32107
32150
|
const includes = `${prefix}include/`;
|
|
@@ -32264,20 +32307,27 @@ export *
|
|
|
32264
32307
|
for (const name3 of objcProducers) {
|
|
32265
32308
|
const target = targets.find((value) => value.name === name3);
|
|
32266
32309
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
|
|
32271
|
-
|
|
32272
|
-
|
|
32273
|
-
|
|
32274
|
-
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32279
|
-
|
|
32280
|
-
|
|
32310
|
+
let exported;
|
|
32311
|
+
try {
|
|
32312
|
+
exported = swiftObjCExports({
|
|
32313
|
+
module: swiftTargetModuleName(name3),
|
|
32314
|
+
sources: Object.entries(input.files).filter(
|
|
32315
|
+
([file]) => file.startsWith(prefix) && file.endsWith(".swift") && !targets.some(
|
|
32316
|
+
(candidate) => candidate.name !== name3 && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
|
|
32317
|
+
) && !target.exclude?.some(
|
|
32318
|
+
(excluded) => file.slice(prefix.length) === excluded || file.slice(prefix.length).startsWith(`${excluded}/`)
|
|
32319
|
+
)
|
|
32320
|
+
),
|
|
32321
|
+
mask: swiftCodeMask,
|
|
32322
|
+
declarationStart,
|
|
32323
|
+
selector: objcSelectorName,
|
|
32324
|
+
foreignTypes: imports.get(name3)?.foreignTypes
|
|
32325
|
+
});
|
|
32326
|
+
} catch (error) {
|
|
32327
|
+
if (!(error instanceof Error)) throw error;
|
|
32328
|
+
targetFailures.push(`${name3}: ${error.message}`);
|
|
32329
|
+
continue;
|
|
32330
|
+
}
|
|
32281
32331
|
const original = imports.get(name3);
|
|
32282
32332
|
if (!exported && !original) continue;
|
|
32283
32333
|
objcModules.add(name3);
|
|
@@ -32549,6 +32599,7 @@ public func __peachObjcExportRoot() { _objcRegisterPeerClass(NSObject.self, nati
|
|
|
32549
32599
|
for (const dependency of dependencies.get(producer) ?? []) include(dependency);
|
|
32550
32600
|
return {
|
|
32551
32601
|
headerProducers: producers.filter((name3) => !included.has(name3)),
|
|
32602
|
+
targetFailures,
|
|
32552
32603
|
...rootOwner && objcExports ? {
|
|
32553
32604
|
objcImplementations: {
|
|
32554
32605
|
owner: import_node_path7.default.join(layout.root, rootOwner),
|
|
@@ -32739,7 +32790,7 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
32739
32790
|
],
|
|
32740
32791
|
{
|
|
32741
32792
|
cwd: repo,
|
|
32742
|
-
timeout: options.timeoutMs,
|
|
32793
|
+
timeout: options.timeoutMs === void 0 ? void 0 : swiftBuilderHopTimeoutMs(options.timeoutMs),
|
|
32743
32794
|
maxBuffer: 64 * 1024 * 1024,
|
|
32744
32795
|
signal: options.signal
|
|
32745
32796
|
},
|
|
@@ -32771,6 +32822,9 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
32771
32822
|
return retain(root, built2);
|
|
32772
32823
|
}
|
|
32773
32824
|
const preparation = writeSwiftProject(layout, input, moduleRoot);
|
|
32825
|
+
const unprepared = preparation.targetFailures.map(
|
|
32826
|
+
(failure2) => `error: target ${failure2}`
|
|
32827
|
+
);
|
|
32774
32828
|
const swift = import_node_path7.default.join(options.toolchainBin, "swift");
|
|
32775
32829
|
if (!(0, import_node_fs6.existsSync)(swift)) {
|
|
32776
32830
|
throw new Error(
|
|
@@ -32920,18 +32974,23 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
32920
32974
|
);
|
|
32921
32975
|
} catch (retryError) {
|
|
32922
32976
|
throw new Error(
|
|
32923
|
-
|
|
32924
|
-
|
|
32925
|
-
|
|
32926
|
-
|
|
32977
|
+
[
|
|
32978
|
+
...unprepared,
|
|
32979
|
+
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
32980
|
+
].join("\n"),
|
|
32981
|
+
{ cause: retryError }
|
|
32927
32982
|
);
|
|
32928
32983
|
}
|
|
32929
32984
|
} else {
|
|
32930
|
-
throw new Error(
|
|
32931
|
-
|
|
32932
|
-
|
|
32985
|
+
throw new Error(
|
|
32986
|
+
[...unprepared, projectDiagnostic(output, layout, input.files)].join(
|
|
32987
|
+
"\n"
|
|
32988
|
+
),
|
|
32989
|
+
{ cause: error }
|
|
32990
|
+
);
|
|
32933
32991
|
}
|
|
32934
32992
|
}
|
|
32993
|
+
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
32935
32994
|
const artifact = {
|
|
32936
32995
|
hash: hash2,
|
|
32937
32996
|
bytes: (0, import_node_fs6.readFileSync)(builtArtifact(layout)),
|
|
@@ -34835,12 +34894,12 @@ init_home_paths();
|
|
|
34835
34894
|
|
|
34836
34895
|
// src/swift-distribution.lock.json
|
|
34837
34896
|
var swift_distribution_lock_default = {
|
|
34838
|
-
id: "
|
|
34897
|
+
id: "ca4dfda0ca14bc49",
|
|
34839
34898
|
release: "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae",
|
|
34840
34899
|
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-f02bd198",
|
|
34841
34900
|
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-f02bd198.artifactbundle.tar.gz",
|
|
34842
34901
|
wasmSdkChecksum: "1e19ea768fd4e821aae34b8966c4ddcee45615c4b3cf018979b061aee2fb5504",
|
|
34843
|
-
source: "
|
|
34902
|
+
source: "33e8641403dd73a7ce0ca902007e3a36407e1f0b",
|
|
34844
34903
|
targets: [
|
|
34845
34904
|
"ImagePlayground",
|
|
34846
34905
|
"QuickLookThumbnailing",
|
|
@@ -34885,6 +34944,7 @@ var swift_distribution_lock_default = {
|
|
|
34885
34944
|
"PeachObjCRuntime",
|
|
34886
34945
|
"PeachObjC",
|
|
34887
34946
|
"UIUtilities",
|
|
34947
|
+
"UIKitEnums",
|
|
34888
34948
|
"UIKitCore",
|
|
34889
34949
|
"PeachICU",
|
|
34890
34950
|
"PeachCMark",
|
|
@@ -35000,33 +35060,14 @@ var swift_distribution_lock_default = {
|
|
|
35000
35060
|
"PeachBox2D"
|
|
35001
35061
|
],
|
|
35002
35062
|
systemEnvironment: {
|
|
35003
|
-
scenePhase: [
|
|
35004
|
-
|
|
35005
|
-
|
|
35006
|
-
|
|
35007
|
-
],
|
|
35008
|
-
|
|
35009
|
-
|
|
35010
|
-
],
|
|
35011
|
-
systemName: [
|
|
35012
|
-
"string"
|
|
35013
|
-
],
|
|
35014
|
-
systemVersion: [
|
|
35015
|
-
"string"
|
|
35016
|
-
],
|
|
35017
|
-
colorScheme: [
|
|
35018
|
-
"string:light",
|
|
35019
|
-
"string:dark"
|
|
35020
|
-
],
|
|
35021
|
-
semanticColors: [
|
|
35022
|
-
"object"
|
|
35023
|
-
],
|
|
35024
|
-
imageAssets: [
|
|
35025
|
-
"object"
|
|
35026
|
-
],
|
|
35027
|
-
locale: [
|
|
35028
|
-
"string"
|
|
35029
|
-
],
|
|
35063
|
+
scenePhase: ["string:active", "string:inactive", "string:background"],
|
|
35064
|
+
deviceModel: ["string"],
|
|
35065
|
+
systemName: ["string"],
|
|
35066
|
+
systemVersion: ["string"],
|
|
35067
|
+
colorScheme: ["string:light", "string:dark"],
|
|
35068
|
+
semanticColors: ["object"],
|
|
35069
|
+
imageAssets: ["object"],
|
|
35070
|
+
locale: ["string"],
|
|
35030
35071
|
dynamicTypeSize: [
|
|
35031
35072
|
"string:xSmall",
|
|
35032
35073
|
"string:small",
|
|
@@ -35041,30 +35082,22 @@ var swift_distribution_lock_default = {
|
|
|
35041
35082
|
"string:accessibility4",
|
|
35042
35083
|
"string:accessibility5"
|
|
35043
35084
|
],
|
|
35044
|
-
horizontalSizeClass: [
|
|
35045
|
-
|
|
35046
|
-
|
|
35047
|
-
],
|
|
35048
|
-
verticalSizeClass: [
|
|
35049
|
-
"string:compact",
|
|
35050
|
-
"string:regular"
|
|
35051
|
-
],
|
|
35052
|
-
accessibilityReduceMotion: [
|
|
35053
|
-
"bool"
|
|
35054
|
-
]
|
|
35085
|
+
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
35086
|
+
verticalSizeClass: ["string:compact", "string:regular"],
|
|
35087
|
+
accessibilityReduceMotion: ["bool"]
|
|
35055
35088
|
},
|
|
35056
35089
|
hosts: {
|
|
35057
35090
|
"darwin-arm64": {
|
|
35058
|
-
sha256: "
|
|
35059
|
-
size:
|
|
35091
|
+
sha256: "8679052c4c2b21ad748a8db40cdbc0c91ab14a29fc06bbed777efb57030c01fa",
|
|
35092
|
+
size: 70963039
|
|
35060
35093
|
},
|
|
35061
35094
|
"linux-x64": {
|
|
35062
|
-
sha256: "
|
|
35063
|
-
size:
|
|
35095
|
+
sha256: "a1719d844e2f45e8c9a2ccb9dbe7857978918639a3933c225a328d84cae235cf",
|
|
35096
|
+
size: 70968746
|
|
35064
35097
|
},
|
|
35065
35098
|
"linux-arm64": {
|
|
35066
|
-
sha256: "
|
|
35067
|
-
size:
|
|
35099
|
+
sha256: "3da8f2c920e65c633b5310c778b4a5c54b0f5f8278d58fd109f3db4310794c04",
|
|
35100
|
+
size: 70967077
|
|
35068
35101
|
}
|
|
35069
35102
|
}
|
|
35070
35103
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|