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
|
@@ -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;
|
|
@@ -10028,7 +10028,7 @@ var init_runtime_assets = __esm({
|
|
|
10028
10028
|
var runtime_companion_default;
|
|
10029
10029
|
var init_runtime_companion = __esm({
|
|
10030
10030
|
"runtime-companion.json"() {
|
|
10031
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
10031
|
+
runtime_companion_default = { abi: 1, sha256: "6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce", file: "node/cli-6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce.cjs" };
|
|
10032
10032
|
}
|
|
10033
10033
|
});
|
|
10034
10034
|
|
|
@@ -34184,7 +34184,7 @@ var EXECUTABLE_LINK_FLAGS = ` "-Xclang-linker", "-O0",
|
|
|
34184
34184
|
`;
|
|
34185
34185
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
34186
34186
|
var MULTI_MANIFEST_VERSION = 39;
|
|
34187
|
-
var compilerSourceDigest = true ? "
|
|
34187
|
+
var compilerSourceDigest = true ? "042e57f70d169ec5fd94262a87fc4d50da0c31cc6a6c329e56f12d4b7c5484a1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
34188
34188
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
34189
34189
|
const hash2 = (0, import_node_crypto9.createHash)("sha256");
|
|
34190
34190
|
hash2.update(`swift-compile
|
|
@@ -38381,6 +38381,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
38381
38381
|
] : compileTargets(input);
|
|
38382
38382
|
const files2 = /* @__PURE__ */ new Map();
|
|
38383
38383
|
const native = /* @__PURE__ */ new Map();
|
|
38384
|
+
const targetFailures = [];
|
|
38384
38385
|
const bySourcePath = [...targets].sort(
|
|
38385
38386
|
(left, right) => right.path.length - left.path.length
|
|
38386
38387
|
);
|
|
@@ -38431,188 +38432,212 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
38431
38432
|
if (units.length === 0) continue;
|
|
38432
38433
|
const settings = input.nativeTargets?.find((value) => value.name === target.name);
|
|
38433
38434
|
if (entries.some(([file]) => file.endsWith(".swift")) || settings && units.some(([file]) => /\.mm?$/.test(file))) {
|
|
38434
|
-
|
|
38435
|
-
|
|
38436
|
-
|
|
38435
|
+
const swift = entries.some(([file]) => file.endsWith(".swift"));
|
|
38436
|
+
try {
|
|
38437
|
+
if (!settings)
|
|
38438
|
+
throw new Error(
|
|
38439
|
+
`mixed target ${target.name} requires its original native target settings; SwiftPM does not compile mixed source targets`
|
|
38440
|
+
);
|
|
38441
|
+
const headers = settings.headers;
|
|
38442
|
+
const roots2 = settings.bridgingHeader ? [settings.bridgingHeader] : settings.publicHeaders;
|
|
38443
|
+
for (const file of headers) {
|
|
38444
|
+
const destination = import_node_path11.default.join(layout.root, file);
|
|
38445
|
+
(0, import_node_fs12.mkdirSync)(import_node_path11.default.dirname(destination), { recursive: true });
|
|
38446
|
+
(0, import_node_fs12.writeFileSync)(destination, input.files[file]);
|
|
38447
|
+
}
|
|
38448
|
+
const search = [
|
|
38449
|
+
.../* @__PURE__ */ new Set([
|
|
38450
|
+
...settings?.headerSearchPaths ?? [],
|
|
38451
|
+
...headers.map((file) => import_node_path11.default.posix.dirname(file))
|
|
38452
|
+
])
|
|
38453
|
+
].flatMap((dir) => ["-I", import_node_path11.default.join(layout.root, dir)]);
|
|
38454
|
+
const pin = distribution ?? JSON.parse((0, import_node_fs12.readFileSync)(import_node_path11.default.join(moduleRoot, "toolchain.json"), "utf8"));
|
|
38455
|
+
const release = pin.release;
|
|
38456
|
+
const toolchainBin = swiftToolchain(release, swiftModuleSdk(moduleRoot));
|
|
38457
|
+
const sdkHeaders = materializeObjcSdk(
|
|
38458
|
+
import_node_path11.default.join(layout.root, ".build", "peach-objc-sdk")
|
|
38437
38459
|
);
|
|
38438
|
-
|
|
38439
|
-
|
|
38440
|
-
|
|
38441
|
-
|
|
38442
|
-
|
|
38443
|
-
|
|
38444
|
-
|
|
38445
|
-
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38451
|
-
|
|
38452
|
-
|
|
38453
|
-
|
|
38454
|
-
|
|
38455
|
-
|
|
38456
|
-
|
|
38457
|
-
|
|
38458
|
-
|
|
38459
|
-
|
|
38460
|
-
|
|
38461
|
-
|
|
38462
|
-
|
|
38463
|
-
|
|
38464
|
-
|
|
38465
|
-
|
|
38466
|
-
|
|
38467
|
-
|
|
38468
|
-
|
|
38469
|
-
|
|
38470
|
-
|
|
38471
|
-
|
|
38472
|
-
|
|
38473
|
-
|
|
38474
|
-
|
|
38475
|
-
|
|
38476
|
-
|
|
38477
|
-
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38482
|
-
|
|
38483
|
-
|
|
38484
|
-
|
|
38485
|
-
|
|
38486
|
-
|
|
38487
|
-
|
|
38488
|
-
|
|
38489
|
-
|
|
38490
|
-
|
|
38491
|
-
|
|
38492
|
-
const accessorUnit = `${prefix}${OBJC_RESOURCE_ACCESSOR_BODY}`;
|
|
38493
|
-
if (accessor && (input.files[accessorUnit] !== void 0 || input.files[`${prefix}${OBJC_RESOURCE_ACCESSOR_HEADER}`] !== void 0))
|
|
38494
|
-
throw new Error(`target ${target.name} already contains its resource accessor`);
|
|
38495
|
-
const nativeUnits = accessor ? [...units, [accessorUnit, accessor.body]] : units;
|
|
38496
|
-
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
38497
|
-
if (accessor) {
|
|
38498
|
-
files2.set(accessorHeader, accessor.header);
|
|
38499
|
-
files2.set(import_node_path11.default.join(layout.root, accessorUnit), accessor.body);
|
|
38500
|
-
}
|
|
38501
|
-
const sourceHeaders = import_node_path11.default.join(
|
|
38502
|
-
layout.root,
|
|
38503
|
-
".build",
|
|
38504
|
-
"peach-objc-originals",
|
|
38505
|
-
target.name
|
|
38506
|
-
);
|
|
38507
|
-
(0, import_node_fs12.mkdirSync)(sourceHeaders, { recursive: true });
|
|
38508
|
-
const modulemap = import_node_path11.default.join(sourceHeaders, "module.modulemap");
|
|
38509
|
-
(0, import_node_fs12.writeFileSync)(
|
|
38510
|
-
modulemap,
|
|
38511
|
-
`module ${swiftTargetModuleName(target.name)} {
|
|
38460
|
+
const stageFlags = (flags2, sdkInclude) => flags2.map(
|
|
38461
|
+
(flag) => flag.replaceAll(SWIFT_NATIVE_INPUT_ROOT, layout.root).replaceAll(SWIFT_NATIVE_SDK_INCLUDE, sdkInclude)
|
|
38462
|
+
);
|
|
38463
|
+
const originalFlags = [
|
|
38464
|
+
...settings?.flags ?? [],
|
|
38465
|
+
...search,
|
|
38466
|
+
...(settings?.frameworkSearchPaths ?? []).flatMap((dir) => [
|
|
38467
|
+
"-F",
|
|
38468
|
+
import_node_path11.default.join(layout.root, dir)
|
|
38469
|
+
]),
|
|
38470
|
+
"-I",
|
|
38471
|
+
headerDirectory
|
|
38472
|
+
];
|
|
38473
|
+
const flags = stageFlags(
|
|
38474
|
+
originalFlags,
|
|
38475
|
+
import_node_path11.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
38476
|
+
);
|
|
38477
|
+
const prefixHeader = settings?.prefixHeader ? ["-include", import_node_path11.default.join(layout.root, settings.prefixHeader)] : [];
|
|
38478
|
+
const bundleName = entries.some(([file]) => file.endsWith(".swift")) ? void 0 : swiftObjCResourceBundleName({
|
|
38479
|
+
target: target.name,
|
|
38480
|
+
path: target.path,
|
|
38481
|
+
resources: resourceTargets.find((candidate) => candidate.name === target.name)?.resources ?? false,
|
|
38482
|
+
usesBundleMacro: entries.some(
|
|
38483
|
+
([file, contents]) => /\.(?:c|cc|cpp|cxx|m|mm|h|hpp|hh|hxx)$/.test(file) && /\bSWIFTPM_MODULE_BUNDLE\b/.test(contents)
|
|
38484
|
+
),
|
|
38485
|
+
bundles: input.resourceBundles
|
|
38486
|
+
});
|
|
38487
|
+
const accessor = bundleName === void 0 ? void 0 : swiftObjCResourceAccessor(bundleName);
|
|
38488
|
+
const accessorHeader = import_node_path11.default.join(
|
|
38489
|
+
layout.root,
|
|
38490
|
+
target.path,
|
|
38491
|
+
OBJC_RESOURCE_ACCESSOR_HEADER
|
|
38492
|
+
);
|
|
38493
|
+
const accessorUnit = `${prefix}${OBJC_RESOURCE_ACCESSOR_BODY}`;
|
|
38494
|
+
if (accessor && (input.files[accessorUnit] !== void 0 || input.files[`${prefix}${OBJC_RESOURCE_ACCESSOR_HEADER}`] !== void 0))
|
|
38495
|
+
throw new Error(`target ${target.name} already contains its resource accessor`);
|
|
38496
|
+
const nativeUnits = accessor ? [...units, [accessorUnit, accessor.body]] : units;
|
|
38497
|
+
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
38498
|
+
if (accessor) {
|
|
38499
|
+
files2.set(accessorHeader, accessor.header);
|
|
38500
|
+
files2.set(import_node_path11.default.join(layout.root, accessorUnit), accessor.body);
|
|
38501
|
+
}
|
|
38502
|
+
if (roots2.length) {
|
|
38503
|
+
const sourceHeaders = import_node_path11.default.join(
|
|
38504
|
+
layout.root,
|
|
38505
|
+
".build",
|
|
38506
|
+
"peach-objc-originals",
|
|
38507
|
+
target.name
|
|
38508
|
+
);
|
|
38509
|
+
(0, import_node_fs12.mkdirSync)(sourceHeaders, { recursive: true });
|
|
38510
|
+
const modulemap = import_node_path11.default.join(sourceHeaders, "module.modulemap");
|
|
38511
|
+
(0, import_node_fs12.writeFileSync)(
|
|
38512
|
+
modulemap,
|
|
38513
|
+
`module ${swiftTargetModuleName(target.name)} {
|
|
38512
38514
|
${roots2.map((file) => `header ${JSON.stringify(import_node_path11.default.join(layout.root, file))}`).join("\n")}
|
|
38513
38515
|
export *
|
|
38514
38516
|
}
|
|
38515
38517
|
`
|
|
38516
|
-
|
|
38517
|
-
|
|
38518
|
-
|
|
38519
|
-
|
|
38520
|
-
|
|
38521
|
-
|
|
38522
|
-
|
|
38523
|
-
|
|
38524
|
-
|
|
38525
|
-
|
|
38518
|
+
);
|
|
38519
|
+
const view = objcView(
|
|
38520
|
+
{
|
|
38521
|
+
module: swiftTargetModuleName(target.name),
|
|
38522
|
+
headers: sourceHeaders,
|
|
38523
|
+
modulemap
|
|
38524
|
+
},
|
|
38525
|
+
toolchainBin,
|
|
38526
|
+
import_node_path11.default.join(moduleRoot, "ios-simulator-stdlib"),
|
|
38527
|
+
import_node_path11.default.join(layout.root, ".build", "peach-objc-sdk"),
|
|
38528
|
+
import_node_path11.default.join(layout.root, ".build", "peach-objc-imports", target.name),
|
|
38529
|
+
{
|
|
38530
|
+
flags: stageFlags(originalFlags, import_node_path11.default.join(sdkHeaders, "usr/include")),
|
|
38531
|
+
target: `arm64-apple-ios${settings?.deploymentTarget ?? "16.0"}-simulator`
|
|
38532
|
+
}
|
|
38533
|
+
);
|
|
38534
|
+
const defined = /* @__PURE__ */ new Set();
|
|
38535
|
+
const declarations = (node) => {
|
|
38536
|
+
if (!node || typeof node !== "object") return;
|
|
38537
|
+
const name3 = Reflect.get(node, "name");
|
|
38538
|
+
if (Reflect.get(node, "kind") === "ObjCInterfaceDecl" && Reflect.get(node, "super") && typeof name3 === "string")
|
|
38539
|
+
defined.add(name3);
|
|
38540
|
+
const children = Reflect.get(node, "inner");
|
|
38541
|
+
if (Array.isArray(children)) for (const child of children) declarations(child);
|
|
38542
|
+
};
|
|
38543
|
+
declarations(view.clangAST);
|
|
38544
|
+
const foreignTypes = /* @__PURE__ */ new Map();
|
|
38545
|
+
for (const graph of view.graphs)
|
|
38546
|
+
for (const symbol of graph.symbols) {
|
|
38547
|
+
const nativeName = /^c:objc\(cs\)(\w+)$/.exec(
|
|
38548
|
+
symbol.identifier.precise
|
|
38549
|
+
)?.[1];
|
|
38550
|
+
if (nativeName && defined.has(nativeName))
|
|
38551
|
+
foreignTypes.set(symbol.pathComponents[0], nativeName);
|
|
38552
|
+
}
|
|
38553
|
+
imports.set(target.name, {
|
|
38554
|
+
view,
|
|
38555
|
+
classes: [...foreignTypes.values()],
|
|
38556
|
+
headers: roots2.map((file) => import_node_path11.default.join(layout.root, file)),
|
|
38557
|
+
foreignTypes
|
|
38558
|
+
});
|
|
38526
38559
|
}
|
|
38527
|
-
|
|
38528
|
-
|
|
38529
|
-
|
|
38530
|
-
|
|
38531
|
-
|
|
38532
|
-
|
|
38533
|
-
|
|
38534
|
-
const children = Reflect.get(node, "inner");
|
|
38535
|
-
if (Array.isArray(children)) for (const child of children) declarations(child);
|
|
38536
|
-
};
|
|
38537
|
-
declarations(view.clangAST);
|
|
38538
|
-
const foreignTypes = /* @__PURE__ */ new Map();
|
|
38539
|
-
for (const graph of view.graphs)
|
|
38540
|
-
for (const symbol of graph.symbols) {
|
|
38541
|
-
const nativeName = /^c:objc\(cs\)(\w+)$/.exec(symbol.identifier.precise)?.[1];
|
|
38542
|
-
if (nativeName && defined.has(nativeName))
|
|
38543
|
-
foreignTypes.set(symbol.pathComponents[0], nativeName);
|
|
38544
|
-
}
|
|
38545
|
-
imports.set(target.name, {
|
|
38546
|
-
view,
|
|
38547
|
-
classes: [...foreignTypes.values()],
|
|
38548
|
-
headers: roots2.map((file) => import_node_path11.default.join(layout.root, file)),
|
|
38549
|
-
foreignTypes
|
|
38550
|
-
});
|
|
38551
|
-
const thunk = "PeachObjCImports.generated.m";
|
|
38552
|
-
const groups = /* @__PURE__ */ new Map();
|
|
38553
|
-
for (const [file] of nativeUnits) {
|
|
38554
|
-
const origin = settings?.sourceDirectories[file];
|
|
38555
|
-
if (origin) (0, import_node_fs12.mkdirSync)(import_node_path11.default.join(layout.root, origin), { recursive: true });
|
|
38556
|
-
const perFile = [
|
|
38557
|
-
...origin ? ["-iquote", import_node_path11.default.join(layout.root, origin)] : [],
|
|
38558
|
-
...stageFlags(
|
|
38559
|
-
settings?.fileFlags[file] ?? [],
|
|
38560
|
-
import_node_path11.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
38561
|
-
)
|
|
38562
|
-
];
|
|
38563
|
-
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
38564
|
-
const identity = (0, import_node_crypto9.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
|
|
38565
|
-
const group = groups.get(identity) ?? {
|
|
38566
|
-
name: `${target.name}SwiftImplementation_${identity}`,
|
|
38567
|
-
sources: [],
|
|
38568
|
-
flags: [...flags, ...prefixHeader, ...accessorFlags, ...perFile],
|
|
38569
|
-
cxxFlags: [
|
|
38570
|
-
...flags,
|
|
38571
|
-
...prefixHeader,
|
|
38572
|
-
...accessorFlags,
|
|
38560
|
+
const thunks = roots2.length ? ["PeachObjCImports.generated.m"] : [];
|
|
38561
|
+
const groups = /* @__PURE__ */ new Map();
|
|
38562
|
+
for (const [file] of nativeUnits) {
|
|
38563
|
+
const origin = settings?.sourceDirectories[file];
|
|
38564
|
+
if (origin) (0, import_node_fs12.mkdirSync)(import_node_path11.default.join(layout.root, origin), { recursive: true });
|
|
38565
|
+
const perFile = [
|
|
38566
|
+
...origin ? ["-iquote", import_node_path11.default.join(layout.root, origin)] : [],
|
|
38573
38567
|
...stageFlags(
|
|
38574
|
-
|
|
38568
|
+
settings?.fileFlags[file] ?? [],
|
|
38575
38569
|
import_node_path11.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
38576
|
-
)
|
|
38577
|
-
|
|
38578
|
-
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
|
|
38583
|
-
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
|
|
38588
|
-
|
|
38589
|
-
|
|
38590
|
-
|
|
38591
|
-
|
|
38592
|
-
|
|
38570
|
+
)
|
|
38571
|
+
];
|
|
38572
|
+
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
38573
|
+
const identity = (0, import_node_crypto9.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
|
|
38574
|
+
const group = groups.get(identity) ?? {
|
|
38575
|
+
name: `${target.name}SwiftImplementation_${identity}`,
|
|
38576
|
+
sources: [],
|
|
38577
|
+
flags: [...flags, ...prefixHeader, ...accessorFlags, ...perFile],
|
|
38578
|
+
cxxFlags: [
|
|
38579
|
+
...flags,
|
|
38580
|
+
...prefixHeader,
|
|
38581
|
+
...accessorFlags,
|
|
38582
|
+
...stageFlags(
|
|
38583
|
+
cxx ? settings.cxxFlags : [],
|
|
38584
|
+
import_node_path11.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "include")
|
|
38585
|
+
),
|
|
38586
|
+
...perFile
|
|
38587
|
+
]
|
|
38588
|
+
};
|
|
38589
|
+
group.sources.push(file.slice(prefix.length));
|
|
38590
|
+
groups.set(identity, group);
|
|
38591
|
+
}
|
|
38592
|
+
if (thunks.length)
|
|
38593
|
+
groups.set("imports", {
|
|
38594
|
+
name: `${target.name}ObjCImports`,
|
|
38595
|
+
sources: thunks,
|
|
38596
|
+
flags: [...flags, "-fobjc-arc"],
|
|
38597
|
+
cxxFlags: [...flags, "-fobjc-arc"]
|
|
38598
|
+
});
|
|
38599
|
+
const include2 = import_node_path11.default.join(layout.root, target.path, "include");
|
|
38600
|
+
files2.set(
|
|
38601
|
+
import_node_path11.default.join(include2, "module.modulemap"),
|
|
38602
|
+
`module ${target.name}ImplementationDeclarations { export * }
|
|
38593
38603
|
`
|
|
38594
|
-
|
|
38595
|
-
|
|
38596
|
-
|
|
38597
|
-
|
|
38598
|
-
|
|
38599
|
-
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38605
|
-
|
|
38606
|
-
|
|
38607
|
-
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
|
|
38612
|
-
|
|
38613
|
-
|
|
38614
|
-
|
|
38615
|
-
|
|
38604
|
+
);
|
|
38605
|
+
native.set(target.name, {
|
|
38606
|
+
mixed: true,
|
|
38607
|
+
path: target.path,
|
|
38608
|
+
includeDirectory: include2,
|
|
38609
|
+
sources: nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
38610
|
+
lateSources: [
|
|
38611
|
+
...nativeUnits.map(([file]) => file.slice(prefix.length)),
|
|
38612
|
+
...thunks
|
|
38613
|
+
],
|
|
38614
|
+
exclude: [
|
|
38615
|
+
...entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length)),
|
|
38616
|
+
...accessor ? [OBJC_RESOURCE_ACCESSOR_HEADER, OBJC_RESOURCE_ACCESSOR_BODY] : [],
|
|
38617
|
+
...thunks,
|
|
38618
|
+
"include"
|
|
38619
|
+
],
|
|
38620
|
+
groups: [...groups.values()],
|
|
38621
|
+
late: {
|
|
38622
|
+
name: `${target.name}SwiftImplementation`,
|
|
38623
|
+
producers: [
|
|
38624
|
+
target.name,
|
|
38625
|
+
...(target.dependencies ?? []).filter((dependency) => swiftTargets.has(dependency.name)).map((dependency) => dependency.name)
|
|
38626
|
+
]
|
|
38627
|
+
}
|
|
38628
|
+
});
|
|
38629
|
+
} catch (error) {
|
|
38630
|
+
if (!swift || !(error instanceof Error)) throw error;
|
|
38631
|
+
targetFailures.push(`${target.name}: ${error.message}`);
|
|
38632
|
+
native.set(target.name, {
|
|
38633
|
+
mixed: true,
|
|
38634
|
+
path: target.path,
|
|
38635
|
+
includeDirectory: import_node_path11.default.join(layout.root, target.path, "include"),
|
|
38636
|
+
sources: [],
|
|
38637
|
+
lateSources: [],
|
|
38638
|
+
exclude: entries.filter(([file]) => !file.endsWith(".swift") && !file.endsWith(".metal")).map(([file]) => file.slice(prefix.length))
|
|
38639
|
+
});
|
|
38640
|
+
}
|
|
38616
38641
|
continue;
|
|
38617
38642
|
}
|
|
38618
38643
|
const includes = `${prefix}include/`;
|
|
@@ -38775,20 +38800,27 @@ export *
|
|
|
38775
38800
|
for (const name3 of objcProducers) {
|
|
38776
38801
|
const target = targets.find((value) => value.name === name3);
|
|
38777
38802
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
38778
|
-
|
|
38779
|
-
|
|
38780
|
-
|
|
38781
|
-
|
|
38782
|
-
|
|
38783
|
-
|
|
38784
|
-
|
|
38785
|
-
|
|
38786
|
-
|
|
38787
|
-
|
|
38788
|
-
|
|
38789
|
-
|
|
38790
|
-
|
|
38791
|
-
|
|
38803
|
+
let exported;
|
|
38804
|
+
try {
|
|
38805
|
+
exported = swiftObjCExports({
|
|
38806
|
+
module: swiftTargetModuleName(name3),
|
|
38807
|
+
sources: Object.entries(input.files).filter(
|
|
38808
|
+
([file]) => file.startsWith(prefix) && file.endsWith(".swift") && !targets.some(
|
|
38809
|
+
(candidate) => candidate.name !== name3 && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
|
|
38810
|
+
) && !target.exclude?.some(
|
|
38811
|
+
(excluded) => file.slice(prefix.length) === excluded || file.slice(prefix.length).startsWith(`${excluded}/`)
|
|
38812
|
+
)
|
|
38813
|
+
),
|
|
38814
|
+
mask: swiftCodeMask,
|
|
38815
|
+
declarationStart,
|
|
38816
|
+
selector: objcSelectorName,
|
|
38817
|
+
foreignTypes: imports.get(name3)?.foreignTypes
|
|
38818
|
+
});
|
|
38819
|
+
} catch (error) {
|
|
38820
|
+
if (!(error instanceof Error)) throw error;
|
|
38821
|
+
targetFailures.push(`${name3}: ${error.message}`);
|
|
38822
|
+
continue;
|
|
38823
|
+
}
|
|
38792
38824
|
const original = imports.get(name3);
|
|
38793
38825
|
if (!exported && !original) continue;
|
|
38794
38826
|
objcModules.add(name3);
|
|
@@ -39060,6 +39092,7 @@ public func __peachObjcExportRoot() { _objcRegisterPeerClass(NSObject.self, nati
|
|
|
39060
39092
|
for (const dependency of dependencies.get(producer) ?? []) include(dependency);
|
|
39061
39093
|
return {
|
|
39062
39094
|
headerProducers: producers.filter((name3) => !included.has(name3)),
|
|
39095
|
+
targetFailures,
|
|
39063
39096
|
...rootOwner && objcExports ? {
|
|
39064
39097
|
objcImplementations: {
|
|
39065
39098
|
owner: import_node_path11.default.join(layout.root, rootOwner),
|
|
@@ -39282,6 +39315,9 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
39282
39315
|
return retain(root, built2);
|
|
39283
39316
|
}
|
|
39284
39317
|
const preparation = writeSwiftProject(layout, input, moduleRoot);
|
|
39318
|
+
const unprepared = preparation.targetFailures.map(
|
|
39319
|
+
(failure2) => `error: target ${failure2}`
|
|
39320
|
+
);
|
|
39285
39321
|
const swift = import_node_path11.default.join(options.toolchainBin, "swift");
|
|
39286
39322
|
if (!(0, import_node_fs12.existsSync)(swift)) {
|
|
39287
39323
|
throw new Error(
|
|
@@ -39431,18 +39467,23 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
39431
39467
|
);
|
|
39432
39468
|
} catch (retryError) {
|
|
39433
39469
|
throw new Error(
|
|
39434
|
-
|
|
39435
|
-
|
|
39436
|
-
|
|
39437
|
-
|
|
39470
|
+
[
|
|
39471
|
+
...unprepared,
|
|
39472
|
+
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
39473
|
+
].join("\n"),
|
|
39474
|
+
{ cause: retryError }
|
|
39438
39475
|
);
|
|
39439
39476
|
}
|
|
39440
39477
|
} else {
|
|
39441
|
-
throw new Error(
|
|
39442
|
-
|
|
39443
|
-
|
|
39478
|
+
throw new Error(
|
|
39479
|
+
[...unprepared, projectDiagnostic(output, layout, input.files)].join(
|
|
39480
|
+
"\n"
|
|
39481
|
+
),
|
|
39482
|
+
{ cause: error }
|
|
39483
|
+
);
|
|
39444
39484
|
}
|
|
39445
39485
|
}
|
|
39486
|
+
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
39446
39487
|
const artifact = {
|
|
39447
39488
|
hash: hash2,
|
|
39448
39489
|
bytes: (0, import_node_fs12.readFileSync)(builtArtifact(layout)),
|
|
@@ -50501,6 +50542,7 @@ function mapFrameworkToProjectFramework(fw) {
|
|
|
50501
50542
|
var import_http2 = __toESM(require("http"), 1);
|
|
50502
50543
|
var import_https = __toESM(require("https"), 1);
|
|
50503
50544
|
var import_node_http2 = require("node:http2");
|
|
50545
|
+
var import_stream = require("stream");
|
|
50504
50546
|
var import_promises5 = require("stream/promises");
|
|
50505
50547
|
init_backend_origin();
|
|
50506
50548
|
init_bundleGlobalFooter();
|
|
@@ -54001,18 +54043,32 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
54001
54043
|
await route.respond(proxyRes, hopCookies);
|
|
54002
54044
|
res.statusCode = status;
|
|
54003
54045
|
if (isBundleProxyRequestUrl(req.url) && method === "GET" && status === 200 && targetUrl.pathname.endsWith(".bundle") && proxyRes.headers["x-peach-rolldown-inventory"] !== "1") {
|
|
54004
|
-
const
|
|
54005
|
-
|
|
54006
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
54007
|
-
}
|
|
54008
|
-
const payload = Buffer.concat(chunks).toString("utf8");
|
|
54009
|
-
const contentType2 = typeof proxyRes.headers["content-type"] === "string" ? proxyRes.headers["content-type"] : void 0;
|
|
54010
|
-
const annotated = await getCliRuntime().rolldown_bundle_inventory.attachRolldownBundleHttpPayload(
|
|
54011
|
-
payload,
|
|
54012
|
-
contentType2
|
|
54013
|
-
);
|
|
54046
|
+
const contentType2 = typeof proxyRes.headers["content-type"] === "string" ? proxyRes.headers["content-type"] : "";
|
|
54047
|
+
const inventory = getCliRuntime().rolldown_bundle_inventory;
|
|
54014
54048
|
res.removeHeader("content-length");
|
|
54015
|
-
|
|
54049
|
+
const annotate = async function* () {
|
|
54050
|
+
const decoder = new TextDecoder();
|
|
54051
|
+
let payload = "";
|
|
54052
|
+
let sent = 0;
|
|
54053
|
+
let bundleStarted = false;
|
|
54054
|
+
for await (const chunk of proxyRes) {
|
|
54055
|
+
payload += decoder.decode(chunk, { stream: true });
|
|
54056
|
+
if (bundleStarted) continue;
|
|
54057
|
+
const releasable = inventory.releasableMultipartPrefix(payload, contentType2);
|
|
54058
|
+
bundleStarted = releasable.bundleStarted;
|
|
54059
|
+
if (releasable.length > sent) {
|
|
54060
|
+
yield Buffer.from(payload.slice(sent, releasable.length), "utf8");
|
|
54061
|
+
sent = releasable.length;
|
|
54062
|
+
}
|
|
54063
|
+
}
|
|
54064
|
+
payload += decoder.decode();
|
|
54065
|
+
const annotated = await inventory.attachRolldownBundleHttpPayload(
|
|
54066
|
+
payload,
|
|
54067
|
+
contentType2
|
|
54068
|
+
);
|
|
54069
|
+
yield Buffer.from(annotated.slice(sent), "utf8");
|
|
54070
|
+
};
|
|
54071
|
+
await (0, import_promises5.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
|
|
54016
54072
|
return;
|
|
54017
54073
|
}
|
|
54018
54074
|
await (0, import_promises5.pipeline)(proxyRes, res);
|
|
@@ -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;
|
|
@@ -45,6 +45,7 @@ module.exports = __toCommonJS(fetch_proxy_handler_exports);
|
|
|
45
45
|
var import_http = __toESM(require("http"), 1);
|
|
46
46
|
var import_https = __toESM(require("https"), 1);
|
|
47
47
|
var import_node_http2 = require("node:http2");
|
|
48
|
+
var import_stream = require("stream");
|
|
48
49
|
var import_promises2 = require("stream/promises");
|
|
49
50
|
|
|
50
51
|
// src/backend-origin.ts
|
|
@@ -86,7 +87,7 @@ var import_node_module = require("node:module");
|
|
|
86
87
|
var import_node_path2 = require("node:path");
|
|
87
88
|
|
|
88
89
|
// runtime-companion.json
|
|
89
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
90
|
+
var runtime_companion_default = { abi: 1, sha256: "6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce", file: "node/cli-6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce.cjs" };
|
|
90
91
|
|
|
91
92
|
// src/runtime-assets.ts
|
|
92
93
|
var import_fs = __toESM(require("fs"), 1);
|
|
@@ -4151,18 +4152,32 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
4151
4152
|
await route.respond(proxyRes, hopCookies);
|
|
4152
4153
|
res.statusCode = status;
|
|
4153
4154
|
if (isBundleProxyRequestUrl(req.url) && method === "GET" && status === 200 && targetUrl.pathname.endsWith(".bundle") && proxyRes.headers["x-peach-rolldown-inventory"] !== "1") {
|
|
4154
|
-
const
|
|
4155
|
-
|
|
4156
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
4157
|
-
}
|
|
4158
|
-
const payload = Buffer.concat(chunks).toString("utf8");
|
|
4159
|
-
const contentType = typeof proxyRes.headers["content-type"] === "string" ? proxyRes.headers["content-type"] : void 0;
|
|
4160
|
-
const annotated = await getCliRuntime().rolldown_bundle_inventory.attachRolldownBundleHttpPayload(
|
|
4161
|
-
payload,
|
|
4162
|
-
contentType
|
|
4163
|
-
);
|
|
4155
|
+
const contentType = typeof proxyRes.headers["content-type"] === "string" ? proxyRes.headers["content-type"] : "";
|
|
4156
|
+
const inventory = getCliRuntime().rolldown_bundle_inventory;
|
|
4164
4157
|
res.removeHeader("content-length");
|
|
4165
|
-
|
|
4158
|
+
const annotate = async function* () {
|
|
4159
|
+
const decoder = new TextDecoder();
|
|
4160
|
+
let payload = "";
|
|
4161
|
+
let sent = 0;
|
|
4162
|
+
let bundleStarted = false;
|
|
4163
|
+
for await (const chunk of proxyRes) {
|
|
4164
|
+
payload += decoder.decode(chunk, { stream: true });
|
|
4165
|
+
if (bundleStarted) continue;
|
|
4166
|
+
const releasable = inventory.releasableMultipartPrefix(payload, contentType);
|
|
4167
|
+
bundleStarted = releasable.bundleStarted;
|
|
4168
|
+
if (releasable.length > sent) {
|
|
4169
|
+
yield Buffer.from(payload.slice(sent, releasable.length), "utf8");
|
|
4170
|
+
sent = releasable.length;
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4173
|
+
payload += decoder.decode();
|
|
4174
|
+
const annotated = await inventory.attachRolldownBundleHttpPayload(
|
|
4175
|
+
payload,
|
|
4176
|
+
contentType
|
|
4177
|
+
);
|
|
4178
|
+
yield Buffer.from(annotated.slice(sent), "utf8");
|
|
4179
|
+
};
|
|
4180
|
+
await (0, import_promises2.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
|
|
4166
4181
|
return;
|
|
4167
4182
|
}
|
|
4168
4183
|
await (0, import_promises2.pipeline)(proxyRes, res);
|
|
@@ -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;
|