@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.
Files changed (68) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/architecture-export.cjs +34 -2
  6. package/dist/architecture-export.d.cts +25 -1
  7. package/dist/architecture-export.d.ts +25 -1
  8. package/dist/architecture-export.js +11 -3
  9. package/dist/{chunk-DJCOJ77J.js → chunk-7RJN4FNG.js} +1 -1
  10. package/dist/{chunk-UCUZ44U2.js → chunk-HVCPU4V3.js} +1 -1
  11. package/dist/chunk-IR5MKGKS.js +60 -0
  12. package/dist/{chunk-BAUH53EV.js → chunk-MESHMXLR.js} +1 -1
  13. package/dist/{chunk-NJTLAFFT.js → chunk-OVEXZEJJ.js} +1 -1
  14. package/dist/{chunk-GKEHJQ5K.js → chunk-QSD6WMYE.js} +1 -1
  15. package/dist/{chunk-BEBDEEDY.js → chunk-VEQLCFU6.js} +1 -1
  16. package/dist/constants.cjs +1 -1
  17. package/dist/constants.js +1 -1
  18. package/dist/docs/api/02-config.md +31 -1
  19. package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +1 -1
  20. package/dist/docs/development/bring-your-own-documentation/_category_.json +1 -1
  21. package/dist/docs/development/customization/08-custom-properties.md +48 -1
  22. package/dist/docs/development/developer-tools/api-catalog.md +0 -2
  23. package/dist/docs/development/export/01-introduction.md +90 -0
  24. package/dist/docs/development/{guides/96-architecture-reference.md → export/02-architecture-reference.md} +6 -27
  25. package/dist/docs/development/export/03-custom-exports.md +257 -0
  26. package/dist/docs/development/export/04-reference.md +383 -0
  27. package/dist/docs/development/export/_category_.json +12 -0
  28. package/dist/docs/development/guides/owners/05-teams-reference.md +0 -12
  29. package/dist/docs/development/guides/owners/06-users-reference.md +0 -12
  30. package/dist/docs/development/upgrading/v5.md +1 -1
  31. package/dist/eventcatalog.cjs +65 -2
  32. package/dist/eventcatalog.config.d.cts +28 -0
  33. package/dist/eventcatalog.config.d.ts +28 -0
  34. package/dist/eventcatalog.js +54 -14
  35. package/dist/federation/federate.js +3 -3
  36. package/dist/generate.cjs +1 -1
  37. package/dist/generate.js +3 -3
  38. package/dist/search-indexer.cjs +1 -1
  39. package/dist/search-indexer.js +1 -1
  40. package/dist/utils/cli-logger.cjs +1 -1
  41. package/dist/utils/cli-logger.js +2 -2
  42. package/eventcatalog/src/content.config.ts +0 -3
  43. package/eventcatalog/src/features/collections/resource-docs.ts +0 -1
  44. package/eventcatalog/src/features/mcp/mcp-scope.ts +2 -3
  45. package/eventcatalog/src/features/tools/catalog-tools.ts +6 -8
  46. package/eventcatalog/src/pages/api-catalog/specifications/[collection]/[id]/[version]/[specification].ts +2 -4
  47. package/eventcatalog/src/utils/collections/adrs.ts +0 -1
  48. package/eventcatalog/src/utils/collections/agents.ts +0 -1
  49. package/eventcatalog/src/utils/collections/channels.ts +0 -1
  50. package/eventcatalog/src/utils/collections/commands.ts +0 -1
  51. package/eventcatalog/src/utils/collections/containers.ts +0 -1
  52. package/eventcatalog/src/utils/collections/domains.ts +0 -2
  53. package/eventcatalog/src/utils/collections/entities.ts +0 -1
  54. package/eventcatalog/src/utils/collections/events.ts +0 -1
  55. package/eventcatalog/src/utils/collections/flows.ts +0 -2
  56. package/eventcatalog/src/utils/collections/owners.ts +1 -4
  57. package/eventcatalog/src/utils/collections/queries.ts +0 -1
  58. package/eventcatalog/src/utils/collections/resource-docs.ts +1 -5
  59. package/eventcatalog/src/utils/collections/resource-owners.ts +1 -2
  60. package/eventcatalog/src/utils/collections/services.ts +0 -1
  61. package/eventcatalog/src/utils/collections/systems.ts +0 -1
  62. package/eventcatalog/src/utils/collections/teams.ts +3 -6
  63. package/eventcatalog/src/utils/collections/users.ts +4 -8
  64. package/eventcatalog/src/utils/homepage-dashboard.ts +2 -3
  65. package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +2 -6
  66. package/package.json +5 -5
  67. package/dist/chunk-E6WTCJUL.js +0 -32
  68. package/dist/{chunk-QJ7KKN2D.js → chunk-NCEZDQSW.js} +7 -7
