Skip to content

Commit 5d1fee6

Browse files
authored
Merge pull request #579 from clidey/hk/feature/change-to-clidey-ux
Hk/feature/change to clidey ux
2 parents ae27c05 + fb4e393 commit 5d1fee6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4546
-3969
lines changed

core/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ COPY ./frontend/ ./
2121

2222
# Create empty EE modules for Vite to resolve during CE build
2323
RUN mkdir -p ee/frontend/src/components/theme ee/frontend/src/components/charts ee/frontend/src/pages/raw-execute ee/frontend/src && \
24-
echo "export default {}; export const ThemeConfig = {};" > ee/frontend/src/components/theme/theme.ts && \
2524
echo "export default {}; export const LineChart = () => null;" > ee/frontend/src/components/charts/line-chart.tsx && \
2625
echo "export default {}; export const PieChart = () => null;" > ee/frontend/src/components/charts/pie-chart.tsx && \
2726
echo "export default {}; export const AnalyzeGraph = () => null;" > ee/frontend/src/pages/raw-execute/analyze-view.tsx && \

core/Dockerfile.ee

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# WhoDB Enterprise Edition Dockerfile
16-
# Build from project root: docker build -f ee/Dockerfile -t whodb:ee .
16+
# Build from project root: docker build -f core/Dockerfile.ee -t whodb:ee .
1717

1818
# Build frontend with EE modules
1919
FROM node:lts-alpine AS build-stage
@@ -37,8 +37,8 @@ FROM golang:1.24.1-alpine AS backend-stage
3737
RUN apk update && apk add --no-cache gcc musl-dev git bash
3838
WORKDIR /app
3939

40-
# Copy scripts first as they're needed for GraphQL generation
41-
COPY ./scripts/ ./scripts/
40+
# Copy EE workspace file
41+
COPY ./go.work.ee ./
4242

4343
# Copy core module files
4444
COPY ./core/go.mod ./core/go.sum ./core/
@@ -55,22 +55,14 @@ RUN go mod download
5555
WORKDIR /app
5656
COPY ./core/ ./core/
5757
COPY ./ee/ ./ee/
58+
COPY ./scripts/ ./scripts/
5859

5960
# Copy frontend build to be embedded
6061
COPY --from=build-stage /app/build/ ./core/build/
6162

62-
# Generate GraphQL code for EE
63-
# First ensure we have all the dependencies for gqlgen
64-
WORKDIR /app/ee
65-
RUN go mod download
66-
WORKDIR /app
67-
68-
# Build backend with EE features
63+
# Build backend with EE features using workspace
6964
WORKDIR /app/core
70-
# Add replace directive for EE module
71-
RUN go mod edit -replace github.com/clidey/whodb/ee=/app/ee && \
72-
go mod tidy && \
73-
CGO_ENABLED=1 GOOS=linux go build -tags ee -o /core
65+
RUN GOWORK=/app/go.work.ee CGO_ENABLED=1 GOOS=linux go build -tags ee -o /core
7466

7567
# Final stage
7668
FROM alpine:3.22.1

core/src/plugins/gorm/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
)
3131

