@eventcatalog/core 5.1.1 → 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/architecture-export.cjs +34 -2
- package/dist/architecture-export.d.cts +25 -1
- package/dist/architecture-export.d.ts +25 -1
- package/dist/architecture-export.js +11 -3
- package/dist/{chunk-DJCOJ77J.js → chunk-7RJN4FNG.js} +1 -1
- package/dist/{chunk-UCUZ44U2.js → chunk-HVCPU4V3.js} +1 -1
- package/dist/chunk-IR5MKGKS.js +60 -0
- package/dist/{chunk-BAUH53EV.js → chunk-MESHMXLR.js} +1 -1
- package/dist/{chunk-NJTLAFFT.js → chunk-OVEXZEJJ.js} +1 -1
- package/dist/{chunk-GKEHJQ5K.js → chunk-QSD6WMYE.js} +1 -1
- package/dist/{chunk-BEBDEEDY.js → chunk-VEQLCFU6.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/02-config.md +31 -1
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +1 -1
- package/dist/docs/development/bring-your-own-documentation/_category_.json +1 -1
- package/dist/docs/development/customization/08-custom-properties.md +48 -1
- package/dist/docs/development/developer-tools/api-catalog.md +0 -2
- package/dist/docs/development/export/01-introduction.md +90 -0
- package/dist/docs/development/{guides/96-architecture-reference.md → export/02-architecture-reference.md} +6 -27
- package/dist/docs/development/export/03-custom-exports.md +257 -0
- package/dist/docs/development/export/04-reference.md +383 -0
- package/dist/docs/development/export/_category_.json +12 -0
- 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 +65 -2
- package/dist/eventcatalog.config.d.cts +28 -0
- package/dist/eventcatalog.config.d.ts +28 -0
- package/dist/eventcatalog.js +54 -14
- 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 +5 -5
- package/dist/chunk-E6WTCJUL.js +0 -32
- 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.
|
|
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
|
|
@@ -31,9 +31,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var architecture_export_exports = {};
|
|
32
32
|
__export(architecture_export_exports, {
|
|
33
33
|
getArchitectureExportPath: () => getArchitectureExportPath,
|
|
34
|
+
getCustomExportsDir: () => getCustomExportsDir,
|
|
35
|
+
hasCustomExports: () => hasCustomExports,
|
|
34
36
|
isCatalogAuthEnabled: () => isCatalogAuthEnabled,
|
|
35
37
|
resolveArchitectureExport: () => resolveArchitectureExport,
|
|
36
|
-
|
|
38
|
+
resolveCustomExports: () => resolveCustomExports,
|
|
39
|
+
writeArchitectureExport: () => writeArchitectureExport,
|
|
40
|
+
writeCustomExportsToBuild: () => writeCustomExportsToBuild
|
|
37
41
|
});
|
|
38
42
|
module.exports = __toCommonJS(architecture_export_exports);
|
|
39
43
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
@@ -60,10 +64,38 @@ var writeArchitectureExport = ({
|
|
|
60
64
|
outputPath: getArchitectureExportPath({ outDir, isServer }),
|
|
61
65
|
regenerateCommand: "npx eventcatalog build"
|
|
62
66
|
});
|
|
67
|
+
var resolveCustomExports = (config, { authEnabled }) => {
|
|
68
|
+
const enabled = config?.exports?.custom?.enabled;
|
|
69
|
+
if (enabled === false) return { enabled: false, reason: "disabled" };
|
|
70
|
+
if (authEnabled && enabled !== true) return { enabled: false, reason: "auth" };
|
|
71
|
+
return { enabled: true };
|
|
72
|
+
};
|
|
73
|
+
var hasCustomExports = ({
|
|
74
|
+
projectDir,
|
|
75
|
+
config
|
|
76
|
+
}) => {
|
|
77
|
+
const folder = import_node_path.default.join(projectDir, config?.exports?.custom?.dir || import_exporters.DEFAULT_CUSTOM_EXPORTS_DIR);
|
|
78
|
+
return import_node_fs.default.existsSync(folder) && import_node_fs.default.readdirSync(folder).some((name) => /\.mdx?$/i.test(name));
|
|
79
|
+
};
|
|
80
|
+
var getCustomExportsDir = ({ outDir, isServer }) => import_node_path.default.join(outDir, isServer ? "client" : "", "exports");
|
|
81
|
+
var writeCustomExportsToBuild = ({
|
|
82
|
+
projectDir,
|
|
83
|
+
outDir,
|
|
84
|
+
isServer,
|
|
85
|
+
config
|
|
86
|
+
}) => (0, import_exporters.writeCustomExports)({
|
|
87
|
+
dir: projectDir,
|
|
88
|
+
outputDir: getCustomExportsDir({ outDir, isServer }),
|
|
89
|
+
config: config?.exports?.custom ?? {}
|
|
90
|
+
});
|
|
63
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
92
|
0 && (module.exports = {
|
|
65
93
|
getArchitectureExportPath,
|
|
94
|
+
getCustomExportsDir,
|
|
95
|
+
hasCustomExports,
|
|
66
96
|
isCatalogAuthEnabled,
|
|
67
97
|
resolveArchitectureExport,
|
|
68
|
-
|
|
98
|
+
resolveCustomExports,
|
|
99
|
+
writeArchitectureExport,
|
|
100
|
+
writeCustomExportsToBuild
|
|
69
101
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _eventcatalog_exporters from '@eventcatalog/exporters';
|
|
2
|
+
import { CustomExportsConfig } from '@eventcatalog/exporters';
|
|
2
3
|
|
|
3
4
|
/** The part of eventcatalog.config.js that controls the architecture reference. */
|
|
4
5
|
interface ArchitectureExportConfig {
|
|
@@ -6,6 +7,7 @@ interface ArchitectureExportConfig {
|
|
|
6
7
|
html?: {
|
|
7
8
|
enabled?: boolean;
|
|
8
9
|
};
|
|
10
|
+
custom?: CustomExportsConfig;
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
@@ -44,5 +46,27 @@ declare const writeArchitectureExport: ({ projectDir, outDir, isServer, }: {
|
|
|
44
46
|
outDir: string;
|
|
45
47
|
isServer: boolean;
|
|
46
48
|
}) => Promise<_eventcatalog_exporters.WriteHtmlResult>;
|
|
49
|
+
/** Custom exports (exports/*.mdx) follow the same rule as the reference: on unless turned off, and opt-in with auth. */
|
|
50
|
+
declare const resolveCustomExports: (config: ArchitectureExportConfig | null | undefined, { authEnabled }: {
|
|
51
|
+
authEnabled: boolean;
|
|
52
|
+
}) => ArchitectureExportDecision;
|
|
53
|
+
/** Whether the catalog has any custom export files, so a catalog without them never hears about custom exports. */
|
|
54
|
+
declare const hasCustomExports: ({ projectDir, config, }: {
|
|
55
|
+
projectDir: string;
|
|
56
|
+
config: ArchitectureExportConfig | null | undefined;
|
|
57
|
+
}) => boolean;
|
|
58
|
+
declare const getCustomExportsDir: ({ outDir, isServer }: {
|
|
59
|
+
outDir: string;
|
|
60
|
+
isServer: boolean;
|
|
61
|
+
}) => string;
|
|
62
|
+
declare const writeCustomExportsToBuild: ({ projectDir, outDir, isServer, config, }: {
|
|
63
|
+
projectDir: string;
|
|
64
|
+
outDir: string;
|
|
65
|
+
isServer: boolean;
|
|
66
|
+
config: ArchitectureExportConfig | null | undefined;
|
|
67
|
+
}) => Promise<{
|
|
68
|
+
written: _eventcatalog_exporters.WrittenCustomExport[];
|
|
69
|
+
failed: _eventcatalog_exporters.CustomExportFailure[];
|
|
70
|
+
}>;
|
|
47
71
|
|
|
48
|
-
export { type ArchitectureExportConfig, type ArchitectureExportDecision, getArchitectureExportPath, isCatalogAuthEnabled, resolveArchitectureExport, writeArchitectureExport };
|
|
72
|
+
export { type ArchitectureExportConfig, type ArchitectureExportDecision, getArchitectureExportPath, getCustomExportsDir, hasCustomExports, isCatalogAuthEnabled, resolveArchitectureExport, resolveCustomExports, writeArchitectureExport, writeCustomExportsToBuild };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _eventcatalog_exporters from '@eventcatalog/exporters';
|
|
2
|
+
import { CustomExportsConfig } from '@eventcatalog/exporters';
|
|
2
3
|
|
|
3
4
|
/** The part of eventcatalog.config.js that controls the architecture reference. */
|
|
4
5
|
interface ArchitectureExportConfig {
|
|
@@ -6,6 +7,7 @@ interface ArchitectureExportConfig {
|
|
|
6
7
|
html?: {
|
|
7
8
|
enabled?: boolean;
|
|
8
9
|
};
|
|
10
|
+
custom?: CustomExportsConfig;
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
@@ -44,5 +46,27 @@ declare const writeArchitectureExport: ({ projectDir, outDir, isServer, }: {
|
|
|
44
46
|
outDir: string;
|
|
45
47
|
isServer: boolean;
|
|
46
48
|
}) => Promise<_eventcatalog_exporters.WriteHtmlResult>;
|
|
49
|
+
/** Custom exports (exports/*.mdx) follow the same rule as the reference: on unless turned off, and opt-in with auth. */
|
|
50
|
+
declare const resolveCustomExports: (config: ArchitectureExportConfig | null | undefined, { authEnabled }: {
|
|
51
|
+
authEnabled: boolean;
|
|
52
|
+
}) => ArchitectureExportDecision;
|
|
53
|
+
/** Whether the catalog has any custom export files, so a catalog without them never hears about custom exports. */
|
|
54
|
+
declare const hasCustomExports: ({ projectDir, config, }: {
|
|
55
|
+
projectDir: string;
|
|
56
|
+
config: ArchitectureExportConfig | null | undefined;
|
|
57
|
+
}) => boolean;
|
|
58
|
+
declare const getCustomExportsDir: ({ outDir, isServer }: {
|
|
59
|
+
outDir: string;
|
|
60
|
+
isServer: boolean;
|
|
61
|
+
}) => string;
|
|
62
|
+
declare const writeCustomExportsToBuild: ({ projectDir, outDir, isServer, config, }: {
|
|
63
|
+
projectDir: string;
|
|
64
|
+
outDir: string;
|
|
65
|
+
isServer: boolean;
|
|
66
|
+
config: ArchitectureExportConfig | null | undefined;
|
|
67
|
+
}) => Promise<{
|
|
68
|
+
written: _eventcatalog_exporters.WrittenCustomExport[];
|
|
69
|
+
failed: _eventcatalog_exporters.CustomExportFailure[];
|
|
70
|
+
}>;
|
|
47
71
|
|
|
48
|
-
export { type ArchitectureExportConfig, type ArchitectureExportDecision, getArchitectureExportPath, isCatalogAuthEnabled, resolveArchitectureExport, writeArchitectureExport };
|
|
72
|
+
export { type ArchitectureExportConfig, type ArchitectureExportDecision, getArchitectureExportPath, getCustomExportsDir, hasCustomExports, isCatalogAuthEnabled, resolveArchitectureExport, resolveCustomExports, writeArchitectureExport, writeCustomExportsToBuild };
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getArchitectureExportPath,
|
|
3
|
+
getCustomExportsDir,
|
|
4
|
+
hasCustomExports,
|
|
3
5
|
isCatalogAuthEnabled,
|
|
4
6
|
resolveArchitectureExport,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
resolveCustomExports,
|
|
8
|
+
writeArchitectureExport,
|
|
9
|
+
writeCustomExportsToBuild
|
|
10
|
+
} from "./chunk-IR5MKGKS.js";
|
|
7
11
|
export {
|
|
8
12
|
getArchitectureExportPath,
|
|
13
|
+
getCustomExportsDir,
|
|
14
|
+
hasCustomExports,
|
|
9
15
|
isCatalogAuthEnabled,
|
|
10
16
|
resolveArchitectureExport,
|
|
11
|
-
|
|
17
|
+
resolveCustomExports,
|
|
18
|
+
writeArchitectureExport,
|
|
19
|
+
writeCustomExportsToBuild
|
|
12
20
|
};
|
|
@@ -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") {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// src/architecture-export.ts
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { DEFAULT_CUSTOM_EXPORTS_DIR, writeCustomExports, writeHtml } from "@eventcatalog/exporters";
|
|
5
|
+
var isCatalogAuthEnabled = ({
|
|
6
|
+
config,
|
|
7
|
+
projectDir,
|
|
8
|
+
isServer
|
|
9
|
+
}) => Boolean(config?.auth?.enabled) && isServer && fs.existsSync(path.join(projectDir, "eventcatalog.auth.js"));
|
|
10
|
+
var resolveArchitectureExport = (config, { authEnabled }) => {
|
|
11
|
+
const enabled = config?.exports?.html?.enabled;
|
|
12
|
+
if (enabled === false) return { enabled: false, reason: "disabled" };
|
|
13
|
+
if (authEnabled && enabled !== true) return { enabled: false, reason: "auth" };
|
|
14
|
+
return { enabled: true };
|
|
15
|
+
};
|
|
16
|
+
var getArchitectureExportPath = ({ outDir, isServer }) => path.join(outDir, isServer ? "client" : "", "architecture.html");
|
|
17
|
+
var writeArchitectureExport = ({
|
|
18
|
+
projectDir,
|
|
19
|
+
outDir,
|
|
20
|
+
isServer
|
|
21
|
+
}) => writeHtml({
|
|
22
|
+
dir: projectDir,
|
|
23
|
+
outputPath: getArchitectureExportPath({ outDir, isServer }),
|
|
24
|
+
regenerateCommand: "npx eventcatalog build"
|
|
25
|
+
});
|
|
26
|
+
var resolveCustomExports = (config, { authEnabled }) => {
|
|
27
|
+
const enabled = config?.exports?.custom?.enabled;
|
|
28
|
+
if (enabled === false) return { enabled: false, reason: "disabled" };
|
|
29
|
+
if (authEnabled && enabled !== true) return { enabled: false, reason: "auth" };
|
|
30
|
+
return { enabled: true };
|
|
31
|
+
};
|
|
32
|
+
var hasCustomExports = ({
|
|
33
|
+
projectDir,
|
|
34
|
+
config
|
|
35
|
+
}) => {
|
|
36
|
+
const folder = path.join(projectDir, config?.exports?.custom?.dir || DEFAULT_CUSTOM_EXPORTS_DIR);
|
|
37
|
+
return fs.existsSync(folder) && fs.readdirSync(folder).some((name) => /\.mdx?$/i.test(name));
|
|
38
|
+
};
|
|
39
|
+
var getCustomExportsDir = ({ outDir, isServer }) => path.join(outDir, isServer ? "client" : "", "exports");
|
|
40
|
+
var writeCustomExportsToBuild = ({
|
|
41
|
+
projectDir,
|
|
42
|
+
outDir,
|
|
43
|
+
isServer,
|
|
44
|
+
config
|
|
45
|
+
}) => writeCustomExports({
|
|
46
|
+
dir: projectDir,
|
|
47
|
+
outputDir: getCustomExportsDir({ outDir, isServer }),
|
|
48
|
+
config: config?.exports?.custom ?? {}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
isCatalogAuthEnabled,
|
|
53
|
+
resolveArchitectureExport,
|
|
54
|
+
getArchitectureExportPath,
|
|
55
|
+
writeArchitectureExport,
|
|
56
|
+
resolveCustomExports,
|
|
57
|
+
hasCustomExports,
|
|
58
|
+
getCustomExportsDir,
|
|
59
|
+
writeCustomExportsToBuild
|
|
60
|
+
};
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -975,7 +975,7 @@ See the [LLMs documentation](/docs/development/ask-your-architecture/llms.txt) f
|
|
|
975
975
|
- Type: `object`
|
|
976
976
|
- Default: `{ enabled: true }` (`false` when your catalog uses authentication)
|
|
977
977
|
|
|
978
|
-
Controls the [architecture reference](/docs/development/
|
|
978
|
+
Controls the [architecture reference](/docs/development/export/architecture-reference): your whole catalog as one HTML file, written to `architecture.html` in your build output on every build.
|
|
979
979
|
|
|
980
980
|
```js title="eventcatalog.config.js"
|
|
981
981
|
module.exports = {
|
|
@@ -989,6 +989,36 @@ module.exports = {
|
|
|
989
989
|
|
|
990
990
|
Catalogs with authentication only get the reference when `enabled` is `true`, because files in the build output are served without the authentication checks.
|
|
991
991
|
|
|
992
|
+
### `exports.custom` {#exports.custom}
|
|
993
|
+
|
|
994
|
+
<AddedIn version="5.2.0" />
|
|
995
|
+
|
|
996
|
+
- Type: `object`
|
|
997
|
+
- Default: `{ enabled: true }` (`false` when your catalog uses authentication)
|
|
998
|
+
|
|
999
|
+
Controls [custom exports](/docs/development/export/custom-exports) (see the [reference](/docs/development/export/reference#exports-custom)): the parts of your catalog you choose for partners, a regulator or another team, each written to `exports/<id>.html` in your build output on every build. Custom exports are only written when your catalog has custom export files.
|
|
1000
|
+
|
|
1001
|
+
| Option | Type | Description |
|
|
1002
|
+
| --- | --- | --- |
|
|
1003
|
+
| `enabled` | `boolean` | Write the custom exports when you build. |
|
|
1004
|
+
| `dir` | `string` | The folder with your custom export files. Defaults to `exports`. |
|
|
1005
|
+
| `only` | `string[]` | Build only these custom exports, by id. |
|
|
1006
|
+
| `defaults.hide` | `string[]` | The fields every custom export leaves out, unless it sets its own `hide`. Defaults to `['owners', 'repository', 'contacts', 'docs']`. |
|
|
1007
|
+
| `defaults.references` | `string` | What every custom export shows for links to resources outside it, unless it sets its own: `omit` (the default), `name-only` or `include`. |
|
|
1008
|
+
| `neverExport` | `object[]` | Resources no custom export may show, whatever it includes. Takes [selectors](/docs/development/export/reference#selectors), by id or by custom property. |
|
|
1009
|
+
|
|
1010
|
+
```js title="eventcatalog.config.js"
|
|
1011
|
+
module.exports = {
|
|
1012
|
+
exports: {
|
|
1013
|
+
custom: {
|
|
1014
|
+
only: ['partner-payments'],
|
|
1015
|
+
defaults: { references: 'name-only' },
|
|
1016
|
+
neverExport: [{ service: 'fraud-detection' }, { 'x-internal': true }],
|
|
1017
|
+
},
|
|
1018
|
+
},
|
|
1019
|
+
};
|
|
1020
|
+
```
|
|
1021
|
+
|
|
992
1022
|
### `fullCatalogAPIEnabled` {#fullCatalogAPIEnabled}
|
|
993
1023
|
|
|
994
1024
|
<AddedIn version="3.10.2" />
|
|
@@ -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.
|
|
@@ -167,10 +167,57 @@ const { tier, scrumMasters = [] } = Astro.props;
|
|
|
167
167
|
|
|
168
168
|
Read [Pass data into components](/docs/development/components/custom-components/pass-data-into-components) to learn more about using resource frontmatter with your own components.
|
|
169
169
|
|
|
170
|
+
## Choose what goes in a custom export
|
|
171
|
+
|
|
172
|
+
<AddedIn version="5.2.0" />
|
|
173
|
+
|
|
174
|
+
[Custom exports](/docs/development/export/custom-exports) are parts of your catalog exported for people outside your teams. Their `include` and `exclude` can match resources by custom property, so resources can opt in (or out) from their own frontmatter:
|
|
175
|
+
|
|
176
|
+
```mdx title="exports/partners.mdx"
|
|
177
|
+
---
|
|
178
|
+
title: Acme for partners
|
|
179
|
+
include:
|
|
180
|
+
- x-public: true
|
|
181
|
+
exclude:
|
|
182
|
+
- x-data-classification: [confidential, restricted]
|
|
183
|
+
---
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The custom properties choose what's in the export, but they aren't shown in it. Read [custom exports](/docs/development/export/custom-exports#by-custom-property) for how values are matched.
|
|
187
|
+
|
|
188
|
+
## Find resources by custom property
|
|
189
|
+
|
|
190
|
+
Use `getResourcesByProperty` in the [SDK](/docs/sdk) to find the resources with a custom property, optionally with a given value:
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
import utils from '@eventcatalog/sdk';
|
|
194
|
+
|
|
195
|
+
const { getResourcesByProperty } = utils('/path/to/eventcatalog');
|
|
196
|
+
|
|
197
|
+
// Everything with x-operational-tier
|
|
198
|
+
await getResourcesByProperty('x-operational-tier');
|
|
199
|
+
|
|
200
|
+
// The latest tier 1 services
|
|
201
|
+
await getResourcesByProperty('x-operational-tier', { equals: 1, types: ['service'], latestOnly: true });
|
|
202
|
+
|
|
203
|
+
// Resources classified as confidential or restricted
|
|
204
|
+
await getResourcesByProperty('x-data-classification', { in: ['confidential', 'restricted'] });
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Each result has the resource's `type`, `id`, `version`, the property's `value`, the `path` to its file, and whether it's the `latest` version. Values are compared as text (`1` matches `'1'`), and a list matches when any of its items does.
|
|
208
|
+
|
|
209
|
+
The SDK reads your catalog's frontmatter once and keeps it in memory, so repeated lookups don't read any files.
|
|
210
|
+
|
|
211
|
+
You can run it from the [CLI](/docs/cli) too:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npx @eventcatalog/cli getResourcesByProperty "x-operational-tier" '{"equals":1}'
|
|
215
|
+
```
|
|
216
|
+
|
|
170
217
|
## Naming and security guidance
|
|
171
218
|
|
|
172
219
|
- Use stable, descriptive names such as `x-operational-tier` or `x-data-classification`.
|
|
173
220
|
- Consider an organization namespace, such as `x-acme-cost-centre`, when properties may be shared across tools.
|
|
174
221
|
- Keep the meaning and expected value type consistent across resources.
|
|
175
222
|
- Do not store secrets, credentials, or private tokens in custom properties. Resource frontmatter is catalog content and may be included in generated output.
|
|
176
|
-
- Custom properties are stored and rendered, but EventCatalog does not automatically use them for relationships, diagrams, search behavior, or validation beyond the `x-*` naming requirement.
|
|
223
|
+
- Custom properties are stored and rendered, but EventCatalog does not automatically use them for relationships, diagrams, search behavior, or validation beyond the `x-*` naming requirement. [Custom exports](/docs/development/export/custom-exports) use them only when an export's selectors name them.
|
|
@@ -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
|
```
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
keywords:
|
|
4
|
+
- Export EventCatalog
|
|
5
|
+
- Export architecture documentation
|
|
6
|
+
- Share architecture
|
|
7
|
+
- Single HTML file
|
|
8
|
+
- Partner documentation
|
|
9
|
+
sidebar_label: Introduction
|
|
10
|
+
title: Export your catalog
|
|
11
|
+
description: Share your architecture with people who can't open your catalog, as one self-contained HTML file. Export all of it, or just the part someone needs.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
15
|
+
|
|
16
|
+
<AddedIn version="5.1.0" />
|
|
17
|
+
|
|
18
|
+
Some people need to understand your architecture but can't open your catalog: a partner integrating with your services, an auditor, the team at a company you've acquired, a contractor without access to your network.
|
|
19
|
+
|
|
20
|
+
Exporting your catalog gives them **one self-contained HTML file**. It doesn't need a server and there's nothing to sign in to, so you can attach it to an email, add it to a design review, keep it with an audit, or host it next to your catalog.
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
[See the export of our demo catalog](https://demo.eventcatalog.dev/architecture.html)
|
|
25
|
+
|
|
26
|
+
## Two ways to export
|
|
27
|
+
|
|
28
|
+
| | [Architecture reference](/docs/development/export/architecture-reference) | [Custom export](/docs/development/export/custom-exports) |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| **What's in it** | Your whole catalog | The part of your catalog you choose, with your own introduction |
|
|
31
|
+
| **Who it's for** | People who should see everything: your teams in a design review, an architecture audit, an AI agent | People who need part of it: partners, a regulator, the team taking over a domain |
|
|
32
|
+
| **How you make it** | Nothing to set up | A file in your catalog's `exports` folder that says what's in it |
|
|
33
|
+
| **Where it's written** | `architecture.html` | `exports/<id>.html` |
|
|
34
|
+
|
|
35
|
+
You can have both: one reference, and as many custom exports as you have audiences.
|
|
36
|
+
|
|
37
|
+
## What's in the file
|
|
38
|
+
|
|
39
|
+
Both are the same kind of file:
|
|
40
|
+
|
|
41
|
+
- **An overview**, with how many of each resource it documents (and, for a custom export, its title, who it's for and its introduction).
|
|
42
|
+
- **A section for every resource**, with its summary, badges and documentation (including mermaid diagrams).
|
|
43
|
+
- **Relationships on every section**: who produces and consumes a message, what a service sends and receives, which services read and write a data store, what lives inside a domain or system. Every relationship is a link.
|
|
44
|
+
- **Message attributes** from your JSON Schema, Avro and Protobuf schemas, with an example payload, a TypeScript type and the raw schema.
|
|
45
|
+
- **Your specifications** (OpenAPI, AsyncAPI and GraphQL), which readers can view and download.
|
|
46
|
+
- **Flows**, step by step, with every resource each step touches.
|
|
47
|
+
- **Search** across the file (press `⌘K` or `Ctrl+K`), a sidebar filter, and light and dark themes.
|
|
48
|
+
|
|
49
|
+
Only the latest version of each resource is included.
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## Written on every build
|
|
54
|
+
|
|
55
|
+
You don't have to remember to export anything. Every time you build your catalog, EventCatalog writes the reference and your custom exports to the build output:
|
|
56
|
+
|
|
57
|
+
| File | Static build | [Server mode](/docs/development/deployment/build-ssr-mode) | Hosted at |
|
|
58
|
+
| --- | --- | --- | --- |
|
|
59
|
+
| Architecture reference | `dist/architecture.html` | `dist/client/architecture.html` | `/architecture.html` |
|
|
60
|
+
| Custom exports | `dist/exports/<id>.html` | `dist/client/exports/<id>.html` | `/exports/<id>.html` |
|
|
61
|
+
|
|
62
|
+
Because they're written from your catalog on every build, a link you shared last month still shows what's true today.
|
|
63
|
+
|
|
64
|
+
To export without building your catalog, use the [`export` command](/docs/cli/cli-export) of the [EventCatalog CLI](/docs/cli):
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# The whole catalog
|
|
68
|
+
npx @eventcatalog/cli export --format html
|
|
69
|
+
|
|
70
|
+
# One custom export
|
|
71
|
+
npx @eventcatalog/cli export partner-payments
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Catalogs with authentication
|
|
75
|
+
|
|
76
|
+
If your catalog uses [authentication](/docs/development/authentication/introduction), nothing is exported when you build unless you turn it on. Files in the build output are served without the authentication checks, so anyone who knows the URL could read them.
|
|
77
|
+
|
|
78
|
+
To export anyway, set `exports.html.enabled` (for the reference) or `exports.custom.enabled` (for custom exports) to `true` in `eventcatalog.config.js`. You can always export with the CLI and share the file yourself.
|
|
79
|
+
|
|
80
|
+
## Sharing an export
|
|
81
|
+
|
|
82
|
+
Exports use the `title`, `organizationName` and `logo` from your `eventcatalog.config.js` file. When you share a link to a hosted export in Slack, Teams or on social media, the preview shows the catalog's name (or the export's title) and what it documents.
|
|
83
|
+
|
|
84
|
+
Each file shows when it was generated.
|
|
85
|
+
|
|
86
|
+
## Next steps
|
|
87
|
+
|
|
88
|
+
- [Export your whole catalog](/docs/development/export/architecture-reference) as an architecture reference.
|
|
89
|
+
- [Create a custom export](/docs/development/export/custom-exports) for partners, a regulator or another team.
|
|
90
|
+
- See the [reference](/docs/development/export/reference) for every field, option and command.
|
|
@@ -1,40 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
-
sidebar_position:
|
|
2
|
+
sidebar_position: 2
|
|
3
3
|
keywords:
|
|
4
4
|
- EventCatalog architecture reference
|
|
5
5
|
- Export architecture documentation
|
|
6
6
|
- Single HTML file
|
|
7
|
-
|
|
8
|
-
sidebar_label: Architecture Reference
|
|
7
|
+
sidebar_label: Architecture reference
|
|
9
8
|
title: Architecture reference
|
|
10
|
-
description: Export your whole catalog as one self-contained HTML file
|
|
9
|
+
description: Export your whole catalog as one self-contained HTML file, on every build or with the CLI.
|
|
11
10
|
---
|
|
12
11
|
|
|
13
12
|
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
14
13
|
|
|
15
14
|
<AddedIn version="5.1.0" />
|
|
16
15
|
|
|
17
|
-
The architecture reference is your whole catalog in
|
|
16
|
+
The architecture reference is your whole catalog in one HTML file. Every domain, system, service, message, channel, data store, flow, entity and team gets its own section, linked to everything it relates to.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Use it for people who should see all of your architecture: your own teams in a design review, an architecture audit, or an AI agent that needs the full picture. For anyone who should see only part of it, [create a custom export](/docs/development/export/custom-exports) instead.
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[See demo architecture reference](https://demo.eventcatalog.dev/architecture.html)
|
|
24
|
-
|
|
25
|
-
## What's in it
|
|
26
|
-
|
|
27
|
-
- **An overview of the catalog**, with how many of each resource it documents.
|
|
28
|
-
- **A section for every resource**, with its summary, owners, badges and documentation (including mermaid diagrams).
|
|
29
|
-
- **Relationships on every section**: who produces and consumes a message, what a service sends and receives, which services read and write a data store, what lives inside a domain or system. Every relationship is a link.
|
|
30
|
-
- **Message attributes** from your JSON Schema, Avro and Protobuf schemas, with an example payload, a TypeScript type and the raw schema.
|
|
31
|
-
- **Your specifications** (OpenAPI, AsyncAPI and GraphQL), which you can view and download from the page.
|
|
32
|
-
- **Flows**, step by step, with every resource each step touches.
|
|
33
|
-
- **Search** across the document (press `⌘K` or `Ctrl+K`), a sidebar filter, and light and dark themes.
|
|
34
|
-
|
|
35
|
-
Only the latest version of each resource is included. Resources marked as hidden are left out.
|
|
36
|
-
|
|
37
|
-

|
|
20
|
+
[See the demo architecture reference](https://demo.eventcatalog.dev/architecture.html)
|
|
38
21
|
|
|
39
22
|
## Get it on every build
|
|
40
23
|
|
|
@@ -88,8 +71,4 @@ For example, to export the reference in a CI pipeline and publish it as a build
|
|
|
88
71
|
npx @eventcatalog/cli export --format html --output reports/architecture.html --no-open
|
|
89
72
|
```
|
|
90
73
|
|
|
91
|
-
## Sharing the reference
|
|
92
|
-
|
|
93
|
-
The reference uses the `title`, `organizationName` and `logo` from your `eventcatalog.config.js` file. When you share a link to a hosted reference in Slack, Teams or on social media, the preview shows the catalog's name and what it documents.
|
|
94
|
-
|
|
95
74
|
The file shows when it was generated, and the command to generate it again.
|