Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ RUN chmod +x start.sh

ENV UIPATH_DEV_SERVER_PORT=80
ENV UIPATH_DEV_SERVER_HOST=0.0.0.0
ENV UIPATH_AUTH_ENABLED=false

CMD ["/bin/sh", "/app/start.sh"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-dev"
version = "0.0.56"
version = "0.0.57"
description = "UiPath Developer Console"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
19 changes: 19 additions & 0 deletions src/uipath/dev/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import logging
import os
from pathlib import Path

from fastapi import FastAPI
Expand Down Expand Up @@ -129,13 +130,31 @@ async def _favicon_svg_route():
# Store server reference on app state for route access
app.state.server = server

auth_enabled = os.environ.get("UIPATH_AUTH_ENABLED", "true").lower() not in (
"false",
"0",
"no",
)

# Config endpoint — tells the frontend which features are available
@app.get("/api/config", include_in_schema=False)
async def _config():
return {"auth_enabled": auth_enabled}

# Register routes
from uipath.dev.server.routes.entrypoints import router as entrypoints_router
from uipath.dev.server.routes.graph import router as graph_router
from uipath.dev.server.routes.reload import router as reload_router
from uipath.dev.server.routes.runs import router as runs_router
from uipath.dev.server.ws.handler import router as ws_router

if auth_enabled:
from uipath.dev.server.auth import restore_session
from uipath.dev.server.routes.auth import router as auth_router

app.include_router(auth_router, prefix="/api")
restore_session()

app.include_router(entrypoints_router, prefix="/api")
app.include_router(runs_router, prefix="/api")
app.include_router(graph_router, prefix="/api")
Expand Down
Loading