peachsim 0.1.1879 → 0.1.1881
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 +109 -54
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +104 -51
- 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 +107 -52
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +2 -2
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +5 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +109 -54
- package/dist-lib/swift-compile.cjs +97 -48
- package/dist-lib/swift-compile.mjs +100 -48
- 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 +98 -49
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/expo-native-workspace.ts +4 -0
- package/src/swift-compile.ts +135 -64
- package/src/turbo-source.ts +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -7,12 +7,15 @@ import {
|
|
|
7
7
|
} from "node:child_process";
|
|
8
8
|
import { createHash as createHash8, randomUUID as randomUUID5 } from "node:crypto";
|
|
9
9
|
import {
|
|
10
|
+
copyFileSync,
|
|
10
11
|
cpSync,
|
|
11
12
|
existsSync as existsSync4,
|
|
13
|
+
lstatSync,
|
|
12
14
|
mkdirSync as mkdirSync4,
|
|
13
15
|
mkdtempSync as mkdtempSync3,
|
|
14
16
|
readFileSync as readFileSync11,
|
|
15
17
|
readdirSync as readdirSync8,
|
|
18
|
+
readlinkSync,
|
|
16
19
|
realpathSync as realpathSync3,
|
|
17
20
|
renameSync as renameSync2,
|
|
18
21
|
rmSync as rmSync5,
|
|
@@ -7848,7 +7851,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7848
7851
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7849
7852
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7850
7853
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7851
|
-
var compilerSourceDigest = true ? "
|
|
7854
|
+
var compilerSourceDigest = true ? "86990d3bb695dc1b9f0c4cd7f4db499ad1f3e86d93eb50b44f1cb72a69322840" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
7852
7855
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7853
7856
|
const hash = createHash8("sha256");
|
|
7854
7857
|
hash.update(`swift-compile
|
|
@@ -11400,13 +11403,6 @@ function removeCaseCollidingModuleArtifacts(modulesDir, keep) {
|
|
|
11400
11403
|
rmSync5(path19.join(modulesDir, name2), { recursive: true, force: true });
|
|
11401
11404
|
}
|
|
11402
11405
|
}
|
|
11403
|
-
async function compileFrameworkProducts(args) {
|
|
11404
|
-
const scratch2 = swiftFrameworkScratch(args.frameworkKey);
|
|
11405
|
-
mkdirSync4(scratch2, { recursive: true });
|
|
11406
|
-
const now = /* @__PURE__ */ new Date();
|
|
11407
|
-
utimesSync(scratch2, now, now);
|
|
11408
|
-
return buildFrameworkProducts(scratch2, args);
|
|
11409
|
-
}
|
|
11410
11406
|
async function buildFrameworkProducts(scratch2, args) {
|
|
11411
11407
|
const linkedTargets = linkedFrameworkTargets(args.moduleRoot, args.input);
|
|
11412
11408
|
const linkRoot = path19.join(scratch2, "link");
|
|
@@ -11524,37 +11520,105 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
11524
11520
|
};
|
|
11525
11521
|
}
|
|
11526
11522
|
var SWIFT_LINK_STAMP = ".peach-link-stamp";
|
|
11527
|
-
var
|
|
11523
|
+
var SWIFT_FRAMEWORK_SLOTS = 3;
|
|
11524
|
+
var SWIFT_FRAMEWORK_SLOT_KEY = ".peach-framework-key";
|
|
11528
11525
|
function swiftFrameworksDir() {
|
|
11529
11526
|
return path19.join(swiftCacheDir(), "swift-frameworks");
|
|
11530
11527
|
}
|
|
11531
11528
|
function swiftFrameworkScratch(frameworkKey) {
|
|
11532
11529
|
return path19.join(swiftFrameworksDir(), frameworkKey);
|
|
11533
11530
|
}
|
|
11534
|
-
function
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11531
|
+
function swiftFrameworkSlotKey(slot) {
|
|
11532
|
+
try {
|
|
11533
|
+
return readFileSync11(path19.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), "utf8").trim();
|
|
11534
|
+
} catch (error) {
|
|
11535
|
+
if (!vanished(error)) throw error;
|
|
11536
|
+
return null;
|
|
11537
|
+
}
|
|
11538
|
+
}
|
|
11539
|
+
async function withSwiftFrameworkSlot(frameworkKey, signal, work) {
|
|
11540
|
+
const slots = Array.from({ length: SWIFT_FRAMEWORK_SLOTS }, (_, index) => {
|
|
11541
|
+
const slot = path19.join(swiftFrameworksDir(), `slot-${index}`);
|
|
11542
|
+
mkdirSync4(slot, { recursive: true });
|
|
11543
|
+
return slot;
|
|
11545
11544
|
});
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11545
|
+
const run2 = (slot) => (lease) => {
|
|
11546
|
+
const now = /* @__PURE__ */ new Date();
|
|
11547
|
+
utimesSync(slot, now, now);
|
|
11548
|
+
return work(slot, lease);
|
|
11549
|
+
};
|
|
11550
|
+
const staged = slots.find((slot) => swiftFrameworkSlotKey(slot) === frameworkKey);
|
|
11551
|
+
if (staged) return withSwiftRootLock(staged, run2(staged), signal);
|
|
11552
|
+
const oldest = slots.sort(
|
|
11553
|
+
(left, right) => statSync2(left).mtimeMs - statSync2(right).mtimeMs
|
|
11554
11554
|
);
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11555
|
+
for (const slot of oldest) {
|
|
11556
|
+
const result = await withSwiftRootLock(
|
|
11557
|
+
slot,
|
|
11558
|
+
async (lease) => ({ value: await run2(slot)(lease) }),
|
|
11559
|
+
signal,
|
|
11560
|
+
false
|
|
11561
|
+
);
|
|
11562
|
+
if (result) return result.value;
|
|
11563
|
+
}
|
|
11564
|
+
return withSwiftRootLock(oldest[0], run2(oldest[0]), signal);
|
|
11565
|
+
}
|
|
11566
|
+
function mirrorTree2(source, target, skip) {
|
|
11567
|
+
mkdirSync4(target, { recursive: true });
|
|
11568
|
+
const wanted = /* @__PURE__ */ new Set();
|
|
11569
|
+
for (const entry of readdirSync8(source, { withFileTypes: true })) {
|
|
11570
|
+
if (entry.name === skip) continue;
|
|
11571
|
+
wanted.add(entry.name);
|
|
11572
|
+
const from = path19.join(source, entry.name);
|
|
11573
|
+
const to = path19.join(target, entry.name);
|
|
11574
|
+
let existing = null;
|
|
11575
|
+
try {
|
|
11576
|
+
existing = lstatSync(to);
|
|
11577
|
+
} catch (error) {
|
|
11578
|
+
if (!vanished(error)) throw error;
|
|
11579
|
+
}
|
|
11580
|
+
if (entry.isDirectory()) {
|
|
11581
|
+
if (existing && !existing.isDirectory()) rmSync5(to, { force: true });
|
|
11582
|
+
mirrorTree2(from, to);
|
|
11583
|
+
} else if (entry.isSymbolicLink()) {
|
|
11584
|
+
const link = readlinkSync(from);
|
|
11585
|
+
if (existing?.isSymbolicLink() && readlinkSync(to) === link) continue;
|
|
11586
|
+
if (existing) rmSync5(to, { recursive: true, force: true });
|
|
11587
|
+
symlinkSync2(link, to);
|
|
11588
|
+
} else {
|
|
11589
|
+
const stat = statSync2(from);
|
|
11590
|
+
if (existing?.isFile() && existing.size === stat.size && (existing.mtimeMs === stat.mtimeMs || readFileSync11(from).equals(readFileSync11(to))))
|
|
11591
|
+
continue;
|
|
11592
|
+
if (existing) rmSync5(to, { recursive: true, force: true });
|
|
11593
|
+
const partial = `${to}.${randomUUID5()}`;
|
|
11594
|
+
copyFileSync(from, partial);
|
|
11595
|
+
utimesSync(partial, stat.atime, stat.mtime);
|
|
11596
|
+
renameSync2(partial, to);
|
|
11597
|
+
}
|
|
11598
|
+
}
|
|
11599
|
+
for (const name2 of readdirSync8(target))
|
|
11600
|
+
if (!wanted.has(name2) && name2 !== skip)
|
|
11601
|
+
rmSync5(path19.join(target, name2), { recursive: true, force: true });
|
|
11602
|
+
}
|
|
11603
|
+
function stageFrameworkSource(moduleRoot, slot, frameworkKey) {
|
|
11604
|
+
if (!slot) return moduleRoot;
|
|
11605
|
+
const staged = path19.join(slot, "source");
|
|
11606
|
+
const stagedModule = path19.join(staged, "packages", path19.basename(moduleRoot));
|
|
11607
|
+
if (swiftFrameworkSlotKey(slot) !== frameworkKey) {
|
|
11608
|
+
rmSync5(path19.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), { force: true });
|
|
11609
|
+
mirrorTree2(moduleRoot, stagedModule, ".build");
|
|
11610
|
+
mirrorTree2(
|
|
11611
|
+
swiftSharedSdkRoot(moduleRoot, false),
|
|
11612
|
+
path19.join(staged, "packages/peachsim/sdk/ios")
|
|
11613
|
+
);
|
|
11614
|
+
const modules = path19.join(staged, "node_modules");
|
|
11615
|
+
const target = realpathSync3(path19.join(moduleRoot, "../../node_modules"));
|
|
11616
|
+
if (!existsSync4(modules) || readlinkSync(modules) !== target) {
|
|
11617
|
+
rmSync5(modules, { recursive: true, force: true });
|
|
11618
|
+
symlinkSync2(target, modules);
|
|
11619
|
+
}
|
|
11620
|
+
writeFileSync4(path19.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), frameworkKey);
|
|
11621
|
+
}
|
|
11558
11622
|
return stagedModule;
|
|
11559
11623
|
}
|
|
11560
11624
|
function swiftLinkStamp(args) {
|
|
@@ -11590,17 +11654,6 @@ ${args.prebuilt.modules}
|
|
|
11590
11654
|
${statOf(path19.join(args.prebuilt.modules, entry))}`);
|
|
11591
11655
|
return hash.digest("hex");
|
|
11592
11656
|
}
|
|
11593
|
-
async function pruneFrameworkScratches(keep) {
|
|
11594
|
-
const dir = swiftFrameworksDir();
|
|
11595
|
-
const idle = readdirSync8(dir).filter((name2) => name2 !== keep).map((name2) => ({ name: name2, modified: statSync2(path19.join(dir, name2)).mtimeMs })).sort((left, right) => right.modified - left.modified).slice(SWIFT_FRAMEWORK_SCRATCHES_KEPT - 1);
|
|
11596
|
-
for (const { name: name2 } of idle)
|
|
11597
|
-
await withSwiftRootLock(
|
|
11598
|
-
path19.join(dir, name2),
|
|
11599
|
-
async () => rmSync5(path19.join(dir, name2), { recursive: true, force: true }),
|
|
11600
|
-
void 0,
|
|
11601
|
-
false
|
|
11602
|
-
);
|
|
11603
|
-
}
|
|
11604
11657
|
function retireStaleSwiftLink(root, stamp) {
|
|
11605
11658
|
const receipt = path19.join(root, SWIFT_LINK_STAMP);
|
|
11606
11659
|
let previous = null;
|
|
@@ -11729,9 +11782,9 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
11729
11782
|
);
|
|
11730
11783
|
}
|
|
11731
11784
|
const frameworkScratch = swiftFrameworkScratch(frameworkKey);
|
|
11732
|
-
const withFrameworkLock = (work) => distribution ? work() :
|
|
11733
|
-
return withFrameworkLock(async (frameworkLease) => {
|
|
11734
|
-
const frameworkRoot = stageFrameworkSource(moduleRoot, frameworkKey);
|
|
11785
|
+
const withFrameworkLock = (work) => distribution ? work(null) : withSwiftFrameworkSlot(frameworkKey, options.signal, work);
|
|
11786
|
+
return withFrameworkLock(async (slot, frameworkLease) => {
|
|
11787
|
+
const frameworkRoot = stageFrameworkSource(moduleRoot, slot, frameworkKey);
|
|
11735
11788
|
report("preparing compiler plugins");
|
|
11736
11789
|
const pluginsFor = (pluginLease) => ensureMacroPlugins(
|
|
11737
11790
|
frameworkRoot,
|
|
@@ -11765,7 +11818,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
11765
11818
|
let prebuilt;
|
|
11766
11819
|
if (!distribution) {
|
|
11767
11820
|
report("compiling framework products");
|
|
11768
|
-
prebuilt = await
|
|
11821
|
+
prebuilt = await buildFrameworkProducts(slot, {
|
|
11769
11822
|
moduleRoot: frameworkRoot,
|
|
11770
11823
|
frameworkKey,
|
|
11771
11824
|
input,
|
|
@@ -11775,7 +11828,6 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
11775
11828
|
plugins: macroPlugins,
|
|
11776
11829
|
buildOptions
|
|
11777
11830
|
});
|
|
11778
|
-
await pruneFrameworkScratches(frameworkKey);
|
|
11779
11831
|
}
|
|
11780
11832
|
if (options.project) removeProjectLinks(root);
|
|
11781
11833
|
if (retireStaleSwiftLink(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -12174,7 +12174,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12174
12174
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12175
12175
|
var MULTI_MANIFEST_VERSION = 65;
|
|
12176
12176
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12177
|
-
var compilerSourceDigest = true ? "
|
|
12177
|
+
var compilerSourceDigest = true ? "86990d3bb695dc1b9f0c4cd7f4db499ad1f3e86d93eb50b44f1cb72a69322840" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12178
12178
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12179
12179
|
const hash = (0, import_node_crypto8.createHash)("sha256");
|
|
12180
12180
|
hash.update(`swift-compile
|
|
@@ -15651,13 +15651,6 @@ function removeCaseCollidingModuleArtifacts(modulesDir, keep) {
|
|
|
15651
15651
|
(0, import_node_fs19.rmSync)(import_node_path19.default.join(modulesDir, name3), { recursive: true, force: true });
|
|
15652
15652
|
}
|
|
15653
15653
|
}
|
|
15654
|
-
async function compileFrameworkProducts(args) {
|
|
15655
|
-
const scratch2 = swiftFrameworkScratch(args.frameworkKey);
|
|
15656
|
-
(0, import_node_fs19.mkdirSync)(scratch2, { recursive: true });
|
|
15657
|
-
const now = /* @__PURE__ */ new Date();
|
|
15658
|
-
(0, import_node_fs19.utimesSync)(scratch2, now, now);
|
|
15659
|
-
return buildFrameworkProducts(scratch2, args);
|
|
15660
|
-
}
|
|
15661
15654
|
async function buildFrameworkProducts(scratch2, args) {
|
|
15662
15655
|
const linkedTargets = linkedFrameworkTargets(args.moduleRoot, args.input);
|
|
15663
15656
|
const linkRoot = import_node_path19.default.join(scratch2, "link");
|
|
@@ -15775,37 +15768,105 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
15775
15768
|
};
|
|
15776
15769
|
}
|
|
15777
15770
|
var SWIFT_LINK_STAMP = ".peach-link-stamp";
|
|
15778
|
-
var
|
|
15771
|
+
var SWIFT_FRAMEWORK_SLOTS = 3;
|
|
15772
|
+
var SWIFT_FRAMEWORK_SLOT_KEY = ".peach-framework-key";
|
|
15779
15773
|
function swiftFrameworksDir() {
|
|
15780
15774
|
return import_node_path19.default.join(swiftCacheDir(), "swift-frameworks");
|
|
15781
15775
|
}
|
|
15782
15776
|
function swiftFrameworkScratch(frameworkKey) {
|
|
15783
15777
|
return import_node_path19.default.join(swiftFrameworksDir(), frameworkKey);
|
|
15784
15778
|
}
|
|
15785
|
-
function
|
|
15786
|
-
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15779
|
+
function swiftFrameworkSlotKey(slot) {
|
|
15780
|
+
try {
|
|
15781
|
+
return (0, import_node_fs19.readFileSync)(import_node_path19.default.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), "utf8").trim();
|
|
15782
|
+
} catch (error) {
|
|
15783
|
+
if (!vanished(error)) throw error;
|
|
15784
|
+
return null;
|
|
15785
|
+
}
|
|
15786
|
+
}
|
|
15787
|
+
async function withSwiftFrameworkSlot(frameworkKey, signal, work) {
|
|
15788
|
+
const slots = Array.from({ length: SWIFT_FRAMEWORK_SLOTS }, (_, index) => {
|
|
15789
|
+
const slot = import_node_path19.default.join(swiftFrameworksDir(), `slot-${index}`);
|
|
15790
|
+
(0, import_node_fs19.mkdirSync)(slot, { recursive: true });
|
|
15791
|
+
return slot;
|
|
15796
15792
|
});
|
|
15797
|
-
(
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15793
|
+
const run5 = (slot) => (lease) => {
|
|
15794
|
+
const now = /* @__PURE__ */ new Date();
|
|
15795
|
+
(0, import_node_fs19.utimesSync)(slot, now, now);
|
|
15796
|
+
return work(slot, lease);
|
|
15797
|
+
};
|
|
15798
|
+
const staged = slots.find((slot) => swiftFrameworkSlotKey(slot) === frameworkKey);
|
|
15799
|
+
if (staged) return withSwiftRootLock(staged, run5(staged), signal);
|
|
15800
|
+
const oldest = slots.sort(
|
|
15801
|
+
(left, right) => (0, import_node_fs19.statSync)(left).mtimeMs - (0, import_node_fs19.statSync)(right).mtimeMs
|
|
15805
15802
|
);
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15803
|
+
for (const slot of oldest) {
|
|
15804
|
+
const result = await withSwiftRootLock(
|
|
15805
|
+
slot,
|
|
15806
|
+
async (lease) => ({ value: await run5(slot)(lease) }),
|
|
15807
|
+
signal,
|
|
15808
|
+
false
|
|
15809
|
+
);
|
|
15810
|
+
if (result) return result.value;
|
|
15811
|
+
}
|
|
15812
|
+
return withSwiftRootLock(oldest[0], run5(oldest[0]), signal);
|
|
15813
|
+
}
|
|
15814
|
+
function mirrorTree2(source, target, skip) {
|
|
15815
|
+
(0, import_node_fs19.mkdirSync)(target, { recursive: true });
|
|
15816
|
+
const wanted = /* @__PURE__ */ new Set();
|
|
15817
|
+
for (const entry of (0, import_node_fs19.readdirSync)(source, { withFileTypes: true })) {
|
|
15818
|
+
if (entry.name === skip) continue;
|
|
15819
|
+
wanted.add(entry.name);
|
|
15820
|
+
const from = import_node_path19.default.join(source, entry.name);
|
|
15821
|
+
const to = import_node_path19.default.join(target, entry.name);
|
|
15822
|
+
let existing = null;
|
|
15823
|
+
try {
|
|
15824
|
+
existing = (0, import_node_fs19.lstatSync)(to);
|
|
15825
|
+
} catch (error) {
|
|
15826
|
+
if (!vanished(error)) throw error;
|
|
15827
|
+
}
|
|
15828
|
+
if (entry.isDirectory()) {
|
|
15829
|
+
if (existing && !existing.isDirectory()) (0, import_node_fs19.rmSync)(to, { force: true });
|
|
15830
|
+
mirrorTree2(from, to);
|
|
15831
|
+
} else if (entry.isSymbolicLink()) {
|
|
15832
|
+
const link = (0, import_node_fs19.readlinkSync)(from);
|
|
15833
|
+
if (existing?.isSymbolicLink() && (0, import_node_fs19.readlinkSync)(to) === link) continue;
|
|
15834
|
+
if (existing) (0, import_node_fs19.rmSync)(to, { recursive: true, force: true });
|
|
15835
|
+
(0, import_node_fs19.symlinkSync)(link, to);
|
|
15836
|
+
} else {
|
|
15837
|
+
const stat = (0, import_node_fs19.statSync)(from);
|
|
15838
|
+
if (existing?.isFile() && existing.size === stat.size && (existing.mtimeMs === stat.mtimeMs || (0, import_node_fs19.readFileSync)(from).equals((0, import_node_fs19.readFileSync)(to))))
|
|
15839
|
+
continue;
|
|
15840
|
+
if (existing) (0, import_node_fs19.rmSync)(to, { recursive: true, force: true });
|
|
15841
|
+
const partial = `${to}.${(0, import_node_crypto8.randomUUID)()}`;
|
|
15842
|
+
(0, import_node_fs19.copyFileSync)(from, partial);
|
|
15843
|
+
(0, import_node_fs19.utimesSync)(partial, stat.atime, stat.mtime);
|
|
15844
|
+
(0, import_node_fs19.renameSync)(partial, to);
|
|
15845
|
+
}
|
|
15846
|
+
}
|
|
15847
|
+
for (const name3 of (0, import_node_fs19.readdirSync)(target))
|
|
15848
|
+
if (!wanted.has(name3) && name3 !== skip)
|
|
15849
|
+
(0, import_node_fs19.rmSync)(import_node_path19.default.join(target, name3), { recursive: true, force: true });
|
|
15850
|
+
}
|
|
15851
|
+
function stageFrameworkSource(moduleRoot, slot, frameworkKey) {
|
|
15852
|
+
if (!slot) return moduleRoot;
|
|
15853
|
+
const staged = import_node_path19.default.join(slot, "source");
|
|
15854
|
+
const stagedModule = import_node_path19.default.join(staged, "packages", import_node_path19.default.basename(moduleRoot));
|
|
15855
|
+
if (swiftFrameworkSlotKey(slot) !== frameworkKey) {
|
|
15856
|
+
(0, import_node_fs19.rmSync)(import_node_path19.default.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), { force: true });
|
|
15857
|
+
mirrorTree2(moduleRoot, stagedModule, ".build");
|
|
15858
|
+
mirrorTree2(
|
|
15859
|
+
swiftSharedSdkRoot(moduleRoot, false),
|
|
15860
|
+
import_node_path19.default.join(staged, "packages/peachsim/sdk/ios")
|
|
15861
|
+
);
|
|
15862
|
+
const modules = import_node_path19.default.join(staged, "node_modules");
|
|
15863
|
+
const target = (0, import_node_fs19.realpathSync)(import_node_path19.default.join(moduleRoot, "../../node_modules"));
|
|
15864
|
+
if (!(0, import_node_fs19.existsSync)(modules) || (0, import_node_fs19.readlinkSync)(modules) !== target) {
|
|
15865
|
+
(0, import_node_fs19.rmSync)(modules, { recursive: true, force: true });
|
|
15866
|
+
(0, import_node_fs19.symlinkSync)(target, modules);
|
|
15867
|
+
}
|
|
15868
|
+
(0, import_node_fs19.writeFileSync)(import_node_path19.default.join(slot, SWIFT_FRAMEWORK_SLOT_KEY), frameworkKey);
|
|
15869
|
+
}
|
|
15809
15870
|
return stagedModule;
|
|
15810
15871
|
}
|
|
15811
15872
|
function swiftLinkStamp(args) {
|
|
@@ -15841,17 +15902,6 @@ ${args.prebuilt.modules}
|
|
|
15841
15902
|
${statOf(import_node_path19.default.join(args.prebuilt.modules, entry))}`);
|
|
15842
15903
|
return hash.digest("hex");
|
|
15843
15904
|
}
|
|
15844
|
-
async function pruneFrameworkScratches(keep) {
|
|
15845
|
-
const dir = swiftFrameworksDir();
|
|
15846
|
-
const idle = (0, import_node_fs19.readdirSync)(dir).filter((name3) => name3 !== keep).map((name3) => ({ name: name3, modified: (0, import_node_fs19.statSync)(import_node_path19.default.join(dir, name3)).mtimeMs })).sort((left, right) => right.modified - left.modified).slice(SWIFT_FRAMEWORK_SCRATCHES_KEPT - 1);
|
|
15847
|
-
for (const { name: name3 } of idle)
|
|
15848
|
-
await withSwiftRootLock(
|
|
15849
|
-
import_node_path19.default.join(dir, name3),
|
|
15850
|
-
async () => (0, import_node_fs19.rmSync)(import_node_path19.default.join(dir, name3), { recursive: true, force: true }),
|
|
15851
|
-
void 0,
|
|
15852
|
-
false
|
|
15853
|
-
);
|
|
15854
|
-
}
|
|
15855
15905
|
function retireStaleSwiftLink(root, stamp) {
|
|
15856
15906
|
const receipt = import_node_path19.default.join(root, SWIFT_LINK_STAMP);
|
|
15857
15907
|
let previous = null;
|
|
@@ -15980,9 +16030,9 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
15980
16030
|
);
|
|
15981
16031
|
}
|
|
15982
16032
|
const frameworkScratch = swiftFrameworkScratch(frameworkKey);
|
|
15983
|
-
const withFrameworkLock = (work) => distribution ? work() :
|
|
15984
|
-
return withFrameworkLock(async (frameworkLease) => {
|
|
15985
|
-
const frameworkRoot = stageFrameworkSource(moduleRoot, frameworkKey);
|
|
16033
|
+
const withFrameworkLock = (work) => distribution ? work(null) : withSwiftFrameworkSlot(frameworkKey, options.signal, work);
|
|
16034
|
+
return withFrameworkLock(async (slot, frameworkLease) => {
|
|
16035
|
+
const frameworkRoot = stageFrameworkSource(moduleRoot, slot, frameworkKey);
|
|
15986
16036
|
report("preparing compiler plugins");
|
|
15987
16037
|
const pluginsFor = (pluginLease) => ensureMacroPlugins(
|
|
15988
16038
|
frameworkRoot,
|
|
@@ -16016,7 +16066,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16016
16066
|
let prebuilt;
|
|
16017
16067
|
if (!distribution) {
|
|
16018
16068
|
report("compiling framework products");
|
|
16019
|
-
prebuilt = await
|
|
16069
|
+
prebuilt = await buildFrameworkProducts(slot, {
|
|
16020
16070
|
moduleRoot: frameworkRoot,
|
|
16021
16071
|
frameworkKey,
|
|
16022
16072
|
input,
|
|
@@ -16026,7 +16076,6 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16026
16076
|
plugins: macroPlugins,
|
|
16027
16077
|
buildOptions
|
|
16028
16078
|
});
|
|
16029
|
-
await pruneFrameworkScratches(frameworkKey);
|
|
16030
16079
|
}
|
|
16031
16080
|
if (options.project) removeProjectLinks(root);
|
|
16032
16081
|
if (retireStaleSwiftLink(
|
|
@@ -24928,7 +24977,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
24928
24977
|
return hash.digest("hex");
|
|
24929
24978
|
}
|
|
24930
24979
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
24931
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
24980
|
+
var STANDIN_SOURCE_DIGEST = true ? "1cd682598c8039d3c836ff5b04a7395ad1178aeedac94ecc42645a0cb76b3ce0" : standinSourceDigest();
|
|
24932
24981
|
|
|
24933
24982
|
// src/swift-standins.ts
|
|
24934
24983
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1881 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/package.json
CHANGED
|
@@ -861,6 +861,10 @@ async function prepareNativeProject(
|
|
|
861
861
|
Object.hasOwn(manifest.dependencies ?? {}, name) ||
|
|
862
862
|
Object.hasOwn(manifest.devDependencies ?? {}, name)
|
|
863
863
|
if (!fs.existsSync(path.join(app, 'ios', 'Podfile'))) {
|
|
864
|
+
if (!declares('expo') && !declares('one'))
|
|
865
|
+
throw new Error(
|
|
866
|
+
`${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`,
|
|
867
|
+
)
|
|
864
868
|
const prebuild = declares('expo')
|
|
865
869
|
? [appRequire.resolve('expo/bin/cli'), 'prebuild']
|
|
866
870
|
: [
|