@@ -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, and hidden resources are not listed. Read more in [interactive diagrams and schemas](/docs/development/ask-your-architecture/mcp-server/getting-started#interactive-diagrams-and-schemas).
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
 
@@ -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.1.1";
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.hidden === true || data.draft) {
1717
+ if (data.draft) {
1718
1718
  return null;
1719
1719
  }
1720
1720
  if (segments[0] === "docs") {
@@ -1938,6 +1938,9 @@ ${errors.join("\n")}`);
1938
1938
  };
1939
1939
  };
1940
1940
 
1941
+ // src/eventcatalog.ts
1942
+ var import_exporters2 = require("@eventcatalog/exporters");
1943
+
1941
1944
  // src/architecture-export.ts
1942
1945
  var import_node_fs9 = __toESM(require("fs"), 1);
1943
1946
  var import_node_path13 = __toESM(require("path"), 1);
@@ -1963,6 +1966,30 @@ var writeArchitectureExport = ({
1963
1966
  outputPath: getArchitectureExportPath({ outDir, isServer }),
1964
1967
  regenerateCommand: "npx eventcatalog build"
1965
1968
  });
1969
+ var resolveCustomExports = (config, { authEnabled }) => {
1970
+ const enabled = config?.exports?.custom?.enabled;
1971
+ if (enabled === false) return { enabled: false, reason: "disabled" };
1972
+ if (authEnabled && enabled !== true) return { enabled: false, reason: "auth" };
1973
+ return { enabled: true };
1974
+ };
1975
+ var hasCustomExports = ({
1976
+ projectDir,
1977
+ config
1978
+ }) => {
1979
+ const folder = import_node_path13.default.join(projectDir, config?.exports?.custom?.dir || import_exporters.DEFAULT_CUSTOM_EXPORTS_DIR);
1980
+ return import_node_fs9.default.existsSync(folder) && import_node_fs9.default.readdirSync(folder).some((name) => /\.mdx?$/i.test(name));
1981
+ };
1982
+ var getCustomExportsDir = ({ outDir, isServer }) => import_node_path13.default.join(outDir, isServer ? "client" : "", "exports");
1983
+ var writeCustomExportsToBuild = ({
1984
+ projectDir,
1985
+ outDir,
1986
+ isServer,
1987
+ config
1988
+ }) => (0, import_exporters.writeCustomExports)({
1989
+ dir: projectDir,
1990
+ outputDir: getCustomExportsDir({ outDir, isServer }),
1991
+ config: config?.exports?.custom ?? {}
1992
+ });
1966
1993
 
1967
1994
  // src/catalog-runtime.ts
1968
1995
  var import_node_fs10 = __toESM(require("fs"), 1);
@@ -3469,6 +3496,42 @@ program.command("build").description("Run build of EventCatalog").action(async (
3469
3496
  "export"
3470
3497
  );
3471
3498
  }
3499
+ if (hasCustomExports({ projectDir: dir, config })) {
3500
+ const folder = `${config?.exports?.custom?.dir || "exports"}/`;
3501
+ const customExports = resolveCustomExports(config, {
3502
+ authEnabled: isCatalogAuthEnabled({ config, projectDir: dir, isServer })
3503
+ });
3504
+ if (customExports.enabled) {
3505
+ try {
3506
+ const { written, failed } = await writeCustomExportsToBuild({
3507
+ projectDir: dir,
3508
+ outDir: import_node_path23.default.resolve(dir, await getProjectOutDir()),
3509
+ isServer,
3510
+ config
3511
+ });
3512
+ for (const exported of written) {
3513
+ logger.info(
3514
+ `Wrote the custom export "${exported.spec.title}" to ${import_node_path23.default.relative(dir, exported.path)} (${(0, import_exporters2.summariseCustomExportReport)(exported.report)})`,
3515
+ "export"
3516
+ );
3517
+ if (exported.report.unmatched.length)
3518
+ logger.warning(
3519
+ `${exported.spec.file}: nothing in the catalog matches ${exported.report.unmatched.map((u) => `${u.field} ${u.selector} (${u.reason})`).join(", ")}`,
3520
+ "export"
3521
+ );
3522
+ }
3523
+ for (const failure of failed)
3524
+ logger.warning(`Skipped the custom export ${failure.file ?? `"${failure.id}"`}: ${failure.error.message}`, "export");
3525
+ } catch (err) {
3526
+ logger.warning(`Skipped the custom exports in ${folder}: ${err.message}`, "export");
3527
+ }
3528
+ } else if (customExports.reason === "auth") {
3529
+ logger.info(
3530
+ `Skipped the custom exports in ${folder} because auth is enabled and build output is served without it. Set exports.custom.enabled to true to publish them anyway.`,
3531
+ "export"
3532
+ );
3533
+ }
3534
+ }
3472
3535
  });
3473
3536
  var previewCatalog = async ({ command }) => {
3474
3537
  await runCommandWithFilteredOutput({
@@ -346,6 +346,34 @@ interface Config {
346
346
  html?: {
347
347
  enabled?: boolean;
348
348
  };
349
+ /**
350
+ * Custom exports: parts of the catalog chosen for people outside the team (partners, the public, a regulator). Each
351
+ * is a file in `exports/` (e.g. `exports/partner-payments.mdx`) whose frontmatter says what it includes and whose
352
+ * body is its introduction, written to `exports/<id>.html` in the build output. Catalogs with auth must set
353
+ * `enabled: true`, because build output is served without auth.
354
+ */
355
+ custom?: {
356
+ /** Write the custom exports on build. @default true */
357
+ enabled?: boolean;
358
+ /** The folder that holds the custom export files. @default 'exports' */
359
+ dir?: string;
360
+ /** Build only these custom exports (by id). */
361
+ only?: string[];
362
+ /** What every custom export starts from; its own frontmatter overrides it. */
363
+ defaults?: {
364
+ /** Fields left out of every resource. @default ['owners', 'repository', 'contacts', 'docs'] */
365
+ hide?: ('owners' | 'repository' | 'specifications' | 'examples' | 'docs' | 'contacts')[];
366
+ /** Pointers at resources outside a custom export: dropped, shown as names, or pulled in (one level). @default 'omit' */
367
+ references?: 'omit' | 'name-only' | 'include';
368
+ };
369
+ /**
370
+ * Resources no custom export may show, whatever it includes: by id, e.g. [{ service: 'FraudAPI' }], or by custom
371
+ * property, e.g. [{ 'x-internal': true }] or [{ 'x-data-classification': ['confidential', 'restricted'] }].
372
+ */
373
+ neverExport?: {
374
+ [key: string]: string | number | boolean | (string | number | boolean)[] | undefined;
375
+ }[];
376
+ };
349
377
  };
350
378
  logo?: {
351
379
  alt: string;
@@ -346,6 +346,34 @@ interface Config {
346
346
  html?: {
347
347
  enabled?: boolean;
348
348
  };
349
+ /**
350
+ * Custom exports: parts of the catalog chosen for people outside the team (partners, the public, a regulator). Each
351
+ * is a file in `exports/` (e.g. `exports/partner-payments.mdx`) whose frontmatter says what it includes and whose
352
+ * body is its introduction, written to `exports/<id>.html` in the build output. Catalogs with auth must set
353
+ * `enabled: true`, because build output is served without auth.
354
+ */
355
+ custom?: {
356
+ /** Write the custom exports on build. @default true */
357
+ enabled?: boolean;
358
+ /** The folder that holds the custom export files. @default 'exports' */
359
+ dir?: string;
360
+ /** Build only these custom exports (by id). */
361
+ only?: string[];
362
+ /** What every custom export starts from; its own frontmatter overrides it. */
363
+ defaults?: {
364
+ /** Fields left out of every resource. @default ['owners', 'repository', 'contacts', 'docs'] */
365
+ hide?: ('owners' | 'repository' | 'specifications' | 'examples' | 'docs' | 'contacts')[];
366
+ /** Pointers at resources outside a custom export: dropped, shown as names, or pulled in (one level). @default 'omit' */
367
+ references?: 'omit' | 'name-only' | 'include';
368
+ };
369
+ /**
370
+ * Resources no custom export may show, whatever it includes: by id, e.g. [{ service: 'FraudAPI' }], or by custom
371
+ * property, e.g. [{ 'x-internal': true }] or [{ 'x-data-classification': ['confidential', 'restricted'] }].
372
+ */
373
+ neverExport?: {
374
+ [key: string]: string | number | boolean | (string | number | boolean)[] | undefined;
375
+ }[];
376
+ };
349
377
  };
350
378
  logo?: {
351
379
  alt: string;
@@ -7,12 +7,12 @@ import {
7
7
  import "./chunk-CA4U2JP7.js";
8
8
  import {
9
9
  log_build_default
10
- } from "./chunk-BEBDEEDY.js";
10
+ } from "./chunk-VEQLCFU6.js";
11
11
  import {
12
12
  getLicenseStatus,
13
13
  printLicenseStatus
14
14
  } from "./chunk-AD7CL772.js";
15
- import "./chunk-UCUZ44U2.js";
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-QJ7KKN2D.js";
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-BAUH53EV.js";
42
+ } from "./chunk-MESHMXLR.js";
43
43
  import {
44
44
  logger
45
- } from "./chunk-NJTLAFFT.js";
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-DJCOJ77J.js";
51
+ } from "./chunk-7RJN4FNG.js";
52
52
  import {
53
53
  getEventCatalogUpdateMessage,
54
54
  resolveInstalledCoreVersion
@@ -57,10 +57,13 @@ import {
57
57
  watch
58
58
  } from "./chunk-U63GDPPY.js";
59
59
  import {
60
+ hasCustomExports,
60
61
  isCatalogAuthEnabled,
61
62
  resolveArchitectureExport,
62
- writeArchitectureExport
63
- } from "./chunk-E6WTCJUL.js";
63
+ resolveCustomExports,
64
+ writeArchitectureExport,
65
+ writeCustomExportsToBuild
66
+ } from "./chunk-IR5MKGKS.js";
64
67
  import {
65
68
  getAstroConfigPath
66
69
  } from "./chunk-VIJJ7JKH.js";
@@ -76,7 +79,7 @@ import {
76
79
  } from "./chunk-LFQJXLHG.js";
77
80
  import {
78
81
  VERSION
79
- } from "./chunk-GKEHJQ5K.js";
82
+ } from "./chunk-QSD6WMYE.js";
80
83
  import {
81
84
  getEventCatalogConfigFile,
82
85
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -645,6 +648,7 @@ async function buildFieldsIndex(catalogDir, outputDir) {
645
648
  }
646
649
 
647
650
  // src/eventcatalog.ts
651
+ import { summariseCustomExportReport } from "@eventcatalog/exporters";
648
652
  var currentDir = path2.dirname(fileURLToPath(import.meta.url));
649
653
  var astroCli = path2.join(path2.dirname(createRequire(import.meta.url).resolve("astro/package.json")), "bin/astro.mjs");
650
654
  var ASTRO_IN_FOREGROUND = { ASTRO_DEV_BACKGROUND: "1", ASTRO_PREVIEW_BACKGROUND: "1" };
@@ -1061,6 +1065,42 @@ program.command("build").description("Run build of EventCatalog").action(async (
1061
1065
  "export"
1062
1066
  );
1063
1067
  }
1068
+ if (hasCustomExports({ projectDir: dir, config })) {
1069
+ const folder = `${config?.exports?.custom?.dir || "exports"}/`;
1070
+ const customExports = resolveCustomExports(config, {
1071
+ authEnabled: isCatalogAuthEnabled({ config, projectDir: dir, isServer })
1072
+ });
1073
+ if (customExports.enabled) {
1074
+ try {
1075
+ const { written, failed } = await writeCustomExportsToBuild({
1076
+ projectDir: dir,
1077
+ outDir: path2.resolve(dir, await getProjectOutDir()),
1078
+ isServer,
1079
+ config
1080
+ });
1081
+ for (const exported of written) {
1082
+ logger.info(
1083
+ `Wrote the custom export "${exported.spec.title}" to ${path2.relative(dir, exported.path)} (${summariseCustomExportReport(exported.report)})`,
1084
+ "export"
1085
+ );
1086
+ if (exported.report.unmatched.length)
1087
+ logger.warning(
1088
+ `${exported.spec.file}: nothing in the catalog matches ${exported.report.unmatched.map((u) => `${u.field} ${u.selector} (${u.reason})`).join(", ")}`,
1089
+ "export"
1090
+ );
1091
+ }
1092
+ for (const failure of failed)
1093
+ logger.warning(`Skipped the custom export ${failure.file ?? `"${failure.id}"`}: ${failure.error.message}`, "export");
1094
+ } catch (err) {
1095
+ logger.warning(`Skipped the custom exports in ${folder}: ${err.message}`, "export");
1096
+ }
1097
+ } else if (customExports.reason === "auth") {
1098
+ logger.info(
1099
+ `Skipped the custom exports in ${folder} because auth is enabled and build output is served without it. Set exports.custom.enabled to true to publish them anyway.`,
1100
+ "export"
1101
+ );
1102
+ }
1103
+ }
1064
1104
  });
1065
1105
  var previewCatalog = async ({ command }) => {
1066
1106
  await runCommandWithFilteredOutput({
@@ -2,14 +2,14 @@ import {
2
2
  FederationConflictError,
3
3
  FederationDiagnosticError,
4
4
  federateCatalog
5
- } from "../chunk-QJ7KKN2D.js";
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.1.1";
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-BAUH53EV.js";
4
- import "./chunk-NJTLAFFT.js";
5
- import "./chunk-GKEHJQ5K.js";
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
@@ -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.hidden === true || data.draft) {
143
+ if (data.draft) {
144
144
  return null;
145
145
  }
146
146
  if (segments[0] === "docs") {
@@ -2,7 +2,7 @@ import {
2
2
  buildSearchIndex,
3
3
  collectSearchRecords,
4
4
  markdownToSearchText
5
- } from "./chunk-DJCOJ77J.js";
5
+ } from "./chunk-7RJN4FNG.js";
6
6
  export {
7
7
  buildSearchIndex,
8
8
  collectSearchRecords,
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.1.1";
39
+ var version = "5.2.1";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-NJTLAFFT.js";
4
- import "../chunk-GKEHJQ5K.js";
3
+ } from "../chunk-OVEXZEJJ.js";
4
+ import "../chunk-QSD6WMYE.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -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(),
@@ -10,7 +10,6 @@ export const resourceDocsSchema = z.object({
10
10
  title: z.string().optional(),
11
11
  summary: z.string().optional(),
12
12
  slug: z.string().optional(),
13
- hidden: z.boolean().optional(),
14
13
  });
15
14
 
16
15
  export const resourceDocCategoriesSchema = z.object({
@@ -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 || entry.data.hidden === true) return false;
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 || root.data.hidden === true) throw scopeNotFound(ref);
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
- .filter((resource: any) => resource.data.hidden !== true)
225
- .map((resource: any) => ({
226
- id: resource.data.id,
227
- version: resource.data.version,
228
- name: resource.data.name,
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
- const resources = [...services, ...domains].filter((resource) => resource.data.hidden !== true);
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 && item.data.hidden !== true);
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; hidden?: boolean };
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: { data: { hidden?: boolean }; filePath?: string }) =>
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>;