tamga-vdesktop 1.2.0 → 1.2.1

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.js CHANGED
@@ -578,28 +578,43 @@ function findPlaywrightManagedBrowser(chromiumRef) {
578
578
  }
579
579
  function resolvePlaywrightCliPath() {
580
580
  try {
581
- return require2.resolve("playwright-core/cli.js");
581
+ const pkgPath = require2.resolve("playwright-core/package.json");
582
+ const cliPath = path3.join(path3.dirname(pkgPath), "cli.js");
583
+ if (fs3.existsSync(cliPath)) return cliPath;
582
584
  } catch {
583
- return null;
584
585
  }
586
+ const moduleDir = path3.dirname(new URL(import.meta.url).pathname);
587
+ const candidates = [
588
+ path3.resolve(moduleDir, "..", "node_modules", "playwright-core", "cli.js"),
589
+ path3.resolve(moduleDir, "..", "..", "playwright-core", "cli.js"),
590
+ path3.resolve(process.cwd(), "node_modules", "playwright-core", "cli.js"),
591
+ "/usr/lib/node_modules/tamga-vdesktop/node_modules/playwright-core/cli.js",
592
+ "/usr/lib/node_modules/playwright-core/cli.js",
593
+ "/usr/local/lib/node_modules/tamga-vdesktop/node_modules/playwright-core/cli.js",
594
+ "/usr/local/lib/node_modules/playwright-core/cli.js"
595
+ ];
596
+ for (const candidate of candidates) {
597
+ if (fs3.existsSync(candidate)) return candidate;
598
+ }
599
+ return null;
585
600
  }
586
601
  function installPlaywrightBrowserSync(opts) {
587
602
  const existing = findPlaywrightManagedBrowser();
588
- if (existing) return true;
603
+ if (existing && !opts?.withDeps) return true;
589
604
  const cliPath = resolvePlaywrightCliPath();
590
605
  if (!cliPath) {
606
+ if (existing) return true;
591
607
  if (!opts?.quiet) {
592
608
  console.error("[TamgaVDesktop] playwright-core/cli.js bulunamad\u0131.");
593
609
  }
594
610
  return false;
595
611
  }
612
+ const shouldWithDeps = Boolean(
613
+ opts?.withDeps && process.platform === "linux" && typeof process.getuid === "function" && process.getuid() === 0
614
+ );
596
615
  const args = [cliPath, "install", "chromium-headless-shell"];
597
- if (opts?.withDeps && process.platform === "linux" && typeof process.getuid === "function" && process.getuid() === 0) {
598
- args.push("--with-deps");
599
- }
600
- if (opts?.quiet) {
601
- args.push("--no-progress");
602
- }
616
+ if (shouldWithDeps) args.push("--with-deps");
617
+ if (opts?.quiet) args.push("--no-progress");
603
618
  if (!opts?.quiet) {
604
619
  console.log("[TamgaVDesktop] Yerle\u015Fik Playwright Chromium taray\u0131c\u0131s\u0131 kuruluyor...");
605
620
  }
@@ -614,6 +629,7 @@ function installPlaywrightBrowserSync(opts) {
614
629
  return true;
615
630
  }
616
631
  const fallbackArgs = [cliPath, "install", "--only-shell", "chromium"];
632
+ if (shouldWithDeps) fallbackArgs.push("--with-deps");
617
633
  if (opts?.quiet) fallbackArgs.push("--no-progress");
618
634
  const res2 = spawnSync(process.execPath, fallbackArgs, {
619
635
  stdio: opts?.quiet ? "ignore" : "inherit"
@@ -3739,7 +3755,7 @@ var VSCodeServerManager = class {
3739
3755
  };
3740
3756
 
3741
3757
  // server/index.ts
3742
- var TAMGA_VERSION = "1.2.0";
3758
+ var TAMGA_VERSION = "1.2.1";
3743
3759
  var MIME_MAP = {
3744
3760
  html: "text/html; charset=utf-8",
3745
3761
  htm: "text/html; charset=utf-8",
package/dist/server.js CHANGED
@@ -859,10 +859,25 @@ function findPlaywrightManagedBrowser(chromiumRef) {
859
859
  }
860
860
  function resolvePlaywrightCliPath() {
861
861
  try {
862
- return require2.resolve("playwright-core/cli.js");
862
+ const pkgPath = require2.resolve("playwright-core/package.json");
863
+ const cliPath = path2.join(path2.dirname(pkgPath), "cli.js");
864
+ if (fs2.existsSync(cliPath)) return cliPath;
863
865
  } catch {
864
- return null;
865
866
  }
867
+ const moduleDir = path2.dirname(new URL(import.meta.url).pathname);
868
+ const candidates = [
869
+ path2.resolve(moduleDir, "..", "node_modules", "playwright-core", "cli.js"),
870
+ path2.resolve(moduleDir, "..", "..", "playwright-core", "cli.js"),
871
+ path2.resolve(process.cwd(), "node_modules", "playwright-core", "cli.js"),
872
+ "/usr/lib/node_modules/tamga-vdesktop/node_modules/playwright-core/cli.js",
873
+ "/usr/lib/node_modules/playwright-core/cli.js",
874
+ "/usr/local/lib/node_modules/tamga-vdesktop/node_modules/playwright-core/cli.js",
875
+ "/usr/local/lib/node_modules/playwright-core/cli.js"
876
+ ];
877
+ for (const candidate of candidates) {
878
+ if (fs2.existsSync(candidate)) return candidate;
879
+ }
880
+ return null;
866
881
  }
867
882
  async function installPlaywrightBrowserAsync() {
868
883
  if (findPlaywrightManagedBrowser()) return;
@@ -3693,7 +3708,7 @@ var VSCodeServerManager = class {
3693
3708
  };
3694
3709
 
3695
3710
  // server/index.ts
3696
- var TAMGA_VERSION = "1.2.0";
3711
+ var TAMGA_VERSION = "1.2.1";
3697
3712
  var MIME_MAP = {
3698
3713
  html: "text/html; charset=utf-8",
3699
3714
  htm: "text/html; charset=utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamga-vdesktop",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "TamgaVDesktop — Self-hostable Linux Virtual Desktop OS platform with native web shell, real Linux terminal, built-in HiDPI Playwright Chromium browser, and seamless native Linux GUI apps.",