vibe-kanban-alternative 0.2.44 → 0.2.45
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/bin/cli.js +43 -30
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -32,7 +32,7 @@ var require_package = __commonJS({
|
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "vibe-kanban-alternative",
|
|
34
34
|
private: false,
|
|
35
|
-
version: "0.2.
|
|
35
|
+
version: "0.2.45",
|
|
36
36
|
main: "index.js",
|
|
37
37
|
bin: {
|
|
38
38
|
"vibe-kanban-alternative": "bin/cli.js",
|
|
@@ -803,7 +803,7 @@ async function ensureBinary(platform2, binaryName, onProgress) {
|
|
|
803
803
|
}
|
|
804
804
|
throw new Error(
|
|
805
805
|
`Local binary not found: ${localZipPath}
|
|
806
|
-
Run
|
|
806
|
+
Run ../scripts/local-build.sh first to build the binaries.`
|
|
807
807
|
);
|
|
808
808
|
}
|
|
809
809
|
const cacheDir = import_path.default.join(CACHE_DIR, BINARY_TAG, platform2);
|
|
@@ -844,7 +844,7 @@ async function ensureDesktopBundle(tauriPlatform, onProgress) {
|
|
|
844
844
|
}
|
|
845
845
|
throw new Error(
|
|
846
846
|
`Local desktop bundle not found: ${localDir}
|
|
847
|
-
Run '
|
|
847
|
+
Run '../scripts/local-build.sh --desktop' first to build the Tauri app.`
|
|
848
848
|
);
|
|
849
849
|
}
|
|
850
850
|
const cacheDir = import_path.default.join(
|
|
@@ -936,11 +936,11 @@ function tryCopyApp(srcAppPath, destDir) {
|
|
|
936
936
|
return null;
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
async function installAndLaunchMacOS(bundleInfo) {
|
|
939
|
+
async function installAndLaunchMacOS(bundleInfo, args) {
|
|
940
940
|
const { archivePath, dir } = bundleInfo;
|
|
941
941
|
const sentinel = readSentinel(dir);
|
|
942
942
|
if (sentinel?.appPath && import_fs2.default.existsSync(sentinel.appPath)) {
|
|
943
|
-
return launchMacOSApp(sentinel.appPath);
|
|
943
|
+
return launchMacOSApp(sentinel.appPath, args);
|
|
944
944
|
}
|
|
945
945
|
if (!archivePath || !import_fs2.default.existsSync(archivePath)) {
|
|
946
946
|
throw new Error("No archive to extract for macOS desktop app");
|
|
@@ -968,23 +968,25 @@ async function installAndLaunchMacOS(bundleInfo) {
|
|
|
968
968
|
} catch {
|
|
969
969
|
}
|
|
970
970
|
writeSentinel(dir, { type: "app-tar-gz", appPath: finalAppPath });
|
|
971
|
-
return launchMacOSApp(finalAppPath);
|
|
971
|
+
return launchMacOSApp(finalAppPath, args);
|
|
972
972
|
}
|
|
973
|
-
function launchMacOSApp(appPath) {
|
|
973
|
+
function launchMacOSApp(appPath, args) {
|
|
974
974
|
const appName = import_path2.default.basename(appPath);
|
|
975
975
|
console.error(`Launching ${appName}...`);
|
|
976
|
-
const
|
|
976
|
+
const openArgs = ["--wait-apps", appPath];
|
|
977
|
+
if (args.length > 0) openArgs.push("--args", ...args);
|
|
978
|
+
const proc = (0, import_child_process.spawn)("open", openArgs, {
|
|
977
979
|
stdio: "inherit"
|
|
978
980
|
});
|
|
979
981
|
return new Promise((resolve) => {
|
|
980
982
|
proc.on("exit", (code) => resolve(code || 0));
|
|
981
983
|
});
|
|
982
984
|
}
|
|
983
|
-
async function installAndLaunchLinux(bundleInfo) {
|
|
985
|
+
async function installAndLaunchLinux(bundleInfo, args) {
|
|
984
986
|
const { archivePath, dir } = bundleInfo;
|
|
985
987
|
const sentinel = readSentinel(dir);
|
|
986
988
|
if (sentinel?.appPath && import_fs2.default.existsSync(sentinel.appPath)) {
|
|
987
|
-
return launchLinuxAppImage(sentinel.appPath);
|
|
989
|
+
return launchLinuxAppImage(sentinel.appPath, args);
|
|
988
990
|
}
|
|
989
991
|
if (!archivePath || !import_fs2.default.existsSync(archivePath)) {
|
|
990
992
|
throw new Error("No archive to extract for Linux desktop app");
|
|
@@ -1000,12 +1002,12 @@ async function installAndLaunchLinux(bundleInfo) {
|
|
|
1000
1002
|
type: "appimage-tar-gz",
|
|
1001
1003
|
appPath: appImagePath
|
|
1002
1004
|
});
|
|
1003
|
-
return launchLinuxAppImage(appImagePath);
|
|
1005
|
+
return launchLinuxAppImage(appImagePath, args);
|
|
1004
1006
|
}
|
|
1005
|
-
function launchLinuxAppImage(appImagePath) {
|
|
1007
|
+
function launchLinuxAppImage(appImagePath, args) {
|
|
1006
1008
|
const appImage = import_path2.default.basename(appImagePath);
|
|
1007
1009
|
console.error(`Launching ${appImage}...`);
|
|
1008
|
-
const proc = (0, import_child_process.spawn)(appImagePath,
|
|
1010
|
+
const proc = (0, import_child_process.spawn)(appImagePath, args, {
|
|
1009
1011
|
stdio: "inherit",
|
|
1010
1012
|
detached: false
|
|
1011
1013
|
});
|
|
@@ -1013,13 +1015,13 @@ function launchLinuxAppImage(appImagePath) {
|
|
|
1013
1015
|
proc.on("exit", (code) => resolve(code || 0));
|
|
1014
1016
|
});
|
|
1015
1017
|
}
|
|
1016
|
-
async function installAndLaunchWindows(bundleInfo) {
|
|
1018
|
+
async function installAndLaunchWindows(bundleInfo, args) {
|
|
1017
1019
|
const { dir } = bundleInfo;
|
|
1018
1020
|
const sentinel = readSentinel(dir);
|
|
1019
1021
|
if (sentinel?.appPath) {
|
|
1020
1022
|
const appExe2 = import_path2.default.join(sentinel.appPath, "Vibe Kanban.exe");
|
|
1021
1023
|
if (import_fs2.default.existsSync(appExe2)) {
|
|
1022
|
-
return launchWindowsApp(appExe2);
|
|
1024
|
+
return launchWindowsApp(appExe2, args);
|
|
1023
1025
|
}
|
|
1024
1026
|
}
|
|
1025
1027
|
const files = import_fs2.default.readdirSync(dir);
|
|
@@ -1051,9 +1053,7 @@ async function installAndLaunchWindows(bundleInfo) {
|
|
|
1051
1053
|
type: "nsis-exe",
|
|
1052
1054
|
appPath: defaultDir
|
|
1053
1055
|
});
|
|
1054
|
-
return launchWindowsApp(
|
|
1055
|
-
import_path2.default.join(defaultDir, "Vibe Kanban.exe")
|
|
1056
|
-
);
|
|
1056
|
+
return launchWindowsApp(import_path2.default.join(defaultDir, "Vibe Kanban.exe"), args);
|
|
1057
1057
|
}
|
|
1058
1058
|
console.error(
|
|
1059
1059
|
"Installation complete. Please launch Vibe Kanban from your Start menu."
|
|
@@ -1063,25 +1063,25 @@ async function installAndLaunchWindows(bundleInfo) {
|
|
|
1063
1063
|
writeSentinel(dir, { type: "nsis-exe", appPath: installDir });
|
|
1064
1064
|
const appExe = import_path2.default.join(installDir, "Vibe Kanban.exe");
|
|
1065
1065
|
if (import_fs2.default.existsSync(appExe)) {
|
|
1066
|
-
return launchWindowsApp(appExe);
|
|
1066
|
+
return launchWindowsApp(appExe, args);
|
|
1067
1067
|
}
|
|
1068
1068
|
console.error(
|
|
1069
1069
|
"Installation complete. Please launch Vibe Kanban from your Start menu."
|
|
1070
1070
|
);
|
|
1071
1071
|
return 0;
|
|
1072
1072
|
}
|
|
1073
|
-
function launchWindowsApp(appExe) {
|
|
1073
|
+
function launchWindowsApp(appExe, args) {
|
|
1074
1074
|
console.error("Launching Vibe Kanban...");
|
|
1075
|
-
(0, import_child_process.spawn)(appExe,
|
|
1075
|
+
(0, import_child_process.spawn)(appExe, args, { detached: true, stdio: "ignore" }).unref();
|
|
1076
1076
|
return 0;
|
|
1077
1077
|
}
|
|
1078
|
-
async function installAndLaunch(bundleInfo, osPlatform) {
|
|
1078
|
+
async function installAndLaunch(bundleInfo, osPlatform, args = []) {
|
|
1079
1079
|
if (osPlatform === "darwin") {
|
|
1080
|
-
return installAndLaunchMacOS(bundleInfo);
|
|
1080
|
+
return installAndLaunchMacOS(bundleInfo, args);
|
|
1081
1081
|
} else if (osPlatform === "linux") {
|
|
1082
|
-
return installAndLaunchLinux(bundleInfo);
|
|
1082
|
+
return installAndLaunchLinux(bundleInfo, args);
|
|
1083
1083
|
} else if (osPlatform === "win32") {
|
|
1084
|
-
return installAndLaunchWindows(bundleInfo);
|
|
1084
|
+
return installAndLaunchWindows(bundleInfo, args);
|
|
1085
1085
|
}
|
|
1086
1086
|
throw new Error(
|
|
1087
1087
|
`Desktop app not supported on platform: ${osPlatform}`
|
|
@@ -1275,8 +1275,12 @@ async function runTui(args) {
|
|
|
1275
1275
|
process.on("SIGTERM", () => proc.kill("SIGTERM"));
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
1278
|
-
async function runMain(desktopMode) {
|
|
1278
|
+
async function runMain(desktopMode, cloudMode) {
|
|
1279
1279
|
checkForUpdates();
|
|
1280
|
+
const launchEnv = {
|
|
1281
|
+
...process.env,
|
|
1282
|
+
...cloudMode ? { VIBE_KANBAN_MODE: "cloud" } : {}
|
|
1283
|
+
};
|
|
1280
1284
|
const modeLabel = LOCAL_DEV_MODE ? " (local dev)" : "";
|
|
1281
1285
|
const tauriPlatform = getTauriPlatform(platformDir);
|
|
1282
1286
|
if (desktopMode && tauriPlatform) {
|
|
@@ -1294,7 +1298,11 @@ async function runMain(desktopMode) {
|
|
|
1294
1298
|
showProgress
|
|
1295
1299
|
);
|
|
1296
1300
|
console.error("");
|
|
1297
|
-
const exitCode = await installAndLaunch(
|
|
1301
|
+
const exitCode = await installAndLaunch(
|
|
1302
|
+
bundleInfo,
|
|
1303
|
+
platform,
|
|
1304
|
+
cloudMode ? ["--cloud"] : []
|
|
1305
|
+
);
|
|
1298
1306
|
process.exit(exitCode);
|
|
1299
1307
|
} catch (err) {
|
|
1300
1308
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -1305,7 +1313,7 @@ async function runMain(desktopMode) {
|
|
|
1305
1313
|
}
|
|
1306
1314
|
console.log(`Starting vibe-kanban-alternative v${CLI_VERSION}${modeLabel}...`);
|
|
1307
1315
|
await extractAndRun("vibe-kanban", (bin) => {
|
|
1308
|
-
(0, import_child_process2.execSync)(`"${bin}"`, { stdio: "inherit" });
|
|
1316
|
+
(0, import_child_process2.execSync)(`"${bin}"`, { stdio: "inherit", env: launchEnv });
|
|
1309
1317
|
});
|
|
1310
1318
|
}
|
|
1311
1319
|
function normalizeArgv(argv) {
|
|
@@ -1334,8 +1342,13 @@ function runOrExit(task) {
|
|
|
1334
1342
|
async function main() {
|
|
1335
1343
|
import_fs3.default.mkdirSync(versionCacheDir, { recursive: true });
|
|
1336
1344
|
const cli = cac("vibe-kanban-alternative");
|
|
1337
|
-
cli.command("[...args]", "Launch the local vibe-kanban app").option("--desktop", "Launch the desktop app instead of browser mode").option("--window, -w", "Launch in desktop window mode (alias for --desktop)").allowUnknownOptions().action((_args, options) => {
|
|
1338
|
-
runOrExit(
|
|
1345
|
+
cli.command("[...args]", "Launch the local vibe-kanban app").option("--desktop", "Launch the desktop app instead of browser mode").option("--window, -w", "Launch in desktop window mode (alias for --desktop)").option("--cloud", "Launch with cloud-mode authentication controls").allowUnknownOptions().action((_args, options) => {
|
|
1346
|
+
runOrExit(
|
|
1347
|
+
runMain(
|
|
1348
|
+
Boolean(options.desktop || options.window || options.w),
|
|
1349
|
+
Boolean(options.cloud)
|
|
1350
|
+
)
|
|
1351
|
+
);
|
|
1339
1352
|
});
|
|
1340
1353
|
cli.command("review [...args]", "Run the review CLI").allowUnknownOptions().action((args) => {
|
|
1341
1354
|
runOrExit(runReview(args));
|