@zeroheight/mcp-server 1.1.0 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Release notes
2
2
 
3
+ ## [1.2.0](https://www.npmjs.com/package/@zeroheight/mcp-server/v/1.2.0) - 9th September 2025
4
+
5
+ - Reduce number of tokens used by `get-styleguide-tree`
3
6
 
4
7
  ## [1.1.0](https://www.npmjs.com/package/@zeroheight/mcp-server/v/1.1.0) - 20th August 2025
5
8
 
@@ -1,24 +1,36 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b1be3ad9-91d2-5218-a0cc-b34859dd8b8c")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e119b376-ad17-5fb4-a522-859a0d32ee68")}catch(e){}}();
3
3
  export const DEFAULT_NAME = "Unnamed styleguide";
4
- export function formatTreeAsJson(tree) {
5
- return (tree?.map((node) => {
6
- if (node.type === "page" || node.type === "tab") {
7
- return {
8
- id: node.id,
9
- type: node.type,
10
- name: node.name,
11
- url: node.url,
12
- children: formatTreeAsJson(node.children),
13
- };
4
+ function getUniqueName(baseName, existingKeys) {
5
+ if (!existingKeys[baseName]) {
6
+ return baseName;
7
+ }
8
+ let counter = 1;
9
+ while (existingKeys[`${baseName} ${counter}`]) {
10
+ counter++;
11
+ }
12
+ return `${baseName} ${counter}`;
13
+ }
14
+ function processNode(node, parent) {
15
+ node.children?.forEach((child) => {
16
+ const childName = getUniqueName(child.name || child.type, parent);
17
+ if (child.type === "page") {
18
+ parent[childName] = { id: child.id, url: child.url };
19
+ }
20
+ else if (["category", "navigation"].includes(child.type)) {
21
+ parent[childName] = parent[childName] || {};
22
+ processNode(child, parent[childName]);
14
23
  }
15
- return {
16
- id: node.id,
17
- type: node.type,
18
- name: node.name,
19
- children: formatTreeAsJson(node.children),
20
- };
21
- }) ?? []);
24
+ });
25
+ }
26
+ export function formatTreeAsJson(tree) {
27
+ const result = { tree: {} };
28
+ tree.forEach((node) => {
29
+ const baseName = getUniqueName(node.name || node.type, result.tree);
30
+ result.tree[baseName] = result.tree[baseName] || {};
31
+ processNode(node, result.tree[baseName]);
32
+ });
33
+ return result.tree;
22
34
  }
23
35
  export function formatStyleguideListAsMarkdown(styleguides) {
24
36
  return styleguides
@@ -26,4 +38,4 @@ export function formatStyleguideListAsMarkdown(styleguides) {
26
38
  .join("\n");
27
39
  }
28
40
  //# sourceMappingURL=styleguide.js.map
29
- //# debugId=b1be3ad9-91d2-5218-a0cc-b34859dd8b8c
41
+ //# debugId=e119b376-ad17-5fb4-a522-859a0d32ee68
@@ -1 +1 @@
1
- {"version":3,"file":"styleguide.js","sources":["common/formatters/styleguide.ts"],"sourceRoot":"/","sourcesContent":["import { NodeType, Styleguide } from \"../../api/types/styleguide.js\";\n\nexport const DEFAULT_NAME = \"Unnamed styleguide\";\n\nexport function formatTreeAsJson(tree: NodeType[]): Record<string, any> {\n return (\n tree?.map((node) => {\n if (node.type === \"page\" || node.type === \"tab\") {\n return {\n id: node.id,\n type: node.type,\n name: node.name,\n url: node.url,\n children: formatTreeAsJson(node.children),\n };\n }\n\n return {\n id: node.id,\n type: node.type,\n name: node.name,\n children: formatTreeAsJson(node.children),\n };\n }) ?? []\n );\n}\n\nexport function formatStyleguideListAsMarkdown(\n styleguides: Styleguide[],\n): string {\n return styleguides\n .map(\n (styleguide) =>\n `- ${styleguide.name ?? DEFAULT_NAME} (ID: ${styleguide.id})`,\n )\n .join(\"\\n\");\n}\n"],"names":[],"mappings":";;AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEjD,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,CACL,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAChD,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;aAC1C,CAAC;QACJ,CAAC;QAED,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC1C,CAAC;IACJ,CAAC,CAAC,IAAI,EAAE,CACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,WAAyB;IAEzB,OAAO,WAAW;SACf,GAAG,CACF,CAAC,UAAU,EAAE,EAAE,CACb,KAAK,UAAU,CAAC,IAAI,IAAI,YAAY,SAAS,UAAU,CAAC,EAAE,GAAG,CAChE;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC","debug_id":"b1be3ad9-91d2-5218-a0cc-b34859dd8b8c"}
1
+ {"version":3,"file":"styleguide.js","sources":["common/formatters/styleguide.ts"],"sourceRoot":"/","sourcesContent":["import { NodeType, Styleguide } from \"../../api/types/styleguide.js\";\n\nexport const DEFAULT_NAME = \"Unnamed styleguide\";\n\ninterface PageNode {\n id: number;\n url: string;\n}\n\ntype HierarchicalNode = {\n [key: string]: PageNode | HierarchicalNode;\n};\n\ninterface ConvertedTree {\n tree: HierarchicalNode;\n}\n\nfunction getUniqueName(\n baseName: string,\n existingKeys: Record<string, any>,\n): string {\n if (!existingKeys[baseName]) {\n return baseName;\n }\n\n let counter = 1;\n while (existingKeys[`${baseName} ${counter}`]) {\n counter++;\n }\n return `${baseName} ${counter}`;\n}\n\nfunction processNode(node: NodeType, parent: HierarchicalNode) {\n node.children?.forEach((child) => {\n const childName = getUniqueName(child.name || child.type, parent);\n\n if (child.type === \"page\") {\n parent[childName] = { id: child.id, url: child.url };\n } else if ([\"category\", \"navigation\"].includes(child.type)) {\n parent[childName] = parent[childName] || {};\n processNode(child, parent[childName] as HierarchicalNode);\n }\n });\n}\n\nexport function formatTreeAsJson(tree: NodeType[]): Record<string, any> {\n const result: ConvertedTree = { tree: {} };\n\n tree.forEach((node) => {\n const baseName = getUniqueName(node.name || node.type, result.tree);\n\n result.tree[baseName] = result.tree[baseName] || {};\n processNode(node, result.tree[baseName] as HierarchicalNode);\n });\n\n return result.tree;\n}\n\nexport function formatStyleguideListAsMarkdown(\n styleguides: Styleguide[],\n): string {\n return styleguides\n .map(\n (styleguide) =>\n `- ${styleguide.name ?? DEFAULT_NAME} (ID: ${styleguide.id})`,\n )\n .join(\"\\n\");\n}\n"],"names":[],"mappings":";;AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAejD,SAAS,aAAa,CACpB,QAAgB,EAChB,YAAiC;IAEjC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO,YAAY,CAAC,GAAG,QAAQ,IAAI,OAAO,EAAE,CAAC,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,GAAG,QAAQ,IAAI,OAAO,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,WAAW,CAAC,IAAc,EAAE,MAAwB;IAC3D,I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W;SACf,GAAG,CACF,CAAC,UAAU,EAAE,EAAE,CACb,KAAK,UAAU,CAAC,IAAI,IAAI,YAAY,SAAS,UAAU,CAAC,EAAE,GAAG,CAChE;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC","debug_id":"e119b376-ad17-5fb4-a522-859a0d32ee68"}
@@ -1,7 +1,7 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6237a41b-e6e2-5647-b86e-9f4737194ade")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a1566a24-9938-599b-a8a8-1237e4dbc1d7")}catch(e){}}();
3
3
  import { expect, describe, it } from "@rstest/core";