3232
var (
33-
intTypes = mapset.NewSet("INTEGER", "SMALLINT", "BIGINT", "INT", "TINYINT", "MEDIUMINT", "INT8", "INT16", "INT32", "INT64")
33+
intTypes = mapset.NewSet("INTEGER", "SMALLINT", "BIGINT", "INT", "TINYINT", "MEDIUMINT", "INT4", "INT8", "INT16", "INT32", "INT64")
3434
uintTypes = mapset.NewSet("TINYINT UNSIGNED", "SMALLINT UNSIGNED", "MEDIUMINT UNSIGNED", "BIGINT UNSIGNED", "UINT8", "UINT16", "UINT32", "UINT64")
3535
floatTypes = mapset.NewSet("REAL", "NUMERIC", "DOUBLE PRECISION", "FLOAT", "NUMBER", "DOUBLE", "DECIMAL")
3636
boolTypes = mapset.NewSet("BOOLEAN", "BIT", "BOOL")

frontend/.postcssrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

frontend/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "frontend",
33
"version": "0.1.0",
44
"private": true,
5+
"type": "module",
56
"dependencies": {
67
"@apollo/client": "^3.13.8",
8+
"@clidey/ux": "^0.15.0",
79
"@codemirror/lang-json": "^6.0.2",
810
"@codemirror/lang-markdown": "^6.3.3",
911
"@codemirror/lang-sql": "^6.9.0",
@@ -12,7 +14,9 @@
1214
"@codemirror/view": "^6.38.1",
1315
"@dagrejs/dagre": "^1.1.5",
1416
"@emotion/is-prop-valid": "^1.3.1",
17+
"@heroicons/react": "^2.2.0",
1518
"@reduxjs/toolkit": "^2.8.2",
19+
"@tailwindcss/vite": "^4.1.11",
1620
"@types/react": "^18.3.23",
1721
"@types/react-dom": "^18.3.7",
1822
"@types/react-table": "^7.7.20",
@@ -35,6 +39,7 @@
3539
"redux-persist": "^6.0.0",
3640
"remark-gfm": "^4.0.1",
3741
"tailwind-merge": "^3.3.1",
42+
"tw-animate-css": "^1.3.6",
3843
"uuid": "^11.1.0"
3944
},
4045
"scripts": {
@@ -43,13 +48,11 @@
4348
"build": "tsc -p tsconfig.ce.json && vite build",
4449
"build:ce": "tsc -p tsconfig.ce.json && vite build",
4550
"build:ee": "VITE_BUILD_EDITION=ee vite build",
46-
4751
"# Primary test commands - use these for running tests": "",
4852
"cypress:ce": "pnpm run _test:ce:setup && bash ../dev/wait-for-services.sh && NODE_ENV=test pnpm cypress open; pnpm run _test:ce:cleanup",
4953
"cypress:ce:headless": "pnpm run _test:ce:setup && bash ../dev/wait-for-services.sh && NODE_ENV=test npx cypress run --browser chrome; pnpm run _test:ce:cleanup",
5054
"cypress:ee": "pnpm run _test:ee:setup && bash ../dev/wait-for-services.sh && NODE_ENV=test pnpm cypress open; pnpm run _test:ee:cleanup",
5155
"cypress:ee:headless": "pnpm run _test:ee:setup && bash ../dev/wait-for-services.sh && NODE_ENV=test npx cypress run --browser chrome; pnpm run _test:ee:cleanup",
52-
5356
"# Auxiliary test commands - not recommended for individual use": "",
5457
"_test:ce:setup": "bash ../dev/setup-e2e.sh && NODE_ENV=test vite --port 3000 &",
5558
"_test:ce:cleanup": "pkill -f 'vite --port 3000' || true; bash ../dev/cleanup-e2e.sh",
@@ -60,7 +63,6 @@
6063
"_cypress:ce:run": "NODE_ENV=test npx cypress run --browser chrome",
6164
"_cypress:ee:run": "NODE_ENV=test npx cypress run --browser chrome",
6265
"_cypress:run:chromium": "NODE_ENV=test npx cypress run --browser chromium",
63-
6466
"# Coverage and code generation utilities": "",
6567
"view:coverage": "npx nyc report --reporter=text-summary",
6668
"view:coverage:frontend": "npx nyc report --reporter=html",
@@ -88,17 +90,14 @@
8890
"@graphql-codegen/typescript": "^4.1.6",
8991
"@graphql-codegen/typescript-operations": "^4.6.1",
9092
"@graphql-codegen/typescript-react-apollo": "^4.3.3",
91-
"@tailwindcss/postcss": "^4.1.11",
9293
"@types/lodash": "^4.17.20",
9394
"@types/react-window": "^1.8.8",
9495
"@types/uuid": "^10.0.0",
9596
"@vitejs/plugin-react": "^4.7.0",
96-
"autoprefixer": "^10.4.21",
9797
"babel-plugin-istanbul": "^7.0.0",
9898
"buffer": "^6.0.3",
9999
"cypress": "^14.5.2",
100100
"nyc": "^17.1.0",
101-
"postcss": "^8.5.6",
102101
"process": "^0.11.10",
103102
"tailwindcss": "^4.1.11",
104103
"typescript": "^5.8.3",

0 commit comments

Comments
 (0)