peachsim 0.1.2300 → 0.1.2302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +1 -0
- package/cli/commands/inspect.ts +2 -1
- package/cli/commands/shell-url.ts +5 -0
- 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 +677 -355
- 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 +3 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +628 -306
- 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 +2889 -354
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -6
- 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 +14 -9
- 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 +13 -9
- package/dist-lib/native-app-identity-project.cjs +9 -5
- package/dist-lib/native-app-identity-project.mjs +9 -5
- 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 +56 -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 +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +788 -415
- package/dist-lib/swift-compile.cjs +15 -7
- package/dist-lib/swift-compile.mjs +15 -7
- 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 +23 -11
- package/dist-lib/vite.cjs +6 -6
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/activitykit-activityContract.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +3 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +4 -0
- package/java-platform/licenses/fdlibm.txt +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/expo-discovery-cache.ts +6 -6
- package/src/expo-native-workspace.ts +85 -37
- package/src/expo-swift-host.ts +19 -4
- package/src/host/bridge-host.ts +9 -0
- package/src/launchMetadataContract.ts +1 -0
- package/src/one-sdk-preparation.ts +61 -5
- package/src/swift-guest-compile.ts +19 -3
- package/src/swift-guest-source-plan.ts +7 -2
- package/src/swiftContract.ts +3 -0
- package/src/turbo-compile.ts +60 -4
- package/src/turbo-source.ts +239 -35
- package/src/widget-extension-bundle.ts +48 -0
- package/src/xcode-project.ts +22 -3
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2302 | (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;
|
|
@@ -37,13 +37,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
37
37
|
|
|
38
38
|
// src/chromium-admission.ts
|
|
39
39
|
function readChromiumQueue(deps, verified2, own) {
|
|
40
|
-
const { fs: fs118, os:
|
|
40
|
+
const { fs: fs118, os: os26, path: path144, childProcess: childProcess3 } = deps;
|
|
41
41
|
const dir = path144.join(
|
|
42
|
-
process.platform === "win32" ?
|
|
42
|
+
process.platform === "win32" ? os26.tmpdir() : "/tmp",
|
|
43
43
|
"chromium-admission"
|
|
44
44
|
);
|
|
45
45
|
fs118.mkdirSync(dir, { recursive: true });
|
|
46
|
-
const limit = Math.max(2, Math.floor(
|
|
46
|
+
const limit = Math.max(2, Math.floor(os26.cpus().length / 2));
|
|
47
47
|
const alive = (pid) => {
|
|
48
48
|
try {
|
|
49
49
|
process.kill(pid, 0);
|
|
@@ -5842,6 +5842,8 @@ var init_supported_native_packages = __esm({
|
|
|
5842
5842
|
// seam
|
|
5843
5843
|
"@stripe/stripe-terminal-react-native",
|
|
5844
5844
|
// seam
|
|
5845
|
+
"@swan-io/react-native-browser",
|
|
5846
|
+
// seam
|
|
5845
5847
|
"@swmansion/react-native-bottom-sheet",
|
|
5846
5848
|
// seam
|
|
5847
5849
|
"@thehale/react-native-keep-awake",
|
|
@@ -5853,7 +5855,7 @@ var init_supported_native_packages = __esm({
|
|
|
5853
5855
|
"@use-voltra/android-client",
|
|
5854
5856
|
// seam
|
|
5855
5857
|
"@use-voltra/ios-client",
|
|
5856
|
-
//
|
|
5858
|
+
// compiled-turbo
|
|
5857
5859
|
"@vonovak/react-native-theme-control",
|
|
5858
5860
|
// seam
|
|
5859
5861
|
"@walletconnect/react-native-compat",
|
|
@@ -9670,9 +9672,9 @@ var init_registry = __esm({
|
|
|
9670
9672
|
{
|
|
9671
9673
|
range: ">=0.1.0",
|
|
9672
9674
|
coverage: 0.8,
|
|
9673
|
-
note: "
|
|
9674
|
-
working: "
|
|
9675
|
-
missing: "
|
|
9675
|
+
note: "iOS compiles the packages own RNSwanBrowser.mm and Swift and the unchanged JS runs over it; Android answers from a window.open seam",
|
|
9676
|
+
working: "iOS: the compiled module validates the URL, rejects a second open while presented and emits swanBrowserOnClose; Android: the seam opens the URL as a popup, closes it and emits swanBrowserOnClose",
|
|
9677
|
+
missing: "Android Chrome Custom Tabs UI, package selection and OS-level dismissal detection: the seam is a popup and Android native intake is paused"
|
|
9676
9678
|
}
|
|
9677
9679
|
]
|
|
9678
9680
|
},
|
|
@@ -20513,10 +20515,10 @@ var init_registry = __esm({
|
|
|
20513
20515
|
versions: [
|
|
20514
20516
|
{
|
|
20515
20517
|
range: ">=2.4.0 <2.5.0",
|
|
20516
|
-
coverage: 0.
|
|
20517
|
-
note: "
|
|
20518
|
-
working: "
|
|
20519
|
-
missing: "
|
|
20518
|
+
coverage: 0.5,
|
|
20519
|
+
note: "iOS compiles the package's own Swift and Objective-C++ (Voltra.podspec) as a TurboModule and Fabric component; the unchanged JS runs over it",
|
|
20520
|
+
working: "VoltraView paints its SwiftUI through the Fabric component host; live activity payloads brotli-compress byte-identically to Apple Compression; ActivityKit request, update, end and activity lists follow the measured iOS 27 rules",
|
|
20521
|
+
missing: "Lock Screen, Dynamic Island and home-screen widget presentation; SVG preloads hang because a snapshot of a WKWebView that was never in a window gets no reply"
|
|
20520
20522
|
}
|
|
20521
20523
|
]
|
|
20522
20524
|
},
|
|
@@ -35139,6 +35141,45 @@ var init_oneSdkContract = __esm({
|
|
|
35139
35141
|
});
|
|
35140
35142
|
|
|
35141
35143
|
// src/one-sdk-preparation.ts
|
|
35144
|
+
async function generateAppSdkInChild(generatorFile, frameworks) {
|
|
35145
|
+
const directory2 = import_node_fs26.default.mkdtempSync(import_node_path21.default.join(import_node_os6.default.tmpdir(), "peach-one-sdk-"));
|
|
35146
|
+
const resultFile = import_node_path21.default.join(directory2, "result.json");
|
|
35147
|
+
try {
|
|
35148
|
+
const child = (0, import_node_child_process16.spawn)(
|
|
35149
|
+
"node",
|
|
35150
|
+
[
|
|
35151
|
+
"--input-type=module",
|
|
35152
|
+
"-e",
|
|
35153
|
+
GENERATE_SCRIPT,
|
|
35154
|
+
generatorFile,
|
|
35155
|
+
resultFile,
|
|
35156
|
+
JSON.stringify(frameworks)
|
|
35157
|
+
],
|
|
35158
|
+
{ stdio: ["ignore", "ignore", "pipe"] }
|
|
35159
|
+
);
|
|
35160
|
+
let stderr = "";
|
|
35161
|
+
child.stderr.setEncoding("utf8");
|
|
35162
|
+
child.stderr.on("data", (chunk) => {
|
|
35163
|
+
stderr += chunk;
|
|
35164
|
+
});
|
|
35165
|
+
const [status, signal] = await new Promise(
|
|
35166
|
+
(resolve14, reject) => {
|
|
35167
|
+
child.once("error", reject);
|
|
35168
|
+
child.once("close", (code, closeSignal) => resolve14([code, closeSignal]));
|
|
35169
|
+
}
|
|
35170
|
+
);
|
|
35171
|
+
if (status !== 0)
|
|
35172
|
+
throw new Error(
|
|
35173
|
+
`One SDK source generation failed (${signal ?? `exit ${status}`})${stderr ? `: ${stderr.trim().slice(-2e3)}` : ""}`
|
|
35174
|
+
);
|
|
35175
|
+
const result = JSON.parse(
|
|
35176
|
+
import_node_fs26.default.readFileSync(resultFile, "utf8")
|
|
35177
|
+
);
|
|
35178
|
+
return { generation: result.generation, files: new Map(result.files) };
|
|
35179
|
+
} finally {
|
|
35180
|
+
import_node_fs26.default.rmSync(directory2, { recursive: true, force: true });
|
|
35181
|
+
}
|
|
35182
|
+
}
|
|
35142
35183
|
async function selectOneSDK(appRoot) {
|
|
35143
35184
|
const require4 = (0, import_node_module4.createRequire)(import_node_path21.default.join(appRoot, "package.json"));
|
|
35144
35185
|
let onePackage;
|
|
@@ -35195,7 +35236,10 @@ async function prepareOneSDKSources(appRoot, output2) {
|
|
|
35195
35236
|
import_node_fs26.default.copyFileSync(import_node_path21.default.join(published3, name3), import_node_path21.default.join(directory2, name3));
|
|
35196
35237
|
return;
|
|
35197
35238
|
}
|
|
35198
|
-
const generated = await
|
|
35239
|
+
const generated = await generateAppSdkInChild(
|
|
35240
|
+
import_node_path21.default.join(selected.one, "dist/sdk/app.mjs"),
|
|
35241
|
+
selected.frameworks
|
|
35242
|
+
);
|
|
35199
35243
|
if (generated.generation !== generation)
|
|
35200
35244
|
throw new Error("One SDK source generation differs from the installed facades");
|
|
35201
35245
|
import_node_fs26.default.rmSync(directory2, { recursive: true, force: true });
|
|
@@ -35209,17 +35253,27 @@ async function prepareOneSDKSources(appRoot, output2) {
|
|
|
35209
35253
|
};
|
|
35210
35254
|
import_node_fs26.default.writeFileSync(import_node_path21.default.join(directory2, "manifest.json"), JSON.stringify(manifest));
|
|
35211
35255
|
}
|
|
35212
|
-
var import_node_crypto9, import_node_fs26, import_node_module4, import_node_path21, import_node_url2;
|
|
35256
|
+
var import_node_child_process16, import_node_crypto9, import_node_fs26, import_node_module4, import_node_os6, import_node_path21, import_node_url2, GENERATE_SCRIPT;
|
|
35213
35257
|
var init_one_sdk_preparation = __esm({
|
|
35214
35258
|
"src/one-sdk-preparation.ts"() {
|
|
35215
35259
|
"use strict";
|
|
35260
|
+
import_node_child_process16 = require("node:child_process");
|
|
35216
35261
|
import_node_crypto9 = require("node:crypto");
|
|
35217
35262
|
import_node_fs26 = __toESM(require("node:fs"), 1);
|
|
35218
35263
|
import_node_module4 = require("node:module");
|
|
35264
|
+
import_node_os6 = __toESM(require("node:os"), 1);
|
|
35219
35265
|
import_node_path21 = __toESM(require("node:path"), 1);
|
|
35220
35266
|
import_node_url2 = require("node:url");
|
|
35221
35267
|
init_native_prebuilt();
|
|
35222
35268
|
init_oneSdkContract();
|
|
35269
|
+
GENERATE_SCRIPT = `
|
|
35270
|
+
import { writeFileSync } from 'node:fs'
|
|
35271
|
+
import { pathToFileURL } from 'node:url'
|
|
35272
|
+
const [generatorFile, resultFile, frameworks] = process.argv.slice(1)
|
|
35273
|
+
const generator = await import(pathToFileURL(generatorFile).href)
|
|
35274
|
+
const { files, generation } = await generator.generateAppSdk(JSON.parse(frameworks))
|
|
35275
|
+
writeFileSync(resultFile, JSON.stringify({ generation, files: [...files] }))
|
|
35276
|
+
`;
|
|
35223
35277
|
}
|
|
35224
35278
|
});
|
|
35225
35279
|
|
|
@@ -37636,7 +37690,7 @@ var swiftCoverageProvenance;
|
|
|
37636
37690
|
var init_provenance = __esm({
|
|
37637
37691
|
"src/swift-coverage/provenance.ts"() {
|
|
37638
37692
|
"use strict";
|
|
37639
|
-
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"
|
|
37693
|
+
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"f0e86caccf203fa58395cbac9fed64577bb98a061efdf24f85a289c4e5996db9","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
|
|
37640
37694
|
}
|
|
37641
37695
|
});
|
|
37642
37696
|
|
|
@@ -40210,7 +40264,7 @@ function linuxBrowserLibsKey(id, arch) {
|
|
|
40210
40264
|
return `linux-libs/${id}/${arch}.tar.gz`;
|
|
40211
40265
|
}
|
|
40212
40266
|
function missingLibraries(executablePath, libraryPath) {
|
|
40213
|
-
const ldd = (0,
|
|
40267
|
+
const ldd = (0, import_node_child_process17.spawnSync)("ldd", [executablePath], {
|
|
40214
40268
|
encoding: "utf8",
|
|
40215
40269
|
timeout: 3e4,
|
|
40216
40270
|
env: libraryPath ? {
|
|
@@ -40273,11 +40327,11 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
|
|
|
40273
40327
|
}
|
|
40274
40328
|
return { ok: true, libraryPath };
|
|
40275
40329
|
}
|
|
40276
|
-
var
|
|
40330
|
+
var import_node_child_process17, import_node_fs31, import_node_path26, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
|
|
40277
40331
|
var init_linux_browser_libs = __esm({
|
|
40278
40332
|
"cli/drivers/linux-browser-libs.ts"() {
|
|
40279
40333
|
"use strict";
|
|
40280
|
-
|
|
40334
|
+
import_node_child_process17 = require("node:child_process");
|
|
40281
40335
|
import_node_fs31 = require("node:fs");
|
|
40282
40336
|
import_node_path26 = require("node:path");
|
|
40283
40337
|
init_src();
|
|
@@ -42496,7 +42550,7 @@ function ensureSwiftLinuxRuntime(release) {
|
|
|
42496
42550
|
`);
|
|
42497
42551
|
const download3 = `${plan.dest}.${process.pid}.tmp`;
|
|
42498
42552
|
try {
|
|
42499
|
-
(0,
|
|
42553
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42500
42554
|
"curl",
|
|
42501
42555
|
[
|
|
42502
42556
|
"-fsSL",
|
|
@@ -42563,7 +42617,7 @@ function swiftCompilerRelease(release) {
|
|
|
42563
42617
|
}
|
|
42564
42618
|
function swiftToolchainBin(release) {
|
|
42565
42619
|
if (process.platform === "darwin") {
|
|
42566
|
-
const dirs = [
|
|
42620
|
+
const dirs = [import_node_os7.default.homedir(), "/"].map(
|
|
42567
42621
|
(base) => import_node_path29.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
|
|
42568
42622
|
);
|
|
42569
42623
|
return dirs.find((dir) => import_node_fs35.default.existsSync(import_node_path29.default.join(dir, "swift"))) ?? dirs[0];
|
|
@@ -42609,7 +42663,7 @@ exec ${JSON.stringify(import_node_path29.default.join(toolchainBin, "wasm-ld"))}
|
|
|
42609
42663
|
}
|
|
42610
42664
|
function peachHome() {
|
|
42611
42665
|
const override = process.env.PEACH_HOME;
|
|
42612
|
-
return override ? import_node_path29.default.resolve(override) : import_node_path29.default.join(
|
|
42666
|
+
return override ? import_node_path29.default.resolve(override) : import_node_path29.default.join(import_node_os7.default.homedir(), ".peach");
|
|
42613
42667
|
}
|
|
42614
42668
|
function peachSwiftSdksDir() {
|
|
42615
42669
|
return process.env.PEACH_SWIFT_SDKS_PATH ?? import_node_path29.default.join(peachHome(), "swift", "sdks");
|
|
@@ -42618,7 +42672,7 @@ function agentSharedCacheRoot() {
|
|
|
42618
42672
|
if (process.platform !== "darwin" || !process.env.TM_SESSION) return null;
|
|
42619
42673
|
if (agentBuildersRoot) return agentBuildersRoot;
|
|
42620
42674
|
const policy = JSON.parse(
|
|
42621
|
-
(0,
|
|
42675
|
+
(0, import_node_child_process18.execFileSync)("tm", ["machine", "policy", "--json"], {
|
|
42622
42676
|
encoding: "utf8",
|
|
42623
42677
|
timeout: 3e4
|
|
42624
42678
|
})
|
|
@@ -42626,7 +42680,7 @@ function agentSharedCacheRoot() {
|
|
|
42626
42680
|
const mounts = policy.storage_mounts ?? [];
|
|
42627
42681
|
if (!Array.isArray(mounts)) throw new Error("storage_mounts must be a list");
|
|
42628
42682
|
const isMount = (directory2) => {
|
|
42629
|
-
const lines = (0,
|
|
42683
|
+
const lines = (0, import_node_child_process18.execFileSync)("/bin/df", ["-P", directory2], {
|
|
42630
42684
|
encoding: "utf8",
|
|
42631
42685
|
timeout: 3e4
|
|
42632
42686
|
}).trim().split("\n");
|
|
@@ -42641,13 +42695,13 @@ function agentSharedCacheRoot() {
|
|
|
42641
42695
|
throw new Error(`configured storage is not mounted: ${mount}`);
|
|
42642
42696
|
}
|
|
42643
42697
|
const heavy = policy.heavy_data_dir;
|
|
42644
|
-
if (heavy == null) return agentBuildersRoot = import_node_path29.default.join(
|
|
42698
|
+
if (heavy == null) return agentBuildersRoot = import_node_path29.default.join(import_node_os7.default.homedir(), "builders");
|
|
42645
42699
|
if (typeof heavy !== "string" || !import_node_path29.default.isAbsolute(heavy) || !import_node_fs35.default.statSync(heavy).isDirectory())
|
|
42646
42700
|
throw new Error(`configured heavy_data_dir is unavailable: ${heavy}`);
|
|
42647
42701
|
const mounted = isMount(heavy);
|
|
42648
42702
|
if (import_node_path29.default.dirname(heavy) === "/Volumes" && !mounted)
|
|
42649
42703
|
throw new Error(`configured storage is not mounted: ${heavy}`);
|
|
42650
|
-
return agentBuildersRoot = mounted && import_node_fs35.default.statSync(heavy).dev === import_node_fs35.default.statSync(
|
|
42704
|
+
return agentBuildersRoot = mounted && import_node_fs35.default.statSync(heavy).dev === import_node_fs35.default.statSync(import_node_os7.default.homedir()).dev ? import_node_path29.default.join(import_node_os7.default.homedir(), "builders") : import_node_path29.default.join(heavy, "builders");
|
|
42651
42705
|
}
|
|
42652
42706
|
function buildersRootEnv() {
|
|
42653
42707
|
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
@@ -42745,7 +42799,7 @@ ${swiftInstallSteps(release, sdk2)}`
|
|
|
42745
42799
|
const swift = import_node_path29.default.join(bin, "swift");
|
|
42746
42800
|
const listed = [swift, sdk2.wasmSdkId, ...swiftSdkOptions()].join("\0");
|
|
42747
42801
|
if (!listedSdks.has(listed)) {
|
|
42748
|
-
const sdks = (0,
|
|
42802
|
+
const sdks = (0, import_node_child_process18.execFileSync)(swift, ["sdk", "list", ...swiftSdkOptions()], {
|
|
42749
42803
|
encoding: "utf8",
|
|
42750
42804
|
env: swiftEnvironment(),
|
|
42751
42805
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -42775,7 +42829,7 @@ function swiftSdkBundle(swift, id, options) {
|
|
|
42775
42829
|
const key2 = [swift, id, ...options].join("\0");
|
|
42776
42830
|
const known = sdkBundles.get(key2);
|
|
42777
42831
|
if (known && import_node_fs35.default.existsSync(known)) return known;
|
|
42778
|
-
const configuration = (0,
|
|
42832
|
+
const configuration = (0, import_node_child_process18.execFileSync)(
|
|
42779
42833
|
swift,
|
|
42780
42834
|
["sdk", "configure", ...options, "--show-configuration", id, "wasm64-unknown-wasip1"],
|
|
42781
42835
|
{ encoding: "utf8", env: swiftEnvironment(), stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -42877,7 +42931,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42877
42931
|
throw new Error("declared Swift SDK archive checksum mismatch");
|
|
42878
42932
|
const store = import_node_path29.default.join(staging, "sdks");
|
|
42879
42933
|
import_node_fs35.default.mkdirSync(store);
|
|
42880
|
-
(0,
|
|
42934
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42881
42935
|
swift,
|
|
42882
42936
|
[
|
|
42883
42937
|
"sdk",
|
|
@@ -42897,7 +42951,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42897
42951
|
const expected = swiftSdkPayloadChecksum(stagedBundle);
|
|
42898
42952
|
const locks = import_node_path29.default.join(import_node_path29.default.resolve(peachSwiftSdksDir()), ".peach-locks");
|
|
42899
42953
|
import_node_fs35.default.mkdirSync(locks, { recursive: true });
|
|
42900
|
-
(0,
|
|
42954
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42901
42955
|
"perl",
|
|
42902
42956
|
[
|
|
42903
42957
|
"-e",
|
|
@@ -42938,7 +42992,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42938
42992
|
}
|
|
42939
42993
|
}
|
|
42940
42994
|
function swiftSdkStagingDirectory(prefix) {
|
|
42941
|
-
const parent = scratch?.directory ??
|
|
42995
|
+
const parent = scratch?.directory ?? import_node_os7.default.tmpdir();
|
|
42942
42996
|
if (!import_node_fs35.default.existsSync(parent)) throw new Error(`Swift SDK install is missing ${parent}`);
|
|
42943
42997
|
return import_node_fs35.default.mkdtempSync(import_node_path29.default.join(parent, prefix));
|
|
42944
42998
|
}
|
|
@@ -42957,7 +43011,7 @@ function installSwiftWasmSdk(release, sdk2) {
|
|
|
42957
43011
|
if (sdk2.wasmSdkUrl.startsWith("file:"))
|
|
42958
43012
|
import_node_fs35.default.copyFileSync((0, import_node_url3.fileURLToPath)(sdk2.wasmSdkUrl), archive);
|
|
42959
43013
|
else
|
|
42960
|
-
(0,
|
|
43014
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42961
43015
|
"curl",
|
|
42962
43016
|
[
|
|
42963
43017
|
"-fsSL",
|
|
@@ -43044,7 +43098,7 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
43044
43098
|
throw new Error(`Swift compiler binary mismatch: ${relative6}`);
|
|
43045
43099
|
}
|
|
43046
43100
|
}
|
|
43047
|
-
const { stdout } = await (0, import_node_util6.promisify)(
|
|
43101
|
+
const { stdout } = await (0, import_node_util6.promisify)(import_node_child_process18.execFile)(binary2, ["--version"], {
|
|
43048
43102
|
encoding: "utf8",
|
|
43049
43103
|
env: swiftEnvironment(),
|
|
43050
43104
|
signal
|
|
@@ -43063,7 +43117,7 @@ function swiftCompiler(release) {
|
|
|
43063
43117
|
throw new Error(`Swift compiler ${release} is missing ${binary2}`);
|
|
43064
43118
|
if (release.includes("-custom-"))
|
|
43065
43119
|
verifySwiftHostCompiler(release, import_node_path29.default.resolve(bin, "../.."));
|
|
43066
|
-
const version2 = (0,
|
|
43120
|
+
const version2 = (0, import_node_child_process18.execFileSync)(binary2, ["--version"], {
|
|
43067
43121
|
encoding: "utf8",
|
|
43068
43122
|
env: swiftEnvironment(),
|
|
43069
43123
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -43134,14 +43188,14 @@ function swiftCompilerInstall(release) {
|
|
|
43134
43188
|
]
|
|
43135
43189
|
};
|
|
43136
43190
|
}
|
|
43137
|
-
var
|
|
43191
|
+
var import_node_child_process18, import_node_crypto14, import_node_fs35, import_node_os7, import_node_path29, import_node_url3, import_node_util6, SWIFT_HOST_COMPILER_RELEASE, SWIFT_HOST_COMPILER_ID, compilerArchives, linuxRuntimeLibs, SWIFT_PRIVATE_DISTRIBUTION_ENV, SWIFT_AUTOLINK_LINKER, BUILDERS_ROOT_ENV, agentBuildersRoot, scratch, linuxLibraryPath, linuxHostSdkRoot, listedSdks, sdkBundles, sdkFileHashes, sdkFilesHashed, loadedSdkHashFiles, verifiedCompilers;
|
|
43138
43192
|
var init_swift_toolchain = __esm({
|
|
43139
43193
|
"src/swift-toolchain.ts"() {
|
|
43140
43194
|
"use strict";
|
|
43141
|
-
|
|
43195
|
+
import_node_child_process18 = require("node:child_process");
|
|
43142
43196
|
import_node_crypto14 = require("node:crypto");
|
|
43143
43197
|
import_node_fs35 = __toESM(require("node:fs"), 1);
|
|
43144
|
-
|
|
43198
|
+
import_node_os7 = __toESM(require("node:os"), 1);
|
|
43145
43199
|
import_node_path29 = __toESM(require("node:path"), 1);
|
|
43146
43200
|
import_node_url3 = require("node:url");
|
|
43147
43201
|
import_node_util6 = require("node:util");
|
|
@@ -43433,7 +43487,7 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
|
|
|
43433
43487
|
Math.floor(minimum % 1e4 / 100),
|
|
43434
43488
|
minimum % 100
|
|
43435
43489
|
].join(".");
|
|
43436
|
-
const result = (0,
|
|
43490
|
+
const result = (0, import_node_child_process19.spawnSync)(
|
|
43437
43491
|
import_node_path30.default.join(toolchainBin, "clang"),
|
|
43438
43492
|
[
|
|
43439
43493
|
"-target",
|
|
@@ -43466,11 +43520,11 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
|
|
|
43466
43520
|
platforms.set(key2, flags);
|
|
43467
43521
|
return flags;
|
|
43468
43522
|
}
|
|
43469
|
-
var
|
|
43523
|
+
var import_node_child_process19, import_node_path30, platforms;
|
|
43470
43524
|
var init_swift_objc_platform = __esm({
|
|
43471
43525
|
"src/swift-objc-platform.ts"() {
|
|
43472
43526
|
"use strict";
|
|
43473
|
-
|
|
43527
|
+
import_node_child_process19 = require("node:child_process");
|
|
43474
43528
|
import_node_path30 = __toESM(require("node:path"), 1);
|
|
43475
43529
|
init_swift_toolchain();
|
|
43476
43530
|
platforms = /* @__PURE__ */ new Map();
|
|
@@ -45206,7 +45260,7 @@ function developerDirs() {
|
|
|
45206
45260
|
try {
|
|
45207
45261
|
add2(
|
|
45208
45262
|
// runner-toolchain-platform: darwin
|
|
45209
|
-
(0,
|
|
45263
|
+
(0, import_node_child_process20.execFileSync)("xcode-select", ["-p"], {
|
|
45210
45264
|
encoding: "utf8",
|
|
45211
45265
|
stdio: ["ignore", "pipe", "pipe"]
|
|
45212
45266
|
}).trim()
|
|
@@ -45225,7 +45279,7 @@ function readNativeSdk(developerDir2) {
|
|
|
45225
45279
|
const env = { ...process.env, DEVELOPER_DIR: developerDir2 };
|
|
45226
45280
|
const xcrun = (args) => (
|
|
45227
45281
|
// runner-toolchain-platform: darwin
|
|
45228
|
-
(0,
|
|
45282
|
+
(0, import_node_child_process20.execFileSync)("xcrun", args, {
|
|
45229
45283
|
encoding: "utf8",
|
|
45230
45284
|
env,
|
|
45231
45285
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -45240,7 +45294,7 @@ function readNativeSdk(developerDir2) {
|
|
|
45240
45294
|
sdk: xcrun(["--sdk", "iphonesimulator", "--show-sdk-version"]),
|
|
45241
45295
|
settings: digest3("SDKSettings.json"),
|
|
45242
45296
|
build: digest3("System/Library/CoreServices/SystemVersion.plist"),
|
|
45243
|
-
compilerVersion: (0,
|
|
45297
|
+
compilerVersion: (0, import_node_child_process20.execFileSync)(compiler, ["--version"], {
|
|
45244
45298
|
encoding: "utf8",
|
|
45245
45299
|
env,
|
|
45246
45300
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -45710,7 +45764,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45710
45764
|
for (let round = 0; ; round++) {
|
|
45711
45765
|
import_node_fs36.default.rmSync(out, { recursive: true, force: true });
|
|
45712
45766
|
import_node_fs36.default.mkdirSync(out, { recursive: true });
|
|
45713
|
-
const run14 = (0,
|
|
45767
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
45714
45768
|
...withoutCoreDump(import_node_path32.default.join(toolchainBin, "swift-symbolgraph-extract"), [
|
|
45715
45769
|
"-module-name",
|
|
45716
45770
|
surface.module,
|
|
@@ -45895,7 +45949,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45895
45949
|
)
|
|
45896
45950
|
].join("\n")
|
|
45897
45951
|
);
|
|
45898
|
-
const run14 = (0,
|
|
45952
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
45899
45953
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
45900
45954
|
[
|
|
45901
45955
|
"-typecheck",
|
|
@@ -46023,7 +46077,7 @@ function inheritedDefaultInits(surface, graphs, toolchainBin, search, moduleCach
|
|
|
46023
46077
|
)
|
|
46024
46078
|
].join("\n")
|
|
46025
46079
|
);
|
|
46026
|
-
const run14 = (0,
|
|
46080
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46027
46081
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
46028
46082
|
[
|
|
46029
46083
|
"-dump-ast",
|
|
@@ -46096,7 +46150,7 @@ function requiredInits(surface, graphs, toolchainBin, search, moduleCache, work)
|
|
|
46096
46150
|
)
|
|
46097
46151
|
].join("\n")
|
|
46098
46152
|
);
|
|
46099
|
-
const run14 = (0,
|
|
46153
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46100
46154
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
46101
46155
|
[
|
|
46102
46156
|
"-typecheck",
|
|
@@ -46155,7 +46209,7 @@ function protocolProperties(surface, headersDir, graphs, toolchainBin, search, w
|
|
|
46155
46209
|
].map((file) => `#import ${JSON.stringify(file)}
|
|
46156
46210
|
`).join("")
|
|
46157
46211
|
);
|
|
46158
|
-
const run14 = (0,
|
|
46212
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46159
46213
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46160
46214
|
[
|
|
46161
46215
|
"-x",
|
|
@@ -46238,7 +46292,7 @@ function objcDeclarationAST(surface, framework, toolchainBin, search, work, orig
|
|
|
46238
46292
|
"-ast-dump-all=json"
|
|
46239
46293
|
];
|
|
46240
46294
|
const dump2 = (filter) => {
|
|
46241
|
-
const run14 = (0,
|
|
46295
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46242
46296
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46243
46297
|
[
|
|
46244
46298
|
...args,
|
|
@@ -46320,7 +46374,7 @@ function enumValues(graphs, surface, framework, toolchainBin, search, work, orig
|
|
|
46320
46374
|
if (flag === "-sdk") flags.push("-isysroot", dir);
|
|
46321
46375
|
else flags.push(flag, dir);
|
|
46322
46376
|
}
|
|
46323
|
-
const run14 = (0,
|
|
46377
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46324
46378
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46325
46379
|
[
|
|
46326
46380
|
"-x",
|
|
@@ -46395,11 +46449,11 @@ function constantValue(node) {
|
|
|
46395
46449
|
}
|
|
46396
46450
|
return null;
|
|
46397
46451
|
}
|
|
46398
|
-
var
|
|
46452
|
+
var import_node_child_process20, import_node_crypto15, import_node_fs36, import_node_path32, REFINED_CONSTANT_TYPES, NATIVE_GRAPH_SDK_VERSION, WASI_EMULATION, WASI_EMULATION_FLAGS, NATIVE_GRAPH_INPUTS, NATIVE_GRAPH_ID, resolvedPinnedSdk, ROUNDS, sdkId, headerFiles, MISSING_IMPORT, FRAMEWORK_HEADER, FRAMEWORK_MODULEMAP, sdkDeclarations;
|
|
46399
46453
|
var init_swift_objc_standin = __esm({
|
|
46400
46454
|
"src/swift-objc-standin.ts"() {
|
|
46401
46455
|
"use strict";
|
|
46402
|
-
|
|
46456
|
+
import_node_child_process20 = require("node:child_process");
|
|
46403
46457
|
import_node_crypto15 = require("node:crypto");
|
|
46404
46458
|
import_node_fs36 = __toESM(require("node:fs"), 1);
|
|
46405
46459
|
import_node_path32 = __toESM(require("node:path"), 1);
|
|
@@ -46660,7 +46714,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
|
|
|
46660
46714
|
]);
|
|
46661
46715
|
const cached4 = sdkViews.get(key2);
|
|
46662
46716
|
if (cached4 && import_node_fs37.default.existsSync(cached4.manifest)) return touchSdkView(cached4.options);
|
|
46663
|
-
const configuration = (0,
|
|
46717
|
+
const configuration = (0, import_node_child_process21.execFileSync)(
|
|
46664
46718
|
import_node_path33.default.join(toolchainBin, "swift"),
|
|
46665
46719
|
[
|
|
46666
46720
|
"sdk",
|
|
@@ -46789,11 +46843,11 @@ function swiftSharedSdkInputFiles(moduleRoot) {
|
|
|
46789
46843
|
const root = swiftSharedSdkRoot(moduleRoot, false);
|
|
46790
46844
|
return (0, import_node_fs37.readdirSync)(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path33.default.relative(moduleRoot, import_node_path33.default.join(entry.parentPath, entry.name))).sort();
|
|
46791
46845
|
}
|
|
46792
|
-
var
|
|
46846
|
+
var import_node_child_process21, import_node_crypto16, import_node_fs37, import_node_path33, distributionHeaderRoots, WEAKEN_FOUNDATION_SYMS, sdkViews;
|
|
46793
46847
|
var init_swift_shared_sdk = __esm({
|
|
46794
46848
|
"src/swift-shared-sdk.ts"() {
|
|
46795
46849
|
"use strict";
|
|
46796
|
-
|
|
46850
|
+
import_node_child_process21 = require("node:child_process");
|
|
46797
46851
|
import_node_crypto16 = require("node:crypto");
|
|
46798
46852
|
import_node_fs37 = __toESM(require("node:fs"), 1);
|
|
46799
46853
|
import_node_path33 = __toESM(require("node:path"), 1);
|
|
@@ -46816,14 +46870,14 @@ var init_swift_shared_sdk = __esm({
|
|
|
46816
46870
|
// src/swift-darwin-records.ts
|
|
46817
46871
|
function compileDarwinRecords(args) {
|
|
46818
46872
|
const records = import_node_path34.default.join(args.packageRoot, "Sources/DarwinRecords");
|
|
46819
|
-
const runtime = (0, import_node_fs38.mkdtempSync)(import_node_path34.default.join((0,
|
|
46873
|
+
const runtime = (0, import_node_fs38.mkdtempSync)(import_node_path34.default.join((0, import_node_os8.tmpdir)(), "peach-objc-runtime-"));
|
|
46820
46874
|
(0, import_node_fs38.symlinkSync)(import_node_path34.default.join(args.darwin, "usr/include/objc"), import_node_path34.default.join(runtime, "objc"));
|
|
46821
46875
|
const objects = (0, import_node_fs38.readdirSync)(records).filter((file) => file.endsWith(".c") || file.endsWith(".m")).sort((a, b) => a < b ? -1 : a > b ? 1 : 0).map((file) => {
|
|
46822
46876
|
const object7 = import_node_path34.default.join(
|
|
46823
46877
|
args.out,
|
|
46824
46878
|
`${DARWIN_RECORDS_PREFIX}${file.replace(/\.[cm]$/, ".o")}`
|
|
46825
46879
|
);
|
|
46826
|
-
(0,
|
|
46880
|
+
(0, import_node_child_process22.execFileSync)(
|
|
46827
46881
|
import_node_path34.default.join(args.bin, "clang"),
|
|
46828
46882
|
[
|
|
46829
46883
|
"--target=wasm64-unknown-wasip1",
|
|
@@ -46858,13 +46912,13 @@ function compileDarwinRecords(args) {
|
|
|
46858
46912
|
(0, import_node_fs38.rmSync)(runtime, { recursive: true });
|
|
46859
46913
|
return objects;
|
|
46860
46914
|
}
|
|
46861
|
-
var
|
|
46915
|
+
var import_node_child_process22, import_node_fs38, import_node_os8, import_node_path34, DARWIN_RECORDS_PREFIX, darwinRecordsMinimum;
|
|
46862
46916
|
var init_swift_darwin_records = __esm({
|
|
46863
46917
|
"src/swift-darwin-records.ts"() {
|
|
46864
46918
|
"use strict";
|
|
46865
|
-
|
|
46919
|
+
import_node_child_process22 = require("node:child_process");
|
|
46866
46920
|
import_node_fs38 = require("node:fs");
|
|
46867
|
-
|
|
46921
|
+
import_node_os8 = require("node:os");
|
|
46868
46922
|
import_node_path34 = __toESM(require("node:path"), 1);
|
|
46869
46923
|
init_swift_objc_platform();
|
|
46870
46924
|
init_swift_objc_runtime();
|
|
@@ -49494,18 +49548,18 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
|
|
|
49494
49548
|
transformations
|
|
49495
49549
|
});
|
|
49496
49550
|
} else
|
|
49497
|
-
(0,
|
|
49551
|
+
(0, import_node_child_process23.execFileSync)(import_node_path35.default.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
|
|
49498
49552
|
stdio: "pipe",
|
|
49499
49553
|
maxBuffer: Infinity,
|
|
49500
49554
|
...owner
|
|
49501
49555
|
});
|
|
49502
49556
|
import_node_fs39.default.rmSync(rspPath, { force: true });
|
|
49503
49557
|
}
|
|
49504
|
-
var
|
|
49558
|
+
var import_node_child_process23, import_node_crypto17, import_node_fs39, import_node_path35, v2, HAS_ADDEND, WIDE_DATA_RELOCS, ROOT_SEG_PREFIXES, RECORD_SEGS, PARTITIONED_SEGS, PRUNED_SDK_ARCHIVES, OMIT_SDK_LIB_FLAGS, NEUTRALIZED_SWIFTRT_SECTIONS, parsedObjectCache, SWIFTUI_WRAPPER_HOST_PROTOCOLS;
|
|
49505
49559
|
var init_swift_wasm_prune = __esm({
|
|
49506
49560
|
"src/swift-wasm-prune.ts"() {
|
|
49507
49561
|
"use strict";
|
|
49508
|
-
|
|
49562
|
+
import_node_child_process23 = require("node:child_process");
|
|
49509
49563
|
import_node_crypto17 = require("node:crypto");
|
|
49510
49564
|
import_node_fs39 = __toESM(require("node:fs"), 1);
|
|
49511
49565
|
import_node_path35 = __toESM(require("node:path"), 1);
|
|
@@ -49596,7 +49650,7 @@ var init_swift_wasm_prune = __esm({
|
|
|
49596
49650
|
// src/swift-guest-archive.ts
|
|
49597
49651
|
function aliasGuestArchive(options) {
|
|
49598
49652
|
const original = readArMembers((0, import_node_fs40.readFileSync)(options.archive));
|
|
49599
|
-
const listed = (0,
|
|
49653
|
+
const listed = (0, import_node_child_process24.execFileSync)(options.llvmAr, ["t", options.archive], {
|
|
49600
49654
|
encoding: "utf8"
|
|
49601
49655
|
}).trimEnd().split("\n");
|
|
49602
49656
|
if (!original.length || listed.length !== original.length || original.some((member, index) => member.name !== listed[index]))
|
|
@@ -49622,7 +49676,7 @@ function aliasGuestArchive(options) {
|
|
|
49622
49676
|
);
|
|
49623
49677
|
const archive = import_node_path36.default.join(options.directory, "archive.a");
|
|
49624
49678
|
(0, import_node_fs40.rmSync)(archive, { force: true });
|
|
49625
|
-
(0,
|
|
49679
|
+
(0, import_node_child_process24.execFileSync)(options.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
|
|
49626
49680
|
const rewritten = readArMembers((0, import_node_fs40.readFileSync)(archive));
|
|
49627
49681
|
if (rewritten.length !== members2.length || rewritten.some(
|
|
49628
49682
|
(member, index) => member.name !== members2[index].alias || (0, import_node_crypto18.createHash)("sha256").update(member.bytes).digest("hex") !== members2[index].sha256
|
|
@@ -49657,11 +49711,11 @@ function aliasGuestLinkIdentities(identities, archives) {
|
|
|
49657
49711
|
}
|
|
49658
49712
|
return result;
|
|
49659
49713
|
}
|
|
49660
|
-
var
|
|
49714
|
+
var import_node_child_process24, import_node_crypto18, import_node_fs40, import_node_path36;
|
|
49661
49715
|
var init_swift_guest_archive = __esm({
|
|
49662
49716
|
"src/swift-guest-archive.ts"() {
|
|
49663
49717
|
"use strict";
|
|
49664
|
-
|
|
49718
|
+
import_node_child_process24 = require("node:child_process");
|
|
49665
49719
|
import_node_crypto18 = require("node:crypto");
|
|
49666
49720
|
import_node_fs40 = require("node:fs");
|
|
49667
49721
|
import_node_path36 = __toESM(require("node:path"), 1);
|
|
@@ -51035,8 +51089,8 @@ function swiftPackageLinkage(target) {
|
|
|
51035
51089
|
function guestSourceImages(graph) {
|
|
51036
51090
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
51037
51091
|
const entry = targets.get(graph.entry);
|
|
51038
|
-
if (!entry || entry.productType !== "com.apple.product-type.application")
|
|
51039
|
-
throw new Error("source graph has no application entry");
|
|
51092
|
+
if (!entry || entry.productType !== "com.apple.product-type.application" && entry.productType !== "com.apple.product-type.app-extension")
|
|
51093
|
+
throw new Error("source graph has no application or app extension entry");
|
|
51040
51094
|
const images = [
|
|
51041
51095
|
{ id: 0, owner: entry.id, members: [] }
|
|
51042
51096
|
];
|
|
@@ -52000,7 +52054,7 @@ function linkGuestImages(options) {
|
|
|
52000
52054
|
);
|
|
52001
52055
|
const output2 = import_node_fs43.default.openSync(trace, "w");
|
|
52002
52056
|
try {
|
|
52003
|
-
(0,
|
|
52057
|
+
(0, import_node_child_process25.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "pipe"] });
|
|
52004
52058
|
} finally {
|
|
52005
52059
|
import_node_fs43.default.closeSync(output2);
|
|
52006
52060
|
}
|
|
@@ -52014,7 +52068,7 @@ function linkGuestImages(options) {
|
|
|
52014
52068
|
source,
|
|
52015
52069
|
'#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
|
|
52016
52070
|
);
|
|
52017
|
-
(0,
|
|
52071
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52018
52072
|
clang,
|
|
52019
52073
|
[...options.projection.clangOptions, "-c", source, "-o", discoveryProjection],
|
|
52020
52074
|
{ stdio: "pipe" }
|
|
@@ -52128,7 +52182,7 @@ function linkGuestImages(options) {
|
|
|
52128
52182
|
}
|
|
52129
52183
|
const members2 = archives.get(artifact.path);
|
|
52130
52184
|
if (!members2) continue;
|
|
52131
|
-
const listed = (0,
|
|
52185
|
+
const listed = (0, import_node_child_process25.execFileSync)(llvmAr, ["t", artifact.path], { encoding: "utf8" }).trimEnd().split("\n");
|
|
52132
52186
|
if (listed.length !== members2.length || new Set(listed).size !== listed.length || members2.some(
|
|
52133
52187
|
(member, i) => listed[i] !== member.name || import_node_path39.default.basename(member.name) !== member.name
|
|
52134
52188
|
))
|
|
@@ -52151,13 +52205,13 @@ function linkGuestImages(options) {
|
|
|
52151
52205
|
import_node_fs43.default.rmSync(output2, { force: true });
|
|
52152
52206
|
const response = import_node_path39.default.join(memberDir, "members.rsp");
|
|
52153
52207
|
import_node_fs43.default.writeFileSync(response, inputs.map((input) => JSON.stringify(input)).join(" "));
|
|
52154
|
-
(0,
|
|
52208
|
+
(0, import_node_child_process25.execFileSync)(llvmAr, ["rcs", output2, `@${response}`], { stdio: "pipe" });
|
|
52155
52209
|
replacements.set(artifact.path, output2);
|
|
52156
52210
|
}
|
|
52157
52211
|
const irPath = import_node_path39.default.join(directory2, "ledger.ll");
|
|
52158
52212
|
const ledgerObject = import_node_path39.default.join(directory2, "ledger.o");
|
|
52159
52213
|
import_node_fs43.default.writeFileSync(irPath, ledger.llvmIR);
|
|
52160
|
-
(0,
|
|
52214
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52161
52215
|
clang,
|
|
52162
52216
|
["--target=wasm64-unknown-wasip1", "-c", irPath, "-o", ledgerObject],
|
|
52163
52217
|
{ stdio: "pipe" }
|
|
@@ -52199,7 +52253,7 @@ function linkGuestImages(options) {
|
|
|
52199
52253
|
const projectionSource = import_node_path39.default.join(directory2, "projection.c");
|
|
52200
52254
|
projectionObject = import_node_path39.default.join(directory2, "projection.o");
|
|
52201
52255
|
import_node_fs43.default.writeFileSync(projectionSource, projectionStorage.source);
|
|
52202
|
-
(0,
|
|
52256
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52203
52257
|
clang,
|
|
52204
52258
|
[...projection.clangOptions, "-c", projectionSource, "-o", projectionObject],
|
|
52205
52259
|
{
|
|
@@ -52376,7 +52430,7 @@ function discoverGuestLinkInputs(options) {
|
|
|
52376
52430
|
const trace = import_node_path39.default.join(options.directory, "preselection-inputs.txt");
|
|
52377
52431
|
const traceOutput = import_node_fs43.default.openSync(trace, "w");
|
|
52378
52432
|
try {
|
|
52379
|
-
(0,
|
|
52433
|
+
(0, import_node_child_process25.execFileSync)(options.wasmLd, [`@${response}`], {
|
|
52380
52434
|
stdio: ["ignore", traceOutput, "pipe"]
|
|
52381
52435
|
});
|
|
52382
52436
|
} finally {
|
|
@@ -52534,7 +52588,7 @@ function verifyGuestSymbolScopes(options) {
|
|
|
52534
52588
|
const tracePath = import_node_path39.default.join(options.directory, "scope-trace.txt");
|
|
52535
52589
|
const traceOutput = import_node_fs43.default.openSync(tracePath, "w");
|
|
52536
52590
|
try {
|
|
52537
|
-
(0,
|
|
52591
|
+
(0, import_node_child_process25.execFileSync)(options.wasmLd, [`@${response}`], {
|
|
52538
52592
|
stdio: ["ignore", traceOutput, "pipe"]
|
|
52539
52593
|
});
|
|
52540
52594
|
} finally {
|
|
@@ -52800,11 +52854,11 @@ function linkPrunedGuestImages(options) {
|
|
|
52800
52854
|
if (!result) throw new Error("guest link did not receive pruned inputs");
|
|
52801
52855
|
return result;
|
|
52802
52856
|
}
|
|
52803
|
-
var
|
|
52857
|
+
var import_node_child_process25, import_node_fs43, import_node_path39, import_node_string_decoder;
|
|
52804
52858
|
var init_swift_guest_link = __esm({
|
|
52805
52859
|
"src/swift-guest-link.ts"() {
|
|
52806
52860
|
"use strict";
|
|
52807
|
-
|
|
52861
|
+
import_node_child_process25 = require("node:child_process");
|
|
52808
52862
|
import_node_fs43 = __toESM(require("node:fs"), 1);
|
|
52809
52863
|
import_node_path39 = __toESM(require("node:path"), 1);
|
|
52810
52864
|
import_node_string_decoder = require("node:string_decoder");
|
|
@@ -52908,7 +52962,7 @@ function sourceGuestClangLinkOptions(options) {
|
|
|
52908
52962
|
throw new Error(`missing clang ${flag} for ${file}`);
|
|
52909
52963
|
args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
|
|
52910
52964
|
}
|
|
52911
|
-
(0,
|
|
52965
|
+
(0, import_node_child_process26.execFileSync)(command.args[0], [...args, "-S", "-emit-llvm"], { stdio: "inherit" });
|
|
52912
52966
|
const flags = clangIrLinkOptions((0, import_node_fs44.readFileSync)(output2, "utf8"));
|
|
52913
52967
|
for (let index2 = 0; index2 < flags.length; index2++) {
|
|
52914
52968
|
const flag = flags[index2];
|
|
@@ -53046,7 +53100,7 @@ function sourceGuestRuntimeLinks(options) {
|
|
|
53046
53100
|
response,
|
|
53047
53101
|
image.objects.map((file) => JSON.stringify(file)).join("\n") + "\n"
|
|
53048
53102
|
);
|
|
53049
|
-
const autolink = image.objects.length ? (0,
|
|
53103
|
+
const autolink = image.objects.length ? (0, import_node_child_process26.execFileSync)(
|
|
53050
53104
|
import_node_path40.default.join(options.toolchainBin, "swift-autolink-extract"),
|
|
53051
53105
|
[`@${response}`, "-o", "-"],
|
|
53052
53106
|
{ encoding: "utf8" }
|
|
@@ -53139,11 +53193,11 @@ function logicalGuestLinkOptions(args, identities, roots) {
|
|
|
53139
53193
|
}
|
|
53140
53194
|
return output2;
|
|
53141
53195
|
}
|
|
53142
|
-
var
|
|
53196
|
+
var import_node_child_process26, import_node_crypto21, import_node_fs44, import_node_path40, CLANG_TARGET_MODULE_WRAPPER;
|
|
53143
53197
|
var init_swift_guest_source_inputs = __esm({
|
|
53144
53198
|
"src/swift-guest-source-inputs.ts"() {
|
|
53145
53199
|
"use strict";
|
|
53146
|
-
|
|
53200
|
+
import_node_child_process26 = require("node:child_process");
|
|
53147
53201
|
import_node_crypto21 = require("node:crypto");
|
|
53148
53202
|
import_node_fs44 = require("node:fs");
|
|
53149
53203
|
import_node_path40 = __toESM(require("node:path"), 1);
|
|
@@ -53412,7 +53466,7 @@ async function runWasmOpt(file, output2, optimize, skipPasses, binary2) {
|
|
|
53412
53466
|
const thunks = `${output2}.thunks.wat`;
|
|
53413
53467
|
(0, import_node_fs45.writeFileSync)(guest, narrowed.module);
|
|
53414
53468
|
(0, import_node_fs45.writeFileSync)(thunks, narrowed.thunks);
|
|
53415
|
-
await (0, import_node_util7.promisify)(
|
|
53469
|
+
await (0, import_node_util7.promisify)(import_node_child_process27.execFile)((0, import_node_path41.join)((0, import_node_path41.dirname)(binary2), "wasm-merge"), [
|
|
53416
53470
|
...features,
|
|
53417
53471
|
...names,
|
|
53418
53472
|
guest,
|
|
@@ -53471,11 +53525,11 @@ async function lowerWasm(file, output2, options) {
|
|
|
53471
53525
|
await installWasmOpt()
|
|
53472
53526
|
);
|
|
53473
53527
|
}
|
|
53474
|
-
var
|
|
53528
|
+
var import_node_child_process27, import_node_fs45, import_node_path41, import_node_util7, import_wasm_opt, FEATURES, KEEP_WASM_NAMES, LOWERING, WASM_LOWER_IDENTITY, PINNED_BINARYEN_VERSION, BINARYEN_RELEASES;
|
|
53475
53529
|
var init_wasm_optimize = __esm({
|
|
53476
53530
|
"src/wasm-optimize.ts"() {
|
|
53477
53531
|
"use strict";
|
|
53478
|
-
|
|
53532
|
+
import_node_child_process27 = require("node:child_process");
|
|
53479
53533
|
import_node_fs45 = require("node:fs");
|
|
53480
53534
|
import_node_path41 = require("node:path");
|
|
53481
53535
|
import_node_util7 = require("node:util");
|
|
@@ -53549,6 +53603,12 @@ async function compileGuestLink(options) {
|
|
|
53549
53603
|
(target) => target.productName.endsWith(".framework") ? [target.productName.slice(0, -10)] : []
|
|
53550
53604
|
)
|
|
53551
53605
|
);
|
|
53606
|
+
const sourceLibraries = new Set(
|
|
53607
|
+
options.graph.targets.flatMap((target) => {
|
|
53608
|
+
const library = /^lib(.+)\.(?:a|dylib)$/.exec(target.productName);
|
|
53609
|
+
return library ? [library[1]] : [];
|
|
53610
|
+
})
|
|
53611
|
+
);
|
|
53552
53612
|
const entry = targets.get(options.graph.entry);
|
|
53553
53613
|
if (!entry) throw new Error("guest source graph has no entry");
|
|
53554
53614
|
const imageBuildVersion = (value) => {
|
|
@@ -53568,7 +53628,7 @@ async function compileGuestLink(options) {
|
|
|
53568
53628
|
stubSource,
|
|
53569
53629
|
'#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
|
|
53570
53630
|
);
|
|
53571
|
-
(0,
|
|
53631
|
+
(0, import_node_child_process28.execFileSync)(
|
|
53572
53632
|
import_node_path42.default.join(options.toolchainBin, "clang"),
|
|
53573
53633
|
[...clangOptions, "-c", stubSource, "-o", stub],
|
|
53574
53634
|
{ stdio: "pipe" }
|
|
@@ -53718,10 +53778,12 @@ async function compileGuestLink(options) {
|
|
|
53718
53778
|
images: sourceImages.map((image) => ({
|
|
53719
53779
|
id: image.id,
|
|
53720
53780
|
objects: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => artifact.path),
|
|
53721
|
-
// a `-framework Name` for a
|
|
53722
|
-
// that
|
|
53781
|
+
// a `-framework Name` or `-lname` for a product the source graph
|
|
53782
|
+
// builds links that product's own target, which the plan already holds
|
|
53723
53783
|
linkerFlags: image.members.flatMap((id) => targets.get(id).linkerFlags).filter(
|
|
53724
|
-
(flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? ""))
|
|
53784
|
+
(flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? "")) && !sourceLibraries.has(
|
|
53785
|
+
flag.startsWith("-l") && flag.length > 2 ? flag.slice(2) : flags[index - 1] === "-l" ? flag : ""
|
|
53786
|
+
) && !(flag === "-l" && sourceLibraries.has(flags[index + 1] ?? ""))
|
|
53725
53787
|
),
|
|
53726
53788
|
clangLinkOptions: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => ({
|
|
53727
53789
|
object: import_node_path42.default.resolve(rewritten.get(artifact.path) ?? artifact.path),
|
|
@@ -53883,11 +53945,11 @@ async function compileGuestLink(options) {
|
|
|
53883
53945
|
});
|
|
53884
53946
|
(0, import_node_fs46.writeFileSync)(options.optimized, finalized.wasm);
|
|
53885
53947
|
}
|
|
53886
|
-
var
|
|
53948
|
+
var import_node_child_process28, import_node_fs46, import_node_path42;
|
|
53887
53949
|
var init_swift_guest_compile = __esm({
|
|
53888
53950
|
"src/swift-guest-compile.ts"() {
|
|
53889
53951
|
"use strict";
|
|
53890
|
-
|
|
53952
|
+
import_node_child_process28 = require("node:child_process");
|
|
53891
53953
|
import_node_fs46 = require("node:fs");
|
|
53892
53954
|
import_node_path42 = __toESM(require("node:path"), 1);
|
|
53893
53955
|
init_swift_guest_archive();
|
|
@@ -53975,7 +54037,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
53975
54037
|
const cacheId = `${quality}:${key2}`;
|
|
53976
54038
|
const cached4 = brotliMemoryCache.get(cacheId);
|
|
53977
54039
|
if (cached4) return cached4;
|
|
53978
|
-
const dir = import_node_path43.default.join(
|
|
54040
|
+
const dir = import_node_path43.default.join(import_node_os9.default.homedir(), ".peach", "cache", "swift-brotli");
|
|
53979
54041
|
const file = import_node_path43.default.join(dir, `${key2}${quality === 11 ? "" : "-q4"}.br`);
|
|
53980
54042
|
let compressed;
|
|
53981
54043
|
try {
|
|
@@ -54109,7 +54171,7 @@ function swiftIcuAddress(icu) {
|
|
|
54109
54171
|
function swiftIcuPacked(icu) {
|
|
54110
54172
|
return memo(packedFiles, icu.sha256, async () => {
|
|
54111
54173
|
const file = import_node_path43.default.join(
|
|
54112
|
-
|
|
54174
|
+
import_node_os9.default.homedir(),
|
|
54113
54175
|
".peach",
|
|
54114
54176
|
"cache",
|
|
54115
54177
|
"swift-brotli",
|
|
@@ -54136,21 +54198,21 @@ async function swiftIcuBundleAsset(icu) {
|
|
|
54136
54198
|
contentType: "application/octet-stream"
|
|
54137
54199
|
};
|
|
54138
54200
|
}
|
|
54139
|
-
var
|
|
54201
|
+
var import_node_child_process29, import_node_crypto22, import_node_fs47, import_promises4, import_node_os9, import_node_path43, import_node_util8, import_node_zlib2, run6, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, brotliMemoryCache, packedFiles;
|
|
54140
54202
|
var init_swift_icu = __esm({
|
|
54141
54203
|
"src/swift-icu.ts"() {
|
|
54142
54204
|
"use strict";
|
|
54143
|
-
|
|
54205
|
+
import_node_child_process29 = require("node:child_process");
|
|
54144
54206
|
import_node_crypto22 = require("node:crypto");
|
|
54145
54207
|
import_node_fs47 = require("node:fs");
|
|
54146
54208
|
import_promises4 = require("node:fs/promises");
|
|
54147
|
-
|
|
54209
|
+
import_node_os9 = __toESM(require("node:os"), 1);
|
|
54148
54210
|
import_node_path43 = __toESM(require("node:path"), 1);
|
|
54149
54211
|
import_node_util8 = require("node:util");
|
|
54150
54212
|
import_node_zlib2 = require("node:zlib");
|
|
54151
54213
|
init_icuData();
|
|
54152
54214
|
init_swift_toolchain();
|
|
54153
|
-
run6 = (0, import_node_util8.promisify)(
|
|
54215
|
+
run6 = (0, import_node_util8.promisify)(import_node_child_process29.execFile);
|
|
54154
54216
|
deflate = (0, import_node_util8.promisify)(import_node_zlib2.gzip);
|
|
54155
54217
|
compressBrotli = (0, import_node_util8.promisify)(import_node_zlib2.brotliCompress);
|
|
54156
54218
|
inflateGzip = (0, import_node_util8.promisify)(import_node_zlib2.gunzip);
|
|
@@ -54334,7 +54396,7 @@ function prepareSwiftProjectProcess(root, user) {
|
|
|
54334
54396
|
(0, import_node_fs49.mkdirSync)(tmp, { recursive: true });
|
|
54335
54397
|
const caches = ["cache", "config", "security"].map((name3) => import_node_path45.default.join(swiftpm, name3));
|
|
54336
54398
|
for (const directory2 of caches) (0, import_node_fs49.mkdirSync)(directory2, { recursive: true });
|
|
54337
|
-
(0,
|
|
54399
|
+
(0, import_node_child_process30.execFileSync)("chown", ["-R", "-P", `${user.uid}:${user.gid}`, root, home]);
|
|
54338
54400
|
(0, import_node_fs49.chmodSync)(root, 448);
|
|
54339
54401
|
(0, import_node_fs49.chmodSync)(home, 448);
|
|
54340
54402
|
return {
|
|
@@ -54357,7 +54419,7 @@ function prepareSwiftProjectProcess(root, user) {
|
|
|
54357
54419
|
};
|
|
54358
54420
|
}
|
|
54359
54421
|
function endSwiftProjectProcesses(user) {
|
|
54360
|
-
(0,
|
|
54422
|
+
(0, import_node_child_process30.execFileSync)("sh", ["-c", "kill -s KILL -- -1 2>/dev/null || true"], {
|
|
54361
54423
|
uid: user.uid,
|
|
54362
54424
|
gid: user.gid
|
|
54363
54425
|
});
|
|
@@ -54384,11 +54446,11 @@ function removeProjectLinks(root) {
|
|
|
54384
54446
|
}
|
|
54385
54447
|
}
|
|
54386
54448
|
}
|
|
54387
|
-
var
|
|
54449
|
+
var import_node_child_process30, import_node_fs49, import_node_path45;
|
|
54388
54450
|
var init_swift_project_user = __esm({
|
|
54389
54451
|
"src/swift-project-user.ts"() {
|
|
54390
54452
|
"use strict";
|
|
54391
|
-
|
|
54453
|
+
import_node_child_process30 = require("node:child_process");
|
|
54392
54454
|
import_node_fs49 = require("node:fs");
|
|
54393
54455
|
import_node_path45 = __toESM(require("node:path"), 1);
|
|
54394
54456
|
}
|
|
@@ -54396,7 +54458,7 @@ var init_swift_project_user = __esm({
|
|
|
54396
54458
|
|
|
54397
54459
|
// src/swift-reproducible.ts
|
|
54398
54460
|
function swiftReproducibleBuildFlags(roots) {
|
|
54399
|
-
return [[
|
|
54461
|
+
return [[import_node_os10.default.homedir(), "home"], ...roots].flatMap(
|
|
54400
54462
|
([root, name3]) => [.../* @__PURE__ */ new Set([root, (0, import_node_fs50.realpathSync)(root)])].map((from) => `${from}=/peach/${name3}`)
|
|
54401
54463
|
).flatMap((map2) => [
|
|
54402
54464
|
"-Xswiftc",
|
|
@@ -54409,12 +54471,12 @@ function swiftReproducibleBuildFlags(roots) {
|
|
|
54409
54471
|
`-ffile-prefix-map=${map2}`
|
|
54410
54472
|
]);
|
|
54411
54473
|
}
|
|
54412
|
-
var import_node_fs50,
|
|
54474
|
+
var import_node_fs50, import_node_os10;
|
|
54413
54475
|
var init_swift_reproducible = __esm({
|
|
54414
54476
|
"src/swift-reproducible.ts"() {
|
|
54415
54477
|
"use strict";
|
|
54416
54478
|
import_node_fs50 = require("node:fs");
|
|
54417
|
-
|
|
54479
|
+
import_node_os10 = __toESM(require("node:os"), 1);
|
|
54418
54480
|
}
|
|
54419
54481
|
});
|
|
54420
54482
|
|
|
@@ -54501,11 +54563,11 @@ function groupAlive(table, leader) {
|
|
|
54501
54563
|
return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
|
|
54502
54564
|
}
|
|
54503
54565
|
function swiftRootLocksDir() {
|
|
54504
|
-
return import_node_path46.default.join((0,
|
|
54566
|
+
return import_node_path46.default.join((0, import_node_os11.homedir)(), ".peach", "cache", "swift-root-locks");
|
|
54505
54567
|
}
|
|
54506
54568
|
function withCocoaPodsCacheLock(work) {
|
|
54507
54569
|
return withSwiftRootLock(
|
|
54508
|
-
process.env.CP_CACHE_DIR || import_node_path46.default.join((0,
|
|
54570
|
+
process.env.CP_CACHE_DIR || import_node_path46.default.join((0, import_node_os11.homedir)(), "Library/Caches/CocoaPods"),
|
|
54509
54571
|
work
|
|
54510
54572
|
);
|
|
54511
54573
|
}
|
|
@@ -54582,7 +54644,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
54582
54644
|
}
|
|
54583
54645
|
},
|
|
54584
54646
|
spawn(command, args, options, companion) {
|
|
54585
|
-
const child = (0,
|
|
54647
|
+
const child = (0, import_node_child_process31.spawn)(
|
|
54586
54648
|
"/bin/sh",
|
|
54587
54649
|
["-c", 'IFS= read -r go || exit 1; exec "$@" </dev/null', "sh", command, ...args],
|
|
54588
54650
|
{ ...options, detached: true, stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -54612,14 +54674,14 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
54612
54674
|
(0, import_node_fs51.writeFileSync)(import_node_path46.default.join(directory2, name2(held, "released")), "");
|
|
54613
54675
|
}
|
|
54614
54676
|
}
|
|
54615
|
-
var
|
|
54677
|
+
var import_node_child_process31, import_node_crypto23, import_node_fs51, import_node_os11, import_node_path46, POLL_MS, INSPECT_ATTEMPTS, START_TOLERANCE_MS, name2;
|
|
54616
54678
|
var init_swift_root_lock = __esm({
|
|
54617
54679
|
"src/swift-root-lock.ts"() {
|
|
54618
54680
|
"use strict";
|
|
54619
|
-
|
|
54681
|
+
import_node_child_process31 = require("node:child_process");
|
|
54620
54682
|
import_node_crypto23 = require("node:crypto");
|
|
54621
54683
|
import_node_fs51 = require("node:fs");
|
|
54622
|
-
|
|
54684
|
+
import_node_os11 = require("node:os");
|
|
54623
54685
|
import_node_path46 = __toESM(require("node:path"), 1);
|
|
54624
54686
|
init_process_group();
|
|
54625
54687
|
init_process_table();
|
|
@@ -54634,7 +54696,7 @@ var init_swift_root_lock = __esm({
|
|
|
54634
54696
|
function compileUniformTypeConstants(args) {
|
|
54635
54697
|
const source = import_node_path47.default.join(args.packageRoot, "runtime/UniformTypeIdentifiersConstants.m");
|
|
54636
54698
|
const object7 = import_node_path47.default.join(args.out, "UniformTypeIdentifiers-NativeConstants.o");
|
|
54637
|
-
(0,
|
|
54699
|
+
(0, import_node_child_process32.execFileSync)(
|
|
54638
54700
|
import_node_path47.default.join(args.bin, "clang"),
|
|
54639
54701
|
[
|
|
54640
54702
|
"--target=wasm64-unknown-wasip1",
|
|
@@ -54655,11 +54717,11 @@ function compileUniformTypeConstants(args) {
|
|
|
54655
54717
|
);
|
|
54656
54718
|
return object7;
|
|
54657
54719
|
}
|
|
54658
|
-
var
|
|
54720
|
+
var import_node_child_process32, import_node_path47;
|
|
54659
54721
|
var init_swift_uniform_type_constants = __esm({
|
|
54660
54722
|
"src/swift-uniform-type-constants.ts"() {
|
|
54661
54723
|
"use strict";
|
|
54662
|
-
|
|
54724
|
+
import_node_child_process32 = require("node:child_process");
|
|
54663
54725
|
import_node_path47 = __toESM(require("node:path"), 1);
|
|
54664
54726
|
init_swift_objc_runtime();
|
|
54665
54727
|
init_swift_objc_standin();
|
|
@@ -54799,7 +54861,7 @@ async function runCompiler(command, args, options, stream = false, quiet) {
|
|
|
54799
54861
|
detached: true,
|
|
54800
54862
|
stdio: ["ignore", "pipe", "pipe"]
|
|
54801
54863
|
};
|
|
54802
|
-
const child = options.lease ? options.lease.spawn(command, args, launch2, options.frameworkLease) : (0,
|
|
54864
|
+
const child = options.lease ? options.lease.spawn(command, args, launch2, options.frameworkLease) : (0, import_node_child_process33.spawn)(command, args, launch2);
|
|
54803
54865
|
let stopping;
|
|
54804
54866
|
try {
|
|
54805
54867
|
return await new Promise((resolve14, reject) => {
|
|
@@ -54877,7 +54939,7 @@ function swiftBuildJobs() {
|
|
|
54877
54939
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
54878
54940
|
return Math.min(
|
|
54879
54941
|
process.platform === "darwin" ? Infinity : 4,
|
|
54880
|
-
Math.max(1, Math.floor(
|
|
54942
|
+
Math.max(1, Math.floor(import_node_os12.default.availableParallelism() / 2)),
|
|
54881
54943
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
54882
54944
|
);
|
|
54883
54945
|
}
|
|
@@ -55331,7 +55393,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin) {
|
|
|
55331
55393
|
const key2 = JSON.stringify([toolchainBin, sdk2, options]);
|
|
55332
55394
|
const cached4 = sdkPaths.get(key2);
|
|
55333
55395
|
if (cached4) return cached4;
|
|
55334
|
-
const configuration = (0,
|
|
55396
|
+
const configuration = (0, import_node_child_process33.execFileSync)(
|
|
55335
55397
|
import_node_path50.default.join(toolchainBin, "swift"),
|
|
55336
55398
|
[
|
|
55337
55399
|
"sdk",
|
|
@@ -59633,14 +59695,14 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
59633
59695
|
options.signal
|
|
59634
59696
|
);
|
|
59635
59697
|
}
|
|
59636
|
-
var
|
|
59698
|
+
var import_node_child_process33, import_node_crypto24, import_node_fs54, import_node_os12, import_node_path50, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, objcEnumerations, sdkDeclarationOwners, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, FOUNDATION_IMPLICIT_MODULES, PRECONCURRENCY_FOUNDATION_IMPORT, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, DIRECTIVE, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, cPredefineTable, cPredefineCache, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
|
|
59637
59699
|
var init_swift_compile = __esm({
|
|
59638
59700
|
"src/swift-compile.ts"() {
|
|
59639
59701
|
"use strict";
|
|
59640
|
-
|
|
59702
|
+
import_node_child_process33 = require("node:child_process");
|
|
59641
59703
|
import_node_crypto24 = require("node:crypto");
|
|
59642
59704
|
import_node_fs54 = require("node:fs");
|
|
59643
|
-
|
|
59705
|
+
import_node_os12 = __toESM(require("node:os"), 1);
|
|
59644
59706
|
import_node_path50 = __toESM(require("node:path"), 1);
|
|
59645
59707
|
v5 = __toESM(require("valibot"), 1);
|
|
59646
59708
|
init_admitted_mac_build();
|
|
@@ -59871,7 +59933,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
59871
59933
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
59872
59934
|
MULTI_MANIFEST_VERSION = 68;
|
|
59873
59935
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
59874
|
-
compilerSourceDigest = true ? "
|
|
59936
|
+
compilerSourceDigest = true ? "ad311d7f868d4920f32f2ed00502f49f84fb83ae19817180a70ef5f799334169" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
59875
59937
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
59876
59938
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
59877
59939
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -60860,7 +60922,7 @@ async function swiftDistributionRoot(signal) {
|
|
|
60860
60922
|
}
|
|
60861
60923
|
async function installSwiftToolchain(release, sdk2, signal, compilerOnly = false) {
|
|
60862
60924
|
const root = import_node_path52.default.resolve(swiftToolchainBin(release), "../..");
|
|
60863
|
-
const owned = process.platform === "darwin" ? import_node_path52.default.join(
|
|
60925
|
+
const owned = process.platform === "darwin" ? import_node_path52.default.join(import_node_os13.default.homedir(), "Library/Developer/Toolchains", `${release}.xctoolchain`) : import_node_path52.default.join(rnxHomeDir(), "swift", "toolchains", release);
|
|
60864
60926
|
const selectedCompiler = process.platform === "darwin" && import_node_fs56.default.existsSync(import_node_path52.default.join(root, "usr/bin/swift"));
|
|
60865
60927
|
if (release.includes("-custom-") && root === owned && !selectedCompiler && !swiftCompilerReady(release)) {
|
|
60866
60928
|
const archive = swiftHostCompilerArchive(release);
|
|
@@ -60963,12 +61025,12 @@ function swiftModuleToolchain(root) {
|
|
|
60963
61025
|
const { release } = swiftModuleCompiler(root);
|
|
60964
61026
|
return { release, toolchainBin: swiftToolchain(release, swiftModuleSdk(root)) };
|
|
60965
61027
|
}
|
|
60966
|
-
var import_node_fs56,
|
|
61028
|
+
var import_node_fs56, import_node_os13, import_node_path52, SWIFT_ENDPOINT_ENV, DEFAULT_SWIFT_ENDPOINT, installs, staleWarned;
|
|
60967
61029
|
var init_swift_distribution = __esm({
|
|
60968
61030
|
"src/swift-distribution.ts"() {
|
|
60969
61031
|
"use strict";
|
|
60970
61032
|
import_node_fs56 = __toESM(require("node:fs"), 1);
|
|
60971
|
-
|
|
61033
|
+
import_node_os13 = __toESM(require("node:os"), 1);
|
|
60972
61034
|
import_node_path52 = __toESM(require("node:path"), 1);
|
|
60973
61035
|
init_src();
|
|
60974
61036
|
init_linux_browser_libs();
|
|
@@ -61059,7 +61121,7 @@ function dumpInputs(dir) {
|
|
|
61059
61121
|
path: command,
|
|
61060
61122
|
realpath: import_node_fs57.default.realpathSync(command),
|
|
61061
61123
|
sha256: (0, import_node_crypto26.createHash)("sha256").update(import_node_fs57.default.readFileSync(command)).digest("hex"),
|
|
61062
|
-
version: (0,
|
|
61124
|
+
version: (0, import_node_child_process34.execFileSync)(command, ["--version"], {
|
|
61063
61125
|
encoding: "utf8",
|
|
61064
61126
|
env: swiftEnvironment(),
|
|
61065
61127
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -61122,7 +61184,7 @@ function dump(dir, requirePrepared = false) {
|
|
|
61122
61184
|
if (requirePrepared) throw new SwiftManifestPreparationRequired(dir);
|
|
61123
61185
|
let output2;
|
|
61124
61186
|
try {
|
|
61125
|
-
output2 = (0,
|
|
61187
|
+
output2 = (0, import_node_child_process34.execFileSync)(
|
|
61126
61188
|
command,
|
|
61127
61189
|
[
|
|
61128
61190
|
"package",
|
|
@@ -61462,7 +61524,7 @@ let package = Package(
|
|
|
61462
61524
|
]
|
|
61463
61525
|
)
|
|
61464
61526
|
`;
|
|
61465
|
-
const dir = import_node_fs57.default.mkdtempSync(import_node_path53.default.join(
|
|
61527
|
+
const dir = import_node_fs57.default.mkdtempSync(import_node_path53.default.join(import_node_os14.default.tmpdir(), "peach-resolve-"));
|
|
61466
61528
|
import_node_fs57.default.writeFileSync(import_node_path53.default.join(dir, "Package.swift"), manifest);
|
|
61467
61529
|
const args = [
|
|
61468
61530
|
"package",
|
|
@@ -61502,7 +61564,7 @@ async function resolveSwiftPackageRequirementsAsync(requirements, destination, s
|
|
|
61502
61564
|
const { dir, args, options, failed, publish } = resolveRequest(requirements);
|
|
61503
61565
|
try {
|
|
61504
61566
|
try {
|
|
61505
|
-
await (0, import_node_util9.promisify)(
|
|
61567
|
+
await (0, import_node_util9.promisify)(import_node_child_process34.execFile)(swiftCommand(), args, { ...options, signal });
|
|
61506
61568
|
} catch (error) {
|
|
61507
61569
|
throw failed(error);
|
|
61508
61570
|
}
|
|
@@ -61543,14 +61605,14 @@ function swiftTargetFiles(manifest, target) {
|
|
|
61543
61605
|
}
|
|
61544
61606
|
return [...new Set(files2)].sort();
|
|
61545
61607
|
}
|
|
61546
|
-
var
|
|
61608
|
+
var import_node_child_process34, import_node_crypto26, import_node_fs57, import_node_os14, import_node_path53, import_node_util9, TARGET_TYPES, targetRelative, isTargetType, record, array3, string4, cacheDir3, evaluated, execFileAsync, cachedToolchain, SwiftManifestPreparationRequired, manifestPreparations, GUEST_PLATFORMS, within, requirementClause;
|
|
61547
61609
|
var init_swift_package_manifest = __esm({
|
|
61548
61610
|
"src/swift-package-manifest.ts"() {
|
|
61549
61611
|
"use strict";
|
|
61550
|
-
|
|
61612
|
+
import_node_child_process34 = require("node:child_process");
|
|
61551
61613
|
import_node_crypto26 = require("node:crypto");
|
|
61552
61614
|
import_node_fs57 = __toESM(require("node:fs"), 1);
|
|
61553
|
-
|
|
61615
|
+
import_node_os14 = __toESM(require("node:os"), 1);
|
|
61554
61616
|
import_node_path53 = __toESM(require("node:path"), 1);
|
|
61555
61617
|
import_node_util9 = require("node:util");
|
|
61556
61618
|
init_home_paths();
|
|
@@ -61574,7 +61636,7 @@ var init_swift_package_manifest = __esm({
|
|
|
61574
61636
|
string4 = (value) => typeof value === "string" ? value : void 0;
|
|
61575
61637
|
cacheDir3 = import_node_path53.default.join(cacheDir(), "swift-manifests");
|
|
61576
61638
|
evaluated = /* @__PURE__ */ new Map();
|
|
61577
|
-
execFileAsync = (0, import_node_util9.promisify)(
|
|
61639
|
+
execFileAsync = (0, import_node_util9.promisify)(import_node_child_process34.execFile);
|
|
61578
61640
|
SwiftManifestPreparationRequired = class extends Error {
|
|
61579
61641
|
constructor(dir) {
|
|
61580
61642
|
super(`swift package manifest requires preparation: ${dir}`);
|
|
@@ -62259,7 +62321,7 @@ function loadProject(xcodeproj) {
|
|
|
62259
62321
|
function selectedDeveloperDir() {
|
|
62260
62322
|
developerDir ??= process.platform === "darwin" ? (
|
|
62261
62323
|
// runner-toolchain-platform: darwin
|
|
62262
|
-
(0,
|
|
62324
|
+
(0, import_node_child_process35.execFileSync)("xcode-select", ["-p"], {
|
|
62263
62325
|
encoding: "utf8",
|
|
62264
62326
|
stdio: ["ignore", "pipe", "pipe"]
|
|
62265
62327
|
}).trim()
|
|
@@ -62663,7 +62725,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
62663
62725
|
str(phase.shellPath) ?? "/bin/sh",
|
|
62664
62726
|
str(phase.shellScript) ?? ""
|
|
62665
62727
|
);
|
|
62666
|
-
(0,
|
|
62728
|
+
(0, import_node_child_process35.execFileSync)(shell, args, {
|
|
62667
62729
|
cwd: project2.projectDir,
|
|
62668
62730
|
env,
|
|
62669
62731
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -62771,7 +62833,7 @@ ${output2}`
|
|
|
62771
62833
|
const families = settings("TARGETED_DEVICE_FAMILY").split(",").map((value) => value.trim());
|
|
62772
62834
|
if (families.includes("1")) args.push("--target-device", "iphone");
|
|
62773
62835
|
if (families.includes("2")) args.push("--target-device", "ipad");
|
|
62774
|
-
(0,
|
|
62836
|
+
(0, import_node_child_process35.execFileSync)("xcrun", args, {
|
|
62775
62837
|
cwd: project2.projectDir,
|
|
62776
62838
|
stdio: ["ignore", "pipe", "pipe"],
|
|
62777
62839
|
timeout: runScriptTimeoutMs
|
|
@@ -62816,7 +62878,7 @@ ${output2}`
|
|
|
62816
62878
|
args.push("-swiftVersion", settings("SWIFT_VERSION") || "5.0");
|
|
62817
62879
|
if (settings("DEFINES_MODULE") === "YES")
|
|
62818
62880
|
args.push("-moduleName", settings("PRODUCT_MODULE_NAME"));
|
|
62819
|
-
(0,
|
|
62881
|
+
(0, import_node_child_process35.execFileSync)("xcrun", args, {
|
|
62820
62882
|
cwd: project2.projectDir,
|
|
62821
62883
|
stdio: ["ignore", "pipe", "pipe"],
|
|
62822
62884
|
timeout: runScriptTimeoutMs
|
|
@@ -62958,7 +63020,7 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
62958
63020
|
function readXcodeExtensionTargets(input) {
|
|
62959
63021
|
return workspaceProjects(import_node_fs58.default.realpathSync.native(input)).projects.flatMap(
|
|
62960
63022
|
(project2) => projectTargets(project2).flatMap((ref) => {
|
|
62961
|
-
if (ref.target.productType !==
|
|
63023
|
+
if (ref.target.productType !== APP_EXTENSION) return [];
|
|
62962
63024
|
const name3 = str(ref.target.name) ?? ref.id;
|
|
62963
63025
|
const { get, keys, xcconfigs } = targetSettings(
|
|
62964
63026
|
ref,
|
|
@@ -63155,7 +63217,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
63155
63217
|
options.installedPods
|
|
63156
63218
|
);
|
|
63157
63219
|
const allTargets = projects2.flatMap(projectTargets);
|
|
63158
|
-
const appTargets = allTargets.filter(
|
|
63220
|
+
const appTargets = allTargets.filter(
|
|
63221
|
+
(ref) => isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
|
|
63222
|
+
);
|
|
63159
63223
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
63160
63224
|
const container = import_node_path55.default.basename(xcodeprojOrWorkspace);
|
|
63161
63225
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
@@ -63219,7 +63283,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
63219
63283
|
const words2 = settingList(flags);
|
|
63220
63284
|
const linked = new Set(linkedTargets(ref).map((link) => link.target));
|
|
63221
63285
|
return words2.flatMap((word, index) => {
|
|
63222
|
-
const
|
|
63286
|
+
const library = word.startsWith("-l") && word.length > 2 ? word.slice(2) : words2[index - 1] === "-l" ? word : void 0;
|
|
63287
|
+
const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : library ? byProduct.get(`lib${library}.a`) ?? byProduct.get(`lib${library}.dylib`) : void 0;
|
|
63223
63288
|
if (!target || target === ref || linked.has(target)) return [];
|
|
63224
63289
|
linked.add(target);
|
|
63225
63290
|
return [{ target, attributes: [] }];
|
|
@@ -64221,11 +64286,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
64221
64286
|
cocoapods
|
|
64222
64287
|
};
|
|
64223
64288
|
}
|
|
64224
|
-
var
|
|
64289
|
+
var import_node_child_process35, import_node_crypto27, import_node_fs58, import_node_path55, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
64225
64290
|
var init_xcode_project = __esm({
|
|
64226
64291
|
"src/xcode-project.ts"() {
|
|
64227
64292
|
"use strict";
|
|
64228
|
-
|
|
64293
|
+
import_node_child_process35 = require("node:child_process");
|
|
64229
64294
|
import_node_crypto27 = require("node:crypto");
|
|
64230
64295
|
import_node_fs58 = __toESM(require("node:fs"), 1);
|
|
64231
64296
|
import_node_path55 = __toESM(require("node:path"), 1);
|
|
@@ -64260,6 +64325,7 @@ var init_xcode_project = __esm({
|
|
|
64260
64325
|
"compiler-default"
|
|
64261
64326
|
]);
|
|
64262
64327
|
APPLICATION = "com.apple.product-type.application";
|
|
64328
|
+
APP_EXTENSION = "com.apple.product-type.app-extension";
|
|
64263
64329
|
RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
64264
64330
|
PRODUCT_MACH_O_TYPES = {
|
|
64265
64331
|
"com.apple.product-type.application": "mh_execute",
|
|
@@ -64365,7 +64431,7 @@ function readExpoConfig(projectRoot) {
|
|
|
64365
64431
|
const directory2 = resultDirectory();
|
|
64366
64432
|
const resultPath = import_node_path56.default.join(directory2, "config.json");
|
|
64367
64433
|
try {
|
|
64368
|
-
const child = (0,
|
|
64434
|
+
const child = (0, import_node_child_process36.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
64369
64435
|
cwd: projectRoot,
|
|
64370
64436
|
encoding: "utf8",
|
|
64371
64437
|
stdio: ["ignore", "ignore", "pipe"],
|
|
@@ -64383,7 +64449,7 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
64383
64449
|
const directory2 = resultDirectory();
|
|
64384
64450
|
const resultPath = import_node_path56.default.join(directory2, "config.json");
|
|
64385
64451
|
try {
|
|
64386
|
-
const child = (0,
|
|
64452
|
+
const child = (0, import_node_child_process36.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
64387
64453
|
cwd: projectRoot,
|
|
64388
64454
|
stdio: ["ignore", "ignore", "pipe"],
|
|
64389
64455
|
timeout: EXPO_CONFIG_TIMEOUT_MS
|
|
@@ -64881,14 +64947,14 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
64881
64947
|
}
|
|
64882
64948
|
return result;
|
|
64883
64949
|
}
|
|
64884
|
-
var
|
|
64950
|
+
var import_node_child_process36, import_node_fs59, import_node_module5, import_node_os15, import_node_path56, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory, HELPER_DEPTH, stripComments;
|
|
64885
64951
|
var init_native_firebase_config = __esm({
|
|
64886
64952
|
"src/native-firebase-config.ts"() {
|
|
64887
64953
|
"use strict";
|
|
64888
|
-
|
|
64954
|
+
import_node_child_process36 = require("node:child_process");
|
|
64889
64955
|
import_node_fs59 = __toESM(require("node:fs"), 1);
|
|
64890
64956
|
import_node_module5 = require("node:module");
|
|
64891
|
-
|
|
64957
|
+
import_node_os15 = __toESM(require("node:os"), 1);
|
|
64892
64958
|
import_node_path56 = __toESM(require("node:path"), 1);
|
|
64893
64959
|
init_is_record();
|
|
64894
64960
|
init_plist();
|
|
@@ -64910,7 +64976,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
64910
64976
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
64911
64977
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
64912
64978
|
EXPO_CONFIG_TIMEOUT_MS = 3e4;
|
|
64913
|
-
resultDirectory = () => import_node_fs59.default.mkdtempSync(import_node_path56.default.join(
|
|
64979
|
+
resultDirectory = () => import_node_fs59.default.mkdtempSync(import_node_path56.default.join(import_node_os15.default.tmpdir(), "peach-expo-config-"));
|
|
64914
64980
|
HELPER_DEPTH = 3;
|
|
64915
64981
|
stripComments = (raw2) => raw2.replace(
|
|
64916
64982
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -64969,7 +65035,7 @@ async function preparedNativeInventory(app, selected, signal) {
|
|
|
64969
65035
|
paths: [import_node_path58.default.dirname(require4.resolve("expo/package.json"))]
|
|
64970
65036
|
});
|
|
64971
65037
|
const cli = import_node_path58.default.join(import_node_path58.default.dirname(expo), "bin/expo-modules-autolinking.js");
|
|
64972
|
-
const searched = await (0, import_node_util10.promisify)(
|
|
65038
|
+
const searched = await (0, import_node_util10.promisify)(import_node_child_process37.execFile)(
|
|
64973
65039
|
process.execPath,
|
|
64974
65040
|
[cli, "search", ...autolinkerAppleFlags(expo, app), "--json"],
|
|
64975
65041
|
{
|
|
@@ -65028,11 +65094,11 @@ async function preparedNativeInventory(app, selected, signal) {
|
|
|
65028
65094
|
}
|
|
65029
65095
|
return result;
|
|
65030
65096
|
}
|
|
65031
|
-
var
|
|
65097
|
+
var import_node_child_process37, import_node_crypto29, import_node_fs61, import_node_module6, import_node_path58, import_promises5, import_node_util10;
|
|
65032
65098
|
var init_prepared_native_inventory = __esm({
|
|
65033
65099
|
"src/prepared-native-inventory.ts"() {
|
|
65034
65100
|
"use strict";
|
|
65035
|
-
|
|
65101
|
+
import_node_child_process37 = require("node:child_process");
|
|
65036
65102
|
import_node_crypto29 = require("node:crypto");
|
|
65037
65103
|
import_node_fs61 = __toESM(require("node:fs"), 1);
|
|
65038
65104
|
import_node_module6 = require("node:module");
|
|
@@ -65145,12 +65211,12 @@ function compiledSwiftHelper(swift, name3) {
|
|
|
65145
65211
|
try {
|
|
65146
65212
|
import_node_fs63.default.mkdirSync(cacheDir(), { recursive: true });
|
|
65147
65213
|
const source = import_node_path60.default.join(
|
|
65148
|
-
import_node_fs63.default.mkdtempSync(import_node_path60.default.join(
|
|
65214
|
+
import_node_fs63.default.mkdtempSync(import_node_path60.default.join(import_node_os16.default.tmpdir(), `${name3}-`)),
|
|
65149
65215
|
"main.swift"
|
|
65150
65216
|
);
|
|
65151
65217
|
import_node_fs63.default.writeFileSync(source, swift);
|
|
65152
65218
|
try {
|
|
65153
|
-
(0,
|
|
65219
|
+
(0, import_node_child_process38.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
65154
65220
|
} finally {
|
|
65155
65221
|
import_node_fs63.default.rmSync(import_node_path60.default.dirname(source), { recursive: true, force: true });
|
|
65156
65222
|
}
|
|
@@ -65162,14 +65228,14 @@ function compiledSwiftHelper(swift, name3) {
|
|
|
65162
65228
|
);
|
|
65163
65229
|
}
|
|
65164
65230
|
}
|
|
65165
|
-
var
|
|
65231
|
+
var import_node_child_process38, import_node_crypto31, import_node_fs63, import_node_os16, import_node_path60;
|
|
65166
65232
|
var init_swift_helper = __esm({
|
|
65167
65233
|
"src/swift-helper.ts"() {
|
|
65168
65234
|
"use strict";
|
|
65169
|
-
|
|
65235
|
+
import_node_child_process38 = require("node:child_process");
|
|
65170
65236
|
import_node_crypto31 = require("node:crypto");
|
|
65171
65237
|
import_node_fs63 = __toESM(require("node:fs"), 1);
|
|
65172
|
-
|
|
65238
|
+
import_node_os16 = __toESM(require("node:os"), 1);
|
|
65173
65239
|
import_node_path60 = __toESM(require("node:path"), 1);
|
|
65174
65240
|
init_home_paths();
|
|
65175
65241
|
}
|
|
@@ -65330,40 +65396,67 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
|
|
|
65330
65396
|
const steersNative = (relative6) => !relative6.includes(import_node_path62.default.sep) || relative6.startsWith(`patches${import_node_path62.default.sep}`) || nativeDirectories.some(
|
|
65331
65397
|
(directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 + import_node_path62.default.sep)
|
|
65332
65398
|
);
|
|
65333
|
-
const
|
|
65334
|
-
|
|
65335
|
-
|
|
65399
|
+
const steps = [];
|
|
65400
|
+
const unread = [];
|
|
65401
|
+
const walk3 = (directory2) => {
|
|
65402
|
+
const entries = import_node_fs65.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
65403
|
+
for (const entry of entries) {
|
|
65336
65404
|
signal?.throwIfAborted();
|
|
65337
65405
|
const file = import_node_path62.default.join(directory2, entry.name);
|
|
65338
65406
|
const relative6 = import_node_path62.default.relative(root, file);
|
|
65339
65407
|
if (excluded(relative6, entry.isDirectory())) continue;
|
|
65340
|
-
hash.update(`${relative6}\0`);
|
|
65408
|
+
steps.push(() => hash.update(`${relative6}\0`));
|
|
65341
65409
|
if (entry.isSymbolicLink()) {
|
|
65342
|
-
const link = `link\0${
|
|
65343
|
-
|
|
65344
|
-
|
|
65410
|
+
const link = `link\0${import_node_fs65.default.readlinkSync(file)}\0`;
|
|
65411
|
+
steps.push(() => {
|
|
65412
|
+
hash.update(link);
|
|
65413
|
+
if (steersNative(relative6)) native.update(`${relative6}\0${link}`);
|
|
65414
|
+
});
|
|
65345
65415
|
} else if (entry.isDirectory()) {
|
|
65346
|
-
hash.update("directory\0");
|
|
65347
|
-
|
|
65416
|
+
steps.push(() => hash.update("directory\0"));
|
|
65417
|
+
walk3(file);
|
|
65348
65418
|
} else if (entry.isFile()) {
|
|
65349
65419
|
const posix2 = relative6.split(import_node_path62.default.sep).join("/");
|
|
65350
65420
|
if (NATIVE_CONFIG_FILE.test(posix2)) {
|
|
65351
|
-
const bytes =
|
|
65352
|
-
|
|
65353
|
-
|
|
65354
|
-
|
|
65355
|
-
|
|
65356
|
-
|
|
65357
|
-
|
|
65358
|
-
hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
65359
|
-
}
|
|
65360
|
-
if (NATIVE_SOURCE_FILE2.test(posix2) && steersNative(relative6))
|
|
65361
|
-
native.update(`${posix2}\0`);
|
|
65421
|
+
const bytes = import_node_fs65.default.readFileSync(file);
|
|
65422
|
+
steps.push(() => {
|
|
65423
|
+
if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
65424
|
+
if (steersNative(relative6))
|
|
65425
|
+
native.update(`${posix2}\0`).update(nativeConfigBytes(posix2, bytes));
|
|
65426
|
+
});
|
|
65427
|
+
continue;
|
|
65362
65428
|
}
|
|
65429
|
+
if (everyByte) {
|
|
65430
|
+
const stat2 = import_node_fs65.default.statSync(file);
|
|
65431
|
+
const known = fileDigests.get(file);
|
|
65432
|
+
const content = known?.ino === stat2.ino && known.size === stat2.size && known.mtimeMs === stat2.mtimeMs && known.ctimeMs === stat2.ctimeMs ? known : {
|
|
65433
|
+
ino: stat2.ino,
|
|
65434
|
+
size: stat2.size,
|
|
65435
|
+
mtimeMs: stat2.mtimeMs,
|
|
65436
|
+
ctimeMs: stat2.ctimeMs,
|
|
65437
|
+
digest: ""
|
|
65438
|
+
};
|
|
65439
|
+
if (content !== known) unread.push({ file, content });
|
|
65440
|
+
steps.push(() => hash.update(`file\0${content.size}\0${content.digest}`));
|
|
65441
|
+
}
|
|
65442
|
+
if (NATIVE_SOURCE_FILE2.test(posix2) && steersNative(relative6))
|
|
65443
|
+
steps.push(() => native.update(`${posix2}\0`));
|
|
65363
65444
|
}
|
|
65364
65445
|
}
|
|
65365
65446
|
};
|
|
65366
|
-
|
|
65447
|
+
walk3(root);
|
|
65448
|
+
for (let start = 0; start < unread.length; start += 32) {
|
|
65449
|
+
signal?.throwIfAborted();
|
|
65450
|
+
await Promise.all(
|
|
65451
|
+
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
65452
|
+
const bytes = await import_node_fs65.default.promises.readFile(file);
|
|
65453
|
+
content.size = bytes.length;
|
|
65454
|
+
content.digest = (0, import_node_crypto32.createHash)("sha256").update(bytes).digest("hex");
|
|
65455
|
+
fileDigests.set(file, content);
|
|
65456
|
+
})
|
|
65457
|
+
);
|
|
65458
|
+
}
|
|
65459
|
+
for (const step of steps) step();
|
|
65367
65460
|
if (sourceOnly) {
|
|
65368
65461
|
hash.update(`\0${appRelative}\0`);
|
|
65369
65462
|
return {
|
|
@@ -65374,29 +65467,32 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
|
|
|
65374
65467
|
excluded
|
|
65375
65468
|
};
|
|
65376
65469
|
}
|
|
65377
|
-
const execFileAsync4 = (0, import_node_util11.promisify)(
|
|
65378
|
-
const mac = process.platform === "darwin" ? await Promise.all([
|
|
65379
|
-
// runner-toolchain-platform: darwin
|
|
65380
|
-
execFileAsync4("pod", ["--version"], { env: utf8Env, signal }).catch(
|
|
65381
|
-
(cause) => {
|
|
65382
|
-
throw new Error("CocoaPods is required to install source dependencies", {
|
|
65383
|
-
cause
|
|
65384
|
-
});
|
|
65385
|
-
}
|
|
65386
|
-
),
|
|
65387
|
-
// runner-toolchain-platform: darwin
|
|
65388
|
-
execFileAsync4("xcodebuild", ["-version"], { env: utf8Env, signal })
|
|
65389
|
-
]).then(([pod, xcode]) => ({ podVersion: pod.stdout, xcode: xcode.stdout })) : {};
|
|
65470
|
+
const execFileAsync4 = (0, import_node_util11.promisify)(import_node_child_process39.execFile);
|
|
65390
65471
|
const pinnedNode = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? `node@${manifest.engines.node}` : null;
|
|
65472
|
+
const [mac, node] = await Promise.all([
|
|
65473
|
+
process.platform === "darwin" ? Promise.all([
|
|
65474
|
+
// runner-toolchain-platform: darwin
|
|
65475
|
+
execFileAsync4("pod", ["--version"], { env: utf8Env, signal }).catch(
|
|
65476
|
+
(cause) => {
|
|
65477
|
+
throw new Error("CocoaPods is required to install source dependencies", {
|
|
65478
|
+
cause
|
|
65479
|
+
});
|
|
65480
|
+
}
|
|
65481
|
+
),
|
|
65482
|
+
// runner-toolchain-platform: darwin
|
|
65483
|
+
execFileAsync4("xcodebuild", ["-version"], { env: utf8Env, signal })
|
|
65484
|
+
]).then(([pod, xcode]) => ({ podVersion: pod.stdout, xcode: xcode.stdout })) : {},
|
|
65485
|
+
execFileAsync4(
|
|
65486
|
+
pinnedNode ? "mise" : "node",
|
|
65487
|
+
pinnedNode ? ["exec", pinnedNode, "--", "node", "--version"] : ["--version"],
|
|
65488
|
+
{ cwd: root, signal }
|
|
65489
|
+
)
|
|
65490
|
+
]);
|
|
65391
65491
|
const toolchain = JSON.stringify({
|
|
65392
65492
|
preparation: 7,
|
|
65393
65493
|
appRelative,
|
|
65394
65494
|
...mac,
|
|
65395
|
-
node: (
|
|
65396
|
-
pinnedNode ? "mise" : "node",
|
|
65397
|
-
pinnedNode ? ["exec", pinnedNode, "--", "node", "--version"] : ["--version"],
|
|
65398
|
-
{ cwd: root, signal }
|
|
65399
|
-
)).stdout.trim(),
|
|
65495
|
+
node: node.stdout.trim(),
|
|
65400
65496
|
packageManager: workspacePackageManager(root, manifest.packageManager, excluded),
|
|
65401
65497
|
podsEnvironment
|
|
65402
65498
|
});
|
|
@@ -65575,7 +65671,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
65575
65671
|
});
|
|
65576
65672
|
if (process.platform === "darwin") {
|
|
65577
65673
|
await new Promise((resolve14, reject) => {
|
|
65578
|
-
const child = (0,
|
|
65674
|
+
const child = (0, import_node_child_process39.execFile)(
|
|
65579
65675
|
compiledSwiftHelper(CLONE_SWIFT, "peach-clone-entries"),
|
|
65580
65676
|
(error) => error ? reject(error) : resolve14()
|
|
65581
65677
|
);
|
|
@@ -65591,7 +65687,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
65591
65687
|
const clone = async () => {
|
|
65592
65688
|
const relative6 = entries.pop();
|
|
65593
65689
|
if (relative6 === void 0) return;
|
|
65594
|
-
await (0, import_node_util11.promisify)(
|
|
65690
|
+
await (0, import_node_util11.promisify)(import_node_child_process39.execFile)("cp", [
|
|
65595
65691
|
"-R",
|
|
65596
65692
|
"-p",
|
|
65597
65693
|
import_node_path62.default.join(root, relative6),
|
|
@@ -65615,7 +65711,7 @@ function nativeWorkspacesDir(root) {
|
|
|
65615
65711
|
return import_node_path62.default.join(mount, ".peach-cache", "expo-native-workspaces");
|
|
65616
65712
|
}
|
|
65617
65713
|
function trackedSourceEntries(root, work) {
|
|
65618
|
-
const listed = (0,
|
|
65714
|
+
const listed = (0, import_node_child_process39.spawnSync)("git", ["ls-files", "--stage", "-z"], {
|
|
65619
65715
|
cwd: root,
|
|
65620
65716
|
env: { ...process.env, ...isolatedGitEnv },
|
|
65621
65717
|
maxBuffer: 256 * 1024 * 1024
|
|
@@ -65629,8 +65725,8 @@ function trackedSourceEntries(root, work) {
|
|
|
65629
65725
|
function initializeWorkspaceGit(root, work) {
|
|
65630
65726
|
requireNativeGit();
|
|
65631
65727
|
const env = { ...process.env, ...isolatedGitEnv };
|
|
65632
|
-
(0,
|
|
65633
|
-
(0,
|
|
65728
|
+
(0, import_node_child_process39.execFileSync)("git", ["init", "--quiet"], { cwd: work, env });
|
|
65729
|
+
(0, import_node_child_process39.execFileSync)(
|
|
65634
65730
|
"git",
|
|
65635
65731
|
[
|
|
65636
65732
|
"-c",
|
|
@@ -65650,7 +65746,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
65650
65746
|
);
|
|
65651
65747
|
const tracked = trackedSourceEntries(root, work);
|
|
65652
65748
|
if (tracked.length > 0)
|
|
65653
|
-
(0,
|
|
65749
|
+
(0, import_node_child_process39.execFileSync)("git", ["update-index", "-z", "--index-info"], {
|
|
65654
65750
|
cwd: work,
|
|
65655
65751
|
env,
|
|
65656
65752
|
input: tracked.join("\0")
|
|
@@ -65706,7 +65802,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
65706
65802
|
}
|
|
65707
65803
|
const trustedConfigs = /* @__PURE__ */ new Set();
|
|
65708
65804
|
for (const cwd of [root, app]) {
|
|
65709
|
-
const result2 = (0,
|
|
65805
|
+
const result2 = (0, import_node_child_process39.spawnSync)("mise", ["config", "ls", "--json"], {
|
|
65710
65806
|
cwd,
|
|
65711
65807
|
encoding: "utf8"
|
|
65712
65808
|
});
|
|
@@ -65749,7 +65845,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
65749
65845
|
const command = [...prefix, ...args];
|
|
65750
65846
|
await run14(command[0], command.slice(1), cwd, env);
|
|
65751
65847
|
};
|
|
65752
|
-
const installedBun = manager.startsWith("bun@") ? (0,
|
|
65848
|
+
const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process39.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
|
|
65753
65849
|
if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
|
|
65754
65850
|
await execute(
|
|
65755
65851
|
[
|
|
@@ -65868,7 +65964,7 @@ function stageCachedQuickCryptoOpenSsl(app) {
|
|
|
65868
65964
|
return;
|
|
65869
65965
|
import_node_fs65.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
65870
65966
|
import_node_fs65.default.mkdirSync(opensslDir, { recursive: true });
|
|
65871
|
-
(0,
|
|
65967
|
+
(0, import_node_child_process39.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
|
|
65872
65968
|
}
|
|
65873
65969
|
async function runAdmitted(lease, command, args, cwd, extraEnv) {
|
|
65874
65970
|
const admitted = teamMachineInstalled();
|
|
@@ -65904,11 +66000,11 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
65904
66000
|
});
|
|
65905
66001
|
});
|
|
65906
66002
|
}
|
|
65907
|
-
var
|
|
66003
|
+
var import_node_child_process39, import_node_crypto32, import_node_fs65, import_node_module7, import_node_path62, import_node_util11, isolatedGitEnv, utf8Env, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_SWIFT;
|
|
65908
66004
|
var init_expo_native_workspace = __esm({
|
|
65909
66005
|
"src/expo-native-workspace.ts"() {
|
|
65910
66006
|
"use strict";
|
|
65911
|
-
|
|
66007
|
+
import_node_child_process39 = require("node:child_process");
|
|
65912
66008
|
import_node_crypto32 = require("node:crypto");
|
|
65913
66009
|
import_node_fs65 = __toESM(require("node:fs"), 1);
|
|
65914
66010
|
import_node_module7 = require("node:module");
|
|
@@ -65935,6 +66031,7 @@ var init_expo_native_workspace = __esm({
|
|
|
65935
66031
|
utf8Env = { ...process.env, LANG: "en_US.UTF-8", LC_ALL: "en_US.UTF-8" };
|
|
65936
66032
|
NATIVE_CONFIG_FILE = /(^|\/)(package\.json|bun\.lockb?|package-lock\.json|pnpm-lock\.yaml|pnpm-workspace\.yaml|yarn\.lock|\.yarnrc\.yml|\.npmrc|app\.json|app\.config\.[cm]?[jt]s|Podfile(\.lock|\.properties)?|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|\.nvmrc|\.tool-versions|\.?mise(?:\.[^/]+)?\.toml)$|\.(podspec|patch|plist|entitlements|xcconfig|pbxproj|storyboard|xib|gradle|rb)$|(^|\/)(plugins|patches)\//;
|
|
65937
66033
|
NATIVE_SOURCE_FILE2 = /\.(swift|mm?|hpp?|c|cc|cpp|kt|java)$/;
|
|
66034
|
+
fileDigests = /* @__PURE__ */ new Map();
|
|
65938
66035
|
NATIVE_PACKAGE_ENTRY = /^(ios|android|.*\.podspec|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|app\.plugin\.[cm]?js)$/;
|
|
65939
66036
|
KEPT_WORKSPACES = 2;
|
|
65940
66037
|
WORKSPACE_GRACE_MS = 36e5;
|
|
@@ -65990,7 +66087,7 @@ async function expoDiscoveryKey(options) {
|
|
|
65990
66087
|
const key2 = (0, import_node_crypto33.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable2(JSON.parse(options.searchText))}\0`).update(`${stable2(options.configuration)}\0`).update(stable2(JSON.parse(options.resolveText))).digest("hex");
|
|
65991
66088
|
return { key: key2, root };
|
|
65992
66089
|
}
|
|
65993
|
-
function
|
|
66090
|
+
function expoDiscoveryCacheDir() {
|
|
65994
66091
|
return import_node_path63.default.join(sharedCacheDir(import_node_path63.default.join(ambientHomeDir(), "cache")), "expo-discovery");
|
|
65995
66092
|
}
|
|
65996
66093
|
function vanished2(error) {
|
|
@@ -66027,7 +66124,7 @@ function isStoredUnit(value) {
|
|
|
66027
66124
|
}
|
|
66028
66125
|
function readExpoDiscovery(key2) {
|
|
66029
66126
|
let parsed;
|
|
66030
|
-
const record4 = import_node_path63.default.join(
|
|
66127
|
+
const record4 = import_node_path63.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
|
|
66031
66128
|
try {
|
|
66032
66129
|
parsed = JSON.parse(import_node_fs66.default.readFileSync(record4, "utf8"));
|
|
66033
66130
|
} catch {
|
|
@@ -66056,7 +66153,7 @@ function readExpoDiscovery(key2) {
|
|
|
66056
66153
|
const read = (digest3) => {
|
|
66057
66154
|
const known = blobs.get(digest3);
|
|
66058
66155
|
if (known !== void 0) return known;
|
|
66059
|
-
const blob = import_node_path63.default.join(
|
|
66156
|
+
const blob = import_node_path63.default.join(expoDiscoveryCacheDir(), "blobs", digest3);
|
|
66060
66157
|
const body = import_node_fs66.default.readFileSync(blob, "utf8");
|
|
66061
66158
|
if ((0, import_node_crypto33.createHash)("sha256").update(body).digest("hex") !== digest3)
|
|
66062
66159
|
throw new Error("discovery blob differs from its digest");
|
|
@@ -66100,7 +66197,7 @@ function readExpoDiscovery(key2) {
|
|
|
66100
66197
|
}
|
|
66101
66198
|
}
|
|
66102
66199
|
function fileHashesPath() {
|
|
66103
|
-
return import_node_path63.default.join(
|
|
66200
|
+
return import_node_path63.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
|
|
66104
66201
|
}
|
|
66105
66202
|
function stampedFileHash(file) {
|
|
66106
66203
|
if (!fileHashesLoaded) {
|
|
@@ -66278,7 +66375,7 @@ function rewritePreparedPaths(options) {
|
|
|
66278
66375
|
frameworkDependencies[sourceDir] = sourceDigest;
|
|
66279
66376
|
let portableDir = sourceDir;
|
|
66280
66377
|
if (preparedDigest !== sourceDigest) {
|
|
66281
|
-
const parent = import_node_path63.default.join(
|
|
66378
|
+
const parent = import_node_path63.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
|
|
66282
66379
|
portableDir = import_node_path63.default.join(parent, import_node_path63.default.basename(dir));
|
|
66283
66380
|
if (!import_node_fs66.default.existsSync(portableDir)) {
|
|
66284
66381
|
import_node_fs66.default.mkdirSync(parent, { recursive: true });
|
|
@@ -66309,7 +66406,7 @@ function rewritePreparedPaths(options) {
|
|
|
66309
66406
|
}
|
|
66310
66407
|
function writeExpoDiscovery(options) {
|
|
66311
66408
|
try {
|
|
66312
|
-
const dir =
|
|
66409
|
+
const dir = expoDiscoveryCacheDir();
|
|
66313
66410
|
import_node_fs66.default.mkdirSync(dir, { recursive: true });
|
|
66314
66411
|
const tmp = import_node_path63.default.join(dir, `.${options.key}.${process.pid}.${(0, import_node_crypto33.randomUUID)()}.tmp`);
|
|
66315
66412
|
if (options.units === null) {
|
|
@@ -66505,7 +66602,7 @@ var init_swift_standin_digest = __esm({
|
|
|
66505
66602
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
66506
66603
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
66507
66604
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
66508
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
66605
|
+
STANDIN_SOURCE_DIGEST = true ? "7dd2fef3ceef6be07d22cfa2f397bda7721d34bc2ef8764f78e05b9637849f09" : standinSourceDigest();
|
|
66509
66606
|
}
|
|
66510
66607
|
});
|
|
66511
66608
|
|
|
@@ -66984,7 +67081,7 @@ __export(expo_native_prebuilt_exports, {
|
|
|
66984
67081
|
servedExpoSwift: () => servedExpoSwift
|
|
66985
67082
|
});
|
|
66986
67083
|
function expoNativeCompilerDigestValue() {
|
|
66987
|
-
return true ? "
|
|
67084
|
+
return true ? "2a7438510b7fddb608c748003fbaa32b5c765b3782603cb2e309e2729ddbb4aa" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
66988
67085
|
}
|
|
66989
67086
|
function readSources(value) {
|
|
66990
67087
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -67454,12 +67551,12 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67454
67551
|
const flags = ["--no-sort", "--extern-only", "--defined-only", "--format=just-symbols"];
|
|
67455
67552
|
const options = { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 };
|
|
67456
67553
|
const symbols = (input) => {
|
|
67457
|
-
const raw2 = (0,
|
|
67554
|
+
const raw2 = (0, import_node_child_process40.execFileSync)(
|
|
67458
67555
|
import_node_path69.default.join(toolchain.toolchainBin, "llvm-nm"),
|
|
67459
67556
|
[...flags, input],
|
|
67460
67557
|
options
|
|
67461
67558
|
).trim().split("\n");
|
|
67462
|
-
const demangled = (0,
|
|
67559
|
+
const demangled = (0, import_node_child_process40.execFileSync)(
|
|
67463
67560
|
import_node_path69.default.join(toolchain.toolchainBin, "llvm-nm"),
|
|
67464
67561
|
[...flags, "--demangle", input],
|
|
67465
67562
|
options
|
|
@@ -67474,7 +67571,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67474
67571
|
const stage = import_node_fs72.default.mkdtempSync(import_node_path69.default.join(directory2, "build-"));
|
|
67475
67572
|
try {
|
|
67476
67573
|
const object7 = import_node_path69.default.join(stage, "library.o");
|
|
67477
|
-
(0,
|
|
67574
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "wasm-ld"), [
|
|
67478
67575
|
"-mwasm64",
|
|
67479
67576
|
"-r",
|
|
67480
67577
|
"--whole-archive",
|
|
@@ -67490,7 +67587,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67490
67587
|
);
|
|
67491
67588
|
import_node_fs72.default.writeFileSync(object7, localizeDefinedWasmSymbols(import_node_fs72.default.readFileSync(object7), names));
|
|
67492
67589
|
const output2 = import_node_path69.default.join(stage, "library.a");
|
|
67493
|
-
(0,
|
|
67590
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "llvm-ar"), ["rcsD", output2, object7]);
|
|
67494
67591
|
import_node_fs72.default.renameSync(output2, archive);
|
|
67495
67592
|
} finally {
|
|
67496
67593
|
import_node_fs72.default.rmSync(stage, { recursive: true, force: true });
|
|
@@ -67509,7 +67606,7 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
67509
67606
|
import_node_fs72.default.mkdirSync(directory2, { recursive: true });
|
|
67510
67607
|
const temporary = import_node_path69.default.join(directory2, `combined-${(0, import_node_crypto37.randomUUID)()}.a`);
|
|
67511
67608
|
try {
|
|
67512
|
-
(0,
|
|
67609
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
67513
67610
|
"qcsDL",
|
|
67514
67611
|
temporary,
|
|
67515
67612
|
...files2
|
|
@@ -67520,11 +67617,11 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
67520
67617
|
}
|
|
67521
67618
|
return archive;
|
|
67522
67619
|
}
|
|
67523
|
-
var
|
|
67620
|
+
var import_node_child_process40, import_node_crypto37, import_node_fs72, import_node_path69, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
67524
67621
|
var init_native_static_libraries = __esm({
|
|
67525
67622
|
"src/native-static-libraries.ts"() {
|
|
67526
67623
|
"use strict";
|
|
67527
|
-
|
|
67624
|
+
import_node_child_process40 = require("node:child_process");
|
|
67528
67625
|
import_node_crypto37 = require("node:crypto");
|
|
67529
67626
|
import_node_fs72 = __toESM(require("node:fs"), 1);
|
|
67530
67627
|
import_node_path69 = __toESM(require("node:path"), 1);
|
|
@@ -68567,11 +68664,11 @@ function resolveSwiftPackages(options) {
|
|
|
68567
68664
|
result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
|
|
68568
68665
|
return result;
|
|
68569
68666
|
}
|
|
68570
|
-
var
|
|
68667
|
+
var import_node_child_process41, import_node_crypto39, import_node_fs74, import_node_path71, import_promises7, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
|
|
68571
68668
|
var init_swift_packages = __esm({
|
|
68572
68669
|
"src/swift-packages.ts"() {
|
|
68573
68670
|
"use strict";
|
|
68574
|
-
|
|
68671
|
+
import_node_child_process41 = require("node:child_process");
|
|
68575
68672
|
import_node_crypto39 = require("node:crypto");
|
|
68576
68673
|
import_node_fs74 = __toESM(require("node:fs"), 1);
|
|
68577
68674
|
import_node_path71 = __toESM(require("node:path"), 1);
|
|
@@ -68592,7 +68689,7 @@ var init_swift_packages = __esm({
|
|
|
68592
68689
|
BINARY = "is a binary framework";
|
|
68593
68690
|
blockers = (reasons) => [...new Set(reasons.flat())];
|
|
68594
68691
|
verified = /* @__PURE__ */ new Set();
|
|
68595
|
-
execFileAsync2 = (0, import_node_util13.promisify)(
|
|
68692
|
+
execFileAsync2 = (0, import_node_util13.promisify)(import_node_child_process41.execFile);
|
|
68596
68693
|
checkoutKey = (dir, pin2) => `${dir}\0${pin2.revision}`;
|
|
68597
68694
|
}
|
|
68598
68695
|
});
|
|
@@ -68659,10 +68756,10 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
68659
68756
|
throw new Error(
|
|
68660
68757
|
"the Sentry slice for a private Swift distribution builds from a Contrast source checkout"
|
|
68661
68758
|
);
|
|
68662
|
-
const staging = import_node_fs75.default.mkdtempSync(import_node_path72.default.join(import_node_fs75.default.realpathSync(
|
|
68759
|
+
const staging = import_node_fs75.default.mkdtempSync(import_node_path72.default.join(import_node_fs75.default.realpathSync(import_node_os17.default.tmpdir()), "sentry-slice-"));
|
|
68663
68760
|
try {
|
|
68664
68761
|
process.stderr.write("peach: building the Sentry slice for a private distribution\u2026\n");
|
|
68665
|
-
(0,
|
|
68762
|
+
(0, import_node_child_process42.execFileSync)("bun", [script, "--output", staging, "--module-root", moduleRoot], {
|
|
68666
68763
|
cwd: import_node_path72.default.resolve(sourceSwiftCheckout(), "../.."),
|
|
68667
68764
|
stdio: ["ignore", 2, 2]
|
|
68668
68765
|
});
|
|
@@ -68737,14 +68834,14 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
68737
68834
|
}
|
|
68738
68835
|
};
|
|
68739
68836
|
}
|
|
68740
|
-
var
|
|
68837
|
+
var import_node_child_process42, import_node_crypto40, import_node_fs75, import_node_os17, import_node_path72, SENTRY_SWIFT_SLICE;
|
|
68741
68838
|
var init_native_swift_slices = __esm({
|
|
68742
68839
|
"src/native-swift-slices.ts"() {
|
|
68743
68840
|
"use strict";
|
|
68744
|
-
|
|
68841
|
+
import_node_child_process42 = require("node:child_process");
|
|
68745
68842
|
import_node_crypto40 = require("node:crypto");
|
|
68746
68843
|
import_node_fs75 = __toESM(require("node:fs"), 1);
|
|
68747
|
-
|
|
68844
|
+
import_node_os17 = __toESM(require("node:os"), 1);
|
|
68748
68845
|
import_node_path72 = __toESM(require("node:path"), 1);
|
|
68749
68846
|
init_native_prebuilt();
|
|
68750
68847
|
init_swift_compile();
|
|
@@ -69032,7 +69129,7 @@ async function emitCxxStandin(input) {
|
|
|
69032
69129
|
"-I",
|
|
69033
69130
|
input.headers
|
|
69034
69131
|
];
|
|
69035
|
-
const includes = (0,
|
|
69132
|
+
const includes = (0, import_node_child_process43.spawnSync)(input.clang, [...flags, "-M", "-MT", "peach", probe2], {
|
|
69036
69133
|
encoding: "utf8",
|
|
69037
69134
|
env: swiftEnvironment(),
|
|
69038
69135
|
maxBuffer: 16 * 1024 * 1024
|
|
@@ -69052,7 +69149,7 @@ async function emitCxxStandin(input) {
|
|
|
69052
69149
|
const output2 = import_node_fs78.default.openSync(ast, "w");
|
|
69053
69150
|
let parsed;
|
|
69054
69151
|
try {
|
|
69055
|
-
parsed = (0,
|
|
69152
|
+
parsed = (0, import_node_child_process43.spawnSync)(
|
|
69056
69153
|
input.clang,
|
|
69057
69154
|
[...flags, "-fsyntax-only", "-Xclang", "-ast-dump=json", probe2],
|
|
69058
69155
|
{ stdio: ["ignore", output2, "pipe"], encoding: "utf8", env: swiftEnvironment() }
|
|
@@ -69110,7 +69207,7 @@ async function emitCxxStandin(input) {
|
|
|
69110
69207
|
sourceFile,
|
|
69111
69208
|
[...prelude, ...live.map((item) => item.text)].join("\n") + "\n"
|
|
69112
69209
|
);
|
|
69113
|
-
const checked = (0,
|
|
69210
|
+
const checked = (0, import_node_child_process43.spawnSync)(
|
|
69114
69211
|
input.clang,
|
|
69115
69212
|
[
|
|
69116
69213
|
...flags,
|
|
@@ -69144,11 +69241,11 @@ async function emitCxxStandin(input) {
|
|
|
69144
69241
|
excluded
|
|
69145
69242
|
};
|
|
69146
69243
|
}
|
|
69147
|
-
var
|
|
69244
|
+
var import_node_child_process43, import_node_fs78, import_node_path74, QUALIFIERS, UNNAMEABLE;
|
|
69148
69245
|
var init_swift_cxx_standin = __esm({
|
|
69149
69246
|
"src/swift-cxx-standin.ts"() {
|
|
69150
69247
|
"use strict";
|
|
69151
|
-
|
|
69248
|
+
import_node_child_process43 = require("node:child_process");
|
|
69152
69249
|
import_node_fs78 = __toESM(require("node:fs"), 1);
|
|
69153
69250
|
import_node_path74 = __toESM(require("node:path"), 1);
|
|
69154
69251
|
init_swift_cxx_declarations();
|
|
@@ -69400,7 +69497,7 @@ var init_swift_standin_builtin_behavior = __esm({
|
|
|
69400
69497
|
|
|
69401
69498
|
// src/swift-standins.ts
|
|
69402
69499
|
function exec(file, args, cwd) {
|
|
69403
|
-
return (0,
|
|
69500
|
+
return (0, import_node_child_process44.execFileSync)(file, args, {
|
|
69404
69501
|
cwd,
|
|
69405
69502
|
encoding: "utf8",
|
|
69406
69503
|
env: swiftEnvironment(),
|
|
@@ -70086,7 +70183,7 @@ function placeholderStandin(surface, binary2, toolchain, work, behavior, sibling
|
|
|
70086
70183
|
const out = import_node_path75.default.join(work, "graphs");
|
|
70087
70184
|
import_node_fs79.default.mkdirSync(import_node_path75.default.join(work, "interface"), { recursive: true });
|
|
70088
70185
|
import_node_fs79.default.mkdirSync(out, { recursive: true });
|
|
70089
|
-
const extracted = (0,
|
|
70186
|
+
const extracted = (0, import_node_child_process44.spawnSync)(
|
|
70090
70187
|
import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
|
|
70091
70188
|
[
|
|
70092
70189
|
"-emit-module",
|
|
@@ -70487,7 +70584,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
70487
70584
|
);
|
|
70488
70585
|
}
|
|
70489
70586
|
import_node_fs79.default.writeFileSync(file, source + trailer);
|
|
70490
|
-
const check2 = (0,
|
|
70587
|
+
const check2 = (0, import_node_child_process44.spawnSync)(
|
|
70491
70588
|
import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
|
|
70492
70589
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
70493
70590
|
// literal overflow, which the app's build of the stand-in reaches
|
|
@@ -70855,7 +70952,7 @@ async function cxxStandin(surface, binary2, toolchain, work) {
|
|
|
70855
70952
|
roots.map((root) => `#include ${JSON.stringify(root)}
|
|
70856
70953
|
`).join("")
|
|
70857
70954
|
);
|
|
70858
|
-
const language = (0,
|
|
70955
|
+
const language = (0, import_node_child_process44.spawnSync)(
|
|
70859
70956
|
import_node_path75.default.join(toolchain.toolchainBin, "clang"),
|
|
70860
70957
|
[
|
|
70861
70958
|
"-target",
|
|
@@ -71076,7 +71173,7 @@ function buildRustCrate(manifest, library, searchRoot, moduleRoot, entry = rustC
|
|
|
71076
71173
|
import_node_path75.default.relative(common2, crateWorkspace(manifest)),
|
|
71077
71174
|
"Cargo.lock"
|
|
71078
71175
|
);
|
|
71079
|
-
const result = (0,
|
|
71176
|
+
const result = (0, import_node_child_process44.spawnSync)(
|
|
71080
71177
|
process.execPath,
|
|
71081
71178
|
[
|
|
71082
71179
|
runner,
|
|
@@ -71224,7 +71321,7 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
|
|
|
71224
71321
|
})
|
|
71225
71322
|
);
|
|
71226
71323
|
const build2 = await new Promise((resolve14) => {
|
|
71227
|
-
const child = (0,
|
|
71324
|
+
const child = (0, import_node_child_process44.spawn)(
|
|
71228
71325
|
"bun",
|
|
71229
71326
|
[
|
|
71230
71327
|
import_node_path75.default.join(repo, "scripts/build/swift-standins-submit.ts"),
|
|
@@ -71753,11 +71850,11 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
71753
71850
|
import_node_fs79.default.rmSync(modules, { recursive: true, force: true });
|
|
71754
71851
|
}
|
|
71755
71852
|
}
|
|
71756
|
-
var
|
|
71853
|
+
var import_node_child_process44, import_node_crypto41, import_node_fs79, import_node_path75, TRIPLE, cacheDir4, key, digests, isBinaryLibraryFile, REACH_STAGED_FRAMEWORKS, OBJC_IMPORT, files, OBJC, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
|
|
71757
71854
|
var init_swift_standins = __esm({
|
|
71758
71855
|
"src/swift-standins.ts"() {
|
|
71759
71856
|
"use strict";
|
|
71760
|
-
|
|
71857
|
+
import_node_child_process44 = require("node:child_process");
|
|
71761
71858
|
import_node_crypto41 = require("node:crypto");
|
|
71762
71859
|
import_node_fs79 = __toESM(require("node:fs"), 1);
|
|
71763
71860
|
import_node_path75 = __toESM(require("node:path"), 1);
|
|
@@ -72482,7 +72579,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
72482
72579
|
provided: [...providers.keys()]
|
|
72483
72580
|
};
|
|
72484
72581
|
try {
|
|
72485
|
-
const lock = (0,
|
|
72582
|
+
const lock = (0, import_node_child_process45.spawnSync)(
|
|
72486
72583
|
"perl",
|
|
72487
72584
|
["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
|
|
72488
72585
|
{ stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
|
|
@@ -72653,7 +72750,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
72653
72750
|
import_node_path76.default.join(work, `${target.moduleName}.o`)
|
|
72654
72751
|
]
|
|
72655
72752
|
];
|
|
72656
|
-
const result = (0,
|
|
72753
|
+
const result = (0, import_node_child_process45.spawnSync)(frontend, args, {
|
|
72657
72754
|
cwd: work,
|
|
72658
72755
|
encoding: "utf8",
|
|
72659
72756
|
env: swiftEnvironment(),
|
|
@@ -72773,7 +72870,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
|
|
|
72773
72870
|
const work = import_node_path76.default.join(parent, key2);
|
|
72774
72871
|
const descriptor = import_node_fs80.default.openSync(`${work}.lock`, "a");
|
|
72775
72872
|
try {
|
|
72776
|
-
const locked = (0,
|
|
72873
|
+
const locked = (0, import_node_child_process45.spawnSync)(
|
|
72777
72874
|
"perl",
|
|
72778
72875
|
["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
|
|
72779
72876
|
{ stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
|
|
@@ -73021,7 +73118,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
|
|
|
73021
73118
|
...dependencies ? ["-MD", "-MF", dependencies, "-H"] : []
|
|
73022
73119
|
];
|
|
73023
73120
|
const result = await new Promise((resolve14) => {
|
|
73024
|
-
const child = (0,
|
|
73121
|
+
const child = (0, import_node_child_process45.spawn)(
|
|
73025
73122
|
import_node_path76.default.join(toolchain.toolchainBin, cxx ? "clang++" : "clang"),
|
|
73026
73123
|
args,
|
|
73027
73124
|
{
|
|
@@ -73102,11 +73199,11 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
73102
73199
|
import_node_fs80.default.closeSync(descriptor);
|
|
73103
73200
|
}
|
|
73104
73201
|
}
|
|
73105
|
-
var
|
|
73202
|
+
var import_node_child_process45, import_node_crypto42, import_node_fs80, import_node_path76, SwiftObjCCompilationError, isDirectory2, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
|
|
73106
73203
|
var init_swift_objc_compile = __esm({
|
|
73107
73204
|
"src/swift-objc-compile.ts"() {
|
|
73108
73205
|
"use strict";
|
|
73109
|
-
|
|
73206
|
+
import_node_child_process45 = require("node:child_process");
|
|
73110
73207
|
import_node_crypto42 = require("node:crypto");
|
|
73111
73208
|
import_node_fs80 = __toESM(require("node:fs"), 1);
|
|
73112
73209
|
import_node_path76 = __toESM(require("node:path"), 1);
|
|
@@ -73780,7 +73877,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
|
|
|
73780
73877
|
"--distribution",
|
|
73781
73878
|
moduleRoot
|
|
73782
73879
|
];
|
|
73783
|
-
const verified2 = import_node_fs82.default.existsSync(import_node_path78.default.join(dir, ADAPTER_MANIFEST)) && (0,
|
|
73880
|
+
const verified2 = import_node_fs82.default.existsSync(import_node_path78.default.join(dir, ADAPTER_MANIFEST)) && (0, import_node_child_process46.spawnSync)("bun", [script, "--verify", ...args(dir)], { stdio: "ignore" }).status === 0;
|
|
73784
73881
|
if (!verified2) {
|
|
73785
73882
|
process.stderr.write(
|
|
73786
73883
|
`peach: building ${label} for private distribution ${distribution.id}\u2026
|
|
@@ -73788,7 +73885,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
|
|
|
73788
73885
|
);
|
|
73789
73886
|
const staged = `${dir}.${process.pid}`;
|
|
73790
73887
|
import_node_fs82.default.rmSync(staged, { recursive: true, force: true });
|
|
73791
|
-
(0,
|
|
73888
|
+
(0, import_node_child_process46.execFileSync)("bun", [script, ...args(staged)], { stdio: ["ignore", 2, 2] });
|
|
73792
73889
|
import_node_fs82.default.rmSync(dir, { recursive: true, force: true });
|
|
73793
73890
|
import_node_fs82.default.renameSync(staged, dir);
|
|
73794
73891
|
}
|
|
@@ -73830,11 +73927,11 @@ async function resolveAdapterArchive(family, roots, moduleRoot, lock, signal) {
|
|
|
73830
73927
|
base64: import_node_fs82.default.readFileSync(import_node_path78.default.join(dir, manifest.archive.path)).toString("base64")
|
|
73831
73928
|
};
|
|
73832
73929
|
}
|
|
73833
|
-
var
|
|
73930
|
+
var import_node_child_process46, import_node_fs82, import_node_path78, installedVersion;
|
|
73834
73931
|
var init_nitro_adapter = __esm({
|
|
73835
73932
|
"src/nitro-adapter.ts"() {
|
|
73836
73933
|
"use strict";
|
|
73837
|
-
|
|
73934
|
+
import_node_child_process46 = require("node:child_process");
|
|
73838
73935
|
import_node_fs82 = __toESM(require("node:fs"), 1);
|
|
73839
73936
|
import_node_path78 = __toESM(require("node:path"), 1);
|
|
73840
73937
|
init_src();
|
|
@@ -76221,7 +76318,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
76221
76318
|
failed = captured.failed;
|
|
76222
76319
|
reached = captured.reached;
|
|
76223
76320
|
} else {
|
|
76224
|
-
const result2 = (0,
|
|
76321
|
+
const result2 = (0, import_node_child_process47.spawnSync)(clang, [...cleaned, "-M", "-MT", "peach", "-H"], {
|
|
76225
76322
|
cwd: work,
|
|
76226
76323
|
encoding: "utf8",
|
|
76227
76324
|
env: swiftEnvironment(),
|
|
@@ -76344,11 +76441,11 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
76344
76441
|
);
|
|
76345
76442
|
return result;
|
|
76346
76443
|
}
|
|
76347
|
-
var
|
|
76444
|
+
var import_node_child_process47, import_node_crypto44, import_node_fs85, import_node_path81, cachedInputs;
|
|
76348
76445
|
var init_swift_cxx_reachable = __esm({
|
|
76349
76446
|
"src/swift-cxx-reachable.ts"() {
|
|
76350
76447
|
"use strict";
|
|
76351
|
-
|
|
76448
|
+
import_node_child_process47 = require("node:child_process");
|
|
76352
76449
|
import_node_crypto44 = require("node:crypto");
|
|
76353
76450
|
import_node_fs85 = __toESM(require("node:fs"), 1);
|
|
76354
76451
|
import_node_path81 = __toESM(require("node:path"), 1);
|
|
@@ -76437,19 +76534,19 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
76437
76534
|
} catch {
|
|
76438
76535
|
}
|
|
76439
76536
|
const out = import_node_path83.default.join(
|
|
76440
|
-
import_node_fs87.default.mkdtempSync(import_node_path83.default.join(
|
|
76537
|
+
import_node_fs87.default.mkdtempSync(import_node_path83.default.join(import_node_os18.default.tmpdir(), "swift-pdf-png-")),
|
|
76441
76538
|
"out.png"
|
|
76442
76539
|
);
|
|
76443
76540
|
try {
|
|
76444
76541
|
if (process.platform === "darwin") {
|
|
76445
|
-
(0,
|
|
76542
|
+
(0, import_node_child_process48.execFileSync)(
|
|
76446
76543
|
compiledSwiftHelper(RASTER_SWIFT, "swift-pdf-raster"),
|
|
76447
76544
|
[diskPath, "3", out],
|
|
76448
76545
|
{ stdio: "pipe" }
|
|
76449
76546
|
);
|
|
76450
76547
|
} else {
|
|
76451
76548
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
76452
|
-
(0,
|
|
76549
|
+
(0, import_node_child_process48.execFileSync)(
|
|
76453
76550
|
executable,
|
|
76454
76551
|
[
|
|
76455
76552
|
...prefixArgs,
|
|
@@ -76484,11 +76581,11 @@ function rasterizeSvgFile(diskPath, svgSha256) {
|
|
|
76484
76581
|
const cached4 = import_node_path83.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
76485
76582
|
if (import_node_fs87.default.existsSync(cached4)) return { bytes: import_node_fs87.default.readFileSync(cached4) };
|
|
76486
76583
|
const out = import_node_path83.default.join(
|
|
76487
|
-
import_node_fs87.default.mkdtempSync(import_node_path83.default.join(
|
|
76584
|
+
import_node_fs87.default.mkdtempSync(import_node_path83.default.join(import_node_os18.default.tmpdir(), "swift-svg-png-")),
|
|
76488
76585
|
"out.png"
|
|
76489
76586
|
);
|
|
76490
76587
|
try {
|
|
76491
|
-
(0,
|
|
76588
|
+
(0, import_node_child_process48.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
76492
76589
|
const bytes = import_node_fs87.default.readFileSync(out);
|
|
76493
76590
|
import_node_fs87.default.mkdirSync(cacheDir(), { recursive: true });
|
|
76494
76591
|
import_node_fs87.default.copyFileSync(out, cached4);
|
|
@@ -76501,14 +76598,14 @@ function rasterizeSvgFile(diskPath, svgSha256) {
|
|
|
76501
76598
|
import_node_fs87.default.rmSync(import_node_path83.default.dirname(out), { recursive: true, force: true });
|
|
76502
76599
|
}
|
|
76503
76600
|
}
|
|
76504
|
-
var
|
|
76601
|
+
var import_node_child_process48, import_node_crypto45, import_node_fs87, import_node_os18, import_node_path83, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
76505
76602
|
var init_swift_pdf_raster = __esm({
|
|
76506
76603
|
"src/swift-pdf-raster.ts"() {
|
|
76507
76604
|
"use strict";
|
|
76508
|
-
|
|
76605
|
+
import_node_child_process48 = require("node:child_process");
|
|
76509
76606
|
import_node_crypto45 = require("node:crypto");
|
|
76510
76607
|
import_node_fs87 = __toESM(require("node:fs"), 1);
|
|
76511
|
-
|
|
76608
|
+
import_node_os18 = __toESM(require("node:os"), 1);
|
|
76512
76609
|
import_node_path83 = __toESM(require("node:path"), 1);
|
|
76513
76610
|
init_internal_child_contract();
|
|
76514
76611
|
init_self_invocation();
|
|
@@ -76843,7 +76940,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
76843
76940
|
const known = emptyWasmAssembly.get(key2);
|
|
76844
76941
|
if (known) return known;
|
|
76845
76942
|
const result = new Promise(
|
|
76846
|
-
(resolve14) => (0,
|
|
76943
|
+
(resolve14) => (0, import_node_child_process49.execFile)(
|
|
76847
76944
|
clang,
|
|
76848
76945
|
[
|
|
76849
76946
|
"-target",
|
|
@@ -78087,7 +78184,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
|
|
|
78087
78184
|
}
|
|
78088
78185
|
}
|
|
78089
78186
|
if (xcode?.app.postBundleScripts.length) {
|
|
78090
|
-
const dir = import_node_fs88.default.mkdtempSync(import_node_path84.default.join(
|
|
78187
|
+
const dir = import_node_fs88.default.mkdtempSync(import_node_path84.default.join(import_node_os19.default.tmpdir(), "peach-xcode-bundle-"));
|
|
78091
78188
|
const wrapper = import_node_path84.default.basename(xcode.app.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")) || `${xcode.app.name}.app`;
|
|
78092
78189
|
const bundle = import_node_path84.default.join(dir, wrapper);
|
|
78093
78190
|
try {
|
|
@@ -78138,7 +78235,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
|
|
|
78138
78235
|
});
|
|
78139
78236
|
try {
|
|
78140
78237
|
const [shell, ...args] = phase.command;
|
|
78141
|
-
(0,
|
|
78238
|
+
(0, import_node_child_process49.execFileSync)(shell, args, {
|
|
78142
78239
|
cwd: phase.directory,
|
|
78143
78240
|
env,
|
|
78144
78241
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -79030,15 +79127,15 @@ function disposeSwiftProject(packagePath, signal) {
|
|
|
79030
79127
|
xcodeProjects().delete(packagePath);
|
|
79031
79128
|
sourceEntries().delete(packagePath);
|
|
79032
79129
|
}
|
|
79033
|
-
var import_node_async_hooks2,
|
|
79130
|
+
var import_node_async_hooks2, import_node_child_process49, import_node_crypto46, import_node_fs88, import_node_os19, import_node_path84, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
|
|
79034
79131
|
var init_swift_host = __esm({
|
|
79035
79132
|
"src/swift-host.ts"() {
|
|
79036
79133
|
"use strict";
|
|
79037
79134
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
79038
|
-
|
|
79135
|
+
import_node_child_process49 = require("node:child_process");
|
|
79039
79136
|
import_node_crypto46 = require("node:crypto");
|
|
79040
79137
|
import_node_fs88 = __toESM(require("node:fs"), 1);
|
|
79041
|
-
|
|
79138
|
+
import_node_os19 = __toESM(require("node:os"), 1);
|
|
79042
79139
|
import_node_path84 = __toESM(require("node:path"), 1);
|
|
79043
79140
|
init_bundleAssets();
|
|
79044
79141
|
init_stringCatalog();
|
|
@@ -81433,11 +81530,11 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
81433
81530
|
files: hashTree(generatedRoot)
|
|
81434
81531
|
};
|
|
81435
81532
|
}
|
|
81436
|
-
var
|
|
81533
|
+
var import_node_child_process50, import_node_crypto47, import_node_fs92, import_node_module12, import_node_path88, import_node_util14, run7, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
81437
81534
|
var init_turbo_codegen_intake = __esm({
|
|
81438
81535
|
"src/turbo-codegen-intake.ts"() {
|
|
81439
81536
|
"use strict";
|
|
81440
|
-
|
|
81537
|
+
import_node_child_process50 = require("node:child_process");
|
|
81441
81538
|
import_node_crypto47 = require("node:crypto");
|
|
81442
81539
|
import_node_fs92 = __toESM(require("node:fs"), 1);
|
|
81443
81540
|
import_node_module12 = require("node:module");
|
|
@@ -81447,7 +81544,7 @@ var init_turbo_codegen_intake = __esm({
|
|
|
81447
81544
|
init_is_record();
|
|
81448
81545
|
init_nitro_source();
|
|
81449
81546
|
init_podspec_sources();
|
|
81450
|
-
run7 = (0, import_node_util14.promisify)(
|
|
81547
|
+
run7 = (0, import_node_util14.promisify)(import_node_child_process50.execFile);
|
|
81451
81548
|
RENDERER_PODS = /* @__PURE__ */ new Set([
|
|
81452
81549
|
"React-Fabric",
|
|
81453
81550
|
"React-FabricComponents",
|
|
@@ -82166,7 +82263,8 @@ async function collectTurboSources(options) {
|
|
|
82166
82263
|
reactNative,
|
|
82167
82264
|
sources: [],
|
|
82168
82265
|
externalPodSources: [],
|
|
82169
|
-
rendererSwiftTargets: []
|
|
82266
|
+
rendererSwiftTargets: [],
|
|
82267
|
+
fabricComponents: []
|
|
82170
82268
|
};
|
|
82171
82269
|
const sharedLibrary = [...options.installedPods?.values() ?? []].find(
|
|
82172
82270
|
(pod) => pod.sharedLibrary
|
|
@@ -82613,6 +82711,9 @@ async function collectTurboSources(options) {
|
|
|
82613
82711
|
};
|
|
82614
82712
|
let objc = Boolean(options.reactNativeProvider);
|
|
82615
82713
|
let fabric = Boolean(options.reactNativeProvider);
|
|
82714
|
+
const fabricPackages = /* @__PURE__ */ new Set();
|
|
82715
|
+
const fabricViews = [];
|
|
82716
|
+
let fabricTarget = null;
|
|
82616
82717
|
let legacyBridge = false;
|
|
82617
82718
|
let hermesHeaders = null;
|
|
82618
82719
|
const objcClasses = /* @__PURE__ */ new Set();
|
|
@@ -82636,7 +82737,11 @@ async function collectTurboSources(options) {
|
|
|
82636
82737
|
{ tool: "cxx", flags: pod.installed.preprocessorFlags.cxx }
|
|
82637
82738
|
];
|
|
82638
82739
|
const root = pod.root;
|
|
82639
|
-
|
|
82740
|
+
if (fabricComponents(provider.root)) {
|
|
82741
|
+
fabric = true;
|
|
82742
|
+
fabricPackages.add(provider.name);
|
|
82743
|
+
fabricTarget ??= { targetName, label, root: provider.root };
|
|
82744
|
+
}
|
|
82640
82745
|
if (pod.installed?.library) {
|
|
82641
82746
|
result.libraries ??= {};
|
|
82642
82747
|
result.libraries[targetName] = import_node_fs93.default.readFileSync(pod.installed.library).toString("base64");
|
|
@@ -82909,6 +83014,17 @@ async function collectTurboSources(options) {
|
|
|
82909
83014
|
const owned = /* @__PURE__ */ new Set();
|
|
82910
83015
|
walkFiles2(generated, "", owned);
|
|
82911
83016
|
const spec = codegenConfig.name;
|
|
83017
|
+
let definedComponentNames;
|
|
83018
|
+
const getDefinedComponentNames = () => {
|
|
83019
|
+
if (definedComponentNames) return definedComponentNames;
|
|
83020
|
+
definedComponentNames = /* @__PURE__ */ new Set();
|
|
83021
|
+
const pattern = /\b(?:const\s+char|char\s+const)\s+(\w+ComponentName)\s*\[\s*\]\s*=/g;
|
|
83022
|
+
for (const sourceFile of sources) {
|
|
83023
|
+
const text6 = readPackageFile(root, import_node_path89.default.join(root, sourceFile), Infinity).toString("utf8").replace(/\/\/[^\n]*/g, "");
|
|
83024
|
+
for (const match of text6.matchAll(pattern)) definedComponentNames.add(match[1]);
|
|
83025
|
+
}
|
|
83026
|
+
return definedComponentNames;
|
|
83027
|
+
};
|
|
82912
83028
|
for (const file of [...owned].sort()) {
|
|
82913
83029
|
const base = import_node_path89.default.posix.basename(file);
|
|
82914
83030
|
const objcSpec = providerObjC && file.startsWith(`${spec}/`);
|
|
@@ -82930,7 +83046,32 @@ async function collectTurboSources(options) {
|
|
|
82930
83046
|
relative: file
|
|
82931
83047
|
}
|
|
82932
83048
|
);
|
|
82933
|
-
else
|
|
83049
|
+
else {
|
|
83050
|
+
if (component && base === "ShadowNodes.cpp") {
|
|
83051
|
+
const defined = getDefinedComponentNames();
|
|
83052
|
+
if (defined.size) {
|
|
83053
|
+
const source = readPackageFile(
|
|
83054
|
+
generated,
|
|
83055
|
+
import_node_path89.default.join(generated, file),
|
|
83056
|
+
Infinity
|
|
83057
|
+
).toString("utf8");
|
|
83058
|
+
const filtered = source.replace(
|
|
83059
|
+
/^[ \t]*(?:extern[ \t]+)?(?:const[ \t]+char|char[ \t]+const)[ \t]+(\w+ComponentName)[ \t]*\[[ \t]*\][ \t]*=[^;]*;[ \t]*\r?\n?/gm,
|
|
83060
|
+
(line, name3) => defined.has(name3) ? "" : line
|
|
83061
|
+
);
|
|
83062
|
+
if (filtered !== source) {
|
|
83063
|
+
if (!/\b(?:const\s+char|char\s+const)\s+\w+ComponentName\s*\[\s*\]\s*=/.test(
|
|
83064
|
+
filtered
|
|
83065
|
+
))
|
|
83066
|
+
continue;
|
|
83067
|
+
const key2 = original(targetName, "ReactCodegen", generated, file);
|
|
83068
|
+
result.files[key2] = filtered;
|
|
83069
|
+
continue;
|
|
83070
|
+
}
|
|
83071
|
+
}
|
|
83072
|
+
}
|
|
83073
|
+
original(targetName, "ReactCodegen", generated, file);
|
|
83074
|
+
}
|
|
82934
83075
|
}
|
|
82935
83076
|
}
|
|
82936
83077
|
for (const file of sources) original(targetName, label, root, file);
|
|
@@ -82991,7 +83132,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
82991
83132
|
add2(`${core}/include/PeachJsiRuntime.hpp`, TURBO_RUNTIME_HEADER);
|
|
82992
83133
|
add2(
|
|
82993
83134
|
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`,
|
|
82994
|
-
'#pragma once\nextern "C" void peachTurboInitialize();\n'
|
|
83135
|
+
'#pragma once\nextern "C" void peachTurboInitialize();\n// the +1 Fabric component view a root of the process shows, in an app with one\nextern "C" void *peach_fabric_view_content(int tag);\n'
|
|
82995
83136
|
);
|
|
82996
83137
|
add2(
|
|
82997
83138
|
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/module.modulemap`,
|
|
@@ -83117,6 +83258,21 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
83117
83258
|
original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.h")
|
|
83118
83259
|
);
|
|
83119
83260
|
}
|
|
83261
|
+
const thirdParty = import_node_path89.default.join(generated, "RCTThirdPartyComponentsProvider.mm");
|
|
83262
|
+
if (fabricPackages.size > 0 && import_node_fs93.default.existsSync(thirdParty)) {
|
|
83263
|
+
for (const [, name3, className2, owner] of import_node_fs93.default.readFileSync(thirdParty, "utf8").matchAll(/@"([^"]+)": NSClassFromString\(@"([^"]+)"\), \/\/ (\S+)/g))
|
|
83264
|
+
if (fabricPackages.has(owner))
|
|
83265
|
+
fabricViews.push({ name: name3, className: className2 });
|
|
83266
|
+
}
|
|
83267
|
+
if (fabricViews.length > 0 && fabricTarget) {
|
|
83268
|
+
result.fabricComponents = fabricViews.map(({ name: name3 }) => name3);
|
|
83269
|
+
const unit2 = `${targetPath(fabricTarget.targetName)}/PeachFabricHost.mm`;
|
|
83270
|
+
add2(unit2, fabricHostSource(fabricViews));
|
|
83271
|
+
scanText(
|
|
83272
|
+
{ key: unit2, ...fabricTarget, relative: "PeachFabricHost.mm" },
|
|
83273
|
+
result.files[unit2]
|
|
83274
|
+
);
|
|
83275
|
+
}
|
|
83120
83276
|
}
|
|
83121
83277
|
if (fabric || legacyBridge) {
|
|
83122
83278
|
if (legacyBridge) {
|
|
@@ -83460,38 +83616,6 @@ void dispatchToJSThread(dispatch_block_t block) {
|
|
|
83460
83616
|
}
|
|
83461
83617
|
} // namespace
|
|
83462
83618
|
|
|
83463
|
-
static CGFloat peachScreenBrightness = 0.5;
|
|
83464
|
-
|
|
83465
|
-
@implementation UIScreen (PeachTurboRuntime)
|
|
83466
|
-
+ (UIScreen *)mainScreen {
|
|
83467
|
-
static UIScreen *screen = nil;
|
|
83468
|
-
if (!screen) screen = [[UIScreen alloc] init];
|
|
83469
|
-
return screen;
|
|
83470
|
-
}
|
|
83471
|
-
- (CGFloat)brightness {
|
|
83472
|
-
return peachScreenBrightness;
|
|
83473
|
-
}
|
|
83474
|
-
- (void)setBrightness:(CGFloat)value {
|
|
83475
|
-
peachScreenBrightness = value;
|
|
83476
|
-
}
|
|
83477
|
-
@end
|
|
83478
|
-
|
|
83479
|
-
static BOOL peachIdleTimerDisabled = NO;
|
|
83480
|
-
|
|
83481
|
-
@implementation UIApplication (PeachTurboRuntime)
|
|
83482
|
-
+ (UIApplication *)sharedApplication {
|
|
83483
|
-
static UIApplication *app = nil;
|
|
83484
|
-
if (!app) app = [[UIApplication alloc] init];
|
|
83485
|
-
return app;
|
|
83486
|
-
}
|
|
83487
|
-
- (BOOL)isIdleTimerDisabled {
|
|
83488
|
-
return peachIdleTimerDisabled;
|
|
83489
|
-
}
|
|
83490
|
-
- (void)setIdleTimerDisabled:(BOOL)disabled {
|
|
83491
|
-
peachIdleTimerDisabled = disabled;
|
|
83492
|
-
}
|
|
83493
|
-
@end
|
|
83494
|
-
|
|
83495
83619
|
// React Native's own modules register before any provider's, and RCTBridge.mm
|
|
83496
83620
|
// creates the registry's queue in the first RCTRegisterModule. the engine
|
|
83497
83621
|
// supplies those modules, so a process whose providers register none (codegen
|
|
@@ -83608,6 +83732,12 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
|
|
|
83608
83732
|
|
|
83609
83733
|
@end
|
|
83610
83734
|
|
|
83735
|
+
// an app's Fabric component views, which its own Fabric host defines
|
|
83736
|
+
extern "C" void peachInstallFabricViews(facebook::jsi::Runtime &runtime) __attribute__((weak));
|
|
83737
|
+
|
|
83738
|
+
// UIKitCore: the key window and root view controller an app delegate makes at launch
|
|
83739
|
+
extern "C" void PeachLaunchReactNativeWindow(void);
|
|
83740
|
+
|
|
83611
83741
|
extern "C" void peachTurboInitialize() {
|
|
83612
83742
|
objc_create_block_classes_as_subclasses_of([NSObject class]);
|
|
83613
83743
|
if (Class blockClass = NSClassFromString(@"_NSBlock")) {
|
|
@@ -83621,6 +83751,7 @@ extern "C" void peachTurboInitialize() {
|
|
|
83621
83751
|
static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
|
|
83622
83752
|
*reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
|
|
83623
83753
|
}
|
|
83754
|
+
PeachLaunchReactNativeWindow();
|
|
83624
83755
|
auto& runtime = peach::jsi_runtime::create(
|
|
83625
83756
|
[] { invoker->drain(); },
|
|
83626
83757
|
[] {
|
|
@@ -83681,6 +83812,7 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
|
|
|
83681
83812
|
}];
|
|
83682
83813
|
[decorator.moduleRegistry setTurboModuleRegistry:manager];
|
|
83683
83814
|
[manager installJSBindings:runtime];
|
|
83815
|
+
if (peachInstallFabricViews) peachInstallFabricViews(runtime);
|
|
83684
83816
|
}
|
|
83685
83817
|
|
|
83686
83818
|
// the screenshot the device took, as UIKit posts it to every observer in the
|
|
@@ -83726,11 +83858,133 @@ ${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProvi
|
|
|
83726
83858
|
}
|
|
83727
83859
|
`;
|
|
83728
83860
|
}
|
|
83729
|
-
|
|
83861
|
+
function fabricHostSource(views) {
|
|
83862
|
+
const entries = views.map(
|
|
83863
|
+
({ name: name3, className: className2 }) => `@${JSON.stringify(name3)}: NSClassFromString(@${JSON.stringify(className2)})`
|
|
83864
|
+
).join(", ");
|
|
83865
|
+
return `${FABRIC_HOST_INCLUDES}
|
|
83866
|
+
@interface PeachFabricComponents : NSObject <RCTComponentViewFactoryComponentProvider>
|
|
83867
|
+
@end
|
|
83868
|
+
|
|
83869
|
+
@implementation PeachFabricComponents
|
|
83870
|
+
- (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
83871
|
+
{
|
|
83872
|
+
return @{${entries}};
|
|
83873
|
+
}
|
|
83874
|
+
@end
|
|
83875
|
+
|
|
83876
|
+
namespace {
|
|
83877
|
+
struct PeachFabricView {
|
|
83878
|
+
react::ComponentHandle handle;
|
|
83879
|
+
const react::ComponentDescriptor *descriptor;
|
|
83880
|
+
react::Props::Shared props;
|
|
83881
|
+
react::LayoutMetrics layoutMetrics;
|
|
83882
|
+
};
|
|
83883
|
+
PeachFabricComponents *fabricComponents;
|
|
83884
|
+
RCTComponentViewRegistry *fabricRegistry;
|
|
83885
|
+
std::shared_ptr<const react::ContextContainer> fabricContext;
|
|
83886
|
+
react::ComponentDescriptorRegistry::Shared fabricDescriptors;
|
|
83887
|
+
std::unordered_map<int, PeachFabricView> fabricViews;
|
|
83888
|
+
int nextFabricView = 1;
|
|
83889
|
+
std::string fabricNames = ${JSON.stringify(views.map(({ name: name3 }) => name3).join("\n"))};
|
|
83890
|
+
|
|
83891
|
+
PeachFabricView &fabricView(int tag) {
|
|
83892
|
+
auto found = fabricViews.find(tag);
|
|
83893
|
+
if (found == fabricViews.end()) {
|
|
83894
|
+
std::fprintf(stderr, "no mounted Fabric view %d\\n", tag);
|
|
83895
|
+
std::abort();
|
|
83896
|
+
}
|
|
83897
|
+
return found->second;
|
|
83898
|
+
}
|
|
83899
|
+
|
|
83900
|
+
react::Props::Shared fabricCloneProps(jsi::Runtime &rt, const PeachFabricView &view, const jsi::Value &props) {
|
|
83901
|
+
react::PropsParserContext context{-1, *fabricContext};
|
|
83902
|
+
return view.descriptor->cloneProps(context, view.props, react::RawProps(rt, props));
|
|
83903
|
+
}
|
|
83904
|
+
|
|
83905
|
+
} // namespace
|
|
83906
|
+
|
|
83907
|
+
extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
|
|
83908
|
+
fabricComponents = [PeachFabricComponents new];
|
|
83909
|
+
RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
|
|
83910
|
+
factory.thirdPartyFabricComponentsProvider = fabricComponents;
|
|
83911
|
+
fabricRegistry = [RCTComponentViewRegistry new];
|
|
83912
|
+
fabricContext = std::make_shared<const react::ContextContainer>();
|
|
83913
|
+
react::ComponentDescriptorParameters parameters{{}, fabricContext, nullptr};
|
|
83914
|
+
fabricDescriptors = [factory createComponentDescriptorRegistryWithParameters:parameters];
|
|
83915
|
+
auto views = jsi::Object(rt);
|
|
83916
|
+
auto method = [&](const char *name, unsigned count, jsi::HostFunctionType body) {
|
|
83917
|
+
views.setProperty(rt, name, jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name), count, std::move(body)));
|
|
83918
|
+
};
|
|
83919
|
+
// Create then Insert: the first props, no event emitter or state, and the
|
|
83920
|
+
// layout the view has before the engine measures it
|
|
83921
|
+
method("create", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
83922
|
+
const auto &descriptor = fabricDescriptors->at(args[0].asString(rt).utf8(rt));
|
|
83923
|
+
int tag = nextFabricView++;
|
|
83924
|
+
auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, nullptr, {}}).first->second;
|
|
83925
|
+
view.props = fabricCloneProps(rt, view, args[1]);
|
|
83926
|
+
UIView<RCTComponentViewProtocol> *componentView =
|
|
83927
|
+
[fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
|
|
83928
|
+
[componentView updateProps:view.props oldProps:nullptr];
|
|
83929
|
+
[componentView updateEventEmitter:nullptr];
|
|
83930
|
+
[componentView updateState:nullptr oldState:nullptr];
|
|
83931
|
+
[componentView updateLayoutMetrics:view.layoutMetrics oldLayoutMetrics:react::EmptyLayoutMetrics];
|
|
83932
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskAll];
|
|
83933
|
+
return jsi::Value(tag);
|
|
83934
|
+
});
|
|
83935
|
+
// Update with the props React changed since the last commit
|
|
83936
|
+
method("update", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
83937
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
83938
|
+
auto &view = fabricView(tag);
|
|
83939
|
+
auto oldProps = view.props;
|
|
83940
|
+
view.props = fabricCloneProps(rt, view, args[1]);
|
|
83941
|
+
UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
83942
|
+
[componentView updateProps:view.props oldProps:oldProps];
|
|
83943
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
|
|
83944
|
+
return jsi::Value::undefined();
|
|
83945
|
+
});
|
|
83946
|
+
// Update with the size and scale the engine laid the view out at
|
|
83947
|
+
method("layout", 4, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
83948
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
83949
|
+
auto &view = fabricView(tag);
|
|
83950
|
+
auto metrics = view.layoutMetrics;
|
|
83951
|
+
metrics.frame = react::Rect{{0, 0}, {static_cast<react::Float>(args[1].asNumber()), static_cast<react::Float>(args[2].asNumber())}};
|
|
83952
|
+
metrics.pointScaleFactor = static_cast<react::Float>(args[3].asNumber());
|
|
83953
|
+
if (metrics == view.layoutMetrics) return jsi::Value::undefined();
|
|
83954
|
+
UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
83955
|
+
[componentView updateLayoutMetrics:metrics oldLayoutMetrics:view.layoutMetrics];
|
|
83956
|
+
view.layoutMetrics = metrics;
|
|
83957
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
|
|
83958
|
+
return jsi::Value::undefined();
|
|
83959
|
+
});
|
|
83960
|
+
// Remove then Delete: the registry recycles the view
|
|
83961
|
+
method("drop", 1, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
83962
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
83963
|
+
auto &view = fabricView(tag);
|
|
83964
|
+
RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
|
|
83965
|
+
[descriptor.view removeFromSuperview];
|
|
83966
|
+
[fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
|
|
83967
|
+
fabricViews.erase(tag);
|
|
83968
|
+
return jsi::Value::undefined();
|
|
83969
|
+
});
|
|
83970
|
+
rt.global().setProperty(rt, "peachFabricViews", std::move(views));
|
|
83971
|
+
}
|
|
83972
|
+
|
|
83973
|
+
extern "C" void *peach_fabric_view_content(int tag) {
|
|
83974
|
+
return (__bridge_retained void *)[fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
83975
|
+
}
|
|
83976
|
+
|
|
83977
|
+
// the component names the host registers as views, newline separated
|
|
83978
|
+
extern "C" __attribute__((export_name("peach_fabric_component_names"))) const char *peachFabricComponentNames() {
|
|
83979
|
+
return fabricNames.c_str();
|
|
83980
|
+
}
|
|
83981
|
+
`;
|
|
83982
|
+
}
|
|
83983
|
+
var import_node_child_process51, import_node_crypto48, import_node_fs93, import_node_path89, import_node_util15, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES;
|
|
83730
83984
|
var init_turbo_source = __esm({
|
|
83731
83985
|
"src/turbo-source.ts"() {
|
|
83732
83986
|
"use strict";
|
|
83733
|
-
|
|
83987
|
+
import_node_child_process51 = require("node:child_process");
|
|
83734
83988
|
import_node_crypto48 = require("node:crypto");
|
|
83735
83989
|
import_node_fs93 = __toESM(require("node:fs"), 1);
|
|
83736
83990
|
import_node_path89 = __toESM(require("node:path"), 1);
|
|
@@ -83747,7 +84001,7 @@ var init_turbo_source = __esm({
|
|
|
83747
84001
|
init_swift_submit();
|
|
83748
84002
|
init_turbo_codegen_intake();
|
|
83749
84003
|
init_xcode_project();
|
|
83750
|
-
execFileAsync3 = (0, import_node_util15.promisify)(
|
|
84004
|
+
execFileAsync3 = (0, import_node_util15.promisify)(import_node_child_process51.execFile);
|
|
83751
84005
|
TURBO_CORE_TARGET = "TurboCore";
|
|
83752
84006
|
TURBO_FMT_TARGET = "TurboFmt";
|
|
83753
84007
|
TURBO_ENTRY_HEADER = "PeachTurboEntry.hpp";
|
|
@@ -83889,6 +84143,22 @@ class JsCallInvoker final : public react::CallInvoker {
|
|
|
83889
84143
|
std::deque<react::CallFunc> pending;
|
|
83890
84144
|
};
|
|
83891
84145
|
|
|
84146
|
+
`;
|
|
84147
|
+
FABRIC_HOST_INCLUDES = `#import <Foundation/Foundation.h>
|
|
84148
|
+
#import <React/RCTComponentViewFactory.h>
|
|
84149
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
84150
|
+
#import <React/RCTComponentViewRegistry.h>
|
|
84151
|
+
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
|
84152
|
+
#include <react/renderer/core/LayoutMetrics.h>
|
|
84153
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
84154
|
+
#include <react/renderer/core/RawProps.h>
|
|
84155
|
+
#include <react/utils/ContextContainer.h>
|
|
84156
|
+
#include <cstdio>
|
|
84157
|
+
#include <cstdlib>
|
|
84158
|
+
#include <unordered_map>
|
|
84159
|
+
#include <jsi/jsi.h>
|
|
84160
|
+
|
|
84161
|
+
using namespace facebook;
|
|
83892
84162
|
`;
|
|
83893
84163
|
}
|
|
83894
84164
|
});
|
|
@@ -83944,7 +84214,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
83944
84214
|
dependencyTargets = dependencyTargets.filter(
|
|
83945
84215
|
(_, index) => !providerNames.has(parsedTargets[index].name)
|
|
83946
84216
|
);
|
|
83947
|
-
const swift = Object.keys(files2).some((file) => file.endsWith(".swift"));
|
|
84217
|
+
const swift = collection.coreMode === "turbo" || Object.keys(files2).some((file) => file.endsWith(".swift"));
|
|
83948
84218
|
const entry = `Sources/PeachTurboApp/main.${swift ? "swift" : "cpp"}`;
|
|
83949
84219
|
const targetNames = targets.map(({ name: name3 }) => name3);
|
|
83950
84220
|
const loadTargetNames = new Set(collection.loads.map(({ target }) => target));
|
|
@@ -83953,10 +84223,56 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
83953
84223
|
(file) => file.startsWith(`${target.path}/`) && file.endsWith(".swift")
|
|
83954
84224
|
)
|
|
83955
84225
|
).map(({ name: name3 }) => name3);
|
|
83956
|
-
|
|
83957
|
-
|
|
83958
|
-
|
|
83959
|
-
|
|
84226
|
+
const initialize = [
|
|
84227
|
+
"_PeachReactNativeWindow.launch()",
|
|
84228
|
+
...collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()`),
|
|
84229
|
+
...runtime ? ["peachTurboInitialize()"] : []
|
|
84230
|
+
];
|
|
84231
|
+
const fabric = collection.fabricComponents.length > 0;
|
|
84232
|
+
files2[entry] = swift ? [
|
|
84233
|
+
"import SwiftUI",
|
|
84234
|
+
"import UIKit",
|
|
84235
|
+
"import PeachJSON",
|
|
84236
|
+
...swiftImportedTargetNames.map((target) => `import ${target}`),
|
|
84237
|
+
"",
|
|
84238
|
+
"@main struct PeachTurboApp: PeachPackage {",
|
|
84239
|
+
` init() { ${initialize.join("; ")} }`,
|
|
84240
|
+
...fabric ? [
|
|
84241
|
+
" func view(props: JSON) -> PeachTurboRoot { PeachTurboRoot(props: props) }",
|
|
84242
|
+
"}",
|
|
84243
|
+
"",
|
|
84244
|
+
"struct PeachTurboRoot: View {",
|
|
84245
|
+
" let fabric: Int32?",
|
|
84246
|
+
"",
|
|
84247
|
+
" init(props: JSON) {",
|
|
84248
|
+
' guard case .object(let fields) = props, let field = fields.first(where: { $0.0 == "fabric" }), case .number(let tag) = field.1 else {',
|
|
84249
|
+
" fabric = nil",
|
|
84250
|
+
" return",
|
|
84251
|
+
" }",
|
|
84252
|
+
" fabric = Int32(tag)",
|
|
84253
|
+
" }",
|
|
84254
|
+
"",
|
|
84255
|
+
" var body: some View {",
|
|
84256
|
+
" if let fabric { PeachFabricComponent(tag: fabric) } else { _PeachReactNativeWindow() }",
|
|
84257
|
+
" }",
|
|
84258
|
+
"}",
|
|
84259
|
+
"",
|
|
84260
|
+
"struct PeachFabricComponent: UIViewRepresentable {",
|
|
84261
|
+
" let tag: Int32",
|
|
84262
|
+
"",
|
|
84263
|
+
" func makeUIView(context: Context) -> UIView {",
|
|
84264
|
+
' guard let view = peach_fabric_view_content(tag) else { fatalError("Fabric view \\(tag) is not mounted") }',
|
|
84265
|
+
" return Unmanaged<UIView>.fromOpaque(view).takeRetainedValue()",
|
|
84266
|
+
" }",
|
|
84267
|
+
"",
|
|
84268
|
+
" func updateUIView(_ view: UIView, context: Context) {}",
|
|
84269
|
+
"}"
|
|
84270
|
+
] : [
|
|
84271
|
+
" func view(props: JSON) -> _PeachReactNativeWindow { _PeachReactNativeWindow() }",
|
|
84272
|
+
"}"
|
|
84273
|
+
],
|
|
84274
|
+
""
|
|
84275
|
+
].join("\n") : [
|
|
83960
84276
|
'extern "C" void peachTurboInitialize();',
|
|
83961
84277
|
...collection.loads.map(({ symbol: symbol2 }) => `extern "C" void ${symbol2}();`),
|
|
83962
84278
|
"int main(int argc, char **argv) {",
|
|
@@ -84031,7 +84347,7 @@ ${collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()
|
|
|
84031
84347
|
async function prepareTurboCompileInput(options) {
|
|
84032
84348
|
await prepareTurboSourceDependencies(options.reactNativeRoot);
|
|
84033
84349
|
const key2 = (0, import_node_crypto49.createHash)("sha256").update(options.providers.map(({ root }) => import_node_fs94.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs94.default.realpathSync(options.moduleRoot)).digest("hex");
|
|
84034
|
-
const scratch2 = import_node_path90.default.join(
|
|
84350
|
+
const scratch2 = import_node_path90.default.join(import_node_os20.default.tmpdir(), "peach-turbo-swift", key2);
|
|
84035
84351
|
import_node_fs94.default.mkdirSync(scratch2, { recursive: true });
|
|
84036
84352
|
const codegenDir = import_node_fs94.default.mkdtempSync(import_node_path90.default.join(scratch2, "codegen-"));
|
|
84037
84353
|
const collection = await collectTurboSources({
|
|
@@ -84245,14 +84561,14 @@ async function compileTurboModule(options) {
|
|
|
84245
84561
|
collection
|
|
84246
84562
|
};
|
|
84247
84563
|
}
|
|
84248
|
-
var import_node_crypto49, import_node_fs94, import_node_module13,
|
|
84564
|
+
var import_node_crypto49, import_node_fs94, import_node_module13, import_node_os20, import_node_path90;
|
|
84249
84565
|
var init_turbo_compile = __esm({
|
|
84250
84566
|
"src/turbo-compile.ts"() {
|
|
84251
84567
|
"use strict";
|
|
84252
84568
|
import_node_crypto49 = require("node:crypto");
|
|
84253
84569
|
import_node_fs94 = __toESM(require("node:fs"), 1);
|
|
84254
84570
|
import_node_module13 = require("node:module");
|
|
84255
|
-
|
|
84571
|
+
import_node_os20 = __toESM(require("node:os"), 1);
|
|
84256
84572
|
import_node_path90 = __toESM(require("node:path"), 1);
|
|
84257
84573
|
init_native_app_identity_project();
|
|
84258
84574
|
init_nitro_adapter();
|
|
@@ -84343,7 +84659,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84343
84659
|
import_node_fs95.default.mkdirSync(members2, { recursive: true });
|
|
84344
84660
|
const stripped2 = objects.map((file, index) => {
|
|
84345
84661
|
const output2 = import_node_path91.default.join(members2, `${index}-${import_node_path91.default.basename(file)}`);
|
|
84346
|
-
(0,
|
|
84662
|
+
(0, import_node_child_process52.execFileSync)(import_node_path91.default.join(module2.toolchainBin, "llvm-objcopy"), [
|
|
84347
84663
|
"--strip-debug",
|
|
84348
84664
|
file,
|
|
84349
84665
|
output2
|
|
@@ -84352,7 +84668,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84352
84668
|
});
|
|
84353
84669
|
const archive = import_node_path91.default.join(work, `lib${target.name}.a`);
|
|
84354
84670
|
import_node_fs95.default.rmSync(archive, { force: true });
|
|
84355
|
-
(0,
|
|
84671
|
+
(0, import_node_child_process52.execFileSync)(import_node_path91.default.join(module2.toolchainBin, "llvm-ar"), [
|
|
84356
84672
|
"rcsD",
|
|
84357
84673
|
archive,
|
|
84358
84674
|
...stripped2
|
|
@@ -84405,11 +84721,11 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84405
84721
|
return directory2;
|
|
84406
84722
|
});
|
|
84407
84723
|
}
|
|
84408
|
-
var
|
|
84724
|
+
var import_node_child_process52, import_node_fs95, import_node_path91;
|
|
84409
84725
|
var init_react_native_core_build = __esm({
|
|
84410
84726
|
"src/react-native-core-build.ts"() {
|
|
84411
84727
|
"use strict";
|
|
84412
|
-
|
|
84728
|
+
import_node_child_process52 = require("node:child_process");
|
|
84413
84729
|
import_node_fs95 = __toESM(require("node:fs"), 1);
|
|
84414
84730
|
import_node_path91 = __toESM(require("node:path"), 1);
|
|
84415
84731
|
init_home_paths();
|
|
@@ -84593,7 +84909,7 @@ var init_react_native_core = __esm({
|
|
|
84593
84909
|
init_swift_distribution();
|
|
84594
84910
|
init_swift_package();
|
|
84595
84911
|
init_swiftContract();
|
|
84596
|
-
recipe = true ? "
|
|
84912
|
+
recipe = true ? "96416de7238919b274266f095ef4213211a2a26c133d0df7ab5e0459ded52ef1" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
84597
84913
|
strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
84598
84914
|
building = /* @__PURE__ */ new Map();
|
|
84599
84915
|
}
|
|
@@ -84726,7 +85042,9 @@ function installSwiftInputTrace() {
|
|
|
84726
85042
|
import_node_path93.default.join(swiftCacheDir(), "swift-builds"),
|
|
84727
85043
|
import_node_path93.default.join(swiftCacheDir(), "swift-sdk-views"),
|
|
84728
85044
|
swiftRootLocksDir(),
|
|
84729
|
-
import_node_path93.default.join(cacheDir(), "swift-tmp")
|
|
85045
|
+
import_node_path93.default.join(cacheDir(), "swift-tmp"),
|
|
85046
|
+
// content-addressed records whose reads renew their timestamps for expiry.
|
|
85047
|
+
expoDiscoveryCacheDir()
|
|
84730
85048
|
].filter((prefix, index, all) => all.indexOf(prefix) === index);
|
|
84731
85049
|
ignoredRoots = prefixes.flatMap((root) => {
|
|
84732
85050
|
try {
|
|
@@ -84832,11 +85150,13 @@ async function witnessMatches(witness) {
|
|
|
84832
85150
|
return true;
|
|
84833
85151
|
}
|
|
84834
85152
|
async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget, moduleRoot) {
|
|
84835
|
-
const
|
|
85153
|
+
const preparesWorkspace = prepareNative && !installedWorkspace && nativeWorkspaceAvailable();
|
|
85154
|
+
const [config, expoConfig, workspace] = await Promise.all([
|
|
84836
85155
|
loadRNXAppConfig(resolveAppProject(root)),
|
|
84837
|
-
readExpoConfigAsync(root)
|
|
85156
|
+
readExpoConfigAsync(root),
|
|
85157
|
+
preparesWorkspace ? traceStore.exit(() => hashExpoWorkspace(root)) : null
|
|
84838
85158
|
]);
|
|
84839
|
-
return `${import_node_fs97.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
85159
|
+
return `${import_node_fs97.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}\0${workspace?.hash ?? ""}`;
|
|
84840
85160
|
}
|
|
84841
85161
|
function cloneNativeTarget(target) {
|
|
84842
85162
|
return {
|
|
@@ -86119,7 +86439,11 @@ function expoEntry(units, oneSDK = false) {
|
|
|
86119
86439
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
86120
86440
|
)
|
|
86121
86441
|
);
|
|
86122
|
-
const bridgeModules = units.flatMap(
|
|
86442
|
+
const bridgeModules = units.flatMap(
|
|
86443
|
+
(unit2) => unit2.bridgeModules.map(
|
|
86444
|
+
(registration) => registration === `${unit2.namespace}.__peachReactModule_${unit2.namespace}()` ? registration.slice(unit2.namespace.length + 1) : registration
|
|
86445
|
+
)
|
|
86446
|
+
);
|
|
86123
86447
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
86124
86448
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
86125
86449
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
@@ -86184,7 +86508,7 @@ function expoUnitAppPaths(unit2) {
|
|
|
86184
86508
|
});
|
|
86185
86509
|
}
|
|
86186
86510
|
function expoSwiftPackage(appKey, name3) {
|
|
86187
|
-
return import_node_path93.default.join(
|
|
86511
|
+
return import_node_path93.default.join(import_node_os21.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
|
|
86188
86512
|
}
|
|
86189
86513
|
function failureRecordPath(packagePath) {
|
|
86190
86514
|
const app = import_node_path93.default.dirname(import_node_path93.default.dirname(packagePath));
|
|
@@ -86951,16 +87275,16 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
86951
87275
|
}
|
|
86952
87276
|
return true;
|
|
86953
87277
|
}
|
|
86954
|
-
var import_node_async_hooks3,
|
|
87278
|
+
var import_node_async_hooks3, import_node_child_process53, import_node_crypto51, import_node_fs97, import_node_module15, import_node_os21, import_node_path93, import_node_url6, import_node_util17, run8, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, compiling, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
86955
87279
|
var init_expo_swift_host = __esm({
|
|
86956
87280
|
"src/expo-swift-host.ts"() {
|
|
86957
87281
|
"use strict";
|
|
86958
87282
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
86959
|
-
|
|
87283
|
+
import_node_child_process53 = require("node:child_process");
|
|
86960
87284
|
import_node_crypto51 = require("node:crypto");
|
|
86961
87285
|
import_node_fs97 = __toESM(require("node:fs"), 1);
|
|
86962
87286
|
import_node_module15 = require("node:module");
|
|
86963
|
-
|
|
87287
|
+
import_node_os21 = __toESM(require("node:os"), 1);
|
|
86964
87288
|
import_node_path93 = __toESM(require("node:path"), 1);
|
|
86965
87289
|
import_node_url6 = require("node:url");
|
|
86966
87290
|
import_node_util17 = require("node:util");
|
|
@@ -86994,7 +87318,7 @@ var init_expo_swift_host = __esm({
|
|
|
86994
87318
|
init_swift_submit();
|
|
86995
87319
|
init_swift_toolchain();
|
|
86996
87320
|
init_turbo_source();
|
|
86997
|
-
run8 = (0, import_node_util17.promisify)(
|
|
87321
|
+
run8 = (0, import_node_util17.promisify)(import_node_child_process53.execFile);
|
|
86998
87322
|
scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
|
|
86999
87323
|
EXPO_SWIFT_ROUTE = "/__peach/expo-swift";
|
|
87000
87324
|
EXPO_SWIFT_ENTRY = "Sources/PeachExpoApp/PeachExpoEntry.swift";
|
|
@@ -87116,6 +87440,7 @@ var init_launchMetadataContract = __esm({
|
|
|
87116
87440
|
"expoKotlin",
|
|
87117
87441
|
"nitro",
|
|
87118
87442
|
"turbo",
|
|
87443
|
+
"widgetExtension",
|
|
87119
87444
|
"appManifest",
|
|
87120
87445
|
"packageVersions",
|
|
87121
87446
|
"dotEnv",
|
|
@@ -87472,7 +87797,7 @@ async function readProjectOneNativeAppCatalog(projectRoot, env, runtimeExecutabl
|
|
|
87472
87797
|
const loader = (0, import_node_url7.pathToFileURL)(
|
|
87473
87798
|
import_node_path96.default.join(import_node_path96.default.dirname(onePackage), "dist/esm/vite/loadConfig.mjs")
|
|
87474
87799
|
).href;
|
|
87475
|
-
const { stdout } = await (0, import_node_util18.promisify)(
|
|
87800
|
+
const { stdout } = await (0, import_node_util18.promisify)(import_node_child_process54.execFile)(
|
|
87476
87801
|
runtimeExecutable,
|
|
87477
87802
|
[
|
|
87478
87803
|
"--input-type=module",
|
|
@@ -87489,11 +87814,11 @@ process.exit(0)`,
|
|
|
87489
87814
|
const json = stdout.split("\n").findLast((line) => line.startsWith('{"app"'));
|
|
87490
87815
|
return readOneNativeAppCatalog(json ? JSON.parse(json) : null, projectRoot);
|
|
87491
87816
|
}
|
|
87492
|
-
var
|
|
87817
|
+
var import_node_child_process54, import_node_fs99, import_node_module16, import_node_path96, import_node_url7, import_node_util18, ACCENT_BUILD_SETTING, PLIST_ACCENT;
|
|
87493
87818
|
var init_app_catalog = __esm({
|
|
87494
87819
|
"cli/app-catalog.ts"() {
|
|
87495
87820
|
"use strict";
|
|
87496
|
-
|
|
87821
|
+
import_node_child_process54 = require("node:child_process");
|
|
87497
87822
|
import_node_fs99 = __toESM(require("node:fs"), 1);
|
|
87498
87823
|
import_node_module16 = require("node:module");
|
|
87499
87824
|
import_node_path96 = __toESM(require("node:path"), 1);
|
|
@@ -88232,7 +88557,7 @@ async function prepareNitroCompileInput(options) {
|
|
|
88232
88557
|
projectRoot: options.projectRoot,
|
|
88233
88558
|
providers: reactProviders,
|
|
88234
88559
|
reactNativeRoot: collection.reactNative.root,
|
|
88235
|
-
codegenDir: import_node_fs102.default.mkdtempSync(import_node_path99.default.join(
|
|
88560
|
+
codegenDir: import_node_fs102.default.mkdtempSync(import_node_path99.default.join(import_node_os22.default.tmpdir(), "peach-nitro-react-")),
|
|
88236
88561
|
configuration: options.configuration,
|
|
88237
88562
|
installedPods: nativeLibraries
|
|
88238
88563
|
});
|
|
@@ -88287,7 +88612,7 @@ async function prepareNitroCompileInput(options) {
|
|
|
88287
88612
|
const key2 = (0, import_node_crypto55.createHash)("sha256").update(
|
|
88288
88613
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
88289
88614
|
).update("\0").update(import_node_fs102.default.realpathSync(options.moduleRoot)).update("\0").update(options.configuration).digest("hex");
|
|
88290
|
-
const packagePath = import_node_path99.default.join(
|
|
88615
|
+
const packagePath = import_node_path99.default.join(import_node_os22.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
88291
88616
|
const sharedLibrary = [...nativeLibraries.values()].find(
|
|
88292
88617
|
(pod) => pod.sharedLibrary
|
|
88293
88618
|
)?.sharedLibrary;
|
|
@@ -88340,13 +88665,13 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
88340
88665
|
...sources(import_node_path99.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
88341
88666
|
];
|
|
88342
88667
|
}
|
|
88343
|
-
var import_node_crypto55, import_node_fs102,
|
|
88668
|
+
var import_node_crypto55, import_node_fs102, import_node_os22, import_node_path99, BUNDLED_CXX_NAMESPACES;
|
|
88344
88669
|
var init_nitro_compile = __esm({
|
|
88345
88670
|
"src/nitro-compile.ts"() {
|
|
88346
88671
|
"use strict";
|
|
88347
88672
|
import_node_crypto55 = require("node:crypto");
|
|
88348
88673
|
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
88349
|
-
|
|
88674
|
+
import_node_os22 = __toESM(require("node:os"), 1);
|
|
88350
88675
|
import_node_path99 = __toESM(require("node:path"), 1);
|
|
88351
88676
|
init_installed_native_libraries();
|
|
88352
88677
|
init_native_app_identity_project();
|
|
@@ -88507,7 +88832,7 @@ var init_nitro_superset = __esm({
|
|
|
88507
88832
|
init_nitroContract();
|
|
88508
88833
|
init_swift_standin_digest();
|
|
88509
88834
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
88510
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
88835
|
+
NITRO_COMPILER_DIGEST = true ? "f44c818b566c9e2f13cc675454c9e5c38d346e0fb6fc47d33d179495a14f8580" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
88511
88836
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
88512
88837
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
88513
88838
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -88709,7 +89034,7 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
88709
89034
|
const runtimeBundle = await withSwiftRootLock(
|
|
88710
89035
|
import_node_path102.default.join(await import_promises9.default.realpath(packageDir), "bundle"),
|
|
88711
89036
|
async () => {
|
|
88712
|
-
await (0, import_node_util19.promisify)(
|
|
89037
|
+
await (0, import_node_util19.promisify)(import_node_child_process55.execFile)(
|
|
88713
89038
|
process.env.NODE_BINARY || "node",
|
|
88714
89039
|
[import_node_path102.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
88715
89040
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
@@ -88725,11 +89050,11 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
88725
89050
|
}
|
|
88726
89051
|
};
|
|
88727
89052
|
}
|
|
88728
|
-
var
|
|
89053
|
+
var import_node_child_process55, import_promises9, import_node_module18, import_node_path102, import_node_util19, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
88729
89054
|
var init_expo_widgets_bundle = __esm({
|
|
88730
89055
|
"src/expo-widgets-bundle.ts"() {
|
|
88731
89056
|
"use strict";
|
|
88732
|
-
|
|
89057
|
+
import_node_child_process55 = require("node:child_process");
|
|
88733
89058
|
import_promises9 = __toESM(require("node:fs/promises"), 1);
|
|
88734
89059
|
import_node_module18 = require("node:module");
|
|
88735
89060
|
import_node_path102 = __toESM(require("node:path"), 1);
|
|
@@ -89216,7 +89541,7 @@ var init_one_sdk_bundle = __esm({
|
|
|
89216
89541
|
var runtime_companion_default;
|
|
89217
89542
|
var init_runtime_companion = __esm({
|
|
89218
89543
|
"runtime-companion.json"() {
|
|
89219
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
89544
|
+
runtime_companion_default = { abi: 1, sha256: "0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d", file: "node/cli-0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d.cjs" };
|
|
89220
89545
|
}
|
|
89221
89546
|
});
|
|
89222
89547
|
|
|
@@ -89629,6 +89954,43 @@ var init_turbo_bundle = __esm({
|
|
|
89629
89954
|
}
|
|
89630
89955
|
});
|
|
89631
89956
|
|
|
89957
|
+
// src/widget-extension-bundle.ts
|
|
89958
|
+
async function compileWidgetExtension(appRoot, origin) {
|
|
89959
|
+
const projectRoot = await prepareNativeAppRoot(appRoot);
|
|
89960
|
+
const workspace = installedXcodeWorkspace(projectRoot);
|
|
89961
|
+
if (!workspace) return null;
|
|
89962
|
+
const extensions = readXcodeExtensionTargets(workspace).filter(({ infoPlist }) => {
|
|
89963
|
+
const extension = infoPlist.NSExtension;
|
|
89964
|
+
return typeof extension === "object" && extension !== null && "NSExtensionPointIdentifier" in extension && extension.NSExtensionPointIdentifier === "com.apple.widgetkit-extension";
|
|
89965
|
+
});
|
|
89966
|
+
if (extensions.length === 0) return null;
|
|
89967
|
+
if (extensions.length > 1)
|
|
89968
|
+
throw new Error(
|
|
89969
|
+
`${workspace}: more than one WidgetKit extension (${extensions.map(({ name: name4 }) => name4).join(", ")}) is unmeasured`
|
|
89970
|
+
);
|
|
89971
|
+
const { name: name3 } = extensions[0];
|
|
89972
|
+
const moduleRoot = await swiftDistributionRoot();
|
|
89973
|
+
await prepareXcodeSwiftPackages(workspace, name3, "Release");
|
|
89974
|
+
const root = openXcodeProject(workspace, name3, moduleRoot, "Release");
|
|
89975
|
+
return { metadata: await swiftPackageMetadata(root, name3, moduleRoot, origin) };
|
|
89976
|
+
}
|
|
89977
|
+
var WIDGET_EXTENSION_ROUTE, handleWidgetExtensionRequest;
|
|
89978
|
+
var init_widget_extension_bundle = __esm({
|
|
89979
|
+
"src/widget-extension-bundle.ts"() {
|
|
89980
|
+
"use strict";
|
|
89981
|
+
init_expo_native_workspace();
|
|
89982
|
+
init_nitro_bundle();
|
|
89983
|
+
init_swift_distribution();
|
|
89984
|
+
init_swift_host();
|
|
89985
|
+
init_xcode_project();
|
|
89986
|
+
WIDGET_EXTENSION_ROUTE = "/__peach/widget-extension";
|
|
89987
|
+
handleWidgetExtensionRequest = compiledModuleRequestHandler(
|
|
89988
|
+
"Widget extension",
|
|
89989
|
+
(root, origin) => compileWidgetExtension(root, origin)
|
|
89990
|
+
);
|
|
89991
|
+
}
|
|
89992
|
+
});
|
|
89993
|
+
|
|
89632
89994
|
// src/expo-manifest-body.ts
|
|
89633
89995
|
function parseExpoManifestBody(body) {
|
|
89634
89996
|
const opening = /^(--[^\r\n]+)\r?\n/.exec(body);
|
|
@@ -91707,7 +92069,7 @@ async function scanDevServers(opts = {}) {
|
|
|
91707
92069
|
}
|
|
91708
92070
|
return results.filter((r) => !isSootSimSelfServer(r)).sort((a, b) => a.port - b.port);
|
|
91709
92071
|
}
|
|
91710
|
-
var import_child_process, import_promises11, import_http, import_net, import_node_fs109,
|
|
92072
|
+
var import_child_process, import_promises11, import_http, import_net, import_node_fs109, import_node_os23, import_node_path109, LISTENER_LOCK_PATH, LISTENER_RESULT_PATH, LISTENER_LOCK_STALE_MS, LISTENER_LOCK_WAIT_MS, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, SERVER_SCAN_PROBE_HEADER, TCP_GATE_MS, BODY_TIMEOUT_MS, FALLBACK_PORTS, SELF_PORT_RANGE_START, SELF_PORT_RANGE_END, DevServerScanUnavailableError, LISTING_TIMEOUT_MS, LISTENER_CACHE_MS, listenerCache, inflightListing, listenerHolds, cwdByPid, cwdQueue, cwdFlushing, localIconPathCache, localIconProbeInFlight, ENRICH_TIMEOUT_MS, enrichmentCache, enrichmentInFlight, knownNonPatched, knownOne, oneNativeApps, portCache, portCacheInvalidatedAt, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
|
|
91711
92073
|
var init_dev_server_scanner = __esm({
|
|
91712
92074
|
"scripts/dev-server-scanner.ts"() {
|
|
91713
92075
|
"use strict";
|
|
@@ -91716,7 +92078,7 @@ var init_dev_server_scanner = __esm({
|
|
|
91716
92078
|
import_http = __toESM(require("http"), 1);
|
|
91717
92079
|
import_net = __toESM(require("net"), 1);
|
|
91718
92080
|
import_node_fs109 = require("node:fs");
|
|
91719
|
-
|
|
92081
|
+
import_node_os23 = require("node:os");
|
|
91720
92082
|
import_node_path109 = require("node:path");
|
|
91721
92083
|
init_backend_origin();
|
|
91722
92084
|
init_config();
|
|
@@ -91728,8 +92090,8 @@ var init_dev_server_scanner = __esm({
|
|
|
91728
92090
|
init_settings_bundle();
|
|
91729
92091
|
init_swiftDiscoveryContract();
|
|
91730
92092
|
init_optional_demo_registry();
|
|
91731
|
-
LISTENER_LOCK_PATH = (0, import_node_path109.join)((0,
|
|
91732
|
-
LISTENER_RESULT_PATH = (0, import_node_path109.join)((0,
|
|
92093
|
+
LISTENER_LOCK_PATH = (0, import_node_path109.join)((0, import_node_os23.tmpdir)(), "peach-listener-scan.lock");
|
|
92094
|
+
LISTENER_RESULT_PATH = (0, import_node_path109.join)((0, import_node_os23.tmpdir)(), "peach-listener-scan.result");
|
|
91733
92095
|
LISTENER_LOCK_STALE_MS = 25e3;
|
|
91734
92096
|
LISTENER_LOCK_WAIT_MS = 8e3;
|
|
91735
92097
|
TIMEOUT_MS = 250;
|
|
@@ -92305,7 +92667,7 @@ function mkfifoSync(p) {
|
|
|
92305
92667
|
import_node_fs111.default.unlinkSync(p);
|
|
92306
92668
|
}
|
|
92307
92669
|
}
|
|
92308
|
-
const result = (0,
|
|
92670
|
+
const result = (0, import_node_child_process56.spawnSync)("mkfifo", ["-m", "600", p]);
|
|
92309
92671
|
if (result.status !== 0) {
|
|
92310
92672
|
throw new Error(
|
|
92311
92673
|
`mkfifo(${p}) failed: ${result.stderr?.toString().trim() || "unknown error"}`
|
|
@@ -92373,7 +92735,7 @@ async function startSession(opts) {
|
|
|
92373
92735
|
if (claudeSessionUuid) {
|
|
92374
92736
|
wrapperArgs.push("--claude-session-uuid", claudeSessionUuid);
|
|
92375
92737
|
}
|
|
92376
|
-
const child = (0,
|
|
92738
|
+
const child = (0, import_node_child_process56.spawn)(executable, wrapperArgs, {
|
|
92377
92739
|
detached: true,
|
|
92378
92740
|
stdio: "ignore",
|
|
92379
92741
|
env: {
|
|
@@ -92525,11 +92887,11 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
92525
92887
|
import_node_fs111.default.closeSync(fd);
|
|
92526
92888
|
}
|
|
92527
92889
|
}
|
|
92528
|
-
var
|
|
92890
|
+
var import_node_child_process56, import_node_crypto59, import_node_fs111, import_node_path111, import_node_readline, AgentSessionError;
|
|
92529
92891
|
var init_agent_sessions = __esm({
|
|
92530
92892
|
"src/agent-sessions.ts"() {
|
|
92531
92893
|
"use strict";
|
|
92532
|
-
|
|
92894
|
+
import_node_child_process56 = require("node:child_process");
|
|
92533
92895
|
import_node_crypto59 = require("node:crypto");
|
|
92534
92896
|
import_node_fs111 = __toESM(require("node:fs"), 1);
|
|
92535
92897
|
import_node_path111 = __toESM(require("node:path"), 1);
|
|
@@ -96842,11 +97204,11 @@ function looksBinary(filePath, size) {
|
|
|
96842
97204
|
if (fd !== void 0) import_node_fs116.default.closeSync(fd);
|
|
96843
97205
|
}
|
|
96844
97206
|
}
|
|
96845
|
-
var
|
|
97207
|
+
var import_node_child_process57, import_node_fs116, import_node_path117, CheckoutRequiresGitError, BINARY_SNIFF_BYTES, LIST_FILES_TIMEOUT_MS, LIST_FILES_ATTEMPTS, LIST_FILES_RETRY_MS, CheckoutFilePlane;
|
|
96846
97208
|
var init_checkout_plane = __esm({
|
|
96847
97209
|
"cli/commands/box/checkout-plane.ts"() {
|
|
96848
97210
|
"use strict";
|
|
96849
|
-
|
|
97211
|
+
import_node_child_process57 = require("node:child_process");
|
|
96850
97212
|
import_node_fs116 = __toESM(require("node:fs"), 1);
|
|
96851
97213
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
96852
97214
|
CheckoutRequiresGitError = class extends Error {
|
|
@@ -96874,7 +97236,7 @@ var init_checkout_plane = __esm({
|
|
|
96874
97236
|
}
|
|
96875
97237
|
listFiles() {
|
|
96876
97238
|
const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
|
|
96877
|
-
const stdout = (0,
|
|
97239
|
+
const stdout = (0, import_node_child_process57.execFileSync)("git", args, {
|
|
96878
97240
|
cwd: this.root,
|
|
96879
97241
|
encoding: "utf8",
|
|
96880
97242
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -98479,11 +98841,11 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
98479
98841
|
}
|
|
98480
98842
|
return linked;
|
|
98481
98843
|
}
|
|
98482
|
-
var
|
|
98844
|
+
var import_node_child_process58, import_node_fs119, import_node_module21, import_node_path120, import_node_util20, run9, resolving;
|
|
98483
98845
|
var init_android_autolinking = __esm({
|
|
98484
98846
|
"src/android-autolinking.ts"() {
|
|
98485
98847
|
"use strict";
|
|
98486
|
-
|
|
98848
|
+
import_node_child_process58 = require("node:child_process");
|
|
98487
98849
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
98488
98850
|
import_node_module21 = require("node:module");
|
|
98489
98851
|
import_node_path120 = __toESM(require("node:path"), 1);
|
|
@@ -98492,7 +98854,7 @@ var init_android_autolinking = __esm({
|
|
|
98492
98854
|
init_forked_script_contract();
|
|
98493
98855
|
init_is_record();
|
|
98494
98856
|
init_react_native_autolinking();
|
|
98495
|
-
run9 = (0, import_node_util20.promisify)(
|
|
98857
|
+
run9 = (0, import_node_util20.promisify)(import_node_child_process58.execFile);
|
|
98496
98858
|
resolving = /* @__PURE__ */ new Map();
|
|
98497
98859
|
}
|
|
98498
98860
|
});
|
|
@@ -98587,11 +98949,11 @@ async function resolveAndroidGradleSources(request) {
|
|
|
98587
98949
|
import_node_fs120.default.rmSync(work, { recursive: true, force: true });
|
|
98588
98950
|
}
|
|
98589
98951
|
}
|
|
98590
|
-
var
|
|
98952
|
+
var import_node_child_process59, import_node_crypto62, import_node_fs120, import_node_path121, import_node_util21, run10, modelQuery;
|
|
98591
98953
|
var init_android_gradle_sources = __esm({
|
|
98592
98954
|
"src/android-gradle-sources.ts"() {
|
|
98593
98955
|
"use strict";
|
|
98594
|
-
|
|
98956
|
+
import_node_child_process59 = require("node:child_process");
|
|
98595
98957
|
import_node_crypto62 = require("node:crypto");
|
|
98596
98958
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
98597
98959
|
import_node_path121 = __toESM(require("node:path"), 1);
|
|
@@ -98599,7 +98961,7 @@ var init_android_gradle_sources = __esm({
|
|
|
98599
98961
|
init_forked_script_contract();
|
|
98600
98962
|
init_is_record();
|
|
98601
98963
|
init_kotlin_toolchain();
|
|
98602
|
-
run10 = (0, import_node_util21.promisify)(
|
|
98964
|
+
run10 = (0, import_node_util21.promisify)(import_node_child_process59.execFile);
|
|
98603
98965
|
modelQuery = `
|
|
98604
98966
|
import groovy.json.JsonOutput
|
|
98605
98967
|
import groovy.json.JsonSlurper
|
|
@@ -98972,11 +99334,11 @@ async function compileJavaModuleAbi(input) {
|
|
|
98972
99334
|
);
|
|
98973
99335
|
return library;
|
|
98974
99336
|
}
|
|
98975
|
-
var
|
|
99337
|
+
var import_node_child_process60, import_node_crypto63, import_node_fs122, import_node_path123, import_node_util22, run11, JAVA_BINDINGS_INITIALIZER;
|
|
98976
99338
|
var init_java_module_abi = __esm({
|
|
98977
99339
|
"src/java-module-abi.ts"() {
|
|
98978
99340
|
"use strict";
|
|
98979
|
-
|
|
99341
|
+
import_node_child_process60 = require("node:child_process");
|
|
98980
99342
|
import_node_crypto63 = require("node:crypto");
|
|
98981
99343
|
import_node_fs122 = __toESM(require("node:fs"), 1);
|
|
98982
99344
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
@@ -98984,7 +99346,7 @@ var init_java_module_abi = __esm({
|
|
|
98984
99346
|
init_android_bridge_packages();
|
|
98985
99347
|
init_is_record();
|
|
98986
99348
|
init_kotlin_toolchain();
|
|
98987
|
-
run11 = (0, import_node_util22.promisify)(
|
|
99349
|
+
run11 = (0, import_node_util22.promisify)(import_node_child_process60.execFile);
|
|
98988
99350
|
JAVA_BINDINGS_INITIALIZER = "initializeJavaBindings";
|
|
98989
99351
|
}
|
|
98990
99352
|
});
|
|
@@ -99118,18 +99480,18 @@ async function installKotlinSdkArchive(archive, compilerSha256) {
|
|
|
99118
99480
|
import_node_fs123.default.rmSync(work, { recursive: true, force: true });
|
|
99119
99481
|
}
|
|
99120
99482
|
}
|
|
99121
|
-
var
|
|
99483
|
+
var import_node_child_process61, import_node_crypto64, import_node_fs123, import_node_path124, import_node_util23, run12;
|
|
99122
99484
|
var init_kotlin_sdk = __esm({
|
|
99123
99485
|
"src/kotlin-sdk.ts"() {
|
|
99124
99486
|
"use strict";
|
|
99125
|
-
|
|
99487
|
+
import_node_child_process61 = require("node:child_process");
|
|
99126
99488
|
import_node_crypto64 = require("node:crypto");
|
|
99127
99489
|
import_node_fs123 = __toESM(require("node:fs"), 1);
|
|
99128
99490
|
import_node_path124 = __toESM(require("node:path"), 1);
|
|
99129
99491
|
import_node_util23 = require("node:util");
|
|
99130
99492
|
init_kotlin_toolchain();
|
|
99131
99493
|
init_kotlinSdkContract();
|
|
99132
|
-
run12 = (0, import_node_util23.promisify)(
|
|
99494
|
+
run12 = (0, import_node_util23.promisify)(import_node_child_process61.execFile);
|
|
99133
99495
|
}
|
|
99134
99496
|
});
|
|
99135
99497
|
|
|
@@ -100734,11 +101096,11 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
100734
101096
|
}
|
|
100735
101097
|
return true;
|
|
100736
101098
|
}
|
|
100737
|
-
var
|
|
101099
|
+
var import_node_child_process62, import_node_crypto66, import_node_fs126, import_node_module22, import_node_path127, import_node_util24, import_acorn3, run13, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal4, CONTENT_TYPES, KOTLIN_PACKAGE_PATH;
|
|
100738
101100
|
var init_kotlin_host = __esm({
|
|
100739
101101
|
"src/kotlin-host.ts"() {
|
|
100740
101102
|
"use strict";
|
|
100741
|
-
|
|
101103
|
+
import_node_child_process62 = require("node:child_process");
|
|
100742
101104
|
import_node_crypto66 = require("node:crypto");
|
|
100743
101105
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
100744
101106
|
import_node_module22 = require("node:module");
|
|
@@ -100754,7 +101116,7 @@ var init_kotlin_host = __esm({
|
|
|
100754
101116
|
init_kotlin_toolchain();
|
|
100755
101117
|
init_kotlin_view_models();
|
|
100756
101118
|
init_kotlin_module();
|
|
100757
|
-
run13 = (0, import_node_util24.promisify)(
|
|
101119
|
+
run13 = (0, import_node_util24.promisify)(import_node_child_process62.execFile);
|
|
100758
101120
|
KOTLIN_ARTIFACT_PREFIX = "/__peach/kotlin-artifact/";
|
|
100759
101121
|
SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
100760
101122
|
"node_modules",
|
|
@@ -104302,15 +104664,15 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
104302
104664
|
}
|
|
104303
104665
|
return { files: files2, ambiguous, verified: false, mismatched: true };
|
|
104304
104666
|
}
|
|
104305
|
-
function unverifiedContentKey(dest,
|
|
104667
|
+
function unverifiedContentKey(dest, fileDigests2) {
|
|
104306
104668
|
return JSON.stringify(
|
|
104307
104669
|
dest.placements.map(
|
|
104308
104670
|
(placement) => placement.verified ? null : [...placement.files].map(([scale, relative6]) => {
|
|
104309
104671
|
const file = (0, import_node_path133.join)(dest.directory, relative6);
|
|
104310
|
-
let digest3 =
|
|
104672
|
+
let digest3 = fileDigests2.get(file);
|
|
104311
104673
|
if (digest3 === void 0) {
|
|
104312
104674
|
digest3 = (0, import_node_crypto69.createHash)("sha256").update((0, import_node_fs132.readFileSync)(file)).digest("hex");
|
|
104313
|
-
|
|
104675
|
+
fileDigests2.set(file, digest3);
|
|
104314
104676
|
}
|
|
104315
104677
|
return [scale, digest3];
|
|
104316
104678
|
}).sort(([first], [second]) => first - second)
|
|
@@ -104401,9 +104763,9 @@ function searchMetroAssetDest(bundlePath, descriptors, command, assetsDirectory)
|
|
|
104401
104763
|
}
|
|
104402
104764
|
const best = Math.max(...holders.map((holder) => holder.verified));
|
|
104403
104765
|
const rivals = holders.filter((holder) => holder.verified === best);
|
|
104404
|
-
const
|
|
104766
|
+
const fileDigests2 = /* @__PURE__ */ new Map();
|
|
104405
104767
|
const distinct = new Set(
|
|
104406
|
-
rivals.map((rival) => unverifiedContentKey(rival.dest,
|
|
104768
|
+
rivals.map((rival) => unverifiedContentKey(rival.dest, fileDigests2))
|
|
104407
104769
|
);
|
|
104408
104770
|
const winner = rivals[0];
|
|
104409
104771
|
if (!winner) return { dest: null, searched, truncated, unconfirmed: false };
|
|
@@ -105490,6 +105852,7 @@ var init_bridge_host = __esm({
|
|
|
105490
105852
|
init_runtime_delivery();
|
|
105491
105853
|
init_runtime_packs();
|
|
105492
105854
|
init_turbo_bundle();
|
|
105855
|
+
init_widget_extension_bundle();
|
|
105493
105856
|
init_agent_host();
|
|
105494
105857
|
init_app_package_handler();
|
|
105495
105858
|
init_fetch_proxy_handler();
|
|
@@ -106522,7 +106885,7 @@ var init_bridge_host = __esm({
|
|
|
106522
106885
|
return;
|
|
106523
106886
|
}
|
|
106524
106887
|
const route = req.url?.split("?")[0] ?? "";
|
|
106525
|
-
if (route === EXPO_WIDGETS_ROUTE || route === NITRO_ROUTE || route === ONE_SDK_ROUTE || route === TURBO_ROUTE || /^\/__peach\/(?:expo-swift|swift|expo-kotlin|kotlin-artifact\/)/.test(route)) {
|
|
106888
|
+
if (route === EXPO_WIDGETS_ROUTE || route === WIDGET_EXTENSION_ROUTE || route === NITRO_ROUTE || route === ONE_SDK_ROUTE || route === TURBO_ROUTE || /^\/__peach\/(?:expo-swift|swift|expo-kotlin|kotlin-artifact\/)/.test(route)) {
|
|
106526
106889
|
this.nativeWorkInFlight++;
|
|
106527
106890
|
res.once("close", () => {
|
|
106528
106891
|
this.nativeWorkInFlight--;
|
|
@@ -106533,6 +106896,10 @@ var init_bridge_host = __esm({
|
|
|
106533
106896
|
void handleExpoWidgetsRequest(req, res);
|
|
106534
106897
|
return;
|
|
106535
106898
|
}
|
|
106899
|
+
if (route === WIDGET_EXTENSION_ROUTE) {
|
|
106900
|
+
void handleWidgetExtensionRequest(req, res);
|
|
106901
|
+
return;
|
|
106902
|
+
}
|
|
106536
106903
|
if (route === ONE_SDK_ROUTE) {
|
|
106537
106904
|
void handleOneSDKRequest(req, res);
|
|
106538
106905
|
return;
|
|
@@ -108034,7 +108401,7 @@ function pausedPids() {
|
|
|
108034
108401
|
}
|
|
108035
108402
|
function heldRoots(paused, roots) {
|
|
108036
108403
|
const parents = /* @__PURE__ */ new Map();
|
|
108037
|
-
for (const line of (0,
|
|
108404
|
+
for (const line of (0, import_node_child_process63.execFileSync)("ps", ["-A", "-o", "pid=,ppid="], {
|
|
108038
108405
|
encoding: "utf8"
|
|
108039
108406
|
}).split("\n")) {
|
|
108040
108407
|
const [pid, ppid] = line.trim().split(/\s+/).map(Number);
|
|
@@ -108096,16 +108463,16 @@ function setPauseAwareTimeout(fn, budgetMs, hostPid) {
|
|
|
108096
108463
|
schedule();
|
|
108097
108464
|
};
|
|
108098
108465
|
}
|
|
108099
|
-
var
|
|
108466
|
+
var import_node_child_process63, import_node_fs133, import_node_os24, import_node_path134, LEDGER_PATH2, TICK_MS2, timers, poll, pollDueAt;
|
|
108100
108467
|
var init_pause_aware_timeout = __esm({
|
|
108101
108468
|
"cli/pause-aware-timeout.ts"() {
|
|
108102
108469
|
"use strict";
|
|
108103
|
-
|
|
108470
|
+
import_node_child_process63 = require("node:child_process");
|
|
108104
108471
|
import_node_fs133 = require("node:fs");
|
|
108105
|
-
|
|
108472
|
+
import_node_os24 = __toESM(require("node:os"), 1);
|
|
108106
108473
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
108107
108474
|
LEDGER_PATH2 = import_node_path134.default.join(
|
|
108108
|
-
process.env.TM_HOME || import_node_path134.default.join(
|
|
108475
|
+
process.env.TM_HOME || import_node_path134.default.join(import_node_os24.default.homedir(), ".team-machine"),
|
|
108109
108476
|
"governor-pauses.json"
|
|
108110
108477
|
);
|
|
108111
108478
|
TICK_MS2 = 500;
|
|
@@ -109679,7 +110046,7 @@ function isAppBinaryPath(target) {
|
|
|
109679
110046
|
}
|
|
109680
110047
|
function extractAppBinaryBundle(binary2) {
|
|
109681
110048
|
const file = import_node_path138.default.resolve(binary2);
|
|
109682
|
-
const entries = (0,
|
|
110049
|
+
const entries = (0, import_node_child_process64.execFileSync)("unzip", ["-Z1", file], {
|
|
109683
110050
|
encoding: "utf8",
|
|
109684
110051
|
maxBuffer: 256 * 1024 * 1024
|
|
109685
110052
|
}).split("\n");
|
|
@@ -109705,7 +110072,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
109705
110072
|
const iosAssets = `${appRoot}/assets/`;
|
|
109706
110073
|
if (appRoot.startsWith("Payload/") && entries.some((entry) => entry.startsWith(iosAssets)))
|
|
109707
110074
|
patterns.push(`${iosAssets}*`);
|
|
109708
|
-
(0,
|
|
110075
|
+
(0, import_node_child_process64.execFileSync)("unzip", ["-q", "-o", file, ...patterns, "-d", extracted]);
|
|
109709
110076
|
const manifest = readPeachSidecarManifest(
|
|
109710
110077
|
JSON.parse(import_node_fs137.default.readFileSync(import_node_path138.default.join(extracted, manifestEntry), "utf8"))
|
|
109711
110078
|
);
|
|
@@ -109732,11 +110099,11 @@ function extractAppBinaryBundle(binary2) {
|
|
|
109732
110099
|
);
|
|
109733
110100
|
return { bundlePath, platform: platform2 };
|
|
109734
110101
|
}
|
|
109735
|
-
var
|
|
110102
|
+
var import_node_child_process64, import_node_crypto70, import_node_fs137, import_node_path138, import_node_zlib4;
|
|
109736
110103
|
var init_binary_sidecar = __esm({
|
|
109737
110104
|
"cli/binary-sidecar.ts"() {
|
|
109738
110105
|
"use strict";
|
|
109739
|
-
|
|
110106
|
+
import_node_child_process64 = require("node:child_process");
|
|
109740
110107
|
import_node_crypto70 = require("node:crypto");
|
|
109741
110108
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
109742
110109
|
import_node_path138 = __toESM(require("node:path"), 1);
|
|
@@ -111529,7 +111896,7 @@ function packageChromiumPath(resolved, env) {
|
|
|
111529
111896
|
const cached4 = known[key2];
|
|
111530
111897
|
if (cached4) return { ok: true, path: cached4 };
|
|
111531
111898
|
const self = rnxSelfInvocation();
|
|
111532
|
-
const probe2 = (0,
|
|
111899
|
+
const probe2 = (0, import_node_child_process65.spawnSync)(
|
|
111533
111900
|
self.executable,
|
|
111534
111901
|
[...self.prefixArgs, RNX_INTERNAL_COMMAND, RNX_INTERNAL_CHILDREN.playwrightProbe],
|
|
111535
111902
|
{
|
|
@@ -111634,7 +112001,7 @@ async function ensurePlaywrightBrowser(resolved, headless, env = process.env) {
|
|
|
111634
112001
|
};
|
|
111635
112002
|
}
|
|
111636
112003
|
const installer = rnxSelfInvocation();
|
|
111637
|
-
const install = (0,
|
|
112004
|
+
const install = (0, import_node_child_process65.spawnSync)(
|
|
111638
112005
|
installer.executable,
|
|
111639
112006
|
[
|
|
111640
112007
|
...installer.prefixArgs,
|
|
@@ -111693,11 +112060,11 @@ async function launchProvisionedPlaywright() {
|
|
|
111693
112060
|
{ headless: true }
|
|
111694
112061
|
);
|
|
111695
112062
|
}
|
|
111696
|
-
var
|
|
112063
|
+
var import_node_child_process65, import_node_fs138, import_node_module24, import_node_path139, CHROMIUM_PATHS_KEPT;
|
|
111697
112064
|
var init_playwright_provisioning = __esm({
|
|
111698
112065
|
"cli/drivers/playwright-provisioning.ts"() {
|
|
111699
112066
|
"use strict";
|
|
111700
|
-
|
|
112067
|
+
import_node_child_process65 = require("node:child_process");
|
|
111701
112068
|
import_node_fs138 = require("node:fs");
|
|
111702
112069
|
import_node_module24 = require("node:module");
|
|
111703
112070
|
import_node_path139 = require("node:path");
|
|
@@ -112177,7 +112544,7 @@ var init_crash_fingerprint = __esm({
|
|
|
112177
112544
|
// cli/telemetry.ts
|
|
112178
112545
|
function sanitizeDiagnosticMessage(value) {
|
|
112179
112546
|
const firstLine = value.slice(0, 2048).split(/[\r\n\u2028\u2029]/, 1)[0] ?? "";
|
|
112180
|
-
return firstLine.split((0,
|
|
112547
|
+
return firstLine.split((0, import_node_os25.homedir)()).join("<home>").replace(
|
|
112181
112548
|
/<package:(?:@[\w.-]+\/)?[\w.-]+>|(?:https?:\/\/|file:\/\/|[A-Za-z]:[\\/]|<home>[\\/]|\/|\.{1,2}[\\/]|\b[\w.-]+[\\/])(?:[^\s"'<>]|\s(?=[^"'<>]*[\\/]))+/g,
|
|
112182
112549
|
(location) => {
|
|
112183
112550
|
if (location.startsWith("<package:")) return location;
|
|
@@ -112209,11 +112576,11 @@ function trackCliDiagnostic(diagnostic) {
|
|
|
112209
112576
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
112210
112577
|
});
|
|
112211
112578
|
}
|
|
112212
|
-
var
|
|
112579
|
+
var import_node_os25, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
|
|
112213
112580
|
var init_telemetry = __esm({
|
|
112214
112581
|
"cli/telemetry.ts"() {
|
|
112215
112582
|
"use strict";
|
|
112216
|
-
|
|
112583
|
+
import_node_os25 = require("node:os");
|
|
112217
112584
|
init_event_identity();
|
|
112218
112585
|
init_cli_version();
|
|
112219
112586
|
init_crash_fingerprint();
|
|
@@ -114310,7 +114677,7 @@ var init_meta = __esm({
|
|
|
114310
114677
|
option("-q, --quiet", "suppress per-connection logging"),
|
|
114311
114678
|
option(
|
|
114312
114679
|
"--exit-when-unused",
|
|
114313
|
-
"the starting process holds stdin; once it closes, exit after no simulator or request has used the bridge for 10 s"
|
|
114680
|
+
"the starting process holds stdin; once it closes, exit after no simulator or request has used the bridge for 10 s, or 180 s when nothing has yet"
|
|
114314
114681
|
)
|
|
114315
114682
|
],
|
|
114316
114683
|
examples: [
|
|
@@ -118018,7 +118385,7 @@ function stageBuiltBundleManifest(bundleUrl, config) {
|
|
|
118018
118385
|
const bundle = new URL(bundleUrl);
|
|
118019
118386
|
if (!isStagedHostFileRequest(bundle.pathname) || Object.keys(config).length === 0)
|
|
118020
118387
|
return null;
|
|
118021
|
-
const directory2 = import_node_fs143.default.mkdtempSync(import_node_path144.default.join(
|
|
118388
|
+
const directory2 = import_node_fs143.default.mkdtempSync(import_node_path144.default.join(import_node_os26.default.tmpdir(), "peach-app-manifest-"));
|
|
118022
118389
|
try {
|
|
118023
118390
|
const file = import_node_path144.default.join(directory2, "manifest.json");
|
|
118024
118391
|
import_node_fs143.default.writeFileSync(file, JSON.stringify({ extra: { expoClient: config } }));
|
|
@@ -118071,6 +118438,7 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
118071
118438
|
"expoWidgets",
|
|
118072
118439
|
"nitro",
|
|
118073
118440
|
"turbo",
|
|
118441
|
+
"widgetExtension",
|
|
118074
118442
|
"expoKotlin"
|
|
118075
118443
|
].some((key2) => supplied.searchParams.has(key2)))
|
|
118076
118444
|
return applyShellLaunchOptions(supplied, opts).toString();
|
|
@@ -118208,6 +118576,10 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
118208
118576
|
"turbo",
|
|
118209
118577
|
`${nativeAssetOrigin}/__peach/turbo?root=${encodeURIComponent(expoRoot)}${opts.iosTarget ? `&iosTarget=${encodeURIComponent(opts.iosTarget)}` : ""}`
|
|
118210
118578
|
);
|
|
118579
|
+
expoStamped.searchParams.set(
|
|
118580
|
+
"widgetExtension",
|
|
118581
|
+
`${nativeAssetOrigin}/__peach/widget-extension?root=${encodeURIComponent(expoRoot)}`
|
|
118582
|
+
);
|
|
118211
118583
|
expoStamped.searchParams.set(
|
|
118212
118584
|
"oneSDK",
|
|
118213
118585
|
`${nativeAssetOrigin}/__peach/one-sdk?root=${encodeURIComponent(expoRoot)}`
|
|
@@ -118253,12 +118625,12 @@ function applyShellLaunchOptions(url, opts) {
|
|
|
118253
118625
|
for (const entry of opts.args ?? []) url.searchParams.append("arg", entry);
|
|
118254
118626
|
return url;
|
|
118255
118627
|
}
|
|
118256
|
-
var import_node_fs143,
|
|
118628
|
+
var import_node_fs143, import_node_os26, import_node_path144, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS, startedExpoConfigReads;
|
|
118257
118629
|
var init_shell_url = __esm({
|
|
118258
118630
|
"cli/commands/shell-url.ts"() {
|
|
118259
118631
|
"use strict";
|
|
118260
118632
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
118261
|
-
|
|
118633
|
+
import_node_os26 = __toESM(require("node:os"), 1);
|
|
118262
118634
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
118263
118635
|
init_oneViteAliases();
|
|
118264
118636
|
init_dev_server_scanner();
|
|
@@ -118358,12 +118730,12 @@ function skillsDir() {
|
|
|
118358
118730
|
return skillsDirPath;
|
|
118359
118731
|
}
|
|
118360
118732
|
function targetFromHome(envName, fallbackDir) {
|
|
118361
|
-
const home = process.env[envName] || path129.join(
|
|
118733
|
+
const home = process.env[envName] || path129.join(os23.homedir(), fallbackDir);
|
|
118362
118734
|
return path129.join(home, "skills");
|
|
118363
118735
|
}
|
|
118364
118736
|
function codexTargets() {
|
|
118365
118737
|
const homes = /* @__PURE__ */ new Map();
|
|
118366
|
-
const userHome = process.env.HOME ||
|
|
118738
|
+
const userHome = process.env.HOME || os23.homedir();
|
|
118367
118739
|
const primaryCodexHome = process.env.CODEX_HOME || path129.join(userHome, ".codex");
|
|
118368
118740
|
homes.set(path129.resolve(primaryCodexHome), "codex");
|
|
118369
118741
|
const tmCodexHomes = process.env.TM_CODEX_HOMES;
|
|
@@ -118491,13 +118863,13 @@ function listSkills() {
|
|
|
118491
118863
|
}
|
|
118492
118864
|
return skills.sort((a, b) => a.name.localeCompare(b.name));
|
|
118493
118865
|
}
|
|
118494
|
-
var import_child_process9, fs102,
|
|
118866
|
+
var import_child_process9, fs102, os23, path129, import_url3, import_meta4, bundledSkills, readBundledSkills, skillsDirPath;
|
|
118495
118867
|
var init_skills = __esm({
|
|
118496
118868
|
"cli/commands/skills.ts"() {
|
|
118497
118869
|
"use strict";
|
|
118498
118870
|
import_child_process9 = require("child_process");
|
|
118499
118871
|
fs102 = __toESM(require("fs"), 1);
|
|
118500
|
-
|
|
118872
|
+
os23 = __toESM(require("os"), 1);
|
|
118501
118873
|
path129 = __toESM(require("path"), 1);
|
|
118502
118874
|
import_url3 = require("url");
|
|
118503
118875
|
init_browser();
|
|
@@ -131192,7 +131564,7 @@ function repositories(body, where) {
|
|
|
131192
131564
|
if (name3 === "google") roots.push("https://dl.google.com/dl/android/maven2");
|
|
131193
131565
|
else if (name3 === "mavenCentral") roots.push("https://repo1.maven.org/maven2");
|
|
131194
131566
|
else if (name3 === "mavenLocal")
|
|
131195
|
-
roots.push(import_node_path151.default.join(
|
|
131567
|
+
roots.push(import_node_path151.default.join(import_node_os27.default.homedir(), ".m2", "repository"));
|
|
131196
131568
|
else {
|
|
131197
131569
|
const declared = direct ?? /["']([^"']+)["']/.exec(block2 ?? "")?.[1];
|
|
131198
131570
|
if (!declared)
|
|
@@ -131275,7 +131647,7 @@ function extract(bytes, where) {
|
|
|
131275
131647
|
const cached4 = pending.get(key2);
|
|
131276
131648
|
if (cached4) return cached4;
|
|
131277
131649
|
const request = (async () => {
|
|
131278
|
-
const dest = import_node_path151.default.join(
|
|
131650
|
+
const dest = import_node_path151.default.join(import_node_os27.default.tmpdir(), "peach-maven-sources", key2);
|
|
131279
131651
|
const marker = import_node_path151.default.join(dest, ".complete");
|
|
131280
131652
|
if (!import_node_fs150.default.existsSync(marker)) {
|
|
131281
131653
|
const entries = zipSources(bytes, where);
|
|
@@ -131334,13 +131706,13 @@ async function mavenKotlinSources(projectDir, coordinate, where) {
|
|
|
131334
131706
|
}
|
|
131335
131707
|
return null;
|
|
131336
131708
|
}
|
|
131337
|
-
var import_node_crypto76, import_node_fs150,
|
|
131709
|
+
var import_node_crypto76, import_node_fs150, import_node_os27, import_node_path151, import_node_zlib5, pending;
|
|
131338
131710
|
var init_kotlin_maven_sources = __esm({
|
|
131339
131711
|
"src/kotlin-maven-sources.ts"() {
|
|
131340
131712
|
"use strict";
|
|
131341
131713
|
import_node_crypto76 = require("node:crypto");
|
|
131342
131714
|
import_node_fs150 = __toESM(require("node:fs"), 1);
|
|
131343
|
-
|
|
131715
|
+
import_node_os27 = __toESM(require("node:os"), 1);
|
|
131344
131716
|
import_node_path151 = __toESM(require("node:path"), 1);
|
|
131345
131717
|
import_node_zlib5 = require("node:zlib");
|
|
131346
131718
|
pending = /* @__PURE__ */ new Map();
|
|
@@ -133011,13 +133383,13 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
|
|
|
133011
133383
|
}
|
|
133012
133384
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
133013
133385
|
const bridgeLogPath = import_node_path157.default.join(
|
|
133014
|
-
|
|
133386
|
+
import_node_os28.default.tmpdir(),
|
|
133015
133387
|
`peach-bridge-${Date.now()}-${process.pid}.log`
|
|
133016
133388
|
);
|
|
133017
133389
|
const bridgeLogFd = import_node_fs156.default.openSync(bridgeLogPath, "a");
|
|
133018
133390
|
let child;
|
|
133019
133391
|
try {
|
|
133020
|
-
child = (0,
|
|
133392
|
+
child = (0, import_node_child_process66.spawn)(
|
|
133021
133393
|
executable,
|
|
133022
133394
|
[...prefixArgs, "serve", "--quiet", "--port", String(preferredPort)],
|
|
133023
133395
|
{
|
|
@@ -133196,8 +133568,8 @@ function unreachableBridgeMessage(port, handshake, timeoutMs) {
|
|
|
133196
133568
|
return `peach open: requested bridge port ${port} is held by another program, not a peach bridge. stop it or pass a free port with --port <port>.`;
|
|
133197
133569
|
}
|
|
133198
133570
|
if (handshake === "timeout") {
|
|
133199
|
-
const cores = Math.max(1,
|
|
133200
|
-
const load2 =
|
|
133571
|
+
const cores = Math.max(1, import_node_os28.default.cpus().length);
|
|
133572
|
+
const load2 = import_node_os28.default.loadavg()[0];
|
|
133201
133573
|
if (load2 >= cores) {
|
|
133202
133574
|
return `peach open: requested bridge port ${port} did not finish its handshake within ${timeoutMs / 1e3}s while load average was ${load2.toFixed(1)} on ${cores} cores.`;
|
|
133203
133575
|
}
|
|
@@ -133264,7 +133636,7 @@ async function stagePrebuiltBundle(file, bridgePort, prepareSource) {
|
|
|
133264
133636
|
}
|
|
133265
133637
|
function normalizeReplacementPath(filePath) {
|
|
133266
133638
|
if (filePath.startsWith("~/")) {
|
|
133267
|
-
return import_node_path157.default.join(
|
|
133639
|
+
return import_node_path157.default.join(import_node_os28.default.homedir(), filePath.slice(2));
|
|
133268
133640
|
}
|
|
133269
133641
|
if (import_node_path157.default.isAbsolute(filePath)) return filePath;
|
|
133270
133642
|
return import_node_path157.default.resolve(process.cwd(), filePath);
|
|
@@ -133359,6 +133731,7 @@ function deriveCurrentSimBaseUrl(sim, fallback) {
|
|
|
133359
133731
|
url.searchParams.delete("nitro");
|
|
133360
133732
|
url.searchParams.delete("oneSDK");
|
|
133361
133733
|
url.searchParams.delete("turbo");
|
|
133734
|
+
url.searchParams.delete("widgetExtension");
|
|
133362
133735
|
return url.toString();
|
|
133363
133736
|
} catch {
|
|
133364
133737
|
return fallback;
|
|
@@ -133513,11 +133886,11 @@ function isPlaywrightHostProcess(pid) {
|
|
|
133513
133886
|
return false;
|
|
133514
133887
|
}
|
|
133515
133888
|
}
|
|
133516
|
-
const plain = (0,
|
|
133889
|
+
const plain = (0, import_node_child_process66.spawnSync)("ps", ["-o", "command=", "-p", String(pid)], {
|
|
133517
133890
|
encoding: "utf8",
|
|
133518
133891
|
stdio: ["ignore", "pipe", "pipe"]
|
|
133519
133892
|
});
|
|
133520
|
-
const withEnv = (0,
|
|
133893
|
+
const withEnv = (0, import_node_child_process66.spawnSync)("ps", ["eww", "-o", "command=", "-p", String(pid)], {
|
|
133521
133894
|
encoding: "utf8",
|
|
133522
133895
|
stdio: ["ignore", "pipe", "pipe"]
|
|
133523
133896
|
});
|
|
@@ -134494,7 +134867,7 @@ async function openSim(args, opts) {
|
|
|
134494
134867
|
});
|
|
134495
134868
|
const attached = await bridge.listSims().then((sims) => sims.find((sim) => sim.id === match.id)?.readyState ?? "gone").catch(() => "unknown");
|
|
134496
134869
|
console.error(
|
|
134497
|
-
` sim ${match.id} bridge state: ${attached}; host load ${
|
|
134870
|
+
` sim ${match.id} bridge state: ${attached}; host load ${import_node_os28.default.loadavg()[0].toFixed(1)} on ${import_node_os28.default.cpus().length} cpus (a loaded host slows a cold first bundle past the budget; a sim that is open but never answers has a blocked page)`
|
|
134498
134871
|
);
|
|
134499
134872
|
await printBridgeFailureDiagnostics(bridge, {
|
|
134500
134873
|
errorsCommand: `peach get errors 5${hint}`,
|
|
@@ -134841,16 +135214,16 @@ async function runCloseCommand(args, opts = {}) {
|
|
|
134841
135214
|
bridge.close();
|
|
134842
135215
|
}
|
|
134843
135216
|
}
|
|
134844
|
-
var
|
|
135217
|
+
var import_node_child_process66, import_node_fs156, import_node_http5, import_node_https2, import_node_net, import_node_os28, import_node_path157, import_ws7, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, OPEN_BRIDGE_RUNTIME_TIMEOUT_MS, OPEN_BRIDGE_HEALTH_TIMEOUT_MS, OPEN_BRIDGE_SILENCE_MS, LIVE_BRIDGE_HANDSHAKE_TIMEOUT_MS;
|
|
134845
135218
|
var init_control = __esm({
|
|
134846
135219
|
"cli/commands/control.ts"() {
|
|
134847
135220
|
"use strict";
|
|
134848
|
-
|
|
135221
|
+
import_node_child_process66 = require("node:child_process");
|
|
134849
135222
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
134850
135223
|
import_node_http5 = __toESM(require("node:http"), 1);
|
|
134851
135224
|
import_node_https2 = __toESM(require("node:https"), 1);
|
|
134852
135225
|
import_node_net = __toESM(require("node:net"), 1);
|
|
134853
|
-
|
|
135226
|
+
import_node_os28 = __toESM(require("node:os"), 1);
|
|
134854
135227
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
134855
135228
|
init_src();
|
|
134856
135229
|
init_src2();
|