4
- import { formatStyleguideListAsMarkdown } from "./styleguide.js";
4
+ import { formatStyleguideListAsMarkdown, formatTreeAsJson, } from "./styleguide.js";
5
5
  describe("formatStyleguideListAsMarkdown", () => {
6
6
  describe("when list is empty", () => {
7
7
  it("returns an empty string", () => {
@@ -24,5 +24,430 @@ describe("formatStyleguideListAsMarkdown", () => {
24
24
  });
25
25
  });
26
26
  });
27
+ describe("formatTreeAsJson", () => {
28
+ describe("when tree is empty", () => {
29
+ it("returns an empty object", () => {
30
+ expect(formatTreeAsJson([])).toEqual({});
31
+ });
32
+ });
33
+ describe("when tree has a single page node", () => {
34
+ it("creates nested structure with page info", () => {
35
+ const tree = [
36
+ {
37
+ id: 1,
38
+ type: "category",
39
+ name: "Documentation",
40
+ hidden: false,
41
+ children: [
42
+ {
43
+ id: 2,
44
+ type: "page",
45
+ name: "Getting Started",
46
+ url: "/docs/getting-started",
47
+ hidden: false,
48
+ children: [],
49
+ category_overview_page: false,
50
+ },
51
+ ],
52
+ },
53
+ ];
54
+ const result = formatTreeAsJson(tree);
55
+ expect(result).toEqual({
56
+ Documentation: {
57
+ "Getting Started": {
58
+ id: 2,
59
+ url: "/docs/getting-started",
60
+ },
61
+ },
62
+ });
63
+ });
64
+ });
65
+ describe("when tree has multiple categories", () => {
66
+ it("creates nested structure for each category", () => {
67
+ const tree = [
68
+ {
69
+ id: 1,
70
+ type: "category",
71
+ name: "API",
72
+ hidden: false,
73
+ children: [
74
+ {
75
+ id: 2,
76
+ type: "page",
77
+ name: "REST API",
78
+ url: "/api/rest",
79
+ hidden: false,
80
+ children: [],
81
+ category_overview_page: false,
82
+ },
83
+ ],
84
+ },
85
+ {
86
+ id: 3,
87
+ type: "category",
88
+ name: "Guides",
89
+ hidden: false,
90
+ children: [
91
+ {
92
+ id: 4,
93
+ type: "page",
94
+ name: "Tutorial",
95
+ url: "/guides/tutorial",
96
+ hidden: false,
97
+ children: [],
98
+ category_overview_page: false,
99
+ },
100
+ ],
101
+ },
102
+ ];
103
+ const result = formatTreeAsJson(tree);
104
+ expect(result).toEqual({
105
+ API: {
106
+ "REST API": {
107
+ id: 2,
108
+ url: "/api/rest",
109
+ },
110
+ },
111
+ Guides: {
112
+ Tutorial: {
113
+ id: 4,
114
+ url: "/guides/tutorial",
115
+ },
116
+ },
117
+ });
118
+ });
119
+ });
120
+ describe("when tree has nested categories", () => {
121
+ it("creates deeply nested structure", () => {
122
+ const tree = [
123
+ {
124
+ id: 1,
125
+ type: "category",
126
+ name: "Documentation",
127
+ hidden: false,
128
+ children: [
129
+ {
130
+ id: 2,
131
+ type: "category",
132
+ name: "API",
133
+ hidden: false,
134
+ children: [
135
+ {
136
+ id: 3,
137
+ type: "page",
138
+ name: "Reference",
139
+ url: "/docs/api/reference",
140
+ hidden: false,
141
+ children: [],
142
+ category_overview_page: false,
143
+ },
144
+ ],
145
+ },
146
+ ],
147
+ },
148
+ ];
149
+ const result = formatTreeAsJson(tree);
150
+ expect(result).toEqual({
151
+ Documentation: {
152
+ API: {
153
+ Reference: {
154
+ id: 3,
155
+ url: "/docs/api/reference",
156
+ },
157
+ },
158
+ },
159
+ });
160
+ });
161
+ });
162
+ describe("when tree has navigation nodes", () => {
163
+ it("processes navigation nodes and their children", () => {
164
+ const tree = [
165
+ {
166
+ id: 1,
167
+ type: "navigation",
168
+ name: "Main Nav",
169
+ hidden: false,
170
+ children: [
171
+ {
172
+ id: 2,
173
+ type: "page",
174
+ name: "Home",
175
+ url: "/home",
176
+ hidden: false,
177
+ children: [],
178
+ category_overview_page: false,
179
+ },
180
+ {
181
+ id: 3,
182
+ type: "category",
183
+ name: "Products",
184
+ hidden: false,
185
+ children: [
186
+ {
187
+ id: 4,
188
+ type: "page",
189
+ name: "Product A",
190
+ url: "/products/a",
191
+ hidden: false,
192
+ children: [],
193
+ category_overview_page: false,
194
+ },
195
+ ],
196
+ },
197
+ ],
198
+ },
199
+ ];
200
+ const result = formatTreeAsJson(tree);
201
+ expect(result).toEqual({
202
+ "Main Nav": {
203
+ Home: {
204
+ id: 2,
205
+ url: "/home",
206
+ },
207
+ Products: {
208
+ "Product A": {
209
+ id: 4,
210
+ url: "/products/a",
211
+ },
212
+ },
213
+ },
214
+ });
215
+ });
216
+ });
217
+ describe("when nodes have duplicate names", () => {
218
+ it("appends numbers to make names unique", () => {
219
+ const tree = [
220
+ {
221
+ id: 1,
222
+ type: "category",
223
+ name: "Docs",
224
+ hidden: false,
225
+ children: [
226
+ {
227
+ id: 2,
228
+ type: "page",
229
+ name: "Overview",
230
+ url: "/docs/overview1",
231
+ hidden: false,
232
+ children: [],
233
+ category_overview_page: false,
234
+ },
235
+ {
236
+ id: 3,
237
+ type: "page",
238
+ name: "Overview",
239
+ url: "/docs/overview2",
240
+ hidden: false,
241
+ children: [],
242
+ category_overview_page: false,
243
+ },
244
+ {
245
+ id: 4,
246
+ type: "page",
247
+ name: "Overview",
248
+ url: "/docs/overview3",
249
+ hidden: false,
250
+ children: [],
251
+ category_overview_page: false,
252
+ },
253
+ ],
254
+ },
255
+ ];
256
+ const result = formatTreeAsJson(tree);
257
+ expect(result).toEqual({
258
+ Docs: {
259
+ Overview: {
260
+ id: 2,
261
+ url: "/docs/overview1",
262
+ },
263
+ "Overview 1": {
264
+ id: 3,
265
+ url: "/docs/overview2",
266
+ },
267
+ "Overview 2": {
268
+ id: 4,
269
+ url: "/docs/overview3",
270
+ },
271
+ },
272
+ });
273
+ });
274
+ });
275
+ describe("when nodes have no name", () => {
276
+ it("uses node type as fallback name", () => {
277
+ const tree = [
278
+ {
279
+ id: 1,
280
+ type: "category",
281
+ name: "",
282
+ hidden: false,
283
+ children: [
284
+ {
285
+ id: 2,
286
+ type: "page",
287
+ name: "",
288
+ url: "/page1",
289
+ hidden: false,
290
+ children: [],
291
+ category_overview_page: false,
292
+ },
293
+ ],
294
+ },
295
+ ];
296
+ const result = formatTreeAsJson(tree);
297
+ expect(result).toEqual({
298
+ category: {
299
+ page: {
300
+ id: 2,
301
+ url: "/page1",
302
+ },
303
+ },
304
+ });
305
+ });
306
+ });
307
+ describe("when tree has tab nodes", () => {
308
+ it("ignores tab nodes", () => {
309
+ const tree = [
310
+ {
311
+ id: 1,
312
+ type: "category",
313
+ name: "Main",
314
+ hidden: false,
315
+ children: [
316
+ {
317
+ id: 3,
318
+ type: "page",
319
+ name: "Page1",
320
+ url: "/page1",
321
+ hidden: false,
322
+ children: [
323
+ {
324
+ id: 2,
325
+ type: "tab",
326
+ name: "Tab1",
327
+ url: "/tab1",
328
+ hidden: false,
329
+ children: [],
330
+ },
331
+ ],
332
+ category_overview_page: false,
333
+ },
334
+ ],
335
+ },
336
+ ];
337
+ const result = formatTreeAsJson(tree);
338
+ expect(result).toEqual({
339
+ Main: {
340
+ Page1: {
341
+ id: 3,
342
+ url: "/page1",
343
+ },
344
+ },
345
+ });
346
+ });
347
+ });
348
+ describe("when tree has complex nested structure", () => {
349
+ it("handles multiple levels of nesting correctly", () => {
350
+ const tree = [
351
+ {
352
+ id: 1,
353
+ type: "navigation",
354
+ name: "Root",
355
+ hidden: false,
356
+ children: [
357
+ {
358
+ id: 2,
359
+ type: "category",
360
+ name: "Section A",
361
+ hidden: false,
362
+ children: [
363
+ {
364
+ id: 3,
365
+ type: "category",
366
+ name: "Subsection 1",
367
+ hidden: false,
368
+ children: [
369
+ {
370
+ id: 4,
371
+ type: "page",
372
+ name: "Page A",
373
+ url: "/a/1/a",
374
+ hidden: false,
375
+ children: [],
376
+ category_overview_page: false,
377
+ },
378
+ {
379
+ id: 5,
380
+ type: "page",
381
+ name: "Page B",
382
+ url: "/a/1/b",
383
+ hidden: false,
384
+ children: [],
385
+ category_overview_page: false,
386
+ },
387
+ ],
388
+ },
389
+ {
390
+ id: 6,
391
+ type: "page",
392
+ name: "Direct Page",
393
+ url: "/a/direct",
394
+ hidden: false,
395
+ children: [],
396
+ category_overview_page: false,
397
+ },
398
+ ],
399
+ },
400
+ ],
401
+ },
402
+ ];
403
+ const result = formatTreeAsJson(tree);
404
+ expect(result).toEqual({
405
+ Root: {
406
+ "Section A": {
407
+ "Subsection 1": {
408
+ "Page A": {
409
+ id: 4,
410
+ url: "/a/1/a",
411
+ },
412
+ "Page B": {
413
+ id: 5,
414
+ url: "/a/1/b",
415
+ },
416
+ },
417
+ "Direct Page": {
418
+ id: 6,
419
+ url: "/a/direct",
420
+ },
421
+ },
422
+ },
423
+ });
424
+ });
425
+ });
426
+ describe("when multiple root nodes have duplicate names", () => {
427
+ it("handles duplicate names at root level", () => {
428
+ const tree = [
429
+ {
430
+ id: 1,
431
+ type: "category",
432
+ name: "Section",
433
+ hidden: false,
434
+ children: [],
435
+ },
436
+ {
437
+ id: 2,
438
+ type: "category",
439
+ name: "Section",
440
+ hidden: false,
441
+ children: [],
442
+ },
443
+ ];
444
+ const result = formatTreeAsJson(tree);
445
+ expect(result).toEqual({
446
+ Section: {},
447
+ "Section 1": {},
448
+ });
449
+ });
450
+ });
451
+ });
27
452
  //# sourceMappingURL=styleguide.test.js.map
28
- //# debugId=6237a41b-e6e2-5647-b86e-9f4737194ade
453
+ //# debugId=a1566a24-9938-599b-a8a8-1237e4dbc1d7
@@ -1 +1 @@
1
- {"version":3,"file":"styleguide.test.js","sources":["common/formatters/styleguide.test.ts"],"sourceRoot":"/","sourcesContent":["import { expect, describe, it } from \"@rstest/core\";\n\nimport { formatStyleguideListAsMarkdown } from \"./styleguide.js\";\n\ndescribe(\"formatStyleguideListAsMarkdown\", () => {\n describe(\"when list is empty\", () => {\n it(\"returns an empty string\", () => {\n expect(formatStyleguideListAsMarkdown([])).toBe(\"\");\n });\n });\n\n describe(\"when there's one styleguide\", () => {\n it(\"formats styleguide list as markdown list on one line\", () => {\n expect(\n formatStyleguideListAsMarkdown([\n { id: 1, name: \"Styleguide 1\", team_id: 1, share_id: \"abc123\" },\n ]),\n ).toBe(\"- Styleguide 1 (ID: 1)\");\n });\n });\n\n describe(\"when there's multiple styleguides\", () => {\n it(\"formats styleguide list as markdown list\", () => {\n expect(\n formatStyleguideListAsMarkdown([\n { id: 1, name: \"Styleguide 1\", team_id: 1, share_id: \"abc123\" },\n { id: 2, name: \"Styleguide 2\", team_id: 1, share_id: \"xyz987\" },\n ]),\n ).toBe(\"- Styleguide 1 (ID: 1)\\n- Styleguide 2 (ID: 2)\");\n });\n });\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,MAAM,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;QAC3C,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;YAC9D,MAAM,CACJ,8BAA8B,CAAC;gBAC7B,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;aAChE,CAAC,CACH,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACjD,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YAClD,MAAM,CACJ,8BAA8B,CAAC;gBAC7B,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;gBAC/D,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;aAChE,CAAC,CACH,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debug_id":"6237a41b-e6e2-5647-b86e-9f4737194ade"}
1
+ {"version":3,"file":"styleguide.test.js","sources":["common/formatters/styleguide.test.ts"],"sourceRoot":"/","sourcesContent":["import { expect, describe, it } from \"@rstest/core\";\n\nimport {\n formatStyleguideListAsMarkdown,\n formatTreeAsJson,\n} from \"./styleguide.js\";\nimport { NodeType } from \"../../api/types/styleguide.js\";\n\ndescribe(\"formatStyleguideListAsMarkdown\", () => {\n describe(\"when list is empty\", () => {\n it(\"returns an empty string\", () => {\n expect(formatStyleguideListAsMarkdown([])).toBe(\"\");\n });\n });\n\n describe(\"when there's one styleguide\", () => {\n it(\"formats styleguide list as markdown list on one line\", () => {\n expect(\n formatStyleguideListAsMarkdown([\n { id: 1, name: \"Styleguide 1\", team_id: 1, share_id: \"abc123\" },\n ]),\n ).toBe(\"- Styleguide 1 (ID: 1)\");\n });\n });\n\n describe(\"when there's multiple styleguides\", () => {\n it(\"formats styleguide list as markdown list\", () => {\n expect(\n formatStyleguideListAsMarkdown([\n { id: 1, name: \"Styleguide 1\", team_id: 1, share_id: \"abc123\" },\n { id: 2, name: \"Styleguide 2\", team_id: 1, share_id: \"xyz987\" },\n ]),\n ).toBe(\"- Styleguide 1 (ID: 1)\\n- Styleguide 2 (ID: 2)\");\n });\n });\n});\n\ndescribe(\"formatTreeAsJson\", () => {\n describe(\"when tree is empty\", () => {\n it(\"returns an empty object\", () => {\n expect(formatTreeAsJson([])).toEqual({});\n });\n });\n\n describe(\"when tree has a single page node\", () => {\n it(\"creates nested structure with page info\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"Documentation\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"page\",\n name: \"Getting Started\",\n url: \"/docs/getting-started\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Documentation: {\n \"Getting Started\": {\n id: 2,\n url: \"/docs/getting-started\",\n },\n },\n });\n });\n });\n\n describe(\"when tree has multiple categories\", () => {\n it(\"creates nested structure for each category\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"API\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"page\",\n name: \"REST API\",\n url: \"/api/rest\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n {\n id: 3,\n type: \"category\",\n name: \"Guides\",\n hidden: false,\n children: [\n {\n id: 4,\n type: \"page\",\n name: \"Tutorial\",\n url: \"/guides/tutorial\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n API: {\n \"REST API\": {\n id: 2,\n url: \"/api/rest\",\n },\n },\n Guides: {\n Tutorial: {\n id: 4,\n url: \"/guides/tutorial\",\n },\n },\n });\n });\n });\n\n describe(\"when tree has nested categories\", () => {\n it(\"creates deeply nested structure\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"Documentation\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"category\",\n name: \"API\",\n hidden: false,\n children: [\n {\n id: 3,\n type: \"page\",\n name: \"Reference\",\n url: \"/docs/api/reference\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Documentation: {\n API: {\n Reference: {\n id: 3,\n url: \"/docs/api/reference\",\n },\n },\n },\n });\n });\n });\n\n describe(\"when tree has navigation nodes\", () => {\n it(\"processes navigation nodes and their children\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"navigation\",\n name: \"Main Nav\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"page\",\n name: \"Home\",\n url: \"/home\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n {\n id: 3,\n type: \"category\",\n name: \"Products\",\n hidden: false,\n children: [\n {\n id: 4,\n type: \"page\",\n name: \"Product A\",\n url: \"/products/a\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n \"Main Nav\": {\n Home: {\n id: 2,\n url: \"/home\",\n },\n Products: {\n \"Product A\": {\n id: 4,\n url: \"/products/a\",\n },\n },\n },\n });\n });\n });\n\n describe(\"when nodes have duplicate names\", () => {\n it(\"appends numbers to make names unique\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"Docs\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"page\",\n name: \"Overview\",\n url: \"/docs/overview1\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n {\n id: 3,\n type: \"page\",\n name: \"Overview\",\n url: \"/docs/overview2\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n {\n id: 4,\n type: \"page\",\n name: \"Overview\",\n url: \"/docs/overview3\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Docs: {\n Overview: {\n id: 2,\n url: \"/docs/overview1\",\n },\n \"Overview 1\": {\n id: 3,\n url: \"/docs/overview2\",\n },\n \"Overview 2\": {\n id: 4,\n url: \"/docs/overview3\",\n },\n },\n });\n });\n });\n\n describe(\"when nodes have no name\", () => {\n it(\"uses node type as fallback name\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"page\",\n name: \"\",\n url: \"/page1\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n category: {\n page: {\n id: 2,\n url: \"/page1\",\n },\n },\n });\n });\n });\n\n describe(\"when tree has tab nodes\", () => {\n it(\"ignores tab nodes\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"Main\",\n hidden: false,\n children: [\n {\n id: 3,\n type: \"page\",\n name: \"Page1\",\n url: \"/page1\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"tab\",\n name: \"Tab1\",\n url: \"/tab1\",\n hidden: false,\n children: [],\n },\n ],\n category_overview_page: false,\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Main: {\n Page1: {\n id: 3,\n url: \"/page1\",\n },\n },\n });\n });\n });\n\n describe(\"when tree has complex nested structure\", () => {\n it(\"handles multiple levels of nesting correctly\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"navigation\",\n name: \"Root\",\n hidden: false,\n children: [\n {\n id: 2,\n type: \"category\",\n name: \"Section A\",\n hidden: false,\n children: [\n {\n id: 3,\n type: \"category\",\n name: \"Subsection 1\",\n hidden: false,\n children: [\n {\n id: 4,\n type: \"page\",\n name: \"Page A\",\n url: \"/a/1/a\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n {\n id: 5,\n type: \"page\",\n name: \"Page B\",\n url: \"/a/1/b\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n {\n id: 6,\n type: \"page\",\n name: \"Direct Page\",\n url: \"/a/direct\",\n hidden: false,\n children: [],\n category_overview_page: false,\n },\n ],\n },\n ],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Root: {\n \"Section A\": {\n \"Subsection 1\": {\n \"Page A\": {\n id: 4,\n url: \"/a/1/a\",\n },\n \"Page B\": {\n id: 5,\n url: \"/a/1/b\",\n },\n },\n \"Direct Page\": {\n id: 6,\n url: \"/a/direct\",\n },\n },\n },\n });\n });\n });\n\n describe(\"when multiple root nodes have duplicate names\", () => {\n it(\"handles duplicate names at root level\", () => {\n const tree: NodeType[] = [\n {\n id: 1,\n type: \"category\",\n name: \"Section\",\n hidden: false,\n children: [],\n },\n {\n id: 2,\n type: \"category\",\n name: \"Section\",\n hidden: false,\n children: [],\n },\n ];\n\n const result = formatTreeAsJson(tree);\n expect(result).toEqual({\n Section: {},\n \"Section 1\": {},\n });\n });\n });\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACL,8BAA8B,EAC9B,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,MAAM,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACt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EAAE,EAAE;iBACb;aACF,CAAC;YAEF,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;gBACrB,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE;aAChB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debug_id":"a1566a24-9938-599b-a8a8-1237e4dbc1d7"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroheight/mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for zeroheight",
5
5
  "type": "module",
6
6
  "bin": {