@karmaniverous/jeeves-server 3.1.1 → 3.1.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/.tsbuildinfo +1 -1
- package/CHANGELOG.md +11 -7
- package/dist/src/services/markdown.js +10 -2
- package/package.json +1 -1
- package/src/services/markdown.ts +21 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
|
4
4
|
|
|
5
|
-
#### [v3.1.
|
|
5
|
+
#### [v3.1.2](https://github.com/karmaniverous/jeeves-server/compare/v2.9.3...v3.1.2)
|
|
6
6
|
|
|
7
|
+
- fix: parse inline tokens in heading renderer [`#93`](https://github.com/karmaniverous/jeeves-server/pull/93)
|
|
7
8
|
- fix: prevent full data reload on tab switch [`#91`](https://github.com/karmaniverous/jeeves-server/pull/91)
|
|
8
9
|
- fix: Rendered tab persists when switching to Raw on watcher-rendered files [`#90`](https://github.com/karmaniverous/jeeves-server/pull/90)
|
|
9
10
|
- feat: extend /api/status with ?events=N for recent event log [`#89`](https://github.com/karmaniverous/jeeves-server/pull/89)
|
|
@@ -34,11 +35,12 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
34
35
|
- fix: exit edit mode after save [`#63`](https://github.com/karmaniverous/jeeves-server/pull/63)
|
|
35
36
|
- chore: add default port 1934 [`#62`](https://github.com/karmaniverous/jeeves-server/pull/62)
|
|
36
37
|
- chore: add default port 1934 [`#61`](https://github.com/karmaniverous/jeeves-server/pull/61)
|
|
38
|
+
- fix: parse inline tokens in heading renderer (code spans, bold, italic) [`#92`](https://github.com/karmaniverous/jeeves-server/issues/92)
|
|
39
|
+
- chore: add docs workflow, gitignore generated docs [`10bffb8`](https://github.com/karmaniverous/jeeves-server/commit/10bffb8b6ce9c45c31e88b07e26c4657cfba0776)
|
|
37
40
|
- updated docs [`86d88c7`](https://github.com/karmaniverous/jeeves-server/commit/86d88c76b04b32132195370328f434b427b7e23d)
|
|
38
41
|
- updated docs [`cbd8537`](https://github.com/karmaniverous/jeeves-server/commit/cbd853764a9b5953afb847aa653a5182f74b1cd6)
|
|
39
42
|
- docs: refresh README and guides for v3 CLI + config [`e437387`](https://github.com/karmaniverous/jeeves-server/commit/e4373875d454518b8f4d8dcf37613ddc36f2aace)
|
|
40
43
|
- refactor: remove hardcoded filters, fix lazy facet loading [`ffb0f2a`](https://github.com/karmaniverous/jeeves-server/commit/ffb0f2aa4fc763ddce66dd3f666bf5db6cc6dfe8)
|
|
41
|
-
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.0-0 [`b6c0f6d`](https://github.com/karmaniverous/jeeves-server/commit/b6c0f6db6ab8bbdcffb40affc00f9f573ca2caa5)
|
|
42
44
|
- docs: add typedoc config and dependencies [`761bb8c`](https://github.com/karmaniverous/jeeves-server/commit/761bb8cef7c5d84f17c9193d688bd9b0be67a6ca)
|
|
43
45
|
- feat: two-step facet selection + garbage value filtering [`6c60e97`](https://github.com/karmaniverous/jeeves-server/commit/6c60e9753761e9b2a844bcc9212baadc73841a19)
|
|
44
46
|
- feat: schema-driven facet rendering by uiHint [`97af834`](https://github.com/karmaniverous/jeeves-server/commit/97af834a29d3d4e95be3c157ecd07855b8aee403)
|
|
@@ -50,6 +52,7 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
50
52
|
- fix: make resetConfig reload runtime config [`79e8602`](https://github.com/karmaniverous/jeeves-server/commit/79e8602b4a8ee13c4de94bb3d262dd8bdb7cd2c8)
|
|
51
53
|
- chore: release @karmaniverous/jeeves-server v3.1.0 [`0688333`](https://github.com/karmaniverous/jeeves-server/commit/0688333e880847fc4c3beb773cdb0a907a3f82e9)
|
|
52
54
|
- updated docs [`075a6f3`](https://github.com/karmaniverous/jeeves-server/commit/075a6f36cee6279c83ba564e6efbde99ebac2f37)
|
|
55
|
+
- chore: release @karmaniverous/jeeves-server v3.1.1 [`736ec35`](https://github.com/karmaniverous/jeeves-server/commit/736ec35c550c0f8da5800413562f10643f9da6db)
|
|
53
56
|
- chore: release @karmaniverous/jeeves-server v3.0.1 [`67cf001`](https://github.com/karmaniverous/jeeves-server/commit/67cf0014073c62b18134da2c1266b505a1228874)
|
|
54
57
|
- lintfix [`00dc2b2`](https://github.com/karmaniverous/jeeves-server/commit/00dc2b2ec30ea2a4365d93b86c66330b831737a7)
|
|
55
58
|
- feat: render text/number facets as text inputs, chips for select/multiselect [`282adf8`](https://github.com/karmaniverous/jeeves-server/commit/282adf83c21b84d433ec23be5d1b6b51b5da8145)
|
|
@@ -64,8 +67,13 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
64
67
|
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.1 [`abfee9f`](https://github.com/karmaniverous/jeeves-server/commit/abfee9f6ee5b2ac1cf6c8e4838edd3e2e8133359)
|
|
65
68
|
- fix: remove unnecessary auth from /api/status calls (endpoint is public) [`f651fe7`](https://github.com/karmaniverous/jeeves-server/commit/f651fe7bff4320eb28b5039278bcdcd032cac6d5)
|
|
66
69
|
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.0-1 [`d08e571`](https://github.com/karmaniverous/jeeves-server/commit/d08e571d58bb6387e69441dc06511d92fb743c15)
|
|
70
|
+
- chore: release @karmaniverous/jeeves-server v3.0.0 [`ef408c3`](https://github.com/karmaniverous/jeeves-server/commit/ef408c37ee306417ee24d58b256cba672f7984c1)
|
|
71
|
+
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.0 [`bbeac17`](https://github.com/karmaniverous/jeeves-server/commit/bbeac17333ebad423b0fd8c2bcd310bbb0b63b27)
|
|
67
72
|
- fix: make +N more chip overflow a clickable link that expands the result [`d56ed6a`](https://github.com/karmaniverous/jeeves-server/commit/d56ed6a69526f96697ec8aa9922e104510b2a9f8)
|
|
73
|
+
- fix: increase facets timeout to 15s, add error logging [`dfda5dd`](https://github.com/karmaniverous/jeeves-server/commit/dfda5dd22b06f9fbabff2572d4a8a2ddf3c55be9)
|
|
74
|
+
- fix: use type=number input for number facets [`c245b6a`](https://github.com/karmaniverous/jeeves-server/commit/c245b6ae5dc9f7d762aebac21a9ca7f342f44024)
|
|
68
75
|
- fix: prevent full data reload on tab switch (only reload on path change) [`6390b14`](https://github.com/karmaniverous/jeeves-server/commit/6390b1409db92ec001cd2071cea6757a4c8fa081)
|
|
76
|
+
- fix: close SearchableSelect dropdown on outside click (capture phase) [`f85d8dd`](https://github.com/karmaniverous/jeeves-server/commit/f85d8dda1db97016b9f6d8244fac34bdaba2d1b1)
|
|
69
77
|
- Revert "fix: Rendered tab persists when switching to Raw on watcher-rendered files" [`71b79d4`](https://github.com/karmaniverous/jeeves-server/commit/71b79d4f8a839dcf5d865d7a747bb30e1cb43db3)
|
|
70
78
|
- feat: search facets, metadata chips, and click-to-filter [`20eeee8`](https://github.com/karmaniverous/jeeves-server/commit/20eeee8b6524d6a29ba99822e06ea57bef994fef)
|
|
71
79
|
- chore: add client as workspace member, align puppeteer versions [`6e3a40d`](https://github.com/karmaniverous/jeeves-server/commit/6e3a40dfdb91ffe2e39877d1b69b36db3e01f863)
|
|
@@ -78,6 +86,7 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
78
86
|
- chore: SOLID/DRY pass #3 + plugin test coverage [`7dcc4c3`](https://github.com/karmaniverous/jeeves-server/commit/7dcc4c3ad36a45a46dc99c8a1e749dfd2ec01e47)
|
|
79
87
|
- feat: add CLI commands (start, config validate/show, service) [`0437984`](https://github.com/karmaniverous/jeeves-server/commit/0437984e7f783604f9cbdd333db61f8d1af42961)
|
|
80
88
|
- fix: resolve knip unused files, dependencies, and exports [`964beba`](https://github.com/karmaniverous/jeeves-server/commit/964beba273f99be8d3302648c2dd442a3e3dcc07)
|
|
89
|
+
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.0-0 [`b6c0f6d`](https://github.com/karmaniverous/jeeves-server/commit/b6c0f6db6ab8bbdcffb40affc00f9f573ca2caa5)
|
|
81
90
|
- fix: address all gap analysis findings [`1eb02ab`](https://github.com/karmaniverous/jeeves-server/commit/1eb02abf0634be38c687d4927a2360cd27c3aad8)
|
|
82
91
|
- npm audit fix [`3a144b4`](https://github.com/karmaniverous/jeeves-server/commit/3a144b4b07e1387cf40733486e60aeaf7a34d0a6)
|
|
83
92
|
- feat: add GET /api/link-info endpoint [`02ece39`](https://github.com/karmaniverous/jeeves-server/commit/02ece3960aa91861455034aa4bfe8850c0b0f363)
|
|
@@ -104,11 +113,6 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
104
113
|
- fix: update linux-compat CI for monorepo paths [`22dd30f`](https://github.com/karmaniverous/jeeves-server/commit/22dd30ffe5543042287a299523e5b1125c86381e)
|
|
105
114
|
- chore: eliminate all lint warnings [`ed12c86`](https://github.com/karmaniverous/jeeves-server/commit/ed12c868546a3f14f7d809d7378235ac91415be7)
|
|
106
115
|
- fix: CI rimraf resolution and remove redundant client steps [`757c45c`](https://github.com/karmaniverous/jeeves-server/commit/757c45cf429e7c70358442e353922f7999d74640)
|
|
107
|
-
- chore: release @karmaniverous/jeeves-server v3.0.0 [`ef408c3`](https://github.com/karmaniverous/jeeves-server/commit/ef408c37ee306417ee24d58b256cba672f7984c1)
|
|
108
|
-
- chore: release @karmaniverous/jeeves-server-openclaw v0.1.0 [`bbeac17`](https://github.com/karmaniverous/jeeves-server/commit/bbeac17333ebad423b0fd8c2bcd310bbb0b63b27)
|
|
109
|
-
- fix: increase facets timeout to 15s, add error logging [`dfda5dd`](https://github.com/karmaniverous/jeeves-server/commit/dfda5dd22b06f9fbabff2572d4a8a2ddf3c55be9)
|
|
110
|
-
- fix: use type=number input for number facets [`c245b6a`](https://github.com/karmaniverous/jeeves-server/commit/c245b6ae5dc9f7d762aebac21a9ca7f342f44024)
|
|
111
|
-
- fix: close SearchableSelect dropdown on outside click (capture phase) [`f85d8dd`](https://github.com/karmaniverous/jeeves-server/commit/f85d8dda1db97016b9f6d8244fac34bdaba2d1b1)
|
|
112
116
|
- fix: server_browse and server_export route mismatches [`82ef907`](https://github.com/karmaniverous/jeeves-server/commit/82ef907750dbb0d47158254cd21b7a8196d8eaeb)
|
|
113
117
|
- npm audit fix [`2f3b5c8`](https://github.com/karmaniverous/jeeves-server/commit/2f3b5c89af0bf56b17fd37719f5927812f2c8e24)
|
|
114
118
|
- publishconfig public access [`8e4358c`](https://github.com/karmaniverous/jeeves-server/commit/8e4358cc43dc2f131840047d34f2644eb6293fe2)
|
|
@@ -83,6 +83,10 @@ export function parseMarkdown(markdown, options = {}) {
|
|
|
83
83
|
const text = typeof args === 'object' ? args.text : args;
|
|
84
84
|
const raw = typeof args === 'object' && args.raw ? args.raw : text;
|
|
85
85
|
const level = typeof args === 'object' ? args.depth : 1;
|
|
86
|
+
// Parse inline tokens to render code spans, bold, italic, links, etc.
|
|
87
|
+
const renderedText = typeof args === 'object' && args.tokens
|
|
88
|
+
? this.parser.parseInline(args.tokens)
|
|
89
|
+
: text;
|
|
86
90
|
const slug = raw
|
|
87
91
|
.toLowerCase()
|
|
88
92
|
.replace(/<[^>]+>/g, '')
|
|
@@ -90,8 +94,12 @@ export function parseMarkdown(markdown, options = {}) {
|
|
|
90
94
|
.replace(/\s+/g, '-')
|
|
91
95
|
.replace(/-+/g, '-')
|
|
92
96
|
.replace(/^-|-$/g, '');
|
|
93
|
-
headings.push({
|
|
94
|
-
|
|
97
|
+
headings.push({
|
|
98
|
+
level,
|
|
99
|
+
text: renderedText.replace(/<[^>]+>/g, ''),
|
|
100
|
+
slug,
|
|
101
|
+
});
|
|
102
|
+
return `<h${String(level)} id="${slug}">${renderedText} <a href="#${slug}" class="anchor">#</a></h${String(level)}>\n`;
|
|
95
103
|
};
|
|
96
104
|
// Rewrite relative image src to /path/ URLs
|
|
97
105
|
if (options.basePath) {
|
package/package.json
CHANGED
package/src/services/markdown.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import fs from 'node:fs';
|
|
6
6
|
|
|
7
|
+
import type { Token } from 'marked';
|
|
7
8
|
import { marked } from 'marked';
|
|
8
9
|
|
|
9
10
|
import { registerDiagram } from './embeddedDiagrams.js';
|
|
@@ -105,12 +106,25 @@ export function parseMarkdown(
|
|
|
105
106
|
const renderer = new marked.Renderer();
|
|
106
107
|
|
|
107
108
|
renderer.heading = function (
|
|
108
|
-
args:
|
|
109
|
+
args:
|
|
110
|
+
| string
|
|
111
|
+
| {
|
|
112
|
+
text: string;
|
|
113
|
+
raw?: string;
|
|
114
|
+
depth: number;
|
|
115
|
+
tokens?: Token[];
|
|
116
|
+
},
|
|
109
117
|
) {
|
|
110
118
|
const text = typeof args === 'object' ? args.text : args;
|
|
111
119
|
const raw = typeof args === 'object' && args.raw ? args.raw : text;
|
|
112
120
|
const level = typeof args === 'object' ? args.depth : 1;
|
|
113
121
|
|
|
122
|
+
// Parse inline tokens to render code spans, bold, italic, links, etc.
|
|
123
|
+
const renderedText =
|
|
124
|
+
typeof args === 'object' && args.tokens
|
|
125
|
+
? this.parser.parseInline(args.tokens)
|
|
126
|
+
: text;
|
|
127
|
+
|
|
114
128
|
const slug = raw
|
|
115
129
|
.toLowerCase()
|
|
116
130
|
.replace(/<[^>]+>/g, '')
|
|
@@ -119,9 +133,13 @@ export function parseMarkdown(
|
|
|
119
133
|
.replace(/-+/g, '-')
|
|
120
134
|
.replace(/^-|-$/g, '');
|
|
121
135
|
|
|
122
|
-
headings.push({
|
|
136
|
+
headings.push({
|
|
137
|
+
level,
|
|
138
|
+
text: renderedText.replace(/<[^>]+>/g, ''),
|
|
139
|
+
slug,
|
|
140
|
+
});
|
|
123
141
|
|
|
124
|
-
return `<h${String(level)} id="${slug}">${
|
|
142
|
+
return `<h${String(level)} id="${slug}">${renderedText} <a href="#${slug}" class="anchor">#</a></h${String(level)}>\n`;
|
|
125
143
|
};
|
|
126
144
|
|
|
127
145
|
// Rewrite relative image src to /path/ URLs
|