@rsktash/beads-ui 0.1.4 → 0.1.6
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/README.md +3 -3
- package/dist/assets/{index-CeliZ293.js → index-DuLF7942.js} +29 -29
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/app.js +8 -0
- package/server/cli/usage.js +3 -3
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DuLF7942.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-Ux6DCth7.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body style="background: #FDFBF7; color: #1A1A1A;">
|
package/package.json
CHANGED
package/server/app.js
CHANGED
|
@@ -60,6 +60,14 @@ export function createApp(config) {
|
|
|
60
60
|
res.status(200).json({ ok: true, workspaces });
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
+
// Runtime config for the client
|
|
64
|
+
app.get('/api/config', (_req, res) => {
|
|
65
|
+
res.status(200).json({
|
|
66
|
+
ok: true,
|
|
67
|
+
fileAttachmentBaseUrl: (process.env.FILE_ATTACHMENT_BASE_URL || '').replace(/\/$/, '')
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
63
71
|
if (
|
|
64
72
|
!fs.statSync(path.resolve(config.app_dir, 'main.bundle.js'), {
|
|
65
73
|
throwIfNoEntry: false
|
package/server/cli/usage.js
CHANGED
|
@@ -24,7 +24,7 @@ export function printUsage(out_stream) {
|
|
|
24
24
|
' PORT Server port (default: 3333)',
|
|
25
25
|
' HOST Bind address (default: 127.0.0.1)',
|
|
26
26
|
' BEADS_DOLT_PASSWORD Password for remote Dolt server',
|
|
27
|
-
'
|
|
27
|
+
' FILE_ATTACHMENT_BASE_URL Base URL for attach:// URIs in markdown',
|
|
28
28
|
'',
|
|
29
29
|
'Dolt modes:',
|
|
30
30
|
' Embedded (default): spawns a local dolt sql-server from .beads/embeddeddolt/',
|
|
@@ -34,9 +34,9 @@ export function printUsage(out_stream) {
|
|
|
34
34
|
'',
|
|
35
35
|
'Attachments:',
|
|
36
36
|
' Markdown content can use attach://<path> URIs for portable file references.',
|
|
37
|
-
' Set
|
|
37
|
+
' Set FILE_ATTACHMENT_BASE_URL to resolve them at render time.',
|
|
38
38
|
' Example: attach://bead-42/shot.png becomes',
|
|
39
|
-
' ${
|
|
39
|
+
' ${FILE_ATTACHMENT_BASE_URL}/bead-42/shot.png',
|
|
40
40
|
''
|
|
41
41
|
];
|
|
42
42
|
for (const line of lines) {
|