omo-suites 1.7.1 → 1.7.3
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/CHANGELOG.md +16 -0
- package/dist/cli/omocs.js +187 -84
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to OMO Suites will be documented in this file.
|
|
|
5
5
|
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.7.3] - 2026-03-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- TUI dashboard now shows correct version (was hardcoded 1.2.0/1.1.0)
|
|
12
|
+
- Version resolution walks up directories to find package.json in all install contexts
|
|
13
|
+
|
|
14
|
+
## [1.7.2] - 2026-03-07
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- **Launchboard auto-downloads from GitHub when not bundled** — npm installs no longer skip Launchboard with "not found"
|
|
18
|
+
- When `packages/launchboard/` is missing (npm install), auto-clones from GitHub to `~/.omocs/launchboard/`
|
|
19
|
+
- Persistent location (`~/.omocs/launchboard/`) survives npm updates — only downloads once
|
|
20
|
+
- Both `omocs init` (Step 4) and `omocs launchboard setup/start` now use shared resolver
|
|
21
|
+
- Cross-platform support: works on Windows, macOS, and Linux
|
|
22
|
+
- Clear error message when git is not installed
|
|
23
|
+
|
|
8
24
|
## [1.7.1] - 2026-03-07
|
|
9
25
|
|
|
10
26
|
### Fixed
|
package/dist/cli/omocs.js
CHANGED
|
@@ -762,13 +762,29 @@ function renderNarrow(ctx, cols, rows, output) {
|
|
|
762
762
|
output.push(gold(BOX.vertical) + padEnd(foot, w - 2) + gold(BOX.vertical));
|
|
763
763
|
output.push(gold(BOX.bottomLeft + BOX.horizontal.repeat(w - 2) + BOX.bottomRight));
|
|
764
764
|
}
|
|
765
|
-
var __pkgDir, VERSION = "
|
|
765
|
+
var __pkgDir, VERSION = "unknown", MENU_ITEMS;
|
|
766
766
|
var init_renderer = __esm(() => {
|
|
767
767
|
init_utils();
|
|
768
768
|
__pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
769
769
|
try {
|
|
770
|
-
|
|
771
|
-
|
|
770
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
771
|
+
let found = false;
|
|
772
|
+
for (let i = 0;i < 5; i++) {
|
|
773
|
+
const candidate = resolve2(dir, "package.json");
|
|
774
|
+
try {
|
|
775
|
+
const pkg = JSON.parse(readFileSync2(candidate, "utf-8"));
|
|
776
|
+
if (pkg.name === "omo-suites" || pkg.name === "omocs") {
|
|
777
|
+
VERSION = pkg.version;
|
|
778
|
+
found = true;
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
} catch {}
|
|
782
|
+
dir = dirname(dir);
|
|
783
|
+
}
|
|
784
|
+
if (!found) {
|
|
785
|
+
const pkg = JSON.parse(readFileSync2(resolve2(__pkgDir, "package.json"), "utf-8"));
|
|
786
|
+
VERSION = pkg.version;
|
|
787
|
+
}
|
|
772
788
|
} catch {}
|
|
773
789
|
MENU_ITEMS = ["Profile", "Agents", "MCP", "LSP", "Doctor", "Stats", "Launchboard"];
|
|
774
790
|
});
|
|
@@ -2729,7 +2745,7 @@ async function executeCommand(input) {
|
|
|
2729
2745
|
case "stats":
|
|
2730
2746
|
return await statsCommand();
|
|
2731
2747
|
case "version":
|
|
2732
|
-
return [goldBold(`OMO Suites v${
|
|
2748
|
+
return [goldBold(`OMO Suites v${VERSION}`)];
|
|
2733
2749
|
case "clear":
|
|
2734
2750
|
return [];
|
|
2735
2751
|
case "quit":
|
|
@@ -2970,7 +2986,7 @@ function formatNumber2(n) {
|
|
|
2970
2986
|
return (n / 1000).toFixed(1) + "K";
|
|
2971
2987
|
return String(n);
|
|
2972
2988
|
}
|
|
2973
|
-
var
|
|
2989
|
+
var COMMAND_LIST;
|
|
2974
2990
|
var init_commands = __esm(() => {
|
|
2975
2991
|
init_agents();
|
|
2976
2992
|
init_profiles();
|
|
@@ -2980,6 +2996,7 @@ var init_commands = __esm(() => {
|
|
|
2980
2996
|
init_opencode();
|
|
2981
2997
|
init_shell();
|
|
2982
2998
|
init_utils();
|
|
2999
|
+
init_renderer();
|
|
2983
3000
|
COMMAND_LIST = [
|
|
2984
3001
|
"help",
|
|
2985
3002
|
"test",
|
|
@@ -33370,10 +33387,87 @@ var init_detect = __esm(() => {
|
|
|
33370
33387
|
};
|
|
33371
33388
|
});
|
|
33372
33389
|
|
|
33373
|
-
// src/
|
|
33390
|
+
// src/utils/launchboard-resolver.ts
|
|
33374
33391
|
import { execSync as execSync3 } from "child_process";
|
|
33375
|
-
import { existsSync as existsSync7,
|
|
33392
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync4, rmSync } from "fs";
|
|
33376
33393
|
import { resolve as resolve5, dirname as dirname5 } from "path";
|
|
33394
|
+
import { homedir as homedir5 } from "os";
|
|
33395
|
+
function resolveLaunchboardDir() {
|
|
33396
|
+
const bundledDir = resolve5(dirname5(new URL(import.meta.url).pathname), "../../packages/launchboard");
|
|
33397
|
+
if (existsSync7(bundledDir)) {
|
|
33398
|
+
return { dir: bundledDir };
|
|
33399
|
+
}
|
|
33400
|
+
const persistentDir = resolve5(homedir5(), ".omocs", "launchboard");
|
|
33401
|
+
if (existsSync7(persistentDir)) {
|
|
33402
|
+
return { dir: persistentDir };
|
|
33403
|
+
}
|
|
33404
|
+
const cloneSpinner = ora("Downloading Launchboard from GitHub...").start();
|
|
33405
|
+
const tmpDir = resolve5(homedir5(), ".omocs", ".launchboard-clone-tmp");
|
|
33406
|
+
try {
|
|
33407
|
+
const omocsDir = resolve5(homedir5(), ".omocs");
|
|
33408
|
+
if (!existsSync7(omocsDir)) {
|
|
33409
|
+
mkdirSync4(omocsDir, { recursive: true });
|
|
33410
|
+
}
|
|
33411
|
+
if (existsSync7(tmpDir)) {
|
|
33412
|
+
cleanupDir(tmpDir);
|
|
33413
|
+
}
|
|
33414
|
+
execSync3(`git clone ${GITHUB_REPO} --depth 1 "${tmpDir}"`, {
|
|
33415
|
+
stdio: "pipe",
|
|
33416
|
+
timeout: 120000
|
|
33417
|
+
});
|
|
33418
|
+
const srcDir = resolve5(tmpDir, "packages", "launchboard");
|
|
33419
|
+
if (existsSync7(srcDir)) {
|
|
33420
|
+
copyDir(srcDir, persistentDir);
|
|
33421
|
+
cloneSpinner.succeed("Launchboard downloaded from GitHub");
|
|
33422
|
+
cleanupDir(tmpDir);
|
|
33423
|
+
return { dir: persistentDir };
|
|
33424
|
+
} else {
|
|
33425
|
+
cloneSpinner.fail("Launchboard package not found in repository");
|
|
33426
|
+
cleanupDir(tmpDir);
|
|
33427
|
+
return { dir: null, message: "Launchboard package not found in GitHub repository." };
|
|
33428
|
+
}
|
|
33429
|
+
} catch (e) {
|
|
33430
|
+
cloneSpinner.fail("Failed to download Launchboard from GitHub");
|
|
33431
|
+
try {
|
|
33432
|
+
cleanupDir(tmpDir);
|
|
33433
|
+
} catch {}
|
|
33434
|
+
try {
|
|
33435
|
+
execSync3("git --version", { stdio: "pipe" });
|
|
33436
|
+
} catch {
|
|
33437
|
+
return { dir: null, message: "Git is not installed. Install git and retry, or clone manually." };
|
|
33438
|
+
}
|
|
33439
|
+
return { dir: null, message: `Failed to download Launchboard: ${e.message || "unknown error"}` };
|
|
33440
|
+
}
|
|
33441
|
+
}
|
|
33442
|
+
function copyDir(src, dest) {
|
|
33443
|
+
if (process.platform === "win32") {
|
|
33444
|
+
execSync3(`xcopy "${src}" "${dest}" /E /I /Q`, { stdio: "pipe" });
|
|
33445
|
+
} else {
|
|
33446
|
+
execSync3(`cp -r "${src}" "${dest}"`, { stdio: "pipe" });
|
|
33447
|
+
}
|
|
33448
|
+
}
|
|
33449
|
+
function cleanupDir(dir) {
|
|
33450
|
+
if (!existsSync7(dir))
|
|
33451
|
+
return;
|
|
33452
|
+
try {
|
|
33453
|
+
rmSync(dir, { recursive: true, force: true });
|
|
33454
|
+
} catch {
|
|
33455
|
+
if (process.platform === "win32") {
|
|
33456
|
+
execSync3(`rmdir /s /q "${dir}"`, { stdio: "pipe" });
|
|
33457
|
+
} else {
|
|
33458
|
+
execSync3(`rm -rf "${dir}"`, { stdio: "pipe" });
|
|
33459
|
+
}
|
|
33460
|
+
}
|
|
33461
|
+
}
|
|
33462
|
+
var GITHUB_REPO = "https://github.com/TheFahmi/omo-suites-installer.git";
|
|
33463
|
+
var init_launchboard_resolver = __esm(() => {
|
|
33464
|
+
init_ora();
|
|
33465
|
+
});
|
|
33466
|
+
|
|
33467
|
+
// src/commands/init.ts
|
|
33468
|
+
import { execSync as execSync4 } from "child_process";
|
|
33469
|
+
import { existsSync as existsSync8, readFileSync as readFileSync10, writeFileSync as writeFileSync5, mkdirSync as mkdirSync5 } from "fs";
|
|
33470
|
+
import { resolve as resolve6, dirname as dirname6 } from "path";
|
|
33377
33471
|
function registerInitCommand(program2) {
|
|
33378
33472
|
program2.command("init").description("Interactive setup wizard — configure OMOCS for the first time").option("-f, --force", "Overwrite existing configuration").action(async (options) => {
|
|
33379
33473
|
try {
|
|
@@ -33407,7 +33501,7 @@ function registerInitCommand(program2) {
|
|
|
33407
33501
|
} else {
|
|
33408
33502
|
ohmySpinner.text = "Installing oh-my-opencode...";
|
|
33409
33503
|
try {
|
|
33410
|
-
|
|
33504
|
+
execSync4("npm install -g oh-my-opencode 2>/dev/null || bun add -g oh-my-opencode 2>/dev/null", { stdio: "pipe" });
|
|
33411
33505
|
ohmySpinner.succeed("oh-my-opencode installed");
|
|
33412
33506
|
} catch {
|
|
33413
33507
|
ohmySpinner.warn("Could not auto-install oh-my-opencode. Add manually to opencode.json plugins.");
|
|
@@ -33418,7 +33512,7 @@ function registerInitCommand(program2) {
|
|
|
33418
33512
|
try {
|
|
33419
33513
|
const opencodeConfigPath = findOpencodeConfig();
|
|
33420
33514
|
let opencodeConfig = {};
|
|
33421
|
-
if (
|
|
33515
|
+
if (existsSync8(opencodeConfigPath)) {
|
|
33422
33516
|
opencodeConfig = JSON.parse(readFileSync10(opencodeConfigPath, "utf-8"));
|
|
33423
33517
|
}
|
|
33424
33518
|
if (!opencodeConfig.plugin)
|
|
@@ -33429,9 +33523,9 @@ function registerInitCommand(program2) {
|
|
|
33429
33523
|
if (!opencodeConfig.plugin.includes("omocs") && !opencodeConfig.plugin.some((p) => p.includes("omocs"))) {
|
|
33430
33524
|
opencodeConfig.plugin.push("omocs");
|
|
33431
33525
|
}
|
|
33432
|
-
const configDir =
|
|
33433
|
-
if (!
|
|
33434
|
-
|
|
33526
|
+
const configDir = dirname6(opencodeConfigPath);
|
|
33527
|
+
if (!existsSync8(configDir)) {
|
|
33528
|
+
mkdirSync5(configDir, { recursive: true });
|
|
33435
33529
|
}
|
|
33436
33530
|
writeFileSync5(opencodeConfigPath, JSON.stringify(opencodeConfig, null, 2));
|
|
33437
33531
|
pluginSpinner.succeed("OMO Suites + oh-my-opencode registered in opencode.json");
|
|
@@ -33448,37 +33542,38 @@ function registerInitCommand(program2) {
|
|
|
33448
33542
|
}]);
|
|
33449
33543
|
setupLaunchboard = lbPrompt.setupLaunchboard;
|
|
33450
33544
|
if (setupLaunchboard) {
|
|
33451
|
-
const
|
|
33452
|
-
|
|
33453
|
-
|
|
33545
|
+
const lbResult = resolveLaunchboardDir();
|
|
33546
|
+
const lbDir = lbResult.dir;
|
|
33547
|
+
if (!lbDir) {
|
|
33548
|
+
info(lbResult.message || "Launchboard package not found. Skipping.");
|
|
33454
33549
|
setupLaunchboard = false;
|
|
33455
33550
|
} else {
|
|
33456
33551
|
const lbSpinner = ora("Installing Launchboard dependencies...").start();
|
|
33457
33552
|
try {
|
|
33458
|
-
|
|
33553
|
+
execSync4("bun install", { cwd: lbDir, stdio: "pipe" });
|
|
33459
33554
|
lbSpinner.succeed("Backend dependencies installed");
|
|
33460
33555
|
} catch (e) {
|
|
33461
33556
|
lbSpinner.fail("Failed to install backend deps");
|
|
33462
33557
|
}
|
|
33463
|
-
const frontendDir =
|
|
33464
|
-
if (
|
|
33558
|
+
const frontendDir = resolve6(lbDir, "frontend");
|
|
33559
|
+
if (existsSync8(frontendDir)) {
|
|
33465
33560
|
const feSpinner = ora("Installing frontend dependencies...").start();
|
|
33466
33561
|
try {
|
|
33467
|
-
|
|
33562
|
+
execSync4("bun install", { cwd: frontendDir, stdio: "pipe" });
|
|
33468
33563
|
feSpinner.succeed("Frontend dependencies installed");
|
|
33469
33564
|
} catch {
|
|
33470
33565
|
feSpinner.fail("Failed to install frontend deps");
|
|
33471
33566
|
}
|
|
33472
33567
|
}
|
|
33473
|
-
const dbPath =
|
|
33474
|
-
if (!
|
|
33568
|
+
const dbPath = resolve6(lbDir, "launchboard.db");
|
|
33569
|
+
if (!existsSync8(dbPath)) {
|
|
33475
33570
|
const dbSpinner = ora("Creating database...").start();
|
|
33476
33571
|
try {
|
|
33477
|
-
|
|
33572
|
+
execSync4("bunx drizzle-kit push", { cwd: lbDir, stdio: "pipe" });
|
|
33478
33573
|
dbSpinner.succeed("Database created");
|
|
33479
33574
|
const seedSpinner = ora("Seeding sample data...").start();
|
|
33480
33575
|
try {
|
|
33481
|
-
|
|
33576
|
+
execSync4("bun run seed", { cwd: lbDir, stdio: "pipe" });
|
|
33482
33577
|
seedSpinner.succeed("Sample data seeded");
|
|
33483
33578
|
} catch {
|
|
33484
33579
|
seedSpinner.fail("Failed to seed sample data");
|
|
@@ -33551,9 +33646,9 @@ function registerInitCommand(program2) {
|
|
|
33551
33646
|
const omoInstallSpinner = ora("Running oh-my-opencode installer...").start();
|
|
33552
33647
|
try {
|
|
33553
33648
|
try {
|
|
33554
|
-
|
|
33649
|
+
execSync4(`bunx oh-my-opencode install --no-tui ${omoFlags}`, { stdio: "pipe", timeout: 120000 });
|
|
33555
33650
|
} catch {
|
|
33556
|
-
|
|
33651
|
+
execSync4(`npx oh-my-opencode install --no-tui ${omoFlags}`, { stdio: "pipe", timeout: 120000 });
|
|
33557
33652
|
}
|
|
33558
33653
|
omoInstallSpinner.succeed("oh-my-opencode configured");
|
|
33559
33654
|
} catch {
|
|
@@ -33565,7 +33660,7 @@ function registerInitCommand(program2) {
|
|
|
33565
33660
|
try {
|
|
33566
33661
|
const opencodeConfigPath = findOpencodeConfig();
|
|
33567
33662
|
let opencodeConfig = {};
|
|
33568
|
-
if (
|
|
33663
|
+
if (existsSync8(opencodeConfigPath)) {
|
|
33569
33664
|
opencodeConfig = JSON.parse(readFileSync10(opencodeConfigPath, "utf-8"));
|
|
33570
33665
|
}
|
|
33571
33666
|
if (!opencodeConfig.plugin)
|
|
@@ -33573,9 +33668,9 @@ function registerInitCommand(program2) {
|
|
|
33573
33668
|
if (!opencodeConfig.plugin.includes("opencode-antigravity-auth@latest")) {
|
|
33574
33669
|
opencodeConfig.plugin.push("opencode-antigravity-auth@latest");
|
|
33575
33670
|
}
|
|
33576
|
-
const configDir =
|
|
33577
|
-
if (!
|
|
33578
|
-
|
|
33671
|
+
const configDir = dirname6(opencodeConfigPath);
|
|
33672
|
+
if (!existsSync8(configDir)) {
|
|
33673
|
+
mkdirSync5(configDir, { recursive: true });
|
|
33579
33674
|
}
|
|
33580
33675
|
writeFileSync5(opencodeConfigPath, JSON.stringify(opencodeConfig, null, 2));
|
|
33581
33676
|
installedAuthPlugins.push("opencode-antigravity-auth");
|
|
@@ -33706,11 +33801,12 @@ var init_init = __esm(() => {
|
|
|
33706
33801
|
init_detect();
|
|
33707
33802
|
init_lsp_registry();
|
|
33708
33803
|
init_mcp_registry();
|
|
33804
|
+
init_launchboard_resolver();
|
|
33709
33805
|
});
|
|
33710
33806
|
|
|
33711
33807
|
// src/commands/doctor.ts
|
|
33712
33808
|
import { statSync as statSync2 } from "fs";
|
|
33713
|
-
import { homedir as
|
|
33809
|
+
import { homedir as homedir6 } from "os";
|
|
33714
33810
|
async function runChecks() {
|
|
33715
33811
|
const results = [];
|
|
33716
33812
|
const spinner = ora({ text: "Running health checks...", color: "cyan" }).start();
|
|
@@ -33856,7 +33952,7 @@ async function runChecks() {
|
|
|
33856
33952
|
});
|
|
33857
33953
|
spinner.text = "Checking disk space...";
|
|
33858
33954
|
try {
|
|
33859
|
-
const homeDir =
|
|
33955
|
+
const homeDir = homedir6();
|
|
33860
33956
|
const stats = statSync2(homeDir);
|
|
33861
33957
|
results.push({
|
|
33862
33958
|
name: "Disk Space",
|
|
@@ -34211,7 +34307,7 @@ var init_account = __esm(() => {
|
|
|
34211
34307
|
});
|
|
34212
34308
|
|
|
34213
34309
|
// src/core/store.ts
|
|
34214
|
-
import { existsSync as
|
|
34310
|
+
import { existsSync as existsSync10, readFileSync as readFileSync11, writeFileSync as writeFileSync6 } from "fs";
|
|
34215
34311
|
import { join as join6 } from "path";
|
|
34216
34312
|
|
|
34217
34313
|
class Store {
|
|
@@ -34223,7 +34319,7 @@ class Store {
|
|
|
34223
34319
|
this.defaults = defaults;
|
|
34224
34320
|
}
|
|
34225
34321
|
async read() {
|
|
34226
|
-
if (!
|
|
34322
|
+
if (!existsSync10(this.filePath)) {
|
|
34227
34323
|
return { ...this.defaults };
|
|
34228
34324
|
}
|
|
34229
34325
|
try {
|
|
@@ -34252,10 +34348,10 @@ class Store {
|
|
|
34252
34348
|
});
|
|
34253
34349
|
}
|
|
34254
34350
|
async exists() {
|
|
34255
|
-
return
|
|
34351
|
+
return existsSync10(this.filePath);
|
|
34256
34352
|
}
|
|
34257
34353
|
async delete() {
|
|
34258
|
-
if (
|
|
34354
|
+
if (existsSync10(this.filePath)) {
|
|
34259
34355
|
const { unlinkSync: unlinkSync2 } = await import("fs");
|
|
34260
34356
|
unlinkSync2(this.filePath);
|
|
34261
34357
|
}
|
|
@@ -35029,7 +35125,7 @@ var require_bindings = __commonJS((exports, module) => {
|
|
|
35029
35125
|
var path2 = __require("path");
|
|
35030
35126
|
var fileURLToPath4 = require_file_uri_to_path();
|
|
35031
35127
|
var join7 = path2.join;
|
|
35032
|
-
var
|
|
35128
|
+
var dirname7 = path2.dirname;
|
|
35033
35129
|
var exists = fs.accessSync && function(path3) {
|
|
35034
35130
|
try {
|
|
35035
35131
|
fs.accessSync(path3);
|
|
@@ -35134,7 +35230,7 @@ var require_bindings = __commonJS((exports, module) => {
|
|
|
35134
35230
|
return fileName;
|
|
35135
35231
|
};
|
|
35136
35232
|
exports.getRoot = function getRoot(file) {
|
|
35137
|
-
var dir =
|
|
35233
|
+
var dir = dirname7(file), prev;
|
|
35138
35234
|
while (true) {
|
|
35139
35235
|
if (dir === ".") {
|
|
35140
35236
|
dir = process.cwd();
|
|
@@ -35335,13 +35431,13 @@ var require_backup = __commonJS((exports, module) => {
|
|
|
35335
35431
|
var runBackup = (backup, handler) => {
|
|
35336
35432
|
let rate = 0;
|
|
35337
35433
|
let useDefault = true;
|
|
35338
|
-
return new Promise((
|
|
35434
|
+
return new Promise((resolve7, reject) => {
|
|
35339
35435
|
setImmediate(function step() {
|
|
35340
35436
|
try {
|
|
35341
35437
|
const progress = backup.transfer(rate);
|
|
35342
35438
|
if (!progress.remainingPages) {
|
|
35343
35439
|
backup.close();
|
|
35344
|
-
|
|
35440
|
+
resolve7(progress);
|
|
35345
35441
|
return;
|
|
35346
35442
|
}
|
|
35347
35443
|
if (useDefault) {
|
|
@@ -35725,17 +35821,17 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
35725
35821
|
});
|
|
35726
35822
|
|
|
35727
35823
|
// src/commands/stats.ts
|
|
35728
|
-
import { existsSync as
|
|
35824
|
+
import { existsSync as existsSync11, writeFileSync as writeFileSync7 } from "fs";
|
|
35729
35825
|
import { join as join7 } from "path";
|
|
35730
|
-
import { homedir as
|
|
35826
|
+
import { homedir as homedir7 } from "os";
|
|
35731
35827
|
function findDatabase() {
|
|
35732
35828
|
const locations = [
|
|
35733
35829
|
join7(process.cwd(), ".opencode", "data.db"),
|
|
35734
|
-
join7(
|
|
35735
|
-
join7(
|
|
35830
|
+
join7(homedir7(), ".opencode", "data.db"),
|
|
35831
|
+
join7(homedir7(), ".config", "opencode", "data.db")
|
|
35736
35832
|
];
|
|
35737
35833
|
for (const loc of locations) {
|
|
35738
|
-
if (
|
|
35834
|
+
if (existsSync11(loc))
|
|
35739
35835
|
return loc;
|
|
35740
35836
|
}
|
|
35741
35837
|
return null;
|
|
@@ -35899,50 +35995,56 @@ var init_stats2 = __esm(() => {
|
|
|
35899
35995
|
});
|
|
35900
35996
|
|
|
35901
35997
|
// src/commands/launchboard.ts
|
|
35902
|
-
import { execSync as
|
|
35903
|
-
import { existsSync as
|
|
35904
|
-
import { resolve as
|
|
35905
|
-
|
|
35998
|
+
import { execSync as execSync5 } from "child_process";
|
|
35999
|
+
import { existsSync as existsSync12 } from "fs";
|
|
36000
|
+
import { resolve as resolve7 } from "path";
|
|
36001
|
+
function getLaunchboardDir() {
|
|
36002
|
+
const result = resolveLaunchboardDir();
|
|
36003
|
+
if (!result.dir) {
|
|
36004
|
+
console.log(source_default.red(`❌ ${result.message || "Launchboard not found."}`));
|
|
36005
|
+
return null;
|
|
36006
|
+
}
|
|
36007
|
+
return result.dir;
|
|
36008
|
+
}
|
|
35906
36009
|
function registerLaunchboardCommand(program2) {
|
|
35907
36010
|
const lb = program2.command("launchboard").alias("lb").description("Manage Launchboard — AI-integrated Kanban board");
|
|
35908
36011
|
lb.command("setup").description("Setup Launchboard (install deps, create DB, seed data)").action(async () => {
|
|
35909
36012
|
console.log(source_default.hex("#d4a853").bold(`
|
|
35910
36013
|
\uD83D\uDE80 Setting up Launchboard...
|
|
35911
36014
|
`));
|
|
35912
|
-
|
|
35913
|
-
|
|
36015
|
+
const LAUNCHBOARD_DIR = getLaunchboardDir();
|
|
36016
|
+
if (!LAUNCHBOARD_DIR)
|
|
35914
36017
|
return;
|
|
35915
|
-
}
|
|
35916
36018
|
const spinner = ora("Installing dependencies...").start();
|
|
35917
36019
|
try {
|
|
35918
|
-
|
|
36020
|
+
execSync5("bun install", { cwd: LAUNCHBOARD_DIR, stdio: "pipe" });
|
|
35919
36021
|
spinner.succeed("Dependencies installed");
|
|
35920
36022
|
} catch (e) {
|
|
35921
36023
|
spinner.fail("Failed to install dependencies");
|
|
35922
36024
|
return;
|
|
35923
36025
|
}
|
|
35924
|
-
const frontendDir =
|
|
35925
|
-
if (
|
|
36026
|
+
const frontendDir = resolve7(LAUNCHBOARD_DIR, "frontend");
|
|
36027
|
+
if (existsSync12(frontendDir)) {
|
|
35926
36028
|
spinner.start("Installing frontend dependencies...");
|
|
35927
36029
|
try {
|
|
35928
|
-
|
|
36030
|
+
execSync5("bun install", { cwd: frontendDir, stdio: "pipe" });
|
|
35929
36031
|
spinner.succeed("Frontend dependencies installed");
|
|
35930
36032
|
} catch (e) {
|
|
35931
36033
|
spinner.fail("Failed to install frontend dependencies");
|
|
35932
36034
|
}
|
|
35933
36035
|
}
|
|
35934
|
-
const dbPath =
|
|
35935
|
-
if (!
|
|
36036
|
+
const dbPath = resolve7(LAUNCHBOARD_DIR, "launchboard.db");
|
|
36037
|
+
if (!existsSync12(dbPath)) {
|
|
35936
36038
|
spinner.start("Creating database...");
|
|
35937
36039
|
try {
|
|
35938
|
-
|
|
36040
|
+
execSync5("bunx drizzle-kit push", { cwd: LAUNCHBOARD_DIR, stdio: "pipe" });
|
|
35939
36041
|
spinner.succeed("Database created");
|
|
35940
36042
|
} catch (e) {
|
|
35941
36043
|
spinner.fail("Failed to create database");
|
|
35942
36044
|
}
|
|
35943
36045
|
spinner.start("Seeding sample data...");
|
|
35944
36046
|
try {
|
|
35945
|
-
|
|
36047
|
+
execSync5("bun run seed", { cwd: LAUNCHBOARD_DIR, stdio: "pipe" });
|
|
35946
36048
|
spinner.succeed("Sample data seeded");
|
|
35947
36049
|
} catch (e) {
|
|
35948
36050
|
spinner.fail("Failed to seed data");
|
|
@@ -35962,23 +36064,26 @@ function registerLaunchboardCommand(program2) {
|
|
|
35962
36064
|
console.log(source_default.hex("#d4a853").bold(`
|
|
35963
36065
|
\uD83D\uDE80 Starting Launchboard...
|
|
35964
36066
|
`));
|
|
35965
|
-
|
|
36067
|
+
const LAUNCHBOARD_DIR = getLaunchboardDir();
|
|
36068
|
+
if (!LAUNCHBOARD_DIR)
|
|
36069
|
+
return;
|
|
36070
|
+
if (!existsSync12(resolve7(LAUNCHBOARD_DIR, "node_modules"))) {
|
|
35966
36071
|
console.log(source_default.yellow("⚠️ Dependencies not installed. Run: omocs launchboard setup"));
|
|
35967
36072
|
return;
|
|
35968
36073
|
}
|
|
35969
36074
|
if (opts.backendOnly) {
|
|
35970
36075
|
console.log(source_default.dim(" Backend:"), source_default.white("http://localhost:3030"));
|
|
35971
|
-
|
|
36076
|
+
execSync5("bun run start", { cwd: LAUNCHBOARD_DIR, stdio: "inherit" });
|
|
35972
36077
|
} else if (opts.frontendOnly) {
|
|
35973
|
-
const frontendDir =
|
|
36078
|
+
const frontendDir = resolve7(LAUNCHBOARD_DIR, "frontend");
|
|
35974
36079
|
console.log(source_default.dim(" Frontend:"), source_default.white("http://localhost:3040"));
|
|
35975
|
-
|
|
36080
|
+
execSync5("bun run dev", { cwd: frontendDir, stdio: "inherit" });
|
|
35976
36081
|
} else {
|
|
35977
36082
|
console.log(source_default.dim(" Backend:"), source_default.white("http://localhost:3030"));
|
|
35978
36083
|
console.log(source_default.dim(" Frontend:"), source_default.white("http://localhost:3040"));
|
|
35979
36084
|
console.log(source_default.dim(` Press Ctrl+C to stop
|
|
35980
36085
|
`));
|
|
35981
|
-
|
|
36086
|
+
execSync5("bash setup.sh", { cwd: LAUNCHBOARD_DIR, stdio: "inherit" });
|
|
35982
36087
|
}
|
|
35983
36088
|
});
|
|
35984
36089
|
lb.command("status").description("Check if Launchboard is running").action(async () => {
|
|
@@ -36001,12 +36106,10 @@ function registerLaunchboardCommand(program2) {
|
|
|
36001
36106
|
}
|
|
36002
36107
|
});
|
|
36003
36108
|
}
|
|
36004
|
-
var __dirname2, LAUNCHBOARD_DIR;
|
|
36005
36109
|
var init_launchboard2 = __esm(() => {
|
|
36006
36110
|
init_source();
|
|
36007
36111
|
init_ora();
|
|
36008
|
-
|
|
36009
|
-
LAUNCHBOARD_DIR = resolve6(__dirname2, "../../packages/launchboard");
|
|
36112
|
+
init_launchboard_resolver();
|
|
36010
36113
|
});
|
|
36011
36114
|
|
|
36012
36115
|
// src/index.ts
|
|
@@ -36014,20 +36117,20 @@ var exports_src = {};
|
|
|
36014
36117
|
__export(exports_src, {
|
|
36015
36118
|
program: () => program2
|
|
36016
36119
|
});
|
|
36017
|
-
import { readFileSync as readFileSync13, existsSync as
|
|
36018
|
-
import { dirname as dirname7, resolve as
|
|
36019
|
-
import { fileURLToPath as
|
|
36120
|
+
import { readFileSync as readFileSync13, existsSync as existsSync13 } from "fs";
|
|
36121
|
+
import { dirname as dirname7, resolve as resolve8 } from "path";
|
|
36122
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
36020
36123
|
function findPackageJson() {
|
|
36021
|
-
let dir = dirname7(
|
|
36124
|
+
let dir = dirname7(fileURLToPath4(import.meta.url));
|
|
36022
36125
|
for (let i = 0;i < 5; i++) {
|
|
36023
|
-
const candidate =
|
|
36024
|
-
if (
|
|
36126
|
+
const candidate = resolve8(dir, "package.json");
|
|
36127
|
+
if (existsSync13(candidate))
|
|
36025
36128
|
return candidate;
|
|
36026
36129
|
dir = dirname7(dir);
|
|
36027
36130
|
}
|
|
36028
|
-
return
|
|
36131
|
+
return resolve8(dirname7(dirname7(fileURLToPath4(import.meta.url))), "package.json");
|
|
36029
36132
|
}
|
|
36030
|
-
var pkg,
|
|
36133
|
+
var pkg, VERSION3, program2;
|
|
36031
36134
|
var init_src = __esm(() => {
|
|
36032
36135
|
init_esm();
|
|
36033
36136
|
init_ui();
|
|
@@ -36041,9 +36144,9 @@ var init_src = __esm(() => {
|
|
|
36041
36144
|
init_stats2();
|
|
36042
36145
|
init_launchboard2();
|
|
36043
36146
|
pkg = JSON.parse(readFileSync13(findPackageJson(), "utf-8"));
|
|
36044
|
-
|
|
36147
|
+
VERSION3 = pkg.version;
|
|
36045
36148
|
program2 = new Command;
|
|
36046
|
-
program2.name("omocs").description("OMO Suites — CLI toolkit for OpenCode power users").version(
|
|
36149
|
+
program2.name("omocs").description("OMO Suites — CLI toolkit for OpenCode power users").version(VERSION3, "-v, --version", "Show version").hook("preAction", () => {
|
|
36047
36150
|
process.on("uncaughtException", (error) => {
|
|
36048
36151
|
handleError(error);
|
|
36049
36152
|
});
|
|
@@ -36166,18 +36269,18 @@ async function checkAndUpdate(currentVersion) {
|
|
|
36166
36269
|
}
|
|
36167
36270
|
|
|
36168
36271
|
// bin/omocs.ts
|
|
36169
|
-
import { readFileSync as readFileSync14, existsSync as
|
|
36170
|
-
import { dirname as dirname8, resolve as
|
|
36171
|
-
import { fileURLToPath as
|
|
36272
|
+
import { readFileSync as readFileSync14, existsSync as existsSync14 } from "fs";
|
|
36273
|
+
import { dirname as dirname8, resolve as resolve9 } from "path";
|
|
36274
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
36172
36275
|
function findPackageJson2() {
|
|
36173
|
-
let dir = dirname8(
|
|
36276
|
+
let dir = dirname8(fileURLToPath5(import.meta.url));
|
|
36174
36277
|
for (let i = 0;i < 5; i++) {
|
|
36175
|
-
const candidate =
|
|
36176
|
-
if (
|
|
36278
|
+
const candidate = resolve9(dir, "package.json");
|
|
36279
|
+
if (existsSync14(candidate))
|
|
36177
36280
|
return candidate;
|
|
36178
36281
|
dir = dirname8(dir);
|
|
36179
36282
|
}
|
|
36180
|
-
return
|
|
36283
|
+
return resolve9(dirname8(dirname8(fileURLToPath5(import.meta.url))), "package.json");
|
|
36181
36284
|
}
|
|
36182
36285
|
var pkg2 = JSON.parse(readFileSync14(findPackageJson2(), "utf-8"));
|
|
36183
36286
|
await checkAndUpdate(pkg2.version);
|
package/package.json
CHANGED