dsh-deeppilot 0.2.2 → 0.3.0
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/lib/index.js
CHANGED
|
@@ -2882,15 +2882,20 @@ function parseHelperEvent(line) {
|
|
|
2882
2882
|
return null;
|
|
2883
2883
|
}
|
|
2884
2884
|
}
|
|
2885
|
+
/** Translate Node's platform/architecture names to the GOOS/GOARCH directory
|
|
2886
|
+
* names used by the committed helper matrix. */
|
|
2887
|
+
function bundledHelperPlatformDir(platform = process.platform, arch = process.arch) {
|
|
2888
|
+
return `${platform === "win32" ? "windows" : platform}-${arch === "x64" ? "amd64" : arch}`;
|
|
2889
|
+
}
|
|
2885
2890
|
/** Build the list of candidate locations for the embedded tunnel helper, in
|
|
2886
2891
|
* priority order. The first existing executable wins at start() time. The
|
|
2887
2892
|
* order matters: explicit config (handled by the caller) > npm install
|
|
2888
2893
|
* layout > DSH-bundled layout > user data dir. */
|
|
2889
|
-
function bundledHelperCandidates() {
|
|
2894
|
+
function bundledHelperCandidates(platform = process.platform, arch = process.arch) {
|
|
2890
2895
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
2891
2896
|
const pkgRoot = resolve(here, "..");
|
|
2892
|
-
const fileName =
|
|
2893
|
-
const platformDir =
|
|
2897
|
+
const fileName = platform === "win32" ? "dsh-deeppilot-tunnel.exe" : "dsh-deeppilot-tunnel";
|
|
2898
|
+
const platformDir = bundledHelperPlatformDir(platform, arch);
|
|
2894
2899
|
const candidates = [];
|
|
2895
2900
|
candidates.push(resolve(pkgRoot, "bin", platformDir, fileName));
|
|
2896
2901
|
candidates.push(resolve(pkgRoot, "..", "..", "..", "node_modules", "dsh-deeppilot", "bin", platformDir, fileName));
|