55 type CommandInfo ,
66 getCommandsByCategory ,
77 getCoreCommands ,
8- } from "@array/core" ;
8+ getRequiredContext ,
9+ resolveCommandAlias ,
10+ } from "@array/core/commands" ;
911import { auth } from "./commands/auth" ;
1012import { bottom } from "./commands/bottom" ;
1113import { checkout } from "./commands/checkout" ;
@@ -19,6 +21,7 @@ import { exit } from "./commands/exit";
1921import { init } from "./commands/init" ;
2022import { log } from "./commands/log" ;
2123import { merge } from "./commands/merge" ;
24+ import { restack } from "./commands/restack" ;
2225import { squash } from "./commands/squash" ;
2326import { status } from "./commands/status" ;
2427import { submit } from "./commands/submit" ;
@@ -27,6 +30,7 @@ import { top } from "./commands/top";
2730import { trunk } from "./commands/trunk" ;
2831import { undo } from "./commands/undo" ;
2932import { up } from "./commands/up" ;
33+ import { type ParsedCommand , parseArgs } from "./utils/args" ;
3034import {
3135 checkContext ,
3236 isContextValid ,
@@ -41,12 +45,6 @@ import {
4145 hint ,
4246 message ,
4347} from "./utils/output" ;
44- import {
45- getRequiredContext ,
46- type ParsedCommand ,
47- parseArgs ,
48- resolveCommandAlias ,
49- } from "./utils/parser" ;
5048
5149type CommandHandler = ( parsed : ParsedCommand ) => Promise < void > ;
5250
@@ -64,6 +62,7 @@ const COMMANDS: Record<string, CommandHandler> = {
6462 bottom : ( ) => bottom ( ) ,
6563 log : ( ) => log ( ) ,
6664 sync : ( ) => sync ( ) ,
65+ restack : ( ) => restack ( ) ,
6766 checkout : ( p ) => checkout ( p . args [ 0 ] ) ,
6867 delete : ( p ) => deleteChange ( p . args [ 0 ] , { yes : ! ! p . flags . yes || ! ! p . flags . y } ) ,
6968 squash : ( p ) => squash ( p . args [ 0 ] ) ,
0 commit comments