@eventcatalog/core 3.10.0 → 3.10.2

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "3.10.0";
40
+ var version = "3.10.2";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-UWWPTTHP.js";
4
- import "../chunk-JWOYBQ7B.js";
3
+ } from "../chunk-DGE5ITBR.js";
4
+ import "../chunk-K7EPHS7S.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "3.10.0";
109
+ var version = "3.10.2";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-PYGKP3YM.js";
4
- import "../chunk-UWWPTTHP.js";
3
+ } from "../chunk-QWSUFHCT.js";
4
+ import "../chunk-DGE5ITBR.js";
5
5
  import "../chunk-4UVFXLPI.js";
6
- import "../chunk-JWOYBQ7B.js";
6
+ import "../chunk-K7EPHS7S.js";
7
7
  import "../chunk-UPONRQSN.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-JWOYBQ7B.js";
3
+ } from "./chunk-K7EPHS7S.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-JWOYBQ7B.js";
3
+ } from "./chunk-K7EPHS7S.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-QCOWYJ2Z.js";
3
+ } from "./chunk-AL67CV2N.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.10.0";
2
+ var version = "3.10.2";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-UWWPTTHP.js";
3
+ } from "./chunk-DGE5ITBR.js";
4
4
  import {
5
5
  countResources,
6
6
  serializeCounts
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.10.0";
28
+ var version = "3.10.2";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-JWOYBQ7B.js";
3
+ } from "./chunk-K7EPHS7S.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
109
109
  var import_picocolors = __toESM(require("picocolors"), 1);
110
110
 
111
111
  // package.json
112
- var version = "3.10.0";
112
+ var version = "3.10.2";
113
113
 
114
114
  // src/constants.ts
115
115
  var VERSION = version;
@@ -121,6 +121,11 @@ interface Config {
121
121
  sidebar?: (ManualSideBarConfig | AutoGeneratedSideBarConfig)[];
122
122
  };
123
123
  api?: {
124
+ /**
125
+ * Enable or disable the /api/catalog endpoint that dumps the entire catalog as JSON.
126
+ * Disabling this can significantly reduce memory usage during builds for large catalogs (1000+ files).
127
+ * @default true
128
+ */
124
129
  fullCatalogAPIEnabled?: boolean;
125
130
  };
126
131
  changelog?: {
@@ -121,6 +121,11 @@ interface Config {
121
121
  sidebar?: (ManualSideBarConfig | AutoGeneratedSideBarConfig)[];
122
122
  };
123
123
  api?: {
124
+ /**
125
+ * Enable or disable the /api/catalog endpoint that dumps the entire catalog as JSON.
126
+ * Disabling this can significantly reduce memory usage during builds for large catalogs (1000+ files).
127
+ * @default true
128
+ */
124
129
  fullCatalogAPIEnabled?: boolean;
125
130
  };
126
131
  changelog?: {
@@ -6,8 +6,8 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-PYGKP3YM.js";
10
- import "./chunk-UWWPTTHP.js";
9
+ } from "./chunk-QWSUFHCT.js";
10
+ import "./chunk-DGE5ITBR.js";
11
11
  import "./chunk-4UVFXLPI.js";
12
12
  import {
13
13
  runMigrations
@@ -22,13 +22,13 @@ import {
22
22
  } from "./chunk-5VBIXL6C.js";
23
23
  import {
24
24
  generate
25
- } from "./chunk-G42HAVR6.js";
25
+ } from "./chunk-IJKRHWWO.js";
26
26
  import {
27
27
  logger
28
- } from "./chunk-QCOWYJ2Z.js";
28
+ } from "./chunk-AL67CV2N.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-JWOYBQ7B.js";
31
+ } from "./chunk-K7EPHS7S.js";
32
32
  import "./chunk-UPONRQSN.js";
33
33
 
34
34
  // src/eventcatalog.ts
