@tapi-dev/sdk 0.1.25 → 0.1.26

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.
Files changed (2) hide show
  1. package/dist/cli.js +17 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2480,14 +2480,16 @@ async function runDoctor(options) {
2480
2480
  console.log(`Studio cache: ${options.cacheDir}`);
2481
2481
  console.log(`Workspace: ${options.workspaceRoot ?? "not found"}`);
2482
2482
  console.log(`Project: ${options.projectId ?? "not set"}`);
2483
- const exePath = options.exePath ?? getStudioExecutableCandidates().find((candidate) => existsSync(candidate));
2484
- console.log(`Studio executable: ${exePath && existsSync(exePath) ? exePath : "not found"}`);
2485
2483
  try {
2486
2484
  const manifest = await withCliSpinner("Fetching latest Tapi Studio manifest", () => fetchStudioManifest(options.manifestUrl));
2487
2485
  ensureCompatibleManifest(manifest);
2486
+ const exePath = findInstalledStudioExecutable(options, manifest);
2487
+ console.log(`Studio executable: ${exePath ?? "not found"}`);
2488
2488
  console.log(`Latest Studio: ${manifest.version} (${manifest.platform})`);
2489
2489
  }
2490
2490
  catch (error) {
2491
+ const exePath = options.exePath ?? getStudioExecutableCandidates().find((candidate) => existsSync(candidate));
2492
+ console.log(`Studio executable: ${exePath && existsSync(exePath) ? exePath : "not found"}`);
2491
2493
  console.log(`Latest Studio: unavailable (${formatError(error)})`);
2492
2494
  return 1;
2493
2495
  }
@@ -2956,6 +2958,19 @@ function isPortableStudioServerManifest(manifest) {
2956
2958
  const kind = String(manifest.installerKind || "").toLowerCase();
2957
2959
  return kind === "portable-server" || manifest.artifactName.toLowerCase().endsWith(".zip");
2958
2960
  }
2961
+ function findInstalledStudioExecutable(options, manifest) {
2962
+ if (options.exePath) {
2963
+ return existsSync(options.exePath) ? options.exePath : undefined;
2964
+ }
2965
+ const legacyDesktopExe = getStudioExecutableCandidates().find((candidate) => existsSync(candidate));
2966
+ if (legacyDesktopExe) {
2967
+ return legacyDesktopExe;
2968
+ }
2969
+ if (!isPortableStudioServerManifest(manifest)) {
2970
+ return undefined;
2971
+ }
2972
+ return findPortableStudioServerExe(portableStudioServerReleaseDir(manifest, options.installDir), manifest);
2973
+ }
2959
2974
  function portableStudioServerReleaseDir(manifest, releasesDir = getDefaultPortableStudioServerReleasesDir()) {
2960
2975
  return join(releasesDir, safePathSegment(manifest.version));
2961
2976
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapi-dev/sdk",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",