tamga-vdesktop 1.2.1 → 1.2.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/cli.js +43 -27
- package/dist/server.js +16 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -612,43 +612,59 @@ function installPlaywrightBrowserSync(opts) {
|
|
|
612
612
|
const shouldWithDeps = Boolean(
|
|
613
613
|
opts?.withDeps && process.platform === "linux" && typeof process.getuid === "function" && process.getuid() === 0
|
|
614
614
|
);
|
|
615
|
-
const
|
|
616
|
-
if (shouldWithDeps) args.push("--with-deps");
|
|
617
|
-
if (opts?.quiet) args.push("--no-progress");
|
|
615
|
+
const hosts = process.env.PLAYWRIGHT_DOWNLOAD_HOST ? [process.env.PLAYWRIGHT_DOWNLOAD_HOST] : ["", "https://cdn.npmmirror.com/binaries/playwright"];
|
|
618
616
|
if (!opts?.quiet) {
|
|
619
617
|
console.log("[TamgaVDesktop] Yerle\u015Fik Playwright Chromium taray\u0131c\u0131s\u0131 kuruluyor...");
|
|
620
618
|
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
619
|
+
for (let i = 0; i < hosts.length; i++) {
|
|
620
|
+
const host = hosts[i];
|
|
621
|
+
const args = [cliPath, "install", "chromium-headless-shell"];
|
|
622
|
+
if (i === 0 && shouldWithDeps) args.push("--with-deps");
|
|
623
|
+
if (opts?.quiet) args.push("--no-progress");
|
|
624
|
+
const env = {
|
|
624
625
|
...process.env,
|
|
625
626
|
PLAYWRIGHT_SKIP_BROWSER_GC: "1"
|
|
627
|
+
};
|
|
628
|
+
if (host) env.PLAYWRIGHT_DOWNLOAD_HOST = host;
|
|
629
|
+
const res = spawnSync(process.execPath, args, {
|
|
630
|
+
stdio: opts?.quiet ? "ignore" : "inherit",
|
|
631
|
+
env
|
|
632
|
+
});
|
|
633
|
+
if (res.status === 0 && findPlaywrightManagedBrowser()) {
|
|
634
|
+
return true;
|
|
635
|
+
}
|
|
636
|
+
const fallbackArgs = [cliPath, "install", "--only-shell", "chromium"];
|
|
637
|
+
if (i === 0 && shouldWithDeps) fallbackArgs.push("--with-deps");
|
|
638
|
+
if (opts?.quiet) fallbackArgs.push("--no-progress");
|
|
639
|
+
const res2 = spawnSync(process.execPath, fallbackArgs, {
|
|
640
|
+
stdio: opts?.quiet ? "ignore" : "inherit",
|
|
641
|
+
env
|
|
642
|
+
});
|
|
643
|
+
if (res2.status === 0 && findPlaywrightManagedBrowser()) {
|
|
644
|
+
return true;
|
|
626
645
|
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
return true;
|
|
630
|
-
}
|
|
631
|
-
const fallbackArgs = [cliPath, "install", "--only-shell", "chromium"];
|
|
632
|
-
if (shouldWithDeps) fallbackArgs.push("--with-deps");
|
|
633
|
-
if (opts?.quiet) fallbackArgs.push("--no-progress");
|
|
634
|
-
const res2 = spawnSync(process.execPath, fallbackArgs, {
|
|
635
|
-
stdio: opts?.quiet ? "ignore" : "inherit"
|
|
636
|
-
});
|
|
637
|
-
return res2.status === 0 && Boolean(findPlaywrightManagedBrowser());
|
|
646
|
+
}
|
|
647
|
+
return Boolean(findPlaywrightManagedBrowser());
|
|
638
648
|
}
|
|
639
649
|
async function installPlaywrightBrowserAsync() {
|
|
640
650
|
if (findPlaywrightManagedBrowser()) return;
|
|
641
651
|
const cliPath = resolvePlaywrightCliPath();
|
|
642
652
|
if (!cliPath) return;
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
)
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
653
|
+
const hosts = process.env.PLAYWRIGHT_DOWNLOAD_HOST ? [process.env.PLAYWRIGHT_DOWNLOAD_HOST] : ["", "https://cdn.npmmirror.com/binaries/playwright"];
|
|
654
|
+
for (const host of hosts) {
|
|
655
|
+
if (findPlaywrightManagedBrowser()) return;
|
|
656
|
+
const env = { ...process.env, PLAYWRIGHT_SKIP_BROWSER_GC: "1" };
|
|
657
|
+
if (host) env.PLAYWRIGHT_DOWNLOAD_HOST = host;
|
|
658
|
+
await new Promise((resolve) => {
|
|
659
|
+
const child = spawn2(
|
|
660
|
+
process.execPath,
|
|
661
|
+
[cliPath, "install", "chromium-headless-shell", "--no-progress"],
|
|
662
|
+
{ stdio: "ignore", env }
|
|
663
|
+
);
|
|
664
|
+
child.on("exit", () => resolve());
|
|
665
|
+
child.on("error", () => resolve());
|
|
666
|
+
});
|
|
667
|
+
}
|
|
652
668
|
}
|
|
653
669
|
function normalizeUserUrl(rawInput) {
|
|
654
670
|
const trimmed = rawInput.trim();
|
|
@@ -3755,7 +3771,7 @@ var VSCodeServerManager = class {
|
|
|
3755
3771
|
};
|
|
3756
3772
|
|
|
3757
3773
|
// server/index.ts
|
|
3758
|
-
var TAMGA_VERSION = "1.2.
|
|
3774
|
+
var TAMGA_VERSION = "1.2.2";
|
|
3759
3775
|
var MIME_MAP = {
|
|
3760
3776
|
html: "text/html; charset=utf-8",
|
|
3761
3777
|
htm: "text/html; charset=utf-8",
|
package/dist/server.js
CHANGED
|
@@ -883,15 +883,21 @@ async function installPlaywrightBrowserAsync() {
|
|
|
883
883
|
if (findPlaywrightManagedBrowser()) return;
|
|
884
884
|
const cliPath = resolvePlaywrightCliPath();
|
|
885
885
|
if (!cliPath) return;
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
)
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
886
|
+
const hosts = process.env.PLAYWRIGHT_DOWNLOAD_HOST ? [process.env.PLAYWRIGHT_DOWNLOAD_HOST] : ["", "https://cdn.npmmirror.com/binaries/playwright"];
|
|
887
|
+
for (const host of hosts) {
|
|
888
|
+
if (findPlaywrightManagedBrowser()) return;
|
|
889
|
+
const env = { ...process.env, PLAYWRIGHT_SKIP_BROWSER_GC: "1" };
|
|
890
|
+
if (host) env.PLAYWRIGHT_DOWNLOAD_HOST = host;
|
|
891
|
+
await new Promise((resolve) => {
|
|
892
|
+
const child = spawn(
|
|
893
|
+
process.execPath,
|
|
894
|
+
[cliPath, "install", "chromium-headless-shell", "--no-progress"],
|
|
895
|
+
{ stdio: "ignore", env }
|
|
896
|
+
);
|
|
897
|
+
child.on("exit", () => resolve());
|
|
898
|
+
child.on("error", () => resolve());
|
|
899
|
+
});
|
|
900
|
+
}
|
|
895
901
|
}
|
|
896
902
|
function normalizeUserUrl(rawInput) {
|
|
897
903
|
const trimmed = rawInput.trim();
|
|
@@ -3708,7 +3714,7 @@ var VSCodeServerManager = class {
|
|
|
3708
3714
|
};
|
|
3709
3715
|
|
|
3710
3716
|
// server/index.ts
|
|
3711
|
-
var TAMGA_VERSION = "1.2.
|
|
3717
|
+
var TAMGA_VERSION = "1.2.2";
|
|
3712
3718
|
var MIME_MAP = {
|
|
3713
3719
|
html: "text/html; charset=utf-8",
|
|
3714
3720
|
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.
|
|
3
|
+
"version": "1.2.2",
|
|
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.",
|