@eventcatalog/core 3.41.4 → 3.43.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/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/count-resources.cjs +1 -0
- package/dist/analytics/count-resources.js +1 -1
- package/dist/analytics/log-build.cjs +3 -1
- package/dist/analytics/log-build.js +4 -4
- package/dist/{chunk-VQLDZRHC.js → chunk-2EI3M7OO.js} +1 -1
- package/dist/{chunk-COPXPOV2.js → chunk-7M5IQL3J.js} +1 -1
- package/dist/{chunk-3DVHEVHQ.js → chunk-DAOXTQVS.js} +1 -0
- package/dist/{chunk-OH2U6UEJ.js → chunk-KY74BE42.js} +1 -1
- package/dist/{chunk-LYRAK5LI.js → chunk-QV2PKXZM.js} +3 -2
- package/dist/{chunk-QMORF42U.js → chunk-ZONBICNH.js} +8 -0
- package/dist/{chunk-YWG7CCN7.js → chunk-ZQHBDPIY.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/development/developer-tools/api-catalog.md +114 -0
- package/dist/eventcatalog.cjs +11 -1
- package/dist/eventcatalog.js +7 -7
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/search-indexer.cjs +8 -0
- package/dist/search-indexer.js +1 -1
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/MDX/Attachments.astro +3 -3
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +11 -2
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +100 -2
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +53 -1
- package/eventcatalog/src/content.config.ts +61 -0
- package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +19 -0
- package/eventcatalog/src/layouts/DiscoverLayout.astro +12 -1
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +98 -46
- package/eventcatalog/src/pages/.well-known/api-catalog.ts +191 -0
- package/eventcatalog/src/pages/api-catalog/specifications/[collection]/[id]/[version]/[specification].ts +109 -0
- package/eventcatalog/src/pages/discover/[type]/_index.data.ts +5 -0
- package/eventcatalog/src/pages/discover/[type]/index.astro +17 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/_index.data.ts +1 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +68 -2
- package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +1 -0
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +26 -1
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +26 -1
- package/eventcatalog/src/stores/sidebar-store/builders/adr.ts +150 -0
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +2 -0
- package/eventcatalog/src/stores/sidebar-store/builders/shared.ts +50 -0
- package/eventcatalog/src/stores/sidebar-store/state.ts +209 -68
- package/eventcatalog/src/types/index.ts +2 -0
- package/eventcatalog/src/utils/collection-colors.ts +2 -0
- package/eventcatalog/src/utils/collections/adr-constants.ts +53 -0
- package/eventcatalog/src/utils/collections/adrs.ts +146 -0
- package/eventcatalog/src/utils/collections/icons.ts +2 -0
- package/eventcatalog/src/utils/collections/teams.ts +6 -1
- package/eventcatalog/src/utils/collections/users.ts +17 -10
- package/eventcatalog/src/utils/collections/util.ts +2 -0
- package/eventcatalog/src/utils/page-loaders/page-data-loader.ts +2 -0
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ __export(count_resources_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(count_resources_exports);
|
|
27
27
|
var import_glob = require("glob");
|
|
28
28
|
var RESOURCE_PATTERNS = {
|
|
29
|
+
adrs: ["**/adrs/*/index.@(md|mdx)"],
|
|
29
30
|
agents: ["**/agents/*/index.@(md|mdx)"],
|
|
30
31
|
events: ["**/events/*/index.@(md|mdx)"],
|
|
31
32
|
commands: ["**/commands/*/index.@(md|mdx)"],
|
|
@@ -110,7 +110,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
110
110
|
var import_os = __toESM(require("os"), 1);
|
|
111
111
|
|
|
112
112
|
// package.json
|
|
113
|
-
var version = "3.
|
|
113
|
+
var version = "3.43.0";
|
|
114
114
|
|
|
115
115
|
// src/constants.ts
|
|
116
116
|
var VERSION = version;
|
|
@@ -149,6 +149,7 @@ async function raiseEvent(eventData) {
|
|
|
149
149
|
// src/analytics/count-resources.js
|
|
150
150
|
var import_glob = require("glob");
|
|
151
151
|
var RESOURCE_PATTERNS = {
|
|
152
|
+
adrs: ["**/adrs/*/index.@(md|mdx)"],
|
|
152
153
|
agents: ["**/agents/*/index.@(md|mdx)"],
|
|
153
154
|
events: ["**/events/*/index.@(md|mdx)"],
|
|
154
155
|
commands: ["**/commands/*/index.@(md|mdx)"],
|
|
@@ -196,6 +197,7 @@ var getFeatures = async (configFile) => {
|
|
|
196
197
|
};
|
|
197
198
|
var CLOUD_ANALYTICS_ENDPOINT = "https://api.ecingest.dev/v1/analytics/ingest";
|
|
198
199
|
var toCloudResourceCounts = (counts) => ({
|
|
200
|
+
adrs: counts.adrs || 0,
|
|
199
201
|
agents: counts.agents || 0,
|
|
200
202
|
domains: counts.domains || 0,
|
|
201
203
|
services: counts.services || 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QV2PKXZM.js";
|
|
4
|
+
import "../chunk-2EI3M7OO.js";
|
|
5
|
+
import "../chunk-DAOXTQVS.js";
|
|
6
|
+
import "../chunk-KY74BE42.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
raiseEvent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2EI3M7OO.js";
|
|
4
4
|
import {
|
|
5
5
|
countResources,
|
|
6
6
|
serializeCounts
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DAOXTQVS.js";
|
|
8
8
|
import {
|
|
9
9
|
getEventCatalogConfigFile,
|
|
10
10
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -21,6 +21,7 @@ var getFeatures = async (configFile) => {
|
|
|
21
21
|
};
|
|
22
22
|
var CLOUD_ANALYTICS_ENDPOINT = "https://api.ecingest.dev/v1/analytics/ingest";
|
|
23
23
|
var toCloudResourceCounts = (counts) => ({
|
|
24
|
+
adrs: counts.adrs || 0,
|
|
24
25
|
agents: counts.agents || 0,
|
|
25
26
|
domains: counts.domains || 0,
|
|
26
27
|
services: counts.services || 0,
|
|
@@ -4,6 +4,7 @@ import path from "path";
|
|
|
4
4
|
import { glob } from "glob";
|
|
5
5
|
import matter from "gray-matter";
|
|
6
6
|
var RESOURCE_COLLECTIONS = {
|
|
7
|
+
adrs: { docsPath: "adrs", type: "Architecture Decision" },
|
|
7
8
|
agents: { docsPath: "agents", type: "Agent" },
|
|
8
9
|
channels: { docsPath: "channels", type: "Channel" },
|
|
9
10
|
commands: { docsPath: "commands", type: "Command" },
|
|
@@ -68,6 +69,9 @@ var findResourceSegment = (segments) => {
|
|
|
68
69
|
let match = null;
|
|
69
70
|
for (let index = 0; index < segments.length - 1; index++) {
|
|
70
71
|
const segment = segments[index];
|
|
72
|
+
if (segments[index - 1] === "docs") {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
71
75
|
if (RESOURCE_COLLECTIONS[segment] && segments[index + 1]) {
|
|
72
76
|
match = { index, segment };
|
|
73
77
|
}
|
|
@@ -234,6 +238,10 @@ var collectSearchRecords = async ({
|
|
|
234
238
|
summary: baseRecord.summary,
|
|
235
239
|
version: baseRecord.version,
|
|
236
240
|
owners: parsed.data.owners,
|
|
241
|
+
status: parsed.data.status,
|
|
242
|
+
date: parsed.data.date,
|
|
243
|
+
decisionMakers: parsed.data.decisionMakers,
|
|
244
|
+
appliesTo: parsed.data.appliesTo,
|
|
237
245
|
badges: parsed.data.badges
|
|
238
246
|
});
|
|
239
247
|
const content = [frontmatterText, markdownToSearchText(parsed.content)].filter(Boolean).join("\n\n");
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 5
|
|
3
|
+
keywords:
|
|
4
|
+
- api-catalog
|
|
5
|
+
- RFC 9727
|
|
6
|
+
- well-known
|
|
7
|
+
- API discovery
|
|
8
|
+
- OpenAPI
|
|
9
|
+
- AsyncAPI
|
|
10
|
+
- GraphQL
|
|
11
|
+
sidebar_label: api-catalog (RFC 9727)
|
|
12
|
+
title: api-catalog
|
|
13
|
+
description: Machine-readable catalog discovery endpoint for tools and agents
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
17
|
+
|
|
18
|
+
<AddedIn version="3.42.0" />
|
|
19
|
+
|
|
20
|
+
Let API tools, agents, and crawlers discover every service and domain specification in your catalog from a single endpoint, without parsing HTML.
|
|
21
|
+
|
|
22
|
+
### What is RFC 9727?
|
|
23
|
+
|
|
24
|
+
[RFC 9727](https://datatracker.ietf.org/doc/rfc9727/) defines the `/.well-known/api-catalog` well-known URI. It returns a [Linkset](https://www.rfc-editor.org/rfc/rfc9264) document that lists every API an organization publishes along with links to their specifications and documentation.
|
|
25
|
+
|
|
26
|
+
Tools that understand RFC 9727 can point at your catalog URL and immediately enumerate all services and domains, their OpenAPI, AsyncAPI, and GraphQL specs, and their documentation pages. No scraping required.
|
|
27
|
+
|
|
28
|
+
### How it works
|
|
29
|
+
|
|
30
|
+
EventCatalog automatically publishes a Linkset at `/.well-known/api-catalog`. Every service and domain that has `specifications` defined in its frontmatter appears as an entry.
|
|
31
|
+
|
|
32
|
+
Each entry contains:
|
|
33
|
+
|
|
34
|
+
- **`anchor`** - the canonical URL of the service. EventCatalog reads the `servers[].url` field from OpenAPI or AsyncAPI specs and uses that. When no server URL is found it falls back to the EventCatalog documentation page.
|
|
35
|
+
- **`service-desc`** - one link per specification file, pointing at `/api-catalog/specifications/{collection}/{id}/{version}/{specification}` with the correct media type (`application/yaml`, `application/json`, or `application/graphql`).
|
|
36
|
+
- **`service-doc`** - two links per resource: the markdown source and the rendered HTML page.
|
|
37
|
+
|
|
38
|
+
Resources marked `hidden: true` are excluded from the linkset.
|
|
39
|
+
|
|
40
|
+
### Access the endpoint
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
GET /.well-known/api-catalog
|
|
44
|
+
HEAD /.well-known/api-catalog
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The `GET` response body is `application/linkset+json` profiled against RFC 9727:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"linkset": [
|
|
52
|
+
{
|
|
53
|
+
"anchor": "https://api.example.com/orders",
|
|
54
|
+
"service-desc": [
|
|
55
|
+
{
|
|
56
|
+
"href": "https://catalog.example.com/api-catalog/specifications/services/OrderService/1.0.0/openapi-b3BlbmFwaS55bWw",
|
|
57
|
+
"type": "application/yaml",
|
|
58
|
+
"title": "Order Service OpenAPI"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"service-doc": [
|
|
62
|
+
{
|
|
63
|
+
"href": "https://catalog.example.com/docs/services/OrderService/1.0.0.md",
|
|
64
|
+
"type": "text/markdown",
|
|
65
|
+
"title": "Order Service documentation"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"href": "https://catalog.example.com/docs/services/OrderService/1.0.0",
|
|
69
|
+
"type": "text/html",
|
|
70
|
+
"title": "Order Service documentation"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The `HEAD` response includes a `Link` header so clients can confirm the endpoint exists before fetching the full body:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Link: <https://catalog.example.com/.well-known/api-catalog>; rel="api-catalog"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Fetch a specification file
|
|
85
|
+
|
|
86
|
+
The raw specification files referenced in `service-desc` are served from:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
GET /api-catalog/specifications/{collection}/{id}/{version}/{specification}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Segment | Values |
|
|
93
|
+
|---------|--------|
|
|
94
|
+
| `collection` | `services`, `domains` |
|
|
95
|
+
| `id` | The resource `id` field |
|
|
96
|
+
| `version` | The resource `version` field |
|
|
97
|
+
| `specification` | Stable specification identifier, formatted as `{type}-{base64url(path)}` |
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
GET /api-catalog/specifications/services/OrderService/1.0.0/openapi-b3BlbmFwaS55bWw
|
|
103
|
+
Content-Type: application/yaml
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### MCP server entry
|
|
107
|
+
|
|
108
|
+
When the EventCatalog MCP server is enabled, an additional entry pointing at `/docs/mcp` is appended to the linkset. This lets MCP-aware agents discover the catalog's machine interface alongside its API specifications.
|
|
109
|
+
|
|
110
|
+
### What is included
|
|
111
|
+
|
|
112
|
+
Only services and domains are included in v1 of this endpoint. Events, commands, queries, data products, schemas, diagrams, teams, and users are out of scope for this release.
|
|
113
|
+
|
|
114
|
+
For a broader machine-readable index of your catalog content, see [llms.txt](/docs/development/developer-tools/llms.txt) and [schemas.txt](/docs/development/developer-tools/schemas.txt).
|
package/dist/eventcatalog.cjs
CHANGED
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.
|
|
117
|
+
var version = "3.43.0";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
|
@@ -244,6 +244,7 @@ async function raiseEvent(eventData) {
|
|
|
244
244
|
// src/analytics/count-resources.js
|
|
245
245
|
var import_glob = require("glob");
|
|
246
246
|
var RESOURCE_PATTERNS = {
|
|
247
|
+
adrs: ["**/adrs/*/index.@(md|mdx)"],
|
|
247
248
|
agents: ["**/agents/*/index.@(md|mdx)"],
|
|
248
249
|
events: ["**/events/*/index.@(md|mdx)"],
|
|
249
250
|
commands: ["**/commands/*/index.@(md|mdx)"],
|
|
@@ -291,6 +292,7 @@ var getFeatures = async (configFile) => {
|
|
|
291
292
|
};
|
|
292
293
|
var CLOUD_ANALYTICS_ENDPOINT = "https://api.ecingest.dev/v1/analytics/ingest";
|
|
293
294
|
var toCloudResourceCounts = (counts) => ({
|
|
295
|
+
adrs: counts.adrs || 0,
|
|
294
296
|
agents: counts.agents || 0,
|
|
295
297
|
domains: counts.domains || 0,
|
|
296
298
|
services: counts.services || 0,
|
|
@@ -1332,6 +1334,7 @@ var import_node_path8 = __toESM(require("path"), 1);
|
|
|
1332
1334
|
var import_glob4 = require("glob");
|
|
1333
1335
|
var import_gray_matter4 = __toESM(require("gray-matter"), 1);
|
|
1334
1336
|
var RESOURCE_COLLECTIONS = {
|
|
1337
|
+
adrs: { docsPath: "adrs", type: "Architecture Decision" },
|
|
1335
1338
|
agents: { docsPath: "agents", type: "Agent" },
|
|
1336
1339
|
channels: { docsPath: "channels", type: "Channel" },
|
|
1337
1340
|
commands: { docsPath: "commands", type: "Command" },
|
|
@@ -1396,6 +1399,9 @@ var findResourceSegment = (segments) => {
|
|
|
1396
1399
|
let match = null;
|
|
1397
1400
|
for (let index = 0; index < segments.length - 1; index++) {
|
|
1398
1401
|
const segment = segments[index];
|
|
1402
|
+
if (segments[index - 1] === "docs") {
|
|
1403
|
+
continue;
|
|
1404
|
+
}
|
|
1399
1405
|
if (RESOURCE_COLLECTIONS[segment] && segments[index + 1]) {
|
|
1400
1406
|
match = { index, segment };
|
|
1401
1407
|
}
|
|
@@ -1562,6 +1568,10 @@ var collectSearchRecords = async ({
|
|
|
1562
1568
|
summary: baseRecord.summary,
|
|
1563
1569
|
version: baseRecord.version,
|
|
1564
1570
|
owners: parsed.data.owners,
|
|
1571
|
+
status: parsed.data.status,
|
|
1572
|
+
date: parsed.data.date,
|
|
1573
|
+
decisionMakers: parsed.data.decisionMakers,
|
|
1574
|
+
appliesTo: parsed.data.appliesTo,
|
|
1565
1575
|
badges: parsed.data.badges
|
|
1566
1576
|
});
|
|
1567
1577
|
const content = [frontmatterText, markdownToSearchText(parsed.content)].filter(Boolean).join("\n\n");
|
package/dist/eventcatalog.js
CHANGED
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
} from "./chunk-WAJIJEI3.js";
|
|
8
8
|
import {
|
|
9
9
|
buildSearchIndex
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZONBICNH.js";
|
|
11
11
|
import {
|
|
12
12
|
watch
|
|
13
13
|
} from "./chunk-3H2RT3CM.js";
|
|
14
14
|
import {
|
|
15
15
|
log_build_default
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-QV2PKXZM.js";
|
|
17
|
+
import "./chunk-2EI3M7OO.js";
|
|
18
|
+
import "./chunk-DAOXTQVS.js";
|
|
19
19
|
import {
|
|
20
20
|
catalogToAstro
|
|
21
21
|
} from "./chunk-O6KT4DPL.js";
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
} from "./chunk-ULZYHF3V.js";
|
|
29
29
|
import {
|
|
30
30
|
generate
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZQHBDPIY.js";
|
|
32
32
|
import {
|
|
33
33
|
logger
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7M5IQL3J.js";
|
|
35
35
|
import {
|
|
36
36
|
VERSION
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KY74BE42.js";
|
|
38
38
|
import {
|
|
39
39
|
getEventCatalogConfigFile,
|
|
40
40
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZQHBDPIY.js";
|
|
4
|
+
import "./chunk-7M5IQL3J.js";
|
|
5
|
+
import "./chunk-KY74BE42.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/search-indexer.cjs
CHANGED
|
@@ -40,6 +40,7 @@ var import_node_path = __toESM(require("path"), 1);
|
|
|
40
40
|
var import_glob = require("glob");
|
|
41
41
|
var import_gray_matter = __toESM(require("gray-matter"), 1);
|
|
42
42
|
var RESOURCE_COLLECTIONS = {
|
|
43
|
+
adrs: { docsPath: "adrs", type: "Architecture Decision" },
|
|
43
44
|
agents: { docsPath: "agents", type: "Agent" },
|
|
44
45
|
channels: { docsPath: "channels", type: "Channel" },
|
|
45
46
|
commands: { docsPath: "commands", type: "Command" },
|
|
@@ -104,6 +105,9 @@ var findResourceSegment = (segments) => {
|
|
|
104
105
|
let match = null;
|
|
105
106
|
for (let index = 0; index < segments.length - 1; index++) {
|
|
106
107
|
const segment = segments[index];
|
|
108
|
+
if (segments[index - 1] === "docs") {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
107
111
|
if (RESOURCE_COLLECTIONS[segment] && segments[index + 1]) {
|
|
108
112
|
match = { index, segment };
|
|
109
113
|
}
|
|
@@ -270,6 +274,10 @@ var collectSearchRecords = async ({
|
|
|
270
274
|
summary: baseRecord.summary,
|
|
271
275
|
version: baseRecord.version,
|
|
272
276
|
owners: parsed.data.owners,
|
|
277
|
+
status: parsed.data.status,
|
|
278
|
+
date: parsed.data.date,
|
|
279
|
+
decisionMakers: parsed.data.decisionMakers,
|
|
280
|
+
appliesTo: parsed.data.appliesTo,
|
|
273
281
|
badges: parsed.data.badges
|
|
274
282
|
});
|
|
275
283
|
const content = [frontmatterText, markdownToSearchText(parsed.content)].filter(Boolean).join("\n\n");
|
package/dist/search-indexer.js
CHANGED
package/dist/utils/cli-logger.js
CHANGED
|
@@ -19,13 +19,13 @@ interface Props {
|
|
|
19
19
|
title?: string;
|
|
20
20
|
description?: string;
|
|
21
21
|
columns?: number;
|
|
22
|
-
data
|
|
23
|
-
attachments
|
|
22
|
+
data?: {
|
|
23
|
+
attachments?: Attachment[];
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const { title = 'Attachments', description, columns = 2, ...props } = Astro.props;
|
|
28
|
-
const
|
|
28
|
+
const attachments = props.data?.attachments ?? [];
|
|
29
29
|
|
|
30
30
|
function getIconForAttachment(attachment: AttachmentObject): ComponentType<{ className?: string }> | null {
|
|
31
31
|
// If custom icon is provided, try to find it
|
|
@@ -221,6 +221,8 @@ export default function NestedSideBar() {
|
|
|
221
221
|
// Agents
|
|
222
222
|
{ pattern: /^\/docs\/agents\/([^/]+)\/([^/]+)/, type: 'agent' },
|
|
223
223
|
{ pattern: /^\/visualiser\/agents\/([^/]+)\/([^/]+)/, type: 'agent' },
|
|
224
|
+
// Decision Records
|
|
225
|
+
{ pattern: /^\/docs\/adrs\/([^/]+)\/([^/]+)/, type: 'adr' },
|
|
224
226
|
// Services
|
|
225
227
|
{ pattern: /^\/docs\/services\/([^/]+)\/([^/]+)/, type: 'service' },
|
|
226
228
|
{ pattern: /^\/architecture\/services\/([^/]+)\/([^/]+)/, type: 'service' },
|
|
@@ -503,6 +505,13 @@ export default function NestedSideBar() {
|
|
|
503
505
|
[favorites]
|
|
504
506
|
);
|
|
505
507
|
|
|
508
|
+
const urlsMatch = useCallback((left: string | undefined, right: string | undefined) => {
|
|
509
|
+
if (!left || !right) return false;
|
|
510
|
+
return stripBasePath(left).replace(/\/$/, '') === stripBasePath(right).replace(/\/$/, '');
|
|
511
|
+
}, []);
|
|
512
|
+
|
|
513
|
+
const activeNodeKey = useMemo(() => findNodeKeyByUrl(currentPath), [currentPath, findNodeKeyByUrl]);
|
|
514
|
+
|
|
506
515
|
// Show loading state if no data yet
|
|
507
516
|
if (!data || roots.length === 0) {
|
|
508
517
|
return (
|
|
@@ -838,7 +847,7 @@ export default function NestedSideBar() {
|
|
|
838
847
|
*/
|
|
839
848
|
const renderItem = (item: NavNode, itemKey: string | null, index: number) => {
|
|
840
849
|
const itemHasChildren = hasChildren(item);
|
|
841
|
-
const isActive = item.href &&
|
|
850
|
+
const isActive = urlsMatch(item.href, currentPath) || (itemKey !== null && itemKey === activeNodeKey);
|
|
842
851
|
const isFav = isFavorited(itemKey);
|
|
843
852
|
const canFavorite = itemKey !== null; // Only items with keys can be favorited
|
|
844
853
|
|
|
@@ -925,7 +934,7 @@ export default function NestedSideBar() {
|
|
|
925
934
|
key={`item-${itemKey || index}`}
|
|
926
935
|
title={item.title}
|
|
927
936
|
onClick={() => handleDrillDown(item, itemKey)}
|
|
928
|
-
className={cn(baseClasses, parentClasses)}
|
|
937
|
+
className={cn(baseClasses, parentClasses, activeClasses)}
|
|
929
938
|
>
|
|
930
939
|
{content}
|
|
931
940
|
</button>
|