Remove all Java code, de-mavenize, adapt to exist-core WebSocket#367
Merged
Conversation
66688ef to
dfff072
Compare
9c1c013 to
bb50079
Compare
BREAKING CHANGE: monex is now a pure XQuery app. Requires eXist-db 7.0+ with WebSocket support (exist-core PR #6145). - Remove all Java code (6 files), replaced by exist-core WebSocket module - Replace Maven build with Node.js/Gulp (modeled on semver.xq#69) - Add automated releases via semantic-release Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bb50079 to
af9a5f1
Compare
3db8575 to
314974e
Compare
…implify # Conflicts: # package-lock.json # package.json # pom.xml
Two issues prevented the console_spec from running outside of a default
localhost:8080 setup or against eXist 7.0+:
1. Hardcoded localhost:8080 URLs in cy.request and new WebSocket(...)
collided with whatever was on port 8080 on the dev machine, causing
the tests to silently hit the wrong server.
Fix: derive existRoot and wsRoot from Cypress.config('baseUrl') so
the tests follow whatever port the spec is configured for.
2. cy.request to /exist/rest/db with the console:log _query had no
auth, which works against older eXist where guest can call the
console module via REST. eXist 7.0+ rejects this with 403.
Fix: include Basic admin: auth on the REST requests that trigger
server-side console:log.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57755c6 to
8c076ca
Compare
Two CI fixes for the new test job: 1. npm ci --ignore-scripts (used to skip husky's prepare) also skips Cypress's postinstall step that downloads the binary, so `npx cypress run` fails with "Cypress binary is missing". Add an explicit `npx cypress install` step right after `npm ci`. 2. Drop `release` from the eXist version matrix. This PR (de-mavenize + WebSocket adaptation) requires eXist 7.0+ for the /exist/ws endpoint from eXist-db/exist#6145, so the `release` (6.x) matrix entry is guaranteed to fail. Keep `latest` only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The de-mavenize commit (aa11953) replaced the Java console:jmx-token() with an XQuery monex:jmx-token() function and loaded it via: util:import-module(..., "modules/monex.xqm") But app.xql itself lives in modules/, so the sibling import should be "monex.xqm", not "modules/monex.xqm". The wrong path threw a static-error which the try/catch wrapper swallowed → $app:jmx-token resolved to false() → the rendered page got `token: "false"` → silently broken JMX polling on the monitoring dashboard. The catch-all wrapper exists for the legitimate case where the monex module isn't loaded yet (during initial install). It also hides typos like this one; the next commit adds a regression test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two cypress tests covering the JMX token chain that broke silently in
the previous commit:
1. app:instances-data renders a valid token for localhost — asserts
window.JMX_INSTANCES[0].token matches a UUID format. Directly
catches the "token serializes as 'false'" failure mode where
app.xql's try/catch swallowed an error.
2. JMX endpoint accepts the rendered token — end-to-end check that
the token in JMX_INSTANCES actually authorizes /exist/status.
Catches subtler regressions (well-formed token, wrong endpoint
or auth path).
URLs derive from Cypress.config('baseUrl') so the spec is
port-agnostic — same pattern as console_spec.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
6 tasks
Member
Author
|
[This response was co-authored with Claude Code. -Joe] @dizzzz Re-ran the failed |
dizzzz
approved these changes
May 18, 2026
This was referenced May 19, 2026
Closed
duncdrum
pushed a commit
that referenced
this pull request
May 19, 2026
The Java code that previously lived in monex (RemoteConsoleEndpoint, ConsoleModule, JMXToken, Log) was removed in #367. Those features are now provided by eXist-db core 7.x as the WebSocket endpoint and the ConsoleCompatModule. monex 7.x is therefore not installable against eXist-db 6.x or earlier. This commit exists to signal the breaking change to semantic-release, which interprets the previous merge as non-breaking (no `!` marker or BREAKING CHANGE footer on the squash/merge commit). BREAKING CHANGE: monex no longer ships its own Java code. The WebSocket endpoint and the `console` XQuery module are now provided by eXist-db core 7.x. Earlier eXist-db versions are unsupported.
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[This response was co-authored with Claude Code. -Joe]
Summary
The Java code that previously provided monex's own WebSocket endpoint (
/exist/rconsole) is removed in favor of the WebSocket support added to eXist-db core in eXist-db/exist#6145. This enables all Java code to be removed from monex and replaces the Maven build system with Node.js/Gulp, following the pattern established in eXist-db/semver.xq#69. Monex becomes a pure XQuery/XAR application with fully automated releases.Depends on: eXist-db/exist#6145 (Jetty 12, WebSocket module) — merged.
Java Removal
The entire
src/main/java/tree (6 files) is removed and replaced by the WebSocket support now in eXist-db core (#6145):RemoteConsoleEndpointWebSocketEndpoint(/exist/ws)RemoteConsoleAdapterWebSocketAdapterConsoleAdapterConsoleAdapterinterfaceConsoleModuleConsoleCompatModuleLogConsoleCompatFunctionsJMXTokenmonex:jmx-token()(modules/monex.xqm)Client-side adaptation:
console.js(andconsole_spec.cy.js) connect to/exist/wsinstead of the removed/exist/rconsole.De-mavenization (modeled on semver.xq#69)
Build system: Maven → Node.js/Gulp
pom.xmlpackage.json(version, metadata, scripts, deps)xar-assembly.xmlgulpfile.js(template → copy → zip pipeline)xquery-license-style.xmlexpath-pkg.xml.tmpl+repo.xml.tmplAutomated releases: semantic-release
.releasercscripts/update-repo-changelog.js<change>intorepo.xml.tmplcommitlint.config.js.husky/commit-msg.github/workflows/commitlint.ymlBuild commands
Test infrastructure
console_spec.cy.jsis updated so the suite runs against whateverCypress.config('baseUrl')is configured for (was hardcoded tolocalhost:8080), and thecy.requestcalls that trigger server-sideconsole:lognow include Basic auth (eXist 7.0+ rejects guest access to the console module via REST with 403).Test Results
Latest run against
existdb/existdb:latest(eXist 7.0-SNAPSHOT, with #6145 merged):🤖 Generated with Claude Code