@eventcatalog/core 2.53.0 → 2.54.0
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-UPR7DQB2.js → chunk-E4632BOL.js} +1 -1
- package/dist/{chunk-AYGHOQI3.js → chunk-EPCSIZTP.js} +1 -1
- package/dist/{chunk-LUUBKWYP.js → chunk-MCSZBCOG.js} +5 -0
- package/dist/{chunk-K5EGYLT5.js → chunk-TWNARJRZ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +19 -1
- package/dist/eventcatalog.js +19 -4
- package/dist/features.cjs +6 -0
- package/dist/features.d.cts +2 -1
- package/dist/features.d.ts +2 -1
- package/dist/features.js +3 -1
- package/eventcatalog/astro.config.mjs +0 -2
- package/eventcatalog/src/components/Header.astro +1 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +3 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +213 -139
- package/eventcatalog/src/components/Search/Search.astro +102 -0
- package/eventcatalog/src/components/Search/SearchModal.tsx +815 -0
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +1 -0
- package/package.json +3 -2
- package/eventcatalog/src/components/Search.astro +0 -128
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-TWNARJRZ.js";
|
|
4
|
+
import "../chunk-EPCSIZTP.js";
|
|
5
|
+
import "../chunk-E4632BOL.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
|
@@ -6,6 +6,10 @@ import {
|
|
|
6
6
|
import boxen from "boxen";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import fs from "node:fs";
|
|
9
|
+
var getProjectOutDir = async () => {
|
|
10
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
11
|
+
return config?.outDir || "dist";
|
|
12
|
+
};
|
|
9
13
|
var isOutputServer = async () => {
|
|
10
14
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
11
15
|
return config?.output === "server";
|
|
@@ -144,6 +148,7 @@ var isEventCatalogStarterEnabled = async (licenseKey) => {
|
|
|
144
148
|
};
|
|
145
149
|
|
|
146
150
|
export {
|
|
151
|
+
getProjectOutDir,
|
|
147
152
|
isOutputServer,
|
|
148
153
|
isAuthEnabled,
|
|
149
154
|
isBackstagePluginEnabled,
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
157
157
|
var import_os = __toESM(require("os"), 1);
|
|
158
158
|
|
|
159
159
|
// package.json
|
|
160
|
-
var version = "2.
|
|
160
|
+
var version = "2.54.0";
|
|
161
161
|
|
|
162
162
|
// src/constants.ts
|
|
163
163
|
var VERSION = version;
|
|
@@ -506,6 +506,10 @@ var import_boxen2 = __toESM(require("boxen"), 1);
|
|
|
506
506
|
var import_boxen = __toESM(require("boxen"), 1);
|
|
507
507
|
var import_node_path5 = require("path");
|
|
508
508
|
var import_node_fs4 = __toESM(require("fs"), 1);
|
|
509
|
+
var getProjectOutDir = async () => {
|
|
510
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
511
|
+
return config?.outDir || "dist";
|
|
512
|
+
};
|
|
509
513
|
var isOutputServer = async () => {
|
|
510
514
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
511
515
|
return config?.output === "server";
|
|
@@ -799,6 +803,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
799
803
|
const canEmbedPages = await isBackstagePluginEnabled();
|
|
800
804
|
const isEventCatalogStarter = await isEventCatalogStarterEnabled();
|
|
801
805
|
const isEventCatalogScale = await isEventCatalogScaleEnabled();
|
|
806
|
+
const isServerOutput = await isOutputServer();
|
|
802
807
|
await createAuthFileIfNotExists(isEventCatalogScale);
|
|
803
808
|
await log_build_default(dir, {
|
|
804
809
|
isEventCatalogStarterEnabled: isEventCatalogStarter,
|
|
@@ -819,6 +824,19 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
819
824
|
stdio: "inherit"
|
|
820
825
|
}
|
|
821
826
|
);
|
|
827
|
+
if (!isServerOutput) {
|
|
828
|
+
const outDir = await getProjectOutDir();
|
|
829
|
+
const windowsCommand2 = `npx -y pagefind --site ${outDir} --output-subdir ${dir}\\public\\pagefind`;
|
|
830
|
+
const unixCommand2 = `npx -y pagefind --site ${outDir} --output-subdir ${dir}/public/pagefind`;
|
|
831
|
+
const pagefindCommand = process.platform === "win32" ? windowsCommand2 : unixCommand2;
|
|
832
|
+
(0, import_node_child_process.execSync)(
|
|
833
|
+
`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} ${pagefindCommand}`,
|
|
834
|
+
{
|
|
835
|
+
cwd: dir,
|
|
836
|
+
stdio: "inherit"
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
}
|
|
822
840
|
});
|
|
823
841
|
var previewCatalog = ({
|
|
824
842
|
command,
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-XE6PFSH5.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-TWNARJRZ.js";
|
|
10
|
+
import "./chunk-EPCSIZTP.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
@@ -15,14 +15,15 @@ import {
|
|
|
15
15
|
import "./chunk-LDBRNJIL.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-E4632BOL.js";
|
|
19
19
|
import {
|
|
20
|
+
getProjectOutDir,
|
|
20
21
|
isAuthEnabled,
|
|
21
22
|
isBackstagePluginEnabled,
|
|
22
23
|
isEventCatalogScaleEnabled,
|
|
23
24
|
isEventCatalogStarterEnabled,
|
|
24
25
|
isOutputServer
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MCSZBCOG.js";
|
|
26
27
|
import {
|
|
27
28
|
generate
|
|
28
29
|
} from "./chunk-YEQVKHST.js";
|
|
@@ -192,6 +193,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
192
193
|
const canEmbedPages = await isBackstagePluginEnabled();
|
|
193
194
|
const isEventCatalogStarter = await isEventCatalogStarterEnabled();
|
|
194
195
|
const isEventCatalogScale = await isEventCatalogScaleEnabled();
|
|
196
|
+
const isServerOutput = await isOutputServer();
|
|
195
197
|
await createAuthFileIfNotExists(isEventCatalogScale);
|
|
196
198
|
await log_build_default(dir, {
|
|
197
199
|
isEventCatalogStarterEnabled: isEventCatalogStarter,
|
|
@@ -212,6 +214,19 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
212
214
|
stdio: "inherit"
|
|
213
215
|
}
|
|
214
216
|
);
|
|
217
|
+
if (!isServerOutput) {
|
|
218
|
+
const outDir = await getProjectOutDir();
|
|
219
|
+
const windowsCommand2 = `npx -y pagefind --site ${outDir} --output-subdir ${dir}\\public\\pagefind`;
|
|
220
|
+
const unixCommand2 = `npx -y pagefind --site ${outDir} --output-subdir ${dir}/public/pagefind`;
|
|
221
|
+
const pagefindCommand = process.platform === "win32" ? windowsCommand2 : unixCommand2;
|
|
222
|
+
execSync(
|
|
223
|
+
`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} ${pagefindCommand}`,
|
|
224
|
+
{
|
|
225
|
+
cwd: dir,
|
|
226
|
+
stdio: "inherit"
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}
|
|
215
230
|
});
|
|
216
231
|
var previewCatalog = ({
|
|
217
232
|
command,
|
package/dist/features.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/features.ts
|
|
31
31
|
var features_exports = {};
|
|
32
32
|
__export(features_exports, {
|
|
33
|
+
getProjectOutDir: () => getProjectOutDir,
|
|
33
34
|
isAuthEnabled: () => isAuthEnabled,
|
|
34
35
|
isBackstagePluginEnabled: () => isBackstagePluginEnabled,
|
|
35
36
|
isEventCatalogScaleEnabled: () => isEventCatalogScaleEnabled,
|
|
@@ -76,6 +77,10 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
76
77
|
// src/features.ts
|
|
77
78
|
var import_node_path2 = require("path");
|
|
78
79
|
var import_node_fs2 = __toESM(require("fs"), 1);
|
|
80
|
+
var getProjectOutDir = async () => {
|
|
81
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
82
|
+
return config?.outDir || "dist";
|
|
83
|
+
};
|
|
79
84
|
var isOutputServer = async () => {
|
|
80
85
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
81
86
|
return config?.output === "server";
|
|
@@ -214,6 +219,7 @@ var isEventCatalogStarterEnabled = async (licenseKey) => {
|
|
|
214
219
|
};
|
|
215
220
|
// Annotate the CommonJS export names for ESM import in node:
|
|
216
221
|
0 && (module.exports = {
|
|
222
|
+
getProjectOutDir,
|
|
217
223
|
isAuthEnabled,
|
|
218
224
|
isBackstagePluginEnabled,
|
|
219
225
|
isEventCatalogScaleEnabled,
|
package/dist/features.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
declare const getProjectOutDir: () => Promise<any>;
|
|
1
2
|
declare const isOutputServer: () => Promise<boolean>;
|
|
2
3
|
declare const isAuthEnabled: () => Promise<boolean>;
|
|
3
4
|
declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
4
5
|
declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
5
6
|
declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
6
7
|
|
|
7
|
-
export { isAuthEnabled, isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
|
|
8
|
+
export { getProjectOutDir, isAuthEnabled, isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
|
package/dist/features.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
declare const getProjectOutDir: () => Promise<any>;
|
|
1
2
|
declare const isOutputServer: () => Promise<boolean>;
|
|
2
3
|
declare const isAuthEnabled: () => Promise<boolean>;
|
|
3
4
|
declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
4
5
|
declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
5
6
|
declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
6
7
|
|
|
7
|
-
export { isAuthEnabled, isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
|
|
8
|
+
export { getProjectOutDir, isAuthEnabled, isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
|
package/dist/features.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getProjectOutDir,
|
|
2
3
|
isAuthEnabled,
|
|
3
4
|
isBackstagePluginEnabled,
|
|
4
5
|
isEventCatalogScaleEnabled,
|
|
5
6
|
isEventCatalogStarterEnabled,
|
|
6
7
|
isOutputServer
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MCSZBCOG.js";
|
|
8
9
|
import "./chunk-E7TXTI7G.js";
|
|
9
10
|
export {
|
|
11
|
+
getProjectOutDir,
|
|
10
12
|
isAuthEnabled,
|
|
11
13
|
isBackstagePluginEnabled,
|
|
12
14
|
isEventCatalogScaleEnabled,
|
|
@@ -2,7 +2,6 @@ import { defineConfig } from 'astro/config';
|
|
|
2
2
|
import tailwind from '@astrojs/tailwind';
|
|
3
3
|
import mdx from '@astrojs/mdx';
|
|
4
4
|
import react from '@astrojs/react';
|
|
5
|
-
import pagefind from "astro-pagefind";
|
|
6
5
|
import { mermaid } from "./src/remark-plugins/mermaid"
|
|
7
6
|
import { plantuml } from "./src/remark-plugins/plantuml"
|
|
8
7
|
import { join } from 'node:path';
|
|
@@ -76,7 +75,6 @@ export default defineConfig({
|
|
|
76
75
|
],
|
|
77
76
|
gfm: true,
|
|
78
77
|
}),
|
|
79
|
-
config.output !== 'server' && pagefind(),
|
|
80
78
|
config.output !== 'server' && compress && (await import("astro-compress")).default({
|
|
81
79
|
Logger: 0,
|
|
82
80
|
CSS: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import catalog from '@utils/eventcatalog-config/catalog';
|
|
3
|
-
import Search from '@components/Search.astro';
|
|
3
|
+
import Search from '@components/Search/Search.astro';
|
|
4
4
|
import { buildUrl } from '@utils/url-builder';
|
|
5
5
|
import { showEventCatalogBranding, showCustomBranding } from '@utils/feature';
|
|
6
6
|
import { getSession } from 'auth-astro/server';
|
|
@@ -32,6 +32,7 @@ interface Props {
|
|
|
32
32
|
linksToVisualiser?: boolean;
|
|
33
33
|
showSearch?: boolean;
|
|
34
34
|
showLegend?: boolean;
|
|
35
|
+
zoomOnScroll?: boolean;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
const {
|
|
@@ -45,6 +46,7 @@ const {
|
|
|
45
46
|
linksToVisualiser,
|
|
46
47
|
showSearch = true,
|
|
47
48
|
showLegend = true,
|
|
49
|
+
zoomOnScroll = false,
|
|
48
50
|
} = Astro.props;
|
|
49
51
|
|
|
50
52
|
let nodes = [],
|
|
@@ -136,6 +138,7 @@ if (collection === 'domains-entities') {
|
|
|
136
138
|
mode={mode}
|
|
137
139
|
showSearch={showSearch}
|
|
138
140
|
includeKey={showLegend}
|
|
141
|
+
zoomOnScroll={zoomOnScroll}
|
|
139
142
|
/>
|
|
140
143
|
</div>
|
|
141
144
|
|