@aion0/forge 0.2.24 → 0.2.26
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/app/api/version/route.ts +1 -1
- package/cli/mw.ts +16 -3
- package/components/Dashboard.tsx +1 -1
- package/components/SessionView.tsx +2 -2
- package/package.json +1 -1
package/app/api/version/route.ts
CHANGED
package/cli/mw.ts
CHANGED
|
@@ -480,8 +480,20 @@ async function main() {
|
|
|
480
480
|
} else {
|
|
481
481
|
console.log('[forge] Upgrading from npm...');
|
|
482
482
|
try {
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
const { homedir } = await import('node:os');
|
|
484
|
+
execSync('npm install -g @aion0/forge@latest --prefer-online', {
|
|
485
|
+
stdio: 'inherit',
|
|
486
|
+
cwd: homedir(),
|
|
487
|
+
});
|
|
488
|
+
// Show installed version
|
|
489
|
+
try {
|
|
490
|
+
const { readFileSync } = await import('node:fs');
|
|
491
|
+
const globalRoot = execSync('npm root -g', { encoding: 'utf-8', cwd: homedir() }).trim();
|
|
492
|
+
const pkg = JSON.parse(readFileSync(join(globalRoot, '@aion0', 'forge', 'package.json'), 'utf-8'));
|
|
493
|
+
console.log(`[forge] Upgraded to v${pkg.version}. Run: forge server restart`);
|
|
494
|
+
} catch {
|
|
495
|
+
console.log('[forge] Upgraded. Run: forge server restart');
|
|
496
|
+
}
|
|
485
497
|
} catch {
|
|
486
498
|
console.log('[forge] Upgrade failed');
|
|
487
499
|
}
|
|
@@ -541,7 +553,8 @@ Shortcuts: t=task, ls=tasks, w=watch, s=status, l=log, f=flows, p=projects, pw=p
|
|
|
541
553
|
}
|
|
542
554
|
}
|
|
543
555
|
|
|
544
|
-
|
|
556
|
+
const skipUpdateCheck = ['upgrade', 'uninstall', '--version', '-v'];
|
|
557
|
+
main().then(() => { if (!skipUpdateCheck.includes(cmd)) return checkForUpdate(); }).catch(err => {
|
|
545
558
|
console.error(err.message);
|
|
546
559
|
process.exit(1);
|
|
547
560
|
});
|
package/components/Dashboard.tsx
CHANGED
|
@@ -128,7 +128,7 @@ export default function Dashboard({ user }: { user: any }) {
|
|
|
128
128
|
{versionInfo.hasUpdate && (
|
|
129
129
|
<span
|
|
130
130
|
className="text-[9px] px-1.5 py-0.5 bg-[var(--accent)]/15 text-[var(--accent)] rounded cursor-default"
|
|
131
|
-
title=
|
|
131
|
+
title={`forge upgrade\nnpm install -g @aion0/forge@latest`}
|
|
132
132
|
>
|
|
133
133
|
v{versionInfo.latest} available
|
|
134
134
|
</span>
|
|
@@ -452,7 +452,7 @@ export default function SessionView({
|
|
|
452
452
|
</div>
|
|
453
453
|
|
|
454
454
|
{/* Right: session content */}
|
|
455
|
-
<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
|
|
455
|
+
<div className="flex-1 flex flex-col min-w-0 overflow-hidden" style={{ width: 0 }}>
|
|
456
456
|
{activeSession && (
|
|
457
457
|
<div className="border-b border-[var(--border)] px-4 py-2 shrink-0">
|
|
458
458
|
<div className="flex items-center gap-2">
|
|
@@ -508,7 +508,7 @@ export default function SessionView({
|
|
|
508
508
|
</div>
|
|
509
509
|
)}
|
|
510
510
|
|
|
511
|
-
<div className="flex-1 overflow-y-auto overflow-x-
|
|
511
|
+
<div className="flex-1 overflow-y-auto overflow-x-auto p-4 space-y-2">
|
|
512
512
|
{!activeSessionId && (
|
|
513
513
|
<div className="flex-1 flex items-center justify-center text-[var(--text-secondary)] h-full">
|
|
514
514
|
<p>Select a session from the tree to view</p>
|
package/package.json
CHANGED