Skip to content
Open
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
9 changes: 0 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@
],
"problemMatcher": []
},
{
"label": "Init TS Client",
"type": "shell",
"command": "yarn && yarn build && yarn link",
"options": {
"cwd": "${workspaceFolder}/client/core/ts",
},
"problemMatcher": []
},
{
"label": "Init UI Client",
"type": "shell",
Expand Down
4 changes: 2 additions & 2 deletions bin/core/aio.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ RUN cargo build -p komodo_core --release && \
# Build UI
FROM node:22.12-alpine AS ui-builder
WORKDIR /builder
COPY package.json yarn.lock ./
COPY ./ui ./ui
COPY ./client/core/ts ./client
RUN cd client && yarn && yarn build && yarn link
RUN cd ui && yarn link komodo_client && yarn && yarn build
RUN yarn && yarn workspace komodo-ui build

# Final Image
FROM debian:trixie-slim
Expand Down
4 changes: 2 additions & 2 deletions bin/core/single-arch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ FROM ${BINARIES_IMAGE} AS binaries
# Build UI
FROM node:22.12-alpine AS ui-builder
WORKDIR /builder
COPY package.json yarn.lock ./
COPY ./ui ./ui
COPY ./client/core/ts ./client
RUN cd client && yarn && yarn build && yarn link
RUN cd ui && yarn link komodo_client && yarn && yarn build
RUN yarn && yarn workspace komodo-ui build

FROM debian:trixie-slim

Expand Down
20 changes: 0 additions & 20 deletions client/core/ts/yarn.lock

This file was deleted.

3 changes: 2 additions & 1 deletion docsite/docs/ecosystem/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Make sure your Rust toolchain is up to date and install the CLI tools:
```sh
rustup update
cargo install typeshare-cli runnables-cli
run link-client
run yarn-install
```

### Starting the services
Expand All @@ -105,6 +105,7 @@ run dev-core

```sh
run dev-periphery
```

```sh
run dev-ui # Start in dev (watch) mode
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"private": true,
"workspaces": [
"ui",
"client/core/ts"
]
}
13 changes: 1 addition & 12 deletions runfile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ cmd = "cargo run -p komodo_periphery --release -- -c .dev/periphery.config.toml
[yarn-install]
alias = "yi"
description = "downloads latest javacript dependencies for client and ui"
cmd = """
cd ui && yarn && \
cd ../docsite && yarn && \
cd ../client/core/ts && yarn
"""
cmd = "yarn"

[gen-resource-schema]
alias = "grs"
Expand All @@ -41,13 +37,6 @@ cd ./client/core/ts && yarn build && \
cp -r dist/. ../../../ui/public/client/. &&
cd ../../../ui && node fix_public_client.mjs"""

[link-client]
description = "yarn links the ts client to the ui"
after = "gen-client"
cmd = """
cd ./client/core/ts && yarn link && \
cd ../../../ui && yarn link komodo_client && yarn"""

[dev-compose]
description = "deploys dev.compose.yaml"
cmd = """
Expand Down
5 changes: 2 additions & 3 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ COPY ./client/core/ts ./client
ARG VITE_KOMODO_HOST=""
ENV VITE_KOMODO_HOST=$VITE_KOMODO_HOST

# Build and link the client
RUN cd client && yarn && yarn build && yarn link
RUN cd ui && yarn link komodo_client && yarn && yarn build
# Build the client
RUN yarn && yarn workspace komodo-ui build

# Copy just the static ui to scratch image
FROM scratch
Expand Down
11 changes: 4 additions & 7 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ Komodo UI uses Yarn + Vite + React + Mantine UI

## Setup Dev Environment

The UI depends on the local package `komodo_client` located at `/client/core/ts`.
This must first be built and prepared for yarn link.

The following command should setup everything up (run with /ui as working directory):
Before starting development, the ui dependencies must be installed first.

The following command should set everything up:
```sh
cd ../client/core/ts && yarn && yarn build && yarn link && \
cd ../../../ui && yarn link komodo_client && yarn
yarn
```

You can make a new file `.env.development` (gitignored) which holds:
Expand All @@ -22,5 +19,5 @@ You can point it to any Komodo host you like, including the demo.

Now you can start the dev ui server:
```sh
yarn dev
yarn workspace komodo-ui dev
```
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"scripts": {
"dev": "vite --host",
"preview": "vite preview --host --port 5173",
"build": "tsc && vite build",
"build-client": "cd ../client/core/ts && yarn && yarn build && yarn link"
"build": "tsc && vite build"
},
"dependencies": {
"@mantine/core": "^9.1.1",
Expand All @@ -24,6 +23,7 @@
"jotai": "^2.20.0",
"jotai-family": "^1.0.1",
"jotai-location": "^0.6.2",
"komodo_client": "workspace:*",
"lucide-react": "^1.14.0",
"mogh_auth_client": "^1.5.0",
"mogh_ui": "^0.6.1",
Expand Down
11 changes: 9 additions & 2 deletions ui/yarn.lock → yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,13 @@ klona@^2.0.6:
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22"
integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==

"komodo_client@workspace:*":
version "2.1.1"
resolved "https://registry.yarnpkg.com/komodo_client/-/komodo_client-2.1.1.tgz#9aa7751a873699dc22f915aea6297e12fe60c6ad"
integrity sha512-WvVd4eRyn080jddyPUBvlnrkrJh0D7bqJAIp6lfwslHqq/oh3/66NGRkgzFB8d0+9BCvpV/v2Q3YtHHVDHgb0g==
dependencies:
mogh_auth_client "^1.2.1"

lightningcss-android-arm64@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz#f033885116dfefd9c6f54787523e3514b61e1968"
Expand Down Expand Up @@ -894,7 +901,7 @@ marked@14.0.0:
resolved "https://registry.yarnpkg.com/marked/-/marked-14.0.0.tgz#79a1477358a59e0660276f8fec76de2c33f35d83"
integrity sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==

mogh_auth_client@^1.5.0:
mogh_auth_client@^1.2.1, mogh_auth_client@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/mogh_auth_client/-/mogh_auth_client-1.5.0.tgz#f54b8ae35648d5bf1e60d7b67fcdcef45b0ccd7a"
integrity sha512-eUQmx682AzJRaY4QJSALtIGxXzg2r2Tr8exnDeFMrNe0Ibn4Oqm3h9SkOzYiqqZjKQ13wvHm0RoxT2QKo+908g==
Expand Down Expand Up @@ -1482,7 +1489,7 @@ type-fest@^5.6.0:
dependencies:
tagged-tag "^1.0.0"

typescript@^6.0.3:
typescript@^6.0.2, typescript@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21"
integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==
Expand Down
Loading