@swmansion/argent 0.35.1-next.65 → 0.35.1-next.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +1 -1
- package/dist/tool-server.cjs +818 -638
- package/package.json +2 -2
package/dist/tool-server.cjs
CHANGED
|
@@ -43269,7 +43269,7 @@ var require_view = __commonJS({
|
|
|
43269
43269
|
var dirname29 = path77.dirname;
|
|
43270
43270
|
var basename25 = path77.basename;
|
|
43271
43271
|
var extname7 = path77.extname;
|
|
43272
|
-
var
|
|
43272
|
+
var join82 = path77.join;
|
|
43273
43273
|
var resolve24 = path77.resolve;
|
|
43274
43274
|
module2.exports = View;
|
|
43275
43275
|
function View(name, options) {
|
|
@@ -43331,12 +43331,12 @@ var require_view = __commonJS({
|
|
|
43331
43331
|
};
|
|
43332
43332
|
View.prototype.resolve = function resolve25(dir, file2) {
|
|
43333
43333
|
var ext = this.ext;
|
|
43334
|
-
var path78 =
|
|
43334
|
+
var path78 = join82(dir, file2);
|
|
43335
43335
|
var stat11 = tryStat(path78);
|
|
43336
43336
|
if (stat11 && stat11.isFile()) {
|
|
43337
43337
|
return path78;
|
|
43338
43338
|
}
|
|
43339
|
-
path78 =
|
|
43339
|
+
path78 = join82(dir, basename25(file2, ext), "index" + ext);
|
|
43340
43340
|
stat11 = tryStat(path78);
|
|
43341
43341
|
if (stat11 && stat11.isFile()) {
|
|
43342
43342
|
return path78;
|
|
@@ -47276,7 +47276,7 @@ var require_send = __commonJS({
|
|
|
47276
47276
|
var Stream2 = require("stream");
|
|
47277
47277
|
var util = require("util");
|
|
47278
47278
|
var extname7 = path77.extname;
|
|
47279
|
-
var
|
|
47279
|
+
var join82 = path77.join;
|
|
47280
47280
|
var normalize = path77.normalize;
|
|
47281
47281
|
var resolve24 = path77.resolve;
|
|
47282
47282
|
var sep12 = path77.sep;
|
|
@@ -47448,7 +47448,7 @@ var require_send = __commonJS({
|
|
|
47448
47448
|
return res;
|
|
47449
47449
|
}
|
|
47450
47450
|
parts2 = path78.split(sep12);
|
|
47451
|
-
path78 = normalize(
|
|
47451
|
+
path78 = normalize(join82(root, path78));
|
|
47452
47452
|
} else {
|
|
47453
47453
|
if (UP_PATH_REGEXP.test(path78)) {
|
|
47454
47454
|
debug('malicious path "%s"', path78);
|
|
@@ -47581,7 +47581,7 @@ var require_send = __commonJS({
|
|
|
47581
47581
|
if (err) return self2.onStatError(err);
|
|
47582
47582
|
return self2.error(404);
|
|
47583
47583
|
}
|
|
47584
|
-
var p =
|
|
47584
|
+
var p = join82(path78, self2._index[i]);
|
|
47585
47585
|
debug('stat "%s"', p);
|
|
47586
47586
|
fs93.stat(p, function(err2, stat11) {
|
|
47587
47587
|
if (err2) return next(err2);
|
|
@@ -63065,7 +63065,7 @@ async function emulatorSupportsFlag(flag, options = {}) {
|
|
|
63065
63065
|
let output2;
|
|
63066
63066
|
let failure3 = null;
|
|
63067
63067
|
try {
|
|
63068
|
-
const { stdout, stderr } = await
|
|
63068
|
+
const { stdout, stderr } = await execFileAsync14(emulatorPath, ["-help"], {
|
|
63069
63069
|
timeout: options.timeoutMs ?? 1e4,
|
|
63070
63070
|
// Same hazard runAdb guards against: a SIGTERM-immune child (emulator
|
|
63071
63071
|
// wedged in Qt/graphics init) leaves execFile unsettled forever, and
|
|
@@ -63116,7 +63116,7 @@ async function runAdb(args, options = {}) {
|
|
|
63116
63116
|
const adbPath = await resolveAdbOrThrow();
|
|
63117
63117
|
const argv = adbArgv(args);
|
|
63118
63118
|
try {
|
|
63119
|
-
const { stdout, stderr } = await
|
|
63119
|
+
const { stdout, stderr } = await execFileAsync14(adbPath, argv, {
|
|
63120
63120
|
timeout: options.timeoutMs ?? 3e4,
|
|
63121
63121
|
killSignal: ADB_KILL_SIGNAL,
|
|
63122
63122
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -63132,7 +63132,7 @@ async function runAdbBinary(args, options = {}) {
|
|
|
63132
63132
|
const adbPath = await resolveAdbOrThrow();
|
|
63133
63133
|
const argv = adbArgv(args);
|
|
63134
63134
|
try {
|
|
63135
|
-
const { stdout } = await
|
|
63135
|
+
const { stdout } = await execFileAsync14(adbPath, argv, {
|
|
63136
63136
|
timeout: options.timeoutMs ?? 3e4,
|
|
63137
63137
|
killSignal: ADB_KILL_SIGNAL,
|
|
63138
63138
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -63154,7 +63154,7 @@ async function adbShellInput(serial, shellCommand, input2, options = {}) {
|
|
|
63154
63154
|
const adbPath = await resolveAdbOrThrow();
|
|
63155
63155
|
const argv = adbArgv(["-s", serial, "shell", shellCommand]);
|
|
63156
63156
|
return new Promise((resolve24, reject) => {
|
|
63157
|
-
const child = (0,
|
|
63157
|
+
const child = (0, import_node_child_process19.execFile)(
|
|
63158
63158
|
adbPath,
|
|
63159
63159
|
argv,
|
|
63160
63160
|
{
|
|
@@ -63387,7 +63387,7 @@ async function listAvds() {
|
|
|
63387
63387
|
const emulatorPath = await resolveAndroidBinary("emulator");
|
|
63388
63388
|
if (!emulatorPath) return [];
|
|
63389
63389
|
try {
|
|
63390
|
-
const { stdout } = await
|
|
63390
|
+
const { stdout } = await execFileAsync14(emulatorPath, ["-list-avds"], {
|
|
63391
63391
|
timeout: 5e3,
|
|
63392
63392
|
killSignal: "SIGKILL"
|
|
63393
63393
|
});
|
|
@@ -63406,7 +63406,7 @@ async function checkSnapshotLoadable(avdName, snapshotName = "default_boot", opt
|
|
|
63406
63406
|
"-check-snapshot-loadable",
|
|
63407
63407
|
snapshotName
|
|
63408
63408
|
];
|
|
63409
|
-
const { stdout } = await
|
|
63409
|
+
const { stdout } = await execFileAsync14(emulatorPath, args, {
|
|
63410
63410
|
timeout: options.timeoutMs ?? 1e4,
|
|
63411
63411
|
killSignal: "SIGKILL",
|
|
63412
63412
|
maxBuffer: 4 * 1024 * 1024
|
|
@@ -63423,7 +63423,7 @@ async function checkSnapshotLoadable(avdName, snapshotName = "default_boot", opt
|
|
|
63423
63423
|
}
|
|
63424
63424
|
}
|
|
63425
63425
|
function avdRootCandidates() {
|
|
63426
|
-
const home = (0,
|
|
63426
|
+
const home = (0, import_node_os4.homedir)();
|
|
63427
63427
|
const candidates = [
|
|
63428
63428
|
process.env.ANDROID_USER_HOME ? `${process.env.ANDROID_USER_HOME}/avd` : null,
|
|
63429
63429
|
process.env.ANDROID_AVD_HOME,
|
|
@@ -63431,7 +63431,7 @@ function avdRootCandidates() {
|
|
|
63431
63431
|
process.env.ANDROID_SDK_HOME ? `${process.env.ANDROID_SDK_HOME}/.android/avd` : null,
|
|
63432
63432
|
home ? `${home}/.android/avd` : null
|
|
63433
63433
|
];
|
|
63434
|
-
return candidates.filter((p) => Boolean(p && (0,
|
|
63434
|
+
return candidates.filter((p) => Boolean(p && (0, import_node_path11.isAbsolute)(p)));
|
|
63435
63435
|
}
|
|
63436
63436
|
async function resolveAvdPath(avdName) {
|
|
63437
63437
|
const { readFile: readFile26 } = await import("node:fs/promises");
|
|
@@ -63441,7 +63441,7 @@ async function resolveAvdPath(avdName) {
|
|
|
63441
63441
|
const raw = (0, import_ini.parse)(content).path;
|
|
63442
63442
|
if (typeof raw !== "string") continue;
|
|
63443
63443
|
const trimmed = raw.trim();
|
|
63444
|
-
if (!(0,
|
|
63444
|
+
if (!(0, import_node_path11.isAbsolute)(trimmed)) continue;
|
|
63445
63445
|
return trimmed;
|
|
63446
63446
|
} catch {
|
|
63447
63447
|
}
|
|
@@ -63476,20 +63476,20 @@ async function hasDefaultBootSnapshot(avdName) {
|
|
|
63476
63476
|
return false;
|
|
63477
63477
|
}
|
|
63478
63478
|
}
|
|
63479
|
-
var
|
|
63479
|
+
var import_node_child_process19, import_node_util15, import_node_os4, import_node_path11, import_ini, execFileAsync14, emulatorFlagSupportCache, ADB_KILL_SIGNAL, ADB_DEVICE_STATES, ADB_DEVICES_TIMEOUT_MS, ENRICH_TIMEOUT_MS, androidRuntimeKindCache, TERMINAL_ADB_ERROR_PATTERNS, AVD_NAME_PATTERN;
|
|
63480
63480
|
var init_adb = __esm({
|
|
63481
63481
|
"../tool-server/src/utils/adb.ts"() {
|
|
63482
63482
|
"use strict";
|
|
63483
|
-
|
|
63484
|
-
|
|
63485
|
-
|
|
63486
|
-
|
|
63483
|
+
import_node_child_process19 = require("node:child_process");
|
|
63484
|
+
import_node_util15 = require("node:util");
|
|
63485
|
+
import_node_os4 = require("node:os");
|
|
63486
|
+
import_node_path11 = require("node:path");
|
|
63487
63487
|
import_ini = __toESM(require_ini());
|
|
63488
63488
|
init_src2();
|
|
63489
63489
|
init_android_binary();
|
|
63490
63490
|
init_subprocess_error();
|
|
63491
63491
|
init_external_devices();
|
|
63492
|
-
|
|
63492
|
+
execFileAsync14 = (0, import_node_util15.promisify)(import_node_child_process19.execFile);
|
|
63493
63493
|
emulatorFlagSupportCache = /* @__PURE__ */ new Map();
|
|
63494
63494
|
ADB_KILL_SIGNAL = "SIGKILL";
|
|
63495
63495
|
ADB_DEVICE_STATES = /* @__PURE__ */ new Set([
|
|
@@ -73041,7 +73041,7 @@ function isCi(env = process.env) {
|
|
|
73041
73041
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
73042
73042
|
function readCliVersion() {
|
|
73043
73043
|
if (true) {
|
|
73044
|
-
return "0.35.1-next.
|
|
73044
|
+
return "0.35.1-next.67";
|
|
73045
73045
|
}
|
|
73046
73046
|
return "0.0.0";
|
|
73047
73047
|
}
|
|
@@ -73902,10 +73902,10 @@ async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
|
|
|
73902
73902
|
// ../tool-server/src/http.ts
|
|
73903
73903
|
var import_express3 = __toESM(require_express2());
|
|
73904
73904
|
var import_bytes2 = __toESM(require_bytes());
|
|
73905
|
-
var
|
|
73906
|
-
var
|
|
73907
|
-
var
|
|
73908
|
-
var
|
|
73905
|
+
var import_node_fs14 = require("node:fs");
|
|
73906
|
+
var import_promises14 = require("node:fs/promises");
|
|
73907
|
+
var import_node_os11 = require("node:os");
|
|
73908
|
+
var import_node_path16 = require("node:path");
|
|
73909
73909
|
init_src();
|
|
73910
73910
|
var import_node_crypto14 = require("node:crypto");
|
|
73911
73911
|
|
|
@@ -74843,13 +74843,95 @@ async function hdcFileRecv(connectKey, remotePath, localPath, timeoutMs = DEFAUL
|
|
|
74843
74843
|
// ../tool-server/src/utils/check-deps.ts
|
|
74844
74844
|
init_command_on_path();
|
|
74845
74845
|
|
|
74846
|
+
// ../tool-server/src/utils/argent-cloud-bin.ts
|
|
74847
|
+
var import_node_child_process8 = require("node:child_process");
|
|
74848
|
+
var import_node_util6 = require("node:util");
|
|
74849
|
+
var import_node_fs6 = require("node:fs");
|
|
74850
|
+
var import_promises7 = require("node:fs/promises");
|
|
74851
|
+
var import_node_os3 = require("node:os");
|
|
74852
|
+
var import_node_path9 = require("node:path");
|
|
74853
|
+
var import_semver2 = __toESM(require_semver2());
|
|
74854
|
+
init_command_on_path();
|
|
74855
|
+
var execFileAsync6 = (0, import_node_util6.promisify)(import_node_child_process8.execFile);
|
|
74856
|
+
var MIN_ARGENT_CLOUD_VERSION = "1.1.0";
|
|
74857
|
+
var LEGACY_NAME = "sim-remote";
|
|
74858
|
+
var VERSION_TIMEOUT_MS = 5e3;
|
|
74859
|
+
var VERSION_TTL_MS = 6e4;
|
|
74860
|
+
var cachedBin;
|
|
74861
|
+
var versionCache = /* @__PURE__ */ new Map();
|
|
74862
|
+
async function isExecutable3(path77) {
|
|
74863
|
+
try {
|
|
74864
|
+
await (0, import_promises7.access)(path77, import_node_fs6.constants.X_OK);
|
|
74865
|
+
return true;
|
|
74866
|
+
} catch {
|
|
74867
|
+
return false;
|
|
74868
|
+
}
|
|
74869
|
+
}
|
|
74870
|
+
async function onPathOrLocalBin(name) {
|
|
74871
|
+
if (await commandOnPath(name)) return name;
|
|
74872
|
+
const local = (0, import_node_path9.join)((0, import_node_os3.homedir)(), ".local", "bin", name);
|
|
74873
|
+
return await isExecutable3(local) ? local : null;
|
|
74874
|
+
}
|
|
74875
|
+
async function findArgentCloudBin() {
|
|
74876
|
+
if (cachedBin) return cachedBin;
|
|
74877
|
+
const found = await locateArgentCloudBin();
|
|
74878
|
+
if (found) cachedBin = found;
|
|
74879
|
+
return found;
|
|
74880
|
+
}
|
|
74881
|
+
async function locateArgentCloudBin() {
|
|
74882
|
+
const fromEnv = envArgentCloudBin();
|
|
74883
|
+
if (fromEnv) return await isExecutable3(fromEnv) ? fromEnv : null;
|
|
74884
|
+
return await onPathOrLocalBin("argent-cloud") || await onPathOrLocalBin(LEGACY_NAME);
|
|
74885
|
+
}
|
|
74886
|
+
function envArgentCloudBin() {
|
|
74887
|
+
return process.env.ARGENT_CLOUD_BIN?.trim() || void 0;
|
|
74888
|
+
}
|
|
74889
|
+
async function argentCloudBin() {
|
|
74890
|
+
return await findArgentCloudBin() ?? envArgentCloudBin() ?? LEGACY_NAME;
|
|
74891
|
+
}
|
|
74892
|
+
function argentCloudCommand() {
|
|
74893
|
+
return cachedBin ?? LEGACY_NAME;
|
|
74894
|
+
}
|
|
74895
|
+
function forgetArgentCloudBin() {
|
|
74896
|
+
cachedBin = void 0;
|
|
74897
|
+
versionCache.clear();
|
|
74898
|
+
}
|
|
74899
|
+
function parseArgentCloudVersion(output2) {
|
|
74900
|
+
const match = /^\S+ v?(\d+\.\d+\.\d+\S*)$/.exec(output2.trim().split("\n")[0]?.trim() ?? "");
|
|
74901
|
+
return match && import_semver2.default.valid(match[1]) ? match[1] : null;
|
|
74902
|
+
}
|
|
74903
|
+
function isArgentCloudOutdated(version3) {
|
|
74904
|
+
const coerced = import_semver2.default.coerce(version3);
|
|
74905
|
+
return coerced !== null && import_semver2.default.lt(coerced, MIN_ARGENT_CLOUD_VERSION);
|
|
74906
|
+
}
|
|
74907
|
+
async function readVersion(bin) {
|
|
74908
|
+
try {
|
|
74909
|
+
const { stdout } = await execFileAsync6(bin, ["--version"], {
|
|
74910
|
+
timeout: VERSION_TIMEOUT_MS,
|
|
74911
|
+
encoding: "utf8"
|
|
74912
|
+
});
|
|
74913
|
+
return parseArgentCloudVersion(stdout);
|
|
74914
|
+
} catch {
|
|
74915
|
+
return null;
|
|
74916
|
+
}
|
|
74917
|
+
}
|
|
74918
|
+
async function argentCloudVersion() {
|
|
74919
|
+
const bin = await findArgentCloudBin();
|
|
74920
|
+
if (!bin) return null;
|
|
74921
|
+
const cached3 = versionCache.get(bin);
|
|
74922
|
+
if (cached3 && Date.now() - cached3.readAt < VERSION_TTL_MS) return cached3.version;
|
|
74923
|
+
const version3 = await readVersion(bin);
|
|
74924
|
+
versionCache.set(bin, { version: version3, readAt: Date.now() });
|
|
74925
|
+
return version3;
|
|
74926
|
+
}
|
|
74927
|
+
|
|
74846
74928
|
// ../tool-server/src/utils/dependency-errors.ts
|
|
74847
74929
|
init_src2();
|
|
74848
74930
|
|
|
74849
74931
|
// ../tool-server/src/utils/xcode-first-launch.ts
|
|
74850
74932
|
var fs13 = __toESM(require("node:fs"));
|
|
74851
74933
|
var path13 = __toESM(require("node:path"));
|
|
74852
|
-
var
|
|
74934
|
+
var import_node_child_process9 = require("node:child_process");
|
|
74853
74935
|
var WRAPPER_DEVICES = {
|
|
74854
74936
|
simctl: "local iOS simulators",
|
|
74855
74937
|
devicectl: "physical iPhones"
|
|
@@ -74934,7 +75016,7 @@ function readBundleVersion(plistPath) {
|
|
|
74934
75016
|
var PLUTIL_TIMEOUT_MS = 1e3;
|
|
74935
75017
|
function readBinaryPlistVersion(plistPath) {
|
|
74936
75018
|
try {
|
|
74937
|
-
const version3 = (0,
|
|
75019
|
+
const version3 = (0, import_node_child_process9.execFileSync)(
|
|
74938
75020
|
"/usr/bin/plutil",
|
|
74939
75021
|
["-extract", "CFBundleVersion", "raw", "-o", "-", plistPath],
|
|
74940
75022
|
{
|
|
@@ -75008,7 +75090,7 @@ var INSTALL_HINTS = {
|
|
|
75008
75090
|
"xcrun": "Xcode command-line tools not found \u2014 iOS/tvOS simulators need a macOS host with them installed. On macOS, run `xcode-select --install` (or install Xcode from the App Store) and retry.",
|
|
75009
75091
|
"adb": "Android SDK Platform Tools not found. Install `platform-tools` via Android Studio \u2192 SDK Manager or `sdkmanager 'platform-tools'` (`brew install --cask android-platform-tools` on macOS). If installed, ensure `adb` is on PATH or point `$ANDROID_HOME` (or the `android.sdkRoot` config key) at the SDK root (the resolver checks `<root>/platform-tools/adb`). Only required for Android devices and emulators.",
|
|
75010
75092
|
"emulator": "Android Emulator not found. Install via Android Studio \u2192 SDK Manager \u2192 Emulator, or `sdkmanager 'emulator'`. If installed, ensure `emulator` is on PATH or point `$ANDROID_HOME` (or the `android.sdkRoot` config key) at the SDK root (the resolver checks `<root>/emulator/emulator`). Only required to launch new Android emulators via `boot-device`.",
|
|
75011
|
-
"sim-remote": "`sim-remote`
|
|
75093
|
+
"sim-remote": "Argent Cloud CLI not found: `ARGENT_CLOUD_BIN` is unset or not executable, and no `argent-cloud` or `sim-remote` is on PATH or in `~/.local/bin`. Install it as described at https://docs.swmansion.com/argent/docs/cloud/fundamentals/installation, then run its `login` command (`sim-remote login`) before invoking any ios-remote tool. Only required for remote iOS simulators.",
|
|
75012
75094
|
"vega": "Vega SDK CLI not found. Install the Amazon Vega SDK and run `source ~/vega/env` so `vega` (or its `kepler` alias) is on PATH; the resolver also checks `~/vega/bin/vega`. Only required for Vega (Fire TV) devices.",
|
|
75013
75095
|
"harmony-emulator": "HarmonyOS emulator manager not found. Install DevEco Studio; a macOS install at `/Applications/DevEco-Studio.app` is found automatically, and anywhere else set `$DEVECO_STUDIO_HOME` to the directory holding `tools/emulator/Emulator` (the resolver also checks that path under `Contents/`, so a macOS app bundle works too). Only required to list or launch HarmonyOS emulators.",
|
|
75014
75096
|
"hdc": "`hdc`, the HarmonyOS device connector, was not found. Install DevEco Studio (it ships `hdc` under `sdk/default/openharmony/toolchains`, and a macOS install at `/Applications/DevEco-Studio.app` is found automatically), or put `hdc` from the OpenHarmony command-line tools on PATH, or set `$DEVECO_STUDIO_HOME` to the directory holding `sdk/default/openharmony/toolchains/hdc` (the resolver also checks that path under `Contents/`, so a macOS app bundle works too). Only required to drive HarmonyOS devices."
|
|
@@ -75026,6 +75108,9 @@ async function probe2(dep) {
|
|
|
75026
75108
|
if (dep === "hdc") {
|
|
75027
75109
|
return await resolveHdc() !== null;
|
|
75028
75110
|
}
|
|
75111
|
+
if (dep === "sim-remote") {
|
|
75112
|
+
return await findArgentCloudBin() !== null;
|
|
75113
|
+
}
|
|
75029
75114
|
return await commandOnPath(dep) !== null;
|
|
75030
75115
|
}
|
|
75031
75116
|
async function isAvailable(dep) {
|
|
@@ -75108,9 +75193,9 @@ function toSimulatorNetworkError(toolLabel, err, apiUrl, fallbackHint) {
|
|
|
75108
75193
|
}
|
|
75109
75194
|
|
|
75110
75195
|
// ../tool-server/src/utils/update-checker.ts
|
|
75111
|
-
var
|
|
75112
|
-
var
|
|
75113
|
-
var
|
|
75196
|
+
var import_node_fs7 = __toESM(require("node:fs"));
|
|
75197
|
+
var import_node_path10 = __toESM(require("node:path"));
|
|
75198
|
+
var import_semver3 = __toESM(require_semver2());
|
|
75114
75199
|
|
|
75115
75200
|
// ../tool-server/package.json
|
|
75116
75201
|
var version2 = "0.35.0";
|
|
@@ -75128,11 +75213,11 @@ var PACKAGE_NAME = "@swmansion/argent";
|
|
|
75128
75213
|
var REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}`;
|
|
75129
75214
|
var CHECK_INTERVAL_MS = 60 * 60 * 1e3 * 24;
|
|
75130
75215
|
function getSuppressionFilePath() {
|
|
75131
|
-
return
|
|
75216
|
+
return import_node_path10.default.join(argentHomeDir(), "update-suppression.json");
|
|
75132
75217
|
}
|
|
75133
75218
|
function loadSuppressUntil() {
|
|
75134
75219
|
try {
|
|
75135
|
-
const raw =
|
|
75220
|
+
const raw = import_node_fs7.default.readFileSync(getSuppressionFilePath(), "utf8");
|
|
75136
75221
|
const parsed2 = JSON.parse(raw);
|
|
75137
75222
|
const value = parsed2.suppressUntil;
|
|
75138
75223
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
@@ -75142,13 +75227,13 @@ function loadSuppressUntil() {
|
|
|
75142
75227
|
}
|
|
75143
75228
|
function persistSuppressUntil(value) {
|
|
75144
75229
|
const filePath = getSuppressionFilePath();
|
|
75145
|
-
|
|
75230
|
+
import_node_fs7.default.mkdirSync(import_node_path10.default.dirname(filePath), { recursive: true });
|
|
75146
75231
|
const tempPath = `${filePath}.${process.pid}.tmp`;
|
|
75147
75232
|
try {
|
|
75148
|
-
|
|
75149
|
-
|
|
75233
|
+
import_node_fs7.default.writeFileSync(tempPath, JSON.stringify({ suppressUntil: value }));
|
|
75234
|
+
import_node_fs7.default.renameSync(tempPath, filePath);
|
|
75150
75235
|
} catch (error63) {
|
|
75151
|
-
|
|
75236
|
+
import_node_fs7.default.rmSync(tempPath, { force: true });
|
|
75152
75237
|
throw error63;
|
|
75153
75238
|
}
|
|
75154
75239
|
}
|
|
@@ -75182,9 +75267,9 @@ function suppressUpdateNote(durationMs) {
|
|
|
75182
75267
|
}
|
|
75183
75268
|
}
|
|
75184
75269
|
function isNewerVersion(latest, current) {
|
|
75185
|
-
if (!
|
|
75186
|
-
if (
|
|
75187
|
-
return
|
|
75270
|
+
if (!import_semver3.default.valid(latest) || !import_semver3.default.valid(current)) return false;
|
|
75271
|
+
if (import_semver3.default.prerelease(latest)) return false;
|
|
75272
|
+
return import_semver3.default.gt(latest, current);
|
|
75188
75273
|
}
|
|
75189
75274
|
async function check2(options, generation) {
|
|
75190
75275
|
const info = await (0, import_update_core.fetchRegistryInfo)(REGISTRY_URL);
|
|
@@ -75244,7 +75329,7 @@ function startUpdateChecker(options = {}) {
|
|
|
75244
75329
|
}
|
|
75245
75330
|
|
|
75246
75331
|
// ../tool-server/src/tools/system/update-argent.ts
|
|
75247
|
-
var
|
|
75332
|
+
var import_node_child_process10 = require("node:child_process");
|
|
75248
75333
|
var fs16 = __toESM(require("node:fs"));
|
|
75249
75334
|
var path16 = __toESM(require("node:path"));
|
|
75250
75335
|
init_zod();
|
|
@@ -75299,8 +75384,8 @@ function buildScreenRecordingNote(recordings2, nowMs) {
|
|
|
75299
75384
|
// ../tool-server/src/tools/flows/flow-utils.ts
|
|
75300
75385
|
var path15 = __toESM(require("node:path"));
|
|
75301
75386
|
var fs15 = __toESM(require("node:fs/promises"));
|
|
75302
|
-
var
|
|
75303
|
-
var
|
|
75387
|
+
var import_node_fs8 = require("node:fs");
|
|
75388
|
+
var import_node_util7 = require("node:util");
|
|
75304
75389
|
init_src();
|
|
75305
75390
|
init_src2();
|
|
75306
75391
|
var import_yaml = __toESM(require_dist8());
|
|
@@ -78872,7 +78957,7 @@ async function followDanglingLink(linkPath) {
|
|
|
78872
78957
|
return current;
|
|
78873
78958
|
}
|
|
78874
78959
|
async function isWritable(filePath) {
|
|
78875
|
-
return fs15.access(filePath,
|
|
78960
|
+
return fs15.access(filePath, import_node_fs8.constants.W_OK).then(
|
|
78876
78961
|
() => true,
|
|
78877
78962
|
() => false
|
|
78878
78963
|
);
|
|
@@ -79139,7 +79224,7 @@ function keepRecordingOutput(session, block, doc, ranAgainst) {
|
|
|
79139
79224
|
if (!Object.hasOwn(doc, key2)) changes.set(key2, REMOVED_OUTPUT_KEY);
|
|
79140
79225
|
}
|
|
79141
79226
|
for (const [key2, value] of Object.entries(doc)) {
|
|
79142
|
-
if (!Object.hasOwn(ranAgainst, key2) || !(0,
|
|
79227
|
+
if (!Object.hasOwn(ranAgainst, key2) || !(0, import_node_util7.isDeepStrictEqual)(ranAgainst[key2], value)) {
|
|
79143
79228
|
changes.set(key2, value);
|
|
79144
79229
|
}
|
|
79145
79230
|
}
|
|
@@ -79301,7 +79386,7 @@ function scheduleUpdater(updateArgs, cliEntry, automatic = false) {
|
|
|
79301
79386
|
}
|
|
79302
79387
|
updateScheduled = true;
|
|
79303
79388
|
const launch = () => {
|
|
79304
|
-
const child = (0,
|
|
79389
|
+
const child = (0, import_node_child_process10.spawn)(
|
|
79305
79390
|
cliEntry ? process.execPath : "argent",
|
|
79306
79391
|
cliEntry ? [cliEntry, ...updateArgs] : updateArgs,
|
|
79307
79392
|
{
|
|
@@ -79437,15 +79522,15 @@ This reminder comes from Argent itself. It will not repeat for the next 30 minut
|
|
|
79437
79522
|
}
|
|
79438
79523
|
|
|
79439
79524
|
// ../tool-server/src/utils/ios-device/team-detect.ts
|
|
79440
|
-
var
|
|
79441
|
-
var
|
|
79525
|
+
var import_node_child_process11 = require("node:child_process");
|
|
79526
|
+
var import_node_util8 = require("node:util");
|
|
79442
79527
|
var import_node_crypto5 = require("node:crypto");
|
|
79443
|
-
var
|
|
79528
|
+
var execFileAsync7 = (0, import_node_util8.promisify)(import_node_child_process11.execFile);
|
|
79444
79529
|
var SIGNING_CERT_COMMON_NAMES = ["Apple Development", "iPhone Developer"];
|
|
79445
79530
|
var SECURITY_TIMEOUT_MS = 15e3;
|
|
79446
79531
|
async function listCertificatePem(commonName) {
|
|
79447
79532
|
try {
|
|
79448
|
-
const { stdout } = await
|
|
79533
|
+
const { stdout } = await execFileAsync7(
|
|
79449
79534
|
"security",
|
|
79450
79535
|
["find-certificate", "-c", commonName, "-a", "-p"],
|
|
79451
79536
|
{ timeout: SECURITY_TIMEOUT_MS }
|
|
@@ -79578,14 +79663,14 @@ function consumePendingSigningDetectionNote(udid) {
|
|
|
79578
79663
|
}
|
|
79579
79664
|
|
|
79580
79665
|
// ../tool-server/src/preview.ts
|
|
79581
|
-
var
|
|
79582
|
-
var
|
|
79583
|
-
var
|
|
79666
|
+
var import_node_fs11 = __toESM(require("node:fs"));
|
|
79667
|
+
var import_node_os6 = __toESM(require("node:os"));
|
|
79668
|
+
var import_node_path13 = __toESM(require("node:path"));
|
|
79584
79669
|
var import_express = __toESM(require_express2());
|
|
79585
79670
|
init_src();
|
|
79586
79671
|
|
|
79587
79672
|
// ../tool-server/src/blueprints/simulator-server.ts
|
|
79588
|
-
var
|
|
79673
|
+
var import_node_child_process20 = require("node:child_process");
|
|
79589
79674
|
var readline = __toESM(require("node:readline"));
|
|
79590
79675
|
init_src2();
|
|
79591
79676
|
init_src();
|
|
@@ -79594,8 +79679,8 @@ init_src();
|
|
|
79594
79679
|
var fsAsync = __toESM(require("node:fs/promises"));
|
|
79595
79680
|
var os3 = __toESM(require("node:os"));
|
|
79596
79681
|
var path19 = __toESM(require("node:path"));
|
|
79597
|
-
var
|
|
79598
|
-
var
|
|
79682
|
+
var import_node_child_process13 = require("node:child_process");
|
|
79683
|
+
var import_node_util10 = require("node:util");
|
|
79599
79684
|
|
|
79600
79685
|
// ../tool-server/src/utils/simctl-config.ts
|
|
79601
79686
|
var SIMCTL_SPAWN_TIMEOUT_MS = 1e4;
|
|
@@ -79603,12 +79688,12 @@ var SIMCTL_KILL_SIGNAL = "SIGKILL";
|
|
|
79603
79688
|
|
|
79604
79689
|
// ../tool-server/src/utils/ios-device-sets.ts
|
|
79605
79690
|
var fs19 = __toESM(require("node:fs"));
|
|
79606
|
-
var
|
|
79607
|
-
var
|
|
79691
|
+
var import_node_child_process12 = require("node:child_process");
|
|
79692
|
+
var import_node_util9 = require("node:util");
|
|
79608
79693
|
init_src2();
|
|
79609
79694
|
init_src();
|
|
79610
79695
|
init_external_devices();
|
|
79611
|
-
var
|
|
79696
|
+
var execFileAsync8 = (0, import_node_util9.promisify)(import_node_child_process12.execFile);
|
|
79612
79697
|
var deviceSetByUdid = /* @__PURE__ */ new Map();
|
|
79613
79698
|
function configuredAdditionalDeviceSets() {
|
|
79614
79699
|
try {
|
|
@@ -79623,7 +79708,7 @@ function rememberDeviceSet(udid, deviceSet) {
|
|
|
79623
79708
|
async function setContainsUdid(deviceSet, udid) {
|
|
79624
79709
|
if (deviceSet && !fs19.existsSync(deviceSet)) return false;
|
|
79625
79710
|
try {
|
|
79626
|
-
const { stdout } = await
|
|
79711
|
+
const { stdout } = await execFileAsync8(
|
|
79627
79712
|
"xcrun",
|
|
79628
79713
|
[...simctlPrefix(deviceSet), "list", "devices", "--json"],
|
|
79629
79714
|
{ timeout: 1e4, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -79963,9 +80048,9 @@ var PRE_BOOT_ACCESSIBILITY_KEYS = [
|
|
|
79963
80048
|
"AccessibilityEnabled",
|
|
79964
80049
|
"ApplicationAccessibilityEnabled"
|
|
79965
80050
|
];
|
|
79966
|
-
var
|
|
80051
|
+
var execFileAsync9 = (0, import_node_util10.promisify)(import_node_child_process13.execFile);
|
|
79967
80052
|
async function accessibilityDefaults(udid, verb, ...args) {
|
|
79968
|
-
const { stdout } = await
|
|
80053
|
+
const { stdout } = await execFileAsync9(
|
|
79969
80054
|
"xcrun",
|
|
79970
80055
|
/**
|
|
79971
80056
|
* On an external device this is only reached from ax-service contexts,
|
|
@@ -80021,22 +80106,22 @@ async function setAccessibilityPrefsPreBoot(udid, { isTvOs }) {
|
|
|
80021
80106
|
await fsAsync.mkdir(path19.dirname(plistPath), { recursive: true });
|
|
80022
80107
|
const exists3 = await fsAsync.access(plistPath).then(() => true).catch(() => false);
|
|
80023
80108
|
if (!exists3) {
|
|
80024
|
-
await
|
|
80109
|
+
await execFileAsync9("plutil", ["-create", "binary1", plistPath]);
|
|
80025
80110
|
}
|
|
80026
80111
|
const keys = isTvOs ? ["AutomationEnabled", ...PRE_BOOT_ACCESSIBILITY_KEYS] : PRE_BOOT_ACCESSIBILITY_KEYS;
|
|
80027
80112
|
for (const key2 of keys) {
|
|
80028
|
-
await
|
|
80113
|
+
await execFileAsync9("plutil", ["-replace", key2, "-bool", "true", plistPath]);
|
|
80029
80114
|
}
|
|
80030
80115
|
}
|
|
80031
80116
|
|
|
80032
80117
|
// ../tool-server/src/utils/ios-devices.ts
|
|
80033
80118
|
var fs20 = __toESM(require("node:fs"));
|
|
80034
80119
|
var path20 = __toESM(require("node:path"));
|
|
80035
|
-
var
|
|
80036
|
-
var
|
|
80120
|
+
var import_node_child_process14 = require("node:child_process");
|
|
80121
|
+
var import_node_util11 = require("node:util");
|
|
80037
80122
|
init_external_devices();
|
|
80038
80123
|
init_device_info();
|
|
80039
|
-
var
|
|
80124
|
+
var execFileAsync10 = (0, import_node_util11.promisify)(import_node_child_process14.execFile);
|
|
80040
80125
|
var SIMCTL_LIST_TIMEOUT_MS = 1e4;
|
|
80041
80126
|
function simctlListTimeoutAdvice(retry) {
|
|
80042
80127
|
return `\`xcrun simctl list\` did not answer within ${SIMCTL_LIST_TIMEOUT_MS / 1e3}s. CoreSimulatorService is probably still starting, which can take about a minute after a reboot, so call ${retry} again shortly. If it keeps timing out and Xcode was just updated, ask the user to ${xcodeInstallInstruction()}; otherwise restart CoreSimulatorService.`;
|
|
@@ -80048,7 +80133,7 @@ function simulatorRuntimeKind(runtimeId) {
|
|
|
80048
80133
|
async function listDeviceSetSimulators(deviceSet) {
|
|
80049
80134
|
if (deviceSet && !fs20.existsSync(deviceSet)) return { simulators: [], timedOut: false };
|
|
80050
80135
|
try {
|
|
80051
|
-
const { stdout } = await
|
|
80136
|
+
const { stdout } = await execFileAsync10(
|
|
80052
80137
|
"xcrun",
|
|
80053
80138
|
[...simctlPrefix(deviceSet), "list", "devices", "--json"],
|
|
80054
80139
|
{ timeout: SIMCTL_LIST_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -80132,7 +80217,7 @@ var deviceTypeReread = null;
|
|
|
80132
80217
|
var foldableCache = /* @__PURE__ */ new Map();
|
|
80133
80218
|
async function listDeviceTypeBundlePaths() {
|
|
80134
80219
|
try {
|
|
80135
|
-
const { stdout } = await
|
|
80220
|
+
const { stdout } = await execFileAsync10(
|
|
80136
80221
|
"xcrun",
|
|
80137
80222
|
[...simctlPrefix(null), "list", "devicetypes", "--json"],
|
|
80138
80223
|
{ timeout: 1e4, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -80167,7 +80252,7 @@ async function countIntegratedDisplays(bundlePath) {
|
|
|
80167
80252
|
const plist = path20.join(bundlePath, "Contents", "Resources", "capabilities.plist");
|
|
80168
80253
|
if (!fs20.existsSync(plist)) return 0;
|
|
80169
80254
|
try {
|
|
80170
|
-
const { stdout } = await
|
|
80255
|
+
const { stdout } = await execFileAsync10(
|
|
80171
80256
|
"plutil",
|
|
80172
80257
|
["-extract", "capabilities.displays", "json", "-o", "-", plist],
|
|
80173
80258
|
{ timeout: 5e3 }
|
|
@@ -80964,7 +81049,7 @@ __export(path_exports, {
|
|
|
80964
81049
|
encode: () => encode3,
|
|
80965
81050
|
from: () => from,
|
|
80966
81051
|
hasPrefix: () => hasPrefix,
|
|
80967
|
-
join: () =>
|
|
81052
|
+
join: () => join24,
|
|
80968
81053
|
normalizeRelative: () => normalizeRelative,
|
|
80969
81054
|
parts: () => parts,
|
|
80970
81055
|
relative: () => relative2,
|
|
@@ -81014,7 +81099,7 @@ function stripPrefix(prefix, path77) {
|
|
|
81014
81099
|
}
|
|
81015
81100
|
return path77.slice(prefix.length + 1);
|
|
81016
81101
|
}
|
|
81017
|
-
function
|
|
81102
|
+
function join24(path77, other) {
|
|
81018
81103
|
if (path77 === "") {
|
|
81019
81104
|
return other;
|
|
81020
81105
|
} else if (other === "") {
|
|
@@ -89781,7 +89866,7 @@ var Publisher = class {
|
|
|
89781
89866
|
}
|
|
89782
89867
|
const advertise2 = async (suffix) => {
|
|
89783
89868
|
if (legacy) {
|
|
89784
|
-
return await this.#advertise(
|
|
89869
|
+
return await this.#advertise(join24(prefix, suffix), requests, refused);
|
|
89785
89870
|
}
|
|
89786
89871
|
await stream.writer.u53(SubscribeNamespaceEntry.id);
|
|
89787
89872
|
await new SubscribeNamespaceEntry({ suffix, cluster: this.#advert }).encode(stream.writer, version3);
|
|
@@ -89789,7 +89874,7 @@ var Publisher = class {
|
|
|
89789
89874
|
};
|
|
89790
89875
|
const withdraw = async (suffix) => {
|
|
89791
89876
|
if (legacy) {
|
|
89792
|
-
await this.#withdraw(
|
|
89877
|
+
await this.#withdraw(join24(prefix, suffix), requests);
|
|
89793
89878
|
} else {
|
|
89794
89879
|
await stream.writer.u53(SubscribeNamespaceEntryDone.id);
|
|
89795
89880
|
await new SubscribeNamespaceEntryDone({ suffix }).encode(stream.writer, version3);
|
|
@@ -89815,7 +89900,7 @@ var Publisher = class {
|
|
|
89815
89900
|
continue;
|
|
89816
89901
|
updated.set(suffix, producer);
|
|
89817
89902
|
}
|
|
89818
|
-
const live = new Set([...updated.keys()].map((suffix) =>
|
|
89903
|
+
const live = new Set([...updated.keys()].map((suffix) => join24(prefix, suffix)));
|
|
89819
89904
|
for (const path77 of [...refused.keys()]) {
|
|
89820
89905
|
if (!live.has(path77))
|
|
89821
89906
|
refused.delete(path77);
|
|
@@ -89830,13 +89915,13 @@ var Publisher = class {
|
|
|
89830
89915
|
for (const [suffix, producer] of updated) {
|
|
89831
89916
|
if (active.get(suffix) === producer)
|
|
89832
89917
|
continue;
|
|
89833
|
-
if (this.#offerable(
|
|
89918
|
+
if (this.#offerable(join24(prefix, suffix), refused)) {
|
|
89834
89919
|
if (await advertise2(suffix))
|
|
89835
89920
|
held.set(suffix, producer);
|
|
89836
89921
|
}
|
|
89837
89922
|
}
|
|
89838
89923
|
active = held;
|
|
89839
|
-
const outstanding = [...updated].some(([suffix, producer]) => active.get(suffix) !== producer && this.#pending(
|
|
89924
|
+
const outstanding = [...updated].some(([suffix, producer]) => active.get(suffix) !== producer && this.#pending(join24(prefix, suffix), refused));
|
|
89840
89925
|
retry = outstanding ? Math.min(retry ? retry * 2 : RETRY_BASE, RETRY_MAX) : 0;
|
|
89841
89926
|
const next = await (retry ? Promise.race([changed, stream.reader.closed, retryAfter(retry).then(() => broadcasts)]) : Promise.race([changed, stream.reader.closed]));
|
|
89842
89927
|
dispose();
|
|
@@ -90482,7 +90567,7 @@ var Subscriber2 = class {
|
|
|
90482
90567
|
const entry = await SubscribeNamespaceEntry.decode(stream.reader, version3, negotiated(this.#cluster));
|
|
90483
90568
|
if (released)
|
|
90484
90569
|
break;
|
|
90485
|
-
const path77 =
|
|
90570
|
+
const path77 = join24(prefix, entry.suffix);
|
|
90486
90571
|
if (this.#reflected(entry.cluster)) {
|
|
90487
90572
|
console.debug(`dropping reflected namespace: broadcast=${path77}`);
|
|
90488
90573
|
if (live.delete(path77))
|
|
@@ -90497,7 +90582,7 @@ var Subscriber2 = class {
|
|
|
90497
90582
|
const entry = await SubscribeNamespaceEntryDone.decode(stream.reader, version3);
|
|
90498
90583
|
if (released)
|
|
90499
90584
|
break;
|
|
90500
|
-
const path77 =
|
|
90585
|
+
const path77 = join24(prefix, entry.suffix);
|
|
90501
90586
|
if (live.delete(path77)) {
|
|
90502
90587
|
this.#detachAnnounce(path77);
|
|
90503
90588
|
}
|
|
@@ -93292,7 +93377,7 @@ var Subscriber3 = class {
|
|
|
93292
93377
|
case Version2.DRAFT_02: {
|
|
93293
93378
|
const init2 = await AnnounceInit.decode(stream.reader, this.version);
|
|
93294
93379
|
for (const suffix of init2.suffixes) {
|
|
93295
|
-
const path77 =
|
|
93380
|
+
const path77 = join24(prefix, suffix);
|
|
93296
93381
|
if (advertised.has(suffix)) {
|
|
93297
93382
|
throw new ProtocolViolation(`duplicate announce for ${path77}`);
|
|
93298
93383
|
}
|
|
@@ -93351,7 +93436,7 @@ var Subscriber3 = class {
|
|
|
93351
93436
|
break;
|
|
93352
93437
|
}
|
|
93353
93438
|
}
|
|
93354
|
-
const path77 =
|
|
93439
|
+
const path77 = join24(prefix, suffix);
|
|
93355
93440
|
const duplicateIsRestart = restartSupported(this.version) && !hasAnnounceId(this.version);
|
|
93356
93441
|
if (announce.status === "active" && !duplicateIsRestart && advertised.has(suffix)) {
|
|
93357
93442
|
throw new ProtocolViolation(`duplicate announce for ${path77}`);
|
|
@@ -98241,18 +98326,19 @@ function installNodeWebTransport() {
|
|
|
98241
98326
|
}
|
|
98242
98327
|
|
|
98243
98328
|
// ../tool-server/src/utils/sim-remote.ts
|
|
98244
|
-
var
|
|
98245
|
-
var
|
|
98329
|
+
var import_node_child_process15 = require("node:child_process");
|
|
98330
|
+
var import_node_util12 = require("node:util");
|
|
98246
98331
|
init_zod();
|
|
98247
98332
|
init_device_info();
|
|
98248
|
-
var
|
|
98333
|
+
var execFileAsync11 = (0, import_node_util12.promisify)(import_node_child_process15.execFile);
|
|
98249
98334
|
var SIM_REMOTE_TIMEOUT_MS = 3e4;
|
|
98250
98335
|
function simRemoteExecError(err) {
|
|
98251
98336
|
return err.cause ?? err;
|
|
98252
98337
|
}
|
|
98253
98338
|
async function run(args, options) {
|
|
98339
|
+
const bin = await argentCloudBin();
|
|
98254
98340
|
try {
|
|
98255
|
-
const { stdout } = await
|
|
98341
|
+
const { stdout } = await execFileAsync11(bin, args, {
|
|
98256
98342
|
timeout: options?.timeoutMs ?? SIM_REMOTE_TIMEOUT_MS,
|
|
98257
98343
|
maxBuffer: 16 * 1024 * 1024,
|
|
98258
98344
|
encoding: "utf8",
|
|
@@ -98262,10 +98348,11 @@ async function run(args, options) {
|
|
|
98262
98348
|
return { stdout: typeof stdout === "string" ? stdout : stdout.toString("utf8") };
|
|
98263
98349
|
} catch (err) {
|
|
98264
98350
|
const e = err;
|
|
98351
|
+
if (e.code === "ENOENT") forgetArgentCloudBin();
|
|
98265
98352
|
const stderr = (e.stderr ?? "").trim();
|
|
98266
98353
|
const stdout = (e.stdout ?? "").trim();
|
|
98267
98354
|
const suffix = stderr || stdout || e.message;
|
|
98268
|
-
throw new Error(
|
|
98355
|
+
throw new Error(`${bin} ${args.join(" ")} failed: ${suffix}`, { cause: err });
|
|
98269
98356
|
}
|
|
98270
98357
|
}
|
|
98271
98358
|
async function simctlListDevices(options) {
|
|
@@ -98368,7 +98455,7 @@ async function setSimulatorEnv(udid, key2, value) {
|
|
|
98368
98455
|
}
|
|
98369
98456
|
async function proxyStart(udid, port) {
|
|
98370
98457
|
try {
|
|
98371
|
-
await run(["
|
|
98458
|
+
await run(["reverse", "start", stripRemotePrefix(udid), String(port)]);
|
|
98372
98459
|
} catch (err) {
|
|
98373
98460
|
const message = err.message ?? "";
|
|
98374
98461
|
if (/already/i.test(message)) return;
|
|
@@ -98377,7 +98464,7 @@ async function proxyStart(udid, port) {
|
|
|
98377
98464
|
}
|
|
98378
98465
|
async function proxyStop(udid, port) {
|
|
98379
98466
|
try {
|
|
98380
|
-
await run(["
|
|
98467
|
+
await run(["reverse", "stop", stripRemotePrefix(udid), String(port)]);
|
|
98381
98468
|
} catch {
|
|
98382
98469
|
}
|
|
98383
98470
|
}
|
|
@@ -98778,11 +98865,11 @@ function captureOnDemandDropped(deviceId, endpoint) {
|
|
|
98778
98865
|
}
|
|
98779
98866
|
|
|
98780
98867
|
// ../tool-server/src/utils/foldable.ts
|
|
98781
|
-
var
|
|
98868
|
+
var import_node_child_process16 = require("node:child_process");
|
|
98782
98869
|
var fs21 = __toESM(require("node:fs"));
|
|
98783
|
-
var
|
|
98870
|
+
var import_node_util13 = require("node:util");
|
|
98784
98871
|
init_external_devices();
|
|
98785
|
-
var
|
|
98872
|
+
var execFileAsync12 = (0, import_node_util13.promisify)(import_node_child_process16.execFile);
|
|
98786
98873
|
var MAIN_SCREEN_ID = 1;
|
|
98787
98874
|
var AX_LIVE_PANEL_TIMEOUT_MS = 2e3;
|
|
98788
98875
|
var DEVICECTL_TIMEOUT_MS = 5e3;
|
|
@@ -98805,7 +98892,7 @@ var developerDirPromise = null;
|
|
|
98805
98892
|
function developerDir() {
|
|
98806
98893
|
if (process.env.DEVELOPER_DIR) return Promise.resolve(process.env.DEVELOPER_DIR);
|
|
98807
98894
|
if (!developerDirPromise) {
|
|
98808
|
-
developerDirPromise =
|
|
98895
|
+
developerDirPromise = execFileAsync12("xcode-select", ["-p"], { timeout: 5e3 }).then(({ stdout }) => stdout.trim() || void 0).catch(() => void 0);
|
|
98809
98896
|
}
|
|
98810
98897
|
return developerDirPromise;
|
|
98811
98898
|
}
|
|
@@ -98867,7 +98954,7 @@ async function readCoreDeviceDisplays(udid) {
|
|
|
98867
98954
|
}
|
|
98868
98955
|
let stdout;
|
|
98869
98956
|
try {
|
|
98870
|
-
({ stdout } = await
|
|
98957
|
+
({ stdout } = await execFileAsync12(bin, argv, {
|
|
98871
98958
|
env,
|
|
98872
98959
|
timeout: DEVICECTL_TIMEOUT_MS,
|
|
98873
98960
|
killSignal: "SIGKILL",
|
|
@@ -100101,11 +100188,11 @@ function asString2(value) {
|
|
|
100101
100188
|
}
|
|
100102
100189
|
|
|
100103
100190
|
// ../tool-server/src/utils/ios-host.ts
|
|
100104
|
-
var
|
|
100191
|
+
var import_node_child_process17 = require("node:child_process");
|
|
100105
100192
|
var import_node_events = require("node:events");
|
|
100106
100193
|
var fs25 = __toESM(require("node:fs"));
|
|
100107
100194
|
var path23 = __toESM(require("node:path"));
|
|
100108
|
-
var
|
|
100195
|
+
var import_node_util14 = require("node:util");
|
|
100109
100196
|
init_src();
|
|
100110
100197
|
|
|
100111
100198
|
// ../tool-server/src/utils/ios-audio-leftovers.ts
|
|
@@ -100392,7 +100479,7 @@ async function clearAudioLeftovers(dir) {
|
|
|
100392
100479
|
}
|
|
100393
100480
|
|
|
100394
100481
|
// ../tool-server/src/utils/ios-host.ts
|
|
100395
|
-
var
|
|
100482
|
+
var execFileAsync13 = (0, import_node_util14.promisify)(import_node_child_process17.execFile);
|
|
100396
100483
|
var ARGENT_BOOTSTRAP_DYLIB_BASENAMES = /* @__PURE__ */ new Set(["libArgentInjectionBootstrap.dylib"]);
|
|
100397
100484
|
var RECOGNISED_BOOTSTRAP_DYLIB_BASENAMES = /* @__PURE__ */ new Set([
|
|
100398
100485
|
...ARGENT_BOOTSTRAP_DYLIB_BASENAMES,
|
|
@@ -100467,7 +100554,7 @@ async function ensureAccessibilityEnabled(udid) {
|
|
|
100467
100554
|
const { nativeId, prefix } = await simctlTargetForUdid(udid, { granted: "native-devtools" });
|
|
100468
100555
|
await Promise.all(
|
|
100469
100556
|
APP_ACCESSIBILITY_FLAGS.map(
|
|
100470
|
-
(flag) =>
|
|
100557
|
+
(flag) => execFileAsync13(
|
|
100471
100558
|
"xcrun",
|
|
100472
100559
|
[
|
|
100473
100560
|
...prefix,
|
|
@@ -100489,7 +100576,7 @@ async function setupNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100489
100576
|
const tvOs = await isTvOsSimulator(udid);
|
|
100490
100577
|
const bootstrapPath = await bootstrapPathFor(udid, endpoint);
|
|
100491
100578
|
const { nativeId, prefix } = await simctlTargetForUdid(udid, { granted: "native-devtools" });
|
|
100492
|
-
const result = await
|
|
100579
|
+
const result = await execFileAsync13(
|
|
100493
100580
|
"xcrun",
|
|
100494
100581
|
[...prefix, "spawn", nativeId, "launchctl", "getenv", "DYLD_INSERT_LIBRARIES"],
|
|
100495
100582
|
{ encoding: "utf8", timeout: SIMCTL_SPAWN_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -100503,7 +100590,7 @@ async function setupNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100503
100590
|
const audioDylib = !tvOs && endpoint.transport === "unix" && audioAlwaysInserted() ? installedAudioDylib() : null;
|
|
100504
100591
|
if (audioDylib) updated = appendDyldInsertLibrary(updated, audioDylib);
|
|
100505
100592
|
if (updated !== existing) {
|
|
100506
|
-
await
|
|
100593
|
+
await execFileAsync13(
|
|
100507
100594
|
"xcrun",
|
|
100508
100595
|
[...prefix, "spawn", nativeId, "launchctl", "setenv", "DYLD_INSERT_LIBRARIES", updated],
|
|
100509
100596
|
{ timeout: SIMCTL_SPAWN_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -100513,7 +100600,7 @@ async function setupNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100513
100600
|
if (endpoint.port === void 0) {
|
|
100514
100601
|
throw new Error("native-devtools TCP endpoint reached host setup before its port was bound");
|
|
100515
100602
|
}
|
|
100516
|
-
await
|
|
100603
|
+
await execFileAsync13(
|
|
100517
100604
|
"xcrun",
|
|
100518
100605
|
[
|
|
100519
100606
|
...prefix,
|
|
@@ -100527,7 +100614,7 @@ async function setupNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100527
100614
|
{ timeout: SIMCTL_SPAWN_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL }
|
|
100528
100615
|
);
|
|
100529
100616
|
} else {
|
|
100530
|
-
await
|
|
100617
|
+
await execFileAsync13(
|
|
100531
100618
|
"xcrun",
|
|
100532
100619
|
[
|
|
100533
100620
|
...prefix,
|
|
@@ -100544,7 +100631,7 @@ async function setupNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100544
100631
|
if (audioDylib) {
|
|
100545
100632
|
try {
|
|
100546
100633
|
fs25.mkdirSync(audioDir(nativeId), { recursive: true, mode: 448 });
|
|
100547
|
-
await
|
|
100634
|
+
await execFileAsync13(
|
|
100548
100635
|
"xcrun",
|
|
100549
100636
|
[
|
|
100550
100637
|
...prefix,
|
|
@@ -100572,14 +100659,14 @@ async function withdrawNativeDevtoolsEnvLocal(udid, endpoint) {
|
|
|
100572
100659
|
const bootstrapPath = await bootstrapPathFor(udid, endpoint);
|
|
100573
100660
|
const { nativeId, prefix } = await simctlTargetForWithdrawal(udid);
|
|
100574
100661
|
const getenv = async (name2) => {
|
|
100575
|
-
const result = await
|
|
100662
|
+
const result = await execFileAsync13(
|
|
100576
100663
|
"xcrun",
|
|
100577
100664
|
[...prefix, "spawn", nativeId, "launchctl", "getenv", name2],
|
|
100578
100665
|
{ encoding: "utf8", timeout: SIMCTL_SPAWN_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL }
|
|
100579
100666
|
).catch((e) => ({ stdout: e.stdout ?? "" }));
|
|
100580
100667
|
return (result.stdout ?? "").trim();
|
|
100581
100668
|
};
|
|
100582
|
-
const setenv = (args) =>
|
|
100669
|
+
const setenv = (args) => execFileAsync13("xcrun", [...prefix, "spawn", nativeId, "launchctl", ...args], {
|
|
100583
100670
|
timeout: SIMCTL_SPAWN_TIMEOUT_MS,
|
|
100584
100671
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
100585
100672
|
});
|
|
@@ -100625,7 +100712,7 @@ function parseUIKitApplicationBundleIds(stdout) {
|
|
|
100625
100712
|
return new Set(parseUIKitApplicationJobs(stdout).keys());
|
|
100626
100713
|
}
|
|
100627
100714
|
async function listRunningApps(udid) {
|
|
100628
|
-
const { stdout } = await
|
|
100715
|
+
const { stdout } = await execFileAsync13(
|
|
100629
100716
|
"xcrun",
|
|
100630
100717
|
await simctlArgsForUdid(udid, ["spawn", udid, "launchctl", "list"]),
|
|
100631
100718
|
{
|
|
@@ -100645,7 +100732,7 @@ async function listRunningUIKitApplicationBundleIds(udid) {
|
|
|
100645
100732
|
async function readProcessLaunchState(pid) {
|
|
100646
100733
|
let stdout;
|
|
100647
100734
|
try {
|
|
100648
|
-
({ stdout } = await
|
|
100735
|
+
({ stdout } = await execFileAsync13(PS_BIN, ["eww", "-p", String(pid), "-o", "etime=,command="], {
|
|
100649
100736
|
encoding: "utf8",
|
|
100650
100737
|
timeout: PS_PROBE_TIMEOUT_MS,
|
|
100651
100738
|
// Matches the other `ps` probes (vega-process.ts): an environment can run
|
|
@@ -100681,7 +100768,7 @@ function spawnAxDaemonLocal(udid, endpoint) {
|
|
|
100681
100768
|
}
|
|
100682
100769
|
const endpointArgs = endpoint.transport === "tcp" ? ["--port", String(endpoint.port)] : ["--socket", endpoint.socketPath];
|
|
100683
100770
|
const axTarget = simctlTargetForUdidSync(udid, { granted: "ax-service" });
|
|
100684
|
-
const proc = (0,
|
|
100771
|
+
const proc = (0, import_node_child_process17.execFile)(
|
|
100685
100772
|
"xcrun",
|
|
100686
100773
|
[
|
|
100687
100774
|
...axTarget.prefix,
|
|
@@ -102315,7 +102402,7 @@ var nativeDevtoolsBlueprint = {
|
|
|
102315
102402
|
init_external_devices();
|
|
102316
102403
|
|
|
102317
102404
|
// ../tool-server/src/utils/simctl-exec.ts
|
|
102318
|
-
var
|
|
102405
|
+
var import_node_child_process18 = require("node:child_process");
|
|
102319
102406
|
|
|
102320
102407
|
// ../tool-server/src/utils/process-kill.ts
|
|
102321
102408
|
function signalGroup(pid, signal) {
|
|
@@ -102379,7 +102466,7 @@ function execSimctl(args, options = {}) {
|
|
|
102379
102466
|
reject(new Error(`xcrun ${args.join(" ")} aborted`));
|
|
102380
102467
|
return;
|
|
102381
102468
|
}
|
|
102382
|
-
const child = (0,
|
|
102469
|
+
const child = (0, import_node_child_process18.spawn)("xcrun", args, { detached: true, stdio: ["ignore", "pipe", "pipe"] });
|
|
102383
102470
|
let stdout = "";
|
|
102384
102471
|
let stderr = "";
|
|
102385
102472
|
let settled = false;
|
|
@@ -102859,7 +102946,7 @@ async function spawnSimulatorServerProcess(udid, subcommand) {
|
|
|
102859
102946
|
if (sdkRoot)
|
|
102860
102947
|
process.stderr.write(`[sim ${udid.slice(0, 8)}] android.sdkRoot \u2192 ANDROID_HOME=${sdkRoot}
|
|
102861
102948
|
`);
|
|
102862
|
-
const proc = (0,
|
|
102949
|
+
const proc = (0, import_node_child_process20.spawn)(BINARY_PATH, args, {
|
|
102863
102950
|
cwd: RUN_DIR,
|
|
102864
102951
|
stdio: ["pipe", "pipe", "pipe"],
|
|
102865
102952
|
...sdkRoot ? { env: { ...process.env, ANDROID_HOME: sdkRoot } } : {}
|
|
@@ -103153,11 +103240,11 @@ function classifyDeviceForTelemetry(deviceId) {
|
|
|
103153
103240
|
}
|
|
103154
103241
|
|
|
103155
103242
|
// ../tool-server/src/utils/device-shutdown.ts
|
|
103156
|
-
var
|
|
103157
|
-
var
|
|
103243
|
+
var import_node_child_process21 = require("node:child_process");
|
|
103244
|
+
var import_node_util16 = require("node:util");
|
|
103158
103245
|
init_device_info();
|
|
103159
103246
|
init_android_binary();
|
|
103160
|
-
var
|
|
103247
|
+
var execFileAsync15 = (0, import_node_util16.promisify)(import_node_child_process21.execFile);
|
|
103161
103248
|
var SHUTDOWN_EXEC_OPTIONS = { timeout: 3e4, killSignal: "SIGKILL" };
|
|
103162
103249
|
async function shutdownOwnedDevice(id) {
|
|
103163
103250
|
let platform;
|
|
@@ -103167,11 +103254,11 @@ async function shutdownOwnedDevice(id) {
|
|
|
103167
103254
|
return;
|
|
103168
103255
|
}
|
|
103169
103256
|
if (platform === "ios") {
|
|
103170
|
-
await simctlArgsForUdid(id, ["shutdown", id]).then((args) =>
|
|
103257
|
+
await simctlArgsForUdid(id, ["shutdown", id]).then((args) => execFileAsync15("xcrun", args, SHUTDOWN_EXEC_OPTIONS)).catch(() => {
|
|
103171
103258
|
});
|
|
103172
103259
|
} else if (platform === "android") {
|
|
103173
103260
|
const adb = await resolveAndroidBinary("adb") ?? "adb";
|
|
103174
|
-
await
|
|
103261
|
+
await execFileAsync15(adb, ["-s", id, "emu", "kill"], SHUTDOWN_EXEC_OPTIONS).catch(() => {
|
|
103175
103262
|
});
|
|
103176
103263
|
}
|
|
103177
103264
|
}
|
|
@@ -103187,7 +103274,7 @@ async function shutdownDevice(id) {
|
|
|
103187
103274
|
}
|
|
103188
103275
|
try {
|
|
103189
103276
|
if (device.platform === "ios") {
|
|
103190
|
-
await
|
|
103277
|
+
await execFileAsync15(
|
|
103191
103278
|
"xcrun",
|
|
103192
103279
|
await simctlArgsForUdid(id, ["shutdown", id]),
|
|
103193
103280
|
SHUTDOWN_EXEC_OPTIONS
|
|
@@ -103196,7 +103283,7 @@ async function shutdownDevice(id) {
|
|
|
103196
103283
|
}
|
|
103197
103284
|
if (device.platform === "android" && device.kind === "emulator") {
|
|
103198
103285
|
const adb = await resolveAndroidBinary("adb") ?? "adb";
|
|
103199
|
-
await
|
|
103286
|
+
await execFileAsync15(adb, ["-s", id, "emu", "kill"], SHUTDOWN_EXEC_OPTIONS);
|
|
103200
103287
|
return { ok: true };
|
|
103201
103288
|
}
|
|
103202
103289
|
return {
|
|
@@ -103307,15 +103394,15 @@ function adbCommandPrefix(env) {
|
|
|
103307
103394
|
}
|
|
103308
103395
|
|
|
103309
103396
|
// ../tool-server/src/utils/ios-device/devicectl.ts
|
|
103310
|
-
var
|
|
103311
|
-
var
|
|
103397
|
+
var import_node_child_process22 = require("node:child_process");
|
|
103398
|
+
var import_node_util17 = require("node:util");
|
|
103312
103399
|
var fs28 = __toESM(require("node:fs/promises"));
|
|
103313
103400
|
var os6 = __toESM(require("node:os"));
|
|
103314
103401
|
var path25 = __toESM(require("node:path"));
|
|
103315
103402
|
var import_node_crypto8 = require("node:crypto");
|
|
103316
103403
|
var import_node_net = require("node:net");
|
|
103317
103404
|
init_src2();
|
|
103318
|
-
var
|
|
103405
|
+
var execFileAsync16 = (0, import_node_util17.promisify)(import_node_child_process22.execFile);
|
|
103319
103406
|
var DEVICECTL_TIMEOUT_MS2 = 2e4;
|
|
103320
103407
|
var DEVICECTL_INSTALL_TIMEOUT_MS = 12e4;
|
|
103321
103408
|
var DEVICECTL_LIST_TIMEOUT_MS = 8e3;
|
|
@@ -103365,7 +103452,7 @@ async function runDevicectl(args, action, opts = {}) {
|
|
|
103365
103452
|
argv.push("--json-output", jsonPath);
|
|
103366
103453
|
}
|
|
103367
103454
|
try {
|
|
103368
|
-
const { stdout, stderr } = await
|
|
103455
|
+
const { stdout, stderr } = await execFileAsync16("xcrun", argv, {
|
|
103369
103456
|
timeout: timeoutMs,
|
|
103370
103457
|
killSignal: "SIGKILL",
|
|
103371
103458
|
maxBuffer: DEVICECTL_MAX_OUTPUT_BYTES
|
|
@@ -103643,19 +103730,19 @@ async function listTargets(strict, timeoutMs) {
|
|
|
103643
103730
|
init_harmony_flag();
|
|
103644
103731
|
|
|
103645
103732
|
// ../tool-server/src/utils/macos-apps.ts
|
|
103646
|
-
var
|
|
103733
|
+
var import_node_child_process23 = require("node:child_process");
|
|
103647
103734
|
var import_node_crypto9 = require("node:crypto");
|
|
103648
103735
|
var fs29 = __toESM(require("node:fs"));
|
|
103649
103736
|
var os7 = __toESM(require("node:os"));
|
|
103650
103737
|
var path26 = __toESM(require("node:path"));
|
|
103651
|
-
var
|
|
103738
|
+
var import_node_util18 = require("node:util");
|
|
103652
103739
|
init_src();
|
|
103653
103740
|
init_src2();
|
|
103654
103741
|
init_capability();
|
|
103655
103742
|
init_device_info();
|
|
103656
103743
|
init_macos_app_kind();
|
|
103657
103744
|
init_src();
|
|
103658
|
-
var
|
|
103745
|
+
var execFileAsync17 = (0, import_node_util18.promisify)(import_node_child_process23.execFile);
|
|
103659
103746
|
function isMacosAppsEnabled() {
|
|
103660
103747
|
return isFeatureEnabled(MACOS_APPS_FLAG);
|
|
103661
103748
|
}
|
|
@@ -103780,7 +103867,7 @@ async function removeUnusedLibraries(libRoot, keep) {
|
|
|
103780
103867
|
const root = fs29.realpathSync(libRoot);
|
|
103781
103868
|
let open5;
|
|
103782
103869
|
try {
|
|
103783
|
-
({ stdout: open5 } = await
|
|
103870
|
+
({ stdout: open5 } = await execFileAsync17("lsof", ["-Fn", "+D", root], {
|
|
103784
103871
|
timeout: 3e4,
|
|
103785
103872
|
maxBuffer: 16 * 1024 * 1024
|
|
103786
103873
|
}));
|
|
@@ -103804,7 +103891,7 @@ async function removeUnusedLibraries(libRoot, keep) {
|
|
|
103804
103891
|
var EXPORTED_RELEASE_NOTE = "An exported or notarized Release build with the hardened runtime cannot be driven without extra entitlements.";
|
|
103805
103892
|
async function signatureTeam(file2) {
|
|
103806
103893
|
try {
|
|
103807
|
-
return parseCodesignDisplay(await
|
|
103894
|
+
return parseCodesignDisplay(await execFileAsync17("codesign", ["-dv", file2], { timeout: 1e4 })).teamId;
|
|
103808
103895
|
} catch {
|
|
103809
103896
|
return void 0;
|
|
103810
103897
|
}
|
|
@@ -103905,7 +103992,7 @@ async function processRunsExecutable(pid, executable) {
|
|
|
103905
103992
|
if (err.code !== "EPERM") return false;
|
|
103906
103993
|
}
|
|
103907
103994
|
try {
|
|
103908
|
-
const { stdout } = await
|
|
103995
|
+
const { stdout } = await execFileAsync17(
|
|
103909
103996
|
PS_BIN,
|
|
103910
103997
|
["-ww", "-o", "comm=", "-p", String(pid)],
|
|
103911
103998
|
psOptions()
|
|
@@ -103917,7 +104004,7 @@ async function processRunsExecutable(pid, executable) {
|
|
|
103917
104004
|
}
|
|
103918
104005
|
async function processStartedWithEnv(pid, assignment) {
|
|
103919
104006
|
try {
|
|
103920
|
-
const { stdout } = await
|
|
104007
|
+
const { stdout } = await execFileAsync17(
|
|
103921
104008
|
PS_BIN,
|
|
103922
104009
|
["eww", "-o", "command=", "-p", String(pid)],
|
|
103923
104010
|
psOptions()
|
|
@@ -103945,7 +104032,7 @@ async function findRunningCopies(bundleId, executable, skipPid) {
|
|
|
103945
104032
|
};
|
|
103946
104033
|
let stdout;
|
|
103947
104034
|
try {
|
|
103948
|
-
({ stdout } = await
|
|
104035
|
+
({ stdout } = await execFileAsync17(PS_BIN, ["-ww", "-axo", "pid=,comm="], psOptions()));
|
|
103949
104036
|
} catch {
|
|
103950
104037
|
return found;
|
|
103951
104038
|
}
|
|
@@ -103980,7 +104067,7 @@ async function findRunningCopies(bundleId, executable, skipPid) {
|
|
|
103980
104067
|
}
|
|
103981
104068
|
async function gitWorktreeOf(dir) {
|
|
103982
104069
|
try {
|
|
103983
|
-
const { stdout } = await
|
|
104070
|
+
const { stdout } = await execFileAsync17(
|
|
103984
104071
|
"git",
|
|
103985
104072
|
["-C", dir, "rev-parse", "--path-format=absolute", "--show-toplevel", "--git-common-dir"],
|
|
103986
104073
|
{ timeout: 5e3 }
|
|
@@ -104063,7 +104150,7 @@ function isCatalystSlice(read, offset) {
|
|
|
104063
104150
|
}
|
|
104064
104151
|
async function plistValue(plist, key2) {
|
|
104065
104152
|
try {
|
|
104066
|
-
const { stdout } = await
|
|
104153
|
+
const { stdout } = await execFileAsync17("plutil", ["-extract", key2, "raw", "-o", "-", plist], {
|
|
104067
104154
|
timeout: 1e4
|
|
104068
104155
|
});
|
|
104069
104156
|
const value = stdout.trim();
|
|
@@ -104106,7 +104193,7 @@ async function readCodeSignature(target) {
|
|
|
104106
104193
|
const operand = typeof target === "number" ? `+${target}` : target;
|
|
104107
104194
|
try {
|
|
104108
104195
|
return parseCodesignDisplay(
|
|
104109
|
-
await
|
|
104196
|
+
await execFileAsync17("codesign", ["-dv", "--entitlements", "-", "--xml", operand], {
|
|
104110
104197
|
timeout: 1e4,
|
|
104111
104198
|
maxBuffer: 4 * 1024 * 1024
|
|
104112
104199
|
})
|
|
@@ -104117,7 +104204,7 @@ async function readCodeSignature(target) {
|
|
|
104117
104204
|
}
|
|
104118
104205
|
async function inBackgroundSession() {
|
|
104119
104206
|
try {
|
|
104120
|
-
const { stdout } = await
|
|
104207
|
+
const { stdout } = await execFileAsync17("launchctl", ["managername"], { timeout: 5e3 });
|
|
104121
104208
|
return stdout.trim() === "Background";
|
|
104122
104209
|
} catch {
|
|
104123
104210
|
return false;
|
|
@@ -104127,7 +104214,7 @@ function listsWebKitMallocZone(vmmapOutput) {
|
|
|
104127
104214
|
return /^WebKit Malloc_0x[0-9a-f]+\s/m.test(vmmapOutput);
|
|
104128
104215
|
}
|
|
104129
104216
|
async function processHasWebKitMallocZone(pid) {
|
|
104130
|
-
const { stdout } = await
|
|
104217
|
+
const { stdout } = await execFileAsync17("vmmap", ["-summary", String(pid)], {
|
|
104131
104218
|
timeout: 1e4,
|
|
104132
104219
|
maxBuffer: 4 * 1024 * 1024
|
|
104133
104220
|
});
|
|
@@ -104225,7 +104312,7 @@ async function findMacosAppByBundleId(bundleId) {
|
|
|
104225
104312
|
if (!isMacosBundleId(bundleId)) return null;
|
|
104226
104313
|
let stdout;
|
|
104227
104314
|
try {
|
|
104228
|
-
({ stdout } = await
|
|
104315
|
+
({ stdout } = await execFileAsync17(
|
|
104229
104316
|
"mdfind",
|
|
104230
104317
|
// The bundle id alphabet has no quote, so it cannot leave the string.
|
|
104231
104318
|
[`kMDItemCFBundleIdentifier == '${bundleId}'`],
|
|
@@ -104255,7 +104342,7 @@ async function issueSandboxExtension(filePath, opts = {}) {
|
|
|
104255
104342
|
const args = ["issue-extension", "--path", path26.resolve(filePath)];
|
|
104256
104343
|
if (opts.readOnly) args.push("--read-only");
|
|
104257
104344
|
try {
|
|
104258
|
-
const { stdout } = await
|
|
104345
|
+
const { stdout } = await execFileAsync17(macosArtifacts().helper, args, { timeout: 1e4 });
|
|
104259
104346
|
const token = stdout.trim();
|
|
104260
104347
|
if (!token) throw new Error("argent-macos-helper printed no token");
|
|
104261
104348
|
return token;
|
|
@@ -104935,8 +105022,12 @@ var CDPClient = class {
|
|
|
104935
105022
|
if (dotIdx < 0) return;
|
|
104936
105023
|
const domain2 = method.slice(0, dotIdx);
|
|
104937
105024
|
const action = method.slice(dotIdx + 1);
|
|
104938
|
-
if (action === "enable")
|
|
104939
|
-
|
|
105025
|
+
if (action === "enable") {
|
|
105026
|
+
this.enabledDomains.add(domain2);
|
|
105027
|
+
this.events.emit("domainEnabled", domain2);
|
|
105028
|
+
} else if (action === "disable") {
|
|
105029
|
+
this.enabledDomains.delete(domain2);
|
|
105030
|
+
}
|
|
104940
105031
|
}
|
|
104941
105032
|
cleanup() {
|
|
104942
105033
|
this.paused = void 0;
|
|
@@ -105105,7 +105196,7 @@ async function openBlankPage(port) {
|
|
|
105105
105196
|
}
|
|
105106
105197
|
}
|
|
105107
105198
|
async function primePageSession(cdp) {
|
|
105108
|
-
for (const domain2 of ["Page", "DOM", "Runtime", "Accessibility"]) {
|
|
105199
|
+
for (const domain2 of ["Page", "DOM", "Runtime", "Accessibility", "Log"]) {
|
|
105109
105200
|
try {
|
|
105110
105201
|
await cdp.send(`${domain2}.enable`);
|
|
105111
105202
|
} catch {
|
|
@@ -106444,14 +106535,14 @@ async function discoverChromiumDevices(options) {
|
|
|
106444
106535
|
init_src2();
|
|
106445
106536
|
|
|
106446
106537
|
// ../tool-server/src/utils/vega-sdk.ts
|
|
106447
|
-
var
|
|
106448
|
-
var
|
|
106449
|
-
var
|
|
106450
|
-
var
|
|
106451
|
-
var
|
|
106538
|
+
var import_promises8 = require("node:fs/promises");
|
|
106539
|
+
var import_node_fs9 = require("node:fs");
|
|
106540
|
+
var import_node_os5 = require("node:os");
|
|
106541
|
+
var import_node_path12 = require("node:path");
|
|
106542
|
+
var import_semver4 = __toESM(require_semver2());
|
|
106452
106543
|
async function readVegaConfig() {
|
|
106453
106544
|
try {
|
|
106454
|
-
const raw = await (0,
|
|
106545
|
+
const raw = await (0, import_promises8.readFile)((0, import_node_path12.join)((0, import_node_os5.homedir)(), "vega", "config.json"), "utf-8");
|
|
106455
106546
|
return JSON.parse(raw);
|
|
106456
106547
|
} catch {
|
|
106457
106548
|
return {};
|
|
@@ -106462,15 +106553,15 @@ function bareVersion(version3) {
|
|
|
106462
106553
|
}
|
|
106463
106554
|
function sdkComponentRoots(config2) {
|
|
106464
106555
|
const roots = [
|
|
106465
|
-
config2.sdkPath && (0,
|
|
106466
|
-
(0,
|
|
106556
|
+
config2.sdkPath && (0, import_node_path12.join)(config2.sdkPath, "vega-sdk"),
|
|
106557
|
+
(0, import_node_path12.join)((0, import_node_os5.homedir)(), "vega", "sdk", "vega-sdk")
|
|
106467
106558
|
].filter((p) => Boolean(p));
|
|
106468
106559
|
return Array.from(new Set(roots));
|
|
106469
106560
|
}
|
|
106470
106561
|
async function resolveVersion(channelDir, preferred) {
|
|
106471
|
-
if (preferred && (0,
|
|
106562
|
+
if (preferred && (0, import_node_fs9.existsSync)((0, import_node_path12.join)(channelDir, preferred))) return preferred;
|
|
106472
106563
|
try {
|
|
106473
|
-
const versions = (await (0,
|
|
106564
|
+
const versions = (await (0, import_promises8.readdir)(channelDir)).filter((e) => import_semver4.default.valid(e)).sort(import_semver4.default.rcompare);
|
|
106474
106565
|
return versions[0] ?? null;
|
|
106475
106566
|
} catch {
|
|
106476
106567
|
return null;
|
|
@@ -106482,11 +106573,11 @@ async function resolveVegaSdkImagesDir() {
|
|
|
106482
106573
|
const channel = config2.defaultChannel || "main";
|
|
106483
106574
|
const preferred = bareVersion(config2.defaultVersion);
|
|
106484
106575
|
for (const root of sdkComponentRoots(config2)) {
|
|
106485
|
-
const channelDir = (0,
|
|
106576
|
+
const channelDir = (0, import_node_path12.join)(root, channel);
|
|
106486
106577
|
const version3 = await resolveVersion(channelDir, preferred);
|
|
106487
106578
|
if (!version3) continue;
|
|
106488
|
-
const imagesDir = (0,
|
|
106489
|
-
if ((0,
|
|
106579
|
+
const imagesDir = (0, import_node_path12.join)(channelDir, version3, "vvd", "images");
|
|
106580
|
+
if ((0, import_node_fs9.existsSync)(imagesDir)) return imagesDir;
|
|
106490
106581
|
}
|
|
106491
106582
|
return null;
|
|
106492
106583
|
}
|
|
@@ -106494,8 +106585,8 @@ async function listVvdImages() {
|
|
|
106494
106585
|
const dir = await resolveVegaSdkImagesDir();
|
|
106495
106586
|
if (!dir) return [];
|
|
106496
106587
|
try {
|
|
106497
|
-
const entries = await (0,
|
|
106498
|
-
return entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, path: (0,
|
|
106588
|
+
const entries = await (0, import_promises8.readdir)(dir, { withFileTypes: true });
|
|
106589
|
+
return entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, path: (0, import_node_path12.join)(dir, e.name) })).sort((a, b) => a.name.localeCompare(b.name));
|
|
106499
106590
|
} catch {
|
|
106500
106591
|
return [];
|
|
106501
106592
|
}
|
|
@@ -106617,18 +106708,22 @@ async function resolveRunningVvdSerial() {
|
|
|
106617
106708
|
|
|
106618
106709
|
// ../tool-server/src/tools/devices/list-devices.ts
|
|
106619
106710
|
init_external_devices();
|
|
106620
|
-
var
|
|
106621
|
-
var
|
|
106622
|
-
var
|
|
106711
|
+
var import_node_child_process24 = require("node:child_process");
|
|
106712
|
+
var import_node_util19 = require("node:util");
|
|
106713
|
+
var execFileAsync18 = (0, import_node_util19.promisify)(import_node_child_process24.execFile);
|
|
106623
106714
|
var ARGENT_CLOUD_URL = "https://argent.swmansion.com/cloud/";
|
|
106624
106715
|
var ARGENT_CLOUD_OFFER = `Argent Cloud, a hosted service that is not set up here, runs iOS simulators on remote Macs; once the user sets it up with their API key and the sim-remote CLI, they are listed as platform 'ios-remote'. ` + ARGENT_CLOUD_URL;
|
|
106625
106716
|
function iosReachNote(host, cloud) {
|
|
106626
106717
|
if (cloud === "logged-out") {
|
|
106627
|
-
return `iOS: ${host.localIos ? "" : "this machine cannot run iOS simulators locally; "}
|
|
106718
|
+
return `iOS: ${host.localIos ? "" : "this machine cannot run iOS simulators locally; "}${argentCloudCommand()} is installed but not logged in, so Argent Cloud simulators are not listed. The user runs \`${argentCloudCommand()} login\` in their own terminal.`;
|
|
106628
106719
|
}
|
|
106629
106720
|
if (cloud !== "absent" || host.localIos) return null;
|
|
106630
106721
|
return host.darwin ? `iOS: no local simulators because \`simctl\` was not found in the active developer directory. Select your Xcode installation, or install Xcode if needed. ${ARGENT_CLOUD_OFFER}` : `iOS: this machine cannot run iOS simulators (they need macOS with Xcode). ${ARGENT_CLOUD_OFFER}`;
|
|
106631
106722
|
}
|
|
106723
|
+
function outdatedCloudCliNote(version3) {
|
|
106724
|
+
if (!version3 || !isArgentCloudOutdated(version3)) return null;
|
|
106725
|
+
return `iOS: ${argentCloudCommand()} ${version3} is older than ${MIN_ARGENT_CLOUD_VERSION}, the version Argent expects. Argent Cloud simulators still work. The user can update it with \`argent cloud install\`.`;
|
|
106726
|
+
}
|
|
106632
106727
|
var ANDROID_SDK_MISSING_NOTE = "Android: no SDK found (adb, emulator). Installing the platform tools and creating an AVD adds Android targets.";
|
|
106633
106728
|
var EXTERNAL_DEVICES_HINT = `Some entries are tagged 'external: true': another application is already driving that device, and its 'provider' field names it ('provider.workspace' names the project it opened, when it published one). Drive them with the usual tools, by the 'ext:'-prefixed id. Two rules differ: prefer the external device whose 'provider.workspace.path' matches the project you are working in, and do NOT call boot-device on them, since the provider owns their lifecycle. stop-simulator-server IS safe on them and never stops the provider's server \u2014 it drops argent's cached handles, which is the recovery when calls keep failing against an endpoint the provider has since moved. Each entry's 'capabilities' lists the mechanisms that provider granted; a tool relying on one it withheld fails with a clear message naming the provider.`;
|
|
106634
106729
|
function iosListTimedOutHint() {
|
|
@@ -106698,10 +106793,10 @@ async function listRemoteIosSimulators() {
|
|
|
106698
106793
|
)
|
|
106699
106794
|
);
|
|
106700
106795
|
const left = BRANCH_DEADLINE_MS - REMOTE_LISTING_MARGIN_MS - (Date.now() - started);
|
|
106701
|
-
const foldableTypes = await
|
|
106702
|
-
mobileTypes,
|
|
106703
|
-
|
|
106704
|
-
);
|
|
106796
|
+
const [foldableTypes, version3] = await Promise.all([
|
|
106797
|
+
remoteFoldableTypes(mobileTypes, Math.max(0, Math.min(REMOTE_FOLDABLE_LOOKUP_MS, left))),
|
|
106798
|
+
argentCloudVersion()
|
|
106799
|
+
]);
|
|
106705
106800
|
const out = listed.map(({ runtime, runtimeKind, d }) => ({
|
|
106706
106801
|
platform: "ios-remote",
|
|
106707
106802
|
kind: "simulator",
|
|
@@ -106712,19 +106807,23 @@ async function listRemoteIosSimulators() {
|
|
|
106712
106807
|
runtimeKind,
|
|
106713
106808
|
...runtimeKind === "mobile" && foldableTypes.has(d.deviceTypeIdentifier ?? "") ? { foldable: true } : {}
|
|
106714
106809
|
}));
|
|
106715
|
-
return { devices: out, cloud: "logged-in" };
|
|
106810
|
+
return { devices: out, cloud: "logged-in", version: version3 };
|
|
106716
106811
|
} catch (err) {
|
|
106717
106812
|
if (simRemoteExecError(err).code === "ENOENT") {
|
|
106718
|
-
return { devices: [], cloud: "absent" };
|
|
106813
|
+
return { devices: [], cloud: "absent", version: null };
|
|
106719
106814
|
}
|
|
106720
106815
|
const loggedOut = err instanceof Error && /not logged in/i.test(err.message);
|
|
106721
|
-
return {
|
|
106816
|
+
return {
|
|
106817
|
+
devices: [],
|
|
106818
|
+
cloud: loggedOut ? "logged-out" : "unknown",
|
|
106819
|
+
version: await argentCloudVersion()
|
|
106820
|
+
};
|
|
106722
106821
|
}
|
|
106723
106822
|
}
|
|
106724
106823
|
async function canRunLocalIos(simulatorsFound) {
|
|
106725
106824
|
if (process.platform !== "darwin") return false;
|
|
106726
106825
|
if (simulatorsFound) return true;
|
|
106727
|
-
return
|
|
106826
|
+
return execFileAsync18("xcrun", ["--find", "simctl"], { timeout: 5e3 }).then(
|
|
106728
106827
|
() => true,
|
|
106729
106828
|
() => false
|
|
106730
106829
|
);
|
|
@@ -106856,7 +106955,7 @@ Use when starting a session to discover target ids. Returns { devices, notes? }.
|
|
|
106856
106955
|
),
|
|
106857
106956
|
withDeadline(
|
|
106858
106957
|
listRemoteIosSimulators(),
|
|
106859
|
-
{ devices: [], cloud: "unknown" },
|
|
106958
|
+
{ devices: [], cloud: "unknown", version: null },
|
|
106860
106959
|
"ios-remote"
|
|
106861
106960
|
),
|
|
106862
106961
|
withDeadline(
|
|
@@ -106996,9 +107095,11 @@ Use when starting a session to discover target ids. Returns { devices, notes? }.
|
|
|
106996
107095
|
{ localIos, darwin: process.platform === "darwin" },
|
|
106997
107096
|
iosRemote.cloud
|
|
106998
107097
|
);
|
|
107098
|
+
const cloudCliNote = outdatedCloudCliNote(iosRemote.version);
|
|
106999
107099
|
const adbPrefix = adbCommandPrefix(process.env);
|
|
107000
107100
|
const notes = [
|
|
107001
107101
|
...iosNote ? [iosNote] : [],
|
|
107102
|
+
...cloudCliNote ? [cloudCliNote] : [],
|
|
107002
107103
|
...androidSdk ? [] : [ANDROID_SDK_MISSING_NOTE],
|
|
107003
107104
|
...xcodeInstallPending.length > 0 ? [xcodeFirstLaunchHint(xcodeInstallPending)] : [],
|
|
107004
107105
|
...ios.timedOut ? [iosListTimedOutHint()] : [],
|
|
@@ -109083,7 +109184,7 @@ function parseUiAutomatorDump(rawOutput, screenW, screenH, options = {}) {
|
|
|
109083
109184
|
}
|
|
109084
109185
|
|
|
109085
109186
|
// ../tool-server/src/blueprints/android-devtools.ts
|
|
109086
|
-
var
|
|
109187
|
+
var import_node_child_process25 = require("node:child_process");
|
|
109087
109188
|
var readline2 = __toESM(require("node:readline"));
|
|
109088
109189
|
init_src2();
|
|
109089
109190
|
|
|
@@ -109120,8 +109221,8 @@ var TraceProcessorUnavailableError = class _TraceProcessorUnavailableError exten
|
|
|
109120
109221
|
};
|
|
109121
109222
|
|
|
109122
109223
|
// ../native-devtools-android/src/wasm-trace-processor.ts
|
|
109123
|
-
var
|
|
109124
|
-
var
|
|
109224
|
+
var import_node_fs10 = require("node:fs");
|
|
109225
|
+
var import_promises9 = require("node:fs/promises");
|
|
109125
109226
|
var path30 = __toESM(require("node:path"));
|
|
109126
109227
|
var import_node_url2 = require("node:url");
|
|
109127
109228
|
var import_node_vm = __toESM(require("node:vm"));
|
|
@@ -109449,7 +109550,7 @@ function engineGlobals() {
|
|
|
109449
109550
|
function resolveTraceProcessorAssets() {
|
|
109450
109551
|
const dir = path30.join(__dirname, "..", "assets", "trace-processor");
|
|
109451
109552
|
const wasmOverride = process.env.ARGENT_TRACE_PROCESSOR_WASM;
|
|
109452
|
-
if (wasmOverride && !(0,
|
|
109553
|
+
if (wasmOverride && !(0, import_node_fs10.existsSync)(wasmOverride)) {
|
|
109453
109554
|
throw new TraceProcessorUnavailableError("wasm_path_invalid", { path: wasmOverride });
|
|
109454
109555
|
}
|
|
109455
109556
|
return {
|
|
@@ -109545,8 +109646,8 @@ async function createEngine() {
|
|
|
109545
109646
|
const dir = path30.dirname(wasmPath);
|
|
109546
109647
|
setupWorkerScope(dir);
|
|
109547
109648
|
const g = engineGlobals();
|
|
109548
|
-
const wasmModule = await g.WebAssembly.compile(await (0,
|
|
109549
|
-
const src = patchGlueForNode((0,
|
|
109649
|
+
const wasmModule = await g.WebAssembly.compile(await (0, import_promises9.readFile)(wasmPath));
|
|
109650
|
+
const src = patchGlueForNode((0, import_node_fs10.readFileSync)(gluePath, "utf8"));
|
|
109550
109651
|
import_node_vm.default.runInThisContext(src, { filename: "engine_bundle.node.patched.js" });
|
|
109551
109652
|
const bridge = g.__TP_bridge;
|
|
109552
109653
|
if (!bridge) throw new Error("patched glue did not expose globalThis.__TP_bridge");
|
|
@@ -109600,7 +109701,7 @@ function getWarmEngine(tracePath) {
|
|
|
109600
109701
|
}
|
|
109601
109702
|
const enginePromise = (async () => {
|
|
109602
109703
|
const engine = await createEngine();
|
|
109603
|
-
const bytes = new Uint8Array(await (0,
|
|
109704
|
+
const bytes = new Uint8Array(await (0, import_promises9.readFile)(tracePath));
|
|
109604
109705
|
const load = (async () => {
|
|
109605
109706
|
for (let offset = 0; offset < bytes.length; offset += TRACE_PARSE_CHUNK_BYTES) {
|
|
109606
109707
|
await engine.parse(bytes.subarray(offset, offset + TRACE_PARSE_CHUNK_BYTES));
|
|
@@ -109926,7 +110027,7 @@ async function spawnHelper(serial) {
|
|
|
109926
110027
|
}
|
|
109927
110028
|
);
|
|
109928
110029
|
}
|
|
109929
|
-
const proc = (0,
|
|
110030
|
+
const proc = (0, import_node_child_process25.spawn)(
|
|
109930
110031
|
adbPath,
|
|
109931
110032
|
["-s", serial, "shell", "am", "instrument", "-w", manifest.instrumentationRunner],
|
|
109932
110033
|
{ stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -113345,18 +113446,18 @@ function hasUnreadWebView(node2) {
|
|
|
113345
113446
|
// ../tool-server/src/preview.ts
|
|
113346
113447
|
function findUiFile(name) {
|
|
113347
113448
|
const candidates = [
|
|
113348
|
-
|
|
113349
|
-
|
|
113350
|
-
|
|
113449
|
+
import_node_path13.default.join(__dirname, "preview-ui", name),
|
|
113450
|
+
import_node_path13.default.resolve(__dirname, "..", "..", "..", "ui", name),
|
|
113451
|
+
import_node_path13.default.resolve(__dirname, "..", "..", "ui", name)
|
|
113351
113452
|
];
|
|
113352
113453
|
for (const p of candidates) {
|
|
113353
|
-
if (
|
|
113454
|
+
if (import_node_fs11.default.existsSync(p)) return p;
|
|
113354
113455
|
}
|
|
113355
113456
|
return null;
|
|
113356
113457
|
}
|
|
113357
113458
|
function serveUiFile(res, filePath, contentType) {
|
|
113358
113459
|
res.set("Cache-Control", "no-store, must-revalidate");
|
|
113359
|
-
res.type(contentType).sendFile(
|
|
113460
|
+
res.type(contentType).sendFile(import_node_path13.default.basename(filePath), { root: import_node_path13.default.dirname(filePath) });
|
|
113360
113461
|
}
|
|
113361
113462
|
function wsUrlFromHttp(httpUrl2) {
|
|
113362
113463
|
const u = new URL(httpUrl2);
|
|
@@ -113686,9 +113787,9 @@ data: ${JSON.stringify(data)}
|
|
|
113686
113787
|
const MAX_PREVIEW_BYTES = 25 * 1024 * 1024;
|
|
113687
113788
|
const allowedRoots = (() => {
|
|
113688
113789
|
const roots = /* @__PURE__ */ new Set();
|
|
113689
|
-
for (const r of [
|
|
113790
|
+
for (const r of [import_node_os6.default.tmpdir(), process.cwd(), "/tmp"]) {
|
|
113690
113791
|
try {
|
|
113691
|
-
roots.add(
|
|
113792
|
+
roots.add(import_node_fs11.default.realpathSync(r));
|
|
113692
113793
|
} catch {
|
|
113693
113794
|
}
|
|
113694
113795
|
}
|
|
@@ -113707,8 +113808,8 @@ data: ${JSON.stringify(data)}
|
|
|
113707
113808
|
let real;
|
|
113708
113809
|
let size;
|
|
113709
113810
|
try {
|
|
113710
|
-
real =
|
|
113711
|
-
const st =
|
|
113811
|
+
real = import_node_fs11.default.realpathSync(src);
|
|
113812
|
+
const st = import_node_fs11.default.statSync(real);
|
|
113712
113813
|
if (!st.isFile()) throw new Error("not a file");
|
|
113713
113814
|
size = st.size;
|
|
113714
113815
|
} catch {
|
|
@@ -113716,16 +113817,16 @@ data: ${JSON.stringify(data)}
|
|
|
113716
113817
|
return;
|
|
113717
113818
|
}
|
|
113718
113819
|
const contained = allowedRoots.some(
|
|
113719
|
-
(root) => real === root || real.startsWith(root +
|
|
113820
|
+
(root) => real === root || real.startsWith(root + import_node_path13.default.sep)
|
|
113720
113821
|
);
|
|
113721
|
-
const mime = IMG_MIME[
|
|
113822
|
+
const mime = IMG_MIME[import_node_path13.default.extname(real).toLowerCase()];
|
|
113722
113823
|
if (!contained || !mime || size > MAX_PREVIEW_BYTES) {
|
|
113723
113824
|
res.status(404).end();
|
|
113724
113825
|
return;
|
|
113725
113826
|
}
|
|
113726
113827
|
res.set("Cache-Control", "no-store");
|
|
113727
113828
|
res.type(mime);
|
|
113728
|
-
|
|
113829
|
+
import_node_fs11.default.createReadStream(real).on("error", () => {
|
|
113729
113830
|
if (!res.headersSent) res.status(404).end();
|
|
113730
113831
|
}).pipe(res);
|
|
113731
113832
|
});
|
|
@@ -113781,9 +113882,9 @@ data: ${JSON.stringify(data)}
|
|
|
113781
113882
|
}
|
|
113782
113883
|
|
|
113783
113884
|
// ../tool-server/src/artifacts.ts
|
|
113784
|
-
var
|
|
113785
|
-
var
|
|
113786
|
-
var
|
|
113885
|
+
var import_node_fs12 = require("node:fs");
|
|
113886
|
+
var import_promises10 = require("node:fs/promises");
|
|
113887
|
+
var import_node_child_process26 = require("node:child_process");
|
|
113787
113888
|
init_src2();
|
|
113788
113889
|
function requireArtifacts(ctx) {
|
|
113789
113890
|
if (!ctx?.artifacts) {
|
|
@@ -113802,7 +113903,7 @@ function makeArtifactRoute(registry2) {
|
|
|
113802
113903
|
return;
|
|
113803
113904
|
}
|
|
113804
113905
|
try {
|
|
113805
|
-
await (0,
|
|
113906
|
+
await (0, import_promises10.access)(entry.path);
|
|
113806
113907
|
} catch {
|
|
113807
113908
|
res.status(410).json({ error: `Artifact "${id}" file no longer exists on the tool-server host` });
|
|
113808
113909
|
return;
|
|
@@ -113814,7 +113915,7 @@ function makeArtifactRoute(registry2) {
|
|
|
113814
113915
|
res.setHeader("Content-Type", entry.mimeType);
|
|
113815
113916
|
res.setHeader("Content-Disposition", `attachment; filename="${entry.filename}"`);
|
|
113816
113917
|
if (entry.size > 0) res.setHeader("Content-Length", String(entry.size));
|
|
113817
|
-
const stream = (0,
|
|
113918
|
+
const stream = (0, import_node_fs12.createReadStream)(entry.path);
|
|
113818
113919
|
stream.on("error", () => {
|
|
113819
113920
|
if (!res.headersSent) res.status(500).json({ error: `Failed to read artifact "${id}"` });
|
|
113820
113921
|
else res.destroy();
|
|
@@ -113834,7 +113935,7 @@ function streamDirectoryAsArchive(id, entry, req, res) {
|
|
|
113834
113935
|
res.setHeader("Content-Type", ARCHIVE_CONTENT_TYPES[format]);
|
|
113835
113936
|
res.setHeader("Vary", "Accept");
|
|
113836
113937
|
res.setHeader("Content-Disposition", `attachment; filename="${entry.filename}.${ext}"`);
|
|
113837
|
-
const child = (0,
|
|
113938
|
+
const child = (0, import_node_child_process26.spawn)("tar", createTarArgs(entry.path), {
|
|
113838
113939
|
stdio: ["ignore", "pipe", "ignore"]
|
|
113839
113940
|
});
|
|
113840
113941
|
child.on("error", (err) => {
|
|
@@ -113863,9 +113964,9 @@ function streamDirectoryAsArchive(id, entry, req, res) {
|
|
|
113863
113964
|
}
|
|
113864
113965
|
|
|
113865
113966
|
// ../tool-server/src/file-inputs.ts
|
|
113866
|
-
var
|
|
113867
|
-
var
|
|
113868
|
-
var
|
|
113967
|
+
var import_promises11 = require("node:fs/promises");
|
|
113968
|
+
var import_node_os7 = require("node:os");
|
|
113969
|
+
var import_node_path14 = require("node:path");
|
|
113869
113970
|
var import_bytes = __toESM(require_bytes());
|
|
113870
113971
|
init_src2();
|
|
113871
113972
|
var MAX_UPLOAD_BYTES = 32 * 1024 * 1024;
|
|
@@ -113874,7 +113975,7 @@ var FileInputError = class extends Error {
|
|
|
113874
113975
|
async function probeHostPath(wire, kind) {
|
|
113875
113976
|
const miss = { present: false, statVerified: false };
|
|
113876
113977
|
try {
|
|
113877
|
-
const st = await (0,
|
|
113978
|
+
const st = await (0, import_promises11.stat)(wire.path);
|
|
113878
113979
|
if (kind === "directory") return { present: st.isDirectory(), statVerified: false };
|
|
113879
113980
|
if (kind === "probe") return { present: true, statVerified: false };
|
|
113880
113981
|
if (kind === "tar-upload" && st.isDirectory()) {
|
|
@@ -113921,9 +114022,9 @@ function decodeContent(wire) {
|
|
|
113921
114022
|
}
|
|
113922
114023
|
async function materializeUpload(wire) {
|
|
113923
114024
|
const data = decodeContent(wire);
|
|
113924
|
-
const dir = await (0,
|
|
113925
|
-
const filePath = (0,
|
|
113926
|
-
await (0,
|
|
114025
|
+
const dir = await (0, import_promises11.mkdtemp)((0, import_node_path14.join)((0, import_node_os7.tmpdir)(), "argent-file-input-"));
|
|
114026
|
+
const filePath = (0, import_node_path14.join)(dir, sanitizeFilename((0, import_node_path14.basename)(wire.path)));
|
|
114027
|
+
await (0, import_promises11.writeFile)(filePath, data);
|
|
113927
114028
|
return { filePath, dir };
|
|
113928
114029
|
}
|
|
113929
114030
|
async function extractTarUpload(wire, uploadId, meta3, tempDirs, lookupUpload) {
|
|
@@ -113944,11 +114045,11 @@ async function extractTarUpload(wire, uploadId, meta3, tempDirs, lookupUpload) {
|
|
|
113944
114045
|
`Upload content hash mismatch for "${wire.path}" \u2014 the tarball may have been corrupted in transit. Re-run the tool to upload again.`
|
|
113945
114046
|
);
|
|
113946
114047
|
}
|
|
113947
|
-
const extractDir = await (0,
|
|
113948
|
-
(0,
|
|
114048
|
+
const extractDir = await (0, import_promises11.mkdtemp)(
|
|
114049
|
+
(0, import_node_path14.join)((0, import_node_os7.tmpdir)(), `argent-tar-upload-${entry.sha256.slice(0, 16)}-`)
|
|
113949
114050
|
);
|
|
113950
114051
|
tempDirs.push(extractDir);
|
|
113951
|
-
const uploaded = await safeExtractArchive(entry.tarPath, extractDir, (0,
|
|
114052
|
+
const uploaded = await safeExtractArchive(entry.tarPath, extractDir, (0, import_node_path14.basename)(wire.path));
|
|
113952
114053
|
return { value: uploaded, meta: { ...meta3, viaUpload: true } };
|
|
113953
114054
|
} catch (err) {
|
|
113954
114055
|
if (err instanceof FileInputError) throw err;
|
|
@@ -113956,7 +114057,7 @@ async function extractTarUpload(wire, uploadId, meta3, tempDirs, lookupUpload) {
|
|
|
113956
114057
|
`Could not extract the uploaded archive for "${wire.path}": ${err instanceof Error ? err.message : String(err)}`
|
|
113957
114058
|
);
|
|
113958
114059
|
} finally {
|
|
113959
|
-
await (0,
|
|
114060
|
+
await (0, import_promises11.rm)(entry.tarPath, { force: true }).catch(() => {
|
|
113960
114061
|
});
|
|
113961
114062
|
}
|
|
113962
114063
|
}
|
|
@@ -114006,10 +114107,10 @@ async function memberText(member, tempDirs, lookupUpload, taken) {
|
|
|
114006
114107
|
`Could not read the uploaded file "${member.path}": ${errorText(err)}`
|
|
114007
114108
|
);
|
|
114008
114109
|
};
|
|
114009
|
-
const { size } = await (0,
|
|
114110
|
+
const { size } = await (0, import_promises11.stat)(file2).catch(unreadable2);
|
|
114010
114111
|
checkUploadSize(member, size);
|
|
114011
114112
|
countMemberBytes(member, taken, size);
|
|
114012
|
-
return (0,
|
|
114113
|
+
return (0, import_promises11.readFile)(file2, "utf8").catch(unreadable2);
|
|
114013
114114
|
}
|
|
114014
114115
|
async function resolveMembers(members2, tempDirs, lookupUpload) {
|
|
114015
114116
|
const out = {};
|
|
@@ -114048,7 +114149,7 @@ async function resolveMembers(members2, tempDirs, lookupUpload) {
|
|
|
114048
114149
|
return out;
|
|
114049
114150
|
}
|
|
114050
114151
|
function unexpandedPathError(wire) {
|
|
114051
|
-
if ((0,
|
|
114152
|
+
if ((0, import_node_path14.isAbsolute)(wire.path) || import_node_path14.win32.isAbsolute(wire.path)) return void 0;
|
|
114052
114153
|
return new FileInputError(
|
|
114053
114154
|
`Path "${wire.path}" is not an absolute path. ` + (isUnexpandedPath(wire.path) ? `Nothing expands "~", variables, commands or URLs in a file argument, ` : `The tool-server resolves a relative path against its own working directory, `) + `so pass the file's absolute path.`
|
|
114054
114155
|
);
|
|
@@ -114128,7 +114229,7 @@ async function releaseUploads(specs, body, lookupUpload) {
|
|
|
114128
114229
|
await Promise.all(
|
|
114129
114230
|
ids.map(async (id) => {
|
|
114130
114231
|
const entry = typeof id === "string" ? lookupUpload?.(id) : void 0;
|
|
114131
|
-
if (entry) await (0,
|
|
114232
|
+
if (entry) await (0, import_promises11.rm)(entry.tarPath, { force: true }).catch(() => {
|
|
114132
114233
|
});
|
|
114133
114234
|
})
|
|
114134
114235
|
);
|
|
@@ -114137,7 +114238,7 @@ async function resolveFileInputs(def, body, lookupUpload) {
|
|
|
114137
114238
|
const tempDirs = [];
|
|
114138
114239
|
const cleanup = async () => {
|
|
114139
114240
|
await Promise.all(
|
|
114140
|
-
tempDirs.map((dir) => (0,
|
|
114241
|
+
tempDirs.map((dir) => (0, import_promises11.rm)(dir, { recursive: true, force: true }).catch(() => {
|
|
114141
114242
|
}))
|
|
114142
114243
|
);
|
|
114143
114244
|
};
|
|
@@ -114646,7 +114747,7 @@ init_device_info();
|
|
|
114646
114747
|
// ../tool-server/src/blueprints/tv-control.ts
|
|
114647
114748
|
var net5 = __toESM(require("node:net"));
|
|
114648
114749
|
var fs36 = __toESM(require("node:fs"));
|
|
114649
|
-
var
|
|
114750
|
+
var import_node_child_process27 = require("node:child_process");
|
|
114650
114751
|
init_src2();
|
|
114651
114752
|
init_capability();
|
|
114652
114753
|
var TV_CONTROL_NAMESPACE = "TvControl";
|
|
@@ -114705,7 +114806,7 @@ function parseReply(raw, command) {
|
|
|
114705
114806
|
}
|
|
114706
114807
|
}
|
|
114707
114808
|
function spawnAxDaemon(udid, socketPath, axTarget) {
|
|
114708
|
-
const proc = (0,
|
|
114809
|
+
const proc = (0, import_node_child_process27.execFile)(
|
|
114709
114810
|
"xcrun",
|
|
114710
114811
|
[
|
|
114711
114812
|
...axTarget.prefix,
|
|
@@ -114725,10 +114826,10 @@ function spawnAxDaemon(udid, socketPath, axTarget) {
|
|
|
114725
114826
|
}
|
|
114726
114827
|
function reapDaemons(socketPath) {
|
|
114727
114828
|
const pattern = `tvos-.* --socket ${socketPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`;
|
|
114728
|
-
return new Promise((resolve24) => (0,
|
|
114829
|
+
return new Promise((resolve24) => (0, import_node_child_process27.execFile)("pkill", ["-KILL", "-f", pattern], () => resolve24()));
|
|
114729
114830
|
}
|
|
114730
114831
|
function spawnHidDaemon(udid, socketPath) {
|
|
114731
|
-
const proc = (0,
|
|
114832
|
+
const proc = (0, import_node_child_process27.execFile)(
|
|
114732
114833
|
tvosHidDaemonBinaryPath(),
|
|
114733
114834
|
["--udid", udid, "--socket", socketPath, "--timeout", "3600"],
|
|
114734
114835
|
{ encoding: "utf8" }
|
|
@@ -115502,8 +115603,8 @@ function reserveLaunchMeasurement(udid) {
|
|
|
115502
115603
|
}
|
|
115503
115604
|
|
|
115504
115605
|
// ../tool-server/src/utils/ios-device/runner-artifact.ts
|
|
115505
|
-
var
|
|
115506
|
-
var
|
|
115606
|
+
var import_node_child_process29 = require("node:child_process");
|
|
115607
|
+
var import_node_util21 = require("node:util");
|
|
115507
115608
|
var import_node_crypto10 = require("node:crypto");
|
|
115508
115609
|
var fs38 = __toESM(require("node:fs"));
|
|
115509
115610
|
var fsp = __toESM(require("node:fs/promises"));
|
|
@@ -115514,12 +115615,12 @@ init_src2();
|
|
|
115514
115615
|
init_src2();
|
|
115515
115616
|
|
|
115516
115617
|
// ../tool-server/src/utils/ios-device/provisioning-profiles.ts
|
|
115517
|
-
var
|
|
115518
|
-
var
|
|
115519
|
-
var
|
|
115618
|
+
var import_node_child_process28 = require("node:child_process");
|
|
115619
|
+
var import_node_fs13 = require("node:fs");
|
|
115620
|
+
var import_node_os8 = require("node:os");
|
|
115520
115621
|
var path33 = __toESM(require("node:path"));
|
|
115521
|
-
var
|
|
115522
|
-
var
|
|
115622
|
+
var import_node_util20 = require("node:util");
|
|
115623
|
+
var execFileAsync19 = (0, import_node_util20.promisify)(import_node_child_process28.execFile);
|
|
115523
115624
|
var PROFILE_DIRECTORIES = [
|
|
115524
115625
|
path33.join("Library", "Developer", "Xcode", "UserData", "Provisioning Profiles"),
|
|
115525
115626
|
path33.join("Library", "MobileDevice", "Provisioning Profiles")
|
|
@@ -115543,14 +115644,14 @@ function parseProvisioningProfile(xml) {
|
|
|
115543
115644
|
async function readInstalledProfiles() {
|
|
115544
115645
|
const files = (await Promise.all(
|
|
115545
115646
|
PROFILE_DIRECTORIES.map(async (directory) => {
|
|
115546
|
-
const absolute = path33.join((0,
|
|
115547
|
-
const names = await
|
|
115647
|
+
const absolute = path33.join((0, import_node_os8.homedir)(), directory);
|
|
115648
|
+
const names = await import_node_fs13.promises.readdir(absolute).catch(() => []);
|
|
115548
115649
|
return names.filter((name) => name.endsWith(".mobileprovision")).map((name) => path33.join(absolute, name));
|
|
115549
115650
|
})
|
|
115550
115651
|
)).flat();
|
|
115551
115652
|
const decoded2 = await Promise.all(
|
|
115552
115653
|
files.map(
|
|
115553
|
-
(file2) =>
|
|
115654
|
+
(file2) => execFileAsync19("security", ["cms", "-D", "-i", file2], {
|
|
115554
115655
|
timeout: PROFILE_DECODE_TIMEOUT_MS,
|
|
115555
115656
|
maxBuffer: PROFILE_MAX_BYTES
|
|
115556
115657
|
}).then(
|
|
@@ -115629,7 +115730,7 @@ function resolveSigningHint(output2) {
|
|
|
115629
115730
|
|
|
115630
115731
|
// ../tool-server/src/utils/ios-device/runner-artifact.ts
|
|
115631
115732
|
init_src();
|
|
115632
|
-
var
|
|
115733
|
+
var execFileAsync20 = (0, import_node_util21.promisify)(import_node_child_process29.execFile);
|
|
115633
115734
|
var PROJECT_SUFFIX = "ios-device-runner/ArgentRunner/ArgentRunner.xcodeproj";
|
|
115634
115735
|
function resolveRunnerProjectPath() {
|
|
115635
115736
|
const override = process.env.ARGENT_IOS_RUNNER_PROJECT;
|
|
@@ -115688,7 +115789,7 @@ async function fingerprintRunnerSources(projectPath) {
|
|
|
115688
115789
|
}
|
|
115689
115790
|
async function xcodeVersionFingerprint() {
|
|
115690
115791
|
try {
|
|
115691
|
-
const { stdout } = await
|
|
115792
|
+
const { stdout } = await execFileAsync20("xcodebuild", ["-version"], { timeout: 2e4 });
|
|
115692
115793
|
return stdout.trim().replace(/\n/g, " ");
|
|
115693
115794
|
} catch {
|
|
115694
115795
|
return "unknown-xcode";
|
|
@@ -115848,7 +115949,7 @@ async function buildRunnerArtifact(derivedDataPath, staticArgs, destinationUdid,
|
|
|
115848
115949
|
...runnerBuildLocationArgs(derivedDataPath)
|
|
115849
115950
|
];
|
|
115850
115951
|
try {
|
|
115851
|
-
await
|
|
115952
|
+
await execFileAsync20("xcodebuild", args, {
|
|
115852
115953
|
timeout: BUILD_TIMEOUT_MS,
|
|
115853
115954
|
killSignal: "SIGKILL",
|
|
115854
115955
|
maxBuffer: BUILD_MAX_OUTPUT_BYTES
|
|
@@ -115897,15 +115998,15 @@ ${xcodebuildFailureSummary(output2)}`,
|
|
|
115897
115998
|
}
|
|
115898
115999
|
|
|
115899
116000
|
// ../tool-server/src/utils/ios-device/runner-launch.ts
|
|
115900
|
-
var
|
|
116001
|
+
var import_node_child_process30 = require("node:child_process");
|
|
115901
116002
|
var import_node_events2 = require("node:events");
|
|
115902
116003
|
var fs39 = __toESM(require("node:fs"));
|
|
115903
116004
|
var fsp2 = __toESM(require("node:fs/promises"));
|
|
115904
116005
|
var path35 = __toESM(require("node:path"));
|
|
115905
|
-
var
|
|
116006
|
+
var import_node_util22 = require("node:util");
|
|
115906
116007
|
init_src2();
|
|
115907
116008
|
init_src();
|
|
115908
|
-
var
|
|
116009
|
+
var execFileAsync21 = (0, import_node_util22.promisify)(import_node_child_process30.execFile);
|
|
115909
116010
|
function logsRoot() {
|
|
115910
116011
|
return path35.join(argentHomeDir(), "ios-device-runner", "logs");
|
|
115911
116012
|
}
|
|
@@ -115922,7 +116023,7 @@ async function disableRunnerAttachments(xctestrunPath) {
|
|
|
115922
116023
|
for (const target of RUNNER_TEST_TARGET_KEY_PATHS) {
|
|
115923
116024
|
try {
|
|
115924
116025
|
for (const [key2, value] of RUNNER_ATTACHMENT_SETTINGS) {
|
|
115925
|
-
await
|
|
116026
|
+
await execFileAsync21(
|
|
115926
116027
|
"plutil",
|
|
115927
116028
|
["-replace", `${target}.${key2}`, "-string", value, xctestrunPath],
|
|
115928
116029
|
{
|
|
@@ -115948,7 +116049,7 @@ async function launchRunner(opts) {
|
|
|
115948
116049
|
await fsp2.rm(resultBundlePath, { recursive: true, force: true });
|
|
115949
116050
|
await disableRunnerAttachments(opts.xctestrunPath);
|
|
115950
116051
|
const logFd = fs39.openSync(logPath, "w");
|
|
115951
|
-
const child = (0,
|
|
116052
|
+
const child = (0, import_node_child_process30.spawn)(
|
|
115952
116053
|
"xcodebuild",
|
|
115953
116054
|
[
|
|
115954
116055
|
"test-without-building",
|
|
@@ -116033,16 +116134,16 @@ function killRunnerProcess(child) {
|
|
|
116033
116134
|
}
|
|
116034
116135
|
|
|
116035
116136
|
// ../tool-server/src/utils/ios-device/runner-sweep.ts
|
|
116036
|
-
var
|
|
116037
|
-
var
|
|
116137
|
+
var import_node_child_process31 = require("node:child_process");
|
|
116138
|
+
var import_node_util23 = require("node:util");
|
|
116038
116139
|
var path36 = __toESM(require("node:path"));
|
|
116039
116140
|
init_src();
|
|
116040
|
-
var
|
|
116141
|
+
var execFileAsync22 = (0, import_node_util23.promisify)(import_node_child_process31.execFile);
|
|
116041
116142
|
var PROCESS_TABLE_MAX_BYTES = 16 * 1024 * 1024;
|
|
116042
116143
|
var STALE_EXIT_TIMEOUT_MS = 5e3;
|
|
116043
116144
|
var STALE_EXIT_POLL_INTERVAL_MS = 100;
|
|
116044
116145
|
async function listProcessTable() {
|
|
116045
|
-
const { stdout } = await
|
|
116146
|
+
const { stdout } = await execFileAsync22(PS_BIN, ["-ax", "-o", "pid=,ppid=,command="], {
|
|
116046
116147
|
maxBuffer: PROCESS_TABLE_MAX_BYTES
|
|
116047
116148
|
});
|
|
116048
116149
|
return stdout;
|
|
@@ -116471,10 +116572,10 @@ function defaultSendViaUsbmux(udid, port, body, deadline) {
|
|
|
116471
116572
|
}
|
|
116472
116573
|
|
|
116473
116574
|
// ../tool-server/src/utils/ios-device/runner-crash.ts
|
|
116474
|
-
var
|
|
116475
|
-
var
|
|
116575
|
+
var import_node_child_process32 = require("node:child_process");
|
|
116576
|
+
var import_node_util24 = require("node:util");
|
|
116476
116577
|
var fs40 = __toESM(require("node:fs/promises"));
|
|
116477
|
-
var
|
|
116578
|
+
var execFileAsync23 = (0, import_node_util24.promisify)(import_node_child_process32.execFile);
|
|
116478
116579
|
var XCRESULTTOOL_TIMEOUT_MS = 15e3;
|
|
116479
116580
|
var XCRESULTTOOL_MAX_JSON_BYTES = 32 * 1024 * 1024;
|
|
116480
116581
|
function extractCrashFailureText(summary) {
|
|
@@ -116494,7 +116595,7 @@ function extractCrashFailureText(summary) {
|
|
|
116494
116595
|
async function readRunnerCrashSummary(resultBundlePath) {
|
|
116495
116596
|
try {
|
|
116496
116597
|
await fs40.access(resultBundlePath);
|
|
116497
|
-
const { stdout } = await
|
|
116598
|
+
const { stdout } = await execFileAsync23(
|
|
116498
116599
|
"xcrun",
|
|
116499
116600
|
["xcresulttool", "get", "test-results", "summary", "--path", resultBundlePath],
|
|
116500
116601
|
{ timeout: XCRESULTTOOL_TIMEOUT_MS, maxBuffer: XCRESULTTOOL_MAX_JSON_BYTES }
|
|
@@ -121847,12 +121948,12 @@ async function describeVega(_serial) {
|
|
|
121847
121948
|
}
|
|
121848
121949
|
|
|
121849
121950
|
// ../tool-server/src/tools/describe/platforms/harmony/index.ts
|
|
121850
|
-
var
|
|
121851
|
-
var
|
|
121852
|
-
var
|
|
121951
|
+
var import_node_os9 = require("node:os");
|
|
121952
|
+
var import_node_path15 = require("node:path");
|
|
121953
|
+
var import_promises13 = require("node:fs/promises");
|
|
121853
121954
|
|
|
121854
121955
|
// ../tool-server/src/utils/harmony-uitest.ts
|
|
121855
|
-
var
|
|
121956
|
+
var import_promises12 = require("node:fs/promises");
|
|
121856
121957
|
init_src2();
|
|
121857
121958
|
var REMOTE_TMP = "/data/local/tmp";
|
|
121858
121959
|
var UITEST_TIMEOUT_MS = 2e4;
|
|
@@ -122101,7 +122202,7 @@ async function harmonyDumpLayout(connectKey, localPath, timeoutMs = UITEST_TIMEO
|
|
|
122101
122202
|
},
|
|
122102
122203
|
Date.now() + timeoutMs
|
|
122103
122204
|
);
|
|
122104
|
-
const raw = await (0,
|
|
122205
|
+
const raw = await (0, import_promises12.readFile)(localPath, "utf8");
|
|
122105
122206
|
try {
|
|
122106
122207
|
return JSON.parse(raw);
|
|
122107
122208
|
} catch (err) {
|
|
@@ -122371,7 +122472,7 @@ function pollHarmonyTree(connectKey, budgetMs) {
|
|
|
122371
122472
|
return describeHarmony(connectKey, budgetMs);
|
|
122372
122473
|
}
|
|
122373
122474
|
async function describeHarmony(connectKey, timeoutMs = HARMONY_INTERACTION_TIMEOUT_MS) {
|
|
122374
|
-
const localPath = (0,
|
|
122475
|
+
const localPath = (0, import_node_path15.join)((0, import_node_os9.tmpdir)(), `argent-harmony-dump-${process.hrtime.bigint()}.json`);
|
|
122375
122476
|
const deadline = Date.now() + timeoutMs;
|
|
122376
122477
|
const display = await harmonyDisplay(
|
|
122377
122478
|
connectKey,
|
|
@@ -122396,7 +122497,7 @@ async function describeHarmony(connectKey, timeoutMs = HARMONY_INTERACTION_TIMEO
|
|
|
122396
122497
|
...display.screenOn ? {} : { stale: true }
|
|
122397
122498
|
};
|
|
122398
122499
|
} finally {
|
|
122399
|
-
await (0,
|
|
122500
|
+
await (0, import_promises13.rm)(localPath, { force: true }).catch(() => {
|
|
122400
122501
|
});
|
|
122401
122502
|
}
|
|
122402
122503
|
}
|
|
@@ -122406,7 +122507,7 @@ var import_pngjs2 = __toESM(require_png());
|
|
|
122406
122507
|
init_src2();
|
|
122407
122508
|
|
|
122408
122509
|
// ../tool-server/src/blueprints/macos-app.ts
|
|
122409
|
-
var
|
|
122510
|
+
var import_node_child_process33 = require("node:child_process");
|
|
122410
122511
|
var import_node_crypto12 = require("node:crypto");
|
|
122411
122512
|
var import_node_events5 = require("node:events");
|
|
122412
122513
|
var fs42 = __toESM(require("node:fs"));
|
|
@@ -123437,7 +123538,7 @@ function createMacosAppApi(bundleId) {
|
|
|
123437
123538
|
if (listen3 && !info.sandboxed) fs42.rmSync(listen3.path, { force: true });
|
|
123438
123539
|
fs42.writeFileSync(logPath, "");
|
|
123439
123540
|
const args = opts.args ?? (opts.noLastArgs ? void 0 : tracked?.args) ?? [];
|
|
123440
|
-
const helper = (0,
|
|
123541
|
+
const helper = (0, import_node_child_process33.spawn)(
|
|
123441
123542
|
artifacts.helper,
|
|
123442
123543
|
[
|
|
123443
123544
|
"launch",
|
|
@@ -125328,6 +125429,66 @@ function describeReapedSession(entry, what) {
|
|
|
125328
125429
|
return `The ${what} for device ${entry.deviceId} was torn down ${secondsAgo}s ago \u2014 by a stop-all-simulator-servers, which reaps every service a device owns, or by another teardown that reaches the same services (a stop-simulator-server on Chromium or a Mac app, or a react-profiler-start reclaiming the session with force). One tool-server serves every agent using this Argent install and home, so this may have been another agent rather than your own call. It was not a session that never started.${salvage}`;
|
|
125329
125430
|
}
|
|
125330
125431
|
|
|
125432
|
+
// ../tool-server/src/tools/network/network-secrets.ts
|
|
125433
|
+
init_src();
|
|
125434
|
+
|
|
125435
|
+
// ../tool-server/src/utils/received-secrets.ts
|
|
125436
|
+
var MAX_VALUES2 = 256;
|
|
125437
|
+
var received = /* @__PURE__ */ new Map();
|
|
125438
|
+
function noteReceivedSecrets(secrets) {
|
|
125439
|
+
for (const [name, value] of secrets) {
|
|
125440
|
+
if (value.length === 0) continue;
|
|
125441
|
+
received.delete(value);
|
|
125442
|
+
received.set(value, name);
|
|
125443
|
+
if (received.size > MAX_VALUES2) received.delete(received.keys().next().value);
|
|
125444
|
+
}
|
|
125445
|
+
}
|
|
125446
|
+
function receivedSecrets() {
|
|
125447
|
+
return [...received].reverse().map(([value, name]) => ({ name, value }));
|
|
125448
|
+
}
|
|
125449
|
+
|
|
125450
|
+
// ../tool-server/src/tools/network/network-secrets.ts
|
|
125451
|
+
function networkSecrets(ctx) {
|
|
125452
|
+
const secrets = [];
|
|
125453
|
+
for (const [name, value] of ctx?.clientSecrets ?? []) secrets.push({ name, value });
|
|
125454
|
+
for (const source of secretSources()) {
|
|
125455
|
+
for (const [name, value] of source.values) secrets.push({ name, value });
|
|
125456
|
+
}
|
|
125457
|
+
return [...secrets, ...receivedSecrets(), ...typedSecrets()];
|
|
125458
|
+
}
|
|
125459
|
+
function networkRedactorOf(secrets) {
|
|
125460
|
+
const byValue = /* @__PURE__ */ new Map();
|
|
125461
|
+
for (const { name, value } of secrets) {
|
|
125462
|
+
if (value.length > 0 && !byValue.has(value)) byValue.set(value, name);
|
|
125463
|
+
}
|
|
125464
|
+
return secretRedactor(
|
|
125465
|
+
[...byValue].map(([value, name]) => ({ name, value })),
|
|
125466
|
+
{ wholeValues: true }
|
|
125467
|
+
);
|
|
125468
|
+
}
|
|
125469
|
+
function networkSecretRedactor(ctx) {
|
|
125470
|
+
return networkRedactorOf(networkSecrets(ctx));
|
|
125471
|
+
}
|
|
125472
|
+
function redactNetworkResult(result, redact2, keep = []) {
|
|
125473
|
+
if (redact2.names.size === 0) return result;
|
|
125474
|
+
const kept = keep.map((path77) => path77.split("."));
|
|
125475
|
+
const walk = (node2, path77) => {
|
|
125476
|
+
if (typeof node2 === "string") {
|
|
125477
|
+
return kept.some(
|
|
125478
|
+
(k) => k.length === path77.length && k.every((p, i) => p === "*" ? /^\d+$/.test(path77[i]) : p === path77[i])
|
|
125479
|
+
) ? node2 : redact2(node2);
|
|
125480
|
+
}
|
|
125481
|
+
if (Array.isArray(node2)) return node2.map((item, i) => walk(item, [...path77, String(i)]));
|
|
125482
|
+
if (node2 === null || typeof node2 !== "object") return node2;
|
|
125483
|
+
const out = {};
|
|
125484
|
+
for (const [key2, value] of Object.entries(node2)) {
|
|
125485
|
+
out[redact2(key2)] = walk(value, [...path77, key2]);
|
|
125486
|
+
}
|
|
125487
|
+
return out;
|
|
125488
|
+
};
|
|
125489
|
+
return walk(result, []);
|
|
125490
|
+
}
|
|
125491
|
+
|
|
125331
125492
|
// ../tool-server/src/blueprints/chromium-js-runtime-debugger.ts
|
|
125332
125493
|
var CHROMIUM_JS_RUNTIME_DEBUGGER_NAMESPACE = "ChromiumJsRuntimeDebugger";
|
|
125333
125494
|
function chromiumJsRuntimeDebuggerRef(device) {
|
|
@@ -125353,6 +125514,66 @@ function formatConsoleArgs(params) {
|
|
|
125353
125514
|
return `[${arg.type}]`;
|
|
125354
125515
|
}).join(" ");
|
|
125355
125516
|
}
|
|
125517
|
+
var MAX_REPLAY_KEYS = 5e4;
|
|
125518
|
+
var REPLAY_KEY_PREFIX_CHARS = 64;
|
|
125519
|
+
function replayKey(targetId, { timestamp, level, message }) {
|
|
125520
|
+
const prefix = detachedCopy(message.slice(0, REPLAY_KEY_PREFIX_CHARS));
|
|
125521
|
+
return `${targetId}|${timestamp}|${level}|${message.length}|${prefix}`;
|
|
125522
|
+
}
|
|
125523
|
+
function createReplayFilter() {
|
|
125524
|
+
const recorded = /* @__PURE__ */ new Map();
|
|
125525
|
+
const seenSinceAttach = /* @__PURE__ */ new Map();
|
|
125526
|
+
const replaying = /* @__PURE__ */ new Set();
|
|
125527
|
+
return {
|
|
125528
|
+
attached: () => {
|
|
125529
|
+
seenSinceAttach.clear();
|
|
125530
|
+
replaying.add("Runtime").add("Log");
|
|
125531
|
+
},
|
|
125532
|
+
enabled: (domain2) => {
|
|
125533
|
+
replaying.delete(domain2);
|
|
125534
|
+
},
|
|
125535
|
+
isReplay(domain2, key2) {
|
|
125536
|
+
const seen = seenSinceAttach.get(key2) ?? 0;
|
|
125537
|
+
const count2 = recorded.get(key2) ?? 0;
|
|
125538
|
+
if (replaying.has(domain2) && seen < count2) {
|
|
125539
|
+
seenSinceAttach.set(key2, seen + 1);
|
|
125540
|
+
return true;
|
|
125541
|
+
}
|
|
125542
|
+
if (count2 > 0 || recorded.size < MAX_REPLAY_KEYS) {
|
|
125543
|
+
recorded.set(key2, count2 + 1);
|
|
125544
|
+
seenSinceAttach.set(key2, seen + 1);
|
|
125545
|
+
}
|
|
125546
|
+
return false;
|
|
125547
|
+
}
|
|
125548
|
+
};
|
|
125549
|
+
}
|
|
125550
|
+
function withEntryUrl(text, { source, url: url2 }) {
|
|
125551
|
+
if (!url2 || text.includes(url2)) return text;
|
|
125552
|
+
return source === "network" ? `${url2} ${text}` : `${text} ${url2}`;
|
|
125553
|
+
}
|
|
125554
|
+
function browserLogMessage(params) {
|
|
125555
|
+
const entry = params.entry ?? {};
|
|
125556
|
+
const text = entry.text ?? "";
|
|
125557
|
+
return {
|
|
125558
|
+
args: [],
|
|
125559
|
+
level: entry.level === "verbose" ? "debug" : entry.level ?? "info",
|
|
125560
|
+
message: withEntryUrl(text, entry),
|
|
125561
|
+
timestamp: entry.timestamp ?? NaN
|
|
125562
|
+
};
|
|
125563
|
+
}
|
|
125564
|
+
function uncaughtExceptionMessage(params) {
|
|
125565
|
+
const details = params.exceptionDetails ?? {};
|
|
125566
|
+
const exception = details.exception;
|
|
125567
|
+
const thrown = exception?.description?.split("\n")[0] ?? (exception && "value" in exception ? stringifyConsoleValue(exception.value) : void 0);
|
|
125568
|
+
const text = details.text ?? "Uncaught";
|
|
125569
|
+
return {
|
|
125570
|
+
args: [],
|
|
125571
|
+
level: "error",
|
|
125572
|
+
message: thrown ? `${text} ${thrown}` : text,
|
|
125573
|
+
timestamp: params.timestamp ?? NaN,
|
|
125574
|
+
stackTrace: details.stackTrace
|
|
125575
|
+
};
|
|
125576
|
+
}
|
|
125356
125577
|
function createConsoleLogServer(consoleEvents, logWriter) {
|
|
125357
125578
|
return new Promise((resolve24, reject) => {
|
|
125358
125579
|
const server = http3.createServer();
|
|
@@ -125437,10 +125658,26 @@ var chromiumJsRuntimeDebuggerBlueprint = {
|
|
|
125437
125658
|
const logWriter = new LogFileWriter(port);
|
|
125438
125659
|
const consoleEvents = new TypedEventEmitter();
|
|
125439
125660
|
let nextLogId = 0;
|
|
125661
|
+
const replays = createReplayFilter();
|
|
125662
|
+
cdp.events.on("connected", replays.attached);
|
|
125663
|
+
cdp.events.on("domainEnabled", replays.enabled);
|
|
125664
|
+
const isReplay = (domain2, fields) => Number.isFinite(fields.timestamp) && replays.isReplay(domain2, replayKey(chromium.server.tabs.activeTargetId(), fields));
|
|
125665
|
+
const record2 = (domain2, fields, { redactSecrets: redactSecrets2 = false } = {}) => {
|
|
125666
|
+
if (isReplay(domain2, fields)) return;
|
|
125667
|
+
const message = redactSecrets2 ? networkSecretRedactor()(fields.message) : fields.message;
|
|
125668
|
+
const ts = Number.isFinite(fields.timestamp) ? fields.timestamp : Date.now();
|
|
125669
|
+
const entry = { ...fields, id: nextLogId++, message, timestamp: ts };
|
|
125670
|
+
logWriter.write({
|
|
125671
|
+
id: entry.id,
|
|
125672
|
+
timestamp: consoleTimestampToIso(ts),
|
|
125673
|
+
level: entry.level,
|
|
125674
|
+
message: entry.message,
|
|
125675
|
+
stackTrace: entry.stackTrace
|
|
125676
|
+
});
|
|
125677
|
+
consoleEvents.emit("log", entry);
|
|
125678
|
+
};
|
|
125440
125679
|
const onConsoleAPI = (params) => {
|
|
125441
|
-
|
|
125442
|
-
const entry = {
|
|
125443
|
-
id: nextLogId++,
|
|
125680
|
+
record2("Runtime", {
|
|
125444
125681
|
level: params.type,
|
|
125445
125682
|
args: params.args.map((a) => ({
|
|
125446
125683
|
type: a.type,
|
|
@@ -125448,19 +125685,19 @@ var chromiumJsRuntimeDebuggerBlueprint = {
|
|
|
125448
125685
|
description: a.description
|
|
125449
125686
|
})),
|
|
125450
125687
|
message: formatConsoleArgs(params),
|
|
125451
|
-
timestamp:
|
|
125688
|
+
timestamp: params.timestamp,
|
|
125452
125689
|
stackTrace: params.stackTrace
|
|
125453
|
-
};
|
|
125454
|
-
logWriter.write({
|
|
125455
|
-
id: entry.id,
|
|
125456
|
-
timestamp: consoleTimestampToIso(ts),
|
|
125457
|
-
level: entry.level,
|
|
125458
|
-
message: entry.message,
|
|
125459
|
-
stackTrace: entry.stackTrace
|
|
125460
125690
|
});
|
|
125461
|
-
consoleEvents.emit("log", entry);
|
|
125462
125691
|
};
|
|
125463
125692
|
cdp.events.on("consoleAPICalled", onConsoleAPI);
|
|
125693
|
+
const onBrowserEvent = (method, params) => {
|
|
125694
|
+
if (method === "Log.entryAdded") {
|
|
125695
|
+
record2("Log", browserLogMessage(params), { redactSecrets: true });
|
|
125696
|
+
} else if (method === "Runtime.exceptionThrown") {
|
|
125697
|
+
record2("Runtime", uncaughtExceptionMessage(params));
|
|
125698
|
+
}
|
|
125699
|
+
};
|
|
125700
|
+
cdp.events.on("event", onBrowserEvent);
|
|
125464
125701
|
const consoleServer = await createConsoleLogServer(consoleEvents, logWriter);
|
|
125465
125702
|
await cdp.addBinding("__argent_callback").catch(() => {
|
|
125466
125703
|
});
|
|
@@ -125487,6 +125724,9 @@ var chromiumJsRuntimeDebuggerBlueprint = {
|
|
|
125487
125724
|
api,
|
|
125488
125725
|
dispose: async () => {
|
|
125489
125726
|
cdp.events.off("consoleAPICalled", onConsoleAPI);
|
|
125727
|
+
cdp.events.off("event", onBrowserEvent);
|
|
125728
|
+
cdp.events.off("connected", replays.attached);
|
|
125729
|
+
cdp.events.off("domainEnabled", replays.enabled);
|
|
125490
125730
|
cdp.events.off("disconnected", onDisconnected);
|
|
125491
125731
|
await consoleServer.close();
|
|
125492
125732
|
const captured = logWriter.getStats().totalEntries;
|
|
@@ -125762,7 +126002,7 @@ function directCallFailure(tool, result) {
|
|
|
125762
126002
|
// ../tool-server/src/utils/argent-home-id.ts
|
|
125763
126003
|
var import_node_crypto13 = require("node:crypto");
|
|
125764
126004
|
var fs44 = __toESM(require("node:fs"));
|
|
125765
|
-
var
|
|
126005
|
+
var import_node_os10 = require("node:os");
|
|
125766
126006
|
var path39 = __toESM(require("node:path"));
|
|
125767
126007
|
init_src();
|
|
125768
126008
|
var ARGENT_HOME_HEADER = "x-argent-home";
|
|
@@ -125782,7 +126022,7 @@ function peerArgentHomeId(header) {
|
|
|
125782
126022
|
var LOOPBACK_ADDRESSES = /* @__PURE__ */ new Set(["127.0.0.1", "::1", "::ffff:127.0.0.1"]);
|
|
125783
126023
|
function isOwnAddress(address) {
|
|
125784
126024
|
const ip = address.replace(/^::ffff:(?=\d+\.\d+\.\d+\.\d+$)/, "");
|
|
125785
|
-
return Object.values((0,
|
|
126025
|
+
return Object.values((0, import_node_os10.networkInterfaces)()).some(
|
|
125786
126026
|
(list) => list?.some((a) => (a.family === "IPv4" || a.scopeid === 0) && a.address === ip)
|
|
125787
126027
|
);
|
|
125788
126028
|
}
|
|
@@ -125792,21 +126032,6 @@ function isLocalConnection(socket) {
|
|
|
125792
126032
|
return LOOPBACK_ADDRESSES.has(remote) || remote === socket.localAddress || isOwnAddress(remote);
|
|
125793
126033
|
}
|
|
125794
126034
|
|
|
125795
|
-
// ../tool-server/src/utils/received-secrets.ts
|
|
125796
|
-
var MAX_VALUES2 = 256;
|
|
125797
|
-
var received = /* @__PURE__ */ new Map();
|
|
125798
|
-
function noteReceivedSecrets(secrets) {
|
|
125799
|
-
for (const [name, value] of secrets) {
|
|
125800
|
-
if (value.length === 0) continue;
|
|
125801
|
-
received.delete(value);
|
|
125802
|
-
received.set(value, name);
|
|
125803
|
-
if (received.size > MAX_VALUES2) received.delete(received.keys().next().value);
|
|
125804
|
-
}
|
|
125805
|
-
}
|
|
125806
|
-
function receivedSecrets() {
|
|
125807
|
-
return [...received].reverse().map(([value, name]) => ({ name, value }));
|
|
125808
|
-
}
|
|
125809
|
-
|
|
125810
126035
|
// ../tool-server/src/http.ts
|
|
125811
126036
|
var AUTO_SUPPRESS_MS = 30 * 60 * 1e3;
|
|
125812
126037
|
var AUTH_TOKEN_ENV = "ARGENT_AUTH_TOKEN";
|
|
@@ -126007,13 +126232,13 @@ function checkTokenExemptAccess(req, policy) {
|
|
|
126007
126232
|
}
|
|
126008
126233
|
function interfaceAddresses() {
|
|
126009
126234
|
const out = [];
|
|
126010
|
-
for (const list of Object.values((0,
|
|
126235
|
+
for (const list of Object.values((0, import_node_os11.networkInterfaces)())) {
|
|
126011
126236
|
for (const a of list ?? []) out.push(a.address.split("%")[0]);
|
|
126012
126237
|
}
|
|
126013
126238
|
return out;
|
|
126014
126239
|
}
|
|
126015
126240
|
function machineHostnames() {
|
|
126016
|
-
const name = (0,
|
|
126241
|
+
const name = (0, import_node_os11.hostname)().toLowerCase();
|
|
126017
126242
|
if (!name) return [];
|
|
126018
126243
|
const bare = name.endsWith(".local") ? name.slice(0, -".local".length) : name;
|
|
126019
126244
|
return [bare, `${bare}.local`];
|
|
@@ -126042,7 +126267,7 @@ function createHttpApp(registry2, options) {
|
|
|
126042
126267
|
for (const [id, entry] of uploads) {
|
|
126043
126268
|
if (entry.expireAt < now) {
|
|
126044
126269
|
uploads.delete(id);
|
|
126045
|
-
(0,
|
|
126270
|
+
(0, import_promises14.rm)(entry.tarPath, { force: true }).catch(() => {
|
|
126046
126271
|
});
|
|
126047
126272
|
}
|
|
126048
126273
|
}
|
|
@@ -126170,8 +126395,8 @@ function createHttpApp(registry2, options) {
|
|
|
126170
126395
|
return;
|
|
126171
126396
|
}
|
|
126172
126397
|
const id = (0, import_node_crypto14.randomUUID)();
|
|
126173
|
-
const tarPath = (0,
|
|
126174
|
-
const ws = (0,
|
|
126398
|
+
const tarPath = (0, import_node_path16.join)((0, import_node_os11.tmpdir)(), `argent-upload-${id}.tar.gz`);
|
|
126399
|
+
const ws = (0, import_node_fs14.createWriteStream)(tarPath);
|
|
126175
126400
|
let received2 = 0;
|
|
126176
126401
|
let released = false;
|
|
126177
126402
|
const releaseInFlight = () => {
|
|
@@ -126182,7 +126407,7 @@ function createHttpApp(registry2, options) {
|
|
|
126182
126407
|
const abort = (status, message) => {
|
|
126183
126408
|
releaseInFlight();
|
|
126184
126409
|
ws.destroy();
|
|
126185
|
-
(0,
|
|
126410
|
+
(0, import_promises14.rm)(tarPath, { force: true }).catch(() => {
|
|
126186
126411
|
});
|
|
126187
126412
|
if (!res.headersSent) res.status(status).json({ error: message });
|
|
126188
126413
|
};
|
|
@@ -126209,7 +126434,7 @@ function createHttpApp(registry2, options) {
|
|
|
126209
126434
|
if (req.readableEnded) return;
|
|
126210
126435
|
releaseInFlight();
|
|
126211
126436
|
ws.destroy();
|
|
126212
|
-
(0,
|
|
126437
|
+
(0, import_promises14.rm)(tarPath, { force: true }).catch(() => {
|
|
126213
126438
|
});
|
|
126214
126439
|
});
|
|
126215
126440
|
ws.on("finish", () => {
|
|
@@ -126625,7 +126850,7 @@ function createHttpApp(registry2, options) {
|
|
|
126625
126850
|
dispose: () => {
|
|
126626
126851
|
idleTimer.dispose();
|
|
126627
126852
|
clearInterval(uploadSweeper);
|
|
126628
|
-
for (const entry of uploads.values()) (0,
|
|
126853
|
+
for (const entry of uploads.values()) (0, import_promises14.rm)(entry.tarPath, { force: true }).catch(() => {
|
|
126629
126854
|
});
|
|
126630
126855
|
uploads.clear();
|
|
126631
126856
|
},
|
|
@@ -126657,15 +126882,15 @@ function createHttpApp(registry2, options) {
|
|
|
126657
126882
|
|
|
126658
126883
|
// ../tool-server/src/event-log.ts
|
|
126659
126884
|
var import_bunyan = __toESM(require_bunyan());
|
|
126660
|
-
var
|
|
126661
|
-
var
|
|
126885
|
+
var import_node_fs15 = require("node:fs");
|
|
126886
|
+
var import_node_path17 = require("node:path");
|
|
126662
126887
|
init_src2();
|
|
126663
126888
|
function createToolServerEventLog({
|
|
126664
126889
|
filePath
|
|
126665
126890
|
}) {
|
|
126666
|
-
(0,
|
|
126667
|
-
(0,
|
|
126668
|
-
const fileStream = (0,
|
|
126891
|
+
(0, import_node_fs15.mkdirSync)((0, import_node_path17.dirname)(filePath), { recursive: true });
|
|
126892
|
+
(0, import_node_fs15.writeFileSync)(filePath, "");
|
|
126893
|
+
const fileStream = (0, import_node_fs15.createWriteStream)(filePath, { flags: "a" });
|
|
126669
126894
|
let disposed = false;
|
|
126670
126895
|
let disposePromise = null;
|
|
126671
126896
|
let streamError = null;
|
|
@@ -129451,51 +129676,6 @@ Fails if the simulator server is not running for the given UDID.`,
|
|
|
129451
129676
|
|
|
129452
129677
|
// ../tool-server/src/tools/native-devtools/native-network-logs.ts
|
|
129453
129678
|
init_zod();
|
|
129454
|
-
|
|
129455
|
-
// ../tool-server/src/tools/network/network-secrets.ts
|
|
129456
|
-
init_src();
|
|
129457
|
-
function networkSecrets(ctx) {
|
|
129458
|
-
const secrets = [];
|
|
129459
|
-
for (const [name, value] of ctx?.clientSecrets ?? []) secrets.push({ name, value });
|
|
129460
|
-
for (const source of secretSources()) {
|
|
129461
|
-
for (const [name, value] of source.values) secrets.push({ name, value });
|
|
129462
|
-
}
|
|
129463
|
-
return [...secrets, ...receivedSecrets(), ...typedSecrets()];
|
|
129464
|
-
}
|
|
129465
|
-
function networkRedactorOf(secrets) {
|
|
129466
|
-
const byValue = /* @__PURE__ */ new Map();
|
|
129467
|
-
for (const { name, value } of secrets) {
|
|
129468
|
-
if (value.length > 0 && !byValue.has(value)) byValue.set(value, name);
|
|
129469
|
-
}
|
|
129470
|
-
return secretRedactor(
|
|
129471
|
-
[...byValue].map(([value, name]) => ({ name, value })),
|
|
129472
|
-
{ wholeValues: true }
|
|
129473
|
-
);
|
|
129474
|
-
}
|
|
129475
|
-
function networkSecretRedactor(ctx) {
|
|
129476
|
-
return networkRedactorOf(networkSecrets(ctx));
|
|
129477
|
-
}
|
|
129478
|
-
function redactNetworkResult(result, redact2, keep = []) {
|
|
129479
|
-
if (redact2.names.size === 0) return result;
|
|
129480
|
-
const kept = keep.map((path77) => path77.split("."));
|
|
129481
|
-
const walk = (node2, path77) => {
|
|
129482
|
-
if (typeof node2 === "string") {
|
|
129483
|
-
return kept.some(
|
|
129484
|
-
(k) => k.length === path77.length && k.every((p, i) => p === "*" ? /^\d+$/.test(path77[i]) : p === path77[i])
|
|
129485
|
-
) ? node2 : redact2(node2);
|
|
129486
|
-
}
|
|
129487
|
-
if (Array.isArray(node2)) return node2.map((item, i) => walk(item, [...path77, String(i)]));
|
|
129488
|
-
if (node2 === null || typeof node2 !== "object") return node2;
|
|
129489
|
-
const out = {};
|
|
129490
|
-
for (const [key2, value] of Object.entries(node2)) {
|
|
129491
|
-
out[redact2(key2)] = walk(value, [...path77, key2]);
|
|
129492
|
-
}
|
|
129493
|
-
return out;
|
|
129494
|
-
};
|
|
129495
|
-
return walk(result, []);
|
|
129496
|
-
}
|
|
129497
|
-
|
|
129498
|
-
// ../tool-server/src/tools/native-devtools/native-network-logs.ts
|
|
129499
129679
|
init_src2();
|
|
129500
129680
|
init_device_info();
|
|
129501
129681
|
|
|
@@ -130390,11 +130570,11 @@ An Apple system app is rejected outright (terminal: never retry it).`,
|
|
|
130390
130570
|
init_src2();
|
|
130391
130571
|
|
|
130392
130572
|
// ../tool-server/src/utils/debugger/discovery.ts
|
|
130393
|
-
var
|
|
130573
|
+
var import_node_fs16 = require("node:fs");
|
|
130394
130574
|
init_src2();
|
|
130395
130575
|
var DECOY_VM = "don't use";
|
|
130396
130576
|
function decodeProjectRoot(raw) {
|
|
130397
|
-
if (!raw.includes("%") || (0,
|
|
130577
|
+
if (!raw.includes("%") || (0, import_node_fs16.existsSync)(raw)) return raw;
|
|
130398
130578
|
try {
|
|
130399
130579
|
return decodeURIComponent(raw);
|
|
130400
130580
|
} catch {
|
|
@@ -130639,10 +130819,10 @@ init_external_devices();
|
|
|
130639
130819
|
|
|
130640
130820
|
// ../tool-server/src/utils/debugger/runtime-device.ts
|
|
130641
130821
|
var import_node_crypto17 = require("node:crypto");
|
|
130642
|
-
var
|
|
130643
|
-
var
|
|
130822
|
+
var import_node_child_process34 = require("node:child_process");
|
|
130823
|
+
var import_node_util25 = require("node:util");
|
|
130644
130824
|
init_adb();
|
|
130645
|
-
var
|
|
130825
|
+
var execFileAsync24 = (0, import_node_util25.promisify)(import_node_child_process34.execFile);
|
|
130646
130826
|
var LOG_READ_TIMEOUT_MS = 5e3;
|
|
130647
130827
|
var RETRY_DELAY_MS = 300;
|
|
130648
130828
|
var OTHER_TRANSPORTS_GRACE_MS = 500;
|
|
@@ -130779,7 +130959,7 @@ async function simulatorLogHolds(udid, marker) {
|
|
|
130779
130959
|
"--predicate",
|
|
130780
130960
|
`eventMessage CONTAINS ${JSON.stringify(marker)} AND process != "log"`
|
|
130781
130961
|
]);
|
|
130782
|
-
const { stdout } = await
|
|
130962
|
+
const { stdout } = await execFileAsync24("xcrun", args, {
|
|
130783
130963
|
timeout: LOG_READ_TIMEOUT_MS,
|
|
130784
130964
|
killSignal: SIMCTL_KILL_SIGNAL,
|
|
130785
130965
|
encoding: "utf-8"
|
|
@@ -131424,7 +131604,7 @@ init_src2();
|
|
|
131424
131604
|
|
|
131425
131605
|
// ../tool-server/src/utils/debugger/scripts/network-interceptor.ts
|
|
131426
131606
|
var import_node_crypto18 = require("node:crypto");
|
|
131427
|
-
var
|
|
131607
|
+
var import_node_os12 = require("node:os");
|
|
131428
131608
|
init_src3();
|
|
131429
131609
|
var BINARY_BODY_TYPES = /^(image\/(?!svg)|audio\/|video\/|font\/|application\/(octet-stream|pdf|zip|gzip|wasm|x-protobuf)$)/;
|
|
131430
131610
|
var NETWORK_INTERCEPTOR_SCRIPT = `(function() {
|
|
@@ -132505,7 +132685,7 @@ var NETWORK_CAPTURE_MARK_SCRIPT = `(function() {
|
|
|
132505
132685
|
})()`;
|
|
132506
132686
|
var HOLDER = JSON.stringify((0, import_node_crypto18.randomUUID)());
|
|
132507
132687
|
function holderRecord(capturing2) {
|
|
132508
|
-
return JSON.stringify({ capturing: capturing2, pid: process.pid, host: (0,
|
|
132688
|
+
return JSON.stringify({ capturing: capturing2, pid: process.pid, host: (0, import_node_os12.hostname)() });
|
|
132509
132689
|
}
|
|
132510
132690
|
function makeNetworkCaptureControlScript(paused) {
|
|
132511
132691
|
return `(function() {
|
|
@@ -132552,7 +132732,7 @@ function exitedHolders(answer) {
|
|
|
132552
132732
|
}
|
|
132553
132733
|
return Object.keys(holders).filter((key2) => {
|
|
132554
132734
|
const { pid, host } = holders[key2];
|
|
132555
|
-
return host === (0,
|
|
132735
|
+
return host === (0, import_node_os12.hostname)() && typeof pid === "number" && !isProcessAlive(pid);
|
|
132556
132736
|
});
|
|
132557
132737
|
}
|
|
132558
132738
|
function makeNetworkLogReadScript(start2, limit, metroPort2) {
|
|
@@ -133764,25 +133944,25 @@ function clearLostProfilerRun(port, deviceId) {
|
|
|
133764
133944
|
}
|
|
133765
133945
|
|
|
133766
133946
|
// ../tool-server/src/tools/devices/boot-device.ts
|
|
133767
|
-
var
|
|
133768
|
-
var
|
|
133769
|
-
var
|
|
133947
|
+
var import_node_child_process38 = require("node:child_process");
|
|
133948
|
+
var import_node_fs20 = require("node:fs");
|
|
133949
|
+
var import_promises16 = require("node:fs/promises");
|
|
133770
133950
|
var import_node_net4 = require("node:net");
|
|
133771
|
-
var
|
|
133772
|
-
var
|
|
133773
|
-
var
|
|
133951
|
+
var import_node_os14 = require("node:os");
|
|
133952
|
+
var import_node_path21 = require("node:path");
|
|
133953
|
+
var import_node_util28 = require("node:util");
|
|
133774
133954
|
init_zod();
|
|
133775
133955
|
init_src();
|
|
133776
133956
|
init_src2();
|
|
133777
133957
|
init_adb();
|
|
133778
133958
|
|
|
133779
133959
|
// ../tool-server/src/utils/android-read-only-boots.ts
|
|
133780
|
-
var
|
|
133781
|
-
var
|
|
133960
|
+
var import_node_fs17 = __toESM(require("node:fs"));
|
|
133961
|
+
var import_node_path18 = __toESM(require("node:path"));
|
|
133782
133962
|
init_src();
|
|
133783
133963
|
var ownRecords = /* @__PURE__ */ new Map();
|
|
133784
133964
|
function recordsFilePath() {
|
|
133785
|
-
return process.env.ARGENT_ANDROID_READ_ONLY_BOOTS_FILE ??
|
|
133965
|
+
return process.env.ARGENT_ANDROID_READ_ONLY_BOOTS_FILE ?? import_node_path18.default.join(argentHomeDir(), "android-read-only-boots.json");
|
|
133786
133966
|
}
|
|
133787
133967
|
function isRecord5(value) {
|
|
133788
133968
|
const v = value;
|
|
@@ -133790,7 +133970,7 @@ function isRecord5(value) {
|
|
|
133790
133970
|
}
|
|
133791
133971
|
function loadPersisted() {
|
|
133792
133972
|
try {
|
|
133793
|
-
const raw = JSON.parse(
|
|
133973
|
+
const raw = JSON.parse(import_node_fs17.default.readFileSync(recordsFilePath(), "utf8"));
|
|
133794
133974
|
if (typeof raw !== "object" || raw === null) return /* @__PURE__ */ new Map();
|
|
133795
133975
|
return new Map(
|
|
133796
133976
|
Object.entries(raw).filter((e) => isRecord5(e[1]))
|
|
@@ -133804,8 +133984,8 @@ function persist(mutate) {
|
|
|
133804
133984
|
const file2 = recordsFilePath();
|
|
133805
133985
|
const records = loadPersisted();
|
|
133806
133986
|
mutate(records);
|
|
133807
|
-
|
|
133808
|
-
|
|
133987
|
+
import_node_fs17.default.mkdirSync(import_node_path18.default.dirname(file2), { recursive: true });
|
|
133988
|
+
import_node_fs17.default.writeFileSync(file2, JSON.stringify(Object.fromEntries(records)));
|
|
133809
133989
|
} catch {
|
|
133810
133990
|
}
|
|
133811
133991
|
}
|
|
@@ -133833,11 +134013,11 @@ function readOnlyBootEntries() {
|
|
|
133833
134013
|
}
|
|
133834
134014
|
|
|
133835
134015
|
// ../tool-server/src/utils/emulator-process.ts
|
|
133836
|
-
var
|
|
133837
|
-
var
|
|
133838
|
-
var
|
|
133839
|
-
var
|
|
133840
|
-
var
|
|
134016
|
+
var import_node_child_process35 = require("node:child_process");
|
|
134017
|
+
var import_node_fs18 = require("node:fs");
|
|
134018
|
+
var import_promises15 = require("node:fs/promises");
|
|
134019
|
+
var import_node_util26 = require("node:util");
|
|
134020
|
+
var execFileAsync25 = (0, import_node_util26.promisify)(import_node_child_process35.execFile);
|
|
133841
134021
|
var EMULATOR_PROCESS_RE = /(?:^|\/)(?:qemu-system-[\w-]+|emulator|emulator64-[\w-]+)\s/;
|
|
133842
134022
|
function escapeRegExp(value) {
|
|
133843
134023
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -133868,7 +134048,7 @@ async function listEmulatorProcessesForAvd(avdName) {
|
|
|
133868
134048
|
async function readEmulatorProcessesForAvd(avdName) {
|
|
133869
134049
|
if (process.platform === "win32") return null;
|
|
133870
134050
|
try {
|
|
133871
|
-
const { stdout } = await
|
|
134051
|
+
const { stdout } = await execFileAsync25(PS_BIN, [...PS_ARGS_WITH_PID], {
|
|
133872
134052
|
timeout: 5e3,
|
|
133873
134053
|
maxBuffer: 16 * 1024 * 1024
|
|
133874
134054
|
});
|
|
@@ -133881,14 +134061,14 @@ async function readEmulatorProcessesForAvd(avdName) {
|
|
|
133881
134061
|
return null;
|
|
133882
134062
|
}
|
|
133883
134063
|
}
|
|
133884
|
-
var LSOF_BIN = ["/usr/sbin/lsof", "/usr/bin/lsof"].find((p) => (0,
|
|
134064
|
+
var LSOF_BIN = ["/usr/sbin/lsof", "/usr/bin/lsof"].find((p) => (0, import_node_fs18.existsSync)(p)) ?? "lsof";
|
|
133885
134065
|
async function consoleOwnership(serial, ownPid) {
|
|
133886
134066
|
const port = serial.match(/^emulator-(\d+)$/)?.[1];
|
|
133887
134067
|
if (port === void 0 || process.platform === "win32") return "unavailable";
|
|
133888
134068
|
let listener;
|
|
133889
134069
|
let parentOf = null;
|
|
133890
134070
|
try {
|
|
133891
|
-
const { stdout } = await
|
|
134071
|
+
const { stdout } = await execFileAsync25(
|
|
133892
134072
|
LSOF_BIN,
|
|
133893
134073
|
["-nP", `-iTCP:${port}`, "-sTCP:LISTEN", "-Fp"],
|
|
133894
134074
|
{ timeout: 3e3 }
|
|
@@ -133937,7 +134117,7 @@ async function procConsoleListener(port) {
|
|
|
133937
134117
|
let read = false;
|
|
133938
134118
|
for (const table of ["/proc/net/tcp", "/proc/net/tcp6"]) {
|
|
133939
134119
|
try {
|
|
133940
|
-
for (const i of parseProcNetTcpListeners(await (0,
|
|
134120
|
+
for (const i of parseProcNetTcpListeners(await (0, import_promises15.readFile)(table, "utf8"), port)) inodes.add(i);
|
|
133941
134121
|
read = true;
|
|
133942
134122
|
} catch {
|
|
133943
134123
|
}
|
|
@@ -133947,19 +134127,19 @@ async function procConsoleListener(port) {
|
|
|
133947
134127
|
const targets = new Set([...inodes].map((i) => `socket:[${i}]`));
|
|
133948
134128
|
let pids;
|
|
133949
134129
|
try {
|
|
133950
|
-
pids = (await (0,
|
|
134130
|
+
pids = (await (0, import_promises15.readdir)("/proc")).filter((d) => /^\d+$/.test(d));
|
|
133951
134131
|
} catch {
|
|
133952
134132
|
return null;
|
|
133953
134133
|
}
|
|
133954
134134
|
for (const pid of pids) {
|
|
133955
134135
|
let fds;
|
|
133956
134136
|
try {
|
|
133957
|
-
fds = await (0,
|
|
134137
|
+
fds = await (0, import_promises15.readdir)(`/proc/${pid}/fd`);
|
|
133958
134138
|
} catch {
|
|
133959
134139
|
continue;
|
|
133960
134140
|
}
|
|
133961
134141
|
for (const fd of fds) {
|
|
133962
|
-
const link = await (0,
|
|
134142
|
+
const link = await (0, import_promises15.readlink)(`/proc/${pid}/fd/${fd}`).catch(() => "");
|
|
133963
134143
|
if (targets.has(link)) return parseInt(pid, 10);
|
|
133964
134144
|
}
|
|
133965
134145
|
}
|
|
@@ -133967,7 +134147,7 @@ async function procConsoleListener(port) {
|
|
|
133967
134147
|
}
|
|
133968
134148
|
async function procParentPid(pid) {
|
|
133969
134149
|
try {
|
|
133970
|
-
const stat11 = await (0,
|
|
134150
|
+
const stat11 = await (0, import_promises15.readFile)(`/proc/${pid}/stat`, "utf8");
|
|
133971
134151
|
const ppid = stat11.slice(stat11.lastIndexOf(")") + 2).split(" ")[1];
|
|
133972
134152
|
return ppid === void 0 ? null : parseInt(ppid, 10);
|
|
133973
134153
|
} catch {
|
|
@@ -133993,7 +134173,7 @@ function isDescendantOf(pid, ancestor, parents) {
|
|
|
133993
134173
|
}
|
|
133994
134174
|
async function readParentPids() {
|
|
133995
134175
|
try {
|
|
133996
|
-
const { stdout } = await
|
|
134176
|
+
const { stdout } = await execFileAsync25(PS_BIN, ["-A", "-o", "pid=,ppid="], {
|
|
133997
134177
|
timeout: 5e3,
|
|
133998
134178
|
maxBuffer: 16 * 1024 * 1024
|
|
133999
134179
|
});
|
|
@@ -134005,8 +134185,8 @@ async function readParentPids() {
|
|
|
134005
134185
|
|
|
134006
134186
|
// ../tool-server/src/utils/linux-preflight.ts
|
|
134007
134187
|
var fs48 = __toESM(require("node:fs"));
|
|
134008
|
-
var
|
|
134009
|
-
var
|
|
134188
|
+
var import_node_os13 = require("node:os");
|
|
134189
|
+
var import_node_path19 = require("node:path");
|
|
134010
134190
|
var import_ini2 = __toESM(require_ini());
|
|
134011
134191
|
function linuxBootDiagnostics(avdName) {
|
|
134012
134192
|
if (process.platform !== "linux") return null;
|
|
@@ -134034,7 +134214,7 @@ function checkKvm() {
|
|
|
134034
134214
|
var MIN_RAM_MB = 4096;
|
|
134035
134215
|
var MIN_HEAP_MB = 512;
|
|
134036
134216
|
function checkAvdSizing(avdName) {
|
|
134037
|
-
const configPath = (0,
|
|
134217
|
+
const configPath = (0, import_node_path19.join)((0, import_node_os13.homedir)(), ".android", "avd", `${avdName}.avd`, "config.ini");
|
|
134038
134218
|
let content;
|
|
134039
134219
|
try {
|
|
134040
134220
|
content = fs48.readFileSync(configPath, "utf8");
|
|
@@ -134068,22 +134248,22 @@ function readMb(config2, key2) {
|
|
|
134068
134248
|
}
|
|
134069
134249
|
|
|
134070
134250
|
// ../tool-server/src/utils/simulator-app-launch.ts
|
|
134071
|
-
var
|
|
134072
|
-
var
|
|
134073
|
-
var
|
|
134074
|
-
var
|
|
134251
|
+
var import_node_child_process36 = require("node:child_process");
|
|
134252
|
+
var import_node_fs19 = __toESM(require("node:fs"));
|
|
134253
|
+
var import_node_path20 = __toESM(require("node:path"));
|
|
134254
|
+
var import_node_util27 = require("node:util");
|
|
134075
134255
|
init_src();
|
|
134076
|
-
var
|
|
134256
|
+
var execFileAsync26 = (0, import_node_util27.promisify)(import_node_child_process36.execFile);
|
|
134077
134257
|
var CORE_SIMULATOR_INFO_PLIST = "/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/Resources/Info.plist";
|
|
134078
134258
|
var LAUNCH_WATCH_MS = 1e4;
|
|
134079
134259
|
var LAUNCH_POLL_MS = 250;
|
|
134080
134260
|
var launchLocks = /* @__PURE__ */ new Map();
|
|
134081
134261
|
function verdictFilePath() {
|
|
134082
|
-
return
|
|
134262
|
+
return import_node_path20.default.join(argentHomeDir(), "simulator-app-launch.json");
|
|
134083
134263
|
}
|
|
134084
134264
|
function loadVerdicts() {
|
|
134085
134265
|
try {
|
|
134086
|
-
const parsed2 = JSON.parse(
|
|
134266
|
+
const parsed2 = JSON.parse(import_node_fs19.default.readFileSync(verdictFilePath(), "utf8"));
|
|
134087
134267
|
return parsed2 && typeof parsed2 === "object" ? parsed2 : {};
|
|
134088
134268
|
} catch {
|
|
134089
134269
|
return {};
|
|
@@ -134091,18 +134271,18 @@ function loadVerdicts() {
|
|
|
134091
134271
|
}
|
|
134092
134272
|
function persistVerdict(key2, verdict) {
|
|
134093
134273
|
const filePath = verdictFilePath();
|
|
134094
|
-
|
|
134274
|
+
import_node_fs19.default.mkdirSync(import_node_path20.default.dirname(filePath), { recursive: true });
|
|
134095
134275
|
const tmpPath = `${filePath}.${process.pid}.tmp`;
|
|
134096
134276
|
try {
|
|
134097
|
-
|
|
134098
|
-
|
|
134277
|
+
import_node_fs19.default.writeFileSync(tmpPath, JSON.stringify({ ...loadVerdicts(), [key2]: verdict }, null, 2));
|
|
134278
|
+
import_node_fs19.default.renameSync(tmpPath, filePath);
|
|
134099
134279
|
} catch (err) {
|
|
134100
|
-
|
|
134280
|
+
import_node_fs19.default.rmSync(tmpPath, { force: true });
|
|
134101
134281
|
throw err;
|
|
134102
134282
|
}
|
|
134103
134283
|
}
|
|
134104
134284
|
async function bundleVersion(infoPlist) {
|
|
134105
|
-
const { stdout } = await
|
|
134285
|
+
const { stdout } = await execFileAsync26(
|
|
134106
134286
|
"plutil",
|
|
134107
134287
|
["-extract", "CFBundleVersion", "raw", "-o", "-", infoPlist],
|
|
134108
134288
|
{ timeout: 5e3 }
|
|
@@ -134111,14 +134291,14 @@ async function bundleVersion(infoPlist) {
|
|
|
134111
134291
|
}
|
|
134112
134292
|
async function launchKey(simulatorApp) {
|
|
134113
134293
|
const [appBuild, coreSimulatorBuild] = await Promise.all([
|
|
134114
|
-
bundleVersion(
|
|
134294
|
+
bundleVersion(import_node_path20.default.join(simulatorApp, "Contents", "Info.plist")),
|
|
134115
134295
|
bundleVersion(CORE_SIMULATOR_INFO_PLIST)
|
|
134116
134296
|
]);
|
|
134117
134297
|
return `${simulatorApp} ${appBuild} / CoreSimulator ${coreSimulatorBuild}`;
|
|
134118
134298
|
}
|
|
134119
134299
|
var comparablePath = (p) => p.normalize("NFC").toLowerCase();
|
|
134120
134300
|
async function runningExecutables() {
|
|
134121
|
-
const { stdout } = await
|
|
134301
|
+
const { stdout } = await execFileAsync26(PS_BIN, ["-xo", "comm="], {
|
|
134122
134302
|
timeout: 5e3,
|
|
134123
134303
|
env: { ...process.env, LC_ALL: "en_US.UTF-8" }
|
|
134124
134304
|
});
|
|
@@ -134142,7 +134322,7 @@ function launchSimulatorApp(simulatorApp, launch) {
|
|
|
134142
134322
|
}
|
|
134143
134323
|
const verdict = loadVerdicts()[key2];
|
|
134144
134324
|
if (verdict === "crashes") return false;
|
|
134145
|
-
const executable =
|
|
134325
|
+
const executable = import_node_path20.default.join(simulatorApp, "Contents", "MacOS", "Simulator");
|
|
134146
134326
|
const watch = verdict !== "runs" && !await runningExecutables().then((running) => running.some(isSimulatorApp)).catch(() => true);
|
|
134147
134327
|
await launch();
|
|
134148
134328
|
if (!watch) return true;
|
|
@@ -134183,7 +134363,7 @@ init_capability();
|
|
|
134183
134363
|
init_harmony_flag();
|
|
134184
134364
|
|
|
134185
134365
|
// ../tool-server/src/tools/devices/boot-electron.ts
|
|
134186
|
-
var
|
|
134366
|
+
var import_node_child_process37 = require("node:child_process");
|
|
134187
134367
|
var fs50 = __toESM(require("node:fs"));
|
|
134188
134368
|
var path44 = __toESM(require("node:path"));
|
|
134189
134369
|
init_src2();
|
|
@@ -134379,7 +134559,7 @@ async function bootElectronApp(options) {
|
|
|
134379
134559
|
];
|
|
134380
134560
|
let child;
|
|
134381
134561
|
try {
|
|
134382
|
-
child = (0,
|
|
134562
|
+
child = (0, import_node_child_process37.spawn)(launcher.command, args, {
|
|
134383
134563
|
detached: true,
|
|
134384
134564
|
// stdout is discarded, not piped: nothing reads it, and an unread pipe
|
|
134385
134565
|
// blocks the child's writes once the OS buffer fills. The
|
|
@@ -134542,7 +134722,7 @@ async function bootMacosApp(registry2, opts) {
|
|
|
134542
134722
|
}
|
|
134543
134723
|
|
|
134544
134724
|
// ../tool-server/src/tools/devices/boot-device.ts
|
|
134545
|
-
var
|
|
134725
|
+
var execFileAsync27 = (0, import_node_util28.promisify)(import_node_child_process38.execFile);
|
|
134546
134726
|
function bootTarget(params) {
|
|
134547
134727
|
return params.udid ?? params.avdName ?? params.vvdImage ?? params.harmonyInstance ?? params.electronAppPath ?? params.macosAppPath ?? "device";
|
|
134548
134728
|
}
|
|
@@ -134784,7 +134964,7 @@ async function pickOwnSerial(avdName, newSerials, ownPid) {
|
|
|
134784
134964
|
}
|
|
134785
134965
|
async function bootSimctl(prefix, [sub, udid, ...rest], timeoutMs) {
|
|
134786
134966
|
try {
|
|
134787
|
-
await
|
|
134967
|
+
await execFileAsync27("xcrun", [...prefix, sub, udid, ...rest], {
|
|
134788
134968
|
timeout: timeoutMs,
|
|
134789
134969
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
134790
134970
|
});
|
|
@@ -134893,7 +135073,7 @@ async function bootIos(udid, registry2, force, headless, prepareOnly) {
|
|
|
134893
135073
|
return buildInitFailedResult(udid, initFailure);
|
|
134894
135074
|
}
|
|
134895
135075
|
if (!deviceSet) {
|
|
134896
|
-
await
|
|
135076
|
+
await execFileAsync27("defaults", [
|
|
134897
135077
|
"write",
|
|
134898
135078
|
"com.apple.iphonesimulator",
|
|
134899
135079
|
"CurrentDeviceUDID",
|
|
@@ -134909,20 +135089,20 @@ async function bootIos(udid, registry2, force, headless, prepareOnly) {
|
|
|
134909
135089
|
}
|
|
134910
135090
|
async function openSimulatorWindow(udid) {
|
|
134911
135091
|
const timeout = 5e3;
|
|
134912
|
-
const { stdout } = await
|
|
134913
|
-
const developerDir2 = (0,
|
|
134914
|
-
const simulatorApp = (0,
|
|
134915
|
-
if ((0,
|
|
135092
|
+
const { stdout } = await execFileAsync27("xcode-select", ["-p"], { timeout });
|
|
135093
|
+
const developerDir2 = (0, import_node_fs20.realpathSync)(stdout.trim());
|
|
135094
|
+
const simulatorApp = (0, import_node_path21.join)(developerDir2, "Applications", "Simulator.app");
|
|
135095
|
+
if ((0, import_node_fs20.existsSync)(simulatorApp)) {
|
|
134916
135096
|
const launched = await launchSimulatorApp(
|
|
134917
135097
|
simulatorApp,
|
|
134918
|
-
() =>
|
|
135098
|
+
() => execFileAsync27("open", ["-a", simulatorApp], { timeout })
|
|
134919
135099
|
);
|
|
134920
135100
|
return launched ? void 0 : `${simulatorApp} exits right after launch on this host, so Argent no longer opens it and the device runs without a window. Delete ${verdictFilePath()} to try opening it again.`;
|
|
134921
135101
|
}
|
|
134922
|
-
const deviceHubApp = (0,
|
|
134923
|
-
if ((0,
|
|
135102
|
+
const deviceHubApp = (0, import_node_path21.join)(developerDir2, "..", "Applications", "DeviceHub.app");
|
|
135103
|
+
if ((0, import_node_fs20.existsSync)(deviceHubApp)) {
|
|
134924
135104
|
const url2 = `devices://device/open?id=${encodeURIComponent(udid)}`;
|
|
134925
|
-
await
|
|
135105
|
+
await execFileAsync27("open", ["-a", deviceHubApp, url2], { timeout });
|
|
134926
135106
|
}
|
|
134927
135107
|
}
|
|
134928
135108
|
async function bootIosRemote(id, registry2, force) {
|
|
@@ -135010,18 +135190,18 @@ async function attemptBoot(params) {
|
|
|
135010
135190
|
const portArg = params.emulatorArgs.indexOf("-port");
|
|
135011
135191
|
const instance = portArg >= 0 ? `${params.avdName}-${params.emulatorArgs[portArg + 1]}` : params.avdName;
|
|
135012
135192
|
const safeName = instance.replace(/[^\w.-]/g, "_");
|
|
135013
|
-
const logPath = (0,
|
|
135014
|
-
emulatorLogFd = (0,
|
|
135193
|
+
const logPath = (0, import_node_path21.join)((0, import_node_os14.tmpdir)(), `argent-emulator-${safeName}.log`);
|
|
135194
|
+
emulatorLogFd = (0, import_node_fs20.openSync)(logPath, "w");
|
|
135015
135195
|
stdio = ["ignore", emulatorLogFd, emulatorLogFd];
|
|
135016
135196
|
}
|
|
135017
|
-
const child = (0,
|
|
135197
|
+
const child = (0, import_node_child_process38.spawn)(params.emulatorBinary, params.emulatorArgs, {
|
|
135018
135198
|
detached: true,
|
|
135019
135199
|
stdio
|
|
135020
135200
|
});
|
|
135021
135201
|
child.unref();
|
|
135022
135202
|
if (emulatorLogFd !== void 0) {
|
|
135023
135203
|
try {
|
|
135024
|
-
(0,
|
|
135204
|
+
(0, import_node_fs20.closeSync)(emulatorLogFd);
|
|
135025
135205
|
} catch {
|
|
135026
135206
|
}
|
|
135027
135207
|
}
|
|
@@ -135758,11 +135938,11 @@ async function startHarmonyEmulator(instanceName) {
|
|
|
135758
135938
|
});
|
|
135759
135939
|
}
|
|
135760
135940
|
try {
|
|
135761
|
-
for (const entry of (0,
|
|
135941
|
+
for (const entry of (0, import_node_fs20.readdirSync)((0, import_node_os14.tmpdir)())) {
|
|
135762
135942
|
if (!entry.startsWith("argent-harmony-") || !entry.endsWith(".log")) continue;
|
|
135763
135943
|
try {
|
|
135764
|
-
if (Date.now() - (0,
|
|
135765
|
-
(0,
|
|
135944
|
+
if (Date.now() - (0, import_node_fs20.statSync)((0, import_node_path21.join)((0, import_node_os14.tmpdir)(), entry)).mtimeMs > HARMONY_LOG_TTL_MS) {
|
|
135945
|
+
(0, import_node_fs20.rmSync)((0, import_node_path21.join)((0, import_node_os14.tmpdir)(), entry), { force: true });
|
|
135766
135946
|
}
|
|
135767
135947
|
} catch {
|
|
135768
135948
|
}
|
|
@@ -135770,21 +135950,21 @@ async function startHarmonyEmulator(instanceName) {
|
|
|
135770
135950
|
} catch {
|
|
135771
135951
|
}
|
|
135772
135952
|
const safeName = instanceName.replace(/[^\w.-]/g, (c) => `%${c.codePointAt(0).toString(16)}`);
|
|
135773
|
-
const logPath = (0,
|
|
135953
|
+
const logPath = (0, import_node_path21.join)((0, import_node_os14.tmpdir)(), `argent-harmony-${safeName}-${process.hrtime.bigint()}.log`);
|
|
135774
135954
|
let logFd;
|
|
135775
135955
|
try {
|
|
135776
|
-
logFd = (0,
|
|
135956
|
+
logFd = (0, import_node_fs20.openSync)(logPath, "w");
|
|
135777
135957
|
} catch {
|
|
135778
135958
|
logFd = null;
|
|
135779
135959
|
}
|
|
135780
|
-
const child = (0,
|
|
135960
|
+
const child = (0, import_node_child_process38.spawn)(bin, ["-start", instanceName], {
|
|
135781
135961
|
detached: true,
|
|
135782
135962
|
stdio: logFd === null ? "ignore" : ["ignore", logFd, logFd]
|
|
135783
135963
|
});
|
|
135784
135964
|
child.unref();
|
|
135785
135965
|
if (logFd !== null) {
|
|
135786
135966
|
try {
|
|
135787
|
-
(0,
|
|
135967
|
+
(0, import_node_fs20.closeSync)(logFd);
|
|
135788
135968
|
} catch {
|
|
135789
135969
|
}
|
|
135790
135970
|
}
|
|
@@ -135793,7 +135973,7 @@ async function startHarmonyEmulator(instanceName) {
|
|
|
135793
135973
|
if (exit) return;
|
|
135794
135974
|
let output2 = "";
|
|
135795
135975
|
try {
|
|
135796
|
-
output2 = (0,
|
|
135976
|
+
output2 = (0, import_node_fs20.readFileSync)(logPath, "utf8");
|
|
135797
135977
|
} catch {
|
|
135798
135978
|
}
|
|
135799
135979
|
exit = { reason: reason2, output: output2 };
|
|
@@ -135877,7 +136057,7 @@ async function waitForHarmonyTarget(before, deadline, checkAlive, expected) {
|
|
|
135877
136057
|
}
|
|
135878
136058
|
}
|
|
135879
136059
|
async function waitForHarmonyDrivable(connectKey, deadline, checkAlive) {
|
|
135880
|
-
const probePath = (0,
|
|
136060
|
+
const probePath = (0, import_node_path21.join)((0, import_node_os14.tmpdir)(), `argent-harmony-bootprobe-${process.hrtime.bigint()}.json`);
|
|
135881
136061
|
let inFlight4 = null;
|
|
135882
136062
|
try {
|
|
135883
136063
|
for (; ; ) {
|
|
@@ -135904,7 +136084,7 @@ async function waitForHarmonyDrivable(connectKey, deadline, checkAlive) {
|
|
|
135904
136084
|
await new Promise((r) => setTimeout(r, Math.min(HARMONY_TARGET_POLL_MS, remaining)));
|
|
135905
136085
|
}
|
|
135906
136086
|
} finally {
|
|
135907
|
-
const remove = () => (0,
|
|
136087
|
+
const remove = () => (0, import_promises16.rm)(probePath, { force: true }).catch(() => {
|
|
135908
136088
|
});
|
|
135909
136089
|
if (inFlight4) void inFlight4.then(remove);
|
|
135910
136090
|
else await remove();
|
|
@@ -136367,8 +136547,8 @@ function dispatchByPlatform(opts) {
|
|
|
136367
136547
|
}
|
|
136368
136548
|
|
|
136369
136549
|
// ../tool-server/src/tools/launch-app/platforms/ios.ts
|
|
136370
|
-
var
|
|
136371
|
-
var
|
|
136550
|
+
var import_node_child_process39 = require("node:child_process");
|
|
136551
|
+
var import_node_util29 = require("node:util");
|
|
136372
136552
|
init_src2();
|
|
136373
136553
|
init_external_devices();
|
|
136374
136554
|
|
|
@@ -136402,7 +136582,7 @@ async function awaitIosAppInFront(registry2, device, bundleId, signal) {
|
|
|
136402
136582
|
}
|
|
136403
136583
|
|
|
136404
136584
|
// ../tool-server/src/tools/launch-app/platforms/ios.ts
|
|
136405
|
-
var
|
|
136585
|
+
var execFileAsync28 = (0, import_node_util29.promisify)(import_node_child_process39.execFile);
|
|
136406
136586
|
function makeIosImpl(registry2) {
|
|
136407
136587
|
return {
|
|
136408
136588
|
requires: ["xcrun"],
|
|
@@ -136418,7 +136598,7 @@ function makeIosImpl(registry2) {
|
|
|
136418
136598
|
}
|
|
136419
136599
|
if (params.launchArgs?.length) {
|
|
136420
136600
|
try {
|
|
136421
|
-
await
|
|
136601
|
+
await execFileAsync28(
|
|
136422
136602
|
"xcrun",
|
|
136423
136603
|
await simctlArgsForUdid(params.udid, ["terminate", params.udid, params.bundleId]),
|
|
136424
136604
|
{ timeout: 15e3, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -136441,7 +136621,7 @@ function makeIosImpl(registry2) {
|
|
|
136441
136621
|
}
|
|
136442
136622
|
await accessibility;
|
|
136443
136623
|
try {
|
|
136444
|
-
await
|
|
136624
|
+
await execFileAsync28(
|
|
136445
136625
|
"xcrun",
|
|
136446
136626
|
await simctlArgsForUdid(params.udid, [
|
|
136447
136627
|
"launch",
|
|
@@ -136950,11 +137130,11 @@ init_zod();
|
|
|
136950
137130
|
init_device_info();
|
|
136951
137131
|
|
|
136952
137132
|
// ../tool-server/src/tools/restart-app/platforms/ios.ts
|
|
136953
|
-
var
|
|
136954
|
-
var
|
|
137133
|
+
var import_node_child_process40 = require("node:child_process");
|
|
137134
|
+
var import_node_util30 = require("node:util");
|
|
136955
137135
|
init_src2();
|
|
136956
137136
|
init_external_devices();
|
|
136957
|
-
var
|
|
137137
|
+
var execFileAsync29 = (0, import_node_util30.promisify)(import_node_child_process40.execFile);
|
|
136958
137138
|
function makeIosImpl2(registry2) {
|
|
136959
137139
|
return {
|
|
136960
137140
|
requires: ["xcrun"],
|
|
@@ -136970,7 +137150,7 @@ function makeIosImpl2(registry2) {
|
|
|
136970
137150
|
accessibility = enableAppAccessibilityBeforeLaunch(device);
|
|
136971
137151
|
}
|
|
136972
137152
|
try {
|
|
136973
|
-
await
|
|
137153
|
+
await execFileAsync29("xcrun", await simctlArgsForUdid(udid, ["terminate", udid, bundleId]), {
|
|
136974
137154
|
timeout: 15e3,
|
|
136975
137155
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
136976
137156
|
});
|
|
@@ -136991,7 +137171,7 @@ function makeIosImpl2(registry2) {
|
|
|
136991
137171
|
}
|
|
136992
137172
|
await accessibility;
|
|
136993
137173
|
try {
|
|
136994
|
-
await
|
|
137174
|
+
await execFileAsync29(
|
|
136995
137175
|
"xcrun",
|
|
136996
137176
|
await simctlArgsForUdid(udid, ["launch", udid, bundleId, ...params.launchArgs ?? []]),
|
|
136997
137177
|
{ timeout: 3e4, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -137238,12 +137418,12 @@ Use when you need a clean in-memory app state without reinstalling. Returns { re
|
|
|
137238
137418
|
}
|
|
137239
137419
|
|
|
137240
137420
|
// ../tool-server/src/tools/terminate-app/index.ts
|
|
137241
|
-
var
|
|
137242
|
-
var
|
|
137421
|
+
var import_node_child_process41 = require("node:child_process");
|
|
137422
|
+
var import_node_util31 = require("node:util");
|
|
137243
137423
|
init_zod();
|
|
137244
137424
|
init_src2();
|
|
137245
137425
|
init_adb();
|
|
137246
|
-
var
|
|
137426
|
+
var execFileAsync30 = (0, import_node_util31.promisify)(import_node_child_process41.execFile);
|
|
137247
137427
|
var capability5 = {
|
|
137248
137428
|
apple: { simulator: true },
|
|
137249
137429
|
appleRemote: { simulator: true },
|
|
@@ -137277,7 +137457,7 @@ Succeeds when the app is not running or not installed.`,
|
|
|
137277
137457
|
requires: ["xcrun"],
|
|
137278
137458
|
handler: async (_services, { udid, bundleId }) => {
|
|
137279
137459
|
const args = await simctlArgsForUdid(udid, ["terminate", udid, bundleId]);
|
|
137280
|
-
const terminate =
|
|
137460
|
+
const terminate = execFileAsync30("xcrun", args, {
|
|
137281
137461
|
timeout: 15e3,
|
|
137282
137462
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
137283
137463
|
}).catch((err) => {
|
|
@@ -137332,26 +137512,26 @@ Succeeds when the app is not running or not installed.`,
|
|
|
137332
137512
|
init_zod();
|
|
137333
137513
|
|
|
137334
137514
|
// ../tool-server/src/tools/reinstall-app/platforms/ios.ts
|
|
137335
|
-
var
|
|
137336
|
-
var
|
|
137337
|
-
var
|
|
137515
|
+
var import_node_child_process43 = require("node:child_process");
|
|
137516
|
+
var import_node_util33 = require("node:util");
|
|
137517
|
+
var import_node_path23 = require("node:path");
|
|
137338
137518
|
init_src2();
|
|
137339
137519
|
|
|
137340
137520
|
// ../tool-server/src/tools/reinstall-app/validate-app.ts
|
|
137341
|
-
var
|
|
137342
|
-
var
|
|
137343
|
-
var
|
|
137344
|
-
var
|
|
137521
|
+
var import_node_child_process42 = require("node:child_process");
|
|
137522
|
+
var import_promises18 = require("node:fs/promises");
|
|
137523
|
+
var import_node_path22 = require("node:path");
|
|
137524
|
+
var import_node_util32 = require("node:util");
|
|
137345
137525
|
init_capability();
|
|
137346
137526
|
|
|
137347
137527
|
// ../tool-server/src/utils/apk-package.ts
|
|
137348
|
-
var
|
|
137528
|
+
var import_promises17 = require("node:fs/promises");
|
|
137349
137529
|
var import_node_zlib2 = require("node:zlib");
|
|
137350
137530
|
async function readApkPackageName(apkPath) {
|
|
137351
137531
|
return parseManifestPackage(await readZipEntry(apkPath, "AndroidManifest.xml"));
|
|
137352
137532
|
}
|
|
137353
137533
|
async function readZipEntry(zipPath, entryName) {
|
|
137354
|
-
const file2 = await (0,
|
|
137534
|
+
const file2 = await (0, import_promises17.open)(zipPath, "r");
|
|
137355
137535
|
try {
|
|
137356
137536
|
const read = async (position, length) => {
|
|
137357
137537
|
const buf = Buffer.alloc(length);
|
|
@@ -137440,9 +137620,9 @@ function readStringPool(xml, chunk) {
|
|
|
137440
137620
|
}
|
|
137441
137621
|
|
|
137442
137622
|
// ../tool-server/src/tools/reinstall-app/validate-app.ts
|
|
137443
|
-
var
|
|
137623
|
+
var execFileAsync31 = (0, import_node_util32.promisify)(import_node_child_process42.execFile);
|
|
137444
137624
|
async function requirePath(absolute, kind, what) {
|
|
137445
|
-
const info = await (0,
|
|
137625
|
+
const info = await (0, import_promises18.stat)(absolute).catch(() => null);
|
|
137446
137626
|
if (!info) {
|
|
137447
137627
|
throw new InvalidToolInputError(`appPath ${absolute} does not exist. Nothing was uninstalled.`);
|
|
137448
137628
|
}
|
|
@@ -137457,14 +137637,14 @@ function mismatch(bundleId, absolute, actual) {
|
|
|
137457
137637
|
}
|
|
137458
137638
|
async function assertIosAppBundle(absolute, bundleId, { readBundleId = true } = {}) {
|
|
137459
137639
|
await requirePath(absolute, "directory", "an .app bundle directory");
|
|
137460
|
-
const infoPlist = (0,
|
|
137461
|
-
if (!(await (0,
|
|
137640
|
+
const infoPlist = (0, import_node_path22.join)(absolute, "Info.plist");
|
|
137641
|
+
if (!(await (0, import_promises18.stat)(infoPlist).catch(() => null))?.isFile()) {
|
|
137462
137642
|
throw new InvalidToolInputError(
|
|
137463
137643
|
`appPath ${absolute} has no Info.plist, so it is not an iOS .app bundle. Nothing was uninstalled.`
|
|
137464
137644
|
);
|
|
137465
137645
|
}
|
|
137466
137646
|
if (!readBundleId) return;
|
|
137467
|
-
const actual = await
|
|
137647
|
+
const actual = await execFileAsync31("plutil", [
|
|
137468
137648
|
"-extract",
|
|
137469
137649
|
"CFBundleIdentifier",
|
|
137470
137650
|
"raw",
|
|
@@ -137517,16 +137697,16 @@ async function assertHap(absolute, bundleName) {
|
|
|
137517
137697
|
}
|
|
137518
137698
|
|
|
137519
137699
|
// ../tool-server/src/tools/reinstall-app/platforms/ios.ts
|
|
137520
|
-
var
|
|
137700
|
+
var execFileAsync32 = (0, import_node_util33.promisify)(import_node_child_process43.execFile);
|
|
137521
137701
|
var iosImpl = {
|
|
137522
137702
|
requires: ["xcrun"],
|
|
137523
137703
|
handler: async (_services, params) => {
|
|
137524
137704
|
const { udid, bundleId, appPath } = params;
|
|
137525
|
-
const absolute = (0,
|
|
137705
|
+
const absolute = (0, import_node_path23.resolve)(appPath);
|
|
137526
137706
|
await assertIosAppBundle(absolute, bundleId);
|
|
137527
137707
|
const { nativeId, prefix } = await simctlTargetForUdid(udid);
|
|
137528
137708
|
try {
|
|
137529
|
-
await
|
|
137709
|
+
await execFileAsync32("xcrun", [...prefix, "uninstall", nativeId, bundleId], {
|
|
137530
137710
|
timeout: 3e4,
|
|
137531
137711
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
137532
137712
|
});
|
|
@@ -137546,7 +137726,7 @@ var iosImpl = {
|
|
|
137546
137726
|
}
|
|
137547
137727
|
}
|
|
137548
137728
|
try {
|
|
137549
|
-
await
|
|
137729
|
+
await execFileAsync32("xcrun", [...prefix, "install", nativeId, absolute], {
|
|
137550
137730
|
timeout: 18e4,
|
|
137551
137731
|
killSignal: SIMCTL_KILL_SIGNAL
|
|
137552
137732
|
});
|
|
@@ -137569,7 +137749,7 @@ var iosImpl = {
|
|
|
137569
137749
|
};
|
|
137570
137750
|
|
|
137571
137751
|
// ../tool-server/src/tools/reinstall-app/platforms/android.ts
|
|
137572
|
-
var
|
|
137752
|
+
var import_node_path24 = require("node:path");
|
|
137573
137753
|
init_src2();
|
|
137574
137754
|
init_adb();
|
|
137575
137755
|
async function isInstalled(udid, bundleId) {
|
|
@@ -137582,7 +137762,7 @@ var androidImpl3 = {
|
|
|
137582
137762
|
requires: ["adb"],
|
|
137583
137763
|
handler: async (_services, params) => {
|
|
137584
137764
|
const { udid, bundleId, appPath } = params;
|
|
137585
|
-
const absolute = (0,
|
|
137765
|
+
const absolute = (0, import_node_path24.resolve)(appPath);
|
|
137586
137766
|
await assertApk(absolute, bundleId);
|
|
137587
137767
|
const uninstall = await runAdb(["-s", udid, "uninstall", bundleId], {
|
|
137588
137768
|
timeoutMs: 3e4
|
|
@@ -137634,7 +137814,7 @@ ${stderr}`;
|
|
|
137634
137814
|
};
|
|
137635
137815
|
|
|
137636
137816
|
// ../tool-server/src/tools/reinstall-app/platforms/ios-device.ts
|
|
137637
|
-
var
|
|
137817
|
+
var import_node_path25 = require("node:path");
|
|
137638
137818
|
init_capability();
|
|
137639
137819
|
var iosDeviceImpl3 = {
|
|
137640
137820
|
requires: ["xcrun"],
|
|
@@ -137644,7 +137824,7 @@ var iosDeviceImpl3 = {
|
|
|
137644
137824
|
`${params.bundleId} is system UI: it is always running and cannot be reinstalled. Use launch-app to put it under automation.`
|
|
137645
137825
|
);
|
|
137646
137826
|
}
|
|
137647
|
-
const absolute = (0,
|
|
137827
|
+
const absolute = (0, import_node_path25.resolve)(params.appPath);
|
|
137648
137828
|
await assertIosAppBundle(absolute, params.bundleId);
|
|
137649
137829
|
await ensureDeviceReady(params.udid);
|
|
137650
137830
|
await uninstallApp(params.udid, params.bundleId);
|
|
@@ -137658,12 +137838,12 @@ var iosDeviceImpl3 = {
|
|
|
137658
137838
|
};
|
|
137659
137839
|
|
|
137660
137840
|
// ../tool-server/src/tools/reinstall-app/platforms/ios-remote.ts
|
|
137661
|
-
var
|
|
137841
|
+
var import_node_path26 = require("node:path");
|
|
137662
137842
|
var iosRemoteImpl3 = {
|
|
137663
137843
|
requires: ["sim-remote"],
|
|
137664
137844
|
handler: async (_services, params) => {
|
|
137665
137845
|
const { udid, bundleId, appPath } = params;
|
|
137666
|
-
const absolute = (0,
|
|
137846
|
+
const absolute = (0, import_node_path26.resolve)(appPath);
|
|
137667
137847
|
await assertIosAppBundle(absolute, bundleId, { readBundleId: false });
|
|
137668
137848
|
try {
|
|
137669
137849
|
await simctlUninstall(udid, bundleId);
|
|
@@ -137675,13 +137855,13 @@ var iosRemoteImpl3 = {
|
|
|
137675
137855
|
};
|
|
137676
137856
|
|
|
137677
137857
|
// ../tool-server/src/tools/reinstall-app/platforms/vega.ts
|
|
137678
|
-
var
|
|
137858
|
+
var import_node_path27 = require("node:path");
|
|
137679
137859
|
init_src2();
|
|
137680
137860
|
var vegaImpl3 = {
|
|
137681
137861
|
requires: ["vega"],
|
|
137682
137862
|
handler: async (_services, params) => {
|
|
137683
137863
|
const { udid, bundleId, appPath } = params;
|
|
137684
|
-
const absolute = (0,
|
|
137864
|
+
const absolute = (0, import_node_path27.resolve)(appPath);
|
|
137685
137865
|
await assertVpkg(absolute);
|
|
137686
137866
|
await vegaDevice(udid, ["uninstall-app", "-a", bundleId], { timeoutMs: 6e4 }).catch(
|
|
137687
137867
|
() => {
|
|
@@ -137708,7 +137888,7 @@ ${stderr}`;
|
|
|
137708
137888
|
};
|
|
137709
137889
|
|
|
137710
137890
|
// ../tool-server/src/tools/reinstall-app/platforms/harmony.ts
|
|
137711
|
-
var
|
|
137891
|
+
var import_node_path28 = require("node:path");
|
|
137712
137892
|
init_src2();
|
|
137713
137893
|
init_device_info();
|
|
137714
137894
|
var INSTALLED = "msg:install bundle successfully.";
|
|
@@ -137719,7 +137899,7 @@ var harmonyImpl3 = {
|
|
|
137719
137899
|
handler: async (_services, params, device) => {
|
|
137720
137900
|
const { bundleId, appPath } = params;
|
|
137721
137901
|
const connectKey = harmonyConnectKey(device.id);
|
|
137722
|
-
const absolute = (0,
|
|
137902
|
+
const absolute = (0, import_node_path28.resolve)(appPath);
|
|
137723
137903
|
await assertHap(absolute, bundleId);
|
|
137724
137904
|
const uninstall = await runHdc(["-t", connectKey, "uninstall", bundleId], 6e4);
|
|
137725
137905
|
if (!uninstall.stdout.includes(UNINSTALLED) && !uninstall.stdout.includes(NOT_INSTALLED)) {
|
|
@@ -137814,11 +137994,11 @@ var PERMISSION_NAMES = [
|
|
|
137814
137994
|
];
|
|
137815
137995
|
|
|
137816
137996
|
// ../tool-server/src/tools/settings-permissions/platforms/ios.ts
|
|
137817
|
-
var
|
|
137818
|
-
var
|
|
137997
|
+
var import_node_child_process44 = require("node:child_process");
|
|
137998
|
+
var import_node_util34 = require("node:util");
|
|
137819
137999
|
init_src2();
|
|
137820
138000
|
init_capability();
|
|
137821
|
-
var
|
|
138001
|
+
var execFileAsync33 = (0, import_node_util34.promisify)(import_node_child_process44.execFile);
|
|
137822
138002
|
var SIMCTL_ACTION = {
|
|
137823
138003
|
grant: "grant",
|
|
137824
138004
|
deny: "revoke",
|
|
@@ -137843,7 +138023,7 @@ var NON_TCC_GRANT_NEEDS_INSTALL = /* @__PURE__ */ new Set([
|
|
|
137843
138023
|
]);
|
|
137844
138024
|
var localBackend = {
|
|
137845
138025
|
async run(udid, simctlAction, service, bundleId) {
|
|
137846
|
-
await
|
|
138026
|
+
await execFileAsync33(
|
|
137847
138027
|
"xcrun",
|
|
137848
138028
|
await simctlArgsForUdid(udid, ["privacy", udid, simctlAction, service, bundleId]),
|
|
137849
138029
|
{ timeout: 3e4 }
|
|
@@ -137851,7 +138031,7 @@ var localBackend = {
|
|
|
137851
138031
|
},
|
|
137852
138032
|
async isInstalled(udid, bundleId) {
|
|
137853
138033
|
try {
|
|
137854
|
-
await
|
|
138034
|
+
await execFileAsync33(
|
|
137855
138035
|
"xcrun",
|
|
137856
138036
|
await simctlArgsForUdid(udid, ["get_app_container", udid, bundleId]),
|
|
137857
138037
|
{ timeout: 15e3 }
|
|
@@ -138127,8 +138307,8 @@ init_zod();
|
|
|
138127
138307
|
init_device_info();
|
|
138128
138308
|
|
|
138129
138309
|
// ../tool-server/src/tools/open-url/platforms/ios.ts
|
|
138130
|
-
var
|
|
138131
|
-
var
|
|
138310
|
+
var import_node_child_process45 = require("node:child_process");
|
|
138311
|
+
var import_node_util35 = require("node:util");
|
|
138132
138312
|
init_src2();
|
|
138133
138313
|
|
|
138134
138314
|
// ../tool-server/src/tools/open-url/deep-link-note.ts
|
|
@@ -138138,13 +138318,13 @@ function httpDeepLinkNote(url2) {
|
|
|
138138
138318
|
}
|
|
138139
138319
|
|
|
138140
138320
|
// ../tool-server/src/tools/open-url/platforms/ios.ts
|
|
138141
|
-
var
|
|
138321
|
+
var execFileAsync34 = (0, import_node_util35.promisify)(import_node_child_process45.execFile);
|
|
138142
138322
|
var iosImpl3 = {
|
|
138143
138323
|
requires: ["xcrun"],
|
|
138144
138324
|
handler: async (_services, params) => {
|
|
138145
138325
|
await firstSimulatorPoll();
|
|
138146
138326
|
try {
|
|
138147
|
-
await
|
|
138327
|
+
await execFileAsync34(
|
|
138148
138328
|
"xcrun",
|
|
138149
138329
|
await simctlArgsForUdid(params.udid, ["openurl", params.udid, params.url]),
|
|
138150
138330
|
{ timeout: 3e4, killSignal: SIMCTL_KILL_SIGNAL }
|
|
@@ -138266,16 +138446,16 @@ var chromiumImpl2 = {
|
|
|
138266
138446
|
};
|
|
138267
138447
|
|
|
138268
138448
|
// ../tool-server/src/tools/open-url/platforms/macos.ts
|
|
138269
|
-
var
|
|
138449
|
+
var import_node_child_process46 = require("node:child_process");
|
|
138270
138450
|
var path45 = __toESM(require("node:path"));
|
|
138271
|
-
var
|
|
138451
|
+
var import_node_util36 = require("node:util");
|
|
138272
138452
|
init_src2();
|
|
138273
138453
|
init_capability();
|
|
138274
|
-
var
|
|
138454
|
+
var execFileAsync35 = (0, import_node_util36.promisify)(import_node_child_process46.execFile);
|
|
138275
138455
|
var WEB_URL_NOTE = "The URL went to the app of the device, not to the default browser. The app shows it only if it handles that URL.";
|
|
138276
138456
|
async function declaredSchemes(appPath) {
|
|
138277
138457
|
try {
|
|
138278
|
-
const { stdout } = await
|
|
138458
|
+
const { stdout } = await execFileAsync35(
|
|
138279
138459
|
"plutil",
|
|
138280
138460
|
[
|
|
138281
138461
|
"-extract",
|
|
@@ -138321,7 +138501,7 @@ var macosImpl3 = {
|
|
|
138321
138501
|
);
|
|
138322
138502
|
}
|
|
138323
138503
|
try {
|
|
138324
|
-
await
|
|
138504
|
+
await execFileAsync35("open", ["-g", "-a", app.appPath, params.url], { timeout: 1e4 });
|
|
138325
138505
|
} catch (err) {
|
|
138326
138506
|
const stderr = err.stderr?.trim();
|
|
138327
138507
|
throw macosFailure(
|
|
@@ -138404,8 +138584,8 @@ Returns \`{ opened, url, note? }\`. Fails if no handler is registered<flag:harmo
|
|
|
138404
138584
|
};
|
|
138405
138585
|
|
|
138406
138586
|
// ../tool-server/src/tools/screenshot/index.ts
|
|
138407
|
-
var
|
|
138408
|
-
var
|
|
138587
|
+
var import_node_child_process47 = require("node:child_process");
|
|
138588
|
+
var import_node_util37 = require("node:util");
|
|
138409
138589
|
var os12 = __toESM(require("node:os"));
|
|
138410
138590
|
var path46 = __toESM(require("node:path"));
|
|
138411
138591
|
init_zod();
|
|
@@ -138414,7 +138594,7 @@ init_device_info();
|
|
|
138414
138594
|
init_adb();
|
|
138415
138595
|
|
|
138416
138596
|
// ../tool-server/src/utils/device-orientation.ts
|
|
138417
|
-
var
|
|
138597
|
+
var import_node_fs21 = require("node:fs");
|
|
138418
138598
|
init_adb();
|
|
138419
138599
|
var SURFACE_ROTATION_TO_NAME = {
|
|
138420
138600
|
0: "Portrait",
|
|
@@ -138459,7 +138639,7 @@ function captureRotationForSurface(rotation) {
|
|
|
138459
138639
|
async function readPngSize2(path77) {
|
|
138460
138640
|
let handle;
|
|
138461
138641
|
try {
|
|
138462
|
-
handle = await
|
|
138642
|
+
handle = await import_node_fs21.promises.open(path77, "r");
|
|
138463
138643
|
const buf = Buffer.alloc(24);
|
|
138464
138644
|
const { bytesRead } = await handle.read(buf, 0, 24, 0);
|
|
138465
138645
|
if (bytesRead < 24) return null;
|
|
@@ -138549,16 +138729,16 @@ function androidDevtoolsRotationPeek(registry2, device) {
|
|
|
138549
138729
|
}
|
|
138550
138730
|
|
|
138551
138731
|
// ../tool-server/src/utils/vega-screen.ts
|
|
138552
|
-
var
|
|
138553
|
-
var
|
|
138554
|
-
var
|
|
138732
|
+
var import_promises19 = require("node:fs/promises");
|
|
138733
|
+
var import_node_os16 = require("node:os");
|
|
138734
|
+
var import_node_path30 = require("node:path");
|
|
138555
138735
|
var import_pngjs3 = __toESM(require_png());
|
|
138556
138736
|
init_src2();
|
|
138557
138737
|
init_adb();
|
|
138558
138738
|
|
|
138559
138739
|
// ../tool-server/src/utils/emulator-console.ts
|
|
138560
|
-
var
|
|
138561
|
-
var
|
|
138740
|
+
var import_node_os15 = require("node:os");
|
|
138741
|
+
var import_node_path29 = require("node:path");
|
|
138562
138742
|
init_adb();
|
|
138563
138743
|
async function runEmuConsole(serial, args) {
|
|
138564
138744
|
const { stdout } = await runAdb(["-s", serial, "emu", ...args], { timeoutMs: 1e4 });
|
|
@@ -138574,7 +138754,7 @@ function describeConsoleReply(stdout) {
|
|
|
138574
138754
|
const lines = replyLines(stdout);
|
|
138575
138755
|
const reply = lines.join("; ") || "empty reply";
|
|
138576
138756
|
if (!lines.at(-1)?.startsWith("KO: unknown command")) return reply;
|
|
138577
|
-
const tokenFile = (0,
|
|
138757
|
+
const tokenFile = (0, import_node_path29.join)((0, import_node_os15.homedir)(), ".emulator_console_auth_token");
|
|
138578
138758
|
const fileKind = process.platform === "win32" ? "a file" : "a regular file, not a symlink,";
|
|
138579
138759
|
return `${reply} (adb authenticates to the console with ${tokenFile}, which must be ${fileKind} holding the emulator's token)`;
|
|
138580
138760
|
}
|
|
@@ -138589,12 +138769,12 @@ async function captureVegaScreenshotPng(opts = {}) {
|
|
|
138589
138769
|
async function captureViaEmulatorConsole(opts) {
|
|
138590
138770
|
const port = await discoverVegaConsolePort();
|
|
138591
138771
|
const serial = `emulator-${port}`;
|
|
138592
|
-
const outDir = await (0,
|
|
138772
|
+
const outDir = await (0, import_promises19.mkdtemp)((0, import_node_path30.join)((0, import_node_os16.tmpdir)(), "vega-shot-"));
|
|
138593
138773
|
try {
|
|
138594
138774
|
const { stdout } = await runAdb(["-s", serial, "emu", "screenrecord", "screenshot", outDir], {
|
|
138595
138775
|
timeoutMs: 2e4
|
|
138596
138776
|
});
|
|
138597
|
-
const pngName = (await (0,
|
|
138777
|
+
const pngName = (await (0, import_promises19.readdir)(outDir)).find((f) => f.toLowerCase().endsWith(".png"));
|
|
138598
138778
|
if (!pngName) {
|
|
138599
138779
|
throw new FailureError(
|
|
138600
138780
|
`emulator console wrote no PNG for ${serial}: ${describeConsoleReply(stdout)}`,
|
|
@@ -138606,24 +138786,24 @@ async function captureViaEmulatorConsole(opts) {
|
|
|
138606
138786
|
}
|
|
138607
138787
|
);
|
|
138608
138788
|
}
|
|
138609
|
-
const decoded2 = import_pngjs3.PNG.sync.read(await (0,
|
|
138789
|
+
const decoded2 = import_pngjs3.PNG.sync.read(await (0, import_promises19.readFile)((0, import_node_path30.join)(outDir, pngName)));
|
|
138610
138790
|
const scaled = scaleDecodedPng(
|
|
138611
138791
|
decoded2,
|
|
138612
138792
|
opts.scale ?? getScreenshotScaleOverride() ?? tvDefaultScale(decoded2.width, decoded2.height)
|
|
138613
138793
|
);
|
|
138614
|
-
const outPath = (0,
|
|
138615
|
-
await (0,
|
|
138794
|
+
const outPath = (0, import_node_path30.join)((0, import_node_os16.tmpdir)(), `vega-screenshot-${process.hrtime.bigint()}.png`);
|
|
138795
|
+
await (0, import_promises19.writeFile)(outPath, import_pngjs3.PNG.sync.write(scaled));
|
|
138616
138796
|
return outPath;
|
|
138617
138797
|
} finally {
|
|
138618
|
-
await (0,
|
|
138798
|
+
await (0, import_promises19.rm)(outDir, { recursive: true, force: true }).catch(() => {
|
|
138619
138799
|
});
|
|
138620
138800
|
}
|
|
138621
138801
|
}
|
|
138622
138802
|
|
|
138623
138803
|
// ../tool-server/src/utils/harmony-screen.ts
|
|
138624
|
-
var
|
|
138625
|
-
var
|
|
138626
|
-
var
|
|
138804
|
+
var import_promises20 = require("node:fs/promises");
|
|
138805
|
+
var import_node_os17 = require("node:os");
|
|
138806
|
+
var import_node_path31 = require("node:path");
|
|
138627
138807
|
var import_pngjs4 = __toESM(require_png());
|
|
138628
138808
|
init_src2();
|
|
138629
138809
|
function decodeCapture(raw, connectKey) {
|
|
@@ -138644,20 +138824,20 @@ function decodeCapture(raw, connectKey) {
|
|
|
138644
138824
|
}
|
|
138645
138825
|
}
|
|
138646
138826
|
async function captureHarmonyScreenshotPng(opts) {
|
|
138647
|
-
const rawPath = (0,
|
|
138827
|
+
const rawPath = (0, import_node_path31.join)((0, import_node_os17.tmpdir)(), `argent-harmony-raw-${process.hrtime.bigint()}.png`);
|
|
138648
138828
|
try {
|
|
138649
138829
|
await harmonyScreenCap(opts.connectKey, rawPath);
|
|
138650
|
-
const decoded2 = decodeCapture(await (0,
|
|
138830
|
+
const decoded2 = decodeCapture(await (0, import_promises20.readFile)(rawPath), opts.connectKey);
|
|
138651
138831
|
const scaled = scaleDecodedPng(decoded2, opts.scale);
|
|
138652
|
-
const outPath = (0,
|
|
138832
|
+
const outPath = (0, import_node_path31.join)((0, import_node_os17.tmpdir)(), `harmony-screenshot-${process.hrtime.bigint()}.png`);
|
|
138653
138833
|
if (scaled === decoded2) {
|
|
138654
|
-
await (0,
|
|
138834
|
+
await (0, import_promises20.rename)(rawPath, outPath);
|
|
138655
138835
|
} else {
|
|
138656
|
-
await (0,
|
|
138836
|
+
await (0, import_promises20.writeFile)(outPath, import_pngjs4.PNG.sync.write(scaled));
|
|
138657
138837
|
}
|
|
138658
138838
|
return outPath;
|
|
138659
138839
|
} finally {
|
|
138660
|
-
await (0,
|
|
138840
|
+
await (0, import_promises20.rm)(rawPath, { force: true }).catch(() => {
|
|
138661
138841
|
});
|
|
138662
138842
|
}
|
|
138663
138843
|
}
|
|
@@ -138665,7 +138845,7 @@ async function captureHarmonyScreenshotPng(opts) {
|
|
|
138665
138845
|
// ../tool-server/src/tools/screenshot/index.ts
|
|
138666
138846
|
init_capability();
|
|
138667
138847
|
var fs52 = __toESM(require("node:fs/promises"));
|
|
138668
|
-
var
|
|
138848
|
+
var execFileAsync36 = (0, import_node_util37.promisify)(import_node_child_process47.execFile);
|
|
138669
138849
|
var capability9 = {
|
|
138670
138850
|
apple: { simulator: true, device: true },
|
|
138671
138851
|
appleRemote: { simulator: true },
|
|
@@ -138705,7 +138885,7 @@ async function tvScreenshot(udid, scale, signal) {
|
|
|
138705
138885
|
);
|
|
138706
138886
|
const capture = async (out, type) => {
|
|
138707
138887
|
const io = ["io", udid, "screenshot", ...type ? [`--type=${type}`] : [], out];
|
|
138708
|
-
await
|
|
138888
|
+
await execFileAsync36("xcrun", await simctlArgsForUdid(udid, io), { signal });
|
|
138709
138889
|
};
|
|
138710
138890
|
if (scale !== void 0) {
|
|
138711
138891
|
await capture(file2);
|
|
@@ -138716,7 +138896,7 @@ async function tvScreenshot(udid, scale, signal) {
|
|
|
138716
138896
|
await capture(jpeg, "jpeg");
|
|
138717
138897
|
try {
|
|
138718
138898
|
const longSide = String(await tvTargetLongSide(jpeg, scale));
|
|
138719
|
-
await
|
|
138899
|
+
await execFileAsync36("sips", ["-Z", longSide, "-s", "format", "png", jpeg, "--out", file2], {
|
|
138720
138900
|
signal
|
|
138721
138901
|
});
|
|
138722
138902
|
} catch {
|
|
@@ -138729,7 +138909,7 @@ async function tvScreenshot(udid, scale, signal) {
|
|
|
138729
138909
|
async function tvTargetLongSide(file2, scale) {
|
|
138730
138910
|
let longSide = 3840;
|
|
138731
138911
|
try {
|
|
138732
|
-
const { stdout } = await
|
|
138912
|
+
const { stdout } = await execFileAsync36("sips", ["-g", "pixelWidth", "-g", "pixelHeight", file2]);
|
|
138733
138913
|
const width = Number(/pixelWidth:\s*(\d+)/.exec(stdout)?.[1]);
|
|
138734
138914
|
const height = Number(/pixelHeight:\s*(\d+)/.exec(stdout)?.[1]);
|
|
138735
138915
|
if (Number.isFinite(width) && Number.isFinite(height) && width > 0 && height > 0) {
|
|
@@ -138764,7 +138944,7 @@ async function downscalePngInPlace(file2, scale, signal) {
|
|
|
138764
138944
|
if (scale >= 1) {
|
|
138765
138945
|
return;
|
|
138766
138946
|
}
|
|
138767
|
-
await
|
|
138947
|
+
await execFileAsync36("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
|
|
138768
138948
|
signal
|
|
138769
138949
|
}).catch(() => {
|
|
138770
138950
|
});
|
|
@@ -141974,13 +142154,13 @@ var shakeZodSchema = external_exports.object({
|
|
|
141974
142154
|
});
|
|
141975
142155
|
|
|
141976
142156
|
// ../tool-server/src/tools/shake/platforms/ios.ts
|
|
141977
|
-
var
|
|
141978
|
-
var
|
|
142157
|
+
var import_node_child_process49 = require("node:child_process");
|
|
142158
|
+
var import_node_util38 = require("node:util");
|
|
141979
142159
|
init_src2();
|
|
141980
142160
|
init_capability();
|
|
141981
142161
|
|
|
141982
142162
|
// ../tool-server/src/utils/window-shake.ts
|
|
141983
|
-
var
|
|
142163
|
+
var import_node_child_process48 = require("node:child_process");
|
|
141984
142164
|
init_src();
|
|
141985
142165
|
var MICROINTERACTIONS_FLAG = "microinteractions";
|
|
141986
142166
|
var AMPLITUDE = 22;
|
|
@@ -142087,7 +142267,7 @@ end run
|
|
|
142087
142267
|
}
|
|
142088
142268
|
function runOsascript(script) {
|
|
142089
142269
|
return new Promise((resolve24, reject) => {
|
|
142090
|
-
const child = (0,
|
|
142270
|
+
const child = (0, import_node_child_process48.execFile)(
|
|
142091
142271
|
"/usr/bin/osascript",
|
|
142092
142272
|
["-"],
|
|
142093
142273
|
{ timeout: OSASCRIPT_TIMEOUT_MS },
|
|
@@ -142180,7 +142360,7 @@ async function prepareHostWindowShake(target) {
|
|
|
142180
142360
|
}
|
|
142181
142361
|
|
|
142182
142362
|
// ../tool-server/src/tools/shake/platforms/ios.ts
|
|
142183
|
-
var
|
|
142363
|
+
var execFileAsync37 = (0, import_node_util38.promisify)(import_node_child_process49.execFile);
|
|
142184
142364
|
var SHAKE_NOTIFICATION = "com.apple.UIKit.SimulatorShake";
|
|
142185
142365
|
var SHAKE_INTERVAL_MS = 400;
|
|
142186
142366
|
var sleep15 = (ms3) => new Promise((r) => setTimeout(r, ms3));
|
|
@@ -142222,7 +142402,7 @@ var iosImpl4 = {
|
|
|
142222
142402
|
if (i > 0) await sleep15(SHAKE_INTERVAL_MS);
|
|
142223
142403
|
shaker.begin();
|
|
142224
142404
|
try {
|
|
142225
|
-
await
|
|
142405
|
+
await execFileAsync37("xcrun", args, { timeout: 15e3 });
|
|
142226
142406
|
} catch (err) {
|
|
142227
142407
|
const error63 = err instanceof Error ? err : new Error(String(err));
|
|
142228
142408
|
throw shakeFailure(udid, error63.message, error63);
|
|
@@ -145516,7 +145696,7 @@ Returns \`{ x, y, items, truncated?, hiddenCount? }\`. Fails if disconnected or
|
|
|
145516
145696
|
|
|
145517
145697
|
// ../tool-server/src/tools/debugger/debugger-log-registry.ts
|
|
145518
145698
|
init_zod();
|
|
145519
|
-
var
|
|
145699
|
+
var import_node_path32 = require("node:path");
|
|
145520
145700
|
init_src();
|
|
145521
145701
|
var DEFAULT_TAIL = 20;
|
|
145522
145702
|
var CONSOLE_LEVELS = [
|
|
@@ -145588,7 +145768,7 @@ Returns \`{ status: "connected", file, entries, clusters, note? }\` (\`note\` fl
|
|
|
145588
145768
|
if (reaped2) response.note = describeReapedSession(reaped2, "JS-runtime debugger session");
|
|
145589
145769
|
const inFile = api.logWriter.getFileEntryCount();
|
|
145590
145770
|
const home = argentHomeDir();
|
|
145591
|
-
const fileNote = !api.logWriter.hasFile() ? `No log file exists at ${stats.file}, so there is nothing to grep: the counts, clusters and { entries } are all that was captured. Usually the disk was full or ${(0,
|
|
145771
|
+
const fileNote = !api.logWriter.hasFile() ? `No log file exists at ${stats.file}, so there is nothing to grep: the counts, clusters and { entries } are all that was captured. Usually the disk was full or ${(0, import_node_path32.join)(home, "tmp")} was not writable when this session started (if root owns ${home}: sudo chown -R "$USER" "${home}"). Only a new debugger session gets a file: once that is fixed, call stop-all-simulator-servers with devices: ["${canonicalDeviceId(params.device_id)}"], then debugger-connect again.` : inFile === 0 && stats.totalEntries > 0 ? `The log file at ${stats.file} holds none of the ${stats.totalEntries} captured entries: every write to it failed (e.g. a full disk), so there is nothing to grep and the counts, clusters and { entries } are all that was captured. Entries logged once the disk has room are written to it.` : inFile < stats.totalEntries ? `The log file at ${stats.file} holds only ${inFile} of the ${stats.totalEntries} captured entries: the other writes to it failed (e.g. a full disk or a file-size limit), so byLevel and clusters count entries that grepping it will not find. Entries logged once the disk has room are written to it.` : void 0;
|
|
145592
145772
|
if (fileNote) response.note = response.note ? `${response.note} ${fileNote}` : fileNote;
|
|
145593
145773
|
return response;
|
|
145594
145774
|
} catch (err) {
|
|
@@ -151243,7 +151423,7 @@ init_capability();
|
|
|
151243
151423
|
// ../tool-server/src/utils/react-profiler/pipeline/session-context.ts
|
|
151244
151424
|
var import_fs2 = require("fs");
|
|
151245
151425
|
var import_path3 = require("path");
|
|
151246
|
-
var
|
|
151426
|
+
var import_semver5 = __toESM(require_semver2());
|
|
151247
151427
|
async function readFileSafe(path77) {
|
|
151248
151428
|
try {
|
|
151249
151429
|
return await import_fs2.promises.readFile(path77, "utf8");
|
|
@@ -151290,7 +151470,7 @@ async function detectSessionContext(input2) {
|
|
|
151290
151470
|
rnArchitecture = input2.sessionMeta.detectedArchitecture;
|
|
151291
151471
|
} else {
|
|
151292
151472
|
const rnVersionStr = input2.sessionMeta.rnVersion ?? "";
|
|
151293
|
-
const rnMinor = (0,
|
|
151473
|
+
const rnMinor = (0, import_semver5.coerce)(rnVersionStr)?.minor ?? 0;
|
|
151294
151474
|
const newArchDefault = rnMinor >= 76;
|
|
151295
151475
|
rnArchitecture = newArchDefault ? "bridgeless" : "bridge";
|
|
151296
151476
|
if (platform === "android") {
|
|
@@ -153695,8 +153875,8 @@ var import_util14 = require("util");
|
|
|
153695
153875
|
var DEFAULT_EXEC_TIMEOUT_MS = 6e4;
|
|
153696
153876
|
var DEFAULT_EXEC_MAX_BUFFER = 256 * 1024 * 1024;
|
|
153697
153877
|
async function execFileAsyncWithTimeout(file2, args, options = {}) {
|
|
153698
|
-
const
|
|
153699
|
-
const { stdout, stderr } = await
|
|
153878
|
+
const execFileAsync49 = (0, import_util14.promisify)(import_child_process2.execFile);
|
|
153879
|
+
const { stdout, stderr } = await execFileAsync49(file2, args, {
|
|
153700
153880
|
encoding: "utf-8",
|
|
153701
153881
|
...options,
|
|
153702
153882
|
// Applied after ...options so a caller cannot weaken the guards; maxBuffer
|
|
@@ -155500,10 +155680,10 @@ function inFlightGuardMessage(state3, retryAction) {
|
|
|
155500
155680
|
|
|
155501
155681
|
// ../tool-server/src/tools/profiler/native-profiler/platforms/xctrace.ts
|
|
155502
155682
|
var import_child_process5 = require("child_process");
|
|
155503
|
-
var import_node_fs21 = require("node:fs");
|
|
155504
|
-
var import_node_util38 = require("node:util");
|
|
155505
|
-
init_src2();
|
|
155506
155683
|
var import_node_fs22 = require("node:fs");
|
|
155684
|
+
var import_node_util39 = require("node:util");
|
|
155685
|
+
init_src2();
|
|
155686
|
+
var import_node_fs23 = require("node:fs");
|
|
155507
155687
|
var path49 = __toESM(require("path"));
|
|
155508
155688
|
|
|
155509
155689
|
// ../tool-server/src/utils/ios-profiler/notify.ts
|
|
@@ -155663,7 +155843,7 @@ function resolveDefaultTemplatePath() {
|
|
|
155663
155843
|
)
|
|
155664
155844
|
];
|
|
155665
155845
|
for (const candidate of candidates) {
|
|
155666
|
-
if ((0,
|
|
155846
|
+
if ((0, import_node_fs23.existsSync)(candidate)) return candidate;
|
|
155667
155847
|
}
|
|
155668
155848
|
throw new FailureError(
|
|
155669
155849
|
`Argent.tracetemplate not found. Looked in:
|
|
@@ -155862,18 +156042,18 @@ function commitXctraceRecording(api, started, capture) {
|
|
|
155862
156042
|
traceFile: capture.traceFile
|
|
155863
156043
|
};
|
|
155864
156044
|
}
|
|
155865
|
-
var
|
|
156045
|
+
var execFileAsync38 = (0, import_node_util39.promisify)(import_child_process5.execFile);
|
|
155866
156046
|
function xctraceProgressProbe(child, traceFile) {
|
|
155867
156047
|
return async () => {
|
|
155868
156048
|
if (!child.pid) return null;
|
|
155869
|
-
const { stdout } = await
|
|
156049
|
+
const { stdout } = await execFileAsync38("ps", ["-o", "time=", "-p", String(child.pid)], {
|
|
155870
156050
|
timeout: 2e3
|
|
155871
156051
|
});
|
|
155872
|
-
const entries = await
|
|
156052
|
+
const entries = await import_node_fs22.promises.readdir(traceFile, { recursive: true, withFileTypes: true });
|
|
155873
156053
|
let bytes = 0;
|
|
155874
156054
|
for (const entry of entries) {
|
|
155875
156055
|
if (!entry.isFile()) continue;
|
|
155876
|
-
bytes += (await
|
|
156056
|
+
bytes += (await import_node_fs22.promises.stat(path49.join(entry.parentPath, entry.name))).size;
|
|
155877
156057
|
}
|
|
155878
156058
|
return `${stdout.trim()}|${bytes}`;
|
|
155879
156059
|
};
|
|
@@ -158156,23 +158336,23 @@ Use profiler-stack-query for details behind a finding.`,
|
|
|
158156
158336
|
init_zod();
|
|
158157
158337
|
|
|
158158
158338
|
// ../tool-server/src/tools/profiler/native-profiler/launch-analysis/measure.ts
|
|
158159
|
-
var
|
|
158160
|
-
var
|
|
158339
|
+
var import_node_child_process51 = require("node:child_process");
|
|
158340
|
+
var import_node_util41 = require("node:util");
|
|
158161
158341
|
var fsp5 = __toESM(require("node:fs/promises"));
|
|
158162
158342
|
var path55 = __toESM(require("node:path"));
|
|
158163
158343
|
var import_node_crypto20 = require("node:crypto");
|
|
158164
158344
|
init_src2();
|
|
158165
158345
|
|
|
158166
158346
|
// ../tool-server/src/utils/ios-launch-time/workflow.ts
|
|
158167
|
-
var
|
|
158168
|
-
var
|
|
158169
|
-
var
|
|
158347
|
+
var import_node_child_process50 = require("node:child_process");
|
|
158348
|
+
var import_node_util40 = require("node:util");
|
|
158349
|
+
var import_promises21 = require("node:timers/promises");
|
|
158170
158350
|
var fs66 = __toESM(require("node:fs"));
|
|
158171
158351
|
var fsp4 = __toESM(require("node:fs/promises"));
|
|
158172
158352
|
var path54 = __toESM(require("node:path"));
|
|
158173
158353
|
init_src();
|
|
158174
158354
|
init_src2();
|
|
158175
|
-
var
|
|
158355
|
+
var execFileAsync39 = (0, import_node_util40.promisify)(import_node_child_process50.execFile);
|
|
158176
158356
|
var BUILD_TIMEOUT_MS2 = 60 * 6e4;
|
|
158177
158357
|
var BOOTSTATUS_TIMEOUT_MS = 18e4;
|
|
158178
158358
|
function runnerBuildCacheDir(key2) {
|
|
@@ -158274,7 +158454,7 @@ async function runLogged(command, args, options) {
|
|
|
158274
158454
|
await fsp4.mkdir(path54.dirname(options.logPath), { recursive: true });
|
|
158275
158455
|
options.signal?.throwIfAborted();
|
|
158276
158456
|
const log = fs66.createWriteStream(options.logPath);
|
|
158277
|
-
const child = (0,
|
|
158457
|
+
const child = (0, import_node_child_process50.spawn)(command, args, {
|
|
158278
158458
|
cwd: options.cwd,
|
|
158279
158459
|
env: options.env ?? process.env,
|
|
158280
158460
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -158333,7 +158513,7 @@ ${errorText2(tail, options.logPath)}`,
|
|
|
158333
158513
|
}
|
|
158334
158514
|
}
|
|
158335
158515
|
async function smallCommand(command, args, signal, timeoutMs = 6e4) {
|
|
158336
|
-
const { stdout } = await
|
|
158516
|
+
const { stdout } = await execFileAsync39(command, args, {
|
|
158337
158517
|
timeout: timeoutMs,
|
|
158338
158518
|
maxBuffer: 8 * 1024 * 1024,
|
|
158339
158519
|
signal
|
|
@@ -158353,7 +158533,7 @@ async function waitForDeviceAction(action, onProgress, signal) {
|
|
|
158353
158533
|
if (!/unlock|locked|trust|developer mode|tunnel is still connecting/i.test(cause) || Date.now() >= deadline)
|
|
158354
158534
|
throw error63;
|
|
158355
158535
|
onProgress?.(`Waiting for iPhone setup: ${message}`);
|
|
158356
|
-
await (0,
|
|
158536
|
+
await (0, import_promises21.setTimeout)(5e3, void 0, { signal });
|
|
158357
158537
|
}
|
|
158358
158538
|
}
|
|
158359
158539
|
}
|
|
@@ -158433,7 +158613,7 @@ async function selectDevice(request4, onProgress, signal) {
|
|
|
158433
158613
|
};
|
|
158434
158614
|
}
|
|
158435
158615
|
function xcodeVersion() {
|
|
158436
|
-
return
|
|
158616
|
+
return execFileAsync39("xcodebuild", ["-version"], { timeout: 2e4 }).then(
|
|
158437
158617
|
({ stdout }) => stdout.trim().replace(/\n/g, " "),
|
|
158438
158618
|
() => "unknown-xcode"
|
|
158439
158619
|
);
|
|
@@ -158561,7 +158741,7 @@ async function terminateForWarmLaunch(context2, signal) {
|
|
|
158561
158741
|
};
|
|
158562
158742
|
let payload;
|
|
158563
158743
|
try {
|
|
158564
|
-
const { stdout } = await
|
|
158744
|
+
const { stdout } = await execFileAsync39(
|
|
158565
158745
|
"xcrun",
|
|
158566
158746
|
[
|
|
158567
158747
|
"devicectl",
|
|
@@ -158711,7 +158891,7 @@ function optionalExportCrashNote(tables, xcodeVersion2, options = {}) {
|
|
|
158711
158891
|
}
|
|
158712
158892
|
|
|
158713
158893
|
// ../tool-server/src/tools/profiler/native-profiler/launch-analysis/measure.ts
|
|
158714
|
-
var
|
|
158894
|
+
var execFileAsync40 = (0, import_node_util41.promisify)(import_node_child_process51.execFile);
|
|
158715
158895
|
var LAUNCH_ITERATIONS = 5;
|
|
158716
158896
|
async function measureLaunch(params, ctx) {
|
|
158717
158897
|
let release2;
|
|
@@ -158827,7 +159007,7 @@ async function measurePreparedLaunch(context2, ctx) {
|
|
|
158827
159007
|
}
|
|
158828
159008
|
let stdout;
|
|
158829
159009
|
try {
|
|
158830
|
-
({ stdout } = await
|
|
159010
|
+
({ stdout } = await execFileAsync40(
|
|
158831
159011
|
"xcrun",
|
|
158832
159012
|
["xcresulttool", "get", "test-results", "metrics", "--path", resultPath],
|
|
158833
159013
|
{ timeout: 6e4, maxBuffer: 4 * 1024 * 1024, signal: ctx?.signal }
|
|
@@ -158881,9 +159061,9 @@ async function measurePreparedLaunch(context2, ctx) {
|
|
|
158881
159061
|
}
|
|
158882
159062
|
|
|
158883
159063
|
// ../tool-server/src/tools/profiler/native-profiler/launch-analysis/profile.ts
|
|
158884
|
-
var
|
|
159064
|
+
var import_node_child_process52 = require("node:child_process");
|
|
158885
159065
|
var import_node_crypto21 = require("node:crypto");
|
|
158886
|
-
var
|
|
159066
|
+
var import_node_util42 = require("node:util");
|
|
158887
159067
|
var fsp6 = __toESM(require("node:fs/promises"));
|
|
158888
159068
|
var path56 = __toESM(require("node:path"));
|
|
158889
159069
|
init_src2();
|
|
@@ -159125,7 +159305,7 @@ function cpuTableXpath(tocXml) {
|
|
|
159125
159305
|
}
|
|
159126
159306
|
|
|
159127
159307
|
// ../tool-server/src/tools/profiler/native-profiler/launch-analysis/profile.ts
|
|
159128
|
-
var
|
|
159308
|
+
var execFileAsync41 = (0, import_node_util42.promisify)(import_node_child_process52.execFile);
|
|
159129
159309
|
var TABLE_XPATH = (schema) => `/trace-toc/run[@number="1"]/data/table[@schema="${schema}"]`;
|
|
159130
159310
|
async function writeProfilerSession(xml) {
|
|
159131
159311
|
const debugDir = await getDebugDir();
|
|
@@ -159237,7 +159417,7 @@ async function profileLaunch(params, ctx) {
|
|
|
159237
159417
|
let toc = "";
|
|
159238
159418
|
try {
|
|
159239
159419
|
const { stdout } = await withXctraceCrashRetry(
|
|
159240
|
-
() =>
|
|
159420
|
+
() => execFileAsync41("xcrun", ["xctrace", "export", "--input", tracePath, "--toc"], {
|
|
159241
159421
|
timeout: 12e4,
|
|
159242
159422
|
maxBuffer: 4 * 1024 * 1024,
|
|
159243
159423
|
signal: ctx?.signal
|
|
@@ -159455,15 +159635,15 @@ Returns \`samplesCollected\` (\`measure\`) or \`launchMs\` + \`profilerSession\`
|
|
|
159455
159635
|
init_zod();
|
|
159456
159636
|
|
|
159457
159637
|
// ../tool-server/src/utils/ios-audio.ts
|
|
159458
|
-
var
|
|
159638
|
+
var import_node_child_process53 = require("node:child_process");
|
|
159459
159639
|
var fs67 = __toESM(require("node:fs"));
|
|
159460
159640
|
var path57 = __toESM(require("node:path"));
|
|
159461
159641
|
var import_node_crypto22 = require("node:crypto");
|
|
159462
|
-
var
|
|
159642
|
+
var import_node_util43 = require("node:util");
|
|
159463
159643
|
init_src2();
|
|
159464
159644
|
init_capability();
|
|
159465
159645
|
init_external_devices();
|
|
159466
|
-
var
|
|
159646
|
+
var execFileAsync42 = (0, import_node_util43.promisify)(import_node_child_process53.execFile);
|
|
159467
159647
|
var AUDIO_DIR_ENV = "ARGENT_AUDIO_DIR";
|
|
159468
159648
|
var AUDIO_HOOK_PROTO = 1;
|
|
159469
159649
|
var MAX_CLIP_SECONDS = 600;
|
|
@@ -159489,11 +159669,11 @@ async function ensureAudioEnv(session) {
|
|
|
159489
159669
|
granted: "native-devtools"
|
|
159490
159670
|
});
|
|
159491
159671
|
const options = { timeout: SIMCTL_SPAWN_TIMEOUT_MS, killSignal: SIMCTL_KILL_SIGNAL };
|
|
159492
|
-
const getenv = async (name) => (await
|
|
159672
|
+
const getenv = async (name) => (await execFileAsync42("xcrun", [...prefix, "spawn", nativeId, "launchctl", "getenv", name], {
|
|
159493
159673
|
encoding: "utf8",
|
|
159494
159674
|
...options
|
|
159495
159675
|
}).catch(() => ({ stdout: "" }))).stdout.trim();
|
|
159496
|
-
const setenv = (name, value) =>
|
|
159676
|
+
const setenv = (name, value) => execFileAsync42(
|
|
159497
159677
|
"xcrun",
|
|
159498
159678
|
[...prefix, "spawn", nativeId, "launchctl", "setenv", name, value],
|
|
159499
159679
|
options
|
|
@@ -159613,7 +159793,7 @@ async function convertClip(inputPath, outputPath2) {
|
|
|
159613
159793
|
throw new InvalidToolInputError(`Audio file not found: ${inputPath}`);
|
|
159614
159794
|
}
|
|
159615
159795
|
try {
|
|
159616
|
-
await
|
|
159796
|
+
await execFileAsync42(
|
|
159617
159797
|
"afconvert",
|
|
159618
159798
|
["-f", "WAVE", "-d", `LEF32@${STREAM_RATE}`, "-c", "1", inputPath, outputPath2],
|
|
159619
159799
|
{ timeout: 6e4 }
|
|
@@ -160440,7 +160620,7 @@ var screenRecordingSessionBlueprint = {
|
|
|
160440
160620
|
recordReapedSession(
|
|
160441
160621
|
"screen-recording",
|
|
160442
160622
|
state3.deviceId,
|
|
160443
|
-
abandonedOutput ? abandonedRemote ? `The runner-side recording was ended and its download started, so the video captured up to that point is at ${abandonedOutput} if the download finished. Otherwise the remote machine keeps it until the machine is released:
|
|
160623
|
+
abandonedOutput ? abandonedRemote ? `The runner-side recording was ended and its download started, so the video captured up to that point is at ${abandonedOutput} if the download finished. Otherwise the remote machine keeps it until the machine is released: \`${argentCloudCommand()} screen-record fetch ${stripRemotePrefix(state3.deviceId)} <FILE> --recording ${abandonedRemote.recordingId}\`.` : abandonedMacos ? `The app was asked to end the recording and write it out first, so the video captured up to that point is at ${abandonedOutput} if the app finished writing it.` : `ffmpeg was given a moment to finalize the container first, so the video captured up to that point is usually playable at ${abandonedOutput} \u2014 check it before re-recording.` : void 0
|
|
160444
160624
|
);
|
|
160445
160625
|
}
|
|
160446
160626
|
}
|
|
@@ -160585,7 +160765,7 @@ var WATERMARK_PNG_HEIGHT = 277;
|
|
|
160585
160765
|
var WATERMARK_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAA4QAAAEVCAYAAAC46yv0AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOydd7xkRbX916qGIcwQBAaQDEPOacgqIgoCgxJEQRiCCuJ7CCoIzwQYfoIYAJ8BFAUERYLwAEUBMcCoMAwZiUMSkJwGJMycWr8/ui709D23Y1Wf7tP7+/ncz3zm3HN27e7b4eyqXWsRhtEiksYBmCrp8wBWKzqffoLkqiRnFp2HYRiGYRiGYbTDPEUnYPQ/ksYD+LikzwFYvuh8+pTNAVhBaBiGYRiGYQwUVhAaYyJpMe/9YZIOA7B40fn0M977zQD8sug8jOFB0ju89zunHsc5dwHJGanHMQzDMAyj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Fn+dIIvKLjFUBLFX8ZMg7gY8CeIBz0XYcxUXU0shfw2OjHrk066XoQCyB/GZZK2tqJS2JPGvpI/5c5yac74H8fJ9SNyZHodhWYxEATwN4qq3Pl5mZ2TwnIi5ssMltv2nOzczMzMzMbCqTtFpEPFPXIZT0b+Nuq5mZmbXPSWXMzOZvb0b9VgkPAjhjEtpiZmZmk8wdQjOz+ZSkBSUd2KDct8edGMXMzMzMzMxaJOmjDdYOZpLWHndbzczMzMzMrCFJqUi33+u5RbMs+1jk6jqE3qzbzMxsHuZtJ8zM5kGS1pR0C4CbAdwp6V4AGcnVAbwCwHJNwpB8KclrRtlWMzMzMzMza5GkNRuM/tX9OJGMmZnZPM5JZczMrJdHSL573I0wMzOz0XKH0MzMuonkQSTvHndDzMzMbLTcITQzs4lE8lCSPxx3Q8zMzGz03CE0M7PZHiS5H8mvjbshZmZmNjncITQzs6ckfYvkhiR/MO7GmJmZ2eTxthNmZvMgSYsC2A3AGhHxXABLkVwawEIAMkkzAPw1pXQtgItIPjrG5pqZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmc2X/j9B0/+uMB3y2gAAAABJRU5ErkJggg==";
|
|
160586
160766
|
|
|
160587
160767
|
// ../tool-server/src/tools/screen-recording/watermark.ts
|
|
160588
|
-
var
|
|
160768
|
+
var execFileAsync43 = (0, import_util15.promisify)(import_child_process8.execFile);
|
|
160589
160769
|
var OUTPUT_FPS = 30;
|
|
160590
160770
|
var EVEN_CROP = "crop=trunc(iw/2)*2:trunc(ih/2)*2:0:0";
|
|
160591
160771
|
function encoderArgs(outputFile) {
|
|
@@ -160620,7 +160800,7 @@ var MASK_DARK_MAX_LUMA = 90;
|
|
|
160620
160800
|
var MASK_LIGHT_MIN_LUMA = 165;
|
|
160621
160801
|
async function resolveBinary(name, fallbacks) {
|
|
160622
160802
|
try {
|
|
160623
|
-
await
|
|
160803
|
+
await execFileAsync43("/bin/sh", ["-c", `command -v ${name}`], { timeout: 2e3 });
|
|
160624
160804
|
return name;
|
|
160625
160805
|
} catch {
|
|
160626
160806
|
}
|
|
@@ -161213,7 +161393,7 @@ init_src2();
|
|
|
161213
161393
|
init_device_info();
|
|
161214
161394
|
var POST_PASS_TIMEOUT_MS = 10 * 6e4;
|
|
161215
161395
|
var PROBE_TIMEOUT_MS3 = 15e3;
|
|
161216
|
-
var
|
|
161396
|
+
var execFileAsync44 = (0, import_util16.promisify)(import_child_process10.execFile);
|
|
161217
161397
|
var TRIM_FILTERS = `fps=${OUTPUT_FPS},mpdecimate=hi=1:lo=1:frac=1,setpts=N/${OUTPUT_FPS}/TB,tpad=stop_mode=clone:stop_duration=1`;
|
|
161218
161398
|
async function startRemoteCapture(api, params) {
|
|
161219
161399
|
assertNoActiveRecording(api, "screen_recording_start");
|
|
@@ -161435,7 +161615,7 @@ async function postProcess(opts) {
|
|
|
161435
161615
|
}
|
|
161436
161616
|
args.push(...encoderArgs(outputFile));
|
|
161437
161617
|
try {
|
|
161438
|
-
await
|
|
161618
|
+
await execFileAsync44(ffmpeg, args, { timeout: POST_PASS_TIMEOUT_MS });
|
|
161439
161619
|
await statNonEmptyOutput(outputFile, "screen_recording_post_process");
|
|
161440
161620
|
return { outputFile, trimmed: opts.trimStatic, ...warning ? { warning } : {} };
|
|
161441
161621
|
} catch (err) {
|
|
@@ -161455,7 +161635,7 @@ async function probe3(file2, entries) {
|
|
|
161455
161635
|
const ffprobe = await resolveFfprobe();
|
|
161456
161636
|
if (!ffprobe) return null;
|
|
161457
161637
|
try {
|
|
161458
|
-
const { stdout } = await
|
|
161638
|
+
const { stdout } = await execFileAsync44(
|
|
161459
161639
|
ffprobe,
|
|
161460
161640
|
[
|
|
161461
161641
|
"-v",
|
|
@@ -161505,7 +161685,7 @@ function asStopFailure(err, ctx) {
|
|
|
161505
161685
|
if (err instanceof FailureError) return err;
|
|
161506
161686
|
const message = err instanceof Error ? err.message : String(err);
|
|
161507
161687
|
const what = ctx.timeLimitSeconds === void 0 ? `The recording could not be retrieved from the remote simulator: ${message}.` : `The recording hit its ${ctx.timeLimitSeconds ?? "?"}s time limit, but the video could not be retrieved from the remote simulator: ${message}.`;
|
|
161508
|
-
const recovery = `If the recording was stopped there, the remote machine keeps it until the machine is released. Download it with
|
|
161688
|
+
const recovery = `If the recording was stopped there, the remote machine keeps it until the machine is released. Download it with \`${argentCloudCommand()} screen-record fetch ${stripRemotePrefix(ctx.deviceId)} <FILE> --recording ${ctx.recordingId}\`. Do not retry the stop.`;
|
|
161509
161689
|
return new FailureError(
|
|
161510
161690
|
`${what} ${recovery}`,
|
|
161511
161691
|
{
|
|
@@ -161530,7 +161710,7 @@ var import_child_process11 = require("child_process");
|
|
|
161530
161710
|
var import_util17 = require("util");
|
|
161531
161711
|
init_src2();
|
|
161532
161712
|
init_src();
|
|
161533
|
-
var
|
|
161713
|
+
var execFileAsync45 = (0, import_util17.promisify)(import_child_process11.execFile);
|
|
161534
161714
|
var SOURCE_FILE = "ios-screen-stream.swift";
|
|
161535
161715
|
var PLIST_FILE = "Info.plist";
|
|
161536
161716
|
var BINARY_NAME = "ios-screen-stream";
|
|
@@ -161571,7 +161751,7 @@ async function ensureHelperBinary(sourceDir = resolveSourceDir()) {
|
|
|
161571
161751
|
await import_fs20.promises.mkdir(dir, { recursive: true });
|
|
161572
161752
|
const staging = `${binary}.${process.pid}.${Date.now()}`;
|
|
161573
161753
|
try {
|
|
161574
|
-
await
|
|
161754
|
+
await execFileAsync45(
|
|
161575
161755
|
"xcrun",
|
|
161576
161756
|
[
|
|
161577
161757
|
"swiftc",
|
|
@@ -161592,7 +161772,7 @@ async function ensureHelperBinary(sourceDir = resolveSourceDir()) {
|
|
|
161592
161772
|
],
|
|
161593
161773
|
{ timeout: COMPILE_TIMEOUT_MS, maxBuffer: 8 * 1024 * 1024 }
|
|
161594
161774
|
);
|
|
161595
|
-
await
|
|
161775
|
+
await execFileAsync45("codesign", ["-s", "-", "-f", "-i", SIGNING_IDENTIFIER, staging], {
|
|
161596
161776
|
timeout: 3e4
|
|
161597
161777
|
});
|
|
161598
161778
|
await import_fs20.promises.rename(staging, binary);
|
|
@@ -162249,7 +162429,7 @@ function makePointerControl(simulator) {
|
|
|
162249
162429
|
}
|
|
162250
162430
|
|
|
162251
162431
|
// ../tool-server/src/tools/screen-recording/screen-recording-stop.ts
|
|
162252
|
-
var
|
|
162432
|
+
var import_node_path33 = require("node:path");
|
|
162253
162433
|
init_zod();
|
|
162254
162434
|
init_device_info();
|
|
162255
162435
|
init_capability();
|
|
@@ -162295,7 +162475,7 @@ Check \`warning\` for capture problems, such as an undetected foldable panel.<fl
|
|
|
162295
162475
|
kind: "screen-recording",
|
|
162296
162476
|
mimeType: "video/mp4",
|
|
162297
162477
|
// Drop the internal `argent-` temp-file prefix from the saved name.
|
|
162298
|
-
filename: (0,
|
|
162478
|
+
filename: (0, import_node_path33.basename)(stopped.outputFile).replace(/^argent-/, ""),
|
|
162299
162479
|
saveDir: RECORDINGS_DIR
|
|
162300
162480
|
});
|
|
162301
162481
|
const result = { video, durationMs: stopped.durationMs };
|
|
@@ -164634,8 +164814,8 @@ Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` n
|
|
|
164634
164814
|
|
|
164635
164815
|
// ../tool-server/src/tools/simulator/stop-metro.ts
|
|
164636
164816
|
init_zod();
|
|
164637
|
-
var
|
|
164638
|
-
var
|
|
164817
|
+
var import_node_child_process54 = require("node:child_process");
|
|
164818
|
+
var import_node_fs24 = require("node:fs");
|
|
164639
164819
|
init_src2();
|
|
164640
164820
|
function parseNetstatListeningPids(netstatOutput, port) {
|
|
164641
164821
|
const pids = /* @__PURE__ */ new Set();
|
|
@@ -164655,7 +164835,7 @@ function procListeningPids(port, proc = "/proc") {
|
|
|
164655
164835
|
for (const table of ["tcp", "tcp6"]) {
|
|
164656
164836
|
let rows;
|
|
164657
164837
|
try {
|
|
164658
|
-
rows = (0,
|
|
164838
|
+
rows = (0, import_node_fs24.readFileSync)(`${proc}/net/${table}`, "utf-8");
|
|
164659
164839
|
} catch (error63) {
|
|
164660
164840
|
if (table === "tcp6" && error63.code === "ENOENT") continue;
|
|
164661
164841
|
throw error63;
|
|
@@ -164670,11 +164850,11 @@ function procListeningPids(port, proc = "/proc") {
|
|
|
164670
164850
|
if (inodes.size === 0) return [];
|
|
164671
164851
|
const owned = /* @__PURE__ */ new Set();
|
|
164672
164852
|
const pids = [];
|
|
164673
|
-
for (const entry of (0,
|
|
164853
|
+
for (const entry of (0, import_node_fs24.readdirSync)(proc)) {
|
|
164674
164854
|
if (!/^\d+$/.test(entry)) continue;
|
|
164675
164855
|
let fds;
|
|
164676
164856
|
try {
|
|
164677
|
-
fds = (0,
|
|
164857
|
+
fds = (0, import_node_fs24.readdirSync)(`${proc}/${entry}/fd`);
|
|
164678
164858
|
} catch {
|
|
164679
164859
|
continue;
|
|
164680
164860
|
}
|
|
@@ -164682,7 +164862,7 @@ function procListeningPids(port, proc = "/proc") {
|
|
|
164682
164862
|
for (const fd of fds) {
|
|
164683
164863
|
let target;
|
|
164684
164864
|
try {
|
|
164685
|
-
target = (0,
|
|
164865
|
+
target = (0, import_node_fs24.readlinkSync)(`${proc}/${entry}/fd/${fd}`);
|
|
164686
164866
|
} catch {
|
|
164687
164867
|
continue;
|
|
164688
164868
|
}
|
|
@@ -164701,8 +164881,8 @@ function procListeningPids(port, proc = "/proc") {
|
|
|
164701
164881
|
}
|
|
164702
164882
|
return pids;
|
|
164703
164883
|
}
|
|
164704
|
-
var LSOF_BIN2 = ["/usr/sbin/lsof", "/usr/bin/lsof"].find((p) => (0,
|
|
164705
|
-
var DARWIN_NETSTAT_BIN = (0,
|
|
164884
|
+
var LSOF_BIN2 = ["/usr/sbin/lsof", "/usr/bin/lsof"].find((p) => (0, import_node_fs24.existsSync)(p)) ?? "lsof";
|
|
164885
|
+
var DARWIN_NETSTAT_BIN = (0, import_node_fs24.existsSync)("/usr/sbin/netstat") ? "/usr/sbin/netstat" : "netstat";
|
|
164706
164886
|
function parseDarwinNetstatHasListener(netstatOutput, port) {
|
|
164707
164887
|
return netstatOutput.split("\n").some((line) => {
|
|
164708
164888
|
const cols = line.trim().split(/\s+/);
|
|
@@ -164711,7 +164891,7 @@ function parseDarwinNetstatHasListener(netstatOutput, port) {
|
|
|
164711
164891
|
}
|
|
164712
164892
|
function listeningPids(port) {
|
|
164713
164893
|
if (process.platform === "win32") {
|
|
164714
|
-
const output3 = (0,
|
|
164894
|
+
const output3 = (0, import_node_child_process54.execFileSync)("netstat", ["-ano"], {
|
|
164715
164895
|
encoding: "utf-8",
|
|
164716
164896
|
timeout: 5e3,
|
|
164717
164897
|
// `netstat -ano` dumps every socket on the host; Node's default 1 MiB
|
|
@@ -164723,7 +164903,7 @@ function listeningPids(port) {
|
|
|
164723
164903
|
if (process.platform === "linux") return procListeningPids(port);
|
|
164724
164904
|
let output2;
|
|
164725
164905
|
try {
|
|
164726
|
-
output2 = (0,
|
|
164906
|
+
output2 = (0, import_node_child_process54.execFileSync)(LSOF_BIN2, ["-ti", `tcp:${port}`, "-sTCP:LISTEN"], {
|
|
164727
164907
|
encoding: "utf-8",
|
|
164728
164908
|
timeout: 5e3
|
|
164729
164909
|
}).trim();
|
|
@@ -164731,7 +164911,7 @@ function listeningPids(port) {
|
|
|
164731
164911
|
const { status, stderr } = error63;
|
|
164732
164912
|
if (status !== 1 || stderr?.trim()) throw error63;
|
|
164733
164913
|
if (process.platform === "darwin") {
|
|
164734
|
-
const netstat = (0,
|
|
164914
|
+
const netstat = (0, import_node_child_process54.execFileSync)(DARWIN_NETSTAT_BIN, ["-an", "-p", "tcp"], {
|
|
164735
164915
|
encoding: "utf-8",
|
|
164736
164916
|
timeout: 5e3,
|
|
164737
164917
|
maxBuffer: 16 * 1024 * 1024
|
|
@@ -164827,7 +165007,7 @@ var import_node_url4 = require("node:url");
|
|
|
164827
165007
|
init_src2();
|
|
164828
165008
|
|
|
164829
165009
|
// ../tool-server/src/tools/flows/script/flow-script-executor.ts
|
|
164830
|
-
var
|
|
165010
|
+
var import_node_child_process55 = require("node:child_process");
|
|
164831
165011
|
var fs78 = __toESM(require("node:fs"));
|
|
164832
165012
|
var os16 = __toESM(require("node:os"));
|
|
164833
165013
|
var path63 = __toESM(require("node:path"));
|
|
@@ -165239,7 +165419,7 @@ var FlowScriptExecutor = class {
|
|
|
165239
165419
|
detached: process.platform !== "win32",
|
|
165240
165420
|
windowsHide: process.platform === "win32"
|
|
165241
165421
|
};
|
|
165242
|
-
child = (0,
|
|
165422
|
+
child = (0, import_node_child_process55.fork)(scriptPath, [], forkOptions);
|
|
165243
165423
|
} catch (err) {
|
|
165244
165424
|
const reason2 = redactSecrets(errorMessage5(err), request4.secrets ?? []);
|
|
165245
165425
|
return emptyResult(
|
|
@@ -165647,7 +165827,7 @@ function probeTypeStripping(nodeOptions) {
|
|
|
165647
165827
|
}
|
|
165648
165828
|
delete env[RUNNER_ACTIVATION_ENV];
|
|
165649
165829
|
try {
|
|
165650
|
-
(0,
|
|
165830
|
+
(0, import_node_child_process55.execFile)(
|
|
165651
165831
|
process.execPath,
|
|
165652
165832
|
[...nodeOptions, "-p", "process.features.typescript"],
|
|
165653
165833
|
{ env, timeout: TYPE_STRIPPING_PROBE_TIMEOUT_MS, windowsHide: true },
|
|
@@ -165759,7 +165939,7 @@ async function stopProcessTree(child, graceMs) {
|
|
|
165759
165939
|
if (process.platform === "win32") {
|
|
165760
165940
|
if (hasExited(child)) return;
|
|
165761
165941
|
tryKill(() => {
|
|
165762
|
-
const killer = (0,
|
|
165942
|
+
const killer = (0, import_node_child_process55.spawn)("taskkill", ["/pid", String(pid), "/t", "/f"], {
|
|
165763
165943
|
windowsHide: true,
|
|
165764
165944
|
stdio: "ignore"
|
|
165765
165945
|
});
|
|
@@ -167104,7 +167284,7 @@ E2E test selector steps auto-target and cannot provide a bundleId. Bring that ap
|
|
|
167104
167284
|
}
|
|
167105
167285
|
async function terminateCommand(device) {
|
|
167106
167286
|
if (device.platform === "ios-remote") {
|
|
167107
|
-
return
|
|
167287
|
+
return `${argentCloudCommand()} simctl terminate ${stripRemotePrefix(device.id)} <bundleId>`;
|
|
167108
167288
|
}
|
|
167109
167289
|
try {
|
|
167110
167290
|
const { prefix } = await simctlTargetForUdid(device.id);
|
|
@@ -171015,7 +171195,7 @@ init_src2();
|
|
|
171015
171195
|
init_device_info();
|
|
171016
171196
|
|
|
171017
171197
|
// ../tool-server/src/tools/screenshot-diff/screenshot-diff.ts
|
|
171018
|
-
var
|
|
171198
|
+
var import_promises22 = __toESM(require("fs/promises"));
|
|
171019
171199
|
var import_path8 = __toESM(require("path"));
|
|
171020
171200
|
var import_pngjs6 = __toESM(require_png());
|
|
171021
171201
|
init_src2();
|
|
@@ -171023,7 +171203,7 @@ init_src2();
|
|
|
171023
171203
|
// ../tool-server/src/tools/screenshot-diff/screenshot-diff-ocr.ts
|
|
171024
171204
|
var import_child_process12 = require("child_process");
|
|
171025
171205
|
var import_util18 = require("util");
|
|
171026
|
-
var
|
|
171206
|
+
var execFileAsync46 = (0, import_util18.promisify)(import_child_process12.execFile);
|
|
171027
171207
|
var OCR_TIMEOUT_MS = 1e4;
|
|
171028
171208
|
var OCR_MAX_BUFFER_BYTES = 32 * 1024 * 1024;
|
|
171029
171209
|
var TESSERACT_BINARY = "tesseract";
|
|
@@ -171068,7 +171248,7 @@ async function extractOcrTextBlocks(imagePath) {
|
|
|
171068
171248
|
}
|
|
171069
171249
|
}
|
|
171070
171250
|
async function recognizeTsv(imagePath) {
|
|
171071
|
-
const { stdout } = await
|
|
171251
|
+
const { stdout } = await execFileAsync46(
|
|
171072
171252
|
TESSERACT_BINARY,
|
|
171073
171253
|
[
|
|
171074
171254
|
imagePath,
|
|
@@ -172718,7 +172898,7 @@ function outputArtifactBaseName(filePath) {
|
|
|
172718
172898
|
}
|
|
172719
172899
|
async function readPngFile(filePath) {
|
|
172720
172900
|
try {
|
|
172721
|
-
return await
|
|
172901
|
+
return await import_promises22.default.readFile(filePath);
|
|
172722
172902
|
} catch (err) {
|
|
172723
172903
|
throw unreadablePngError(filePath, err);
|
|
172724
172904
|
}
|
|
@@ -172778,8 +172958,8 @@ function luminanceFromOffset(data, offset) {
|
|
|
172778
172958
|
return 0.2126 * data[offset] + 0.7152 * data[offset + 1] + 0.0722 * data[offset + 2];
|
|
172779
172959
|
}
|
|
172780
172960
|
async function writePngFile(filePath, png) {
|
|
172781
|
-
await
|
|
172782
|
-
await
|
|
172961
|
+
await import_promises22.default.mkdir(import_path8.default.dirname(filePath), { recursive: true });
|
|
172962
|
+
await import_promises22.default.writeFile(filePath, import_pngjs6.PNG.sync.write(png, DIFF_PNG_ENCODING));
|
|
172783
172963
|
}
|
|
172784
172964
|
function downscalePng(source, scale) {
|
|
172785
172965
|
const resized = resizeDecodedPng(
|
|
@@ -173371,11 +173551,11 @@ async function turnPngToNative(src, dest, orientation) {
|
|
|
173371
173551
|
}
|
|
173372
173552
|
|
|
173373
173553
|
// ../tool-server/src/utils/status-bar.ts
|
|
173374
|
-
var
|
|
173375
|
-
var
|
|
173554
|
+
var import_node_child_process56 = require("node:child_process");
|
|
173555
|
+
var import_node_util44 = require("node:util");
|
|
173376
173556
|
init_adb();
|
|
173377
173557
|
init_device_info();
|
|
173378
|
-
var
|
|
173558
|
+
var execFileAsync47 = (0, import_node_util44.promisify)(import_node_child_process56.execFile);
|
|
173379
173559
|
var DEMO_BROADCAST = "am broadcast -a com.android.systemui.demo";
|
|
173380
173560
|
var IOS_STATUS_BAR_OVERRIDE = [
|
|
173381
173561
|
"override",
|
|
@@ -173399,7 +173579,7 @@ async function pinStatusBar(device, signal) {
|
|
|
173399
173579
|
if (isIosPhysicalDevice(device)) return false;
|
|
173400
173580
|
try {
|
|
173401
173581
|
if (device.platform === "ios") {
|
|
173402
|
-
await
|
|
173582
|
+
await execFileAsync47(
|
|
173403
173583
|
"xcrun",
|
|
173404
173584
|
await simctlArgsForUdid(device.id, ["status_bar", device.id, ...IOS_STATUS_BAR_OVERRIDE])
|
|
173405
173585
|
);
|
|
@@ -173435,7 +173615,7 @@ async function pinStatusBar(device, signal) {
|
|
|
173435
173615
|
async function restoreStatusBar(device) {
|
|
173436
173616
|
try {
|
|
173437
173617
|
if (device.platform === "ios") {
|
|
173438
|
-
await
|
|
173618
|
+
await execFileAsync47(
|
|
173439
173619
|
"xcrun",
|
|
173440
173620
|
await simctlArgsForUdid(device.id, ["status_bar", device.id, "clear"])
|
|
173441
173621
|
);
|
|
@@ -175262,13 +175442,13 @@ Address the e2e test exactly as you will address it in e2e-execute: name or e2e_
|
|
|
175262
175442
|
init_zod();
|
|
175263
175443
|
|
|
175264
175444
|
// ../tool-server/src/utils/workspace-reader.ts
|
|
175265
|
-
var
|
|
175266
|
-
var
|
|
175267
|
-
var
|
|
175445
|
+
var import_promises23 = require("node:fs/promises");
|
|
175446
|
+
var import_node_path34 = require("node:path");
|
|
175447
|
+
var import_node_child_process57 = require("node:child_process");
|
|
175268
175448
|
var import_dotenv2 = __toESM(require_dist());
|
|
175269
175449
|
async function exists2(path77) {
|
|
175270
175450
|
try {
|
|
175271
|
-
await (0,
|
|
175451
|
+
await (0, import_promises23.access)(path77);
|
|
175272
175452
|
return true;
|
|
175273
175453
|
} catch {
|
|
175274
175454
|
return false;
|
|
@@ -175276,7 +175456,7 @@ async function exists2(path77) {
|
|
|
175276
175456
|
}
|
|
175277
175457
|
async function isDirectory2(path77) {
|
|
175278
175458
|
try {
|
|
175279
|
-
const s = await (0,
|
|
175459
|
+
const s = await (0, import_promises23.stat)(path77);
|
|
175280
175460
|
return s.isDirectory();
|
|
175281
175461
|
} catch {
|
|
175282
175462
|
return false;
|
|
@@ -175284,7 +175464,7 @@ async function isDirectory2(path77) {
|
|
|
175284
175464
|
}
|
|
175285
175465
|
async function readJsonFile(path77) {
|
|
175286
175466
|
try {
|
|
175287
|
-
const raw = await (0,
|
|
175467
|
+
const raw = await (0, import_promises23.readFile)(path77, "utf-8");
|
|
175288
175468
|
return JSON.parse(raw);
|
|
175289
175469
|
} catch {
|
|
175290
175470
|
return null;
|
|
@@ -175292,14 +175472,14 @@ async function readJsonFile(path77) {
|
|
|
175292
175472
|
}
|
|
175293
175473
|
async function readTextFile(path77) {
|
|
175294
175474
|
try {
|
|
175295
|
-
return await (0,
|
|
175475
|
+
return await (0, import_promises23.readFile)(path77, "utf-8");
|
|
175296
175476
|
} catch {
|
|
175297
175477
|
return null;
|
|
175298
175478
|
}
|
|
175299
175479
|
}
|
|
175300
175480
|
async function listDir(path77) {
|
|
175301
175481
|
try {
|
|
175302
|
-
const entries = await (0,
|
|
175482
|
+
const entries = await (0, import_promises23.readdir)(path77);
|
|
175303
175483
|
return entries;
|
|
175304
175484
|
} catch {
|
|
175305
175485
|
return null;
|
|
@@ -175308,7 +175488,7 @@ async function listDir(path77) {
|
|
|
175308
175488
|
var COMMAND_TIMEOUT_MS = 3e3;
|
|
175309
175489
|
function runVersionCommand(cmd, args, cwd) {
|
|
175310
175490
|
return new Promise((resolve24) => {
|
|
175311
|
-
const child = (0,
|
|
175491
|
+
const child = (0, import_node_child_process57.execFile)(cmd, args, { cwd, timeout: COMMAND_TIMEOUT_MS }, (err, stdout) => {
|
|
175312
175492
|
if (err) {
|
|
175313
175493
|
resolve24(null);
|
|
175314
175494
|
return;
|
|
@@ -175351,7 +175531,7 @@ async function detectLockfile(workspacePath) {
|
|
|
175351
175531
|
const checks = await Promise.all(
|
|
175352
175532
|
LOCKFILES.map(async (name) => ({
|
|
175353
175533
|
name,
|
|
175354
|
-
exists: await exists2((0,
|
|
175534
|
+
exists: await exists2((0, import_node_path34.join)(workspacePath, name))
|
|
175355
175535
|
}))
|
|
175356
175536
|
);
|
|
175357
175537
|
return checks.find((c) => c.exists)?.name ?? null;
|
|
@@ -175370,7 +175550,7 @@ var CI_CONFIGS = [
|
|
|
175370
175550
|
];
|
|
175371
175551
|
async function detectCiConfig(workspacePath) {
|
|
175372
175552
|
for (const ci of CI_CONFIGS) {
|
|
175373
|
-
if (await exists2((0,
|
|
175553
|
+
if (await exists2((0, import_node_path34.join)(workspacePath, ci.path))) return ci.label;
|
|
175374
175554
|
}
|
|
175375
175555
|
return null;
|
|
175376
175556
|
}
|
|
@@ -175391,7 +175571,7 @@ async function detectLintStagedConfig(workspacePath, packageJson) {
|
|
|
175391
175571
|
return packageJson["lint-staged"];
|
|
175392
175572
|
}
|
|
175393
175573
|
for (const file2 of LINT_STAGED_FILES) {
|
|
175394
|
-
const full = (0,
|
|
175574
|
+
const full = (0, import_node_path34.join)(workspacePath, file2);
|
|
175395
175575
|
if (await exists2(full)) {
|
|
175396
175576
|
if (file2.endsWith(".json") || file2 === ".lintstagedrc") {
|
|
175397
175577
|
return readJsonFile(full);
|
|
@@ -175433,7 +175613,7 @@ var CONFIG_FILES = [
|
|
|
175433
175613
|
async function detectConfigFiles(workspacePath) {
|
|
175434
175614
|
const results = await Promise.allSettled(
|
|
175435
175615
|
CONFIG_FILES.map(async (file2) => {
|
|
175436
|
-
if (await exists2((0,
|
|
175616
|
+
if (await exists2((0, import_node_path34.join)(workspacePath, file2))) return file2;
|
|
175437
175617
|
return null;
|
|
175438
175618
|
})
|
|
175439
175619
|
);
|
|
@@ -175472,7 +175652,7 @@ async function detectEnvFiles(workspacePath) {
|
|
|
175472
175652
|
const envFileNames = entries.filter((e) => e === ".env" || e.startsWith(".env."));
|
|
175473
175653
|
const results = await Promise.all(
|
|
175474
175654
|
envFileNames.map(async (name) => {
|
|
175475
|
-
const content = await readTextFile((0,
|
|
175655
|
+
const content = await readTextFile((0, import_node_path34.join)(workspacePath, name));
|
|
175476
175656
|
return {
|
|
175477
175657
|
name,
|
|
175478
175658
|
keys: content ? extractEnvKeys(content) : []
|
|
@@ -175499,34 +175679,34 @@ async function readWorkspaceSnapshot(workspacePath) {
|
|
|
175499
175679
|
ciConfig,
|
|
175500
175680
|
configFilesFound
|
|
175501
175681
|
] = await Promise.all([
|
|
175502
|
-
readJsonFile((0,
|
|
175503
|
-
readJsonFile((0,
|
|
175504
|
-
readJsonFile((0,
|
|
175505
|
-
readJsonFile((0,
|
|
175506
|
-
readTextFile((0,
|
|
175507
|
-
(r) => r ?? readTextFile((0,
|
|
175682
|
+
readJsonFile((0, import_node_path34.join)(workspacePath, "package.json")),
|
|
175683
|
+
readJsonFile((0, import_node_path34.join)(workspacePath, "app.json")),
|
|
175684
|
+
readJsonFile((0, import_node_path34.join)(workspacePath, "eas.json")),
|
|
175685
|
+
readJsonFile((0, import_node_path34.join)(workspacePath, "tsconfig.json")),
|
|
175686
|
+
readTextFile((0, import_node_path34.join)(workspacePath, "metro.config.js")).then(
|
|
175687
|
+
(r) => r ?? readTextFile((0, import_node_path34.join)(workspacePath, "metro.config.ts"))
|
|
175508
175688
|
),
|
|
175509
|
-
readTextFile((0,
|
|
175510
|
-
(r) => r ?? readTextFile((0,
|
|
175689
|
+
readTextFile((0, import_node_path34.join)(workspacePath, "babel.config.js")).then(
|
|
175690
|
+
(r) => r ?? readTextFile((0, import_node_path34.join)(workspacePath, "babel.config.cjs"))
|
|
175511
175691
|
),
|
|
175512
|
-
isDirectory2((0,
|
|
175513
|
-
isDirectory2((0,
|
|
175692
|
+
isDirectory2((0, import_node_path34.join)(workspacePath, "ios")),
|
|
175693
|
+
isDirectory2((0, import_node_path34.join)(workspacePath, "android")),
|
|
175514
175694
|
detectLockfile(workspacePath),
|
|
175515
175695
|
detectEnvFiles(workspacePath),
|
|
175516
175696
|
detectToolVersions(workspacePath),
|
|
175517
|
-
listDir((0,
|
|
175518
|
-
listDir((0,
|
|
175697
|
+
listDir((0, import_node_path34.join)(workspacePath, "scripts")),
|
|
175698
|
+
listDir((0, import_node_path34.join)(workspacePath, ".husky")),
|
|
175519
175699
|
detectCiConfig(workspacePath),
|
|
175520
175700
|
detectConfigFiles(workspacePath)
|
|
175521
175701
|
]);
|
|
175522
|
-
const iosDir = (0,
|
|
175523
|
-
const androidDir = (0,
|
|
175702
|
+
const iosDir = (0, import_node_path34.join)(workspacePath, "ios");
|
|
175703
|
+
const androidDir = (0, import_node_path34.join)(workspacePath, "android");
|
|
175524
175704
|
const [iosWorkspace, iosHasPodfile, makefileText, lintStagedConfig, androidHasGradle] = await Promise.all([
|
|
175525
175705
|
hasIosDir ? findIosWorkspace(iosDir) : Promise.resolve(null),
|
|
175526
|
-
exists2((0,
|
|
175527
|
-
readTextFile((0,
|
|
175706
|
+
exists2((0, import_node_path34.join)(workspacePath, "ios", "Podfile")),
|
|
175707
|
+
readTextFile((0, import_node_path34.join)(workspacePath, "Makefile")),
|
|
175528
175708
|
detectLintStagedConfig(workspacePath, packageJson),
|
|
175529
|
-
hasAndroidDir ? exists2((0,
|
|
175709
|
+
hasAndroidDir ? exists2((0, import_node_path34.join)(androidDir, "gradlew")) : Promise.resolve(false)
|
|
175530
175710
|
]);
|
|
175531
175711
|
const metroPort2 = metroConfigRaw ? extractMetroPort(metroConfigRaw) : null;
|
|
175532
175712
|
const makefileTargets = makefileText ? extractMakefileTargets(makefileText) : null;
|
|
@@ -175637,8 +175817,8 @@ var dismissUpdateTool = {
|
|
|
175637
175817
|
|
|
175638
175818
|
// ../tool-server/src/tools/screenshot-diff/index.ts
|
|
175639
175819
|
var import_node_crypto25 = __toESM(require("node:crypto"));
|
|
175640
|
-
var
|
|
175641
|
-
var
|
|
175820
|
+
var import_promises24 = __toESM(require("fs/promises"));
|
|
175821
|
+
var import_node_os18 = __toESM(require("node:os"));
|
|
175642
175822
|
var import_path9 = __toESM(require("path"));
|
|
175643
175823
|
init_zod();
|
|
175644
175824
|
init_src2();
|
|
@@ -175771,18 +175951,18 @@ async function resolveOutputDir(params, options) {
|
|
|
175771
175951
|
}
|
|
175772
175952
|
if (params.outputDir) {
|
|
175773
175953
|
try {
|
|
175774
|
-
await
|
|
175954
|
+
await import_promises24.default.mkdir(params.outputDir);
|
|
175775
175955
|
return params.outputDir;
|
|
175776
175956
|
} catch (err) {
|
|
175777
175957
|
if (err.code === "EEXIST") return params.outputDir;
|
|
175778
175958
|
}
|
|
175779
175959
|
}
|
|
175780
175960
|
const dir = import_path9.default.join(
|
|
175781
|
-
|
|
175961
|
+
import_node_os18.default.tmpdir(),
|
|
175782
175962
|
"argent-screenshot-diff",
|
|
175783
175963
|
import_node_crypto25.default.randomBytes(6).toString("hex")
|
|
175784
175964
|
);
|
|
175785
|
-
await
|
|
175965
|
+
await import_promises24.default.mkdir(dir, { recursive: true });
|
|
175786
175966
|
return dir;
|
|
175787
175967
|
}
|
|
175788
175968
|
async function resolveInputPaths(services, params, outputDir, options, captureScreenshot2, peekFor) {
|
|
@@ -175887,8 +176067,8 @@ async function captureIosDeviceLiveInput(params) {
|
|
|
175887
176067
|
async function writeLivePng(outputDir, name, png) {
|
|
175888
176068
|
const suffix = import_node_crypto25.default.randomBytes(4).toString("hex");
|
|
175889
176069
|
const destination = import_path9.default.join(outputDir, `${name}-${suffix}.live.png`);
|
|
175890
|
-
await
|
|
175891
|
-
await
|
|
176070
|
+
await import_promises24.default.mkdir(outputDir, { recursive: true });
|
|
176071
|
+
await import_promises24.default.writeFile(destination, png);
|
|
175892
176072
|
return destination;
|
|
175893
176073
|
}
|
|
175894
176074
|
async function captureHarmonyLiveInput(params) {
|
|
@@ -175906,10 +176086,10 @@ async function captureHarmonyLiveInput(params) {
|
|
|
175906
176086
|
const suffix = import_node_crypto25.default.randomBytes(4).toString("hex");
|
|
175907
176087
|
const destination = import_path9.default.join(params.outputDir, `${params.name}-${suffix}.live.png`);
|
|
175908
176088
|
try {
|
|
175909
|
-
await
|
|
175910
|
-
await
|
|
176089
|
+
await import_promises24.default.mkdir(params.outputDir, { recursive: true });
|
|
176090
|
+
await import_promises24.default.copyFile(captured, destination);
|
|
175911
176091
|
} finally {
|
|
175912
|
-
await
|
|
176092
|
+
await import_promises24.default.rm(captured, { force: true }).catch(() => {
|
|
175913
176093
|
});
|
|
175914
176094
|
}
|
|
175915
176095
|
return destination;
|
|
@@ -175928,8 +176108,8 @@ async function captureLiveInput(params) {
|
|
|
175928
176108
|
);
|
|
175929
176109
|
const suffix = import_node_crypto25.default.randomBytes(4).toString("hex");
|
|
175930
176110
|
const destination = import_path9.default.join(params.outputDir, `${params.name}-${suffix}.live.png`);
|
|
175931
|
-
await
|
|
175932
|
-
await
|
|
176111
|
+
await import_promises24.default.mkdir(params.outputDir, { recursive: true });
|
|
176112
|
+
await import_promises24.default.copyFile(capture.path, destination);
|
|
175933
176113
|
const warning = [panel?.warning, capture.note].filter((w) => w !== void 0).join(" ");
|
|
175934
176114
|
return { path: destination, ...warning ? { warning } : {} };
|
|
175935
176115
|
}
|
|
@@ -176995,15 +177175,15 @@ function createLensTools(registry2) {
|
|
|
176995
177175
|
}
|
|
176996
177176
|
|
|
176997
177177
|
// ../tool-server/src/utils/host-deps-report.ts
|
|
176998
|
-
var
|
|
176999
|
-
var
|
|
177000
|
-
var
|
|
177001
|
-
var
|
|
177178
|
+
var import_node_child_process58 = require("node:child_process");
|
|
177179
|
+
var import_node_fs25 = require("node:fs");
|
|
177180
|
+
var import_node_path35 = require("node:path");
|
|
177181
|
+
var import_node_util45 = require("node:util");
|
|
177002
177182
|
init_android_binary();
|
|
177003
|
-
var
|
|
177183
|
+
var execFileAsync48 = (0, import_node_util45.promisify)(import_node_child_process58.execFile);
|
|
177004
177184
|
async function activeDeveloperDir2() {
|
|
177005
177185
|
try {
|
|
177006
|
-
const { stdout } = await
|
|
177186
|
+
const { stdout } = await execFileAsync48("xcode-select", ["-p"], { timeout: 5e3 });
|
|
177007
177187
|
return stdout.trim() || null;
|
|
177008
177188
|
} catch {
|
|
177009
177189
|
return null;
|
|
@@ -177012,7 +177192,7 @@ async function activeDeveloperDir2() {
|
|
|
177012
177192
|
async function probeXcode() {
|
|
177013
177193
|
if (process.platform !== "darwin") return null;
|
|
177014
177194
|
const developerDir2 = await activeDeveloperDir2();
|
|
177015
|
-
const simctl = developerDir2 !== null && (0,
|
|
177195
|
+
const simctl = developerDir2 !== null && (0, import_node_fs25.existsSync)((0, import_node_path35.join)(developerDir2, "usr", "bin", "simctl"));
|
|
177016
177196
|
const firstLaunch = simctl && xcodeFirstLaunchPending("simctl") ? xcodeInstallInstruction() : null;
|
|
177017
177197
|
return { developerDir: developerDir2, simctl, firstLaunch };
|
|
177018
177198
|
}
|
|
@@ -177043,7 +177223,7 @@ function probeArgentToolServer(host, port, timeoutMs = 500) {
|
|
|
177043
177223
|
}
|
|
177044
177224
|
|
|
177045
177225
|
// ../tool-server/src/utils/preview-window.ts
|
|
177046
|
-
var
|
|
177226
|
+
var import_node_child_process59 = require("node:child_process");
|
|
177047
177227
|
var fs92 = __toESM(require("node:fs"));
|
|
177048
177228
|
var os21 = __toESM(require("node:os"));
|
|
177049
177229
|
var path75 = __toESM(require("node:path"));
|
|
@@ -177075,10 +177255,10 @@ function ensureLensAppBundle(electronBin) {
|
|
|
177075
177255
|
fs92.copyFileSync(path75.join(realContents, "Info.plist"), plist);
|
|
177076
177256
|
const setPlist = (entry, value) => {
|
|
177077
177257
|
try {
|
|
177078
|
-
(0,
|
|
177258
|
+
(0, import_node_child_process59.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Set :${entry} ${value}`, plist]);
|
|
177079
177259
|
} catch {
|
|
177080
177260
|
try {
|
|
177081
|
-
(0,
|
|
177261
|
+
(0, import_node_child_process59.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Add :${entry} string ${value}`, plist]);
|
|
177082
177262
|
} catch {
|
|
177083
177263
|
}
|
|
177084
177264
|
}
|
|
@@ -177137,7 +177317,7 @@ function createPreviewWindowManager(opts = {}) {
|
|
|
177137
177317
|
const wrapperBin = ensureLensAppBundle(electronBin);
|
|
177138
177318
|
const launchBin = wrapperBin ?? electronBin;
|
|
177139
177319
|
const launchArgs = wrapperBin ? ["--no-sandbox", mainScript] : [mainScript];
|
|
177140
|
-
const next = (0,
|
|
177320
|
+
const next = (0, import_node_child_process59.spawn)(launchBin, launchArgs, {
|
|
177141
177321
|
// Strips ELECTRON_RUN_AS_NODE, which an Electron-based MCP host leaves in
|
|
177142
177322
|
// our env, so the child boots as a GUI app instead of bare Node.
|
|
177143
177323
|
env: electronGuiChildEnv({ ARGENT_PREVIEW_URL: url2 }),
|