runbay 0.1.5 → 0.1.6
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/out/main/index.js +11 -3
- package/package.json +1 -1
package/out/main/index.js
CHANGED
|
@@ -609,7 +609,8 @@ function applyIgnored(apps2) {
|
|
|
609
609
|
}
|
|
610
610
|
async function listProvider(provider, onBatch) {
|
|
611
611
|
const outdatedPromise = provider.checkOutdated ? provider.checkOutdated().catch(() => ({})) : Promise.resolve({});
|
|
612
|
-
const
|
|
612
|
+
const self = electron.app.getAppPath().toLowerCase();
|
|
613
|
+
const apps2 = (await provider.list()).filter((a) => a.path?.toLowerCase() !== self);
|
|
613
614
|
applyIgnored(apps2);
|
|
614
615
|
onBatch?.(apps2);
|
|
615
616
|
const outdated = await outdatedPromise;
|
|
@@ -720,7 +721,11 @@ async function applySelfUpdate() {
|
|
|
720
721
|
const root = await globalRoot();
|
|
721
722
|
const shim = node_path.join(node_path.dirname(root), `${PKG}.cmd`);
|
|
722
723
|
const script = node_path.join(electron.app.getPath("userData"), "update.cmd");
|
|
724
|
+
const vbs = node_path.join(electron.app.getPath("userData"), "update-hidden.vbs");
|
|
723
725
|
const log = node_path.join(electron.app.getPath("userData"), "update.log");
|
|
726
|
+
const appDir = electron.app.getAppPath();
|
|
727
|
+
const electronExe = node_path.join(appDir, "node_modules", "electron", "dist", "electron.exe");
|
|
728
|
+
const relaunch = node_fs.existsSync(electronExe) ? `start "" "${electronExe}" "${appDir}"` : `start "" "${shim}"`;
|
|
724
729
|
const install = `call npm install -g ${PKG}@${target}${registryFlag}`;
|
|
725
730
|
const body = [
|
|
726
731
|
"@echo off",
|
|
@@ -732,13 +737,16 @@ async function applySelfUpdate() {
|
|
|
732
737
|
// le registre met parfois une minute à propager une publication prouvée
|
|
733
738
|
`${install} --prefer-online >> "${log}" 2>&1`,
|
|
734
739
|
")",
|
|
735
|
-
|
|
740
|
+
relaunch,
|
|
741
|
+
`del "${vbs}"`,
|
|
736
742
|
'del "%~f0"',
|
|
737
743
|
""
|
|
738
744
|
].join("\r\n");
|
|
739
745
|
try {
|
|
746
|
+
node_fs.writeFileSync(vbs, `CreateObject("WScript.Shell").Run """${script}""", 0, False\r
|
|
747
|
+
`);
|
|
740
748
|
node_fs.writeFileSync(script, body);
|
|
741
|
-
node_child_process.spawn(
|
|
749
|
+
node_child_process.spawn("wscript.exe", [vbs], { stdio: "ignore" }).unref();
|
|
742
750
|
} catch (err) {
|
|
743
751
|
return { state: "error", message: err instanceof Error ? err.message : String(err) };
|
|
744
752
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runbay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Not an installer. A launcher. Detect, launch, update and uninstall apps installed from the command line (npm, pnpm, yarn, bun, scoop) — in one modern window.",
|
|
5
5
|
"main": "./out/main/index.js",
|
|
6
6
|
"bin": {
|