Skip to content

Commit 8ac89b6

Browse files
akoclaude
andcommitted
Fix Chromium install in devcontainer and unquote SORT BY attributes
- Move playwright-cli + Chromium install into Dockerfile as root with --with-deps to get all system dependencies automatically, instead of maintaining a fragile manual package list - Install Node.js 22 in Dockerfile, remove redundant devcontainer feature - Fix SORT BY quoted identifiers: use getQualifiedNameText() instead of raw GetText() so "Title" is stored as Title in BSON Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cc82663 commit 8ac89b6

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

cmd/mxcli/tool_templates.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ func generateDevcontainerJSON(projectName, mprPath string) string {
251251
"dockerfile": "Dockerfile"
252252
},
253253
"features": {
254-
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
255-
"ghcr.io/devcontainers/features/node:1": {}
254+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
256255
},
257256
"forwardPorts": [8080, 8090, 5432],
258257
"portsAttributes": {
@@ -262,7 +261,7 @@ func generateDevcontainerJSON(projectName, mprPath string) string {
262261
"containerEnv": {
263262
"PLAYWRIGHT_CLI_SESSION": "mendix-app"
264263
},
265-
"postCreateCommand": "curl -fsSL https://claude.ai/install.sh | bash && npm install -g @playwright/cli@latest && playwright-cli install chromium && if [ -f ./mxcli ] && ! file ./mxcli | grep -q Linux; then echo '⚠ ./mxcli is not a Linux binary. Replace it with the linux-amd64 or linux-arm64 build.'; fi",
264+
"postCreateCommand": "curl -fsSL https://claude.ai/install.sh | bash && if [ -f ./mxcli ] && ! file ./mxcli | grep -q Linux; then echo '⚠ ./mxcli is not a Linux binary. Replace it with the linux-amd64 or linux-arm64 build.'; fi",
266265
"customizations": {
267266
"vscode": {
268267
"extensions": [
@@ -281,22 +280,23 @@ func generateDevcontainerJSON(projectName, mprPath string) string {
281280
func generateDockerfile(projectName, mprPath string) string {
282281
return `FROM mcr.microsoft.com/devcontainers/base:bookworm
283282
284-
# Install Adoptium JDK 21 (required by MxBuild) and utility tools
285-
RUN apt-get update && apt-get install -y --no-install-recommends wget apt-transport-https gpg && \
283+
# Install Adoptium JDK 21 (required by MxBuild), Node.js 22, and utility tools
284+
RUN apt-get update && apt-get install -y --no-install-recommends wget apt-transport-https gpg ca-certificates curl && \
286285
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/keyrings/adoptium.gpg && \
287286
echo "deb [signed-by=/etc/apt/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main" > /etc/apt/sources.list.d/adoptium.list && \
287+
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
288288
apt-get update && \
289289
apt-get install -y --no-install-recommends \
290290
temurin-21-jdk \
291+
nodejs \
291292
postgresql-client \
292293
kafkacat \
293-
# Chromium runtime dependencies for playwright-cli
294-
libglib2.0-0 libnspr4 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
295-
libdbus-1-3 libcups2 libxkbcommon0 libatspi2.0-0 libxcomposite1 \
296-
libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 \
297-
libcairo2 libpango-1.0-0 \
298294
&& apt-get clean \
299295
&& rm -rf /var/lib/apt/lists/*
296+
297+
# Install playwright-cli and Chromium with all system dependencies (must run as root)
298+
RUN npm install -g @playwright/cli@latest && \
299+
npx playwright install --with-deps chromium
300300
`
301301
}
302302

mdl/visitor/visitor_page_v3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ func buildSortColumnAsOrderBy(ctx parser.ISortColumnContext) ast.OrderByItemV3 {
894894
item := ast.OrderByItemV3{Direction: "ASC"}
895895

896896
if qn := scCtx.QualifiedName(); qn != nil {
897-
item.Attribute = qn.GetText()
897+
item.Attribute = getQualifiedNameText(qn)
898898
} else if id := scCtx.IDENTIFIER(); id != nil {
899899
item.Attribute = id.GetText()
900900
}

0 commit comments

Comments
 (0)