@eventcatalog/core 3.10.1 → 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.
- 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-G7XOCNOX.js → chunk-AL67CV2N.js} +1 -1
- package/dist/{chunk-M3NSMBIJ.js → chunk-DGE5ITBR.js} +1 -1
- package/dist/{chunk-BR3CTGCW.js → chunk-IJKRHWWO.js} +1 -1
- package/dist/{chunk-SABEVBE7.js → chunk-K7EPHS7S.js} +1 -1
- package/dist/{chunk-2MSR3Y2A.js → chunk-QWSUFHCT.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +5 -0
- package/dist/eventcatalog.config.d.ts +5 -0
- package/dist/eventcatalog.js +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/pages/api/catalog.ts +12 -6
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QWSUFHCT.js";
|
|
4
|
+
import "../chunk-DGE5ITBR.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-K7EPHS7S.js";
|
|
7
7
|
import "../chunk-UPONRQSN.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -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.
|
|
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?: {
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
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-
|
|
25
|
+
} from "./chunk-IJKRHWWO.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AL67CV2N.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-K7EPHS7S.js";
|
|
32
32
|
import "./chunk-UPONRQSN.js";
|
|
33
33
|
|
|
34
34
|
// src/eventcatalog.ts
|
package/dist/generate.cjs
CHANGED
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-IJKRHWWO.js";
|
|
4
|
+
import "./chunk-AL67CV2N.js";
|
|
5
|
+
import "./chunk-K7EPHS7S.js";
|
|
6
6
|
import "./chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -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
|
|
8
|
+
* Route that dumps the whole catalog as JSON (without markdown)
|
|
7
9
|
* Experimental API
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
+
*
|
|
11
|
+
* Can be disabled via eventcatalog.config.js:
|
|
12
|
+
* api: { fullCatalogAPIEnabled: false }
|
|
10
13
|
*/
|
|
11
|
-
export const GET: APIRoute = async (
|
|
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;
|