@rsktash/beads-ui 0.1.19 → 0.1.23

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/dist/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Beads UI</title>
7
- <script type="module" crossorigin src="/assets/index-B1q58Ncp.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-BSGhTjZV.css">
7
+ <script type="module" crossorigin src="/assets/index-Bs9QYEN5.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-B7D5FmYL.css">
9
9
  </head>
10
10
  <body style="background: #FDFBF7; color: #1A1A1A;">
11
11
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsktash/beads-ui",
3
- "version": "0.1.19",
3
+ "version": "0.1.23",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/rsktash/beads-ui.git"
package/server/app.js CHANGED
@@ -4,6 +4,10 @@
4
4
  import express from 'express';
5
5
  import fs from 'node:fs';
6
6
  import path from 'node:path';
7
+ import { createRequire } from 'node:module';
8
+
9
+ const require = createRequire(import.meta.url);
10
+ const pkg = require('../package.json');
7
11
  import {
8
12
  getAvailableWorkspaces,
9
13
  registerWorkspace
@@ -64,6 +68,9 @@ export function createApp(config) {
64
68
  app.get('/api/config', (_req, res) => {
65
69
  res.status(200).json({
66
70
  ok: true,
71
+ version: pkg.version,
72
+ user: process.env.BEADS_UI_USER || '',
73
+ role: process.env.BEADS_UI_ROLE || '',
67
74
  fileAttachmentBaseUrl: (process.env.FILE_ATTACHMENT_BASE_URL || '').replace(/\/$/, '')
68
75
  });
69
76
  });
@@ -114,12 +121,8 @@ export function createApp(config) {
114
121
  const staticDir = process.env.BEADS_UI_STATIC || config.app_dir;
115
122
  app.use(express.static(staticDir));
116
123
 
117
- // Root serves index.html explicitly (even if static would catch it)
118
- /**
119
- * @param {Request} _req
120
- * @param {Response} res
121
- */
122
- app.get('/', (_req, res) => {
124
+ // SPA catch-all — serve index.html for all non-API, non-static routes
125
+ app.get('*', (_req, res) => {
123
126
  const index_path = path.join(staticDir, 'index.html');
124
127
  res.sendFile(index_path);
125
128
  });