@eventcatalog/core 5.2.0 → 5.2.1
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/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-DJCOJ77J.js → chunk-7RJN4FNG.js} +1 -1
- package/dist/{chunk-66OL4B7U.js → chunk-HVCPU4V3.js} +1 -1
- package/dist/{chunk-NBYKF4Z4.js → chunk-MESHMXLR.js} +1 -1
- package/dist/{chunk-XI5HQWM2.js → chunk-OVEXZEJJ.js} +1 -1
- package/dist/{chunk-N2LLD5TR.js → chunk-QSD6WMYE.js} +1 -1
- package/dist/{chunk-RNYFUWJI.js → chunk-VEQLCFU6.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +1 -1
- package/dist/docs/development/developer-tools/api-catalog.md +0 -2
- package/dist/docs/development/export/01-introduction.md +1 -1
- package/dist/docs/development/export/04-reference.md +1 -1
- package/dist/docs/development/guides/owners/05-teams-reference.md +0 -12
- package/dist/docs/development/guides/owners/06-users-reference.md +0 -12
- package/dist/docs/development/upgrading/v5.md +1 -1
- package/dist/eventcatalog.cjs +2 -2
- package/dist/eventcatalog.js +12 -12
- package/dist/federation/federate.js +3 -3
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/search-indexer.cjs +1 -1
- 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/content.config.ts +0 -3
- package/eventcatalog/src/features/collections/resource-docs.ts +0 -1
- package/eventcatalog/src/features/mcp/mcp-scope.ts +2 -3
- package/eventcatalog/src/features/tools/catalog-tools.ts +6 -8
- package/eventcatalog/src/pages/api-catalog/specifications/[collection]/[id]/[version]/[specification].ts +2 -4
- package/eventcatalog/src/utils/collections/adrs.ts +0 -1
- package/eventcatalog/src/utils/collections/agents.ts +0 -1
- package/eventcatalog/src/utils/collections/channels.ts +0 -1
- package/eventcatalog/src/utils/collections/commands.ts +0 -1
- package/eventcatalog/src/utils/collections/containers.ts +0 -1
- package/eventcatalog/src/utils/collections/domains.ts +0 -2
- package/eventcatalog/src/utils/collections/entities.ts +0 -1
- package/eventcatalog/src/utils/collections/events.ts +0 -1
- package/eventcatalog/src/utils/collections/flows.ts +0 -2
- package/eventcatalog/src/utils/collections/owners.ts +1 -4
- package/eventcatalog/src/utils/collections/queries.ts +0 -1
- package/eventcatalog/src/utils/collections/resource-docs.ts +1 -5
- package/eventcatalog/src/utils/collections/resource-owners.ts +1 -2
- package/eventcatalog/src/utils/collections/services.ts +0 -1
- package/eventcatalog/src/utils/collections/systems.ts +0 -1
- package/eventcatalog/src/utils/collections/teams.ts +3 -6
- package/eventcatalog/src/utils/collections/users.ts +4 -8
- package/eventcatalog/src/utils/homepage-dashboard.ts +2 -3
- package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +2 -6
- package/package.json +4 -4
- package/dist/{chunk-QJ7KKN2D.js → chunk-NCEZDQSW.js} +7 -7
|
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
169
169
|
var import_os = __toESM(require("os"), 1);
|
|
170
170
|
|
|
171
171
|
// package.json
|
|
172
|
-
var version = "5.2.
|
|
172
|
+
var version = "5.2.1";
|
|
173
173
|
|
|
174
174
|
// src/constants.ts
|
|
175
175
|
var VERSION = version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VEQLCFU6.js";
|
|
4
4
|
import "../chunk-AD7CL772.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-HVCPU4V3.js";
|
|
6
6
|
import "../chunk-ZAZHAVKB.js";
|
|
7
7
|
import "../chunk-CA6WCQ2T.js";
|
|
8
8
|
import "../chunk-CPW6G62V.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-QSD6WMYE.js";
|
|
10
10
|
import "../chunk-4G7FSRPN.js";
|
|
11
11
|
export {
|
|
12
12
|
log_build_default as default
|
|
@@ -104,7 +104,7 @@ var deriveRecordFromPath = async ({
|
|
|
104
104
|
const segments = normalizedRelativePath.split("/").filter(Boolean);
|
|
105
105
|
const fileName = segments[segments.length - 1] || "";
|
|
106
106
|
const fileNameWithoutExtension = removeExtension(fileName);
|
|
107
|
-
if (data.
|
|
107
|
+
if (data.draft) {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
110
|
if (segments[0] === "docs") {
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -236,7 +236,7 @@ claude mcp add --transport http <name> <url>
|
|
|
236
236
|
|
|
237
237
|
Every built-in tool is read-only (`readOnlyHint: true`) and has a title, so MCP clients can show readable names and
|
|
238
238
|
auto-approve the tools. Version parameters are optional on every tool: omit them (or pass `latest`) to use the latest
|
|
239
|
-
version.
|
|
239
|
+
version.
|
|
240
240
|
|
|
241
241
|
The server also sends instructions to clients on how to navigate the catalog, for example to use `showResource` when the user
|
|
242
242
|
wants to see a diagram or schema.
|
|
@@ -35,8 +35,6 @@ Each entry contains:
|
|
|
35
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
36
|
- **`service-doc`** - two links per resource: the markdown source and the rendered HTML page.
|
|
37
37
|
|
|
38
|
-
Resources marked `hidden: true` are excluded from the linkset.
|
|
39
|
-
|
|
40
38
|
### Access the endpoint
|
|
41
39
|
|
|
42
40
|
```
|
|
@@ -46,7 +46,7 @@ Both are the same kind of file:
|
|
|
46
46
|
- **Flows**, step by step, with every resource each step touches.
|
|
47
47
|
- **Search** across the file (press `⌘K` or `Ctrl+K`), a sidebar filter, and light and dark themes.
|
|
48
48
|
|
|
49
|
-
Only the latest version of each resource is included.
|
|
49
|
+
Only the latest version of each resource is included.
|
|
50
50
|
|
|
51
51
|

|
|
52
52
|
|
|
@@ -34,7 +34,7 @@ The folder isn't searched recursively. Set [`exports.custom.dir`](#exports-custo
|
|
|
34
34
|
|
|
35
35
|
The [CLI](#cli) writes `architecture.html` or `{id}.html` in the folder you run it from, unless you pass `--output`.
|
|
36
36
|
|
|
37
|
-
Every file is self-contained: styles, scripts, schemas and specifications are inside it. Only the latest version of each resource is exported
|
|
37
|
+
Every file is self-contained: styles, scripts, schemas and specifications are inside it. Only the latest version of each resource is exported.
|
|
38
38
|
|
|
39
39
|
## Frontmatter {#frontmatter}
|
|
40
40
|
|
|
@@ -78,18 +78,6 @@ email: payments@example.com
|
|
|
78
78
|
---
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
### `hidden` {#hidden}
|
|
82
|
-
|
|
83
|
-
- Type: `boolean`
|
|
84
|
-
|
|
85
|
-
Hide the team from generated lists.
|
|
86
|
-
|
|
87
|
-
```md title="Example"
|
|
88
|
-
---
|
|
89
|
-
hidden: true
|
|
90
|
-
---
|
|
91
|
-
```
|
|
92
|
-
|
|
93
81
|
### `slackDirectMessageUrl` {#slackDirectMessageUrl}
|
|
94
82
|
|
|
95
83
|
- Type: `string`
|
|
@@ -90,18 +90,6 @@ email: david@example.com
|
|
|
90
90
|
---
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
### `hidden` {#hidden}
|
|
94
|
-
|
|
95
|
-
- Type: `boolean`
|
|
96
|
-
|
|
97
|
-
Hide the user from generated lists.
|
|
98
|
-
|
|
99
|
-
```md title="Example"
|
|
100
|
-
---
|
|
101
|
-
hidden: true
|
|
102
|
-
---
|
|
103
|
-
```
|
|
104
|
-
|
|
105
93
|
### `slackDirectMessageUrl` {#slackDirectMessageUrl}
|
|
106
94
|
|
|
107
95
|
- Type: `string`
|
|
@@ -328,7 +328,7 @@ Read more about the [service Resources page](/docs/development/guides/resources/
|
|
|
328
328
|
|
|
329
329
|
The MCP server has a new `showResource` tool. With `view: "architecture"` it returns a resource's diagram, built the same way as its Diagram page. With `view: "schema"` it shows a message's schema. In MCP clients that support MCP Apps (for example Claude, ChatGPT and VS Code) these open as interactive views. Other clients get Mermaid or the schema code.
|
|
330
330
|
|
|
331
|
-
Every MCP tool now has a title and is read-only, versions are optional
|
|
331
|
+
Every MCP tool now has a title and is read-only, and versions are optional. Read more in [interactive diagrams and schemas](/docs/development/ask-your-architecture/mcp-server/getting-started#interactive-diagrams-and-schemas).
|
|
332
332
|
|
|
333
333
|
### Settings > MCP lists domain MCP servers
|
|
334
334
|
|
package/dist/eventcatalog.cjs
CHANGED
|
@@ -174,7 +174,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
174
174
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
175
175
|
|
|
176
176
|
// package.json
|
|
177
|
-
var version = "5.2.
|
|
177
|
+
var version = "5.2.1";
|
|
178
178
|
|
|
179
179
|
// src/constants.ts
|
|
180
180
|
var VERSION = version;
|
|
@@ -1714,7 +1714,7 @@ var deriveRecordFromPath = async ({
|
|
|
1714
1714
|
const segments = normalizedRelativePath.split("/").filter(Boolean);
|
|
1715
1715
|
const fileName = segments[segments.length - 1] || "";
|
|
1716
1716
|
const fileNameWithoutExtension = removeExtension(fileName);
|
|
1717
|
-
if (data.
|
|
1717
|
+
if (data.draft) {
|
|
1718
1718
|
return null;
|
|
1719
1719
|
}
|
|
1720
1720
|
if (segments[0] === "docs") {
|
package/dist/eventcatalog.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import "./chunk-CA4U2JP7.js";
|
|
8
8
|
import {
|
|
9
9
|
log_build_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VEQLCFU6.js";
|
|
11
11
|
import {
|
|
12
12
|
getLicenseStatus,
|
|
13
13
|
printLicenseStatus
|
|
14
14
|
} from "./chunk-AD7CL772.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-HVCPU4V3.js";
|
|
16
16
|
import "./chunk-ZAZHAVKB.js";
|
|
17
17
|
import "./chunk-CA6WCQ2T.js";
|
|
18
18
|
import "./chunk-CPW6G62V.js";
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
FederationConflictError,
|
|
21
21
|
FederationDiagnosticError,
|
|
22
22
|
federateCatalog
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-WRNH5C3U.js";
|
|
25
|
-
import "./chunk-5EPNFDT5.js";
|
|
26
|
-
import "./chunk-A2RZR3U4.js";
|
|
27
|
-
import "./chunk-SDZQJTJW.js";
|
|
28
|
-
import "./chunk-352FGP6W.js";
|
|
23
|
+
} from "./chunk-NCEZDQSW.js";
|
|
29
24
|
import "./chunk-R7Z5ALYI.js";
|
|
30
25
|
import {
|
|
31
26
|
getFederationDiagnosticCounts,
|
|
32
27
|
getVisibleFederationDiagnostics
|
|
33
28
|
} from "./chunk-JJPB6EOZ.js";
|
|
29
|
+
import "./chunk-WRNH5C3U.js";
|
|
30
|
+
import "./chunk-5EPNFDT5.js";
|
|
31
|
+
import "./chunk-A2RZR3U4.js";
|
|
32
|
+
import "./chunk-SDZQJTJW.js";
|
|
33
|
+
import "./chunk-352FGP6W.js";
|
|
34
34
|
import {
|
|
35
35
|
getProjectOutDir,
|
|
36
36
|
isAuthEnabled,
|
|
@@ -39,16 +39,16 @@ import {
|
|
|
39
39
|
} from "./chunk-NKNOXQ62.js";
|
|
40
40
|
import {
|
|
41
41
|
generate
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-MESHMXLR.js";
|
|
43
43
|
import {
|
|
44
44
|
logger
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-OVEXZEJJ.js";
|
|
46
46
|
import {
|
|
47
47
|
resolve_catalog_dependencies_default
|
|
48
48
|
} from "./chunk-PD7KTSYN.js";
|
|
49
49
|
import {
|
|
50
50
|
buildSearchIndex
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-7RJN4FNG.js";
|
|
52
52
|
import {
|
|
53
53
|
getEventCatalogUpdateMessage,
|
|
54
54
|
resolveInstalledCoreVersion
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
} from "./chunk-LFQJXLHG.js";
|
|
80
80
|
import {
|
|
81
81
|
VERSION
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-QSD6WMYE.js";
|
|
83
83
|
import {
|
|
84
84
|
getEventCatalogConfigFile,
|
|
85
85
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
FederationConflictError,
|
|
3
3
|
FederationDiagnosticError,
|
|
4
4
|
federateCatalog
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-NCEZDQSW.js";
|
|
6
|
+
import "../chunk-R7Z5ALYI.js";
|
|
7
|
+
import "../chunk-JJPB6EOZ.js";
|
|
6
8
|
import "../chunk-WRNH5C3U.js";
|
|
7
9
|
import "../chunk-5EPNFDT5.js";
|
|
8
10
|
import "../chunk-A2RZR3U4.js";
|
|
9
11
|
import "../chunk-SDZQJTJW.js";
|
|
10
12
|
import "../chunk-352FGP6W.js";
|
|
11
|
-
import "../chunk-R7Z5ALYI.js";
|
|
12
|
-
import "../chunk-JJPB6EOZ.js";
|
|
13
13
|
import "../chunk-4G7FSRPN.js";
|
|
14
14
|
export {
|
|
15
15
|
FederationConflictError,
|
package/dist/generate.cjs
CHANGED
|
@@ -105,7 +105,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
105
105
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
106
106
|
|
|
107
107
|
// package.json
|
|
108
|
-
var version = "5.2.
|
|
108
|
+
var version = "5.2.1";
|
|
109
109
|
|
|
110
110
|
// src/constants.ts
|
|
111
111
|
var VERSION = version;
|
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-MESHMXLR.js";
|
|
4
|
+
import "./chunk-OVEXZEJJ.js";
|
|
5
|
+
import "./chunk-QSD6WMYE.js";
|
|
6
6
|
import "./chunk-4G7FSRPN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/search-indexer.cjs
CHANGED
|
@@ -140,7 +140,7 @@ var deriveRecordFromPath = async ({
|
|
|
140
140
|
const segments = normalizedRelativePath.split("/").filter(Boolean);
|
|
141
141
|
const fileName = segments[segments.length - 1] || "";
|
|
142
142
|
const fileNameWithoutExtension = removeExtension(fileName);
|
|
143
|
-
if (data.
|
|
143
|
+
if (data.draft) {
|
|
144
144
|
return null;
|
|
145
145
|
}
|
|
146
146
|
if (segments[0] === "docs") {
|
package/dist/search-indexer.js
CHANGED
package/dist/utils/cli-logger.js
CHANGED
|
@@ -168,7 +168,6 @@ const baseSchema = z.object({
|
|
|
168
168
|
url: z.string().optional(),
|
|
169
169
|
})
|
|
170
170
|
.optional(),
|
|
171
|
-
hidden: z.boolean().optional(),
|
|
172
171
|
editUrl: z.string().optional(),
|
|
173
172
|
resourceGroups: z
|
|
174
173
|
.array(
|
|
@@ -980,7 +979,6 @@ const users = defineCollection({
|
|
|
980
979
|
name: z.string(),
|
|
981
980
|
avatarUrl: z.string().optional(),
|
|
982
981
|
role: z.string().optional(),
|
|
983
|
-
hidden: z.boolean().optional(),
|
|
984
982
|
source: directoryEntrySource.optional(),
|
|
985
983
|
readOnly: z.boolean().optional(),
|
|
986
984
|
email: z.string().optional(),
|
|
@@ -1013,7 +1011,6 @@ const teams = defineCollection({
|
|
|
1013
1011
|
name: z.string(),
|
|
1014
1012
|
summary: z.string().optional(),
|
|
1015
1013
|
email: z.string().optional(),
|
|
1016
|
-
hidden: z.boolean().optional(),
|
|
1017
1014
|
source: directoryEntrySource.optional(),
|
|
1018
1015
|
readOnly: z.boolean().optional(),
|
|
1019
1016
|
slackDirectMessageUrl: z.string().optional(),
|
|
@@ -35,7 +35,6 @@ type CatalogEntry = {
|
|
|
35
35
|
version: string;
|
|
36
36
|
name?: string;
|
|
37
37
|
summary?: string;
|
|
38
|
-
hidden?: boolean;
|
|
39
38
|
[key: string]: any;
|
|
40
39
|
};
|
|
41
40
|
[key: string]: any;
|
|
@@ -78,7 +77,7 @@ export class McpScope {
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
add(entry: CatalogEntry | undefined) {
|
|
81
|
-
if (!entry
|
|
80
|
+
if (!entry) return false;
|
|
82
81
|
|
|
83
82
|
const collectionEntries = this.entries.get(entry.collection) ?? new Map<string, CatalogEntry>();
|
|
84
83
|
const key = entryKey(entry.data.id, entry.data.version);
|
|
@@ -147,7 +146,7 @@ export async function resolveMcpScope(
|
|
|
147
146
|
|
|
148
147
|
const rootCollection = graphTypeToCollection[graph.root.type];
|
|
149
148
|
const root = resolve(rootCollection, graph.root.id, graph.root.version);
|
|
150
|
-
if (!root
|
|
149
|
+
if (!root) throw scopeNotFound(ref);
|
|
151
150
|
|
|
152
151
|
const scope = new McpScope(ref, root);
|
|
153
152
|
for (const resource of graph.resources) {
|
|
@@ -220,14 +220,12 @@ const describeVersion = (version?: string) => version ?? 'latest';
|
|
|
220
220
|
*/
|
|
221
221
|
export async function getResources(params: { collection: string; cursor?: string; search?: string }) {
|
|
222
222
|
const resources = await getCollection(params.collection as any);
|
|
223
|
-
let allResults = resources
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
summary: resource.data.summary,
|
|
230
|
-
}));
|
|
223
|
+
let allResults = resources.map((resource: any) => ({
|
|
224
|
+
id: resource.data.id,
|
|
225
|
+
version: resource.data.version,
|
|
226
|
+
name: resource.data.name,
|
|
227
|
+
summary: resource.data.summary,
|
|
228
|
+
}));
|
|
231
229
|
|
|
232
230
|
// Apply search filter if provided
|
|
233
231
|
if (params.search) {
|
|
@@ -39,9 +39,7 @@ const getSpecificationsForResource = (
|
|
|
39
39
|
|
|
40
40
|
export async function getStaticPaths() {
|
|
41
41
|
const [services, domains] = await Promise.all([getCollection('services'), getCollection('domains')]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return resources.flatMap((resource) =>
|
|
42
|
+
return [...services, ...domains].flatMap((resource) =>
|
|
45
43
|
getSpecificationsForResource(resource).map((specification) => ({
|
|
46
44
|
params: {
|
|
47
45
|
collection: resource.collection,
|
|
@@ -74,7 +72,7 @@ export const GET: APIRoute = async ({ params, props }) => {
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
const resources = await getCollection(collection);
|
|
77
|
-
const resource = resources.find((item) => item.data.id === id && item.data.version === version
|
|
75
|
+
const resource = resources.find((item) => item.data.id === id && item.data.version === version);
|
|
78
76
|
|
|
79
77
|
if (!resource) {
|
|
80
78
|
return new Response(JSON.stringify({ error: 'Resource not found' }), {
|
|
@@ -39,7 +39,6 @@ export const getAdrs = async ({ getAllVersions = true, returnBody = false }: Pro
|
|
|
39
39
|
const adrMap = createVersionedMap(allAdrs);
|
|
40
40
|
|
|
41
41
|
const targetAdrs = allAdrs.filter((adr) => {
|
|
42
|
-
if (adr.data.hidden === true) return false;
|
|
43
42
|
if (!getAllVersions && adr.filePath?.includes('versioned')) return false;
|
|
44
43
|
return true;
|
|
45
44
|
});
|
|
@@ -38,7 +38,6 @@ export const getAgents = async ({ getAllVersions = true, returnBody = false }: P
|
|
|
38
38
|
const flowMap = createVersionedMap(allFlows);
|
|
39
39
|
|
|
40
40
|
const targetAgents = allAgents.filter((agent) => {
|
|
41
|
-
if (agent.data.hidden === true) return false;
|
|
42
41
|
if (!getAllVersions && agent.filePath?.includes('versioned')) return false;
|
|
43
42
|
return true;
|
|
44
43
|
});
|
|
@@ -66,7 +66,6 @@ export const getChannels = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
66
66
|
|
|
67
67
|
// 4. Filter channels
|
|
68
68
|
const targetChannels = allChannels.filter((channel) => {
|
|
69
|
-
if (channel.data.hidden === true) return false;
|
|
70
69
|
if (!getAllVersions && channel.filePath?.includes('versioned')) return false;
|
|
71
70
|
return true;
|
|
72
71
|
});
|
|
@@ -51,7 +51,6 @@ export const getCommands = async ({ getAllVersions = true, hydrateServices = tru
|
|
|
51
51
|
|
|
52
52
|
// 3. Filter commands
|
|
53
53
|
const targetCommands = allCommands.filter((command) => {
|
|
54
|
-
if (command.data.hidden === true) return false;
|
|
55
54
|
if (!getAllVersions && command.filePath?.includes('versioned')) return false;
|
|
56
55
|
return true;
|
|
57
56
|
});
|
|
@@ -33,7 +33,6 @@ export const getContainers = async ({ getAllVersions = true }: Props = {}): Prom
|
|
|
33
33
|
|
|
34
34
|
// 3. Filter containers
|
|
35
35
|
const targetContainers = allContainers.filter((container) => {
|
|
36
|
-
if (container.data.hidden === true) return false;
|
|
37
36
|
if (!getAllVersions && container.filePath?.includes('versioned')) return false;
|
|
38
37
|
return true;
|
|
39
38
|
});
|
|
@@ -79,8 +79,6 @@ export const getDomains = async ({
|
|
|
79
79
|
|
|
80
80
|
// 3. Filter the domains we actually want to process/return
|
|
81
81
|
const targetDomains = allDomains.filter((domain: Domain) => {
|
|
82
|
-
// Filter out hidden
|
|
83
|
-
if (domain.data.hidden === true) return false;
|
|
84
82
|
// Handle version filtering
|
|
85
83
|
if (!getAllVersions && domain.filePath?.includes('versioned')) return false;
|
|
86
84
|
return true;
|
|
@@ -34,7 +34,6 @@ export const getEntities = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
34
34
|
|
|
35
35
|
// 3. Filter entities
|
|
36
36
|
const targetEntities = allEntities.filter((entity) => {
|
|
37
|
-
if (entity.data.hidden === true) return false;
|
|
38
37
|
if (!getAllVersions && entity.filePath?.includes('versioned')) return false;
|
|
39
38
|
return true;
|
|
40
39
|
});
|
|
@@ -51,7 +51,6 @@ export const getEvents = async ({ getAllVersions = true, hydrateServices = true
|
|
|
51
51
|
|
|
52
52
|
// 3. Filter events
|
|
53
53
|
const targetEvents = allEvents.filter((event) => {
|
|
54
|
-
if (event.data.hidden === true) return false;
|
|
55
54
|
if (!getAllVersions && event.filePath?.includes('versioned')) return false;
|
|
56
55
|
return true;
|
|
57
56
|
});
|
|
@@ -46,7 +46,6 @@ export const getFlows = async ({ getAllVersions = true }: Props = {}): Promise<F
|
|
|
46
46
|
|
|
47
47
|
// 3. Filter flows
|
|
48
48
|
const targetFlows = allFlows.filter((flow) => {
|
|
49
|
-
if (flow.data.hidden === true) return false;
|
|
50
49
|
if (!getAllVersions && flow.filePath?.includes('versioned')) return false;
|
|
51
50
|
return true;
|
|
52
51
|
});
|
|
@@ -230,7 +229,6 @@ export const getFlowsForMessages = async (
|
|
|
230
229
|
const flowsByMessage = new Map<string, FlowReference[]>();
|
|
231
230
|
|
|
232
231
|
for (const flow of flows) {
|
|
233
|
-
if (flow.data.hidden === true) continue;
|
|
234
232
|
const reference: FlowReference = {
|
|
235
233
|
id: flow.data.id,
|
|
236
234
|
version: flow.data.version,
|
|
@@ -11,10 +11,7 @@ const getOwners = (function () {
|
|
|
11
11
|
async function init() {
|
|
12
12
|
const ownersMap = new Map<string, CollectionEntry<'users' | 'teams'>>();
|
|
13
13
|
|
|
14
|
-
const owners = await Promise.all([
|
|
15
|
-
getCollection('users', (entry) => entry.data.hidden !== true),
|
|
16
|
-
getCollection('teams', (entry) => entry.data.hidden !== true),
|
|
17
|
-
]);
|
|
14
|
+
const owners = await Promise.all([getCollection('users'), getCollection('teams')]);
|
|
18
15
|
|
|
19
16
|
for (const owner of owners.flat()) {
|
|
20
17
|
ownersMap.set(owner.data.id, owner);
|
|
@@ -50,7 +50,6 @@ export const getQueries = async ({ getAllVersions = true, hydrateServices = true
|
|
|
50
50
|
|
|
51
51
|
// 3. Filter queries
|
|
52
52
|
const targetQueries = allQueries.filter((query) => {
|
|
53
|
-
if (query.data.hidden === true) return false;
|
|
54
53
|
if (!getAllVersions && query.filePath?.includes('versioned')) return false;
|
|
55
54
|
return true;
|
|
56
55
|
});
|
|
@@ -250,7 +250,7 @@ const getResourceFolderFromFilePath = (filePath: string): string | undefined =>
|
|
|
250
250
|
|
|
251
251
|
const buildLookup = (
|
|
252
252
|
resources: Array<{
|
|
253
|
-
data: { id: string; version: string
|
|
253
|
+
data: { id: string; version: string };
|
|
254
254
|
filePath?: string;
|
|
255
255
|
}>
|
|
256
256
|
): ResourceLookup => {
|
|
@@ -258,9 +258,6 @@ const buildLookup = (
|
|
|
258
258
|
const folderToId = new Map<string, string>();
|
|
259
259
|
|
|
260
260
|
for (const resource of resources) {
|
|
261
|
-
if (resource.data.hidden === true) {
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
261
|
const list = groupedById.get(resource.data.id) || [];
|
|
265
262
|
list.push(resource.data.version);
|
|
266
263
|
groupedById.set(resource.data.id, list);
|
|
@@ -390,7 +387,6 @@ export const getResourceDocs = async (): Promise<ResourceDocEntry[]> => {
|
|
|
390
387
|
const [docs, lookups] = await Promise.all([getCollection('resourceDocs'), getResourceLookups()]);
|
|
391
388
|
|
|
392
389
|
const docsWithResources = docs
|
|
393
|
-
.filter((doc) => doc.data.hidden !== true)
|
|
394
390
|
.map((doc) => {
|
|
395
391
|
if (!doc.filePath) {
|
|
396
392
|
return null;
|
|
@@ -53,8 +53,7 @@ const once = <T>(load: () => Promise<T>) => {
|
|
|
53
53
|
return () => (loaded ??= load());
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const isCurrentVersion = (entry: {
|
|
57
|
-
entry.data.hidden !== true && !entry.filePath?.includes('versioned');
|
|
56
|
+
const isCurrentVersion = (entry: { filePath?: string }) => !entry.filePath?.includes('versioned');
|
|
58
57
|
|
|
59
58
|
// Owners come from their own collection's loader, so an owner of a type is that collection's entry.
|
|
60
59
|
const asEntry = <C extends CollectionKey>(owner: ResourceOwner) => owner as unknown as CollectionEntry<C>;
|
|
@@ -54,7 +54,6 @@ export const getServices = async ({ getAllVersions = true, returnBody = false }:
|
|
|
54
54
|
|
|
55
55
|
// 3. Filter services
|
|
56
56
|
const targetServices = allServices.filter((service) => {
|
|
57
|
-
if (service.data.hidden === true) return false;
|
|
58
57
|
if (!getAllVersions && service.filePath?.includes('versioned')) return false;
|
|
59
58
|
return true;
|
|
60
59
|
});
|
|
@@ -42,7 +42,6 @@ export const getSystems = async ({ getAllVersions = true, enrichServices = false
|
|
|
42
42
|
|
|
43
43
|
// Filter systems
|
|
44
44
|
const targetSystems = allSystems.filter((system) => {
|
|
45
|
-
if (system.data.hidden === true) return false;
|
|
46
45
|
if (!getAllVersions && system.filePath?.includes('versioned')) return false;
|
|
47
46
|
return true;
|
|
48
47
|
});
|
|
@@ -29,10 +29,7 @@ export const getTeams = async (): Promise<Team[]> => {
|
|
|
29
29
|
getAdrs({ getAllVersions: false }),
|
|
30
30
|
]);
|
|
31
31
|
|
|
32
|
-
// 2.
|
|
33
|
-
const targetTeams = allTeams.filter((team) => team.data.hidden !== true);
|
|
34
|
-
|
|
35
|
-
// 3. Build Owner Index: Map<OwnerID, Item[]>
|
|
32
|
+
// 2. Build Owner Index: Map<OwnerID, Item[]>
|
|
36
33
|
// This index groups all items (domains, services, etc.) by their owner IDs.
|
|
37
34
|
// This allows O(1) lookup to find all items owned by a specific team.
|
|
38
35
|
const ownershipMap = new Map<string, CollectionEntry<CollectionTypes>[]>();
|
|
@@ -59,8 +56,8 @@ export const getTeams = async (): Promise<Team[]> => {
|
|
|
59
56
|
addToIndex(allQueries);
|
|
60
57
|
addToIndex(allAdrs);
|
|
61
58
|
|
|
62
|
-
//
|
|
63
|
-
const processedTeams =
|
|
59
|
+
// 3. Enrich teams using the ownership index
|
|
60
|
+
const processedTeams = allTeams.map((team) => {
|
|
64
61
|
const teamId = team.data.id;
|
|
65
62
|
const ownedItems = ownershipMap.get(teamId) || [];
|
|
66
63
|
|
|
@@ -31,11 +31,7 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
31
31
|
getAdrs({ getAllVersions: false }),
|
|
32
32
|
]);
|
|
33
33
|
|
|
34
|
-
// 2.
|
|
35
|
-
const targetUsers = allUsers.filter((user) => user.data.hidden !== true);
|
|
36
|
-
const visibleTeams = allTeams.filter((team) => team.data.hidden !== true);
|
|
37
|
-
|
|
38
|
-
// 3. Process users (Optimization: Iterate once over relationships if possible,
|
|
34
|
+
// 2. Process users (Optimization: Iterate once over relationships if possible,
|
|
39
35
|
// but since we need to check ownership for EACH user against ALL items,
|
|
40
36
|
// we can't easily invert the map without building an "owner" index first.
|
|
41
37
|
// Given users/teams count is usually lower than events/services, iterating users and filtering items is acceptable,
|
|
@@ -67,8 +63,8 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
67
63
|
addToIndex(allAdrs);
|
|
68
64
|
|
|
69
65
|
// Team Membership Index: Map<UserID, Team[]>
|
|
70
|
-
const teamMembershipMap = new Map<string, typeof
|
|
71
|
-
for (const team of
|
|
66
|
+
const teamMembershipMap = new Map<string, typeof allTeams>();
|
|
67
|
+
for (const team of allTeams) {
|
|
72
68
|
if (team.data.members) {
|
|
73
69
|
for (const member of team.data.members) {
|
|
74
70
|
if (!teamMembershipMap.has(member.id)) {
|
|
@@ -79,7 +75,7 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
const mappedUsers =
|
|
78
|
+
const mappedUsers = allUsers.map((user) => {
|
|
83
79
|
const userId = user.data.id;
|
|
84
80
|
const associatedTeams = teamMembershipMap.get(userId) || [];
|
|
85
81
|
const associatedTeamIds = associatedTeams.map((t) => t.data.id);
|
|
@@ -17,7 +17,6 @@ export type DashboardEntry = {
|
|
|
17
17
|
name?: string;
|
|
18
18
|
version: string;
|
|
19
19
|
summary?: string;
|
|
20
|
-
hidden?: boolean;
|
|
21
20
|
owners?: Owner[];
|
|
22
21
|
schemaPath?: string;
|
|
23
22
|
};
|
|
@@ -41,8 +40,8 @@ export type DashboardData = {
|
|
|
41
40
|
|
|
42
41
|
const MESSAGE_COLLECTIONS = ['events', 'commands', 'queries'] as const;
|
|
43
42
|
|
|
44
|
-
// The latest version of a resource
|
|
45
|
-
const isCurrent = (entry: DashboardEntry) =>
|
|
43
|
+
// The latest version of a resource (older versions live in a `versioned` folder)
|
|
44
|
+
const isCurrent = (entry: DashboardEntry) => !entry.filePath?.includes('versioned');
|
|
46
45
|
|
|
47
46
|
/**
|
|
48
47
|
* Everything the homepage dashboard shows, from the catalog's collections: counts, and what changed recently.
|
|
@@ -39,8 +39,7 @@ const pointerIds = (pointers?: { id: string }[]) => (pointers || []).map((pointe
|
|
|
39
39
|
* A resource listed by a domain directly belongs to that domain, otherwise to
|
|
40
40
|
* the domain of the system it's in. Built once per flow from the collections,
|
|
41
41
|
* rather than asking `getDomainsForService`, `getOwner` and so on for each step,
|
|
42
|
-
* so it follows their rules: latest versions only
|
|
43
|
-
* are left out.
|
|
42
|
+
* so it follows their rules: latest versions only.
|
|
44
43
|
*/
|
|
45
44
|
export const createLaneIndex = ({ domains, systems, teams, users }: LaneCollections) => {
|
|
46
45
|
const systemOf = new Map<string, Lane>();
|
|
@@ -75,14 +74,12 @@ export const createLaneIndex = ({ domains, systems, teams, users }: LaneCollecti
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
const owners = new Map<string, { lane: Lane; isTeam: boolean }>();
|
|
78
|
-
const hiddenOwners = new Set<string>();
|
|
79
77
|
for (const [entries, isTeam] of [
|
|
80
78
|
[users, false],
|
|
81
79
|
[teams, true],
|
|
82
80
|
] as const) {
|
|
83
81
|
for (const owner of entries) {
|
|
84
|
-
|
|
85
|
-
else owners.set(owner.data.id, { lane: toLane(owner), isTeam });
|
|
82
|
+
owners.set(owner.data.id, { lane: toLane(owner), isTeam });
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
|
|
@@ -90,7 +87,6 @@ export const createLaneIndex = ({ domains, systems, teams, users }: LaneCollecti
|
|
|
90
87
|
const teamOf = (resource: Resource): Lane | undefined => {
|
|
91
88
|
const resolved = (resource.data.owners || [])
|
|
92
89
|
.map((owner) => (typeof owner === 'string' ? owner : owner.id))
|
|
93
|
-
.filter((id) => !hiddenOwners.has(id))
|
|
94
90
|
.map((id) => owners.get(id) ?? { lane: { id, name: id }, isTeam: false })
|
|
95
91
|
.sort((a, b) => Number(b.isTeam) - Number(a.isTeam));
|
|
96
92
|
return resolved[0]?.lane;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "BUSL-1.1",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "5.2.
|
|
10
|
+
"version": "5.2.1",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"y-protocols": "^1.0.7",
|
|
141
141
|
"yjs": "^13.6.33",
|
|
142
142
|
"zod": "^4.6.6",
|
|
143
|
-
"@eventcatalog/exporters": "0.1.
|
|
144
|
-
"@eventcatalog/linter": "1.2.
|
|
145
|
-
"@eventcatalog/sdk": "2.31.
|
|
143
|
+
"@eventcatalog/exporters": "0.1.1",
|
|
144
|
+
"@eventcatalog/linter": "1.2.3",
|
|
145
|
+
"@eventcatalog/sdk": "2.31.1",
|
|
146
146
|
"@eventcatalog/visualiser": "^5.0.0"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createFederationContentCache
|
|
3
|
+
} from "./chunk-R7Z5ALYI.js";
|
|
4
|
+
import {
|
|
5
|
+
getFederationDiagnostics,
|
|
6
|
+
resolveFederationRules
|
|
7
|
+
} from "./chunk-JJPB6EOZ.js";
|
|
1
8
|
import {
|
|
2
9
|
withFederationOutputTransaction
|
|
3
10
|
} from "./chunk-WRNH5C3U.js";
|
|
@@ -7,13 +14,6 @@ import {
|
|
|
7
14
|
import {
|
|
8
15
|
createFederationSourceProvider
|
|
9
16
|
} from "./chunk-A2RZR3U4.js";
|
|
10
|
-
import {
|
|
11
|
-
createFederationContentCache
|
|
12
|
-
} from "./chunk-R7Z5ALYI.js";
|
|
13
|
-
import {
|
|
14
|
-
getFederationDiagnostics,
|
|
15
|
-
resolveFederationRules
|
|
16
|
-
} from "./chunk-JJPB6EOZ.js";
|
|
17
17
|
import {
|
|
18
18
|
getEventCatalogConfigFile
|
|
19
19
|
} from "./chunk-4G7FSRPN.js";
|