refactor: rombak dari monorepo ke project tunggal — flat src/{domain,application,infrastructure,interfaces}, satu package.json tanpa workspaces, tsconfig paths → src/*, update install.sh/Dockerfile/CI

This commit is contained in:
asepharyana
2026-09-02 22:56:26 +07:00
parent e91fda3691
commit 0ee0cc4350
196 changed files with 31 additions and 337 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
run: bun test run: bun test
- name: Build CLI bundle - name: Build CLI bundle
run: bun build apps/interfaces/cli/src/index.ts --target=bun --outdir=/tmp/zesdex-build run: bun run build
- name: Smoke — CLI help - name: Smoke — CLI help
run: bun /tmp/zesdex-build/index.js --help run: ./dist/zesdex --help
+1
View File
@@ -11,3 +11,4 @@ docs/lesson/
dist/ dist/
apps/**/edit-log/ apps/**/edit-log/
edit-log/ edit-log/
dist/
+3 -3
View File
@@ -5,14 +5,14 @@
FROM oven/bun:1.2 AS builder FROM oven/bun:1.2 AS builder
WORKDIR /app WORKDIR /app
COPY bun.lockb bun.lock ./ COPY bun.lock ./
COPY package.json tsconfig.json ./ COPY package.json tsconfig.json ./
COPY apps ./apps COPY src ./src
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
# Compile a standalone self-contained executable (bundles JS + native addons). # Compile a standalone self-contained executable (bundles JS + native addons).
RUN bun build apps/interfaces/cli/src/index.ts --compile --outfile=/app/zesdex RUN bun build src/interfaces/cli/index.ts --compile --outfile=/app/zesdex
# Stage 2: Minimal runtime image # Stage 2: Minimal runtime image
FROM debian:bookworm-slim FROM debian:bookworm-slim
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/api",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"api": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-24
View File
@@ -1,24 +0,0 @@
{
"name": "@zesdex/cli",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"cli": "bun src/index.ts",
"build": "true",
"bootstrap": "bun src/bootstrap.ts"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
"@zesdex/api": "workspace:*",
"@zesdex/ws": "workspace:*",
"@zesdex/grpc": "workspace:*",
"@zesdex/web": "workspace:*",
"@zesdex/daemon": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/daemon",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"daemon": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"name": "@zesdex/grpc",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"grpc": "bun src/main.ts",
"build": "true"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-16
View File
@@ -1,16 +0,0 @@
{
"name": "@zesdex/tui",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"tui": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"name": "@zesdex/web",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"web": "bun src/main.ts",
"build": "true"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/ws",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"ws": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-21
View File
@@ -1,21 +0,0 @@
{
"name": "@zesdex/application",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex application layer — port traits, use cases, turn service (depends only on @zesdex/domain)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@zesdex/domain": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/domain",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex domain layer — pure types, value objects, and port interfaces (zero I/O)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"name": "@zesdex/infrastructure",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex infrastructure layer — concrete adapters (LLM, tools, persistence, auth, MCP, IPC, workflow)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-128
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -16,7 +16,7 @@ echo "==> Installing dependencies..."
bun install --cwd "$REPO_DIR" --frozen-lockfile bun install --cwd "$REPO_DIR" --frozen-lockfile
echo "==> Compiling $BIN_NAME (self-contained executable)..." echo "==> Compiling $BIN_NAME (self-contained executable)..."
bun build "$REPO_DIR/apps/interfaces/cli/src/index.ts" --compile --outfile "$TMP_BIN" bun build "$REPO_DIR/src/interfaces/cli/index.ts" --compile --outfile "$TMP_BIN"
if [ ! -f "$TMP_BIN" ]; then if [ ! -f "$TMP_BIN" ]; then
echo "ERROR: build succeeded but binary not found at $TMP_BIN" >&2 echo "ERROR: build succeeded but binary not found at $TMP_BIN" >&2
+12 -10
View File
@@ -1,22 +1,24 @@
{ {
"name": "zesdex", "name": "zesdex",
"version": "1.21.2", "version": "1.22.0",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "bun@1.3.14", "packageManager": "bun@1.3.14",
"description": "Zesdex — AI-native autonomous coding agent (TypeScript/Bun rewrite of the Rust project)", "description": "Zesdex — AI-native autonomous coding agent (TypeScript/Bun)",
"license": "MIT", "license": "MIT",
"workspaces": [
"apps/packages/*",
"apps/interfaces/*"
],
"scripts": { "scripts": {
"build": "bun run --cwd apps/interfaces/cli build", "build": "bun build src/interfaces/cli/index.ts --compile --outfile=dist/zesdex",
"check": "tsc --noEmit", "check": "tsc --noEmit",
"test": "bun test", "test": "bun test",
"format": "bun format", "format": "bun fmt",
"cli": "bun run --cwd apps/interfaces/cli cli", "cli": "bun src/interfaces/cli/index.ts",
"bootstrap": "bun run --cwd apps/interfaces/cli bootstrap" "bootstrap": "bun src/interfaces/cli/bootstrap.ts",
"api": "bun src/interfaces/api/main.ts",
"ws": "bun src/interfaces/ws/main.ts",
"grpc": "bun src/interfaces/grpc/main.ts",
"web": "bun src/interfaces/web/main.ts",
"daemon": "bun src/interfaces/daemon/main.ts",
"tui": "bun src/interfaces/tui/main.ts"
}, },
"devDependencies": { "devDependencies": {
"@types/bun": "^1.2.0", "@types/bun": "^1.2.0",

Some files were not shown because too many files have changed in this diff Show More