cartethyia 2.6.0 → 2.6.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/dashboard/assets/{BannedPage-l6XMnfr9.js → BannedPage-BMFQM5pm.js} +1 -1
- package/dist/dashboard/assets/BannedPage-BMFQM5pm.js.gz +0 -0
- package/dist/dashboard/assets/{CliToolDetailPage-DwOzAW45.js → CliToolDetailPage-BP-8qZqc.js} +1 -1
- package/dist/dashboard/assets/CliToolDetailPage-BP-8qZqc.js.gz +0 -0
- package/dist/dashboard/assets/{CliToolsPage-BT3Up3QA.js → CliToolsPage-DpJeG_Op.js} +1 -1
- package/dist/dashboard/assets/CliToolsPage-DpJeG_Op.js.gz +0 -0
- package/dist/dashboard/assets/{CombosPage-6kYIUpzR.js → CombosPage-jNI-D44o.js} +1 -1
- package/dist/dashboard/assets/CombosPage-jNI-D44o.js.gz +0 -0
- package/dist/dashboard/assets/{ConsoleLogPage-zRnj1mlR.js → ConsoleLogPage-CQpDMg8K.js} +1 -1
- package/dist/dashboard/assets/ConsoleLogPage-CQpDMg8K.js.gz +0 -0
- package/dist/dashboard/assets/{CustomizationPage-C7m-H1Rz.js → CustomizationPage-DKU4KjlR.js} +1 -1
- package/dist/dashboard/assets/CustomizationPage-DKU4KjlR.js.gz +0 -0
- package/dist/dashboard/assets/{HealthEventsModal-C8MR_BdB.js → HealthEventsModal-DUKqhSoT.js} +1 -1
- package/dist/dashboard/assets/HealthEventsModal-DUKqhSoT.js.gz +0 -0
- package/dist/dashboard/assets/{LoginPage-CbphLvjg.js → LoginPage-DaUYRu4n.js} +1 -1
- package/dist/dashboard/assets/LoginPage-DaUYRu4n.js.gz +0 -0
- package/dist/dashboard/assets/{OverviewPage-DABu2Wgt.js → OverviewPage-Cvo6sK7M.js} +1 -1
- package/dist/dashboard/assets/OverviewPage-Cvo6sK7M.js.gz +0 -0
- package/dist/dashboard/assets/{ProviderDetailPage-C15x9q13.js → ProviderDetailPage-BrL6Yl9w.js} +1 -1
- package/dist/dashboard/assets/ProviderDetailPage-BrL6Yl9w.js.gz +0 -0
- package/dist/dashboard/assets/{ProvidersPage-Dfb2896L.js → ProvidersPage-CIo_CRe_.js} +1 -1
- package/dist/dashboard/assets/ProvidersPage-CIo_CRe_.js.gz +0 -0
- package/dist/dashboard/assets/{ProxyPage-BaCIdAUt.js → ProxyPage-BrsHDiRx.js} +1 -1
- package/dist/dashboard/assets/ProxyPage-BrsHDiRx.js.gz +0 -0
- package/dist/dashboard/assets/{QuotaPage-BsdoCIw1.js → QuotaPage-DkUwJFpM.js} +1 -1
- package/dist/dashboard/assets/QuotaPage-DkUwJFpM.js.gz +0 -0
- package/dist/dashboard/assets/{SettingsPage-KVJFh3Ip.js → SettingsPage-BXK4gIFl.js} +1 -1
- package/dist/dashboard/assets/SettingsPage-BXK4gIFl.js.gz +0 -0
- package/dist/dashboard/assets/{SetupPage-D4g6vOGc.js → SetupPage-BiIPnecp.js} +1 -1
- package/dist/dashboard/assets/SetupPage-BiIPnecp.js.gz +0 -0
- package/dist/dashboard/assets/{SortableList-C93i14BD.js → SortableList-CclP89S9.js} +1 -1
- package/dist/dashboard/assets/SortableList-CclP89S9.js.gz +0 -0
- package/dist/dashboard/assets/{StudioPage-SgQpymjm.js → StudioPage-Djt-Mk-N.js} +1 -1
- package/dist/dashboard/assets/StudioPage-Djt-Mk-N.js.gz +0 -0
- package/dist/dashboard/assets/{UsagePage-BFME-eba.js → UsagePage-DaGf9BI1.js} +1 -1
- package/dist/dashboard/assets/UsagePage-DaGf9BI1.js.gz +0 -0
- package/dist/dashboard/assets/{entry-CwPRKk0d.js → entry-BY4QChsA.js} +3 -3
- package/dist/dashboard/assets/entry-BY4QChsA.js.gz +0 -0
- package/dist/dashboard/assets/{index-Bblu6erR.js → index-isGWt18Z.js} +2 -2
- package/dist/dashboard/assets/index-isGWt18Z.js.gz +0 -0
- package/dist/dashboard/assets/{select-C980c4cz.js → select-Dpp8tE7Z.js} +1 -1
- package/dist/dashboard/assets/select-Dpp8tE7Z.js.gz +0 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/dashboard/index.html.gz +0 -0
- package/dist/dashboard/precompressed-assets.json +21 -21
- package/package.json +2 -2
- package/scripts/cli/background.ts +4 -1
- package/scripts/cli/bin/cartethyia.cjs +11 -1
- package/scripts/cli/console-menu.ts +24 -8
- package/scripts/cli/main.ts +21 -1
- package/scripts/cli/tray/hidden-window.vbs +16 -2
- package/scripts/cli/update.ts +38 -2
- package/dist/dashboard/assets/BannedPage-l6XMnfr9.js.gz +0 -0
- package/dist/dashboard/assets/CliToolDetailPage-DwOzAW45.js.gz +0 -0
- package/dist/dashboard/assets/CliToolsPage-BT3Up3QA.js.gz +0 -0
- package/dist/dashboard/assets/CombosPage-6kYIUpzR.js.gz +0 -0
- package/dist/dashboard/assets/ConsoleLogPage-zRnj1mlR.js.gz +0 -0
- package/dist/dashboard/assets/CustomizationPage-C7m-H1Rz.js.gz +0 -0
- package/dist/dashboard/assets/HealthEventsModal-C8MR_BdB.js.gz +0 -0
- package/dist/dashboard/assets/LoginPage-CbphLvjg.js.gz +0 -0
- package/dist/dashboard/assets/OverviewPage-DABu2Wgt.js.gz +0 -0
- package/dist/dashboard/assets/ProviderDetailPage-C15x9q13.js.gz +0 -0
- package/dist/dashboard/assets/ProvidersPage-Dfb2896L.js.gz +0 -0
- package/dist/dashboard/assets/ProxyPage-BaCIdAUt.js.gz +0 -0
- package/dist/dashboard/assets/QuotaPage-BsdoCIw1.js.gz +0 -0
- package/dist/dashboard/assets/SettingsPage-KVJFh3Ip.js.gz +0 -0
- package/dist/dashboard/assets/SetupPage-D4g6vOGc.js.gz +0 -0
- package/dist/dashboard/assets/SortableList-C93i14BD.js.gz +0 -0
- package/dist/dashboard/assets/StudioPage-SgQpymjm.js.gz +0 -0
- package/dist/dashboard/assets/UsagePage-BFME-eba.js.gz +0 -0
- package/dist/dashboard/assets/entry-CwPRKk0d.js.gz +0 -0
- package/dist/dashboard/assets/index-Bblu6erR.js.gz +0 -0
- package/dist/dashboard/assets/select-C980c4cz.js.gz +0 -0
package/scripts/cli/update.ts
CHANGED
|
@@ -14,6 +14,29 @@ export function updateCommand(): string {
|
|
|
14
14
|
return "npm install -g cartethyia@latest --prefer-online";
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Processes still running out of the package directory, so npm can rename it.
|
|
19
|
+
*
|
|
20
|
+
* The rename is the whole install on Windows, and it fails with EBUSY while
|
|
21
|
+
* anything holds the directory — including a hold that outlives the process
|
|
22
|
+
* that took it. `carte` itself runs from that directory, so the install has to
|
|
23
|
+
* wait until this process is gone; these are the others.
|
|
24
|
+
*/
|
|
25
|
+
function stopHoldingProcesses(): void {
|
|
26
|
+
if (process.platform !== "win32") return;
|
|
27
|
+
// `taskkill` filters on the window title and image name only, so it is asked
|
|
28
|
+
// for the two processes this CLI can leave behind. /T takes the tree, so a
|
|
29
|
+
// detached gateway started by a tray goes with it.
|
|
30
|
+
for (const image of ["cartethyia.exe", "carte.exe"]) {
|
|
31
|
+
try {
|
|
32
|
+
spawn("taskkill", ["/F", "/T", "/IM", image], { stdio: "ignore" }).unref();
|
|
33
|
+
} catch {
|
|
34
|
+
// A missing taskkill is not the install's problem; npm will report the
|
|
35
|
+
// hold if one is left.
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
17
40
|
export function runDetachedUpdate(): void {
|
|
18
41
|
const isWin = process.platform === "win32";
|
|
19
42
|
const shell = isWin ? "cmd.exe" : "/bin/sh";
|
|
@@ -23,6 +46,7 @@ export function runDetachedUpdate(): void {
|
|
|
23
46
|
: "systemctl restart cartethyia 2>/dev/null || cartethyia start";
|
|
24
47
|
const script = `${install} && ${restart}`;
|
|
25
48
|
const args = isWin ? ["/c", script] : ["-c", script];
|
|
49
|
+
stopHoldingProcesses();
|
|
26
50
|
const child = spawn(shell, args, {
|
|
27
51
|
detached: true,
|
|
28
52
|
stdio: "ignore",
|
|
@@ -34,7 +58,19 @@ export function printUpdateInstructions(from: string, to: string | null): void {
|
|
|
34
58
|
console.log("");
|
|
35
59
|
console.log(`Update available: ${from} \u2192 ${to ?? "latest"}`);
|
|
36
60
|
console.log("");
|
|
37
|
-
|
|
38
|
-
|
|
61
|
+
// Names the one thing that actually breaks this install: npm cannot rename
|
|
62
|
+
// the package directory while any process still holds it, and on Windows the
|
|
63
|
+
// hold survives the process that took it — so a detached install that starts
|
|
64
|
+
// before this one has let go fails with EBUSY and the version never changes.
|
|
65
|
+
// The operator cannot fix that from inside the running CLI; they have to stop
|
|
66
|
+
// running out of the directory being replaced.
|
|
67
|
+
console.log("Detached update started; it installs in the background.");
|
|
68
|
+
console.log("");
|
|
69
|
+
console.log("Close this terminal, then run `carte` again.");
|
|
70
|
+
console.log("The install needs this window closed: npm cannot replace the");
|
|
71
|
+
console.log("package directory while a process is still running from it.");
|
|
72
|
+
console.log("");
|
|
73
|
+
console.log("If `carte` still shows the old version afterwards, run:");
|
|
74
|
+
console.log(` ${updateCommand()}`);
|
|
39
75
|
console.log("");
|
|
40
76
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|