Skip to content

Commit ce93220

Browse files
committed
feat: add dev command
1 parent 829dff7 commit ce93220

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/uipath/_cli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from .cli_auth import auth as auth
77
from .cli_deploy import deploy as deploy # type: ignore
8+
from .cli_dev import dev as dev
89
from .cli_eval import eval as eval # type: ignore
910
from .cli_init import init as init # type: ignore
1011
from .cli_invoke import invoke as invoke # type: ignore
@@ -69,3 +70,4 @@ def cli(lv: bool, v: bool) -> None:
6970
cli.add_command(push)
7071
cli.add_command(pull)
7172
cli.add_command(eval)
73+
cli.add_command(dev)

src/uipath/_cli/cli_dev.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from typing import Optional
2+
3+
import click
4+
5+
from ..telemetry import track
6+
from ._utils._console import ConsoleLogger
7+
from .middlewares import Middlewares
8+
9+
console = ConsoleLogger()
10+
11+
12+
@click.command()
13+
@click.argument("interface", default="terminal")
14+
@track
15+
def dev(interface: Optional[str]) -> None:
16+
"""Launch interactive debugging interface."""
17+
console.info("🚀 Starting UiPath Dev Terminal...")
18+
console.info("Use 'q' to quit, 'n' for new run, 'r' to execute")
19+
20+
result = Middlewares.next(
21+
"dev",
22+
interface,
23+
)
24+
25+
if result.should_continue is False:
26+
return

src/uipath/_cli/middlewares.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Middlewares:
2828
"pack": [],
2929
"publish": [],
3030
"run": [],
31+
"dev": [],
3132
}
3233
_plugins_loaded = False
3334

0 commit comments

Comments
 (0)