@eventcatalog/core 4.11.2 → 4.12.0-beta.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 +17 -11
- package/dist/analytics/log-build.js +4 -4
- package/dist/astro-config-path.cjs +51 -0
- package/dist/astro-config-path.d.cts +6 -0
- package/dist/astro-config-path.d.ts +6 -0
- package/dist/astro-config-path.js +6 -0
- package/dist/catalog-runtime.cjs +136 -0
- package/dist/catalog-runtime.d.cts +12 -0
- package/dist/catalog-runtime.d.ts +12 -0
- package/dist/catalog-runtime.js +8 -0
- package/dist/{chunk-B7HCX5HM.js → chunk-3SJDIENM.js} +1 -1
- package/dist/{chunk-Z6OKCHWL.js → chunk-C326DCDM.js} +2 -2
- package/dist/{chunk-6U72KINX.js → chunk-DJCOJ77J.js} +1 -0
- package/dist/{chunk-LHR4G2UO.js → chunk-EEZXGNF6.js} +1 -1
- package/dist/{chunk-XMRPNDXB.js → chunk-FZEJ62MJ.js} +1 -1
- package/dist/{chunk-6QENHZZP.js → chunk-JE6RX7SJ.js} +11 -5
- package/dist/{chunk-2YJRF4ZX.js → chunk-RYPZGCRN.js} +1 -1
- package/dist/chunk-SAN4U2WU.js +96 -0
- package/dist/{chunk-LAWEGSJH.js → chunk-SETCQKS3.js} +1 -1
- package/dist/{chunk-AFPH6ERZ.js → chunk-TI3Y63NZ.js} +1 -1
- package/dist/chunk-U63GDPPY.js +14 -0
- package/dist/chunk-VIJJ7JKH.js +17 -0
- package/dist/{chunk-EGH3ALRY.js → chunk-ZER6HESL.js} +4 -4
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog-config-file-utils.cjs +13 -7
- package/dist/eventcatalog-config-file-utils.d.cts +86 -2
- package/dist/eventcatalog-config-file-utils.d.ts +86 -2
- package/dist/eventcatalog-config-file-utils.js +1 -1
- package/dist/eventcatalog.cjs +227 -561
- package/dist/eventcatalog.js +62 -71
- package/dist/features.cjs +10 -6
- package/dist/features.js +2 -2
- package/dist/federation/federate.cjs +110 -106
- package/dist/federation/federate.js +4 -4
- package/dist/generate.cjs +11 -7
- package/dist/generate.js +4 -4
- package/dist/resolve-catalog-dependencies.cjs +12 -8
- package/dist/resolve-catalog-dependencies.js +2 -2
- package/dist/runtime-dependencies/@ai-sdk__react.mjs +3 -0
- package/dist/runtime-dependencies/@astrojs__markdown-remark.mjs +3 -0
- package/dist/runtime-dependencies/@astrojs__mdx.mjs +3 -0
- package/dist/runtime-dependencies/@astrojs__node.mjs +3 -0
- package/dist/runtime-dependencies/@astrojs__react.mjs +3 -0
- package/dist/runtime-dependencies/@astrojs__rss.mjs +3 -0
- package/dist/runtime-dependencies/@asyncapi__avro-schema-parser.mjs +3 -0
- package/dist/runtime-dependencies/@asyncapi__parser.mjs +3 -0
- package/dist/runtime-dependencies/@asyncapi__react-component.mjs +3 -0
- package/dist/runtime-dependencies/@asyncapi__react-component__styles__default.min.css.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__providers__auth0.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__providers__github.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__providers__google.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__providers__microsoft-entra-id.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__providers__okta.mjs +3 -0
- package/dist/runtime-dependencies/@auth__core__types.mjs +3 -0
- package/dist/runtime-dependencies/@eventcatalog__license.mjs +3 -0
- package/dist/runtime-dependencies/@eventcatalog__linter.mjs +3 -0
- package/dist/runtime-dependencies/@eventcatalog__sdk.mjs +3 -0
- package/dist/runtime-dependencies/@eventcatalog__visualiser.mjs +3 -0
- package/dist/runtime-dependencies/@eventcatalog__visualiser__styles-core.css.mjs +3 -0
- package/dist/runtime-dependencies/@fontsource__inter.mjs +3 -0
- package/dist/runtime-dependencies/@fontsource__inter__400.css.mjs +3 -0
- package/dist/runtime-dependencies/@fontsource__inter__700.css.mjs +3 -0
- package/dist/runtime-dependencies/@headlessui__react.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__16__solid__EnvelopeIcon.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__20__solid.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__24__outline.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__24__outline__MagnifyingGlassIcon.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__24__outline__RectangleGroupIcon.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__24__outline__ServerIcon.mjs +3 -0
- package/dist/runtime-dependencies/@heroicons__react__24__solid.mjs +3 -0
- package/dist/runtime-dependencies/@iconify-json__logos.mjs +3 -0
- package/dist/runtime-dependencies/@mermaid-js__layout-elk.mjs +3 -0
- package/dist/runtime-dependencies/@mermaid-js__layout-elk__dist__mermaid-layout-elk.core.mjs.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__sdk.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__sdk__server__mcp.js.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__sdk__server__webStandardStreamableHttp.js.mjs +3 -0
- package/dist/runtime-dependencies/@nanostores__react.mjs +3 -0
- package/dist/runtime-dependencies/@parcel__watcher.mjs +3 -0
- package/dist/runtime-dependencies/@radix-ui__react-context-menu.mjs +3 -0
- package/dist/runtime-dependencies/@radix-ui__react-dialog.mjs +3 -0
- package/dist/runtime-dependencies/@radix-ui__react-dropdown-menu.mjs +3 -0
- package/dist/runtime-dependencies/@radix-ui__react-popover.mjs +3 -0
- package/dist/runtime-dependencies/@radix-ui__react-tooltip.mjs +3 -0
- package/dist/runtime-dependencies/@scalar__api-reference-react.mjs +3 -0
- package/dist/runtime-dependencies/@scalar__api-reference-react__style.css.mjs +3 -0
- package/dist/runtime-dependencies/@tailwindcss__typography.mjs +3 -0
- package/dist/runtime-dependencies/@tailwindcss__vite.mjs +3 -0
- package/dist/runtime-dependencies/@tanstack__react-table.mjs +3 -0
- package/dist/runtime-dependencies/@xyflow__react.mjs +3 -0
- package/dist/runtime-dependencies/@xyflow__react__dist__style.css.mjs +3 -0
- package/dist/runtime-dependencies/ai.mjs +3 -0
- package/dist/runtime-dependencies/astro-expressive-code.mjs +3 -0
- package/dist/runtime-dependencies/astro-expressive-code__components.mjs +3 -0
- package/dist/runtime-dependencies/astro-seo.mjs +3 -0
- package/dist/runtime-dependencies/astro.mjs +3 -0
- package/dist/runtime-dependencies/astro__assets__services__sharp.mjs +3 -0
- package/dist/runtime-dependencies/astro__config.mjs +3 -0
- package/dist/runtime-dependencies/astro__jsx-runtime.mjs +3 -0
- package/dist/runtime-dependencies/astro__loaders.mjs +3 -0
- package/dist/runtime-dependencies/astro__logger__node.mjs +3 -0
- package/dist/runtime-dependencies/astro__types.mjs +3 -0
- package/dist/runtime-dependencies/astro__zod.mjs +3 -0
- package/dist/runtime-dependencies/auth-astro.mjs +3 -0
- package/dist/runtime-dependencies/auth-astro__client.mjs +3 -0
- package/dist/runtime-dependencies/auth-astro__server.mjs +3 -0
- package/dist/runtime-dependencies/boxen.mjs +3 -0
- package/dist/runtime-dependencies/commander.mjs +3 -0
- package/dist/runtime-dependencies/cross-env.mjs +3 -0
- package/dist/runtime-dependencies/d3-drag.mjs +3 -0
- package/dist/runtime-dependencies/d3-force.mjs +3 -0
- package/dist/runtime-dependencies/d3-selection.mjs +3 -0
- package/dist/runtime-dependencies/d3-zoom.mjs +3 -0
- package/dist/runtime-dependencies/dagre.mjs +3 -0
- package/dist/runtime-dependencies/diff.mjs +3 -0
- package/dist/runtime-dependencies/diff2html.mjs +3 -0
- package/dist/runtime-dependencies/diff2html__bundles__css__diff2html.min.css.mjs +3 -0
- package/dist/runtime-dependencies/dotenv.mjs +3 -0
- package/dist/runtime-dependencies/elkjs.mjs +3 -0
- package/dist/runtime-dependencies/elkjs__lib__elk.bundled.js.mjs +3 -0
- package/dist/runtime-dependencies/glob.mjs +3 -0
- package/dist/runtime-dependencies/gray-matter.mjs +3 -0
- package/dist/runtime-dependencies/hono.mjs +3 -0
- package/dist/runtime-dependencies/html-to-image.mjs +3 -0
- package/dist/runtime-dependencies/js-yaml.mjs +3 -0
- package/dist/runtime-dependencies/jsonpath-plus.mjs +3 -0
- package/dist/runtime-dependencies/jsonwebtoken.mjs +3 -0
- package/dist/runtime-dependencies/lodash.debounce.mjs +3 -0
- package/dist/runtime-dependencies/lodash.merge.mjs +3 -0
- package/dist/runtime-dependencies/lucide-react.mjs +3 -0
- package/dist/runtime-dependencies/manifest.json +136 -0
- package/dist/runtime-dependencies/marked.mjs +3 -0
- package/dist/runtime-dependencies/mdast-util-find-and-replace.mjs +3 -0
- package/dist/runtime-dependencies/mermaid.mjs +3 -0
- package/dist/runtime-dependencies/minisearch.mjs +3 -0
- package/dist/runtime-dependencies/nanostores.mjs +3 -0
- package/dist/runtime-dependencies/pagefind.mjs +3 -0
- package/dist/runtime-dependencies/pako.mjs +3 -0
- package/dist/runtime-dependencies/parse5.mjs +3 -0
- package/dist/runtime-dependencies/picocolors.mjs +3 -0
- package/dist/runtime-dependencies/picomatch.mjs +3 -0
- package/dist/runtime-dependencies/react-dom.mjs +3 -0
- package/dist/runtime-dependencies/react-dom__client.mjs +3 -0
- package/dist/runtime-dependencies/react-dom__server.mjs +3 -0
- package/dist/runtime-dependencies/react-markdown.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__cjs__styles__prism.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__cjs__styles__prism__index.js.mjs +3 -0
- package/dist/runtime-dependencies/react.mjs +3 -0
- package/dist/runtime-dependencies/react__jsx-dev-runtime.mjs +3 -0
- package/dist/runtime-dependencies/react__jsx-runtime.mjs +3 -0
- package/dist/runtime-dependencies/recast.mjs +3 -0
- package/dist/runtime-dependencies/recast__parsers__babel.js.mjs +3 -0
- package/dist/runtime-dependencies/rehype-autolink-headings.mjs +3 -0
- package/dist/runtime-dependencies/rehype-expressive-code.mjs +3 -0
- package/dist/runtime-dependencies/rehype-expressive-code__hast.mjs +3 -0
- package/dist/runtime-dependencies/rehype-slug.mjs +3 -0
- package/dist/runtime-dependencies/remark-comment.mjs +3 -0
- package/dist/runtime-dependencies/remark-directive.mjs +3 -0
- package/dist/runtime-dependencies/remark-gfm.mjs +3 -0
- package/dist/runtime-dependencies/rimraf.mjs +3 -0
- package/dist/runtime-dependencies/semver.mjs +3 -0
- package/dist/runtime-dependencies/shelljs.mjs +3 -0
- package/dist/runtime-dependencies/sonner.mjs +3 -0
- package/dist/runtime-dependencies/sql.js.mjs +3 -0
- package/dist/runtime-dependencies/tailwindcss.mjs +3 -0
- package/dist/runtime-dependencies/typescript.mjs +3 -0
- package/dist/runtime-dependencies/unist-util-visit.mjs +3 -0
- package/dist/runtime-dependencies/update-notifier.mjs +3 -0
- package/dist/runtime-dependencies/uuid.mjs +3 -0
- package/dist/runtime-dependencies/zod.mjs +3 -0
- package/dist/runtime-dependencies/zod__v4.mjs +3 -0
- package/dist/search-indexer.cjs +1 -0
- package/dist/search-indexer.js +1 -1
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/dist/watcher.cjs +5 -204
- package/dist/watcher.js +1 -2
- package/eventcatalog/astro.config.mjs +66 -31
- package/eventcatalog/integrations/catalog-assets.mjs +204 -0
- package/eventcatalog/integrations/config-loader.mjs +85 -0
- package/eventcatalog/integrations/ecstudio-watcher.mjs +11 -9
- package/eventcatalog/integrations/eventcatalog-runtime.mjs +255 -0
- package/eventcatalog/integrations/expressive-code-config.mjs +6 -0
- package/eventcatalog/integrations/runtime-dependencies.mjs +49 -0
- package/eventcatalog/integrations/runtime-dependency-manifest.mjs +15 -0
- package/eventcatalog/integrations/runtime-paths.mjs +16 -0
- package/eventcatalog/src/content.config.ts +33 -46
- package/eventcatalog/src/enterprise/custom-pages/routes.ts +3 -2
- package/eventcatalog/src/enterprise/feature.ts +2 -1
- package/eventcatalog/src/enterprise/fields/field-indexer.ts +5 -2
- package/eventcatalog/src/enterprise/fields/pages/api/fields.ts +4 -3
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +32 -32
- package/eventcatalog/src/enterprise/mcp/mcp-auth.ts +1 -1
- package/eventcatalog/src/env.d.ts +7 -1
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +15 -3
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +1 -1
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/index.astro +2 -3
- package/eventcatalog/src/styles/tailwind.css +3 -0
- package/eventcatalog/src/utils/eventcatalog-config/source.ts +9 -0
- package/eventcatalog/src/utils/feature.ts +2 -1
- package/eventcatalog/tsconfig.json +1 -4
- package/package.json +16 -3
- package/dist/catalog-to-astro-content-directory.cjs +0 -382
- package/dist/catalog-to-astro-content-directory.d.cts +0 -3
- package/dist/catalog-to-astro-content-directory.d.ts +0 -3
- package/dist/catalog-to-astro-content-directory.js +0 -9
- package/dist/chunk-BWN544LB.js +0 -73
- package/dist/chunk-DHH5U5PF.js +0 -53
- package/dist/chunk-KLOHNCNF.js +0 -101
- package/dist/chunk-T4RVWPIQ.js +0 -85
- package/dist/chunk-T5IUG523.js +0 -54
- package/dist/chunk-W5JQON7Z.js +0 -117
- package/dist/copy-core.cjs +0 -88
- package/dist/copy-core.d.cts +0 -4
- package/dist/copy-core.d.ts +0 -4
- package/dist/copy-core.js +0 -8
- package/dist/core-node-modules.cjs +0 -108
- package/dist/core-node-modules.d.cts +0 -7
- package/dist/core-node-modules.d.ts +0 -7
- package/dist/core-node-modules.js +0 -8
- package/dist/custom-components.cjs +0 -89
- package/dist/custom-components.d.cts +0 -4
- package/dist/custom-components.d.ts +0 -4
- package/dist/custom-components.js +0 -8
- package/dist/map-catalog-to-astro.cjs +0 -151
- package/dist/map-catalog-to-astro.d.cts +0 -28
- package/dist/map-catalog-to-astro.d.ts +0 -28
- package/dist/map-catalog-to-astro.js +0 -6
package/dist/eventcatalog.js
CHANGED
|
@@ -1,77 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FederationConflictError,
|
|
3
|
-
FederationDiagnosticError,
|
|
4
|
-
federateCatalog
|
|
5
|
-
} from "./chunk-2YJRF4ZX.js";
|
|
6
|
-
import "./chunk-WRNH5C3U.js";
|
|
7
|
-
import "./chunk-5EPNFDT5.js";
|
|
8
|
-
import "./chunk-A2RZR3U4.js";
|
|
9
|
-
import "./chunk-SDZQJTJW.js";
|
|
10
|
-
import "./chunk-352FGP6W.js";
|
|
11
1
|
import {
|
|
12
2
|
runMigrations
|
|
13
3
|
} from "./chunk-XUAF2H54.js";
|
|
14
4
|
import "./chunk-CA4U2JP7.js";
|
|
15
|
-
import {
|
|
16
|
-
watch
|
|
17
|
-
} from "./chunk-KLOHNCNF.js";
|
|
18
5
|
import {
|
|
19
6
|
log_build_default
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-AFPH6ERZ.js";
|
|
7
|
+
} from "./chunk-ZER6HESL.js";
|
|
22
8
|
import "./chunk-ZAZHAVKB.js";
|
|
9
|
+
import {
|
|
10
|
+
FederationConflictError,
|
|
11
|
+
FederationDiagnosticError,
|
|
12
|
+
federateCatalog
|
|
13
|
+
} from "./chunk-RYPZGCRN.js";
|
|
14
|
+
import "./chunk-WRNH5C3U.js";
|
|
15
|
+
import "./chunk-5EPNFDT5.js";
|
|
16
|
+
import "./chunk-A2RZR3U4.js";
|
|
23
17
|
import "./chunk-R7Z5ALYI.js";
|
|
24
18
|
import {
|
|
25
19
|
getFederationDiagnosticCounts,
|
|
26
20
|
getVisibleFederationDiagnostics
|
|
27
21
|
} from "./chunk-JJPB6EOZ.js";
|
|
28
22
|
import "./chunk-FV56YFM4.js";
|
|
23
|
+
import "./chunk-SDZQJTJW.js";
|
|
24
|
+
import "./chunk-352FGP6W.js";
|
|
29
25
|
import {
|
|
30
26
|
getProjectOutDir,
|
|
31
27
|
isAuthEnabled,
|
|
32
28
|
isIndexedSearchEnabled,
|
|
33
29
|
isOutputServer
|
|
34
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3SJDIENM.js";
|
|
35
31
|
import {
|
|
36
32
|
generate
|
|
37
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-C326DCDM.js";
|
|
38
34
|
import {
|
|
39
35
|
logger
|
|
40
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FZEJ62MJ.js";
|
|
41
37
|
import {
|
|
42
38
|
resolve_catalog_dependencies_default
|
|
43
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-EEZXGNF6.js";
|
|
44
40
|
import {
|
|
45
41
|
buildSearchIndex
|
|
46
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DJCOJ77J.js";
|
|
47
43
|
import {
|
|
48
44
|
getEventCatalogUpdateMessage,
|
|
49
45
|
resolveInstalledCoreVersion
|
|
50
46
|
} from "./chunk-FWXEV4LF.js";
|
|
47
|
+
import {
|
|
48
|
+
watch
|
|
49
|
+
} from "./chunk-U63GDPPY.js";
|
|
50
|
+
import "./chunk-TI3Y63NZ.js";
|
|
51
|
+
import {
|
|
52
|
+
getAstroConfigPath
|
|
53
|
+
} from "./chunk-VIJJ7JKH.js";
|
|
51
54
|
import {
|
|
52
55
|
createAstroDevLineFilter,
|
|
53
56
|
createAstroLineFilter
|
|
54
57
|
} from "./chunk-634NFV5U.js";
|
|
55
58
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
clearCatalogCache,
|
|
60
|
+
getRuntimePaths,
|
|
61
|
+
prepareCatalogRuntime
|
|
62
|
+
} from "./chunk-SAN4U2WU.js";
|
|
59
63
|
import {
|
|
60
64
|
VERSION
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
pruneExcludedCoreEntries,
|
|
64
|
-
shouldCopyCoreEntry
|
|
65
|
-
} from "./chunk-DHH5U5PF.js";
|
|
66
|
-
import {
|
|
67
|
-
linkCoreNodeModules,
|
|
68
|
-
resolveInstalledCoreNodeModules
|
|
69
|
-
} from "./chunk-BWN544LB.js";
|
|
70
|
-
import "./chunk-T5IUG523.js";
|
|
65
|
+
} from "./chunk-SETCQKS3.js";
|
|
71
66
|
import {
|
|
72
67
|
getEventCatalogConfigFile,
|
|
73
68
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
74
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-JE6RX7SJ.js";
|
|
75
70
|
|
|
76
71
|
// src/eventcatalog.ts
|
|
77
72
|
import { Command } from "commander";
|
|
@@ -81,6 +76,7 @@ import http from "http";
|
|
|
81
76
|
import fs3 from "fs";
|
|
82
77
|
import path2 from "path";
|
|
83
78
|
import { fileURLToPath } from "url";
|
|
79
|
+
import { createRequire } from "module";
|
|
84
80
|
import boxen from "boxen";
|
|
85
81
|
import updateNotifier from "update-notifier";
|
|
86
82
|
import dotenv from "dotenv";
|
|
@@ -549,8 +545,8 @@ function detectFormat(fileName) {
|
|
|
549
545
|
async function buildFieldsIndex(catalogDir, outputDir) {
|
|
550
546
|
const sdkModule = await import("@eventcatalog/sdk");
|
|
551
547
|
const sdk = sdkModule.default(catalogDir);
|
|
552
|
-
const
|
|
553
|
-
const
|
|
548
|
+
const { fieldsDatabasePath: dbPath } = getRuntimePaths(catalogDir, outputDir || catalogDir);
|
|
549
|
+
const dbDir = path.dirname(dbPath);
|
|
554
550
|
if (!fs2.existsSync(dbDir)) {
|
|
555
551
|
fs2.mkdirSync(dbDir, { recursive: true });
|
|
556
552
|
}
|
|
@@ -637,10 +633,12 @@ async function buildFieldsIndex(catalogDir, outputDir) {
|
|
|
637
633
|
// src/eventcatalog.ts
|
|
638
634
|
import { isEventCatalogStarterEnabled, isEventCatalogScaleEnabled, isFeatureEnabled } from "@eventcatalog/license";
|
|
639
635
|
var currentDir = path2.dirname(fileURLToPath(import.meta.url));
|
|
636
|
+
var astroCli = path2.join(path2.dirname(createRequire(import.meta.url).resolve("astro/package.json")), "bin/astro.mjs");
|
|
640
637
|
var program = new Command().version(VERSION);
|
|
641
638
|
var dir = path2.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
642
|
-
var core = path2.resolve(process.env.CATALOG_DIR || join(dir, ".eventcatalog-core"));
|
|
643
639
|
var eventCatalogDir = path2.resolve(join(currentDir, "../eventcatalog/"));
|
|
640
|
+
var astroConfigPath = () => getAstroConfigPath(dir, join(eventCatalogDir, "astro.config.mjs"));
|
|
641
|
+
var { runtimeDirectory: core } = getRuntimePaths(dir);
|
|
644
642
|
var getInstalledEventCatalogVersion = () => {
|
|
645
643
|
try {
|
|
646
644
|
const pkg = fs3.readFileSync(join(dir, "package.json"), "utf8");
|
|
@@ -766,19 +764,19 @@ var replaceAstroReadyVersionLine = (line) => {
|
|
|
766
764
|
};
|
|
767
765
|
var runCommandWithFilteredOutput = async ({
|
|
768
766
|
command,
|
|
767
|
+
args = [],
|
|
769
768
|
cwd,
|
|
770
769
|
env,
|
|
771
770
|
shouldFilterLine,
|
|
772
771
|
transformLine = (line) => line
|
|
773
772
|
}) => {
|
|
774
773
|
await new Promise((resolve, reject) => {
|
|
775
|
-
const child = spawn(command, {
|
|
774
|
+
const child = spawn(command, args, {
|
|
776
775
|
cwd,
|
|
777
776
|
env: {
|
|
778
777
|
...process.env,
|
|
779
778
|
...env
|
|
780
779
|
},
|
|
781
|
-
shell: true,
|
|
782
780
|
stdio: ["inherit", "pipe", "pipe"]
|
|
783
781
|
});
|
|
784
782
|
let stdoutBuffer = "";
|
|
@@ -817,26 +815,17 @@ var runCommandWithFilteredOutput = async ({
|
|
|
817
815
|
resolve();
|
|
818
816
|
return;
|
|
819
817
|
}
|
|
820
|
-
reject(new Error(`Command failed with exit code ${code}: ${command}`));
|
|
818
|
+
reject(new Error(`Command failed with exit code ${code}: ${command} ${args.join(" ")}`));
|
|
821
819
|
});
|
|
822
820
|
});
|
|
823
821
|
};
|
|
824
|
-
var
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
fs3.cpSync(eventCatalogDir, core, {
|
|
830
|
-
recursive: true,
|
|
831
|
-
filter: (src) => shouldCopyCoreEntry(eventCatalogDir, src)
|
|
832
|
-
});
|
|
833
|
-
pruneExcludedCoreEntries(core);
|
|
834
|
-
const coreNodeModules = path2.join(core, "node_modules");
|
|
835
|
-
const installedCoreNodeModules = resolveInstalledCoreNodeModules(currentDir);
|
|
836
|
-
linkCoreNodeModules({ coreNodeModules, installedCoreNodeModules });
|
|
837
|
-
};
|
|
822
|
+
var prepareCore = () => prepareCatalogRuntime({
|
|
823
|
+
projectDirectory: dir,
|
|
824
|
+
catalogDirectory: core,
|
|
825
|
+
packageDirectory: eventCatalogDir
|
|
826
|
+
});
|
|
838
827
|
var clearCore = () => {
|
|
839
|
-
|
|
828
|
+
clearCatalogCache(dir);
|
|
840
829
|
};
|
|
841
830
|
var checkForUpdate = () => {
|
|
842
831
|
const declaredVersion = getInstalledEventCatalogVersion();
|
|
@@ -886,7 +875,7 @@ Upgrade now: npm i @eventcatalog/core@beta`;
|
|
|
886
875
|
);
|
|
887
876
|
}
|
|
888
877
|
};
|
|
889
|
-
program.command("dev").description("Run development server of EventCatalog").option("-d, --debug", "Output EventCatalog application information into your terminal").option("--force-recreate", "
|
|
878
|
+
program.command("dev").description("Run development server of EventCatalog").option("-d, --debug", "Output EventCatalog application information into your terminal").option("--force-recreate", "Clear and regenerate the entire .astro cache, including content and metadata", false).option("--no-prewarm", "Disable automatic dev prewarm request").action(async (options, command) => {
|
|
890
879
|
logger.welcome();
|
|
891
880
|
logger.info("Setting up EventCatalog...", "eventcatalog");
|
|
892
881
|
const isServer = await isOutputServer();
|
|
@@ -901,10 +890,9 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
901
890
|
}
|
|
902
891
|
if (options.forceRecreate) clearCore();
|
|
903
892
|
await verifyRequiredFieldsAreInCatalogConfigFile(dir);
|
|
904
|
-
|
|
893
|
+
prepareCore();
|
|
905
894
|
await resolve_catalog_dependencies_default(dir, core);
|
|
906
895
|
await runMigrations(dir);
|
|
907
|
-
await catalogToAstro(dir, core);
|
|
908
896
|
const config = await getEventCatalogConfigFile(dir);
|
|
909
897
|
const canEmbedPages = await isFeatureEnabled(
|
|
910
898
|
"@eventcatalog/backstage-plugin-eventcatalog",
|
|
@@ -940,8 +928,9 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
940
928
|
checkForUpdate();
|
|
941
929
|
let watchUnsub;
|
|
942
930
|
try {
|
|
943
|
-
|
|
944
|
-
|
|
931
|
+
if (shouldBuildIndexedSearch) {
|
|
932
|
+
watchUnsub = await watch(dir, core, createDevSearchIndexWatcher({ config }));
|
|
933
|
+
}
|
|
945
934
|
if (options.prewarm) {
|
|
946
935
|
const prewarmPort = await resolveDevPort({
|
|
947
936
|
projectDir: dir
|
|
@@ -952,8 +941,9 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
952
941
|
});
|
|
953
942
|
}
|
|
954
943
|
await runCommandWithFilteredOutput({
|
|
955
|
-
command:
|
|
956
|
-
|
|
944
|
+
command: process.execPath,
|
|
945
|
+
args: [astroCli, "dev", "--config", astroConfigPath(), ...command.args],
|
|
946
|
+
cwd: dir,
|
|
957
947
|
env: {
|
|
958
948
|
PROJECT_DIR: dir,
|
|
959
949
|
CATALOG_DIR: core,
|
|
@@ -982,7 +972,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
982
972
|
dotenv.config({ path: path2.join(dir, ".env") });
|
|
983
973
|
}
|
|
984
974
|
await verifyRequiredFieldsAreInCatalogConfigFile(dir);
|
|
985
|
-
|
|
975
|
+
prepareCore();
|
|
986
976
|
const isBackstagePluginEnabled = await isFeatureEnabled(
|
|
987
977
|
"@eventcatalog/backstage-plugin-eventcatalog",
|
|
988
978
|
process.env.EVENTCATALOG_LICENSE_KEY_BACKSTAGE
|
|
@@ -998,7 +988,6 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
998
988
|
});
|
|
999
989
|
await resolve_catalog_dependencies_default(dir, core);
|
|
1000
990
|
await runMigrations(dir);
|
|
1001
|
-
await catalogToAstro(dir, core);
|
|
1002
991
|
if (isServer) {
|
|
1003
992
|
try {
|
|
1004
993
|
logger.info("Building fields index...", "fields");
|
|
@@ -1013,10 +1002,10 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
1013
1002
|
}
|
|
1014
1003
|
}
|
|
1015
1004
|
checkForUpdate();
|
|
1016
|
-
const args = command.args.join(" ").trim();
|
|
1017
1005
|
await runCommandWithFilteredOutput({
|
|
1018
|
-
command:
|
|
1019
|
-
|
|
1006
|
+
command: process.execPath,
|
|
1007
|
+
args: [astroCli, "build", "--config", astroConfigPath(), ...command.args],
|
|
1008
|
+
cwd: dir,
|
|
1020
1009
|
env: {
|
|
1021
1010
|
PROJECT_DIR: dir,
|
|
1022
1011
|
CATALOG_DIR: core,
|
|
@@ -1048,8 +1037,9 @@ var previewCatalog = async ({
|
|
|
1048
1037
|
isEventCatalogScale = false
|
|
1049
1038
|
}) => {
|
|
1050
1039
|
await runCommandWithFilteredOutput({
|
|
1051
|
-
command:
|
|
1052
|
-
|
|
1040
|
+
command: process.execPath,
|
|
1041
|
+
args: [astroCli, "preview", "--config", astroConfigPath(), ...command.args],
|
|
1042
|
+
cwd: dir,
|
|
1053
1043
|
env: {
|
|
1054
1044
|
PROJECT_DIR: dir,
|
|
1055
1045
|
CATALOG_DIR: core,
|
|
@@ -1067,8 +1057,9 @@ var startServerCatalog = async ({
|
|
|
1067
1057
|
}) => {
|
|
1068
1058
|
const serverEntryPath = path2.join(dir, "dist", "server", "entry.mjs");
|
|
1069
1059
|
await runCommandWithFilteredOutput({
|
|
1070
|
-
command:
|
|
1071
|
-
|
|
1060
|
+
command: process.execPath,
|
|
1061
|
+
args: [serverEntryPath],
|
|
1062
|
+
cwd: dir,
|
|
1072
1063
|
env: {
|
|
1073
1064
|
PROJECT_DIR: dir,
|
|
1074
1065
|
CATALOG_DIR: core,
|
package/dist/features.cjs
CHANGED
|
@@ -38,13 +38,17 @@ __export(features_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(features_exports);
|
|
39
39
|
|
|
40
40
|
// src/eventcatalog-config-file-utils.js
|
|
41
|
+
var import_promises2 = require("fs/promises");
|
|
42
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
43
|
+
var import_uuid = require("uuid");
|
|
44
|
+
var import_gray_matter = __toESM(require("gray-matter"), 1);
|
|
45
|
+
|
|
46
|
+
// eventcatalog/integrations/config-loader.mjs
|
|
41
47
|
var import_promises = require("fs/promises");
|
|
42
48
|
var import_node_fs = require("fs");
|
|
43
49
|
var import_node_path = __toESM(require("path"), 1);
|
|
44
|
-
var
|
|
45
|
-
var import_url = require("url");
|
|
50
|
+
var import_node_url = require("url");
|
|
46
51
|
var import_node_os = require("os");
|
|
47
|
-
var import_gray_matter = __toESM(require("gray-matter"), 1);
|
|
48
52
|
async function cleanup(projectDirectory) {
|
|
49
53
|
const filePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
|
|
50
54
|
if ((0, import_node_fs.existsSync)(filePath)) {
|
|
@@ -92,7 +96,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
92
96
|
configFilePath = import_node_path.default.join(tempDir, "eventcatalog.config.mjs");
|
|
93
97
|
await (0, import_promises.copyFile)(import_node_path.default.join(projectDirectory, "eventcatalog.config.js"), configFilePath);
|
|
94
98
|
}
|
|
95
|
-
const configFileURL = `${(0,
|
|
99
|
+
const configFileURL = `${(0, import_node_url.pathToFileURL)(configFilePath).href}?t=${Date.now()}`;
|
|
96
100
|
const config = await import(
|
|
97
101
|
/* @vite-ignore */
|
|
98
102
|
configFileURL
|
|
@@ -107,7 +111,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
107
111
|
};
|
|
108
112
|
|
|
109
113
|
// src/features.ts
|
|
110
|
-
var
|
|
114
|
+
var import_node_path3 = require("path");
|
|
111
115
|
var import_node_fs2 = __toESM(require("fs"), 1);
|
|
112
116
|
var getProjectOutDir = async () => {
|
|
113
117
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
@@ -123,7 +127,7 @@ var isIndexedSearchEnabled = async () => {
|
|
|
123
127
|
};
|
|
124
128
|
var isAuthEnabled = async () => {
|
|
125
129
|
const directory = process.env.PROJECT_DIR || process.cwd();
|
|
126
|
-
const hasAuthConfig = import_node_fs2.default.existsSync((0,
|
|
130
|
+
const hasAuthConfig = import_node_fs2.default.existsSync((0, import_node_path3.join)(directory, "eventcatalog.auth.js"));
|
|
127
131
|
return hasAuthConfig;
|
|
128
132
|
};
|
|
129
133
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/features.js
CHANGED