domma-cms 1.10.28 → 1.10.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.10.29] - 2026-10-26
4
+
5
+ - **Pro Tools open again on sites behind the Manager.** The admin's versioned-file check ran before the Manager handed a request to its site, so a site's request for a Tool's screen (Analytics Pro's dashboard, for one) was answered from the Manager's own copy of that plugin; where the two builds differ the fingerprint never matched and the screen 404'd. The check now runs after the plugins' hooks, so the site answers its own files.
6
+
3
7
  ## [1.10.28] - 2026-10-26
4
8
 
5
9
  - Admin pages and Tools have clearer section boundaries: stronger outlines, coloured header bands, icon tiles and a shaded canvas, all using the active theme palette. Settings and editor sections have distinct identities, and optional generated CSS and template-variable references fold away with keyboard-accessible controls.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.10.28",
3
+ "version": "1.10.29",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
package/server/server.js CHANGED
@@ -166,7 +166,7 @@ if (publicCorsPrefixes.length) {
166
166
  await app.register(multipart, { limits: { fileSize: serverConfig.uploads.maxFileSize } });
167
167
  await app.register(rateLimit, rateLimitOptions());
168
168
 
169
- registerAdminAssets(app, {root: ROOT, dommaDist: DOMMA_DIST});
169
+ const adminAssets = registerAdminAssets(app, {root: ROOT, dommaDist: DOMMA_DIST});
170
170
  // Text assets (scripts, stylesheets, SVG, JSON) from memory, compressed once
171
171
  // per encoding - services/assetCache.js. Its onSend hook must be added BEFORE
172
172
  // compress registers its own, so compress finds content-encoding set and
@@ -727,6 +727,8 @@ await registerCoreSources();
727
727
  (await import('./services/passwordReset.js')).registerPasswordChangeNotice({log: app.log});
728
728
 
729
729
  await registerPlugins(app);
730
+ // After the plugins' onRequest hooks - see serve() in services/adminAssets.js.
731
+ adminAssets.serve();
730
732
 
731
733
  // ---------------------------------------------------------------------------
732
734
  // Public Plugin Routes (root-level, before catch-all)
@@ -76,7 +76,10 @@ export function registerAdminAssets(app, {root, dommaDist, maxBytes = 16 * 1024
76
76
  app.get(url, async (_request, reply) => reply.header('Cache-Control', 'no-store')
77
77
  .type('text/html; charset=utf-8').send(await index()));
78
78
  }
79
- app.addHook('onRequest', async (request, reply) => {
79
+ // Added by serve(), after the plugins: a plugin's onRequest hook that answers a request
80
+ // itself (site-manager proxying another site's host) must run before this one, or this
81
+ // answers from the manager's own files - a different build of the same plugin 404s.
82
+ const serve = () => app.addHook('onRequest', async (request, reply) => {
80
83
  if (!['GET', 'HEAD'].includes(request.method)) return;
81
84
  let url;
82
85
  try { url = new URL(request.raw.url, 'http://localhost'); } catch { return; }
@@ -113,5 +116,5 @@ export function registerAdminAssets(app, {root, dommaDist, maxBytes = 16 * 1024
113
116
  reply.removeHeader('content-length');
114
117
  return JSON.stringify(config);
115
118
  });
116
- return {version};
119
+ return {version, serve};
117
120
  }