@lowdefy/server-dev 0.0.0-experimental-20260716044341 → 0.0.0-experimental-20260716082808
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/lib/docs/createDocsMcpServer.test.mjs +4 -1
- package/lib/docs/docs.test.mjs +7 -1
- package/lib/docs/findConfig.js +15 -3
- package/package.json +32 -32
- package/package.original.json +32 -32
|
@@ -104,7 +104,10 @@ test('MCP tools/call lowdefy_find_config locates a block by id', async () => {
|
|
|
104
104
|
arguments: { id: 'home' },
|
|
105
105
|
});
|
|
106
106
|
const parsed = JSON.parse(result.content[0].text);
|
|
107
|
-
expect(parsed).toEqual(
|
|
107
|
+
expect(parsed.kind).toEqual('page');
|
|
108
|
+
expect(parsed.pageId).toEqual('home');
|
|
109
|
+
expect(parsed.file).toEqual('pages/home.yaml');
|
|
110
|
+
expect(parsed.matches[0].location.source).toContain('pages/home.yaml');
|
|
108
111
|
await client.close();
|
|
109
112
|
});
|
|
110
113
|
|
package/lib/docs/docs.test.mjs
CHANGED
|
@@ -229,7 +229,13 @@ test('getPageConfig returns null for a pageId not in the page registry', async (
|
|
|
229
229
|
|
|
230
230
|
test('findConfig resolves a known pageId to its source file', async () => {
|
|
231
231
|
const result = await findConfig({ id: 'home' });
|
|
232
|
-
expect(result).toEqual(
|
|
232
|
+
expect(result.kind).toEqual('page');
|
|
233
|
+
expect(result.pageId).toEqual('home');
|
|
234
|
+
expect(result.file).toEqual('pages/home.yaml');
|
|
235
|
+
// A page's root block renders with blockId === pageId — open-in-editor and
|
|
236
|
+
// feedback enrichment read matches[0].location.source from this result.
|
|
237
|
+
expect(result.matches.length).toEqual(1);
|
|
238
|
+
expect(result.matches[0].location.source).toContain('pages/home.yaml');
|
|
233
239
|
});
|
|
234
240
|
|
|
235
241
|
test('findConfig scans keyMap for a matching id when no pageId is given', async () => {
|
package/lib/docs/findConfig.js
CHANGED
|
@@ -189,12 +189,24 @@ async function findConfig({ id, pageId }) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
const pageRegistry = readBuildArtifact({ name: 'pageRegistry.json' }) ?? {};
|
|
192
|
+
const configDirectory = process.env.LOWDEFY_DIRECTORY_CONFIG || process.cwd();
|
|
193
|
+
|
|
194
|
+
// A page's root block renders with blockId === pageId, so open-in-editor
|
|
195
|
+
// and feedback enrichment hit this branch for it — they read
|
|
196
|
+
// matches[0].location.source, so the page result must carry a match, not
|
|
197
|
+
// just the file field the docs/MCP consumers use.
|
|
192
198
|
if (pageRegistry[id]) {
|
|
193
|
-
|
|
199
|
+
const refPath = pageRegistry[id].refPath;
|
|
200
|
+
const matches = [];
|
|
201
|
+
if (type.isString(refPath)) {
|
|
202
|
+
matches.push({
|
|
203
|
+
keyPath: `pages[${id}]`,
|
|
204
|
+
location: { source: path.resolve(configDirectory, refPath) },
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return { kind: 'page', pageId: id, file: refPath, matches };
|
|
194
208
|
}
|
|
195
209
|
|
|
196
|
-
const configDirectory = process.env.LOWDEFY_DIRECTORY_CONFIG || process.cwd();
|
|
197
|
-
|
|
198
210
|
if (!type.isNone(pageId)) {
|
|
199
211
|
if (!pageRegistry[pageId]) {
|
|
200
212
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260716082808",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -45,37 +45,37 @@
|
|
|
45
45
|
"@hono/mcp": "0.3.0",
|
|
46
46
|
"@hono/node-server": "2.0.4",
|
|
47
47
|
"@hono/vite-dev-server": "0.26.0",
|
|
48
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
49
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
50
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
51
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
52
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
53
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-
|
|
54
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/blocks-tiptap": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/build": "0.0.0-experimental-
|
|
60
|
-
"@lowdefy/client": "0.0.0-experimental-
|
|
61
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-
|
|
62
|
-
"@lowdefy/docs-content": "0.0.0-experimental-
|
|
63
|
-
"@lowdefy/engine": "0.0.0-experimental-
|
|
64
|
-
"@lowdefy/errors": "0.0.0-experimental-
|
|
65
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
66
|
-
"@lowdefy/layout": "0.0.0-experimental-
|
|
67
|
-
"@lowdefy/logger": "0.0.0-experimental-
|
|
68
|
-
"@lowdefy/node-utils": "0.0.0-experimental-
|
|
69
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-
|
|
70
|
-
"@lowdefy/operators-dayjs": "0.0.0-experimental-
|
|
71
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-
|
|
72
|
-
"@lowdefy/operators-js": "0.0.0-experimental-
|
|
73
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-
|
|
74
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-
|
|
75
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-
|
|
76
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-
|
|
77
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-
|
|
78
|
-
"@lowdefy/websockets-core": "0.0.0-experimental-
|
|
48
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260716082808",
|
|
49
|
+
"@lowdefy/api": "0.0.0-experimental-20260716082808",
|
|
50
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260716082808",
|
|
51
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260716082808",
|
|
52
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260716082808",
|
|
53
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260716082808",
|
|
54
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260716082808",
|
|
55
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260716082808",
|
|
56
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260716082808",
|
|
57
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260716082808",
|
|
58
|
+
"@lowdefy/blocks-tiptap": "0.0.0-experimental-20260716082808",
|
|
59
|
+
"@lowdefy/build": "0.0.0-experimental-20260716082808",
|
|
60
|
+
"@lowdefy/client": "0.0.0-experimental-20260716082808",
|
|
61
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260716082808",
|
|
62
|
+
"@lowdefy/docs-content": "0.0.0-experimental-20260716082808",
|
|
63
|
+
"@lowdefy/engine": "0.0.0-experimental-20260716082808",
|
|
64
|
+
"@lowdefy/errors": "0.0.0-experimental-20260716082808",
|
|
65
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260716082808",
|
|
66
|
+
"@lowdefy/layout": "0.0.0-experimental-20260716082808",
|
|
67
|
+
"@lowdefy/logger": "0.0.0-experimental-20260716082808",
|
|
68
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260716082808",
|
|
69
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260716082808",
|
|
70
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260716082808",
|
|
71
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260716082808",
|
|
72
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260716082808",
|
|
73
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260716082808",
|
|
74
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260716082808",
|
|
75
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260716082808",
|
|
76
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260716082808",
|
|
77
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260716082808",
|
|
78
|
+
"@lowdefy/websockets-core": "0.0.0-experimental-20260716082808",
|
|
79
79
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
80
80
|
"@tailwindcss/postcss": "4.3.1",
|
|
81
81
|
"@vitejs/plugin-react": "6.0.2",
|
package/package.original.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260716082808",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -51,37 +51,37 @@
|
|
|
51
51
|
"@hono/mcp": "0.3.0",
|
|
52
52
|
"@hono/node-server": "2.0.4",
|
|
53
53
|
"@hono/vite-dev-server": "0.26.0",
|
|
54
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-
|
|
60
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
61
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
62
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
63
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
64
|
-
"@lowdefy/blocks-tiptap": "0.0.0-experimental-
|
|
65
|
-
"@lowdefy/build": "0.0.0-experimental-
|
|
66
|
-
"@lowdefy/client": "0.0.0-experimental-
|
|
67
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-
|
|
68
|
-
"@lowdefy/docs-content": "0.0.0-experimental-
|
|
69
|
-
"@lowdefy/engine": "0.0.0-experimental-
|
|
70
|
-
"@lowdefy/errors": "0.0.0-experimental-
|
|
71
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
72
|
-
"@lowdefy/layout": "0.0.0-experimental-
|
|
73
|
-
"@lowdefy/logger": "0.0.0-experimental-
|
|
74
|
-
"@lowdefy/node-utils": "0.0.0-experimental-
|
|
75
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-
|
|
76
|
-
"@lowdefy/operators-dayjs": "0.0.0-experimental-
|
|
77
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-
|
|
78
|
-
"@lowdefy/operators-js": "0.0.0-experimental-
|
|
79
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-
|
|
80
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-
|
|
81
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-
|
|
82
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-
|
|
83
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-
|
|
84
|
-
"@lowdefy/websockets-core": "0.0.0-experimental-
|
|
54
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260716082808",
|
|
55
|
+
"@lowdefy/api": "0.0.0-experimental-20260716082808",
|
|
56
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260716082808",
|
|
57
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260716082808",
|
|
58
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260716082808",
|
|
59
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260716082808",
|
|
60
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260716082808",
|
|
61
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260716082808",
|
|
62
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260716082808",
|
|
63
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260716082808",
|
|
64
|
+
"@lowdefy/blocks-tiptap": "0.0.0-experimental-20260716082808",
|
|
65
|
+
"@lowdefy/build": "0.0.0-experimental-20260716082808",
|
|
66
|
+
"@lowdefy/client": "0.0.0-experimental-20260716082808",
|
|
67
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260716082808",
|
|
68
|
+
"@lowdefy/docs-content": "0.0.0-experimental-20260716082808",
|
|
69
|
+
"@lowdefy/engine": "0.0.0-experimental-20260716082808",
|
|
70
|
+
"@lowdefy/errors": "0.0.0-experimental-20260716082808",
|
|
71
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260716082808",
|
|
72
|
+
"@lowdefy/layout": "0.0.0-experimental-20260716082808",
|
|
73
|
+
"@lowdefy/logger": "0.0.0-experimental-20260716082808",
|
|
74
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260716082808",
|
|
75
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260716082808",
|
|
76
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260716082808",
|
|
77
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260716082808",
|
|
78
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260716082808",
|
|
79
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260716082808",
|
|
80
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260716082808",
|
|
81
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260716082808",
|
|
82
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260716082808",
|
|
83
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260716082808",
|
|
84
|
+
"@lowdefy/websockets-core": "0.0.0-experimental-20260716082808",
|
|
85
85
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
86
86
|
"@tailwindcss/postcss": "4.3.1",
|
|
87
87
|
"@vitejs/plugin-react": "6.0.2",
|