peachsim 0.1.2690 → 0.1.2691
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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +154 -128
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-7NECUOQL.mjs → acorn-FRAAGSQN.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-YA25KY54.mjs → chunk-3P3T6XDR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CE4CI5FU.mjs → chunk-677F6CA3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-ZK3YJNAA.mjs → chunk-6Y4USKQV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RPH46F3J.mjs → chunk-GHEIKIKL.mjs} +3 -16
- package/dist-lib/esm-chunks/{chunk-HOVIMQVO.mjs → chunk-GLMVKIM6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SMUFAUA2.mjs → chunk-GN3IKMG6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VVJ4B44L.mjs → chunk-HDZZNHQA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ID74LXQF.mjs → chunk-JAWBF6H2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GR7CUPIC.mjs → chunk-KBD22EMH.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-AGEHGE4W.mjs → chunk-LDYW2OW2.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-VT3KFJLL.mjs → chunk-NZXLU5VV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5PMTWOLF.mjs → chunk-O63LOL3D.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-ZFE3NYDB.mjs → chunk-OIYXX7IL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TGZK7Q33.mjs → chunk-Q6JOJQEF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-T6GYFGP3.mjs → chunk-QUF75PSG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TKDSXDNO.mjs → chunk-R2Y3VVPG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MYSQV4YK.mjs → chunk-RDBWKQEO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7P2EJJFY.mjs → chunk-SNPB7L3I.mjs} +140 -103
- package/dist-lib/esm-chunks/{chunk-OFJYTZNL.mjs → chunk-SWFEY33A.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VZW3Z5J3.mjs → chunk-VGERVNUM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LO7HH7BH.mjs → chunk-WTQRJ7GJ.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-2C4HDS5K.mjs → chunk-Y4AEL73Z.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CZOPH62Q.mjs → chunk-Z6OSVLDH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SJQMU53M.mjs → chunk-ZPKIEF24.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-P5M3VLPS.mjs → metro-layout-parser-6OLSOOML.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-LDSEGNPH.mjs → swift-package-prebuilt-5JCJ24DB.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-OCQEJPVW.mjs → swift-sdk-app-module-ZIJDA775.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-HCOK3M44.mjs → swift-sdk-image-JSEDATID.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-M3LWXZRI.mjs → swift-sdk-image-producer-MPF3H7PU.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +144 -118
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +161 -136
- package/dist-lib/host/fetch-proxy-handler.cjs +28 -27
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +165 -140
- package/dist-lib/swift-compile.cjs +129 -103
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/package.json +1 -1
- package/src/swift-compile.ts +139 -95
- package/src/swift-root-lock.ts +1 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2691 | (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;
|
|
@@ -6177,7 +6177,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
6177
6177
|
|
|
6178
6178
|
// src/swift-compiler-digest.ts
|
|
6179
6179
|
function swiftArchiveCompilerDigestValue() {
|
|
6180
|
-
return true ? "
|
|
6180
|
+
return true ? "78aa5c338e947a1bfd5f133f07c61a8ac05e44b9e2c6db6fd7ec815793ee5182" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
6181
6181
|
}
|
|
6182
6182
|
var import_node_crypto10, import_node_fs25, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
6183
6183
|
var init_swift_compiler_digest = __esm({
|
|
@@ -6328,7 +6328,7 @@ var init_swift_standin_digest = __esm({
|
|
|
6328
6328
|
|
|
6329
6329
|
// src/expo-native-compiler-digest.ts
|
|
6330
6330
|
function expoNativeCompilerDigestValue() {
|
|
6331
|
-
return true ? "
|
|
6331
|
+
return true ? "ded54d4f9d03d9107bb884853fd6a104b80e89fc69764289c24d0f6bd778d771" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
6332
6332
|
}
|
|
6333
6333
|
var import_node_crypto12;
|
|
6334
6334
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -43882,7 +43882,6 @@ __export(swift_root_lock_exports, {
|
|
|
43882
43882
|
hasLiveSwiftRootReaders: () => hasLiveSwiftRootReaders,
|
|
43883
43883
|
retainSwiftRootReadHold: () => retainSwiftRootReadHold,
|
|
43884
43884
|
swiftRootLocksDir: () => swiftRootLocksDir,
|
|
43885
|
-
waitForNoSwiftRootReaders: () => waitForNoSwiftRootReaders,
|
|
43886
43885
|
withSwiftRootLock: () => withSwiftRootLock,
|
|
43887
43886
|
withSwiftRootReadHolds: () => withSwiftRootReadHolds
|
|
43888
43887
|
});
|
|
@@ -44065,18 +44064,6 @@ async function hasLiveSwiftRootReaders(root, signal) {
|
|
|
44065
44064
|
}
|
|
44066
44065
|
return false;
|
|
44067
44066
|
}
|
|
44068
|
-
async function waitForNoSwiftRootReaders(root, signal) {
|
|
44069
|
-
let announced = false;
|
|
44070
|
-
while (await hasLiveSwiftRootReaders(root, signal)) {
|
|
44071
|
-
signal?.throwIfAborted();
|
|
44072
|
-
if (!announced) {
|
|
44073
|
-
announced = true;
|
|
44074
|
-
process.stderr.write(`[swift-root-lock] waiting for readers of ${root}
|
|
44075
|
-
`);
|
|
44076
|
-
}
|
|
44077
|
-
await pause(POLL_MS, signal);
|
|
44078
|
-
}
|
|
44079
|
-
}
|
|
44080
44067
|
async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
44081
44068
|
const directory2 = lockDirectoryFor(root);
|
|
44082
44069
|
const token = (0, import_node_crypto41.randomUUID)();
|
|
@@ -44115,8 +44102,8 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
44115
44102
|
const table = await processTableWithRetry(void 0, signal);
|
|
44116
44103
|
const orphaned = children2.filter((child) => groupAlive(table, child));
|
|
44117
44104
|
if (orphaned.length) {
|
|
44118
|
-
if (!wait) return void 0;
|
|
44119
44105
|
for (const child of orphaned) killOrphanedProcessGroup(child.pid);
|
|
44106
|
+
if (!wait) return void 0;
|
|
44120
44107
|
await waiting(
|
|
44121
44108
|
`stopping compiler groups ${orphaned.map((child) => child.pid).join(", ")} left by dead pid ${identity2.pid}`
|
|
44122
44109
|
);
|
|
@@ -53009,7 +52996,7 @@ function readFrameworkProductsReceipt(scratch2, receiptKey) {
|
|
|
53009
52996
|
objcHeaders: new Map(parsed2.objcHeaders)
|
|
53010
52997
|
};
|
|
53011
52998
|
}
|
|
53012
|
-
async function buildFrameworkProducts(scratch2, args) {
|
|
52999
|
+
async function buildFrameworkProducts(scratch2, args, allowWrite) {
|
|
53013
53000
|
const linkedTargets = linkedFrameworkTargets(args.moduleRoot, args.input);
|
|
53014
53001
|
const unoptimized = args.input.unoptimized === true;
|
|
53015
53002
|
const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
|
|
@@ -53030,7 +53017,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
53030
53017
|
).digest("hex").slice(0, 32);
|
|
53031
53018
|
const ready = readFrameworkProductsReceipt(scratch2, receiptKey);
|
|
53032
53019
|
if (ready) return ready;
|
|
53033
|
-
|
|
53020
|
+
if (!allowWrite) return;
|
|
53034
53021
|
const linkRoot = import_node_path84.default.join(scratch2, "link");
|
|
53035
53022
|
writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
|
|
53036
53023
|
const frameworkTmp = import_node_path84.default.join(scratch2, "peach-compiler-tmp");
|
|
@@ -53269,13 +53256,36 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
|
|
|
53269
53256
|
(0, import_node_fs82.mkdirSync)(slot, { recursive: true });
|
|
53270
53257
|
return slot;
|
|
53271
53258
|
});
|
|
53272
|
-
const
|
|
53273
|
-
|
|
53274
|
-
|
|
53275
|
-
|
|
53259
|
+
const trySlot = (slot, mode, logSelection) => {
|
|
53260
|
+
return withSwiftRootLock(
|
|
53261
|
+
slot,
|
|
53262
|
+
async (lease) => {
|
|
53263
|
+
const matches = swiftFrameworkSlotKey(slot) === frameworkKey;
|
|
53264
|
+
if (mode !== "restage" && !matches) return;
|
|
53265
|
+
const allowWrite = mode !== "reuse";
|
|
53266
|
+
if (allowWrite && await hasLiveSwiftRootReaders(slot, signal)) return;
|
|
53267
|
+
if (!matches) logSelection?.();
|
|
53268
|
+
const value = await work(slot, lease, allowWrite);
|
|
53269
|
+
if (value === void 0) return;
|
|
53270
|
+
const now = /* @__PURE__ */ new Date();
|
|
53271
|
+
(0, import_node_fs82.utimesSync)(slot, now, now);
|
|
53272
|
+
return { value };
|
|
53273
|
+
},
|
|
53274
|
+
signal,
|
|
53275
|
+
false
|
|
53276
|
+
);
|
|
53276
53277
|
};
|
|
53277
|
-
const
|
|
53278
|
-
|
|
53278
|
+
const tryExactSlots = async () => {
|
|
53279
|
+
const matching2 = slots.filter((slot) => swiftFrameworkSlotKey(slot) === frameworkKey);
|
|
53280
|
+
for (const mode of ["reuse", "extend"]) {
|
|
53281
|
+
for (const slot of matching2) {
|
|
53282
|
+
const result = await trySlot(slot, mode);
|
|
53283
|
+
if (result) return result;
|
|
53284
|
+
}
|
|
53285
|
+
}
|
|
53286
|
+
};
|
|
53287
|
+
const ready = await tryExactSlots();
|
|
53288
|
+
if (ready) return ready.value;
|
|
53279
53289
|
const built2 = new Map(slots.map((slot) => [slot, (0, import_node_fs82.statSync)(slot).mtimeMs]));
|
|
53280
53290
|
const own2 = (slot) => swiftFrameworkSlotRecord(slot, SWIFT_FRAMEWORK_SLOT_ORIGIN) === moduleRoot;
|
|
53281
53291
|
const inputs2 = new Map(
|
|
@@ -53309,24 +53319,28 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
|
|
|
53309
53319
|
if (left.tier === 1) return left.index - right.index;
|
|
53310
53320
|
return (built2.get(left.slot) ?? 0) - (built2.get(right.slot) ?? 0);
|
|
53311
53321
|
});
|
|
53312
|
-
|
|
53313
|
-
|
|
53314
|
-
|
|
53315
|
-
|
|
53316
|
-
|
|
53317
|
-
|
|
53322
|
+
let announced = false;
|
|
53323
|
+
for (; ; ) {
|
|
53324
|
+
signal?.throwIfAborted();
|
|
53325
|
+
for (const { slot, tier, changes } of ranked) {
|
|
53326
|
+
if (swiftFrameworkSlotKey(slot) === frameworkKey) continue;
|
|
53327
|
+
const result = await trySlot(slot, "restage", () => {
|
|
53318
53328
|
console.error(
|
|
53319
53329
|
`[swift-framework-cache] ${import_node_path84.default.basename(slot)} release=${release} tier=${tier} changedInputs=${changes} totalInputs=${inputs2.size}`
|
|
53320
53330
|
);
|
|
53321
|
-
|
|
53322
|
-
|
|
53323
|
-
|
|
53324
|
-
|
|
53325
|
-
|
|
53326
|
-
|
|
53331
|
+
});
|
|
53332
|
+
if (result) return result.value;
|
|
53333
|
+
}
|
|
53334
|
+
if (!announced) {
|
|
53335
|
+
console.error(
|
|
53336
|
+
`[swift-framework-cache] waiting for an available slot in ${slotsDir}`
|
|
53337
|
+
);
|
|
53338
|
+
announced = true;
|
|
53339
|
+
}
|
|
53340
|
+
await (0, import_promises12.setTimeout)(1e3, void 0, { signal });
|
|
53341
|
+
const ready2 = await tryExactSlots();
|
|
53342
|
+
if (ready2) return ready2.value;
|
|
53327
53343
|
}
|
|
53328
|
-
const nearest = ranked[0].slot;
|
|
53329
|
-
return withSwiftRootLock(nearest, run17(nearest), signal);
|
|
53330
53344
|
}
|
|
53331
53345
|
async function withSwiftBuildRootSlot(baseRoot, exactShape, compatShape, signal, work) {
|
|
53332
53346
|
const slots = Array.from({ length: SWIFT_BUILD_ROOT_SLOTS }, (_, index) => {
|
|
@@ -53630,34 +53644,34 @@ ${compatShape}` : "";
|
|
|
53630
53644
|
report(message);
|
|
53631
53645
|
};
|
|
53632
53646
|
const runLocked = (work) => {
|
|
53633
|
-
|
|
53634
|
-
|
|
53647
|
+
const runInBuildRoot = () => {
|
|
53648
|
+
if (canPoolBuildRoot)
|
|
53649
|
+
return withSwiftBuildRootSlot(
|
|
53650
|
+
baseRoot,
|
|
53651
|
+
exactShape,
|
|
53652
|
+
compatShape,
|
|
53653
|
+
budget.signal,
|
|
53654
|
+
work
|
|
53655
|
+
);
|
|
53656
|
+
const waitStart = Date.now();
|
|
53635
53657
|
return withSwiftRootLock(
|
|
53636
|
-
|
|
53637
|
-
|
|
53638
|
-
const built2 = readCompiledArtifact(
|
|
53639
|
-
import_node_path84.default.join(sharedRoot, "artifact"),
|
|
53640
|
-
hash
|
|
53641
|
-
);
|
|
53642
|
-
if (built2) {
|
|
53643
|
-
stage("reusing verified disk artifact");
|
|
53644
|
-
return retain(baseRoot, built2);
|
|
53645
|
-
}
|
|
53646
|
-
return withSwiftBuildRootSlot(
|
|
53647
|
-
baseRoot,
|
|
53648
|
-
exactShape,
|
|
53649
|
-
compatShape,
|
|
53650
|
-
budget.signal,
|
|
53651
|
-
work
|
|
53652
|
-
);
|
|
53653
|
-
},
|
|
53658
|
+
baseRoot,
|
|
53659
|
+
(lease) => work(baseRoot, lease, Date.now() - waitStart),
|
|
53654
53660
|
budget.signal
|
|
53655
53661
|
);
|
|
53656
|
-
}
|
|
53657
|
-
|
|
53662
|
+
};
|
|
53663
|
+
if (options2.intermediates || baseRoot === sharedRoot) return runInBuildRoot();
|
|
53658
53664
|
return withSwiftRootLock(
|
|
53659
|
-
|
|
53660
|
-
(
|
|
53665
|
+
sharedRoot,
|
|
53666
|
+
async () => {
|
|
53667
|
+
const built2 = readCompiledArtifact(import_node_path84.default.join(sharedRoot, "artifact"), hash);
|
|
53668
|
+
if (built2) {
|
|
53669
|
+
renewSharedArtifact(sharedRoot);
|
|
53670
|
+
stage("reusing verified disk artifact");
|
|
53671
|
+
return retain(baseRoot, built2);
|
|
53672
|
+
}
|
|
53673
|
+
return runInBuildRoot();
|
|
53674
|
+
},
|
|
53661
53675
|
budget.signal
|
|
53662
53676
|
);
|
|
53663
53677
|
};
|
|
@@ -53688,14 +53702,6 @@ ${compatShape}` : "";
|
|
|
53688
53702
|
);
|
|
53689
53703
|
}
|
|
53690
53704
|
const unoptimized = input.unoptimized === true;
|
|
53691
|
-
const withFrameworkLock = (work) => distribution ? work(null) : withSwiftFrameworkSlot(
|
|
53692
|
-
frameworkKey,
|
|
53693
|
-
options2.release,
|
|
53694
|
-
moduleRoot,
|
|
53695
|
-
budget.signal,
|
|
53696
|
-
work,
|
|
53697
|
-
unoptimized
|
|
53698
|
-
);
|
|
53699
53705
|
const baseBuildEnv = options2.project?.env ? {
|
|
53700
53706
|
...options2.project.env,
|
|
53701
53707
|
// shipped host plugins resolve against the selected compiler's runtime.
|
|
@@ -53708,22 +53714,13 @@ ${compatShape}` : "";
|
|
|
53708
53714
|
} : {},
|
|
53709
53715
|
PEACH_DEFER_WASM_LINK: "1"
|
|
53710
53716
|
} : swiftCompilerBaseEnv(options2.toolchainBin, process.env);
|
|
53711
|
-
const {
|
|
53712
|
-
|
|
53713
|
-
compileFrameworkRoot,
|
|
53714
|
-
macroPlugins,
|
|
53715
|
-
sdk: sdk2,
|
|
53716
|
-
icu,
|
|
53717
|
-
prebuilt,
|
|
53718
|
-
readHold: frameworkReadHold
|
|
53719
|
-
} = await withFrameworkLock(async (slot, frameworkLease) => {
|
|
53720
|
-
budget.startCompile();
|
|
53721
|
-
if (slot && swiftFrameworkSlotKey(slot) !== frameworkKey)
|
|
53722
|
-
await waitForNoSwiftRootReaders(slot, budget.signal);
|
|
53717
|
+
const prepareFrameworks = async (slot, frameworkLease, allowWrite = true) => {
|
|
53718
|
+
if (allowWrite) budget.startCompile();
|
|
53723
53719
|
const frameworkRoot2 = mirrorDistribution ? syncSwiftDistributionMirror(root2, moduleRoot, mirrorDistribution) : distribution ? moduleRoot : stageFrameworkSource(moduleRoot, slot, frameworkKey, options2.release);
|
|
53724
53720
|
if (!swiftModuleDigest(frameworkRoot2).equals(moduleDigest))
|
|
53725
53721
|
throw new Error("Swift staged project source differs from the caller");
|
|
53726
|
-
|
|
53722
|
+
if (!allowWrite && swiftMacroPlugins(frameworkRoot2).stale) return;
|
|
53723
|
+
if (allowWrite) stage("preparing compiler plugins");
|
|
53727
53724
|
const macroPlugins2 = await ensureMacroPlugins(
|
|
53728
53725
|
frameworkRoot2,
|
|
53729
53726
|
options2.toolchainBin,
|
|
@@ -53736,24 +53733,33 @@ ${compatShape}` : "";
|
|
|
53736
53733
|
const icu2 = options2.linkOnly ? null : swiftIcuAsset(options2.toolchainBin, sdk3);
|
|
53737
53734
|
let prebuilt2;
|
|
53738
53735
|
if (!distribution) {
|
|
53739
|
-
stage("compiling framework products");
|
|
53740
|
-
prebuilt2 = await buildFrameworkProducts(
|
|
53741
|
-
|
|
53742
|
-
|
|
53743
|
-
|
|
53744
|
-
|
|
53745
|
-
|
|
53746
|
-
|
|
53747
|
-
|
|
53748
|
-
|
|
53749
|
-
|
|
53750
|
-
|
|
53751
|
-
|
|
53752
|
-
|
|
53753
|
-
|
|
53754
|
-
|
|
53755
|
-
|
|
53756
|
-
|
|
53736
|
+
if (allowWrite) stage("compiling framework products");
|
|
53737
|
+
prebuilt2 = await buildFrameworkProducts(
|
|
53738
|
+
slot,
|
|
53739
|
+
{
|
|
53740
|
+
moduleRoot: frameworkRoot2,
|
|
53741
|
+
frameworkKey,
|
|
53742
|
+
input,
|
|
53743
|
+
swift,
|
|
53744
|
+
sdk: sdk3,
|
|
53745
|
+
toolchainBin: options2.toolchainBin,
|
|
53746
|
+
plugins: macroPlugins2,
|
|
53747
|
+
buildOptions: {
|
|
53748
|
+
env: baseBuildEnv,
|
|
53749
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
53750
|
+
signal: budget.signal,
|
|
53751
|
+
onOutput: budget.progress,
|
|
53752
|
+
lease,
|
|
53753
|
+
frameworkLease
|
|
53754
|
+
}
|
|
53755
|
+
},
|
|
53756
|
+
allowWrite
|
|
53757
|
+
);
|
|
53758
|
+
if (!prebuilt2) return;
|
|
53759
|
+
if (!allowWrite) {
|
|
53760
|
+
budget.startCompile();
|
|
53761
|
+
stage("reusing verified framework products");
|
|
53762
|
+
}
|
|
53757
53763
|
}
|
|
53758
53764
|
const readHold2 = slot ? acquireSwiftRootReadHold(slot) : void 0;
|
|
53759
53765
|
return {
|
|
@@ -53765,8 +53771,26 @@ ${compatShape}` : "";
|
|
|
53765
53771
|
prebuilt: prebuilt2,
|
|
53766
53772
|
readHold: readHold2
|
|
53767
53773
|
};
|
|
53768
|
-
}
|
|
53769
|
-
|
|
53774
|
+
};
|
|
53775
|
+
const frameworks = distribution ? await prepareFrameworks(null) : await withSwiftFrameworkSlot(
|
|
53776
|
+
frameworkKey,
|
|
53777
|
+
options2.release,
|
|
53778
|
+
moduleRoot,
|
|
53779
|
+
budget.signal,
|
|
53780
|
+
prepareFrameworks,
|
|
53781
|
+
unoptimized
|
|
53782
|
+
);
|
|
53783
|
+
if (!frameworks)
|
|
53784
|
+
throw new Error("Swift distribution did not provide its frameworks");
|
|
53785
|
+
const {
|
|
53786
|
+
frameworkRoot,
|
|
53787
|
+
compileFrameworkRoot,
|
|
53788
|
+
macroPlugins,
|
|
53789
|
+
sdk: sdk2,
|
|
53790
|
+
icu,
|
|
53791
|
+
prebuilt
|
|
53792
|
+
} = frameworks;
|
|
53793
|
+
let readHold = frameworks.readHold;
|
|
53770
53794
|
const buildOptions = {
|
|
53771
53795
|
env: baseBuildEnv,
|
|
53772
53796
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -54321,7 +54345,7 @@ ${compatShape}` : "";
|
|
|
54321
54345
|
options2.signal
|
|
54322
54346
|
);
|
|
54323
54347
|
}
|
|
54324
|
-
var import_node_child_process43, import_node_crypto50, import_node_fs82, import_node_os18, import_node_path84, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
|
|
54348
|
+
var import_node_child_process43, import_node_crypto50, import_node_fs82, import_node_os18, import_node_path84, import_promises12, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
|
|
54325
54349
|
var init_swift_compile = __esm({
|
|
54326
54350
|
"src/swift-compile.ts"() {
|
|
54327
54351
|
"use strict";
|
|
@@ -54330,6 +54354,7 @@ var init_swift_compile = __esm({
|
|
|
54330
54354
|
import_node_fs82 = require("node:fs");
|
|
54331
54355
|
import_node_os18 = __toESM(require("node:os"), 1);
|
|
54332
54356
|
import_node_path84 = __toESM(require("node:path"), 1);
|
|
54357
|
+
import_promises12 = require("node:timers/promises");
|
|
54333
54358
|
v6 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
54334
54359
|
init_admitted_mac_build();
|
|
54335
54360
|
init_swift_c_predefines();
|
|
@@ -54554,7 +54579,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
54554
54579
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
54555
54580
|
MULTI_MANIFEST_VERSION = 76;
|
|
54556
54581
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
54557
|
-
compilerSourceDigest = true ? "
|
|
54582
|
+
compilerSourceDigest = true ? "7606d9522af3cd62eae6966cdb5705c5c4bea053686b189b779998d97a0463bd" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
54558
54583
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
54559
54584
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
54560
54585
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -82154,7 +82179,7 @@ function hashPackageTree(root, options2) {
|
|
|
82154
82179
|
return (async () => {
|
|
82155
82180
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
82156
82181
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
82157
|
-
const bytes = await Promise.all(batch.map((file) => (0,
|
|
82182
|
+
const bytes = await Promise.all(batch.map((file) => (0, import_promises13.readFile)((0, import_node_path110.join)(root, file))));
|
|
82158
82183
|
batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
|
|
82159
82184
|
}
|
|
82160
82185
|
return hash.digest("hex");
|
|
@@ -82171,13 +82196,13 @@ function nativePackageTreeDigest(root) {
|
|
|
82171
82196
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
82172
82197
|
});
|
|
82173
82198
|
}
|
|
82174
|
-
var import_node_crypto63, import_node_fs106,
|
|
82199
|
+
var import_node_crypto63, import_node_fs106, import_promises13, import_node_path110, READ_AHEAD;
|
|
82175
82200
|
var init_package_tree_digest = __esm({
|
|
82176
82201
|
"src/package-tree-digest.ts"() {
|
|
82177
82202
|
"use strict";
|
|
82178
82203
|
import_node_crypto63 = require("node:crypto");
|
|
82179
82204
|
import_node_fs106 = require("node:fs");
|
|
82180
|
-
|
|
82205
|
+
import_promises13 = require("node:fs/promises");
|
|
82181
82206
|
import_node_path110 = require("node:path");
|
|
82182
82207
|
READ_AHEAD = 64;
|
|
82183
82208
|
}
|
|
@@ -84617,7 +84642,7 @@ async function cxxDeclarations(astFile, headers) {
|
|
|
84617
84642
|
const result = [];
|
|
84618
84643
|
let lastFile = "";
|
|
84619
84644
|
let rootComplete = false;
|
|
84620
|
-
await (0,
|
|
84645
|
+
await (0, import_promises14.pipeline)(import_node_fs117.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
|
|
84621
84646
|
for await (const value of tokens2) {
|
|
84622
84647
|
if (!value || typeof value !== "object" || !("name" in value) || typeof value.name !== "string")
|
|
84623
84648
|
throw new Error("invalid clang AST token");
|
|
@@ -84711,13 +84736,13 @@ async function cxxDeclarations(astFile, headers) {
|
|
|
84711
84736
|
if (stack.length !== 0 || !rootComplete) throw new Error("truncated clang AST");
|
|
84712
84737
|
return result;
|
|
84713
84738
|
}
|
|
84714
|
-
var import_node_fs117, import_node_path121,
|
|
84739
|
+
var import_node_fs117, import_node_path121, import_promises14, import_stream_json, DECLARATIONS;
|
|
84715
84740
|
var init_swift_cxx_declarations = __esm({
|
|
84716
84741
|
"src/swift-cxx-declarations.ts"() {
|
|
84717
84742
|
"use strict";
|
|
84718
84743
|
import_node_fs117 = __toESM(require("node:fs"), 1);
|
|
84719
84744
|
import_node_path121 = __toESM(require("node:path"), 1);
|
|
84720
|
-
|
|
84745
|
+
import_promises14 = require("node:stream/promises");
|
|
84721
84746
|
import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
|
|
84722
84747
|
DECLARATIONS = /* @__PURE__ */ new Set([
|
|
84723
84748
|
"FunctionDecl",
|
|
@@ -96033,7 +96058,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
96033
96058
|
if (!import_node_fs125.default.existsSync(complete)) {
|
|
96034
96059
|
let release = tryAcquireNumberedLock(`${output}.lock`);
|
|
96035
96060
|
while (!release) {
|
|
96036
|
-
await (0,
|
|
96061
|
+
await (0, import_promises15.setTimeout)(1e3);
|
|
96037
96062
|
release = tryAcquireNumberedLock(`${output}.lock`);
|
|
96038
96063
|
}
|
|
96039
96064
|
try {
|
|
@@ -96227,7 +96252,7 @@ exec ${quote3(import_node_path129.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
96227
96252
|
);
|
|
96228
96253
|
return directory2;
|
|
96229
96254
|
}
|
|
96230
|
-
var import_node_child_process59, import_node_crypto75, import_node_fs125, import_node_os25, import_node_path129,
|
|
96255
|
+
var import_node_child_process59, import_node_crypto75, import_node_fs125, import_node_os25, import_node_path129, import_promises15, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
96231
96256
|
var init_rive_runtime_dependencies = __esm({
|
|
96232
96257
|
"src/rive-runtime-dependencies.ts"() {
|
|
96233
96258
|
"use strict";
|
|
@@ -96236,7 +96261,7 @@ var init_rive_runtime_dependencies = __esm({
|
|
|
96236
96261
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
96237
96262
|
import_node_os25 = __toESM(require("node:os"), 1);
|
|
96238
96263
|
import_node_path129 = __toESM(require("node:path"), 1);
|
|
96239
|
-
|
|
96264
|
+
import_promises15 = require("node:timers/promises");
|
|
96240
96265
|
init_home_paths();
|
|
96241
96266
|
init_numbered_lock();
|
|
96242
96267
|
init_swift_objc_runtime();
|
|
@@ -96360,7 +96385,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
|
|
|
96360
96385
|
const lock = async () => {
|
|
96361
96386
|
let release = tryAcquireNumberedLock(`${dir}.lock`);
|
|
96362
96387
|
while (!release) {
|
|
96363
|
-
await (0,
|
|
96388
|
+
await (0, import_promises16.setTimeout)(25, void 0, { signal });
|
|
96364
96389
|
release = tryAcquireNumberedLock(`${dir}.lock`);
|
|
96365
96390
|
}
|
|
96366
96391
|
return release;
|
|
@@ -96987,14 +97012,14 @@ function resolveSwiftPackages(options2) {
|
|
|
96987
97012
|
result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
|
|
96988
97013
|
return result;
|
|
96989
97014
|
}
|
|
96990
|
-
var import_node_child_process60, import_node_fs126, import_node_path130,
|
|
97015
|
+
var import_node_child_process60, import_node_fs126, import_node_path130, import_promises16, import_node_util15, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync3, checkoutKey;
|
|
96991
97016
|
var init_swift_packages = __esm({
|
|
96992
97017
|
"src/swift-packages.ts"() {
|
|
96993
97018
|
"use strict";
|
|
96994
97019
|
import_node_child_process60 = require("node:child_process");
|
|
96995
97020
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
96996
97021
|
import_node_path130 = __toESM(require("node:path"), 1);
|
|
96997
|
-
|
|
97022
|
+
import_promises16 = require("node:timers/promises");
|
|
96998
97023
|
import_node_util15 = require("node:util");
|
|
96999
97024
|
init_git_repo_env();
|
|
97000
97025
|
init_native_git();
|
|
@@ -116833,7 +116858,7 @@ __export(rolldown_bundle_forward_exports, {
|
|
|
116833
116858
|
async function forwardRolldownBundleResponse(upstream, res) {
|
|
116834
116859
|
res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
|
|
116835
116860
|
if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
|
|
116836
|
-
await (0,
|
|
116861
|
+
await (0, import_promises17.pipeline)(upstream, res);
|
|
116837
116862
|
return;
|
|
116838
116863
|
}
|
|
116839
116864
|
const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
|
|
@@ -116875,14 +116900,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
|
|
|
116875
116900
|
}
|
|
116876
116901
|
yield Buffer.from(annotated.slice(sent), "utf8");
|
|
116877
116902
|
};
|
|
116878
|
-
await (0,
|
|
116903
|
+
await (0, import_promises17.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
|
|
116879
116904
|
}
|
|
116880
|
-
var import_stream,
|
|
116905
|
+
var import_stream, import_promises17, ROLLDOWN_INVENTORY_HEADER;
|
|
116881
116906
|
var init_rolldown_bundle_forward = __esm({
|
|
116882
116907
|
"src/host/rolldown-bundle-forward.ts"() {
|
|
116883
116908
|
"use strict";
|
|
116884
116909
|
import_stream = require("stream");
|
|
116885
|
-
|
|
116910
|
+
import_promises17 = require("stream/promises");
|
|
116886
116911
|
init_cli_runtime();
|
|
116887
116912
|
ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
|
|
116888
116913
|
}
|
|
@@ -117229,7 +117254,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
117229
117254
|
}
|
|
117230
117255
|
if (isNativeCookieRedirect(hop)) res.removeHeader("location");
|
|
117231
117256
|
res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
|
|
117232
|
-
await (0,
|
|
117257
|
+
await (0, import_promises18.pipeline)(proxyRes, res);
|
|
117233
117258
|
return;
|
|
117234
117259
|
}
|
|
117235
117260
|
if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
|
|
@@ -117240,7 +117265,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
117240
117265
|
const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
|
|
117241
117266
|
const redirectUrl = resolveRedirectUrl(location, targetUrl);
|
|
117242
117267
|
proxyRes.resume();
|
|
117243
|
-
await (0,
|
|
117268
|
+
await (0, import_promises18.finished)(proxyRes);
|
|
117244
117269
|
if (hasClientClosed()) return;
|
|
117245
117270
|
await proxy(
|
|
117246
117271
|
redirectUrl,
|
|
@@ -117267,7 +117292,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
117267
117292
|
await forwardRolldownBundleResponse2(proxyRes, res);
|
|
117268
117293
|
return;
|
|
117269
117294
|
}
|
|
117270
|
-
await (0,
|
|
117295
|
+
await (0, import_promises18.pipeline)(proxyRes, res);
|
|
117271
117296
|
};
|
|
117272
117297
|
let upstreamAnswered = false;
|
|
117273
117298
|
let body;
|
|
@@ -117331,14 +117356,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
117331
117356
|
res.off("close", markClosed);
|
|
117332
117357
|
}
|
|
117333
117358
|
}
|
|
117334
|
-
var import_http3, import_https2, import_node_http22,
|
|
117359
|
+
var import_http3, import_https2, import_node_http22, import_promises18, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
|
|
117335
117360
|
var init_fetch_proxy_handler = __esm({
|
|
117336
117361
|
"src/host/fetch-proxy-handler.ts"() {
|
|
117337
117362
|
"use strict";
|
|
117338
117363
|
import_http3 = __toESM(require("http"), 1);
|
|
117339
117364
|
import_https2 = __toESM(require("https"), 1);
|
|
117340
117365
|
import_node_http22 = require("node:http2");
|
|
117341
|
-
|
|
117366
|
+
import_promises18 = require("stream/promises");
|
|
117342
117367
|
init_package_versions();
|
|
117343
117368
|
init_backend_origin();
|
|
117344
117369
|
init_fetch_proxy_overrides();
|
|
@@ -127019,7 +127044,7 @@ var init_nitro_superset = __esm({
|
|
|
127019
127044
|
init_nitroContract();
|
|
127020
127045
|
init_swift_standin_digest();
|
|
127021
127046
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
127022
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
127047
|
+
NITRO_COMPILER_DIGEST = true ? "42b9c2735db24e5274476b1509b854f1b975fbad4e587e3b6ac149bd83e52851" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
127023
127048
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
127024
127049
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
127025
127050
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -127213,14 +127238,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
127213
127238
|
}
|
|
127214
127239
|
const packageDir = import_node_path181.default.dirname(manifest);
|
|
127215
127240
|
const runtimeBundle = await withSwiftRootLock(
|
|
127216
|
-
import_node_path181.default.join(await
|
|
127241
|
+
import_node_path181.default.join(await import_promises20.default.realpath(packageDir), "bundle"),
|
|
127217
127242
|
async () => {
|
|
127218
127243
|
await (0, import_node_util25.promisify)(import_node_child_process79.execFile)(
|
|
127219
127244
|
process.env.NODE_BINARY || "node",
|
|
127220
127245
|
[import_node_path181.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
127221
127246
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
127222
127247
|
);
|
|
127223
|
-
return
|
|
127248
|
+
return import_promises20.default.readFile(import_node_path181.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
|
|
127224
127249
|
}
|
|
127225
127250
|
);
|
|
127226
127251
|
const catalog = await stageExpoWidgetAssets(appRoot, origin);
|
|
@@ -127231,12 +127256,12 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
127231
127256
|
}
|
|
127232
127257
|
};
|
|
127233
127258
|
}
|
|
127234
|
-
var import_node_child_process79,
|
|
127259
|
+
var import_node_child_process79, import_promises20, import_node_module26, import_node_path181, import_node_util25, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
127235
127260
|
var init_expo_widgets_bundle = __esm({
|
|
127236
127261
|
"src/expo-widgets-bundle.ts"() {
|
|
127237
127262
|
"use strict";
|
|
127238
127263
|
import_node_child_process79 = require("node:child_process");
|
|
127239
|
-
|
|
127264
|
+
import_promises20 = __toESM(require("node:fs/promises"), 1);
|
|
127240
127265
|
import_node_module26 = require("node:module");
|
|
127241
127266
|
import_node_path181 = __toESM(require("node:path"), 1);
|
|
127242
127267
|
import_node_util25 = require("node:util");
|
|
@@ -133714,7 +133739,7 @@ var PlaneHost = class {
|
|
|
133714
133739
|
|
|
133715
133740
|
// src/host/replacement-module-handler.ts
|
|
133716
133741
|
var import_node_fs151 = require("node:fs");
|
|
133717
|
-
var
|
|
133742
|
+
var import_promises19 = __toESM(require("node:fs/promises"), 1);
|
|
133718
133743
|
var import_node_path153 = __toESM(require("node:path"), 1);
|
|
133719
133744
|
|
|
133720
133745
|
// ../contrast-bundler/src/replacementModule.ts
|
|
@@ -134133,7 +134158,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
134133
134158
|
}
|
|
134134
134159
|
let resolvedTargetPath;
|
|
134135
134160
|
try {
|
|
134136
|
-
resolvedTargetPath = await
|
|
134161
|
+
resolvedTargetPath = await import_promises19.default.realpath(targetPath);
|
|
134137
134162
|
} catch (error) {
|
|
134138
134163
|
const message = error instanceof Error ? error.message : String(error);
|
|
134139
134164
|
res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
|
|
@@ -134141,7 +134166,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
134141
134166
|
return true;
|
|
134142
134167
|
}
|
|
134143
134168
|
if (servedRoots) {
|
|
134144
|
-
const realRoots = (await Promise.all(servedRoots.map((root) =>
|
|
134169
|
+
const realRoots = (await Promise.all(servedRoots.map((root) => import_promises19.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
|
|
134145
134170
|
if (!isInsideAny(realRoots, resolvedTargetPath)) {
|
|
134146
134171
|
res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
|
|
134147
134172
|
res.end("replacement file must be inside a folder the bundler serves");
|
|
@@ -134151,7 +134176,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
134151
134176
|
try {
|
|
134152
134177
|
const compiled = compileReplacementModule({
|
|
134153
134178
|
filePath: resolvedTargetPath,
|
|
134154
|
-
source: await
|
|
134179
|
+
source: await import_promises19.default.readFile(resolvedTargetPath, "utf8"),
|
|
134155
134180
|
runtimePackages,
|
|
134156
134181
|
// the imported file's url is this request's with only its path changed,
|
|
134157
134182
|
// so the token, cache key and runtime packages carry over.
|