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:
@@ -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
|
||||||
|
|||||||
@@ -11,3 +11,4 @@ docs/lesson/
|
|||||||
dist/
|
dist/
|
||||||
apps/**/edit-log/
|
apps/**/edit-log/
|
||||||
edit-log/
|
edit-log/
|
||||||
|
dist/
|
||||||
|
|||||||
+3
-3
@@ -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
|
||||||
|
|||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -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
|
||||||
|
|||||||
+13
-11
@@ -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",
|
||||||
@@ -25,4 +27,4 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-rs/argon2": "^2.2.0"
|
"@node-rs/argon2": "^2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user