peachsim 0.1.1654 → 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/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 +237 -196
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +237 -196
- 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 +264 -208
- package/dist-lib/host/fetch-proxy-handler.cjs +28 -13
- 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 +1 -1
- 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 +51 -51
- 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 +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +265 -209
- package/dist-lib/swift-compile.cjs +237 -196
- package/dist-lib/swift-compile.mjs +237 -196
- 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 +237 -196
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +4 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/host/fetch-proxy-handler.ts +27 -10
- package/src/swift-compile.ts +286 -237
- package/src/swiftContract.ts +2 -0
package/dist-lib/cloud.cjs
CHANGED
|
@@ -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;
|
package/dist-lib/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/config.cjs
CHANGED
|
@@ -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;
|
package/dist-lib/config.mjs
CHANGED
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -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;
|
|
@@ -4614,7 +4614,7 @@ var import_node_module = require("node:module");
|
|
|
4614
4614
|
var import_node_path2 = require("node:path");
|
|
4615
4615
|
|
|
4616
4616
|
// runtime-companion.json
|
|
4617
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
4617
|
+
var runtime_companion_default = { abi: 1, sha256: "6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce", file: "node/cli-6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce.cjs" };
|
|
4618
4618
|
|
|
4619
4619
|
// src/runtime-assets.ts
|
|
4620
4620
|
var import_fs = __toESM(require("fs"), 1);
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -27691,7 +27691,7 @@ var EXECUTABLE_LINK_FLAGS = ` "-Xclang-linker", "-O0",
|
|
|
27691
27691
|
`;
|
|
27692
27692
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
27693
27693
|
var MULTI_MANIFEST_VERSION = 39;
|
|
27694
|
-
var compilerSourceDigest = true ? "
|
|
27694
|
+
var compilerSourceDigest = true ? "042e57f70d169ec5fd94262a87fc4d50da0c31cc6a6c329e56f12d4b7c5484a1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
27695
27695
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
27696
27696
|
const hash2 = (0, import_node_crypto7.createHash)("sha256");
|
|
27697
27697
|
hash2.update(`swift-compile
|
|
@@ -31888,6 +31888,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
31888
31888
|
] : compileTargets(input);
|
|
31889
31889
|
const files2 = /* @__PURE__ */ new Map();
|
|
31890
31890
|
const native = /* @__PURE__ */ new Map();
|
|
31891
|
+
const targetFailures = [];
|
|
31891
31892
|
const bySourcePath = [...targets].sort(
|
|
31892
31893
|
(left, right) => right.path.length - left.path.length
|
|
31893
31894
|
);
|
|
@@ -31938,188 +31939,212 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
31938
31939
|
if (units.length === 0) continue;
|
|
31939
31940
|
const settings = input.nativeTargets?.find((value) => value.name === target.name);
|
|
31940
31941
|
if (entries.some(([file]) => file.endsWith(".swift")) || settings && units.some(([file]) => /\.mm?$/.test(file))) {
|
|
31941
|
-
|
|
31942
|
-
|
|
31943
|
-
|
|
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")
|
|
31944
31966
|
);
|
|
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
|
-
|
|
31982
|
-
|
|
31983
|
-
|
|
31984
|
-
|
|
31985
|
-
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
const accessorUnit = `${prefix}${OBJC_RESOURCE_ACCESSOR_BODY}`;
|
|
32000
|
-
if (accessor && (input.files[accessorUnit] !== void 0 || input.files[`${prefix}${OBJC_RESOURCE_ACCESSOR_HEADER}`] !== void 0))
|
|
32001
|
-
throw new Error(`target ${target.name} already contains its resource accessor`);
|
|
32002
|
-
const nativeUnits = accessor ? [...units, [accessorUnit, accessor.body]] : units;
|
|
32003
|
-
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
32004
|
-
if (accessor) {
|
|
32005
|
-
files2.set(accessorHeader, accessor.header);
|
|
32006
|
-
files2.set(import_node_path7.default.join(layout.root, accessorUnit), accessor.body);
|
|
32007
|
-
}
|
|
32008
|
-
const sourceHeaders = import_node_path7.default.join(
|
|
32009
|
-
layout.root,
|
|
32010
|
-
".build",
|
|
32011
|
-
"peach-objc-originals",
|
|
32012
|
-
target.name
|
|
32013
|
-
);
|
|
32014
|
-
(0, import_node_fs6.mkdirSync)(sourceHeaders, { recursive: true });
|
|
32015
|
-
const modulemap = import_node_path7.default.join(sourceHeaders, "module.modulemap");
|
|
32016
|
-
(0, import_node_fs6.writeFileSync)(
|
|
32017
|
-
modulemap,
|
|
32018
|
-
`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)} {
|
|
32019
32021
|
${roots2.map((file) => `header ${JSON.stringify(import_node_path7.default.join(layout.root, file))}`).join("\n")}
|
|
32020
32022
|
export *
|
|
32021
32023
|
}
|
|
32022
32024
|
`
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32034
|
-
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
|
|
32043
|
-
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
|
|
32047
|
-
|
|
32048
|
-
|
|
32049
|
-
|
|
32050
|
-
|
|
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
|
+
});
|
|
32051
32066
|
}
|
|
32052
|
-
|
|
32053
|
-
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
const groups = /* @__PURE__ */ new Map();
|
|
32060
|
-
for (const [file] of nativeUnits) {
|
|
32061
|
-
const origin = settings?.sourceDirectories[file];
|
|
32062
|
-
if (origin) (0, import_node_fs6.mkdirSync)(import_node_path7.default.join(layout.root, origin), { recursive: true });
|
|
32063
|
-
const perFile = [
|
|
32064
|
-
...origin ? ["-iquote", import_node_path7.default.join(layout.root, origin)] : [],
|
|
32065
|
-
...stageFlags(
|
|
32066
|
-
settings?.fileFlags[file] ?? [],
|
|
32067
|
-
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
32068
|
-
)
|
|
32069
|
-
];
|
|
32070
|
-
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
32071
|
-
const identity = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
|
|
32072
|
-
const group = groups.get(identity) ?? {
|
|
32073
|
-
name: `${target.name}SwiftImplementation_${identity}`,
|
|
32074
|
-
sources: [],
|
|
32075
|
-
flags: [...flags, ...prefixHeader, ...accessorFlags, ...perFile],
|
|
32076
|
-
cxxFlags: [
|
|
32077
|
-
...flags,
|
|
32078
|
-
...prefixHeader,
|
|
32079
|
-
...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)] : [],
|
|
32080
32074
|
...stageFlags(
|
|
32081
|
-
|
|
32075
|
+
settings?.fileFlags[file] ?? [],
|
|
32082
32076
|
import_node_path7.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
32083
|
-
)
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
path: target.path,
|
|
32105
|
-
includeDirectory: include2,
|
|
32106
|
-
sources: nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
32107
|
-
lateSources: [...nativeUnits.map(([file]) => file.slice(prefix.length)), thunk],
|
|
32108
|
-
exclude: [
|
|
32109
|
-
...entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length)),
|
|
32110
|
-
...accessor ? [OBJC_RESOURCE_ACCESSOR_HEADER, OBJC_RESOURCE_ACCESSOR_BODY] : [],
|
|
32111
|
-
thunk,
|
|
32112
|
-
"include"
|
|
32113
|
-
],
|
|
32114
|
-
groups: [...groups.values()],
|
|
32115
|
-
late: {
|
|
32116
|
-
name: `${target.name}SwiftImplementation`,
|
|
32117
|
-
producers: [
|
|
32118
|
-
target.name,
|
|
32119
|
-
...(target.dependencies ?? []).filter((dependency) => swiftTargets.has(dependency.name)).map((dependency) => dependency.name)
|
|
32120
|
-
]
|
|
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);
|
|
32121
32098
|
}
|
|
32122
|
-
|
|
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
|
+
}
|
|
32123
32148
|
continue;
|
|
32124
32149
|
}
|
|
32125
32150
|
const includes = `${prefix}include/`;
|
|
@@ -32282,20 +32307,27 @@ export *
|
|
|
32282
32307
|
for (const name3 of objcProducers) {
|
|
32283
32308
|
const target = targets.find((value) => value.name === name3);
|
|
32284
32309
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
32285
|
-
|
|
32286
|
-
|
|
32287
|
-
|
|
32288
|
-
|
|
32289
|
-
|
|
32290
|
-
|
|
32291
|
-
|
|
32292
|
-
|
|
32293
|
-
|
|
32294
|
-
|
|
32295
|
-
|
|
32296
|
-
|
|
32297
|
-
|
|
32298
|
-
|
|
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
|
+
}
|
|
32299
32331
|
const original = imports.get(name3);
|
|
32300
32332
|
if (!exported && !original) continue;
|
|
32301
32333
|
objcModules.add(name3);
|
|
@@ -32567,6 +32599,7 @@ public func __peachObjcExportRoot() { _objcRegisterPeerClass(NSObject.self, nati
|
|
|
32567
32599
|
for (const dependency of dependencies.get(producer) ?? []) include(dependency);
|
|
32568
32600
|
return {
|
|
32569
32601
|
headerProducers: producers.filter((name3) => !included.has(name3)),
|
|
32602
|
+
targetFailures,
|
|
32570
32603
|
...rootOwner && objcExports ? {
|
|
32571
32604
|
objcImplementations: {
|
|
32572
32605
|
owner: import_node_path7.default.join(layout.root, rootOwner),
|
|
@@ -32789,6 +32822,9 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
32789
32822
|
return retain(root, built2);
|
|
32790
32823
|
}
|
|
32791
32824
|
const preparation = writeSwiftProject(layout, input, moduleRoot);
|
|
32825
|
+
const unprepared = preparation.targetFailures.map(
|
|
32826
|
+
(failure2) => `error: target ${failure2}`
|
|
32827
|
+
);
|
|
32792
32828
|
const swift = import_node_path7.default.join(options.toolchainBin, "swift");
|
|
32793
32829
|
if (!(0, import_node_fs6.existsSync)(swift)) {
|
|
32794
32830
|
throw new Error(
|
|
@@ -32938,18 +32974,23 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
32938
32974
|
);
|
|
32939
32975
|
} catch (retryError) {
|
|
32940
32976
|
throw new Error(
|
|
32941
|
-
|
|
32942
|
-
|
|
32943
|
-
|
|
32944
|
-
|
|
32977
|
+
[
|
|
32978
|
+
...unprepared,
|
|
32979
|
+
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
32980
|
+
].join("\n"),
|
|
32981
|
+
{ cause: retryError }
|
|
32945
32982
|
);
|
|
32946
32983
|
}
|
|
32947
32984
|
} else {
|
|
32948
|
-
throw new Error(
|
|
32949
|
-
|
|
32950
|
-
|
|
32985
|
+
throw new Error(
|
|
32986
|
+
[...unprepared, projectDiagnostic(output, layout, input.files)].join(
|
|
32987
|
+
"\n"
|
|
32988
|
+
),
|
|
32989
|
+
{ cause: error }
|
|
32990
|
+
);
|
|
32951
32991
|
}
|
|
32952
32992
|
}
|
|
32993
|
+
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
32953
32994
|
const artifact = {
|
|
32954
32995
|
hash: hash2,
|
|
32955
32996
|
bytes: (0, import_node_fs6.readFileSync)(builtArtifact(layout)),
|
|
@@ -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;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -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;
|