peachsim 0.1.2301 → 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/inspect.ts +2 -1
- 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 +375 -292
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +326 -243
- 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 +372 -289
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +2 -2
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +425 -342
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- 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 +1 -1
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- 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-native-workspace.ts +85 -37
- package/src/one-sdk-preparation.ts +61 -5
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);
|
|
@@ -35141,6 +35141,45 @@ var init_oneSdkContract = __esm({
|
|
|
35141
35141
|
});
|
|
35142
35142
|
|
|
35143
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
|
+
}
|
|
35144
35183
|
async function selectOneSDK(appRoot) {
|
|
35145
35184
|
const require4 = (0, import_node_module4.createRequire)(import_node_path21.default.join(appRoot, "package.json"));
|
|
35146
35185
|
let onePackage;
|
|
@@ -35197,7 +35236,10 @@ async function prepareOneSDKSources(appRoot, output2) {
|
|
|
35197
35236
|
import_node_fs26.default.copyFileSync(import_node_path21.default.join(published3, name3), import_node_path21.default.join(directory2, name3));
|
|
35198
35237
|
return;
|
|
35199
35238
|
}
|
|
35200
|
-
const generated = await
|
|
35239
|
+
const generated = await generateAppSdkInChild(
|
|
35240
|
+
import_node_path21.default.join(selected.one, "dist/sdk/app.mjs"),
|
|
35241
|
+
selected.frameworks
|
|
35242
|
+
);
|
|
35201
35243
|
if (generated.generation !== generation)
|
|
35202
35244
|
throw new Error("One SDK source generation differs from the installed facades");
|
|
35203
35245
|
import_node_fs26.default.rmSync(directory2, { recursive: true, force: true });
|
|
@@ -35211,17 +35253,27 @@ async function prepareOneSDKSources(appRoot, output2) {
|
|
|
35211
35253
|
};
|
|
35212
35254
|
import_node_fs26.default.writeFileSync(import_node_path21.default.join(directory2, "manifest.json"), JSON.stringify(manifest));
|
|
35213
35255
|
}
|
|
35214
|
-
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;
|
|
35215
35257
|
var init_one_sdk_preparation = __esm({
|
|
35216
35258
|
"src/one-sdk-preparation.ts"() {
|
|
35217
35259
|
"use strict";
|
|
35260
|
+
import_node_child_process16 = require("node:child_process");
|
|
35218
35261
|
import_node_crypto9 = require("node:crypto");
|
|
35219
35262
|
import_node_fs26 = __toESM(require("node:fs"), 1);
|
|
35220
35263
|
import_node_module4 = require("node:module");
|
|
35264
|
+
import_node_os6 = __toESM(require("node:os"), 1);
|
|
35221
35265
|
import_node_path21 = __toESM(require("node:path"), 1);
|
|
35222
35266
|
import_node_url2 = require("node:url");
|
|
35223
35267
|
init_native_prebuilt();
|
|
35224
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
|
+
`;
|
|
35225
35277
|
}
|
|
35226
35278
|
});
|
|
35227
35279
|
|
|
@@ -40212,7 +40264,7 @@ function linuxBrowserLibsKey(id, arch) {
|
|
|
40212
40264
|
return `linux-libs/${id}/${arch}.tar.gz`;
|
|
40213
40265
|
}
|
|
40214
40266
|
function missingLibraries(executablePath, libraryPath) {
|
|
40215
|
-
const ldd = (0,
|
|
40267
|
+
const ldd = (0, import_node_child_process17.spawnSync)("ldd", [executablePath], {
|
|
40216
40268
|
encoding: "utf8",
|
|
40217
40269
|
timeout: 3e4,
|
|
40218
40270
|
env: libraryPath ? {
|
|
@@ -40275,11 +40327,11 @@ async function ensureLinuxBrowserLibraries(executablePath, browser) {
|
|
|
40275
40327
|
}
|
|
40276
40328
|
return { ok: true, libraryPath };
|
|
40277
40329
|
}
|
|
40278
|
-
var
|
|
40330
|
+
var import_node_child_process17, import_node_fs31, import_node_path26, LINUX_BROWSER_LIBS_ARCHES, LINUX_BROWSER_LIBS_MARKER;
|
|
40279
40331
|
var init_linux_browser_libs = __esm({
|
|
40280
40332
|
"cli/drivers/linux-browser-libs.ts"() {
|
|
40281
40333
|
"use strict";
|
|
40282
|
-
|
|
40334
|
+
import_node_child_process17 = require("node:child_process");
|
|
40283
40335
|
import_node_fs31 = require("node:fs");
|
|
40284
40336
|
import_node_path26 = require("node:path");
|
|
40285
40337
|
init_src();
|
|
@@ -42498,7 +42550,7 @@ function ensureSwiftLinuxRuntime(release) {
|
|
|
42498
42550
|
`);
|
|
42499
42551
|
const download3 = `${plan.dest}.${process.pid}.tmp`;
|
|
42500
42552
|
try {
|
|
42501
|
-
(0,
|
|
42553
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42502
42554
|
"curl",
|
|
42503
42555
|
[
|
|
42504
42556
|
"-fsSL",
|
|
@@ -42565,7 +42617,7 @@ function swiftCompilerRelease(release) {
|
|
|
42565
42617
|
}
|
|
42566
42618
|
function swiftToolchainBin(release) {
|
|
42567
42619
|
if (process.platform === "darwin") {
|
|
42568
|
-
const dirs = [
|
|
42620
|
+
const dirs = [import_node_os7.default.homedir(), "/"].map(
|
|
42569
42621
|
(base) => import_node_path29.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
|
|
42570
42622
|
);
|
|
42571
42623
|
return dirs.find((dir) => import_node_fs35.default.existsSync(import_node_path29.default.join(dir, "swift"))) ?? dirs[0];
|
|
@@ -42611,7 +42663,7 @@ exec ${JSON.stringify(import_node_path29.default.join(toolchainBin, "wasm-ld"))}
|
|
|
42611
42663
|
}
|
|
42612
42664
|
function peachHome() {
|
|
42613
42665
|
const override = process.env.PEACH_HOME;
|
|
42614
|
-
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");
|
|
42615
42667
|
}
|
|
42616
42668
|
function peachSwiftSdksDir() {
|
|
42617
42669
|
return process.env.PEACH_SWIFT_SDKS_PATH ?? import_node_path29.default.join(peachHome(), "swift", "sdks");
|
|
@@ -42620,7 +42672,7 @@ function agentSharedCacheRoot() {
|
|
|
42620
42672
|
if (process.platform !== "darwin" || !process.env.TM_SESSION) return null;
|
|
42621
42673
|
if (agentBuildersRoot) return agentBuildersRoot;
|
|
42622
42674
|
const policy = JSON.parse(
|
|
42623
|
-
(0,
|
|
42675
|
+
(0, import_node_child_process18.execFileSync)("tm", ["machine", "policy", "--json"], {
|
|
42624
42676
|
encoding: "utf8",
|
|
42625
42677
|
timeout: 3e4
|
|
42626
42678
|
})
|
|
@@ -42628,7 +42680,7 @@ function agentSharedCacheRoot() {
|
|
|
42628
42680
|
const mounts = policy.storage_mounts ?? [];
|
|
42629
42681
|
if (!Array.isArray(mounts)) throw new Error("storage_mounts must be a list");
|
|
42630
42682
|
const isMount = (directory2) => {
|
|
42631
|
-
const lines = (0,
|
|
42683
|
+
const lines = (0, import_node_child_process18.execFileSync)("/bin/df", ["-P", directory2], {
|
|
42632
42684
|
encoding: "utf8",
|
|
42633
42685
|
timeout: 3e4
|
|
42634
42686
|
}).trim().split("\n");
|
|
@@ -42643,13 +42695,13 @@ function agentSharedCacheRoot() {
|
|
|
42643
42695
|
throw new Error(`configured storage is not mounted: ${mount}`);
|
|
42644
42696
|
}
|
|
42645
42697
|
const heavy = policy.heavy_data_dir;
|
|
42646
|
-
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");
|
|
42647
42699
|
if (typeof heavy !== "string" || !import_node_path29.default.isAbsolute(heavy) || !import_node_fs35.default.statSync(heavy).isDirectory())
|
|
42648
42700
|
throw new Error(`configured heavy_data_dir is unavailable: ${heavy}`);
|
|
42649
42701
|
const mounted = isMount(heavy);
|
|
42650
42702
|
if (import_node_path29.default.dirname(heavy) === "/Volumes" && !mounted)
|
|
42651
42703
|
throw new Error(`configured storage is not mounted: ${heavy}`);
|
|
42652
|
-
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");
|
|
42653
42705
|
}
|
|
42654
42706
|
function buildersRootEnv() {
|
|
42655
42707
|
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
@@ -42747,7 +42799,7 @@ ${swiftInstallSteps(release, sdk2)}`
|
|
|
42747
42799
|
const swift = import_node_path29.default.join(bin, "swift");
|
|
42748
42800
|
const listed = [swift, sdk2.wasmSdkId, ...swiftSdkOptions()].join("\0");
|
|
42749
42801
|
if (!listedSdks.has(listed)) {
|
|
42750
|
-
const sdks = (0,
|
|
42802
|
+
const sdks = (0, import_node_child_process18.execFileSync)(swift, ["sdk", "list", ...swiftSdkOptions()], {
|
|
42751
42803
|
encoding: "utf8",
|
|
42752
42804
|
env: swiftEnvironment(),
|
|
42753
42805
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -42777,7 +42829,7 @@ function swiftSdkBundle(swift, id, options) {
|
|
|
42777
42829
|
const key2 = [swift, id, ...options].join("\0");
|
|
42778
42830
|
const known = sdkBundles.get(key2);
|
|
42779
42831
|
if (known && import_node_fs35.default.existsSync(known)) return known;
|
|
42780
|
-
const configuration = (0,
|
|
42832
|
+
const configuration = (0, import_node_child_process18.execFileSync)(
|
|
42781
42833
|
swift,
|
|
42782
42834
|
["sdk", "configure", ...options, "--show-configuration", id, "wasm64-unknown-wasip1"],
|
|
42783
42835
|
{ encoding: "utf8", env: swiftEnvironment(), stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -42879,7 +42931,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42879
42931
|
throw new Error("declared Swift SDK archive checksum mismatch");
|
|
42880
42932
|
const store = import_node_path29.default.join(staging, "sdks");
|
|
42881
42933
|
import_node_fs35.default.mkdirSync(store);
|
|
42882
|
-
(0,
|
|
42934
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42883
42935
|
swift,
|
|
42884
42936
|
[
|
|
42885
42937
|
"sdk",
|
|
@@ -42899,7 +42951,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42899
42951
|
const expected = swiftSdkPayloadChecksum(stagedBundle);
|
|
42900
42952
|
const locks = import_node_path29.default.join(import_node_path29.default.resolve(peachSwiftSdksDir()), ".peach-locks");
|
|
42901
42953
|
import_node_fs35.default.mkdirSync(locks, { recursive: true });
|
|
42902
|
-
(0,
|
|
42954
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42903
42955
|
"perl",
|
|
42904
42956
|
[
|
|
42905
42957
|
"-e",
|
|
@@ -42940,7 +42992,7 @@ function installSwiftSdkArchive(swift, sdk2, archive) {
|
|
|
42940
42992
|
}
|
|
42941
42993
|
}
|
|
42942
42994
|
function swiftSdkStagingDirectory(prefix) {
|
|
42943
|
-
const parent = scratch?.directory ??
|
|
42995
|
+
const parent = scratch?.directory ?? import_node_os7.default.tmpdir();
|
|
42944
42996
|
if (!import_node_fs35.default.existsSync(parent)) throw new Error(`Swift SDK install is missing ${parent}`);
|
|
42945
42997
|
return import_node_fs35.default.mkdtempSync(import_node_path29.default.join(parent, prefix));
|
|
42946
42998
|
}
|
|
@@ -42959,7 +43011,7 @@ function installSwiftWasmSdk(release, sdk2) {
|
|
|
42959
43011
|
if (sdk2.wasmSdkUrl.startsWith("file:"))
|
|
42960
43012
|
import_node_fs35.default.copyFileSync((0, import_node_url3.fileURLToPath)(sdk2.wasmSdkUrl), archive);
|
|
42961
43013
|
else
|
|
42962
|
-
(0,
|
|
43014
|
+
(0, import_node_child_process18.execFileSync)(
|
|
42963
43015
|
"curl",
|
|
42964
43016
|
[
|
|
42965
43017
|
"-fsSL",
|
|
@@ -43046,7 +43098,7 @@ async function swiftCompilerAsync(release, signal) {
|
|
|
43046
43098
|
throw new Error(`Swift compiler binary mismatch: ${relative6}`);
|
|
43047
43099
|
}
|
|
43048
43100
|
}
|
|
43049
|
-
const { stdout } = await (0, import_node_util6.promisify)(
|
|
43101
|
+
const { stdout } = await (0, import_node_util6.promisify)(import_node_child_process18.execFile)(binary2, ["--version"], {
|
|
43050
43102
|
encoding: "utf8",
|
|
43051
43103
|
env: swiftEnvironment(),
|
|
43052
43104
|
signal
|
|
@@ -43065,7 +43117,7 @@ function swiftCompiler(release) {
|
|
|
43065
43117
|
throw new Error(`Swift compiler ${release} is missing ${binary2}`);
|
|
43066
43118
|
if (release.includes("-custom-"))
|
|
43067
43119
|
verifySwiftHostCompiler(release, import_node_path29.default.resolve(bin, "../.."));
|
|
43068
|
-
const version2 = (0,
|
|
43120
|
+
const version2 = (0, import_node_child_process18.execFileSync)(binary2, ["--version"], {
|
|
43069
43121
|
encoding: "utf8",
|
|
43070
43122
|
env: swiftEnvironment(),
|
|
43071
43123
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -43136,14 +43188,14 @@ function swiftCompilerInstall(release) {
|
|
|
43136
43188
|
]
|
|
43137
43189
|
};
|
|
43138
43190
|
}
|
|
43139
|
-
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;
|
|
43140
43192
|
var init_swift_toolchain = __esm({
|
|
43141
43193
|
"src/swift-toolchain.ts"() {
|
|
43142
43194
|
"use strict";
|
|
43143
|
-
|
|
43195
|
+
import_node_child_process18 = require("node:child_process");
|
|
43144
43196
|
import_node_crypto14 = require("node:crypto");
|
|
43145
43197
|
import_node_fs35 = __toESM(require("node:fs"), 1);
|
|
43146
|
-
|
|
43198
|
+
import_node_os7 = __toESM(require("node:os"), 1);
|
|
43147
43199
|
import_node_path29 = __toESM(require("node:path"), 1);
|
|
43148
43200
|
import_node_url3 = require("node:url");
|
|
43149
43201
|
import_node_util6 = require("node:util");
|
|
@@ -43435,7 +43487,7 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
|
|
|
43435
43487
|
Math.floor(minimum % 1e4 / 100),
|
|
43436
43488
|
minimum % 100
|
|
43437
43489
|
].join(".");
|
|
43438
|
-
const result = (0,
|
|
43490
|
+
const result = (0, import_node_child_process19.spawnSync)(
|
|
43439
43491
|
import_node_path30.default.join(toolchainBin, "clang"),
|
|
43440
43492
|
[
|
|
43441
43493
|
"-target",
|
|
@@ -43468,11 +43520,11 @@ function swiftObjCPlatformFlags(toolchainBin, minimum) {
|
|
|
43468
43520
|
platforms.set(key2, flags);
|
|
43469
43521
|
return flags;
|
|
43470
43522
|
}
|
|
43471
|
-
var
|
|
43523
|
+
var import_node_child_process19, import_node_path30, platforms;
|
|
43472
43524
|
var init_swift_objc_platform = __esm({
|
|
43473
43525
|
"src/swift-objc-platform.ts"() {
|
|
43474
43526
|
"use strict";
|
|
43475
|
-
|
|
43527
|
+
import_node_child_process19 = require("node:child_process");
|
|
43476
43528
|
import_node_path30 = __toESM(require("node:path"), 1);
|
|
43477
43529
|
init_swift_toolchain();
|
|
43478
43530
|
platforms = /* @__PURE__ */ new Map();
|
|
@@ -45208,7 +45260,7 @@ function developerDirs() {
|
|
|
45208
45260
|
try {
|
|
45209
45261
|
add2(
|
|
45210
45262
|
// runner-toolchain-platform: darwin
|
|
45211
|
-
(0,
|
|
45263
|
+
(0, import_node_child_process20.execFileSync)("xcode-select", ["-p"], {
|
|
45212
45264
|
encoding: "utf8",
|
|
45213
45265
|
stdio: ["ignore", "pipe", "pipe"]
|
|
45214
45266
|
}).trim()
|
|
@@ -45227,7 +45279,7 @@ function readNativeSdk(developerDir2) {
|
|
|
45227
45279
|
const env = { ...process.env, DEVELOPER_DIR: developerDir2 };
|
|
45228
45280
|
const xcrun = (args) => (
|
|
45229
45281
|
// runner-toolchain-platform: darwin
|
|
45230
|
-
(0,
|
|
45282
|
+
(0, import_node_child_process20.execFileSync)("xcrun", args, {
|
|
45231
45283
|
encoding: "utf8",
|
|
45232
45284
|
env,
|
|
45233
45285
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -45242,7 +45294,7 @@ function readNativeSdk(developerDir2) {
|
|
|
45242
45294
|
sdk: xcrun(["--sdk", "iphonesimulator", "--show-sdk-version"]),
|
|
45243
45295
|
settings: digest3("SDKSettings.json"),
|
|
45244
45296
|
build: digest3("System/Library/CoreServices/SystemVersion.plist"),
|
|
45245
|
-
compilerVersion: (0,
|
|
45297
|
+
compilerVersion: (0, import_node_child_process20.execFileSync)(compiler, ["--version"], {
|
|
45246
45298
|
encoding: "utf8",
|
|
45247
45299
|
env,
|
|
45248
45300
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -45712,7 +45764,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45712
45764
|
for (let round = 0; ; round++) {
|
|
45713
45765
|
import_node_fs36.default.rmSync(out, { recursive: true, force: true });
|
|
45714
45766
|
import_node_fs36.default.mkdirSync(out, { recursive: true });
|
|
45715
|
-
const run14 = (0,
|
|
45767
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
45716
45768
|
...withoutCoreDump(import_node_path32.default.join(toolchainBin, "swift-symbolgraph-extract"), [
|
|
45717
45769
|
"-module-name",
|
|
45718
45770
|
surface.module,
|
|
@@ -45897,7 +45949,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45897
45949
|
)
|
|
45898
45950
|
].join("\n")
|
|
45899
45951
|
);
|
|
45900
|
-
const run14 = (0,
|
|
45952
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
45901
45953
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
45902
45954
|
[
|
|
45903
45955
|
"-typecheck",
|
|
@@ -46025,7 +46077,7 @@ function inheritedDefaultInits(surface, graphs, toolchainBin, search, moduleCach
|
|
|
46025
46077
|
)
|
|
46026
46078
|
].join("\n")
|
|
46027
46079
|
);
|
|
46028
|
-
const run14 = (0,
|
|
46080
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46029
46081
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
46030
46082
|
[
|
|
46031
46083
|
"-dump-ast",
|
|
@@ -46098,7 +46150,7 @@ function requiredInits(surface, graphs, toolchainBin, search, moduleCache, work)
|
|
|
46098
46150
|
)
|
|
46099
46151
|
].join("\n")
|
|
46100
46152
|
);
|
|
46101
|
-
const run14 = (0,
|
|
46153
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46102
46154
|
import_node_path32.default.join(toolchainBin, "swift-frontend"),
|
|
46103
46155
|
[
|
|
46104
46156
|
"-typecheck",
|
|
@@ -46157,7 +46209,7 @@ function protocolProperties(surface, headersDir, graphs, toolchainBin, search, w
|
|
|
46157
46209
|
].map((file) => `#import ${JSON.stringify(file)}
|
|
46158
46210
|
`).join("")
|
|
46159
46211
|
);
|
|
46160
|
-
const run14 = (0,
|
|
46212
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46161
46213
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46162
46214
|
[
|
|
46163
46215
|
"-x",
|
|
@@ -46240,7 +46292,7 @@ function objcDeclarationAST(surface, framework, toolchainBin, search, work, orig
|
|
|
46240
46292
|
"-ast-dump-all=json"
|
|
46241
46293
|
];
|
|
46242
46294
|
const dump2 = (filter) => {
|
|
46243
|
-
const run14 = (0,
|
|
46295
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46244
46296
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46245
46297
|
[
|
|
46246
46298
|
...args,
|
|
@@ -46322,7 +46374,7 @@ function enumValues(graphs, surface, framework, toolchainBin, search, work, orig
|
|
|
46322
46374
|
if (flag === "-sdk") flags.push("-isysroot", dir);
|
|
46323
46375
|
else flags.push(flag, dir);
|
|
46324
46376
|
}
|
|
46325
|
-
const run14 = (0,
|
|
46377
|
+
const run14 = (0, import_node_child_process20.spawnSync)(
|
|
46326
46378
|
import_node_path32.default.join(toolchainBin, "clang"),
|
|
46327
46379
|
[
|
|
46328
46380
|
"-x",
|
|
@@ -46397,11 +46449,11 @@ function constantValue(node) {
|
|
|
46397
46449
|
}
|
|
46398
46450
|
return null;
|
|
46399
46451
|
}
|
|
46400
|
-
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;
|
|
46401
46453
|
var init_swift_objc_standin = __esm({
|
|
46402
46454
|
"src/swift-objc-standin.ts"() {
|
|
46403
46455
|
"use strict";
|
|
46404
|
-
|
|
46456
|
+
import_node_child_process20 = require("node:child_process");
|
|
46405
46457
|
import_node_crypto15 = require("node:crypto");
|
|
46406
46458
|
import_node_fs36 = __toESM(require("node:fs"), 1);
|
|
46407
46459
|
import_node_path32 = __toESM(require("node:path"), 1);
|
|
@@ -46662,7 +46714,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
|
|
|
46662
46714
|
]);
|
|
46663
46715
|
const cached4 = sdkViews.get(key2);
|
|
46664
46716
|
if (cached4 && import_node_fs37.default.existsSync(cached4.manifest)) return touchSdkView(cached4.options);
|
|
46665
|
-
const configuration = (0,
|
|
46717
|
+
const configuration = (0, import_node_child_process21.execFileSync)(
|
|
46666
46718
|
import_node_path33.default.join(toolchainBin, "swift"),
|
|
46667
46719
|
[
|
|
46668
46720
|
"sdk",
|
|
@@ -46791,11 +46843,11 @@ function swiftSharedSdkInputFiles(moduleRoot) {
|
|
|
46791
46843
|
const root = swiftSharedSdkRoot(moduleRoot, false);
|
|
46792
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();
|
|
46793
46845
|
}
|
|
46794
|
-
var
|
|
46846
|
+
var import_node_child_process21, import_node_crypto16, import_node_fs37, import_node_path33, distributionHeaderRoots, WEAKEN_FOUNDATION_SYMS, sdkViews;
|
|
46795
46847
|
var init_swift_shared_sdk = __esm({
|
|
46796
46848
|
"src/swift-shared-sdk.ts"() {
|
|
46797
46849
|
"use strict";
|
|
46798
|
-
|
|
46850
|
+
import_node_child_process21 = require("node:child_process");
|
|
46799
46851
|
import_node_crypto16 = require("node:crypto");
|
|
46800
46852
|
import_node_fs37 = __toESM(require("node:fs"), 1);
|
|
46801
46853
|
import_node_path33 = __toESM(require("node:path"), 1);
|
|
@@ -46818,14 +46870,14 @@ var init_swift_shared_sdk = __esm({
|
|
|
46818
46870
|
// src/swift-darwin-records.ts
|
|
46819
46871
|
function compileDarwinRecords(args) {
|
|
46820
46872
|
const records = import_node_path34.default.join(args.packageRoot, "Sources/DarwinRecords");
|
|
46821
|
-
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-"));
|
|
46822
46874
|
(0, import_node_fs38.symlinkSync)(import_node_path34.default.join(args.darwin, "usr/include/objc"), import_node_path34.default.join(runtime, "objc"));
|
|
46823
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) => {
|
|
46824
46876
|
const object7 = import_node_path34.default.join(
|
|
46825
46877
|
args.out,
|
|
46826
46878
|
`${DARWIN_RECORDS_PREFIX}${file.replace(/\.[cm]$/, ".o")}`
|
|
46827
46879
|
);
|
|
46828
|
-
(0,
|
|
46880
|
+
(0, import_node_child_process22.execFileSync)(
|
|
46829
46881
|
import_node_path34.default.join(args.bin, "clang"),
|
|
46830
46882
|
[
|
|
46831
46883
|
"--target=wasm64-unknown-wasip1",
|
|
@@ -46860,13 +46912,13 @@ function compileDarwinRecords(args) {
|
|
|
46860
46912
|
(0, import_node_fs38.rmSync)(runtime, { recursive: true });
|
|
46861
46913
|
return objects;
|
|
46862
46914
|
}
|
|
46863
|
-
var
|
|
46915
|
+
var import_node_child_process22, import_node_fs38, import_node_os8, import_node_path34, DARWIN_RECORDS_PREFIX, darwinRecordsMinimum;
|
|
46864
46916
|
var init_swift_darwin_records = __esm({
|
|
46865
46917
|
"src/swift-darwin-records.ts"() {
|
|
46866
46918
|
"use strict";
|
|
46867
|
-
|
|
46919
|
+
import_node_child_process22 = require("node:child_process");
|
|
46868
46920
|
import_node_fs38 = require("node:fs");
|
|
46869
|
-
|
|
46921
|
+
import_node_os8 = require("node:os");
|
|
46870
46922
|
import_node_path34 = __toESM(require("node:path"), 1);
|
|
46871
46923
|
init_swift_objc_platform();
|
|
46872
46924
|
init_swift_objc_runtime();
|
|
@@ -49496,18 +49548,18 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
|
|
|
49496
49548
|
transformations
|
|
49497
49549
|
});
|
|
49498
49550
|
} else
|
|
49499
|
-
(0,
|
|
49551
|
+
(0, import_node_child_process23.execFileSync)(import_node_path35.default.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
|
|
49500
49552
|
stdio: "pipe",
|
|
49501
49553
|
maxBuffer: Infinity,
|
|
49502
49554
|
...owner
|
|
49503
49555
|
});
|
|
49504
49556
|
import_node_fs39.default.rmSync(rspPath, { force: true });
|
|
49505
49557
|
}
|
|
49506
|
-
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;
|
|
49507
49559
|
var init_swift_wasm_prune = __esm({
|
|
49508
49560
|
"src/swift-wasm-prune.ts"() {
|
|
49509
49561
|
"use strict";
|
|
49510
|
-
|
|
49562
|
+
import_node_child_process23 = require("node:child_process");
|
|
49511
49563
|
import_node_crypto17 = require("node:crypto");
|
|
49512
49564
|
import_node_fs39 = __toESM(require("node:fs"), 1);
|
|
49513
49565
|
import_node_path35 = __toESM(require("node:path"), 1);
|
|
@@ -49598,7 +49650,7 @@ var init_swift_wasm_prune = __esm({
|
|
|
49598
49650
|
// src/swift-guest-archive.ts
|
|
49599
49651
|
function aliasGuestArchive(options) {
|
|
49600
49652
|
const original = readArMembers((0, import_node_fs40.readFileSync)(options.archive));
|
|
49601
|
-
const listed = (0,
|
|
49653
|
+
const listed = (0, import_node_child_process24.execFileSync)(options.llvmAr, ["t", options.archive], {
|
|
49602
49654
|
encoding: "utf8"
|
|
49603
49655
|
}).trimEnd().split("\n");
|
|
49604
49656
|
if (!original.length || listed.length !== original.length || original.some((member, index) => member.name !== listed[index]))
|
|
@@ -49624,7 +49676,7 @@ function aliasGuestArchive(options) {
|
|
|
49624
49676
|
);
|
|
49625
49677
|
const archive = import_node_path36.default.join(options.directory, "archive.a");
|
|
49626
49678
|
(0, import_node_fs40.rmSync)(archive, { force: true });
|
|
49627
|
-
(0,
|
|
49679
|
+
(0, import_node_child_process24.execFileSync)(options.llvmAr, ["rcsD", archive, `@${response}`], { stdio: "pipe" });
|
|
49628
49680
|
const rewritten = readArMembers((0, import_node_fs40.readFileSync)(archive));
|
|
49629
49681
|
if (rewritten.length !== members2.length || rewritten.some(
|
|
49630
49682
|
(member, index) => member.name !== members2[index].alias || (0, import_node_crypto18.createHash)("sha256").update(member.bytes).digest("hex") !== members2[index].sha256
|
|
@@ -49659,11 +49711,11 @@ function aliasGuestLinkIdentities(identities, archives) {
|
|
|
49659
49711
|
}
|
|
49660
49712
|
return result;
|
|
49661
49713
|
}
|
|
49662
|
-
var
|
|
49714
|
+
var import_node_child_process24, import_node_crypto18, import_node_fs40, import_node_path36;
|
|
49663
49715
|
var init_swift_guest_archive = __esm({
|
|
49664
49716
|
"src/swift-guest-archive.ts"() {
|
|
49665
49717
|
"use strict";
|
|
49666
|
-
|
|
49718
|
+
import_node_child_process24 = require("node:child_process");
|
|
49667
49719
|
import_node_crypto18 = require("node:crypto");
|
|
49668
49720
|
import_node_fs40 = require("node:fs");
|
|
49669
49721
|
import_node_path36 = __toESM(require("node:path"), 1);
|
|
@@ -52002,7 +52054,7 @@ function linkGuestImages(options) {
|
|
|
52002
52054
|
);
|
|
52003
52055
|
const output2 = import_node_fs43.default.openSync(trace, "w");
|
|
52004
52056
|
try {
|
|
52005
|
-
(0,
|
|
52057
|
+
(0, import_node_child_process25.execFileSync)(wasmLd, [`@${response}`], { stdio: ["ignore", output2, "pipe"] });
|
|
52006
52058
|
} finally {
|
|
52007
52059
|
import_node_fs43.default.closeSync(output2);
|
|
52008
52060
|
}
|
|
@@ -52016,7 +52068,7 @@ function linkGuestImages(options) {
|
|
|
52016
52068
|
source,
|
|
52017
52069
|
'#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
|
|
52018
52070
|
);
|
|
52019
|
-
(0,
|
|
52071
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52020
52072
|
clang,
|
|
52021
52073
|
[...options.projection.clangOptions, "-c", source, "-o", discoveryProjection],
|
|
52022
52074
|
{ stdio: "pipe" }
|
|
@@ -52130,7 +52182,7 @@ function linkGuestImages(options) {
|
|
|
52130
52182
|
}
|
|
52131
52183
|
const members2 = archives.get(artifact.path);
|
|
52132
52184
|
if (!members2) continue;
|
|
52133
|
-
const listed = (0,
|
|
52185
|
+
const listed = (0, import_node_child_process25.execFileSync)(llvmAr, ["t", artifact.path], { encoding: "utf8" }).trimEnd().split("\n");
|
|
52134
52186
|
if (listed.length !== members2.length || new Set(listed).size !== listed.length || members2.some(
|
|
52135
52187
|
(member, i) => listed[i] !== member.name || import_node_path39.default.basename(member.name) !== member.name
|
|
52136
52188
|
))
|
|
@@ -52153,13 +52205,13 @@ function linkGuestImages(options) {
|
|
|
52153
52205
|
import_node_fs43.default.rmSync(output2, { force: true });
|
|
52154
52206
|
const response = import_node_path39.default.join(memberDir, "members.rsp");
|
|
52155
52207
|
import_node_fs43.default.writeFileSync(response, inputs.map((input) => JSON.stringify(input)).join(" "));
|
|
52156
|
-
(0,
|
|
52208
|
+
(0, import_node_child_process25.execFileSync)(llvmAr, ["rcs", output2, `@${response}`], { stdio: "pipe" });
|
|
52157
52209
|
replacements.set(artifact.path, output2);
|
|
52158
52210
|
}
|
|
52159
52211
|
const irPath = import_node_path39.default.join(directory2, "ledger.ll");
|
|
52160
52212
|
const ledgerObject = import_node_path39.default.join(directory2, "ledger.o");
|
|
52161
52213
|
import_node_fs43.default.writeFileSync(irPath, ledger.llvmIR);
|
|
52162
|
-
(0,
|
|
52214
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52163
52215
|
clang,
|
|
52164
52216
|
["--target=wasm64-unknown-wasip1", "-c", irPath, "-o", ledgerObject],
|
|
52165
52217
|
{ stdio: "pipe" }
|
|
@@ -52201,7 +52253,7 @@ function linkGuestImages(options) {
|
|
|
52201
52253
|
const projectionSource = import_node_path39.default.join(directory2, "projection.c");
|
|
52202
52254
|
projectionObject = import_node_path39.default.join(directory2, "projection.o");
|
|
52203
52255
|
import_node_fs43.default.writeFileSync(projectionSource, projectionStorage.source);
|
|
52204
|
-
(0,
|
|
52256
|
+
(0, import_node_child_process25.execFileSync)(
|
|
52205
52257
|
clang,
|
|
52206
52258
|
[...projection.clangOptions, "-c", projectionSource, "-o", projectionObject],
|
|
52207
52259
|
{
|
|
@@ -52378,7 +52430,7 @@ function discoverGuestLinkInputs(options) {
|
|
|
52378
52430
|
const trace = import_node_path39.default.join(options.directory, "preselection-inputs.txt");
|
|
52379
52431
|
const traceOutput = import_node_fs43.default.openSync(trace, "w");
|
|
52380
52432
|
try {
|
|
52381
|
-
(0,
|
|
52433
|
+
(0, import_node_child_process25.execFileSync)(options.wasmLd, [`@${response}`], {
|
|
52382
52434
|
stdio: ["ignore", traceOutput, "pipe"]
|
|
52383
52435
|
});
|
|
52384
52436
|
} finally {
|
|
@@ -52536,7 +52588,7 @@ function verifyGuestSymbolScopes(options) {
|
|
|
52536
52588
|
const tracePath = import_node_path39.default.join(options.directory, "scope-trace.txt");
|
|
52537
52589
|
const traceOutput = import_node_fs43.default.openSync(tracePath, "w");
|
|
52538
52590
|
try {
|
|
52539
|
-
(0,
|
|
52591
|
+
(0, import_node_child_process25.execFileSync)(options.wasmLd, [`@${response}`], {
|
|
52540
52592
|
stdio: ["ignore", traceOutput, "pipe"]
|
|
52541
52593
|
});
|
|
52542
52594
|
} finally {
|
|
@@ -52802,11 +52854,11 @@ function linkPrunedGuestImages(options) {
|
|
|
52802
52854
|
if (!result) throw new Error("guest link did not receive pruned inputs");
|
|
52803
52855
|
return result;
|
|
52804
52856
|
}
|
|
52805
|
-
var
|
|
52857
|
+
var import_node_child_process25, import_node_fs43, import_node_path39, import_node_string_decoder;
|
|
52806
52858
|
var init_swift_guest_link = __esm({
|
|
52807
52859
|
"src/swift-guest-link.ts"() {
|
|
52808
52860
|
"use strict";
|
|
52809
|
-
|
|
52861
|
+
import_node_child_process25 = require("node:child_process");
|
|
52810
52862
|
import_node_fs43 = __toESM(require("node:fs"), 1);
|
|
52811
52863
|
import_node_path39 = __toESM(require("node:path"), 1);
|
|
52812
52864
|
import_node_string_decoder = require("node:string_decoder");
|
|
@@ -52910,7 +52962,7 @@ function sourceGuestClangLinkOptions(options) {
|
|
|
52910
52962
|
throw new Error(`missing clang ${flag} for ${file}`);
|
|
52911
52963
|
args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
|
|
52912
52964
|
}
|
|
52913
|
-
(0,
|
|
52965
|
+
(0, import_node_child_process26.execFileSync)(command.args[0], [...args, "-S", "-emit-llvm"], { stdio: "inherit" });
|
|
52914
52966
|
const flags = clangIrLinkOptions((0, import_node_fs44.readFileSync)(output2, "utf8"));
|
|
52915
52967
|
for (let index2 = 0; index2 < flags.length; index2++) {
|
|
52916
52968
|
const flag = flags[index2];
|
|
@@ -53048,7 +53100,7 @@ function sourceGuestRuntimeLinks(options) {
|
|
|
53048
53100
|
response,
|
|
53049
53101
|
image.objects.map((file) => JSON.stringify(file)).join("\n") + "\n"
|
|
53050
53102
|
);
|
|
53051
|
-
const autolink = image.objects.length ? (0,
|
|
53103
|
+
const autolink = image.objects.length ? (0, import_node_child_process26.execFileSync)(
|
|
53052
53104
|
import_node_path40.default.join(options.toolchainBin, "swift-autolink-extract"),
|
|
53053
53105
|
[`@${response}`, "-o", "-"],
|
|
53054
53106
|
{ encoding: "utf8" }
|
|
@@ -53141,11 +53193,11 @@ function logicalGuestLinkOptions(args, identities, roots) {
|
|
|
53141
53193
|
}
|
|
53142
53194
|
return output2;
|
|
53143
53195
|
}
|
|
53144
|
-
var
|
|
53196
|
+
var import_node_child_process26, import_node_crypto21, import_node_fs44, import_node_path40, CLANG_TARGET_MODULE_WRAPPER;
|
|
53145
53197
|
var init_swift_guest_source_inputs = __esm({
|
|
53146
53198
|
"src/swift-guest-source-inputs.ts"() {
|
|
53147
53199
|
"use strict";
|
|
53148
|
-
|
|
53200
|
+
import_node_child_process26 = require("node:child_process");
|
|
53149
53201
|
import_node_crypto21 = require("node:crypto");
|
|
53150
53202
|
import_node_fs44 = require("node:fs");
|
|
53151
53203
|
import_node_path40 = __toESM(require("node:path"), 1);
|
|
@@ -53414,7 +53466,7 @@ async function runWasmOpt(file, output2, optimize, skipPasses, binary2) {
|
|
|
53414
53466
|
const thunks = `${output2}.thunks.wat`;
|
|
53415
53467
|
(0, import_node_fs45.writeFileSync)(guest, narrowed.module);
|
|
53416
53468
|
(0, import_node_fs45.writeFileSync)(thunks, narrowed.thunks);
|
|
53417
|
-
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"), [
|
|
53418
53470
|
...features,
|
|
53419
53471
|
...names,
|
|
53420
53472
|
guest,
|
|
@@ -53473,11 +53525,11 @@ async function lowerWasm(file, output2, options) {
|
|
|
53473
53525
|
await installWasmOpt()
|
|
53474
53526
|
);
|
|
53475
53527
|
}
|
|
53476
|
-
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;
|
|
53477
53529
|
var init_wasm_optimize = __esm({
|
|
53478
53530
|
"src/wasm-optimize.ts"() {
|
|
53479
53531
|
"use strict";
|
|
53480
|
-
|
|
53532
|
+
import_node_child_process27 = require("node:child_process");
|
|
53481
53533
|
import_node_fs45 = require("node:fs");
|
|
53482
53534
|
import_node_path41 = require("node:path");
|
|
53483
53535
|
import_node_util7 = require("node:util");
|
|
@@ -53576,7 +53628,7 @@ async function compileGuestLink(options) {
|
|
|
53576
53628
|
stubSource,
|
|
53577
53629
|
'#include "guest-image-projection.h"\nconst struct peach_guest_image __peach_guest_images[] = {{0}};\nconst uint32_t __peach_guest_image_count = 0;\n'
|
|
53578
53630
|
);
|
|
53579
|
-
(0,
|
|
53631
|
+
(0, import_node_child_process28.execFileSync)(
|
|
53580
53632
|
import_node_path42.default.join(options.toolchainBin, "clang"),
|
|
53581
53633
|
[...clangOptions, "-c", stubSource, "-o", stub],
|
|
53582
53634
|
{ stdio: "pipe" }
|
|
@@ -53893,11 +53945,11 @@ async function compileGuestLink(options) {
|
|
|
53893
53945
|
});
|
|
53894
53946
|
(0, import_node_fs46.writeFileSync)(options.optimized, finalized.wasm);
|
|
53895
53947
|
}
|
|
53896
|
-
var
|
|
53948
|
+
var import_node_child_process28, import_node_fs46, import_node_path42;
|
|
53897
53949
|
var init_swift_guest_compile = __esm({
|
|
53898
53950
|
"src/swift-guest-compile.ts"() {
|
|
53899
53951
|
"use strict";
|
|
53900
|
-
|
|
53952
|
+
import_node_child_process28 = require("node:child_process");
|
|
53901
53953
|
import_node_fs46 = require("node:fs");
|
|
53902
53954
|
import_node_path42 = __toESM(require("node:path"), 1);
|
|
53903
53955
|
init_swift_guest_archive();
|
|
@@ -53985,7 +54037,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
53985
54037
|
const cacheId = `${quality}:${key2}`;
|
|
53986
54038
|
const cached4 = brotliMemoryCache.get(cacheId);
|
|
53987
54039
|
if (cached4) return cached4;
|
|
53988
|
-
const dir = import_node_path43.default.join(
|
|
54040
|
+
const dir = import_node_path43.default.join(import_node_os9.default.homedir(), ".peach", "cache", "swift-brotli");
|
|
53989
54041
|
const file = import_node_path43.default.join(dir, `${key2}${quality === 11 ? "" : "-q4"}.br`);
|
|
53990
54042
|
let compressed;
|
|
53991
54043
|
try {
|
|
@@ -54119,7 +54171,7 @@ function swiftIcuAddress(icu) {
|
|
|
54119
54171
|
function swiftIcuPacked(icu) {
|
|
54120
54172
|
return memo(packedFiles, icu.sha256, async () => {
|
|
54121
54173
|
const file = import_node_path43.default.join(
|
|
54122
|
-
|
|
54174
|
+
import_node_os9.default.homedir(),
|
|
54123
54175
|
".peach",
|
|
54124
54176
|
"cache",
|
|
54125
54177
|
"swift-brotli",
|
|
@@ -54146,21 +54198,21 @@ async function swiftIcuBundleAsset(icu) {
|
|
|
54146
54198
|
contentType: "application/octet-stream"
|
|
54147
54199
|
};
|
|
54148
54200
|
}
|
|
54149
|
-
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;
|
|
54150
54202
|
var init_swift_icu = __esm({
|
|
54151
54203
|
"src/swift-icu.ts"() {
|
|
54152
54204
|
"use strict";
|
|
54153
|
-
|
|
54205
|
+
import_node_child_process29 = require("node:child_process");
|
|
54154
54206
|
import_node_crypto22 = require("node:crypto");
|
|
54155
54207
|
import_node_fs47 = require("node:fs");
|
|
54156
54208
|
import_promises4 = require("node:fs/promises");
|
|
54157
|
-
|
|
54209
|
+
import_node_os9 = __toESM(require("node:os"), 1);
|
|
54158
54210
|
import_node_path43 = __toESM(require("node:path"), 1);
|
|
54159
54211
|
import_node_util8 = require("node:util");
|
|
54160
54212
|
import_node_zlib2 = require("node:zlib");
|
|
54161
54213
|
init_icuData();
|
|
54162
54214
|
init_swift_toolchain();
|
|
54163
|
-
run6 = (0, import_node_util8.promisify)(
|
|
54215
|
+
run6 = (0, import_node_util8.promisify)(import_node_child_process29.execFile);
|
|
54164
54216
|
deflate = (0, import_node_util8.promisify)(import_node_zlib2.gzip);
|
|
54165
54217
|
compressBrotli = (0, import_node_util8.promisify)(import_node_zlib2.brotliCompress);
|
|
54166
54218
|
inflateGzip = (0, import_node_util8.promisify)(import_node_zlib2.gunzip);
|
|
@@ -54344,7 +54396,7 @@ function prepareSwiftProjectProcess(root, user) {
|
|
|
54344
54396
|
(0, import_node_fs49.mkdirSync)(tmp, { recursive: true });
|
|
54345
54397
|
const caches = ["cache", "config", "security"].map((name3) => import_node_path45.default.join(swiftpm, name3));
|
|
54346
54398
|
for (const directory2 of caches) (0, import_node_fs49.mkdirSync)(directory2, { recursive: true });
|
|
54347
|
-
(0,
|
|
54399
|
+
(0, import_node_child_process30.execFileSync)("chown", ["-R", "-P", `${user.uid}:${user.gid}`, root, home]);
|
|
54348
54400
|
(0, import_node_fs49.chmodSync)(root, 448);
|
|
54349
54401
|
(0, import_node_fs49.chmodSync)(home, 448);
|
|
54350
54402
|
return {
|
|
@@ -54367,7 +54419,7 @@ function prepareSwiftProjectProcess(root, user) {
|
|
|
54367
54419
|
};
|
|
54368
54420
|
}
|
|
54369
54421
|
function endSwiftProjectProcesses(user) {
|
|
54370
|
-
(0,
|
|
54422
|
+
(0, import_node_child_process30.execFileSync)("sh", ["-c", "kill -s KILL -- -1 2>/dev/null || true"], {
|
|
54371
54423
|
uid: user.uid,
|
|
54372
54424
|
gid: user.gid
|
|
54373
54425
|
});
|
|
@@ -54394,11 +54446,11 @@ function removeProjectLinks(root) {
|
|
|
54394
54446
|
}
|
|
54395
54447
|
}
|
|
54396
54448
|
}
|
|
54397
|
-
var
|
|
54449
|
+
var import_node_child_process30, import_node_fs49, import_node_path45;
|
|
54398
54450
|
var init_swift_project_user = __esm({
|
|
54399
54451
|
"src/swift-project-user.ts"() {
|
|
54400
54452
|
"use strict";
|
|
54401
|
-
|
|
54453
|
+
import_node_child_process30 = require("node:child_process");
|
|
54402
54454
|
import_node_fs49 = require("node:fs");
|
|
54403
54455
|
import_node_path45 = __toESM(require("node:path"), 1);
|
|
54404
54456
|
}
|
|
@@ -54406,7 +54458,7 @@ var init_swift_project_user = __esm({
|
|
|
54406
54458
|
|
|
54407
54459
|
// src/swift-reproducible.ts
|
|
54408
54460
|
function swiftReproducibleBuildFlags(roots) {
|
|
54409
|
-
return [[
|
|
54461
|
+
return [[import_node_os10.default.homedir(), "home"], ...roots].flatMap(
|
|
54410
54462
|
([root, name3]) => [.../* @__PURE__ */ new Set([root, (0, import_node_fs50.realpathSync)(root)])].map((from) => `${from}=/peach/${name3}`)
|
|
54411
54463
|
).flatMap((map2) => [
|
|
54412
54464
|
"-Xswiftc",
|
|
@@ -54419,12 +54471,12 @@ function swiftReproducibleBuildFlags(roots) {
|
|
|
54419
54471
|
`-ffile-prefix-map=${map2}`
|
|
54420
54472
|
]);
|
|
54421
54473
|
}
|
|
54422
|
-
var import_node_fs50,
|
|
54474
|
+
var import_node_fs50, import_node_os10;
|
|
54423
54475
|
var init_swift_reproducible = __esm({
|
|
54424
54476
|
"src/swift-reproducible.ts"() {
|
|
54425
54477
|
"use strict";
|
|
54426
54478
|
import_node_fs50 = require("node:fs");
|
|
54427
|
-
|
|
54479
|
+
import_node_os10 = __toESM(require("node:os"), 1);
|
|
54428
54480
|
}
|
|
54429
54481
|
});
|
|
54430
54482
|
|
|
@@ -54511,11 +54563,11 @@ function groupAlive(table, leader) {
|
|
|
54511
54563
|
return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
|
|
54512
54564
|
}
|
|
54513
54565
|
function swiftRootLocksDir() {
|
|
54514
|
-
return import_node_path46.default.join((0,
|
|
54566
|
+
return import_node_path46.default.join((0, import_node_os11.homedir)(), ".peach", "cache", "swift-root-locks");
|
|
54515
54567
|
}
|
|
54516
54568
|
function withCocoaPodsCacheLock(work) {
|
|
54517
54569
|
return withSwiftRootLock(
|
|
54518
|
-
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"),
|
|
54519
54571
|
work
|
|
54520
54572
|
);
|
|
54521
54573
|
}
|
|
@@ -54592,7 +54644,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
54592
54644
|
}
|
|
54593
54645
|
},
|
|
54594
54646
|
spawn(command, args, options, companion) {
|
|
54595
|
-
const child = (0,
|
|
54647
|
+
const child = (0, import_node_child_process31.spawn)(
|
|
54596
54648
|
"/bin/sh",
|
|
54597
54649
|
["-c", 'IFS= read -r go || exit 1; exec "$@" </dev/null', "sh", command, ...args],
|
|
54598
54650
|
{ ...options, detached: true, stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -54622,14 +54674,14 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
54622
54674
|
(0, import_node_fs51.writeFileSync)(import_node_path46.default.join(directory2, name2(held, "released")), "");
|
|
54623
54675
|
}
|
|
54624
54676
|
}
|
|
54625
|
-
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;
|
|
54626
54678
|
var init_swift_root_lock = __esm({
|
|
54627
54679
|
"src/swift-root-lock.ts"() {
|
|
54628
54680
|
"use strict";
|
|
54629
|
-
|
|
54681
|
+
import_node_child_process31 = require("node:child_process");
|
|
54630
54682
|
import_node_crypto23 = require("node:crypto");
|
|
54631
54683
|
import_node_fs51 = require("node:fs");
|
|
54632
|
-
|
|
54684
|
+
import_node_os11 = require("node:os");
|
|
54633
54685
|
import_node_path46 = __toESM(require("node:path"), 1);
|
|
54634
54686
|
init_process_group();
|
|
54635
54687
|
init_process_table();
|
|
@@ -54644,7 +54696,7 @@ var init_swift_root_lock = __esm({
|
|
|
54644
54696
|
function compileUniformTypeConstants(args) {
|
|
54645
54697
|
const source = import_node_path47.default.join(args.packageRoot, "runtime/UniformTypeIdentifiersConstants.m");
|
|
54646
54698
|
const object7 = import_node_path47.default.join(args.out, "UniformTypeIdentifiers-NativeConstants.o");
|
|
54647
|
-
(0,
|
|
54699
|
+
(0, import_node_child_process32.execFileSync)(
|
|
54648
54700
|
import_node_path47.default.join(args.bin, "clang"),
|
|
54649
54701
|
[
|
|
54650
54702
|
"--target=wasm64-unknown-wasip1",
|
|
@@ -54665,11 +54717,11 @@ function compileUniformTypeConstants(args) {
|
|
|
54665
54717
|
);
|
|
54666
54718
|
return object7;
|
|
54667
54719
|
}
|
|
54668
|
-
var
|
|
54720
|
+
var import_node_child_process32, import_node_path47;
|
|
54669
54721
|
var init_swift_uniform_type_constants = __esm({
|
|
54670
54722
|
"src/swift-uniform-type-constants.ts"() {
|
|
54671
54723
|
"use strict";
|
|
54672
|
-
|
|
54724
|
+
import_node_child_process32 = require("node:child_process");
|
|
54673
54725
|
import_node_path47 = __toESM(require("node:path"), 1);
|
|
54674
54726
|
init_swift_objc_runtime();
|
|
54675
54727
|
init_swift_objc_standin();
|
|
@@ -54809,7 +54861,7 @@ async function runCompiler(command, args, options, stream = false, quiet) {
|
|
|
54809
54861
|
detached: true,
|
|
54810
54862
|
stdio: ["ignore", "pipe", "pipe"]
|
|
54811
54863
|
};
|
|
54812
|
-
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);
|
|
54813
54865
|
let stopping;
|
|
54814
54866
|
try {
|
|
54815
54867
|
return await new Promise((resolve14, reject) => {
|
|
@@ -54887,7 +54939,7 @@ function swiftBuildJobs() {
|
|
|
54887
54939
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
54888
54940
|
return Math.min(
|
|
54889
54941
|
process.platform === "darwin" ? Infinity : 4,
|
|
54890
|
-
Math.max(1, Math.floor(
|
|
54942
|
+
Math.max(1, Math.floor(import_node_os12.default.availableParallelism() / 2)),
|
|
54891
54943
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
54892
54944
|
);
|
|
54893
54945
|
}
|
|
@@ -55341,7 +55393,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin) {
|
|
|
55341
55393
|
const key2 = JSON.stringify([toolchainBin, sdk2, options]);
|
|
55342
55394
|
const cached4 = sdkPaths.get(key2);
|
|
55343
55395
|
if (cached4) return cached4;
|
|
55344
|
-
const configuration = (0,
|
|
55396
|
+
const configuration = (0, import_node_child_process33.execFileSync)(
|
|
55345
55397
|
import_node_path50.default.join(toolchainBin, "swift"),
|
|
55346
55398
|
[
|
|
55347
55399
|
"sdk",
|
|
@@ -59643,14 +59695,14 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
59643
59695
|
options.signal
|
|
59644
59696
|
);
|
|
59645
59697
|
}
|
|
59646
|
-
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;
|
|
59647
59699
|
var init_swift_compile = __esm({
|
|
59648
59700
|
"src/swift-compile.ts"() {
|
|
59649
59701
|
"use strict";
|
|
59650
|
-
|
|
59702
|
+
import_node_child_process33 = require("node:child_process");
|
|
59651
59703
|
import_node_crypto24 = require("node:crypto");
|
|
59652
59704
|
import_node_fs54 = require("node:fs");
|
|
59653
|
-
|
|
59705
|
+
import_node_os12 = __toESM(require("node:os"), 1);
|
|
59654
59706
|
import_node_path50 = __toESM(require("node:path"), 1);
|
|
59655
59707
|
v5 = __toESM(require("valibot"), 1);
|
|
59656
59708
|
init_admitted_mac_build();
|
|
@@ -60870,7 +60922,7 @@ async function swiftDistributionRoot(signal) {
|
|
|
60870
60922
|
}
|
|
60871
60923
|
async function installSwiftToolchain(release, sdk2, signal, compilerOnly = false) {
|
|
60872
60924
|
const root = import_node_path52.default.resolve(swiftToolchainBin(release), "../..");
|
|
60873
|
-
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);
|
|
60874
60926
|
const selectedCompiler = process.platform === "darwin" && import_node_fs56.default.existsSync(import_node_path52.default.join(root, "usr/bin/swift"));
|
|
60875
60927
|
if (release.includes("-custom-") && root === owned && !selectedCompiler && !swiftCompilerReady(release)) {
|
|
60876
60928
|
const archive = swiftHostCompilerArchive(release);
|
|
@@ -60973,12 +61025,12 @@ function swiftModuleToolchain(root) {
|
|
|
60973
61025
|
const { release } = swiftModuleCompiler(root);
|
|
60974
61026
|
return { release, toolchainBin: swiftToolchain(release, swiftModuleSdk(root)) };
|
|
60975
61027
|
}
|
|
60976
|
-
var import_node_fs56,
|
|
61028
|
+
var import_node_fs56, import_node_os13, import_node_path52, SWIFT_ENDPOINT_ENV, DEFAULT_SWIFT_ENDPOINT, installs, staleWarned;
|
|
60977
61029
|
var init_swift_distribution = __esm({
|
|
60978
61030
|
"src/swift-distribution.ts"() {
|
|
60979
61031
|
"use strict";
|
|
60980
61032
|
import_node_fs56 = __toESM(require("node:fs"), 1);
|
|
60981
|
-
|
|
61033
|
+
import_node_os13 = __toESM(require("node:os"), 1);
|
|
60982
61034
|
import_node_path52 = __toESM(require("node:path"), 1);
|
|
60983
61035
|
init_src();
|
|
60984
61036
|
init_linux_browser_libs();
|
|
@@ -61069,7 +61121,7 @@ function dumpInputs(dir) {
|
|
|
61069
61121
|
path: command,
|
|
61070
61122
|
realpath: import_node_fs57.default.realpathSync(command),
|
|
61071
61123
|
sha256: (0, import_node_crypto26.createHash)("sha256").update(import_node_fs57.default.readFileSync(command)).digest("hex"),
|
|
61072
|
-
version: (0,
|
|
61124
|
+
version: (0, import_node_child_process34.execFileSync)(command, ["--version"], {
|
|
61073
61125
|
encoding: "utf8",
|
|
61074
61126
|
env: swiftEnvironment(),
|
|
61075
61127
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -61132,7 +61184,7 @@ function dump(dir, requirePrepared = false) {
|
|
|
61132
61184
|
if (requirePrepared) throw new SwiftManifestPreparationRequired(dir);
|
|
61133
61185
|
let output2;
|
|
61134
61186
|
try {
|
|
61135
|
-
output2 = (0,
|
|
61187
|
+
output2 = (0, import_node_child_process34.execFileSync)(
|
|
61136
61188
|
command,
|
|
61137
61189
|
[
|
|
61138
61190
|
"package",
|
|
@@ -61472,7 +61524,7 @@ let package = Package(
|
|
|
61472
61524
|
]
|
|
61473
61525
|
)
|
|
61474
61526
|
`;
|
|
61475
|
-
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-"));
|
|
61476
61528
|
import_node_fs57.default.writeFileSync(import_node_path53.default.join(dir, "Package.swift"), manifest);
|
|
61477
61529
|
const args = [
|
|
61478
61530
|
"package",
|
|
@@ -61512,7 +61564,7 @@ async function resolveSwiftPackageRequirementsAsync(requirements, destination, s
|
|
|
61512
61564
|
const { dir, args, options, failed, publish } = resolveRequest(requirements);
|
|
61513
61565
|
try {
|
|
61514
61566
|
try {
|
|
61515
|
-
await (0, import_node_util9.promisify)(
|
|
61567
|
+
await (0, import_node_util9.promisify)(import_node_child_process34.execFile)(swiftCommand(), args, { ...options, signal });
|
|
61516
61568
|
} catch (error) {
|
|
61517
61569
|
throw failed(error);
|
|
61518
61570
|
}
|
|
@@ -61553,14 +61605,14 @@ function swiftTargetFiles(manifest, target) {
|
|
|
61553
61605
|
}
|
|
61554
61606
|
return [...new Set(files2)].sort();
|
|
61555
61607
|
}
|
|
61556
|
-
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;
|
|
61557
61609
|
var init_swift_package_manifest = __esm({
|
|
61558
61610
|
"src/swift-package-manifest.ts"() {
|
|
61559
61611
|
"use strict";
|
|
61560
|
-
|
|
61612
|
+
import_node_child_process34 = require("node:child_process");
|
|
61561
61613
|
import_node_crypto26 = require("node:crypto");
|
|
61562
61614
|
import_node_fs57 = __toESM(require("node:fs"), 1);
|
|
61563
|
-
|
|
61615
|
+
import_node_os14 = __toESM(require("node:os"), 1);
|
|
61564
61616
|
import_node_path53 = __toESM(require("node:path"), 1);
|
|
61565
61617
|
import_node_util9 = require("node:util");
|
|
61566
61618
|
init_home_paths();
|
|
@@ -61584,7 +61636,7 @@ var init_swift_package_manifest = __esm({
|
|
|
61584
61636
|
string4 = (value) => typeof value === "string" ? value : void 0;
|
|
61585
61637
|
cacheDir3 = import_node_path53.default.join(cacheDir(), "swift-manifests");
|
|
61586
61638
|
evaluated = /* @__PURE__ */ new Map();
|
|
61587
|
-
execFileAsync = (0, import_node_util9.promisify)(
|
|
61639
|
+
execFileAsync = (0, import_node_util9.promisify)(import_node_child_process34.execFile);
|
|
61588
61640
|
SwiftManifestPreparationRequired = class extends Error {
|
|
61589
61641
|
constructor(dir) {
|
|
61590
61642
|
super(`swift package manifest requires preparation: ${dir}`);
|
|
@@ -62269,7 +62321,7 @@ function loadProject(xcodeproj) {
|
|
|
62269
62321
|
function selectedDeveloperDir() {
|
|
62270
62322
|
developerDir ??= process.platform === "darwin" ? (
|
|
62271
62323
|
// runner-toolchain-platform: darwin
|
|
62272
|
-
(0,
|
|
62324
|
+
(0, import_node_child_process35.execFileSync)("xcode-select", ["-p"], {
|
|
62273
62325
|
encoding: "utf8",
|
|
62274
62326
|
stdio: ["ignore", "pipe", "pipe"]
|
|
62275
62327
|
}).trim()
|
|
@@ -62673,7 +62725,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
62673
62725
|
str(phase.shellPath) ?? "/bin/sh",
|
|
62674
62726
|
str(phase.shellScript) ?? ""
|
|
62675
62727
|
);
|
|
62676
|
-
(0,
|
|
62728
|
+
(0, import_node_child_process35.execFileSync)(shell, args, {
|
|
62677
62729
|
cwd: project2.projectDir,
|
|
62678
62730
|
env,
|
|
62679
62731
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -62781,7 +62833,7 @@ ${output2}`
|
|
|
62781
62833
|
const families = settings("TARGETED_DEVICE_FAMILY").split(",").map((value) => value.trim());
|
|
62782
62834
|
if (families.includes("1")) args.push("--target-device", "iphone");
|
|
62783
62835
|
if (families.includes("2")) args.push("--target-device", "ipad");
|
|
62784
|
-
(0,
|
|
62836
|
+
(0, import_node_child_process35.execFileSync)("xcrun", args, {
|
|
62785
62837
|
cwd: project2.projectDir,
|
|
62786
62838
|
stdio: ["ignore", "pipe", "pipe"],
|
|
62787
62839
|
timeout: runScriptTimeoutMs
|
|
@@ -62826,7 +62878,7 @@ ${output2}`
|
|
|
62826
62878
|
args.push("-swiftVersion", settings("SWIFT_VERSION") || "5.0");
|
|
62827
62879
|
if (settings("DEFINES_MODULE") === "YES")
|
|
62828
62880
|
args.push("-moduleName", settings("PRODUCT_MODULE_NAME"));
|
|
62829
|
-
(0,
|
|
62881
|
+
(0, import_node_child_process35.execFileSync)("xcrun", args, {
|
|
62830
62882
|
cwd: project2.projectDir,
|
|
62831
62883
|
stdio: ["ignore", "pipe", "pipe"],
|
|
62832
62884
|
timeout: runScriptTimeoutMs
|
|
@@ -64234,11 +64286,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
64234
64286
|
cocoapods
|
|
64235
64287
|
};
|
|
64236
64288
|
}
|
|
64237
|
-
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;
|
|
64238
64290
|
var init_xcode_project = __esm({
|
|
64239
64291
|
"src/xcode-project.ts"() {
|
|
64240
64292
|
"use strict";
|
|
64241
|
-
|
|
64293
|
+
import_node_child_process35 = require("node:child_process");
|
|
64242
64294
|
import_node_crypto27 = require("node:crypto");
|
|
64243
64295
|
import_node_fs58 = __toESM(require("node:fs"), 1);
|
|
64244
64296
|
import_node_path55 = __toESM(require("node:path"), 1);
|
|
@@ -64379,7 +64431,7 @@ function readExpoConfig(projectRoot) {
|
|
|
64379
64431
|
const directory2 = resultDirectory();
|
|
64380
64432
|
const resultPath = import_node_path56.default.join(directory2, "config.json");
|
|
64381
64433
|
try {
|
|
64382
|
-
const child = (0,
|
|
64434
|
+
const child = (0, import_node_child_process36.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
64383
64435
|
cwd: projectRoot,
|
|
64384
64436
|
encoding: "utf8",
|
|
64385
64437
|
stdio: ["ignore", "ignore", "pipe"],
|
|
@@ -64397,7 +64449,7 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
64397
64449
|
const directory2 = resultDirectory();
|
|
64398
64450
|
const resultPath = import_node_path56.default.join(directory2, "config.json");
|
|
64399
64451
|
try {
|
|
64400
|
-
const child = (0,
|
|
64452
|
+
const child = (0, import_node_child_process36.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
64401
64453
|
cwd: projectRoot,
|
|
64402
64454
|
stdio: ["ignore", "ignore", "pipe"],
|
|
64403
64455
|
timeout: EXPO_CONFIG_TIMEOUT_MS
|
|
@@ -64895,14 +64947,14 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
64895
64947
|
}
|
|
64896
64948
|
return result;
|
|
64897
64949
|
}
|
|
64898
|
-
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;
|
|
64899
64951
|
var init_native_firebase_config = __esm({
|
|
64900
64952
|
"src/native-firebase-config.ts"() {
|
|
64901
64953
|
"use strict";
|
|
64902
|
-
|
|
64954
|
+
import_node_child_process36 = require("node:child_process");
|
|
64903
64955
|
import_node_fs59 = __toESM(require("node:fs"), 1);
|
|
64904
64956
|
import_node_module5 = require("node:module");
|
|
64905
|
-
|
|
64957
|
+
import_node_os15 = __toESM(require("node:os"), 1);
|
|
64906
64958
|
import_node_path56 = __toESM(require("node:path"), 1);
|
|
64907
64959
|
init_is_record();
|
|
64908
64960
|
init_plist();
|
|
@@ -64924,7 +64976,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
64924
64976
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
64925
64977
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
64926
64978
|
EXPO_CONFIG_TIMEOUT_MS = 3e4;
|
|
64927
|
-
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-"));
|
|
64928
64980
|
HELPER_DEPTH = 3;
|
|
64929
64981
|
stripComments = (raw2) => raw2.replace(
|
|
64930
64982
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -64983,7 +65035,7 @@ async function preparedNativeInventory(app, selected, signal) {
|
|
|
64983
65035
|
paths: [import_node_path58.default.dirname(require4.resolve("expo/package.json"))]
|
|
64984
65036
|
});
|
|
64985
65037
|
const cli = import_node_path58.default.join(import_node_path58.default.dirname(expo), "bin/expo-modules-autolinking.js");
|
|
64986
|
-
const searched = await (0, import_node_util10.promisify)(
|
|
65038
|
+
const searched = await (0, import_node_util10.promisify)(import_node_child_process37.execFile)(
|
|
64987
65039
|
process.execPath,
|
|
64988
65040
|
[cli, "search", ...autolinkerAppleFlags(expo, app), "--json"],
|
|
64989
65041
|
{
|
|
@@ -65042,11 +65094,11 @@ async function preparedNativeInventory(app, selected, signal) {
|
|
|
65042
65094
|
}
|
|
65043
65095
|
return result;
|
|
65044
65096
|
}
|
|
65045
|
-
var
|
|
65097
|
+
var import_node_child_process37, import_node_crypto29, import_node_fs61, import_node_module6, import_node_path58, import_promises5, import_node_util10;
|
|
65046
65098
|
var init_prepared_native_inventory = __esm({
|
|
65047
65099
|
"src/prepared-native-inventory.ts"() {
|
|
65048
65100
|
"use strict";
|
|
65049
|
-
|
|
65101
|
+
import_node_child_process37 = require("node:child_process");
|
|
65050
65102
|
import_node_crypto29 = require("node:crypto");
|
|
65051
65103
|
import_node_fs61 = __toESM(require("node:fs"), 1);
|
|
65052
65104
|
import_node_module6 = require("node:module");
|
|
@@ -65159,12 +65211,12 @@ function compiledSwiftHelper(swift, name3) {
|
|
|
65159
65211
|
try {
|
|
65160
65212
|
import_node_fs63.default.mkdirSync(cacheDir(), { recursive: true });
|
|
65161
65213
|
const source = import_node_path60.default.join(
|
|
65162
|
-
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}-`)),
|
|
65163
65215
|
"main.swift"
|
|
65164
65216
|
);
|
|
65165
65217
|
import_node_fs63.default.writeFileSync(source, swift);
|
|
65166
65218
|
try {
|
|
65167
|
-
(0,
|
|
65219
|
+
(0, import_node_child_process38.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
65168
65220
|
} finally {
|
|
65169
65221
|
import_node_fs63.default.rmSync(import_node_path60.default.dirname(source), { recursive: true, force: true });
|
|
65170
65222
|
}
|
|
@@ -65176,14 +65228,14 @@ function compiledSwiftHelper(swift, name3) {
|
|
|
65176
65228
|
);
|
|
65177
65229
|
}
|
|
65178
65230
|
}
|
|
65179
|
-
var
|
|
65231
|
+
var import_node_child_process38, import_node_crypto31, import_node_fs63, import_node_os16, import_node_path60;
|
|
65180
65232
|
var init_swift_helper = __esm({
|
|
65181
65233
|
"src/swift-helper.ts"() {
|
|
65182
65234
|
"use strict";
|
|
65183
|
-
|
|
65235
|
+
import_node_child_process38 = require("node:child_process");
|
|
65184
65236
|
import_node_crypto31 = require("node:crypto");
|
|
65185
65237
|
import_node_fs63 = __toESM(require("node:fs"), 1);
|
|
65186
|
-
|
|
65238
|
+
import_node_os16 = __toESM(require("node:os"), 1);
|
|
65187
65239
|
import_node_path60 = __toESM(require("node:path"), 1);
|
|
65188
65240
|
init_home_paths();
|
|
65189
65241
|
}
|
|
@@ -65344,40 +65396,67 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
|
|
|
65344
65396
|
const steersNative = (relative6) => !relative6.includes(import_node_path62.default.sep) || relative6.startsWith(`patches${import_node_path62.default.sep}`) || nativeDirectories.some(
|
|
65345
65397
|
(directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 + import_node_path62.default.sep)
|
|
65346
65398
|
);
|
|
65347
|
-
const
|
|
65348
|
-
|
|
65349
|
-
|
|
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) {
|
|
65350
65404
|
signal?.throwIfAborted();
|
|
65351
65405
|
const file = import_node_path62.default.join(directory2, entry.name);
|
|
65352
65406
|
const relative6 = import_node_path62.default.relative(root, file);
|
|
65353
65407
|
if (excluded(relative6, entry.isDirectory())) continue;
|
|
65354
|
-
hash.update(`${relative6}\0`);
|
|
65408
|
+
steps.push(() => hash.update(`${relative6}\0`));
|
|
65355
65409
|
if (entry.isSymbolicLink()) {
|
|
65356
|
-
const link = `link\0${
|
|
65357
|
-
|
|
65358
|
-
|
|
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
|
+
});
|
|
65359
65415
|
} else if (entry.isDirectory()) {
|
|
65360
|
-
hash.update("directory\0");
|
|
65361
|
-
|
|
65416
|
+
steps.push(() => hash.update("directory\0"));
|
|
65417
|
+
walk3(file);
|
|
65362
65418
|
} else if (entry.isFile()) {
|
|
65363
65419
|
const posix2 = relative6.split(import_node_path62.default.sep).join("/");
|
|
65364
65420
|
if (NATIVE_CONFIG_FILE.test(posix2)) {
|
|
65365
|
-
const bytes =
|
|
65366
|
-
|
|
65367
|
-
|
|
65368
|
-
|
|
65369
|
-
|
|
65370
|
-
|
|
65371
|
-
|
|
65372
|
-
hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
65373
|
-
}
|
|
65374
|
-
if (NATIVE_SOURCE_FILE2.test(posix2) && steersNative(relative6))
|
|
65375
|
-
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;
|
|
65376
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`));
|
|
65377
65444
|
}
|
|
65378
65445
|
}
|
|
65379
65446
|
};
|
|
65380
|
-
|
|
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();
|
|
65381
65460
|
if (sourceOnly) {
|
|
65382
65461
|
hash.update(`\0${appRelative}\0`);
|
|
65383
65462
|
return {
|
|
@@ -65388,29 +65467,32 @@ async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, p
|
|
|
65388
65467
|
excluded
|
|
65389
65468
|
};
|
|
65390
65469
|
}
|
|
65391
|
-
const execFileAsync4 = (0, import_node_util11.promisify)(
|
|
65392
|
-
const mac = process.platform === "darwin" ? await Promise.all([
|
|
65393
|
-
// runner-toolchain-platform: darwin
|
|
65394
|
-
execFileAsync4("pod", ["--version"], { env: utf8Env, signal }).catch(
|
|
65395
|
-
(cause) => {
|
|
65396
|
-
throw new Error("CocoaPods is required to install source dependencies", {
|
|
65397
|
-
cause
|
|
65398
|
-
});
|
|
65399
|
-
}
|
|
65400
|
-
),
|
|
65401
|
-
// runner-toolchain-platform: darwin
|
|
65402
|
-
execFileAsync4("xcodebuild", ["-version"], { env: utf8Env, signal })
|
|
65403
|
-
]).then(([pod, xcode]) => ({ podVersion: pod.stdout, xcode: xcode.stdout })) : {};
|
|
65470
|
+
const execFileAsync4 = (0, import_node_util11.promisify)(import_node_child_process39.execFile);
|
|
65404
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
|
+
]);
|
|
65405
65491
|
const toolchain = JSON.stringify({
|
|
65406
65492
|
preparation: 7,
|
|
65407
65493
|
appRelative,
|
|
65408
65494
|
...mac,
|
|
65409
|
-
node: (
|
|
65410
|
-
pinnedNode ? "mise" : "node",
|
|
65411
|
-
pinnedNode ? ["exec", pinnedNode, "--", "node", "--version"] : ["--version"],
|
|
65412
|
-
{ cwd: root, signal }
|
|
65413
|
-
)).stdout.trim(),
|
|
65495
|
+
node: node.stdout.trim(),
|
|
65414
65496
|
packageManager: workspacePackageManager(root, manifest.packageManager, excluded),
|
|
65415
65497
|
podsEnvironment
|
|
65416
65498
|
});
|
|
@@ -65589,7 +65671,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
65589
65671
|
});
|
|
65590
65672
|
if (process.platform === "darwin") {
|
|
65591
65673
|
await new Promise((resolve14, reject) => {
|
|
65592
|
-
const child = (0,
|
|
65674
|
+
const child = (0, import_node_child_process39.execFile)(
|
|
65593
65675
|
compiledSwiftHelper(CLONE_SWIFT, "peach-clone-entries"),
|
|
65594
65676
|
(error) => error ? reject(error) : resolve14()
|
|
65595
65677
|
);
|
|
@@ -65605,7 +65687,7 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
65605
65687
|
const clone = async () => {
|
|
65606
65688
|
const relative6 = entries.pop();
|
|
65607
65689
|
if (relative6 === void 0) return;
|
|
65608
|
-
await (0, import_node_util11.promisify)(
|
|
65690
|
+
await (0, import_node_util11.promisify)(import_node_child_process39.execFile)("cp", [
|
|
65609
65691
|
"-R",
|
|
65610
65692
|
"-p",
|
|
65611
65693
|
import_node_path62.default.join(root, relative6),
|
|
@@ -65629,7 +65711,7 @@ function nativeWorkspacesDir(root) {
|
|
|
65629
65711
|
return import_node_path62.default.join(mount, ".peach-cache", "expo-native-workspaces");
|
|
65630
65712
|
}
|
|
65631
65713
|
function trackedSourceEntries(root, work) {
|
|
65632
|
-
const listed = (0,
|
|
65714
|
+
const listed = (0, import_node_child_process39.spawnSync)("git", ["ls-files", "--stage", "-z"], {
|
|
65633
65715
|
cwd: root,
|
|
65634
65716
|
env: { ...process.env, ...isolatedGitEnv },
|
|
65635
65717
|
maxBuffer: 256 * 1024 * 1024
|
|
@@ -65643,8 +65725,8 @@ function trackedSourceEntries(root, work) {
|
|
|
65643
65725
|
function initializeWorkspaceGit(root, work) {
|
|
65644
65726
|
requireNativeGit();
|
|
65645
65727
|
const env = { ...process.env, ...isolatedGitEnv };
|
|
65646
|
-
(0,
|
|
65647
|
-
(0,
|
|
65728
|
+
(0, import_node_child_process39.execFileSync)("git", ["init", "--quiet"], { cwd: work, env });
|
|
65729
|
+
(0, import_node_child_process39.execFileSync)(
|
|
65648
65730
|
"git",
|
|
65649
65731
|
[
|
|
65650
65732
|
"-c",
|
|
@@ -65664,7 +65746,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
65664
65746
|
);
|
|
65665
65747
|
const tracked = trackedSourceEntries(root, work);
|
|
65666
65748
|
if (tracked.length > 0)
|
|
65667
|
-
(0,
|
|
65749
|
+
(0, import_node_child_process39.execFileSync)("git", ["update-index", "-z", "--index-info"], {
|
|
65668
65750
|
cwd: work,
|
|
65669
65751
|
env,
|
|
65670
65752
|
input: tracked.join("\0")
|
|
@@ -65720,7 +65802,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
65720
65802
|
}
|
|
65721
65803
|
const trustedConfigs = /* @__PURE__ */ new Set();
|
|
65722
65804
|
for (const cwd of [root, app]) {
|
|
65723
|
-
const result2 = (0,
|
|
65805
|
+
const result2 = (0, import_node_child_process39.spawnSync)("mise", ["config", "ls", "--json"], {
|
|
65724
65806
|
cwd,
|
|
65725
65807
|
encoding: "utf8"
|
|
65726
65808
|
});
|
|
@@ -65763,7 +65845,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
65763
65845
|
const command = [...prefix, ...args];
|
|
65764
65846
|
await run14(command[0], command.slice(1), cwd, env);
|
|
65765
65847
|
};
|
|
65766
|
-
const installedBun = manager.startsWith("bun@") ? (0,
|
|
65848
|
+
const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process39.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
|
|
65767
65849
|
if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
|
|
65768
65850
|
await execute(
|
|
65769
65851
|
[
|
|
@@ -65882,7 +65964,7 @@ function stageCachedQuickCryptoOpenSsl(app) {
|
|
|
65882
65964
|
return;
|
|
65883
65965
|
import_node_fs65.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
65884
65966
|
import_node_fs65.default.mkdirSync(opensslDir, { recursive: true });
|
|
65885
|
-
(0,
|
|
65967
|
+
(0, import_node_child_process39.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
|
|
65886
65968
|
}
|
|
65887
65969
|
async function runAdmitted(lease, command, args, cwd, extraEnv) {
|
|
65888
65970
|
const admitted = teamMachineInstalled();
|
|
@@ -65918,11 +66000,11 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
65918
66000
|
});
|
|
65919
66001
|
});
|
|
65920
66002
|
}
|
|
65921
|
-
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;
|
|
65922
66004
|
var init_expo_native_workspace = __esm({
|
|
65923
66005
|
"src/expo-native-workspace.ts"() {
|
|
65924
66006
|
"use strict";
|
|
65925
|
-
|
|
66007
|
+
import_node_child_process39 = require("node:child_process");
|
|
65926
66008
|
import_node_crypto32 = require("node:crypto");
|
|
65927
66009
|
import_node_fs65 = __toESM(require("node:fs"), 1);
|
|
65928
66010
|
import_node_module7 = require("node:module");
|
|
@@ -65949,6 +66031,7 @@ var init_expo_native_workspace = __esm({
|
|
|
65949
66031
|
utf8Env = { ...process.env, LANG: "en_US.UTF-8", LC_ALL: "en_US.UTF-8" };
|
|
65950
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)\//;
|
|
65951
66033
|
NATIVE_SOURCE_FILE2 = /\.(swift|mm?|hpp?|c|cc|cpp|kt|java)$/;
|
|
66034
|
+
fileDigests = /* @__PURE__ */ new Map();
|
|
65952
66035
|
NATIVE_PACKAGE_ENTRY = /^(ios|android|.*\.podspec|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|app\.plugin\.[cm]?js)$/;
|
|
65953
66036
|
KEPT_WORKSPACES = 2;
|
|
65954
66037
|
WORKSPACE_GRACE_MS = 36e5;
|
|
@@ -66998,7 +67081,7 @@ __export(expo_native_prebuilt_exports, {
|
|
|
66998
67081
|
servedExpoSwift: () => servedExpoSwift
|
|
66999
67082
|
});
|
|
67000
67083
|
function expoNativeCompilerDigestValue() {
|
|
67001
|
-
return true ? "
|
|
67084
|
+
return true ? "2a7438510b7fddb608c748003fbaa32b5c765b3782603cb2e309e2729ddbb4aa" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
67002
67085
|
}
|
|
67003
67086
|
function readSources(value) {
|
|
67004
67087
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -67468,12 +67551,12 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67468
67551
|
const flags = ["--no-sort", "--extern-only", "--defined-only", "--format=just-symbols"];
|
|
67469
67552
|
const options = { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 };
|
|
67470
67553
|
const symbols = (input) => {
|
|
67471
|
-
const raw2 = (0,
|
|
67554
|
+
const raw2 = (0, import_node_child_process40.execFileSync)(
|
|
67472
67555
|
import_node_path69.default.join(toolchain.toolchainBin, "llvm-nm"),
|
|
67473
67556
|
[...flags, input],
|
|
67474
67557
|
options
|
|
67475
67558
|
).trim().split("\n");
|
|
67476
|
-
const demangled = (0,
|
|
67559
|
+
const demangled = (0, import_node_child_process40.execFileSync)(
|
|
67477
67560
|
import_node_path69.default.join(toolchain.toolchainBin, "llvm-nm"),
|
|
67478
67561
|
[...flags, "--demangle", input],
|
|
67479
67562
|
options
|
|
@@ -67488,7 +67571,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67488
67571
|
const stage = import_node_fs72.default.mkdtempSync(import_node_path69.default.join(directory2, "build-"));
|
|
67489
67572
|
try {
|
|
67490
67573
|
const object7 = import_node_path69.default.join(stage, "library.o");
|
|
67491
|
-
(0,
|
|
67574
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "wasm-ld"), [
|
|
67492
67575
|
"-mwasm64",
|
|
67493
67576
|
"-r",
|
|
67494
67577
|
"--whole-archive",
|
|
@@ -67504,7 +67587,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
67504
67587
|
);
|
|
67505
67588
|
import_node_fs72.default.writeFileSync(object7, localizeDefinedWasmSymbols(import_node_fs72.default.readFileSync(object7), names));
|
|
67506
67589
|
const output2 = import_node_path69.default.join(stage, "library.a");
|
|
67507
|
-
(0,
|
|
67590
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "llvm-ar"), ["rcsD", output2, object7]);
|
|
67508
67591
|
import_node_fs72.default.renameSync(output2, archive);
|
|
67509
67592
|
} finally {
|
|
67510
67593
|
import_node_fs72.default.rmSync(stage, { recursive: true, force: true });
|
|
@@ -67523,7 +67606,7 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
67523
67606
|
import_node_fs72.default.mkdirSync(directory2, { recursive: true });
|
|
67524
67607
|
const temporary = import_node_path69.default.join(directory2, `combined-${(0, import_node_crypto37.randomUUID)()}.a`);
|
|
67525
67608
|
try {
|
|
67526
|
-
(0,
|
|
67609
|
+
(0, import_node_child_process40.execFileSync)(import_node_path69.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
67527
67610
|
"qcsDL",
|
|
67528
67611
|
temporary,
|
|
67529
67612
|
...files2
|
|
@@ -67534,11 +67617,11 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
67534
67617
|
}
|
|
67535
67618
|
return archive;
|
|
67536
67619
|
}
|
|
67537
|
-
var
|
|
67620
|
+
var import_node_child_process40, import_node_crypto37, import_node_fs72, import_node_path69, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
67538
67621
|
var init_native_static_libraries = __esm({
|
|
67539
67622
|
"src/native-static-libraries.ts"() {
|
|
67540
67623
|
"use strict";
|
|
67541
|
-
|
|
67624
|
+
import_node_child_process40 = require("node:child_process");
|
|
67542
67625
|
import_node_crypto37 = require("node:crypto");
|
|
67543
67626
|
import_node_fs72 = __toESM(require("node:fs"), 1);
|
|
67544
67627
|
import_node_path69 = __toESM(require("node:path"), 1);
|
|
@@ -68581,11 +68664,11 @@ function resolveSwiftPackages(options) {
|
|
|
68581
68664
|
result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
|
|
68582
68665
|
return result;
|
|
68583
68666
|
}
|
|
68584
|
-
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;
|
|
68585
68668
|
var init_swift_packages = __esm({
|
|
68586
68669
|
"src/swift-packages.ts"() {
|
|
68587
68670
|
"use strict";
|
|
68588
|
-
|
|
68671
|
+
import_node_child_process41 = require("node:child_process");
|
|
68589
68672
|
import_node_crypto39 = require("node:crypto");
|
|
68590
68673
|
import_node_fs74 = __toESM(require("node:fs"), 1);
|
|
68591
68674
|
import_node_path71 = __toESM(require("node:path"), 1);
|
|
@@ -68606,7 +68689,7 @@ var init_swift_packages = __esm({
|
|
|
68606
68689
|
BINARY = "is a binary framework";
|
|
68607
68690
|
blockers = (reasons) => [...new Set(reasons.flat())];
|
|
68608
68691
|
verified = /* @__PURE__ */ new Set();
|
|
68609
|
-
execFileAsync2 = (0, import_node_util13.promisify)(
|
|
68692
|
+
execFileAsync2 = (0, import_node_util13.promisify)(import_node_child_process41.execFile);
|
|
68610
68693
|
checkoutKey = (dir, pin2) => `${dir}\0${pin2.revision}`;
|
|
68611
68694
|
}
|
|
68612
68695
|
});
|
|
@@ -68673,10 +68756,10 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
68673
68756
|
throw new Error(
|
|
68674
68757
|
"the Sentry slice for a private Swift distribution builds from a Contrast source checkout"
|
|
68675
68758
|
);
|
|
68676
|
-
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-"));
|
|
68677
68760
|
try {
|
|
68678
68761
|
process.stderr.write("peach: building the Sentry slice for a private distribution\u2026\n");
|
|
68679
|
-
(0,
|
|
68762
|
+
(0, import_node_child_process42.execFileSync)("bun", [script, "--output", staging, "--module-root", moduleRoot], {
|
|
68680
68763
|
cwd: import_node_path72.default.resolve(sourceSwiftCheckout(), "../.."),
|
|
68681
68764
|
stdio: ["ignore", 2, 2]
|
|
68682
68765
|
});
|
|
@@ -68751,14 +68834,14 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
68751
68834
|
}
|
|
68752
68835
|
};
|
|
68753
68836
|
}
|
|
68754
|
-
var
|
|
68837
|
+
var import_node_child_process42, import_node_crypto40, import_node_fs75, import_node_os17, import_node_path72, SENTRY_SWIFT_SLICE;
|
|
68755
68838
|
var init_native_swift_slices = __esm({
|
|
68756
68839
|
"src/native-swift-slices.ts"() {
|
|
68757
68840
|
"use strict";
|
|
68758
|
-
|
|
68841
|
+
import_node_child_process42 = require("node:child_process");
|
|
68759
68842
|
import_node_crypto40 = require("node:crypto");
|
|
68760
68843
|
import_node_fs75 = __toESM(require("node:fs"), 1);
|
|
68761
|
-
|
|
68844
|
+
import_node_os17 = __toESM(require("node:os"), 1);
|
|
68762
68845
|
import_node_path72 = __toESM(require("node:path"), 1);
|
|
68763
68846
|
init_native_prebuilt();
|
|
68764
68847
|
init_swift_compile();
|
|
@@ -69046,7 +69129,7 @@ async function emitCxxStandin(input) {
|
|
|
69046
69129
|
"-I",
|
|
69047
69130
|
input.headers
|
|
69048
69131
|
];
|
|
69049
|
-
const includes = (0,
|
|
69132
|
+
const includes = (0, import_node_child_process43.spawnSync)(input.clang, [...flags, "-M", "-MT", "peach", probe2], {
|
|
69050
69133
|
encoding: "utf8",
|
|
69051
69134
|
env: swiftEnvironment(),
|
|
69052
69135
|
maxBuffer: 16 * 1024 * 1024
|
|
@@ -69066,7 +69149,7 @@ async function emitCxxStandin(input) {
|
|
|
69066
69149
|
const output2 = import_node_fs78.default.openSync(ast, "w");
|
|
69067
69150
|
let parsed;
|
|
69068
69151
|
try {
|
|
69069
|
-
parsed = (0,
|
|
69152
|
+
parsed = (0, import_node_child_process43.spawnSync)(
|
|
69070
69153
|
input.clang,
|
|
69071
69154
|
[...flags, "-fsyntax-only", "-Xclang", "-ast-dump=json", probe2],
|
|
69072
69155
|
{ stdio: ["ignore", output2, "pipe"], encoding: "utf8", env: swiftEnvironment() }
|
|
@@ -69124,7 +69207,7 @@ async function emitCxxStandin(input) {
|
|
|
69124
69207
|
sourceFile,
|
|
69125
69208
|
[...prelude, ...live.map((item) => item.text)].join("\n") + "\n"
|
|
69126
69209
|
);
|
|
69127
|
-
const checked = (0,
|
|
69210
|
+
const checked = (0, import_node_child_process43.spawnSync)(
|
|
69128
69211
|
input.clang,
|
|
69129
69212
|
[
|
|
69130
69213
|
...flags,
|
|
@@ -69158,11 +69241,11 @@ async function emitCxxStandin(input) {
|
|
|
69158
69241
|
excluded
|
|
69159
69242
|
};
|
|
69160
69243
|
}
|
|
69161
|
-
var
|
|
69244
|
+
var import_node_child_process43, import_node_fs78, import_node_path74, QUALIFIERS, UNNAMEABLE;
|
|
69162
69245
|
var init_swift_cxx_standin = __esm({
|
|
69163
69246
|
"src/swift-cxx-standin.ts"() {
|
|
69164
69247
|
"use strict";
|
|
69165
|
-
|
|
69248
|
+
import_node_child_process43 = require("node:child_process");
|
|
69166
69249
|
import_node_fs78 = __toESM(require("node:fs"), 1);
|
|
69167
69250
|
import_node_path74 = __toESM(require("node:path"), 1);
|
|
69168
69251
|
init_swift_cxx_declarations();
|
|
@@ -69414,7 +69497,7 @@ var init_swift_standin_builtin_behavior = __esm({
|
|
|
69414
69497
|
|
|
69415
69498
|
// src/swift-standins.ts
|
|
69416
69499
|
function exec(file, args, cwd) {
|
|
69417
|
-
return (0,
|
|
69500
|
+
return (0, import_node_child_process44.execFileSync)(file, args, {
|
|
69418
69501
|
cwd,
|
|
69419
69502
|
encoding: "utf8",
|
|
69420
69503
|
env: swiftEnvironment(),
|
|
@@ -70100,7 +70183,7 @@ function placeholderStandin(surface, binary2, toolchain, work, behavior, sibling
|
|
|
70100
70183
|
const out = import_node_path75.default.join(work, "graphs");
|
|
70101
70184
|
import_node_fs79.default.mkdirSync(import_node_path75.default.join(work, "interface"), { recursive: true });
|
|
70102
70185
|
import_node_fs79.default.mkdirSync(out, { recursive: true });
|
|
70103
|
-
const extracted = (0,
|
|
70186
|
+
const extracted = (0, import_node_child_process44.spawnSync)(
|
|
70104
70187
|
import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
|
|
70105
70188
|
[
|
|
70106
70189
|
"-emit-module",
|
|
@@ -70501,7 +70584,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
70501
70584
|
);
|
|
70502
70585
|
}
|
|
70503
70586
|
import_node_fs79.default.writeFileSync(file, source + trailer);
|
|
70504
|
-
const check2 = (0,
|
|
70587
|
+
const check2 = (0, import_node_child_process44.spawnSync)(
|
|
70505
70588
|
import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
|
|
70506
70589
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
70507
70590
|
// literal overflow, which the app's build of the stand-in reaches
|
|
@@ -70869,7 +70952,7 @@ async function cxxStandin(surface, binary2, toolchain, work) {
|
|
|
70869
70952
|
roots.map((root) => `#include ${JSON.stringify(root)}
|
|
70870
70953
|
`).join("")
|
|
70871
70954
|
);
|
|
70872
|
-
const language = (0,
|
|
70955
|
+
const language = (0, import_node_child_process44.spawnSync)(
|
|
70873
70956
|
import_node_path75.default.join(toolchain.toolchainBin, "clang"),
|
|
70874
70957
|
[
|
|
70875
70958
|
"-target",
|
|
@@ -71090,7 +71173,7 @@ function buildRustCrate(manifest, library, searchRoot, moduleRoot, entry = rustC
|
|
|
71090
71173
|
import_node_path75.default.relative(common2, crateWorkspace(manifest)),
|
|
71091
71174
|
"Cargo.lock"
|
|
71092
71175
|
);
|
|
71093
|
-
const result = (0,
|
|
71176
|
+
const result = (0, import_node_child_process44.spawnSync)(
|
|
71094
71177
|
process.execPath,
|
|
71095
71178
|
[
|
|
71096
71179
|
runner,
|
|
@@ -71238,7 +71321,7 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
|
|
|
71238
71321
|
})
|
|
71239
71322
|
);
|
|
71240
71323
|
const build2 = await new Promise((resolve14) => {
|
|
71241
|
-
const child = (0,
|
|
71324
|
+
const child = (0, import_node_child_process44.spawn)(
|
|
71242
71325
|
"bun",
|
|
71243
71326
|
[
|
|
71244
71327
|
import_node_path75.default.join(repo, "scripts/build/swift-standins-submit.ts"),
|
|
@@ -71767,11 +71850,11 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
71767
71850
|
import_node_fs79.default.rmSync(modules, { recursive: true, force: true });
|
|
71768
71851
|
}
|
|
71769
71852
|
}
|
|
71770
|
-
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;
|
|
71771
71854
|
var init_swift_standins = __esm({
|
|
71772
71855
|
"src/swift-standins.ts"() {
|
|
71773
71856
|
"use strict";
|
|
71774
|
-
|
|
71857
|
+
import_node_child_process44 = require("node:child_process");
|
|
71775
71858
|
import_node_crypto41 = require("node:crypto");
|
|
71776
71859
|
import_node_fs79 = __toESM(require("node:fs"), 1);
|
|
71777
71860
|
import_node_path75 = __toESM(require("node:path"), 1);
|
|
@@ -72496,7 +72579,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
72496
72579
|
provided: [...providers.keys()]
|
|
72497
72580
|
};
|
|
72498
72581
|
try {
|
|
72499
|
-
const lock = (0,
|
|
72582
|
+
const lock = (0, import_node_child_process45.spawnSync)(
|
|
72500
72583
|
"perl",
|
|
72501
72584
|
["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
|
|
72502
72585
|
{ stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
|
|
@@ -72667,7 +72750,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
72667
72750
|
import_node_path76.default.join(work, `${target.moduleName}.o`)
|
|
72668
72751
|
]
|
|
72669
72752
|
];
|
|
72670
|
-
const result = (0,
|
|
72753
|
+
const result = (0, import_node_child_process45.spawnSync)(frontend, args, {
|
|
72671
72754
|
cwd: work,
|
|
72672
72755
|
encoding: "utf8",
|
|
72673
72756
|
env: swiftEnvironment(),
|
|
@@ -72787,7 +72870,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
|
|
|
72787
72870
|
const work = import_node_path76.default.join(parent, key2);
|
|
72788
72871
|
const descriptor = import_node_fs80.default.openSync(`${work}.lock`, "a");
|
|
72789
72872
|
try {
|
|
72790
|
-
const locked = (0,
|
|
72873
|
+
const locked = (0, import_node_child_process45.spawnSync)(
|
|
72791
72874
|
"perl",
|
|
72792
72875
|
["-e", 'open(my $f, ">&=", 3) or die $!; flock($f, 2) or die $!'],
|
|
72793
72876
|
{ stdio: ["ignore", "pipe", "pipe", descriptor], encoding: "utf8" }
|
|
@@ -73035,7 +73118,7 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
|
|
|
73035
73118
|
...dependencies ? ["-MD", "-MF", dependencies, "-H"] : []
|
|
73036
73119
|
];
|
|
73037
73120
|
const result = await new Promise((resolve14) => {
|
|
73038
|
-
const child = (0,
|
|
73121
|
+
const child = (0, import_node_child_process45.spawn)(
|
|
73039
73122
|
import_node_path76.default.join(toolchain.toolchainBin, cxx ? "clang++" : "clang"),
|
|
73040
73123
|
args,
|
|
73041
73124
|
{
|
|
@@ -73116,11 +73199,11 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
73116
73199
|
import_node_fs80.default.closeSync(descriptor);
|
|
73117
73200
|
}
|
|
73118
73201
|
}
|
|
73119
|
-
var
|
|
73202
|
+
var import_node_child_process45, import_node_crypto42, import_node_fs80, import_node_path76, SwiftObjCCompilationError, isDirectory2, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
|
|
73120
73203
|
var init_swift_objc_compile = __esm({
|
|
73121
73204
|
"src/swift-objc-compile.ts"() {
|
|
73122
73205
|
"use strict";
|
|
73123
|
-
|
|
73206
|
+
import_node_child_process45 = require("node:child_process");
|
|
73124
73207
|
import_node_crypto42 = require("node:crypto");
|
|
73125
73208
|
import_node_fs80 = __toESM(require("node:fs"), 1);
|
|
73126
73209
|
import_node_path76 = __toESM(require("node:path"), 1);
|
|
@@ -73794,7 +73877,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
|
|
|
73794
73877
|
"--distribution",
|
|
73795
73878
|
moduleRoot
|
|
73796
73879
|
];
|
|
73797
|
-
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;
|
|
73798
73881
|
if (!verified2) {
|
|
73799
73882
|
process.stderr.write(
|
|
73800
73883
|
`peach: building ${label} for private distribution ${distribution.id}\u2026
|
|
@@ -73802,7 +73885,7 @@ function privateAdapterArchive(family, roots, moduleRoot) {
|
|
|
73802
73885
|
);
|
|
73803
73886
|
const staged = `${dir}.${process.pid}`;
|
|
73804
73887
|
import_node_fs82.default.rmSync(staged, { recursive: true, force: true });
|
|
73805
|
-
(0,
|
|
73888
|
+
(0, import_node_child_process46.execFileSync)("bun", [script, ...args(staged)], { stdio: ["ignore", 2, 2] });
|
|
73806
73889
|
import_node_fs82.default.rmSync(dir, { recursive: true, force: true });
|
|
73807
73890
|
import_node_fs82.default.renameSync(staged, dir);
|
|
73808
73891
|
}
|
|
@@ -73844,11 +73927,11 @@ async function resolveAdapterArchive(family, roots, moduleRoot, lock, signal) {
|
|
|
73844
73927
|
base64: import_node_fs82.default.readFileSync(import_node_path78.default.join(dir, manifest.archive.path)).toString("base64")
|
|
73845
73928
|
};
|
|
73846
73929
|
}
|
|
73847
|
-
var
|
|
73930
|
+
var import_node_child_process46, import_node_fs82, import_node_path78, installedVersion;
|
|
73848
73931
|
var init_nitro_adapter = __esm({
|
|
73849
73932
|
"src/nitro-adapter.ts"() {
|
|
73850
73933
|
"use strict";
|
|
73851
|
-
|
|
73934
|
+
import_node_child_process46 = require("node:child_process");
|
|
73852
73935
|
import_node_fs82 = __toESM(require("node:fs"), 1);
|
|
73853
73936
|
import_node_path78 = __toESM(require("node:path"), 1);
|
|
73854
73937
|
init_src();
|
|
@@ -76235,7 +76318,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
76235
76318
|
failed = captured.failed;
|
|
76236
76319
|
reached = captured.reached;
|
|
76237
76320
|
} else {
|
|
76238
|
-
const result2 = (0,
|
|
76321
|
+
const result2 = (0, import_node_child_process47.spawnSync)(clang, [...cleaned, "-M", "-MT", "peach", "-H"], {
|
|
76239
76322
|
cwd: work,
|
|
76240
76323
|
encoding: "utf8",
|
|
76241
76324
|
env: swiftEnvironment(),
|
|
@@ -76358,11 +76441,11 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
76358
76441
|
);
|
|
76359
76442
|
return result;
|
|
76360
76443
|
}
|
|
76361
|
-
var
|
|
76444
|
+
var import_node_child_process47, import_node_crypto44, import_node_fs85, import_node_path81, cachedInputs;
|
|
76362
76445
|
var init_swift_cxx_reachable = __esm({
|
|
76363
76446
|
"src/swift-cxx-reachable.ts"() {
|
|
76364
76447
|
"use strict";
|
|
76365
|
-
|
|
76448
|
+
import_node_child_process47 = require("node:child_process");
|
|
76366
76449
|
import_node_crypto44 = require("node:crypto");
|
|
76367
76450
|
import_node_fs85 = __toESM(require("node:fs"), 1);
|
|
76368
76451
|
import_node_path81 = __toESM(require("node:path"), 1);
|
|
@@ -76451,19 +76534,19 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
76451
76534
|
} catch {
|
|
76452
76535
|
}
|
|
76453
76536
|
const out = import_node_path83.default.join(
|
|
76454
|
-
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-")),
|
|
76455
76538
|
"out.png"
|
|
76456
76539
|
);
|
|
76457
76540
|
try {
|
|
76458
76541
|
if (process.platform === "darwin") {
|
|
76459
|
-
(0,
|
|
76542
|
+
(0, import_node_child_process48.execFileSync)(
|
|
76460
76543
|
compiledSwiftHelper(RASTER_SWIFT, "swift-pdf-raster"),
|
|
76461
76544
|
[diskPath, "3", out],
|
|
76462
76545
|
{ stdio: "pipe" }
|
|
76463
76546
|
);
|
|
76464
76547
|
} else {
|
|
76465
76548
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
76466
|
-
(0,
|
|
76549
|
+
(0, import_node_child_process48.execFileSync)(
|
|
76467
76550
|
executable,
|
|
76468
76551
|
[
|
|
76469
76552
|
...prefixArgs,
|
|
@@ -76498,11 +76581,11 @@ function rasterizeSvgFile(diskPath, svgSha256) {
|
|
|
76498
76581
|
const cached4 = import_node_path83.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
76499
76582
|
if (import_node_fs87.default.existsSync(cached4)) return { bytes: import_node_fs87.default.readFileSync(cached4) };
|
|
76500
76583
|
const out = import_node_path83.default.join(
|
|
76501
|
-
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-")),
|
|
76502
76585
|
"out.png"
|
|
76503
76586
|
);
|
|
76504
76587
|
try {
|
|
76505
|
-
(0,
|
|
76588
|
+
(0, import_node_child_process48.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
76506
76589
|
const bytes = import_node_fs87.default.readFileSync(out);
|
|
76507
76590
|
import_node_fs87.default.mkdirSync(cacheDir(), { recursive: true });
|
|
76508
76591
|
import_node_fs87.default.copyFileSync(out, cached4);
|
|
@@ -76515,14 +76598,14 @@ function rasterizeSvgFile(diskPath, svgSha256) {
|
|
|
76515
76598
|
import_node_fs87.default.rmSync(import_node_path83.default.dirname(out), { recursive: true, force: true });
|
|
76516
76599
|
}
|
|
76517
76600
|
}
|
|
76518
|
-
var
|
|
76601
|
+
var import_node_child_process48, import_node_crypto45, import_node_fs87, import_node_os18, import_node_path83, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
76519
76602
|
var init_swift_pdf_raster = __esm({
|
|
76520
76603
|
"src/swift-pdf-raster.ts"() {
|
|
76521
76604
|
"use strict";
|
|
76522
|
-
|
|
76605
|
+
import_node_child_process48 = require("node:child_process");
|
|
76523
76606
|
import_node_crypto45 = require("node:crypto");
|
|
76524
76607
|
import_node_fs87 = __toESM(require("node:fs"), 1);
|
|
76525
|
-
|
|
76608
|
+
import_node_os18 = __toESM(require("node:os"), 1);
|
|
76526
76609
|
import_node_path83 = __toESM(require("node:path"), 1);
|
|
76527
76610
|
init_internal_child_contract();
|
|
76528
76611
|
init_self_invocation();
|
|
@@ -76857,7 +76940,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
76857
76940
|
const known = emptyWasmAssembly.get(key2);
|
|
76858
76941
|
if (known) return known;
|
|
76859
76942
|
const result = new Promise(
|
|
76860
|
-
(resolve14) => (0,
|
|
76943
|
+
(resolve14) => (0, import_node_child_process49.execFile)(
|
|
76861
76944
|
clang,
|
|
76862
76945
|
[
|
|
76863
76946
|
"-target",
|
|
@@ -78101,7 +78184,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
|
|
|
78101
78184
|
}
|
|
78102
78185
|
}
|
|
78103
78186
|
if (xcode?.app.postBundleScripts.length) {
|
|
78104
|
-
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-"));
|
|
78105
78188
|
const wrapper = import_node_path84.default.basename(xcode.app.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")) || `${xcode.app.name}.app`;
|
|
78106
78189
|
const bundle = import_node_path84.default.join(dir, wrapper);
|
|
78107
78190
|
try {
|
|
@@ -78152,7 +78235,7 @@ function buildSwiftBundleFiles(packagePath, hosted, inputs, resourceBundles) {
|
|
|
78152
78235
|
});
|
|
78153
78236
|
try {
|
|
78154
78237
|
const [shell, ...args] = phase.command;
|
|
78155
|
-
(0,
|
|
78238
|
+
(0, import_node_child_process49.execFileSync)(shell, args, {
|
|
78156
78239
|
cwd: phase.directory,
|
|
78157
78240
|
env,
|
|
78158
78241
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -79044,15 +79127,15 @@ function disposeSwiftProject(packagePath, signal) {
|
|
|
79044
79127
|
xcodeProjects().delete(packagePath);
|
|
79045
79128
|
sourceEntries().delete(packagePath);
|
|
79046
79129
|
}
|
|
79047
|
-
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;
|
|
79048
79131
|
var init_swift_host = __esm({
|
|
79049
79132
|
"src/swift-host.ts"() {
|
|
79050
79133
|
"use strict";
|
|
79051
79134
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
79052
|
-
|
|
79135
|
+
import_node_child_process49 = require("node:child_process");
|
|
79053
79136
|
import_node_crypto46 = require("node:crypto");
|
|
79054
79137
|
import_node_fs88 = __toESM(require("node:fs"), 1);
|
|
79055
|
-
|
|
79138
|
+
import_node_os19 = __toESM(require("node:os"), 1);
|
|
79056
79139
|
import_node_path84 = __toESM(require("node:path"), 1);
|
|
79057
79140
|
init_bundleAssets();
|
|
79058
79141
|
init_stringCatalog();
|
|
@@ -81447,11 +81530,11 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
81447
81530
|
files: hashTree(generatedRoot)
|
|
81448
81531
|
};
|
|
81449
81532
|
}
|
|
81450
|
-
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;
|
|
81451
81534
|
var init_turbo_codegen_intake = __esm({
|
|
81452
81535
|
"src/turbo-codegen-intake.ts"() {
|
|
81453
81536
|
"use strict";
|
|
81454
|
-
|
|
81537
|
+
import_node_child_process50 = require("node:child_process");
|
|
81455
81538
|
import_node_crypto47 = require("node:crypto");
|
|
81456
81539
|
import_node_fs92 = __toESM(require("node:fs"), 1);
|
|
81457
81540
|
import_node_module12 = require("node:module");
|
|
@@ -81461,7 +81544,7 @@ var init_turbo_codegen_intake = __esm({
|
|
|
81461
81544
|
init_is_record();
|
|
81462
81545
|
init_nitro_source();
|
|
81463
81546
|
init_podspec_sources();
|
|
81464
|
-
run7 = (0, import_node_util14.promisify)(
|
|
81547
|
+
run7 = (0, import_node_util14.promisify)(import_node_child_process50.execFile);
|
|
81465
81548
|
RENDERER_PODS = /* @__PURE__ */ new Set([
|
|
81466
81549
|
"React-Fabric",
|
|
81467
81550
|
"React-FabricComponents",
|
|
@@ -83897,11 +83980,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
83897
83980
|
}
|
|
83898
83981
|
`;
|
|
83899
83982
|
}
|
|
83900
|
-
var
|
|
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;
|
|
83901
83984
|
var init_turbo_source = __esm({
|
|
83902
83985
|
"src/turbo-source.ts"() {
|
|
83903
83986
|
"use strict";
|
|
83904
|
-
|
|
83987
|
+
import_node_child_process51 = require("node:child_process");
|
|
83905
83988
|
import_node_crypto48 = require("node:crypto");
|
|
83906
83989
|
import_node_fs93 = __toESM(require("node:fs"), 1);
|
|
83907
83990
|
import_node_path89 = __toESM(require("node:path"), 1);
|
|
@@ -83918,7 +84001,7 @@ var init_turbo_source = __esm({
|
|
|
83918
84001
|
init_swift_submit();
|
|
83919
84002
|
init_turbo_codegen_intake();
|
|
83920
84003
|
init_xcode_project();
|
|
83921
|
-
execFileAsync3 = (0, import_node_util15.promisify)(
|
|
84004
|
+
execFileAsync3 = (0, import_node_util15.promisify)(import_node_child_process51.execFile);
|
|
83922
84005
|
TURBO_CORE_TARGET = "TurboCore";
|
|
83923
84006
|
TURBO_FMT_TARGET = "TurboFmt";
|
|
83924
84007
|
TURBO_ENTRY_HEADER = "PeachTurboEntry.hpp";
|
|
@@ -84264,7 +84347,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
84264
84347
|
async function prepareTurboCompileInput(options) {
|
|
84265
84348
|
await prepareTurboSourceDependencies(options.reactNativeRoot);
|
|
84266
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");
|
|
84267
|
-
const scratch2 = import_node_path90.default.join(
|
|
84350
|
+
const scratch2 = import_node_path90.default.join(import_node_os20.default.tmpdir(), "peach-turbo-swift", key2);
|
|
84268
84351
|
import_node_fs94.default.mkdirSync(scratch2, { recursive: true });
|
|
84269
84352
|
const codegenDir = import_node_fs94.default.mkdtempSync(import_node_path90.default.join(scratch2, "codegen-"));
|
|
84270
84353
|
const collection = await collectTurboSources({
|
|
@@ -84478,14 +84561,14 @@ async function compileTurboModule(options) {
|
|
|
84478
84561
|
collection
|
|
84479
84562
|
};
|
|
84480
84563
|
}
|
|
84481
|
-
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;
|
|
84482
84565
|
var init_turbo_compile = __esm({
|
|
84483
84566
|
"src/turbo-compile.ts"() {
|
|
84484
84567
|
"use strict";
|
|
84485
84568
|
import_node_crypto49 = require("node:crypto");
|
|
84486
84569
|
import_node_fs94 = __toESM(require("node:fs"), 1);
|
|
84487
84570
|
import_node_module13 = require("node:module");
|
|
84488
|
-
|
|
84571
|
+
import_node_os20 = __toESM(require("node:os"), 1);
|
|
84489
84572
|
import_node_path90 = __toESM(require("node:path"), 1);
|
|
84490
84573
|
init_native_app_identity_project();
|
|
84491
84574
|
init_nitro_adapter();
|
|
@@ -84576,7 +84659,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84576
84659
|
import_node_fs95.default.mkdirSync(members2, { recursive: true });
|
|
84577
84660
|
const stripped2 = objects.map((file, index) => {
|
|
84578
84661
|
const output2 = import_node_path91.default.join(members2, `${index}-${import_node_path91.default.basename(file)}`);
|
|
84579
|
-
(0,
|
|
84662
|
+
(0, import_node_child_process52.execFileSync)(import_node_path91.default.join(module2.toolchainBin, "llvm-objcopy"), [
|
|
84580
84663
|
"--strip-debug",
|
|
84581
84664
|
file,
|
|
84582
84665
|
output2
|
|
@@ -84585,7 +84668,7 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84585
84668
|
});
|
|
84586
84669
|
const archive = import_node_path91.default.join(work, `lib${target.name}.a`);
|
|
84587
84670
|
import_node_fs95.default.rmSync(archive, { force: true });
|
|
84588
|
-
(0,
|
|
84671
|
+
(0, import_node_child_process52.execFileSync)(import_node_path91.default.join(module2.toolchainBin, "llvm-ar"), [
|
|
84589
84672
|
"rcsD",
|
|
84590
84673
|
archive,
|
|
84591
84674
|
...stripped2
|
|
@@ -84638,11 +84721,11 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
84638
84721
|
return directory2;
|
|
84639
84722
|
});
|
|
84640
84723
|
}
|
|
84641
|
-
var
|
|
84724
|
+
var import_node_child_process52, import_node_fs95, import_node_path91;
|
|
84642
84725
|
var init_react_native_core_build = __esm({
|
|
84643
84726
|
"src/react-native-core-build.ts"() {
|
|
84644
84727
|
"use strict";
|
|
84645
|
-
|
|
84728
|
+
import_node_child_process52 = require("node:child_process");
|
|
84646
84729
|
import_node_fs95 = __toESM(require("node:fs"), 1);
|
|
84647
84730
|
import_node_path91 = __toESM(require("node:path"), 1);
|
|
84648
84731
|
init_home_paths();
|
|
@@ -86425,7 +86508,7 @@ function expoUnitAppPaths(unit2) {
|
|
|
86425
86508
|
});
|
|
86426
86509
|
}
|
|
86427
86510
|
function expoSwiftPackage(appKey, name3) {
|
|
86428
|
-
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);
|
|
86429
86512
|
}
|
|
86430
86513
|
function failureRecordPath(packagePath) {
|
|
86431
86514
|
const app = import_node_path93.default.dirname(import_node_path93.default.dirname(packagePath));
|
|
@@ -87192,16 +87275,16 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
87192
87275
|
}
|
|
87193
87276
|
return true;
|
|
87194
87277
|
}
|
|
87195
|
-
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;
|
|
87196
87279
|
var init_expo_swift_host = __esm({
|
|
87197
87280
|
"src/expo-swift-host.ts"() {
|
|
87198
87281
|
"use strict";
|
|
87199
87282
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
87200
|
-
|
|
87283
|
+
import_node_child_process53 = require("node:child_process");
|
|
87201
87284
|
import_node_crypto51 = require("node:crypto");
|
|
87202
87285
|
import_node_fs97 = __toESM(require("node:fs"), 1);
|
|
87203
87286
|
import_node_module15 = require("node:module");
|
|
87204
|
-
|
|
87287
|
+
import_node_os21 = __toESM(require("node:os"), 1);
|
|
87205
87288
|
import_node_path93 = __toESM(require("node:path"), 1);
|
|
87206
87289
|
import_node_url6 = require("node:url");
|
|
87207
87290
|
import_node_util17 = require("node:util");
|
|
@@ -87235,7 +87318,7 @@ var init_expo_swift_host = __esm({
|
|
|
87235
87318
|
init_swift_submit();
|
|
87236
87319
|
init_swift_toolchain();
|
|
87237
87320
|
init_turbo_source();
|
|
87238
|
-
run8 = (0, import_node_util17.promisify)(
|
|
87321
|
+
run8 = (0, import_node_util17.promisify)(import_node_child_process53.execFile);
|
|
87239
87322
|
scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
|
|
87240
87323
|
EXPO_SWIFT_ROUTE = "/__peach/expo-swift";
|
|
87241
87324
|
EXPO_SWIFT_ENTRY = "Sources/PeachExpoApp/PeachExpoEntry.swift";
|
|
@@ -87714,7 +87797,7 @@ async function readProjectOneNativeAppCatalog(projectRoot, env, runtimeExecutabl
|
|
|
87714
87797
|
const loader = (0, import_node_url7.pathToFileURL)(
|
|
87715
87798
|
import_node_path96.default.join(import_node_path96.default.dirname(onePackage), "dist/esm/vite/loadConfig.mjs")
|
|
87716
87799
|
).href;
|
|
87717
|
-
const { stdout } = await (0, import_node_util18.promisify)(
|
|
87800
|
+
const { stdout } = await (0, import_node_util18.promisify)(import_node_child_process54.execFile)(
|
|
87718
87801
|
runtimeExecutable,
|
|
87719
87802
|
[
|
|
87720
87803
|
"--input-type=module",
|
|
@@ -87731,11 +87814,11 @@ process.exit(0)`,
|
|
|
87731
87814
|
const json = stdout.split("\n").findLast((line) => line.startsWith('{"app"'));
|
|
87732
87815
|
return readOneNativeAppCatalog(json ? JSON.parse(json) : null, projectRoot);
|
|
87733
87816
|
}
|
|
87734
|
-
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;
|
|
87735
87818
|
var init_app_catalog = __esm({
|
|
87736
87819
|
"cli/app-catalog.ts"() {
|
|
87737
87820
|
"use strict";
|
|
87738
|
-
|
|
87821
|
+
import_node_child_process54 = require("node:child_process");
|
|
87739
87822
|
import_node_fs99 = __toESM(require("node:fs"), 1);
|
|
87740
87823
|
import_node_module16 = require("node:module");
|
|
87741
87824
|
import_node_path96 = __toESM(require("node:path"), 1);
|
|
@@ -88474,7 +88557,7 @@ async function prepareNitroCompileInput(options) {
|
|
|
88474
88557
|
projectRoot: options.projectRoot,
|
|
88475
88558
|
providers: reactProviders,
|
|
88476
88559
|
reactNativeRoot: collection.reactNative.root,
|
|
88477
|
-
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-")),
|
|
88478
88561
|
configuration: options.configuration,
|
|
88479
88562
|
installedPods: nativeLibraries
|
|
88480
88563
|
});
|
|
@@ -88529,7 +88612,7 @@ async function prepareNitroCompileInput(options) {
|
|
|
88529
88612
|
const key2 = (0, import_node_crypto55.createHash)("sha256").update(
|
|
88530
88613
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
88531
88614
|
).update("\0").update(import_node_fs102.default.realpathSync(options.moduleRoot)).update("\0").update(options.configuration).digest("hex");
|
|
88532
|
-
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}`);
|
|
88533
88616
|
const sharedLibrary = [...nativeLibraries.values()].find(
|
|
88534
88617
|
(pod) => pod.sharedLibrary
|
|
88535
88618
|
)?.sharedLibrary;
|
|
@@ -88582,13 +88665,13 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
88582
88665
|
...sources(import_node_path99.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
88583
88666
|
];
|
|
88584
88667
|
}
|
|
88585
|
-
var import_node_crypto55, import_node_fs102,
|
|
88668
|
+
var import_node_crypto55, import_node_fs102, import_node_os22, import_node_path99, BUNDLED_CXX_NAMESPACES;
|
|
88586
88669
|
var init_nitro_compile = __esm({
|
|
88587
88670
|
"src/nitro-compile.ts"() {
|
|
88588
88671
|
"use strict";
|
|
88589
88672
|
import_node_crypto55 = require("node:crypto");
|
|
88590
88673
|
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
88591
|
-
|
|
88674
|
+
import_node_os22 = __toESM(require("node:os"), 1);
|
|
88592
88675
|
import_node_path99 = __toESM(require("node:path"), 1);
|
|
88593
88676
|
init_installed_native_libraries();
|
|
88594
88677
|
init_native_app_identity_project();
|
|
@@ -88749,7 +88832,7 @@ var init_nitro_superset = __esm({
|
|
|
88749
88832
|
init_nitroContract();
|
|
88750
88833
|
init_swift_standin_digest();
|
|
88751
88834
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
88752
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
88835
|
+
NITRO_COMPILER_DIGEST = true ? "f44c818b566c9e2f13cc675454c9e5c38d346e0fb6fc47d33d179495a14f8580" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
88753
88836
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
88754
88837
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
88755
88838
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -88951,7 +89034,7 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
88951
89034
|
const runtimeBundle = await withSwiftRootLock(
|
|
88952
89035
|
import_node_path102.default.join(await import_promises9.default.realpath(packageDir), "bundle"),
|
|
88953
89036
|
async () => {
|
|
88954
|
-
await (0, import_node_util19.promisify)(
|
|
89037
|
+
await (0, import_node_util19.promisify)(import_node_child_process55.execFile)(
|
|
88955
89038
|
process.env.NODE_BINARY || "node",
|
|
88956
89039
|
[import_node_path102.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
88957
89040
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
@@ -88967,11 +89050,11 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
88967
89050
|
}
|
|
88968
89051
|
};
|
|
88969
89052
|
}
|
|
88970
|
-
var
|
|
89053
|
+
var import_node_child_process55, import_promises9, import_node_module18, import_node_path102, import_node_util19, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
88971
89054
|
var init_expo_widgets_bundle = __esm({
|
|
88972
89055
|
"src/expo-widgets-bundle.ts"() {
|
|
88973
89056
|
"use strict";
|
|
88974
|
-
|
|
89057
|
+
import_node_child_process55 = require("node:child_process");
|
|
88975
89058
|
import_promises9 = __toESM(require("node:fs/promises"), 1);
|
|
88976
89059
|
import_node_module18 = require("node:module");
|
|
88977
89060
|
import_node_path102 = __toESM(require("node:path"), 1);
|
|
@@ -89458,7 +89541,7 @@ var init_one_sdk_bundle = __esm({
|
|
|
89458
89541
|
var runtime_companion_default;
|
|
89459
89542
|
var init_runtime_companion = __esm({
|
|
89460
89543
|
"runtime-companion.json"() {
|
|
89461
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
89544
|
+
runtime_companion_default = { abi: 1, sha256: "0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d", file: "node/cli-0688d30cb1cc3cd8d500d66cefa68e1e54456e3a4cd15b621932e4800fc69b1d.cjs" };
|
|
89462
89545
|
}
|
|
89463
89546
|
});
|
|
89464
89547
|
|
|
@@ -91986,7 +92069,7 @@ async function scanDevServers(opts = {}) {
|
|
|
91986
92069
|
}
|
|
91987
92070
|
return results.filter((r) => !isSootSimSelfServer(r)).sort((a, b) => a.port - b.port);
|
|
91988
92071
|
}
|
|
91989
|
-
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;
|
|
91990
92073
|
var init_dev_server_scanner = __esm({
|
|
91991
92074
|
"scripts/dev-server-scanner.ts"() {
|
|
91992
92075
|
"use strict";
|
|
@@ -91995,7 +92078,7 @@ var init_dev_server_scanner = __esm({
|
|
|
91995
92078
|
import_http = __toESM(require("http"), 1);
|
|
91996
92079
|
import_net = __toESM(require("net"), 1);
|
|
91997
92080
|
import_node_fs109 = require("node:fs");
|
|
91998
|
-
|
|
92081
|
+
import_node_os23 = require("node:os");
|
|
91999
92082
|
import_node_path109 = require("node:path");
|
|
92000
92083
|
init_backend_origin();
|
|
92001
92084
|
init_config();
|
|
@@ -92007,8 +92090,8 @@ var init_dev_server_scanner = __esm({
|
|
|
92007
92090
|
init_settings_bundle();
|
|
92008
92091
|
init_swiftDiscoveryContract();
|
|
92009
92092
|
init_optional_demo_registry();
|
|
92010
|
-
LISTENER_LOCK_PATH = (0, import_node_path109.join)((0,
|
|
92011
|
-
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");
|
|
92012
92095
|
LISTENER_LOCK_STALE_MS = 25e3;
|
|
92013
92096
|
LISTENER_LOCK_WAIT_MS = 8e3;
|
|
92014
92097
|
TIMEOUT_MS = 250;
|
|
@@ -92584,7 +92667,7 @@ function mkfifoSync(p) {
|
|
|
92584
92667
|
import_node_fs111.default.unlinkSync(p);
|
|
92585
92668
|
}
|
|
92586
92669
|
}
|
|
92587
|
-
const result = (0,
|
|
92670
|
+
const result = (0, import_node_child_process56.spawnSync)("mkfifo", ["-m", "600", p]);
|
|
92588
92671
|
if (result.status !== 0) {
|
|
92589
92672
|
throw new Error(
|
|
92590
92673
|
`mkfifo(${p}) failed: ${result.stderr?.toString().trim() || "unknown error"}`
|
|
@@ -92652,7 +92735,7 @@ async function startSession(opts) {
|
|
|
92652
92735
|
if (claudeSessionUuid) {
|
|
92653
92736
|
wrapperArgs.push("--claude-session-uuid", claudeSessionUuid);
|
|
92654
92737
|
}
|
|
92655
|
-
const child = (0,
|
|
92738
|
+
const child = (0, import_node_child_process56.spawn)(executable, wrapperArgs, {
|
|
92656
92739
|
detached: true,
|
|
92657
92740
|
stdio: "ignore",
|
|
92658
92741
|
env: {
|
|
@@ -92804,11 +92887,11 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
92804
92887
|
import_node_fs111.default.closeSync(fd);
|
|
92805
92888
|
}
|
|
92806
92889
|
}
|
|
92807
|
-
var
|
|
92890
|
+
var import_node_child_process56, import_node_crypto59, import_node_fs111, import_node_path111, import_node_readline, AgentSessionError;
|
|
92808
92891
|
var init_agent_sessions = __esm({
|
|
92809
92892
|
"src/agent-sessions.ts"() {
|
|
92810
92893
|
"use strict";
|
|
92811
|
-
|
|
92894
|
+
import_node_child_process56 = require("node:child_process");
|
|
92812
92895
|
import_node_crypto59 = require("node:crypto");
|
|
92813
92896
|
import_node_fs111 = __toESM(require("node:fs"), 1);
|
|
92814
92897
|
import_node_path111 = __toESM(require("node:path"), 1);
|
|
@@ -97121,11 +97204,11 @@ function looksBinary(filePath, size) {
|
|
|
97121
97204
|
if (fd !== void 0) import_node_fs116.default.closeSync(fd);
|
|
97122
97205
|
}
|
|
97123
97206
|
}
|
|
97124
|
-
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;
|
|
97125
97208
|
var init_checkout_plane = __esm({
|
|
97126
97209
|
"cli/commands/box/checkout-plane.ts"() {
|
|
97127
97210
|
"use strict";
|
|
97128
|
-
|
|
97211
|
+
import_node_child_process57 = require("node:child_process");
|
|
97129
97212
|
import_node_fs116 = __toESM(require("node:fs"), 1);
|
|
97130
97213
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
97131
97214
|
CheckoutRequiresGitError = class extends Error {
|
|
@@ -97153,7 +97236,7 @@ var init_checkout_plane = __esm({
|
|
|
97153
97236
|
}
|
|
97154
97237
|
listFiles() {
|
|
97155
97238
|
const args = this.trackedOnly ? ["ls-files", "-z"] : ["ls-files", "-co", "--exclude-standard", "-z"];
|
|
97156
|
-
const stdout = (0,
|
|
97239
|
+
const stdout = (0, import_node_child_process57.execFileSync)("git", args, {
|
|
97157
97240
|
cwd: this.root,
|
|
97158
97241
|
encoding: "utf8",
|
|
97159
97242
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -98758,11 +98841,11 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
98758
98841
|
}
|
|
98759
98842
|
return linked;
|
|
98760
98843
|
}
|
|
98761
|
-
var
|
|
98844
|
+
var import_node_child_process58, import_node_fs119, import_node_module21, import_node_path120, import_node_util20, run9, resolving;
|
|
98762
98845
|
var init_android_autolinking = __esm({
|
|
98763
98846
|
"src/android-autolinking.ts"() {
|
|
98764
98847
|
"use strict";
|
|
98765
|
-
|
|
98848
|
+
import_node_child_process58 = require("node:child_process");
|
|
98766
98849
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
98767
98850
|
import_node_module21 = require("node:module");
|
|
98768
98851
|
import_node_path120 = __toESM(require("node:path"), 1);
|
|
@@ -98771,7 +98854,7 @@ var init_android_autolinking = __esm({
|
|
|
98771
98854
|
init_forked_script_contract();
|
|
98772
98855
|
init_is_record();
|
|
98773
98856
|
init_react_native_autolinking();
|
|
98774
|
-
run9 = (0, import_node_util20.promisify)(
|
|
98857
|
+
run9 = (0, import_node_util20.promisify)(import_node_child_process58.execFile);
|
|
98775
98858
|
resolving = /* @__PURE__ */ new Map();
|
|
98776
98859
|
}
|
|
98777
98860
|
});
|
|
@@ -98866,11 +98949,11 @@ async function resolveAndroidGradleSources(request) {
|
|
|
98866
98949
|
import_node_fs120.default.rmSync(work, { recursive: true, force: true });
|
|
98867
98950
|
}
|
|
98868
98951
|
}
|
|
98869
|
-
var
|
|
98952
|
+
var import_node_child_process59, import_node_crypto62, import_node_fs120, import_node_path121, import_node_util21, run10, modelQuery;
|
|
98870
98953
|
var init_android_gradle_sources = __esm({
|
|
98871
98954
|
"src/android-gradle-sources.ts"() {
|
|
98872
98955
|
"use strict";
|
|
98873
|
-
|
|
98956
|
+
import_node_child_process59 = require("node:child_process");
|
|
98874
98957
|
import_node_crypto62 = require("node:crypto");
|
|
98875
98958
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
98876
98959
|
import_node_path121 = __toESM(require("node:path"), 1);
|
|
@@ -98878,7 +98961,7 @@ var init_android_gradle_sources = __esm({
|
|
|
98878
98961
|
init_forked_script_contract();
|
|
98879
98962
|
init_is_record();
|
|
98880
98963
|
init_kotlin_toolchain();
|
|
98881
|
-
run10 = (0, import_node_util21.promisify)(
|
|
98964
|
+
run10 = (0, import_node_util21.promisify)(import_node_child_process59.execFile);
|
|
98882
98965
|
modelQuery = `
|
|
98883
98966
|
import groovy.json.JsonOutput
|
|
98884
98967
|
import groovy.json.JsonSlurper
|
|
@@ -99251,11 +99334,11 @@ async function compileJavaModuleAbi(input) {
|
|
|
99251
99334
|
);
|
|
99252
99335
|
return library;
|
|
99253
99336
|
}
|
|
99254
|
-
var
|
|
99337
|
+
var import_node_child_process60, import_node_crypto63, import_node_fs122, import_node_path123, import_node_util22, run11, JAVA_BINDINGS_INITIALIZER;
|
|
99255
99338
|
var init_java_module_abi = __esm({
|
|
99256
99339
|
"src/java-module-abi.ts"() {
|
|
99257
99340
|
"use strict";
|
|
99258
|
-
|
|
99341
|
+
import_node_child_process60 = require("node:child_process");
|
|
99259
99342
|
import_node_crypto63 = require("node:crypto");
|
|
99260
99343
|
import_node_fs122 = __toESM(require("node:fs"), 1);
|
|
99261
99344
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
@@ -99263,7 +99346,7 @@ var init_java_module_abi = __esm({
|
|
|
99263
99346
|
init_android_bridge_packages();
|
|
99264
99347
|
init_is_record();
|
|
99265
99348
|
init_kotlin_toolchain();
|
|
99266
|
-
run11 = (0, import_node_util22.promisify)(
|
|
99349
|
+
run11 = (0, import_node_util22.promisify)(import_node_child_process60.execFile);
|
|
99267
99350
|
JAVA_BINDINGS_INITIALIZER = "initializeJavaBindings";
|
|
99268
99351
|
}
|
|
99269
99352
|
});
|
|
@@ -99397,18 +99480,18 @@ async function installKotlinSdkArchive(archive, compilerSha256) {
|
|
|
99397
99480
|
import_node_fs123.default.rmSync(work, { recursive: true, force: true });
|
|
99398
99481
|
}
|
|
99399
99482
|
}
|
|
99400
|
-
var
|
|
99483
|
+
var import_node_child_process61, import_node_crypto64, import_node_fs123, import_node_path124, import_node_util23, run12;
|
|
99401
99484
|
var init_kotlin_sdk = __esm({
|
|
99402
99485
|
"src/kotlin-sdk.ts"() {
|
|
99403
99486
|
"use strict";
|
|
99404
|
-
|
|
99487
|
+
import_node_child_process61 = require("node:child_process");
|
|
99405
99488
|
import_node_crypto64 = require("node:crypto");
|
|
99406
99489
|
import_node_fs123 = __toESM(require("node:fs"), 1);
|
|
99407
99490
|
import_node_path124 = __toESM(require("node:path"), 1);
|
|
99408
99491
|
import_node_util23 = require("node:util");
|
|
99409
99492
|
init_kotlin_toolchain();
|
|
99410
99493
|
init_kotlinSdkContract();
|
|
99411
|
-
run12 = (0, import_node_util23.promisify)(
|
|
99494
|
+
run12 = (0, import_node_util23.promisify)(import_node_child_process61.execFile);
|
|
99412
99495
|
}
|
|
99413
99496
|
});
|
|
99414
99497
|
|
|
@@ -101013,11 +101096,11 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
101013
101096
|
}
|
|
101014
101097
|
return true;
|
|
101015
101098
|
}
|
|
101016
|
-
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;
|
|
101017
101100
|
var init_kotlin_host = __esm({
|
|
101018
101101
|
"src/kotlin-host.ts"() {
|
|
101019
101102
|
"use strict";
|
|
101020
|
-
|
|
101103
|
+
import_node_child_process62 = require("node:child_process");
|
|
101021
101104
|
import_node_crypto66 = require("node:crypto");
|
|
101022
101105
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
101023
101106
|
import_node_module22 = require("node:module");
|
|
@@ -101033,7 +101116,7 @@ var init_kotlin_host = __esm({
|
|
|
101033
101116
|
init_kotlin_toolchain();
|
|
101034
101117
|
init_kotlin_view_models();
|
|
101035
101118
|
init_kotlin_module();
|
|
101036
|
-
run13 = (0, import_node_util24.promisify)(
|
|
101119
|
+
run13 = (0, import_node_util24.promisify)(import_node_child_process62.execFile);
|
|
101037
101120
|
KOTLIN_ARTIFACT_PREFIX = "/__peach/kotlin-artifact/";
|
|
101038
101121
|
SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
101039
101122
|
"node_modules",
|
|
@@ -104581,15 +104664,15 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
104581
104664
|
}
|
|
104582
104665
|
return { files: files2, ambiguous, verified: false, mismatched: true };
|
|
104583
104666
|
}
|
|
104584
|
-
function unverifiedContentKey(dest,
|
|
104667
|
+
function unverifiedContentKey(dest, fileDigests2) {
|
|
104585
104668
|
return JSON.stringify(
|
|
104586
104669
|
dest.placements.map(
|
|
104587
104670
|
(placement) => placement.verified ? null : [...placement.files].map(([scale, relative6]) => {
|
|
104588
104671
|
const file = (0, import_node_path133.join)(dest.directory, relative6);
|
|
104589
|
-
let digest3 =
|
|
104672
|
+
let digest3 = fileDigests2.get(file);
|
|
104590
104673
|
if (digest3 === void 0) {
|
|
104591
104674
|
digest3 = (0, import_node_crypto69.createHash)("sha256").update((0, import_node_fs132.readFileSync)(file)).digest("hex");
|
|
104592
|
-
|
|
104675
|
+
fileDigests2.set(file, digest3);
|
|
104593
104676
|
}
|
|
104594
104677
|
return [scale, digest3];
|
|
104595
104678
|
}).sort(([first], [second]) => first - second)
|
|
@@ -104680,9 +104763,9 @@ function searchMetroAssetDest(bundlePath, descriptors, command, assetsDirectory)
|
|
|
104680
104763
|
}
|
|
104681
104764
|
const best = Math.max(...holders.map((holder) => holder.verified));
|
|
104682
104765
|
const rivals = holders.filter((holder) => holder.verified === best);
|
|
104683
|
-
const
|
|
104766
|
+
const fileDigests2 = /* @__PURE__ */ new Map();
|
|
104684
104767
|
const distinct = new Set(
|
|
104685
|
-
rivals.map((rival) => unverifiedContentKey(rival.dest,
|
|
104768
|
+
rivals.map((rival) => unverifiedContentKey(rival.dest, fileDigests2))
|
|
104686
104769
|
);
|
|
104687
104770
|
const winner = rivals[0];
|
|
104688
104771
|
if (!winner) return { dest: null, searched, truncated, unconfirmed: false };
|
|
@@ -108318,7 +108401,7 @@ function pausedPids() {
|
|
|
108318
108401
|
}
|
|
108319
108402
|
function heldRoots(paused, roots) {
|
|
108320
108403
|
const parents = /* @__PURE__ */ new Map();
|
|
108321
|
-
for (const line of (0,
|
|
108404
|
+
for (const line of (0, import_node_child_process63.execFileSync)("ps", ["-A", "-o", "pid=,ppid="], {
|
|
108322
108405
|
encoding: "utf8"
|
|
108323
108406
|
}).split("\n")) {
|
|
108324
108407
|
const [pid, ppid] = line.trim().split(/\s+/).map(Number);
|
|
@@ -108380,16 +108463,16 @@ function setPauseAwareTimeout(fn, budgetMs, hostPid) {
|
|
|
108380
108463
|
schedule();
|
|
108381
108464
|
};
|
|
108382
108465
|
}
|
|
108383
|
-
var
|
|
108466
|
+
var import_node_child_process63, import_node_fs133, import_node_os24, import_node_path134, LEDGER_PATH2, TICK_MS2, timers, poll, pollDueAt;
|
|
108384
108467
|
var init_pause_aware_timeout = __esm({
|
|
108385
108468
|
"cli/pause-aware-timeout.ts"() {
|
|
108386
108469
|
"use strict";
|
|
108387
|
-
|
|
108470
|
+
import_node_child_process63 = require("node:child_process");
|
|
108388
108471
|
import_node_fs133 = require("node:fs");
|
|
108389
|
-
|
|
108472
|
+
import_node_os24 = __toESM(require("node:os"), 1);
|
|
108390
108473
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
108391
108474
|
LEDGER_PATH2 = import_node_path134.default.join(
|
|
108392
|
-
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"),
|
|
108393
108476
|
"governor-pauses.json"
|
|
108394
108477
|
);
|
|
108395
108478
|
TICK_MS2 = 500;
|
|
@@ -109963,7 +110046,7 @@ function isAppBinaryPath(target) {
|
|
|
109963
110046
|
}
|
|
109964
110047
|
function extractAppBinaryBundle(binary2) {
|
|
109965
110048
|
const file = import_node_path138.default.resolve(binary2);
|
|
109966
|
-
const entries = (0,
|
|
110049
|
+
const entries = (0, import_node_child_process64.execFileSync)("unzip", ["-Z1", file], {
|
|
109967
110050
|
encoding: "utf8",
|
|
109968
110051
|
maxBuffer: 256 * 1024 * 1024
|
|
109969
110052
|
}).split("\n");
|
|
@@ -109989,7 +110072,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
109989
110072
|
const iosAssets = `${appRoot}/assets/`;
|
|
109990
110073
|
if (appRoot.startsWith("Payload/") && entries.some((entry) => entry.startsWith(iosAssets)))
|
|
109991
110074
|
patterns.push(`${iosAssets}*`);
|
|
109992
|
-
(0,
|
|
110075
|
+
(0, import_node_child_process64.execFileSync)("unzip", ["-q", "-o", file, ...patterns, "-d", extracted]);
|
|
109993
110076
|
const manifest = readPeachSidecarManifest(
|
|
109994
110077
|
JSON.parse(import_node_fs137.default.readFileSync(import_node_path138.default.join(extracted, manifestEntry), "utf8"))
|
|
109995
110078
|
);
|
|
@@ -110016,11 +110099,11 @@ function extractAppBinaryBundle(binary2) {
|
|
|
110016
110099
|
);
|
|
110017
110100
|
return { bundlePath, platform: platform2 };
|
|
110018
110101
|
}
|
|
110019
|
-
var
|
|
110102
|
+
var import_node_child_process64, import_node_crypto70, import_node_fs137, import_node_path138, import_node_zlib4;
|
|
110020
110103
|
var init_binary_sidecar = __esm({
|
|
110021
110104
|
"cli/binary-sidecar.ts"() {
|
|
110022
110105
|
"use strict";
|
|
110023
|
-
|
|
110106
|
+
import_node_child_process64 = require("node:child_process");
|
|
110024
110107
|
import_node_crypto70 = require("node:crypto");
|
|
110025
110108
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
110026
110109
|
import_node_path138 = __toESM(require("node:path"), 1);
|
|
@@ -111813,7 +111896,7 @@ function packageChromiumPath(resolved, env) {
|
|
|
111813
111896
|
const cached4 = known[key2];
|
|
111814
111897
|
if (cached4) return { ok: true, path: cached4 };
|
|
111815
111898
|
const self = rnxSelfInvocation();
|
|
111816
|
-
const probe2 = (0,
|
|
111899
|
+
const probe2 = (0, import_node_child_process65.spawnSync)(
|
|
111817
111900
|
self.executable,
|
|
111818
111901
|
[...self.prefixArgs, RNX_INTERNAL_COMMAND, RNX_INTERNAL_CHILDREN.playwrightProbe],
|
|
111819
111902
|
{
|
|
@@ -111918,7 +112001,7 @@ async function ensurePlaywrightBrowser(resolved, headless, env = process.env) {
|
|
|
111918
112001
|
};
|
|
111919
112002
|
}
|
|
111920
112003
|
const installer = rnxSelfInvocation();
|
|
111921
|
-
const install = (0,
|
|
112004
|
+
const install = (0, import_node_child_process65.spawnSync)(
|
|
111922
112005
|
installer.executable,
|
|
111923
112006
|
[
|
|
111924
112007
|
...installer.prefixArgs,
|
|
@@ -111977,11 +112060,11 @@ async function launchProvisionedPlaywright() {
|
|
|
111977
112060
|
{ headless: true }
|
|
111978
112061
|
);
|
|
111979
112062
|
}
|
|
111980
|
-
var
|
|
112063
|
+
var import_node_child_process65, import_node_fs138, import_node_module24, import_node_path139, CHROMIUM_PATHS_KEPT;
|
|
111981
112064
|
var init_playwright_provisioning = __esm({
|
|
111982
112065
|
"cli/drivers/playwright-provisioning.ts"() {
|
|
111983
112066
|
"use strict";
|
|
111984
|
-
|
|
112067
|
+
import_node_child_process65 = require("node:child_process");
|
|
111985
112068
|
import_node_fs138 = require("node:fs");
|
|
111986
112069
|
import_node_module24 = require("node:module");
|
|
111987
112070
|
import_node_path139 = require("node:path");
|
|
@@ -112461,7 +112544,7 @@ var init_crash_fingerprint = __esm({
|
|
|
112461
112544
|
// cli/telemetry.ts
|
|
112462
112545
|
function sanitizeDiagnosticMessage(value) {
|
|
112463
112546
|
const firstLine = value.slice(0, 2048).split(/[\r\n\u2028\u2029]/, 1)[0] ?? "";
|
|
112464
|
-
return firstLine.split((0,
|
|
112547
|
+
return firstLine.split((0, import_node_os25.homedir)()).join("<home>").replace(
|
|
112465
112548
|
/<package:(?:@[\w.-]+\/)?[\w.-]+>|(?:https?:\/\/|file:\/\/|[A-Za-z]:[\\/]|<home>[\\/]|\/|\.{1,2}[\\/]|\b[\w.-]+[\\/])(?:[^\s"'<>]|\s(?=[^"'<>]*[\\/]))+/g,
|
|
112466
112549
|
(location) => {
|
|
112467
112550
|
if (location.startsWith("<package:")) return location;
|
|
@@ -112493,11 +112576,11 @@ function trackCliDiagnostic(diagnostic) {
|
|
|
112493
112576
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
112494
112577
|
});
|
|
112495
112578
|
}
|
|
112496
|
-
var
|
|
112579
|
+
var import_node_os25, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
|
|
112497
112580
|
var init_telemetry = __esm({
|
|
112498
112581
|
"cli/telemetry.ts"() {
|
|
112499
112582
|
"use strict";
|
|
112500
|
-
|
|
112583
|
+
import_node_os25 = require("node:os");
|
|
112501
112584
|
init_event_identity();
|
|
112502
112585
|
init_cli_version();
|
|
112503
112586
|
init_crash_fingerprint();
|
|
@@ -114594,7 +114677,7 @@ var init_meta = __esm({
|
|
|
114594
114677
|
option("-q, --quiet", "suppress per-connection logging"),
|
|
114595
114678
|
option(
|
|
114596
114679
|
"--exit-when-unused",
|
|
114597
|
-
"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"
|
|
114598
114681
|
)
|
|
114599
114682
|
],
|
|
114600
114683
|
examples: [
|
|
@@ -118302,7 +118385,7 @@ function stageBuiltBundleManifest(bundleUrl, config) {
|
|
|
118302
118385
|
const bundle = new URL(bundleUrl);
|
|
118303
118386
|
if (!isStagedHostFileRequest(bundle.pathname) || Object.keys(config).length === 0)
|
|
118304
118387
|
return null;
|
|
118305
|
-
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-"));
|
|
118306
118389
|
try {
|
|
118307
118390
|
const file = import_node_path144.default.join(directory2, "manifest.json");
|
|
118308
118391
|
import_node_fs143.default.writeFileSync(file, JSON.stringify({ extra: { expoClient: config } }));
|
|
@@ -118542,12 +118625,12 @@ function applyShellLaunchOptions(url, opts) {
|
|
|
118542
118625
|
for (const entry of opts.args ?? []) url.searchParams.append("arg", entry);
|
|
118543
118626
|
return url;
|
|
118544
118627
|
}
|
|
118545
|
-
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;
|
|
118546
118629
|
var init_shell_url = __esm({
|
|
118547
118630
|
"cli/commands/shell-url.ts"() {
|
|
118548
118631
|
"use strict";
|
|
118549
118632
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
118550
|
-
|
|
118633
|
+
import_node_os26 = __toESM(require("node:os"), 1);
|
|
118551
118634
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
118552
118635
|
init_oneViteAliases();
|
|
118553
118636
|
init_dev_server_scanner();
|
|
@@ -118647,12 +118730,12 @@ function skillsDir() {
|
|
|
118647
118730
|
return skillsDirPath;
|
|
118648
118731
|
}
|
|
118649
118732
|
function targetFromHome(envName, fallbackDir) {
|
|
118650
|
-
const home = process.env[envName] || path129.join(
|
|
118733
|
+
const home = process.env[envName] || path129.join(os23.homedir(), fallbackDir);
|
|
118651
118734
|
return path129.join(home, "skills");
|
|
118652
118735
|
}
|
|
118653
118736
|
function codexTargets() {
|
|
118654
118737
|
const homes = /* @__PURE__ */ new Map();
|
|
118655
|
-
const userHome = process.env.HOME ||
|
|
118738
|
+
const userHome = process.env.HOME || os23.homedir();
|
|
118656
118739
|
const primaryCodexHome = process.env.CODEX_HOME || path129.join(userHome, ".codex");
|
|
118657
118740
|
homes.set(path129.resolve(primaryCodexHome), "codex");
|
|
118658
118741
|
const tmCodexHomes = process.env.TM_CODEX_HOMES;
|
|
@@ -118780,13 +118863,13 @@ function listSkills() {
|
|
|
118780
118863
|
}
|
|
118781
118864
|
return skills.sort((a, b) => a.name.localeCompare(b.name));
|
|
118782
118865
|
}
|
|
118783
|
-
var import_child_process9, fs102,
|
|
118866
|
+
var import_child_process9, fs102, os23, path129, import_url3, import_meta4, bundledSkills, readBundledSkills, skillsDirPath;
|
|
118784
118867
|
var init_skills = __esm({
|
|
118785
118868
|
"cli/commands/skills.ts"() {
|
|
118786
118869
|
"use strict";
|
|
118787
118870
|
import_child_process9 = require("child_process");
|
|
118788
118871
|
fs102 = __toESM(require("fs"), 1);
|
|
118789
|
-
|
|
118872
|
+
os23 = __toESM(require("os"), 1);
|
|
118790
118873
|
path129 = __toESM(require("path"), 1);
|
|
118791
118874
|
import_url3 = require("url");
|
|
118792
118875
|
init_browser();
|
|
@@ -131481,7 +131564,7 @@ function repositories(body, where) {
|
|
|
131481
131564
|
if (name3 === "google") roots.push("https://dl.google.com/dl/android/maven2");
|
|
131482
131565
|
else if (name3 === "mavenCentral") roots.push("https://repo1.maven.org/maven2");
|
|
131483
131566
|
else if (name3 === "mavenLocal")
|
|
131484
|
-
roots.push(import_node_path151.default.join(
|
|
131567
|
+
roots.push(import_node_path151.default.join(import_node_os27.default.homedir(), ".m2", "repository"));
|
|
131485
131568
|
else {
|
|
131486
131569
|
const declared = direct ?? /["']([^"']+)["']/.exec(block2 ?? "")?.[1];
|
|
131487
131570
|
if (!declared)
|
|
@@ -131564,7 +131647,7 @@ function extract(bytes, where) {
|
|
|
131564
131647
|
const cached4 = pending.get(key2);
|
|
131565
131648
|
if (cached4) return cached4;
|
|
131566
131649
|
const request = (async () => {
|
|
131567
|
-
const dest = import_node_path151.default.join(
|
|
131650
|
+
const dest = import_node_path151.default.join(import_node_os27.default.tmpdir(), "peach-maven-sources", key2);
|
|
131568
131651
|
const marker = import_node_path151.default.join(dest, ".complete");
|
|
131569
131652
|
if (!import_node_fs150.default.existsSync(marker)) {
|
|
131570
131653
|
const entries = zipSources(bytes, where);
|
|
@@ -131623,13 +131706,13 @@ async function mavenKotlinSources(projectDir, coordinate, where) {
|
|
|
131623
131706
|
}
|
|
131624
131707
|
return null;
|
|
131625
131708
|
}
|
|
131626
|
-
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;
|
|
131627
131710
|
var init_kotlin_maven_sources = __esm({
|
|
131628
131711
|
"src/kotlin-maven-sources.ts"() {
|
|
131629
131712
|
"use strict";
|
|
131630
131713
|
import_node_crypto76 = require("node:crypto");
|
|
131631
131714
|
import_node_fs150 = __toESM(require("node:fs"), 1);
|
|
131632
|
-
|
|
131715
|
+
import_node_os27 = __toESM(require("node:os"), 1);
|
|
131633
131716
|
import_node_path151 = __toESM(require("node:path"), 1);
|
|
131634
131717
|
import_node_zlib5 = require("node:zlib");
|
|
131635
131718
|
pending = /* @__PURE__ */ new Map();
|
|
@@ -133300,13 +133383,13 @@ async function connectBridgeForOpen(preferredPort, explicitPort, resources, runt
|
|
|
133300
133383
|
}
|
|
133301
133384
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
133302
133385
|
const bridgeLogPath = import_node_path157.default.join(
|
|
133303
|
-
|
|
133386
|
+
import_node_os28.default.tmpdir(),
|
|
133304
133387
|
`peach-bridge-${Date.now()}-${process.pid}.log`
|
|
133305
133388
|
);
|
|
133306
133389
|
const bridgeLogFd = import_node_fs156.default.openSync(bridgeLogPath, "a");
|
|
133307
133390
|
let child;
|
|
133308
133391
|
try {
|
|
133309
|
-
child = (0,
|
|
133392
|
+
child = (0, import_node_child_process66.spawn)(
|
|
133310
133393
|
executable,
|
|
133311
133394
|
[...prefixArgs, "serve", "--quiet", "--port", String(preferredPort)],
|
|
133312
133395
|
{
|
|
@@ -133485,8 +133568,8 @@ function unreachableBridgeMessage(port, handshake, timeoutMs) {
|
|
|
133485
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>.`;
|
|
133486
133569
|
}
|
|
133487
133570
|
if (handshake === "timeout") {
|
|
133488
|
-
const cores = Math.max(1,
|
|
133489
|
-
const load2 =
|
|
133571
|
+
const cores = Math.max(1, import_node_os28.default.cpus().length);
|
|
133572
|
+
const load2 = import_node_os28.default.loadavg()[0];
|
|
133490
133573
|
if (load2 >= cores) {
|
|
133491
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.`;
|
|
133492
133575
|
}
|
|
@@ -133553,7 +133636,7 @@ async function stagePrebuiltBundle(file, bridgePort, prepareSource) {
|
|
|
133553
133636
|
}
|
|
133554
133637
|
function normalizeReplacementPath(filePath) {
|
|
133555
133638
|
if (filePath.startsWith("~/")) {
|
|
133556
|
-
return import_node_path157.default.join(
|
|
133639
|
+
return import_node_path157.default.join(import_node_os28.default.homedir(), filePath.slice(2));
|
|
133557
133640
|
}
|
|
133558
133641
|
if (import_node_path157.default.isAbsolute(filePath)) return filePath;
|
|
133559
133642
|
return import_node_path157.default.resolve(process.cwd(), filePath);
|
|
@@ -133803,11 +133886,11 @@ function isPlaywrightHostProcess(pid) {
|
|
|
133803
133886
|
return false;
|
|
133804
133887
|
}
|
|
133805
133888
|
}
|
|
133806
|
-
const plain = (0,
|
|
133889
|
+
const plain = (0, import_node_child_process66.spawnSync)("ps", ["-o", "command=", "-p", String(pid)], {
|
|
133807
133890
|
encoding: "utf8",
|
|
133808
133891
|
stdio: ["ignore", "pipe", "pipe"]
|
|
133809
133892
|
});
|
|
133810
|
-
const withEnv = (0,
|
|
133893
|
+
const withEnv = (0, import_node_child_process66.spawnSync)("ps", ["eww", "-o", "command=", "-p", String(pid)], {
|
|
133811
133894
|
encoding: "utf8",
|
|
133812
133895
|
stdio: ["ignore", "pipe", "pipe"]
|
|
133813
133896
|
});
|
|
@@ -134784,7 +134867,7 @@ async function openSim(args, opts) {
|
|
|
134784
134867
|
});
|
|
134785
134868
|
const attached = await bridge.listSims().then((sims) => sims.find((sim) => sim.id === match.id)?.readyState ?? "gone").catch(() => "unknown");
|
|
134786
134869
|
console.error(
|
|
134787
|
-
` 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)`
|
|
134788
134871
|
);
|
|
134789
134872
|
await printBridgeFailureDiagnostics(bridge, {
|
|
134790
134873
|
errorsCommand: `peach get errors 5${hint}`,
|
|
@@ -135131,16 +135214,16 @@ async function runCloseCommand(args, opts = {}) {
|
|
|
135131
135214
|
bridge.close();
|
|
135132
135215
|
}
|
|
135133
135216
|
}
|
|
135134
|
-
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;
|
|
135135
135218
|
var init_control = __esm({
|
|
135136
135219
|
"cli/commands/control.ts"() {
|
|
135137
135220
|
"use strict";
|
|
135138
|
-
|
|
135221
|
+
import_node_child_process66 = require("node:child_process");
|
|
135139
135222
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
135140
135223
|
import_node_http5 = __toESM(require("node:http"), 1);
|
|
135141
135224
|
import_node_https2 = __toESM(require("node:https"), 1);
|
|
135142
135225
|
import_node_net = __toESM(require("node:net"), 1);
|
|
135143
|
-
|
|
135226
|
+
import_node_os28 = __toESM(require("node:os"), 1);
|
|
135144
135227
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
135145
135228
|
init_src();
|
|
135146
135229
|
init_src2();
|