@ulpi/browse 2.3.1 → 2.3.2
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/browse.cjs +47 -18
- package/package.json +1 -1
package/dist/browse.cjs
CHANGED
|
@@ -864,7 +864,7 @@ var require_package = __commonJS({
|
|
|
864
864
|
"package.json"(exports2, module2) {
|
|
865
865
|
module2.exports = {
|
|
866
866
|
name: "@ulpi/browse",
|
|
867
|
-
version: "2.3.
|
|
867
|
+
version: "2.3.2",
|
|
868
868
|
homepage: "https://browse.ulpi.io",
|
|
869
869
|
repository: {
|
|
870
870
|
type: "git",
|
|
@@ -1089,13 +1089,19 @@ __export(bridge_exports, {
|
|
|
1089
1089
|
installAdb: () => installAdb
|
|
1090
1090
|
});
|
|
1091
1091
|
function resolveDriverApkPath() {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
"../../../browse-android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk"
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1092
|
+
const candidates = [
|
|
1093
|
+
// 1. Local dev build
|
|
1094
|
+
path7.resolve(__dirname2, "../../../browse-android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk"),
|
|
1095
|
+
// 2. Installed alongside source (bin/ at project root)
|
|
1096
|
+
path7.resolve(__dirname2, "../../bin/browse-android.apk"),
|
|
1097
|
+
// 3. Bundled build (dist/browse.cjs → ../bin/)
|
|
1098
|
+
path7.resolve(__dirname2, "../bin/browse-android.apk"),
|
|
1099
|
+
// 4. Same directory as binary
|
|
1100
|
+
path7.resolve(__dirname2, "browse-android.apk")
|
|
1101
|
+
];
|
|
1102
|
+
for (const p of candidates) {
|
|
1103
|
+
if (fs7.existsSync(p)) return p;
|
|
1104
|
+
}
|
|
1099
1105
|
const lazyPath = path7.join(
|
|
1100
1106
|
process.env.BROWSE_LOCAL_DIR || path7.join(process.cwd(), ".browse"),
|
|
1101
1107
|
"bin",
|
|
@@ -1103,9 +1109,21 @@ function resolveDriverApkPath() {
|
|
|
1103
1109
|
);
|
|
1104
1110
|
if (fs7.existsSync(lazyPath)) return lazyPath;
|
|
1105
1111
|
throw new Error(
|
|
1106
|
-
"browse-android APK not found.
|
|
1112
|
+
"browse-android APK not found. Run: browse enable android\nOr build manually: cd browse-android && ./gradlew :app:assembleDebugAndroidTest"
|
|
1107
1113
|
);
|
|
1108
1114
|
}
|
|
1115
|
+
function resolveAppApkPath() {
|
|
1116
|
+
const candidates = [
|
|
1117
|
+
path7.resolve(__dirname2, "../../../browse-android/app/build/outputs/apk/debug/app-debug.apk"),
|
|
1118
|
+
path7.resolve(__dirname2, "../../bin/browse-android-app.apk"),
|
|
1119
|
+
path7.resolve(__dirname2, "../bin/browse-android-app.apk"),
|
|
1120
|
+
path7.resolve(__dirname2, "browse-android-app.apk")
|
|
1121
|
+
];
|
|
1122
|
+
for (const p of candidates) {
|
|
1123
|
+
if (fs7.existsSync(p)) return p;
|
|
1124
|
+
}
|
|
1125
|
+
return null;
|
|
1126
|
+
}
|
|
1109
1127
|
function adbExec(serial, ...args) {
|
|
1110
1128
|
return (0, import_child_process3.execSync)(["adb", "-s", serial, ...args].join(" "), {
|
|
1111
1129
|
encoding: "utf-8",
|
|
@@ -1242,7 +1260,7 @@ function installDriverApk(serial, apkPath) {
|
|
|
1242
1260
|
if (installedBase?.includes(`package:${DRIVER_PACKAGE}`) && installedTest?.includes(DRIVER_TEST_PACKAGE)) {
|
|
1243
1261
|
return;
|
|
1244
1262
|
}
|
|
1245
|
-
const appApkPath = apkPath.replace("-androidTest", "");
|
|
1263
|
+
const appApkPath = resolveAppApkPath() || apkPath.replace("-androidTest", "");
|
|
1246
1264
|
if (fs7.existsSync(appApkPath)) {
|
|
1247
1265
|
try {
|
|
1248
1266
|
adbExec(serial, "install", "-t", "-r", `"${appApkPath}"`);
|
|
@@ -2486,7 +2504,12 @@ async function startIOS(opts = {}) {
|
|
|
2486
2504
|
} catch {
|
|
2487
2505
|
}
|
|
2488
2506
|
}
|
|
2489
|
-
const
|
|
2507
|
+
const runnerCandidates = [
|
|
2508
|
+
path10.resolve(__dirname_svc, "../../../browse-ios-runner"),
|
|
2509
|
+
path10.resolve(__dirname_svc, "../../browse-ios-runner"),
|
|
2510
|
+
path10.resolve(__dirname_svc, "../bin/browse-ios-runner")
|
|
2511
|
+
];
|
|
2512
|
+
const runnerDir = runnerCandidates.find((d) => fs10.existsSync(path10.join(d, "project.yml"))) || runnerCandidates[0];
|
|
2490
2513
|
const { execSync: execSync7 } = await import("child_process");
|
|
2491
2514
|
if (!fs10.existsSync(path10.join(runnerDir, "BrowseRunner.xcodeproj", "project.pbxproj"))) {
|
|
2492
2515
|
log2("Generating Xcode project...");
|
|
@@ -23836,12 +23859,18 @@ __export(bridge_exports3, {
|
|
|
23836
23859
|
resolveBridgePath: () => resolveBridgePath
|
|
23837
23860
|
});
|
|
23838
23861
|
function resolveBridgePath() {
|
|
23839
|
-
const
|
|
23840
|
-
|
|
23841
|
-
|
|
23842
|
-
|
|
23843
|
-
|
|
23844
|
-
|
|
23862
|
+
const candidates = [
|
|
23863
|
+
// 1. Local dev build
|
|
23864
|
+
path17.resolve(__dirname_bridge, "../../../browse-ax/.build/release/browse-ax"),
|
|
23865
|
+
path17.resolve(__dirname_bridge, "../../../browse-ax/.build/debug/browse-ax"),
|
|
23866
|
+
// 2. Installed alongside source (bin/ at project root)
|
|
23867
|
+
path17.resolve(__dirname_bridge, "../../bin/browse-ax"),
|
|
23868
|
+
// 3. Bundled build (dist/browse.cjs → ../bin/)
|
|
23869
|
+
path17.resolve(__dirname_bridge, "../bin/browse-ax")
|
|
23870
|
+
];
|
|
23871
|
+
for (const p of candidates) {
|
|
23872
|
+
if (fs22.existsSync(p)) return p;
|
|
23873
|
+
}
|
|
23845
23874
|
const lazyPath = path17.join(
|
|
23846
23875
|
process.env.BROWSE_LOCAL_DIR || path17.join(process.cwd(), ".browse"),
|
|
23847
23876
|
"bin",
|
|
@@ -23849,7 +23878,7 @@ function resolveBridgePath() {
|
|
|
23849
23878
|
);
|
|
23850
23879
|
if (fs22.existsSync(lazyPath)) return lazyPath;
|
|
23851
23880
|
throw new Error(
|
|
23852
|
-
"browse-ax binary not found.
|
|
23881
|
+
"browse-ax binary not found. Run: browse enable macos\nOr build manually: cd browse-ax && swift build -c release"
|
|
23853
23882
|
);
|
|
23854
23883
|
}
|
|
23855
23884
|
async function ensureMacOSBridge() {
|