beads-ui 0.4.1 → 0.4.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/CHANGES.md +7 -0
- package/package.json +3 -2
- package/server/app.js +7 -5
- package/server/cli/daemon.js +2 -2
- package/server/config.js +1 -2
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
- [`66e31ff`](https://github.com/mantoni/beads-ui/commit/66e31ff0e053f3691657ce1175fd9b02155ca699)
|
|
6
|
+
Fix pre-bundled app: Check for bundle instead of NODE_ENV (Maximilian Antoni)
|
|
7
|
+
|
|
8
|
+
_Released by [Maximilian Antoni](https://github.com/mantoni) on 2025-10-29._
|
|
9
|
+
|
|
3
10
|
## 0.4.1
|
|
4
11
|
|
|
5
12
|
- [`03d3477`](https://github.com/mantoni/beads-ui/commit/03d34774cd35bf03d142d2869633327cbe4902bd)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beads-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Local UI for Beads — Collaborate on issues with your coding agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"preversion": "npm run all",
|
|
30
30
|
"version": "changes --commits --footer",
|
|
31
31
|
"postversion": "git push --follow-tags && npm publish",
|
|
32
|
-
"prepack": "
|
|
32
|
+
"prepack": "npm run build",
|
|
33
|
+
"postpack": "rm app/main.bundle.js app/main.bundle.js.map"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"debug": "^4.4.3",
|
package/server/app.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* @import { Express, Request, Response } from 'express'
|
|
3
3
|
*/
|
|
4
4
|
import express from 'express';
|
|
5
|
+
import fs from 'node:fs';
|
|
5
6
|
import path from 'node:path';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Create and configure the Express application.
|
|
9
10
|
*
|
|
10
|
-
* @param {{ host: string, port: number,
|
|
11
|
+
* @param {{ host: string, port: number, app_dir: string, root_dir: string }} config - Server configuration.
|
|
11
12
|
* @returns {Express} Configured Express app instance.
|
|
12
13
|
*/
|
|
13
14
|
export function createApp(config) {
|
|
@@ -26,12 +27,13 @@ export function createApp(config) {
|
|
|
26
27
|
res.status(200).send({ ok: true });
|
|
27
28
|
});
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
if (
|
|
31
|
+
!fs.statSync(path.resolve(config.app_dir, 'main.bundle.js'), {
|
|
32
|
+
throwIfNoEntry: false
|
|
33
|
+
})
|
|
34
|
+
) {
|
|
32
35
|
/**
|
|
33
36
|
* On-demand bundle for the browser using esbuild.
|
|
34
|
-
* Note: esbuild is loaded lazily so tests don't require it to be installed.
|
|
35
37
|
*
|
|
36
38
|
* @param {Request} _req
|
|
37
39
|
* @param {Response} res
|
package/server/cli/daemon.js
CHANGED
|
@@ -256,6 +256,6 @@ export function printServerUrl() {
|
|
|
256
256
|
`beads db ${resolved_db.path} (${resolved_db.source}${resolved_db.exists ? '' : ', missing'})`
|
|
257
257
|
);
|
|
258
258
|
|
|
259
|
-
const { url
|
|
260
|
-
console.log(`beads ui listening on ${url}
|
|
259
|
+
const { url } = getConfig();
|
|
260
|
+
console.log(`beads ui listening on ${url}`);
|
|
261
261
|
}
|
package/server/config.js
CHANGED
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
9
9
|
* (i.e., the current working directory) so DB resolution follows the
|
|
10
10
|
* caller's context rather than the install location.
|
|
11
11
|
*
|
|
12
|
-
* @returns {{ host: string, port: number,
|
|
12
|
+
* @returns {{ host: string, port: number, app_dir: string, root_dir: string, url: string }}
|
|
13
13
|
*/
|
|
14
14
|
export function getConfig() {
|
|
15
15
|
const this_file = fileURLToPath(new URL(import.meta.url));
|
|
@@ -28,7 +28,6 @@ export function getConfig() {
|
|
|
28
28
|
return {
|
|
29
29
|
host: host_value,
|
|
30
30
|
port: port_value,
|
|
31
|
-
env: process.env.NODE_ENV ? String(process.env.NODE_ENV) : 'development',
|
|
32
31
|
app_dir: path.resolve(package_root, 'app'),
|
|
33
32
|
root_dir,
|
|
34
33
|
url: `http://${host_value}:${port_value}`
|