package/dist/generate.cjs CHANGED
@@ -73,7 +73,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
73
73
  var import_picocolors = __toESM(require("picocolors"), 1);
74
74
 
75
75
  // package.json
76
- var version = "3.10.0";
76
+ var version = "3.10.2";
77
77
 
78
78
  // src/constants.ts
79
79
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-G42HAVR6.js";
4
- import "./chunk-QCOWYJ2Z.js";
5
- import "./chunk-JWOYBQ7B.js";
3
+ } from "./chunk-IJKRHWWO.js";
4
+ import "./chunk-AL67CV2N.js";
5
+ import "./chunk-K7EPHS7S.js";
6
6
  import "./chunk-UPONRQSN.js";
7
7
  export {
8
8
  generate
@@ -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 = "3.10.0";
39
+ var version = "3.10.2";
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-QCOWYJ2Z.js";
4
- import "../chunk-JWOYBQ7B.js";
3
+ } from "../chunk-AL67CV2N.js";
4
+ import "../chunk-K7EPHS7S.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -2,18 +2,20 @@ import type { APIRoute } from 'astro';
2
2
  import utils from '@eventcatalog/sdk';
3
3
  import config from '@config';
4
4
 
5
+ const isFullCatalogAPIEnabled = config.api?.fullCatalogAPIEnabled ?? true;
6
+
5
7
  /**
6
- * Route the will dump the whole catalog as JSON (without markdown)
8
+ * Route that dumps the whole catalog as JSON (without markdown)
7
9
  * Experimental API
8
- * @param param0
9
- * @returns
10
+ *
11
+ * Can be disabled via eventcatalog.config.js:
12
+ * api: { fullCatalogAPIEnabled: false }
10
13
  */
11
- export const GET: APIRoute = async ({ params, request }) => {
12
- const isFullCatalogAPIEnabled = config.api?.fullCatalogAPIEnabled ?? true;
13
-
14
+ export const GET: APIRoute = async () => {
14
15
  if (!isFullCatalogAPIEnabled) {
15
16
  return new Response(JSON.stringify({ error: 'Full catalog API is not enabled' }), {
16
17
  status: 404,
18
+ headers: { 'Content-Type': 'application/json' },
17
19
  });
18
20
  }
19
21
 
@@ -26,3 +28,7 @@ export const GET: APIRoute = async ({ params, request }) => {
26
28
  },
27
29
  });
28
30
  };
31
+
32
+ // Only prerender if the API is enabled - this avoids loading all catalog data during build
33
+ // when the feature is disabled, saving memory for large catalogs
34
+ export const prerender = isFullCatalogAPIEnabled;
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "3.10.0",
9
+ "version": "3.10.2",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -55,7 +55,7 @@
55
55
  "@tanstack/react-table": "^8.17.3",
56
56
  "@xyflow/react": "^12.3.6",
57
57
  "ai": "^6.0.17",
58
- "astro": "^5.16.10",
58
+ "astro": "^5.16.16",
59
59
  "astro-compress": "^2.3.8",
60
60
  "astro-expressive-code": "^0.41.3",
61
61
  "astro-seo": "^0.8.4",
@@ -67,13 +67,13 @@
67
67
  "cross-env": "^7.0.3",
68
68
  "dagre": "^0.8.5",
69
69
  "date-fns": "^4.1.0",
70
- "diff": "^7.0.0",
70
+ "diff": "^8.0.3",
71
71
  "diff2html": "^3.4.48",
72
72
  "dotenv": "^16.5.0",
73
73
  "elkjs": "^0.10.0",
74
74
  "glob": "^10.5.0",
75
75
  "gray-matter": "^4.0.3",
76
- "hono": "^4.11.4",
76
+ "hono": "^4.11.7",
77
77
  "html-to-image": "^1.11.11",
78
78
  "js-yaml": "^4.1.1",
79
79
  "jsonpath": "^1.1.1",