@polderlabs/bizar-dash 3.0.0 → 3.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-dash",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Web + TUI dashboard for the Bizar agent platform (optional companion to @polderlabs/bizar)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,7 +42,7 @@
42
42
  "@polderlabs/bizar": ">=2.7.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
- "@polderlabs/bizar-dash": {
45
+ "@polderlabs/bizar": {
46
46
  "optional": true
47
47
  }
48
48
  },
@@ -151,6 +151,15 @@ export async function createServer({
151
151
  res.sendFile(join(DIST_DIR, 'index.html'));
152
152
  });
153
153
  } else {
154
+ const distIndex = join(DIST_DIR, 'index.html');
155
+ if (!existsSync(distIndex)) {
156
+ // eslint-disable-next-line no-console
157
+ console.error(`[bizar-dash] dist/index.html not found at ${DIST_DIR}`);
158
+ // eslint-disable-next-line no-console
159
+ console.error(`[bizar-dash] The published package should include a prebuilt dist/.`);
160
+ // eslint-disable-next-line no-console
161
+ console.error(`[bizar-dash] Try: npm install -g @polderlabs/bizar-dash --force`);
162
+ }
154
163
  app.get('/', (_req, res) => res.status(503).type('html').send(renderNotBuiltPage()));
155
164
  app.get('*', (_req, res) => {
156
165
  if (_req.path.startsWith('/api') || _req.path === '/ws') {
@@ -159,10 +168,6 @@ export async function createServer({
159
168
  }
160
169
  res.status(503).type('html').send(renderNotBuiltPage());
161
170
  });
162
- // eslint-disable-next-line no-console
163
- console.warn(
164
- `[dashboard] dist/ not found at ${DIST_DIR}. Run \`npm run build\` to build the React SPA.`,
165
- );
166
171
  }
167
172
 
168
173
  wss.on('connection', (ws, req) => {
@@ -344,7 +349,7 @@ function renderNotBuiltPage() {
344
349
  <html lang="en">
345
350
  <head>
346
351
  <meta charset="UTF-8" />
347
- <title>Bizar Dashboard not built</title>
352
+ <title>Dashboard assets not found</title>
348
353
  <style>
349
354
  :root { color-scheme: dark; }
350
355
  body {
@@ -373,11 +378,13 @@ function renderNotBuiltPage() {
373
378
  </head>
374
379
  <body>
375
380
  <div class="card">
376
- <h1>Dashboard not built</h1>
377
- <p>The React SPA has not been built yet. The Bizar dashboard server
378
- is running, but the frontend bundle is missing.</p>
379
- <p>Build from the <code>bizar-dash</code> package root:</p>
380
- <pre><code>cd bizar-dash &amp;&amp; npm run build</code></pre>
381
+ <h1>Dashboard assets not found</h1>
382
+ <p>The <code>@polderlabs/bizar-dash</code> package ships prebuilt assets
383
+ in <code>dist/</code>. If you are seeing this, your install is broken.</p>
384
+ <p>Try:</p>
385
+ <pre><code>npm install -g @polderlabs/bizar-dash --force</code></pre>
386
+ <p>If the problem persists, file an issue at<br/>
387
+ <code>github.com/DrB0rk/BizarHarness</code></p>
381
388
  <p>The REST API and WebSocket are still live at <code>/api/*</code>
382
389
  and <code>/ws</code>.</p>
383
390
  </div>