@eventcatalog/core 5.0.1 → 5.0.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-KTXSCPEK.js → chunk-A7AVNA6M.js} +1 -1
- package/dist/{chunk-YPWK5ITM.js → chunk-AI5SK4WP.js} +3 -3
- package/dist/{chunk-DVHJTQWQ.js → chunk-D73WCJQD.js} +1 -1
- package/dist/{chunk-UWAXRTAJ.js → chunk-MSRXEI5A.js} +1 -1
- package/dist/{chunk-46TBJZC3.js → chunk-OX6TSVHY.js} +5 -5
- package/dist/{chunk-HFR5OPHV.js → chunk-QS6PIAHG.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +15 -15
- package/dist/federation/federate.js +4 -4
- package/dist/federation/source-provider.js +2 -2
- 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/components/NewVersionBanner.astro +31 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +10 -13
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +10 -13
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +13 -18
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +16 -19
- package/eventcatalog/src/utils/collections/resource-type-badge.ts +9 -0
- package/eventcatalog/src/utils/collections/util.ts +10 -0
- package/eventcatalog/src/utils/version-banner.ts +10 -0
- package/package.json +2 -2
- package/dist/{chunk-A2RZR3U4.js → chunk-6K7XZAYI.js} +3 -3
|
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
169
169
|
var import_os = __toESM(require("os"), 1);
|
|
170
170
|
|
|
171
171
|
// package.json
|
|
172
|
-
var version = "5.0.
|
|
172
|
+
var version = "5.0.2";
|
|
173
173
|
|
|
174
174
|
// src/constants.ts
|
|
175
175
|
var VERSION = version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-AI5SK4WP.js";
|
|
4
4
|
import "../chunk-AD7CL772.js";
|
|
5
|
-
import "../chunk-KTXSCPEK.js";
|
|
6
5
|
import "../chunk-ZAZHAVKB.js";
|
|
7
6
|
import "../chunk-CA6WCQ2T.js";
|
|
7
|
+
import "../chunk-A7AVNA6M.js";
|
|
8
8
|
import "../chunk-CPW6G62V.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-MSRXEI5A.js";
|
|
10
10
|
import "../chunk-4G7FSRPN.js";
|
|
11
11
|
export {
|
|
12
12
|
log_build_default as default
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLicenseAnalytics
|
|
3
3
|
} from "./chunk-AD7CL772.js";
|
|
4
|
-
import {
|
|
5
|
-
raiseEvent
|
|
6
|
-
} from "./chunk-KTXSCPEK.js";
|
|
7
4
|
import {
|
|
8
5
|
countResources,
|
|
9
6
|
hashCatalogContent,
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
getStudioMode,
|
|
15
12
|
serializeStudioUsage
|
|
16
13
|
} from "./chunk-CA6WCQ2T.js";
|
|
14
|
+
import {
|
|
15
|
+
raiseEvent
|
|
16
|
+
} from "./chunk-A7AVNA6M.js";
|
|
17
17
|
import {
|
|
18
18
|
TELEMETRY_REQUEST_TIMEOUT_MS,
|
|
19
19
|
isTelemetryDisabled
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getFederationDiagnostics,
|
|
3
|
-
resolveFederationRules
|
|
4
|
-
} from "./chunk-JJPB6EOZ.js";
|
|
5
1
|
import {
|
|
6
2
|
withFederationOutputTransaction
|
|
7
3
|
} from "./chunk-WRNH5C3U.js";
|
|
@@ -10,10 +6,14 @@ import {
|
|
|
10
6
|
} from "./chunk-5EPNFDT5.js";
|
|
11
7
|
import {
|
|
12
8
|
createFederationSourceProvider
|
|
13
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6K7XZAYI.js";
|
|
14
10
|
import {
|
|
15
11
|
createFederationContentCache
|
|
16
12
|
} from "./chunk-R7Z5ALYI.js";
|
|
13
|
+
import {
|
|
14
|
+
getFederationDiagnostics,
|
|
15
|
+
resolveFederationRules
|
|
16
|
+
} from "./chunk-JJPB6EOZ.js";
|
|
17
17
|
import {
|
|
18
18
|
getEventCatalogConfigFile
|
|
19
19
|
} from "./chunk-4G7FSRPN.js";
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -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.0.
|
|
177
|
+
var version = "5.0.2";
|
|
178
178
|
|
|
179
179
|
// src/constants.ts
|
|
180
180
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -2,34 +2,33 @@ import {
|
|
|
2
2
|
runMigrations
|
|
3
3
|
} from "./chunk-XUAF2H54.js";
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
|
+
import {
|
|
6
|
+
stopChildWithParent
|
|
7
|
+
} from "./chunk-S5GWAUG5.js";
|
|
5
8
|
import {
|
|
6
9
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AI5SK4WP.js";
|
|
8
11
|
import {
|
|
9
12
|
getLicenseStatus,
|
|
10
13
|
printLicenseStatus
|
|
11
14
|
} from "./chunk-AD7CL772.js";
|
|
12
|
-
import "./chunk-KTXSCPEK.js";
|
|
13
15
|
import "./chunk-ZAZHAVKB.js";
|
|
14
16
|
import "./chunk-CA6WCQ2T.js";
|
|
15
|
-
import "./chunk-CPW6G62V.js";
|
|
16
|
-
import {
|
|
17
|
-
stopChildWithParent
|
|
18
|
-
} from "./chunk-S5GWAUG5.js";
|
|
19
17
|
import {
|
|
20
18
|
FederationConflictError,
|
|
21
19
|
FederationDiagnosticError,
|
|
22
20
|
federateCatalog
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OX6TSVHY.js";
|
|
22
|
+
import "./chunk-WRNH5C3U.js";
|
|
23
|
+
import "./chunk-5EPNFDT5.js";
|
|
24
|
+
import "./chunk-6K7XZAYI.js";
|
|
25
|
+
import "./chunk-352FGP6W.js";
|
|
26
|
+
import "./chunk-R7Z5ALYI.js";
|
|
24
27
|
import {
|
|
25
28
|
getFederationDiagnosticCounts,
|
|
26
29
|
getVisibleFederationDiagnostics
|
|
27
30
|
} from "./chunk-JJPB6EOZ.js";
|
|
28
|
-
import "./chunk-WRNH5C3U.js";
|
|
29
|
-
import "./chunk-5EPNFDT5.js";
|
|
30
|
-
import "./chunk-A2RZR3U4.js";
|
|
31
31
|
import "./chunk-SDZQJTJW.js";
|
|
32
|
-
import "./chunk-352FGP6W.js";
|
|
33
32
|
import {
|
|
34
33
|
getProjectOutDir,
|
|
35
34
|
isAuthEnabled,
|
|
@@ -38,10 +37,10 @@ import {
|
|
|
38
37
|
} from "./chunk-NKNOXQ62.js";
|
|
39
38
|
import {
|
|
40
39
|
generate
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-QS6PIAHG.js";
|
|
42
41
|
import {
|
|
43
42
|
logger
|
|
44
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-D73WCJQD.js";
|
|
45
44
|
import {
|
|
46
45
|
resolve_catalog_dependencies_default
|
|
47
46
|
} from "./chunk-PD7KTSYN.js";
|
|
@@ -55,7 +54,8 @@ import {
|
|
|
55
54
|
import {
|
|
56
55
|
watch
|
|
57
56
|
} from "./chunk-U63GDPPY.js";
|
|
58
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-A7AVNA6M.js";
|
|
58
|
+
import "./chunk-CPW6G62V.js";
|
|
59
59
|
import {
|
|
60
60
|
getAstroConfigPath
|
|
61
61
|
} from "./chunk-VIJJ7JKH.js";
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
} from "./chunk-LFQJXLHG.js";
|
|
72
72
|
import {
|
|
73
73
|
VERSION
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-MSRXEI5A.js";
|
|
75
75
|
import {
|
|
76
76
|
getEventCatalogConfigFile,
|
|
77
77
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
FederationConflictError,
|
|
3
3
|
FederationDiagnosticError,
|
|
4
4
|
federateCatalog
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-JJPB6EOZ.js";
|
|
5
|
+
} from "../chunk-OX6TSVHY.js";
|
|
7
6
|
import "../chunk-WRNH5C3U.js";
|
|
8
7
|
import "../chunk-5EPNFDT5.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-SDZQJTJW.js";
|
|
8
|
+
import "../chunk-6K7XZAYI.js";
|
|
11
9
|
import "../chunk-352FGP6W.js";
|
|
12
10
|
import "../chunk-R7Z5ALYI.js";
|
|
11
|
+
import "../chunk-JJPB6EOZ.js";
|
|
12
|
+
import "../chunk-SDZQJTJW.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.0.
|
|
108
|
+
var version = "5.0.2";
|
|
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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QS6PIAHG.js";
|
|
4
|
+
import "./chunk-D73WCJQD.js";
|
|
5
|
+
import "./chunk-MSRXEI5A.js";
|
|
6
6
|
import "./chunk-4G7FSRPN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Shown on a previous version of a page: what you're looking at, and a link to its latest version.
|
|
4
|
+
* The sentences come from getVersionBannerText, so the spaces in them can't be lost when the markup is reformatted.
|
|
5
|
+
*/
|
|
6
|
+
import Admonition from '@components/MDX/Admonition';
|
|
7
|
+
import { getVersionBannerText } from '@utils/version-banner';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
/** What this page is a version of, e.g. "service" or "service doc" */
|
|
11
|
+
subject: string;
|
|
12
|
+
/** Its name */
|
|
13
|
+
name: string;
|
|
14
|
+
/** What the link goes to the latest version of, e.g. "service", "GraphQL schema" or "doc" */
|
|
15
|
+
latestOf: string;
|
|
16
|
+
latestVersion: string;
|
|
17
|
+
href: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const { subject, name, latestOf, latestVersion, href } = Astro.props;
|
|
21
|
+
const text = getVersionBannerText({ subject, latestOf });
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<Admonition type="warning" title="New version found">
|
|
25
|
+
<p>
|
|
26
|
+
{text.previous}<strong>{name}</strong>.{' '}
|
|
27
|
+
<a class="underline block pt-2" href={href}>
|
|
28
|
+
{text.latest}<span>v{latestVersion}</span> →
|
|
29
|
+
</a>
|
|
30
|
+
</p>
|
|
31
|
+
</Admonition>
|
package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { render } from 'astro:content';
|
|
3
3
|
|
|
4
4
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
5
|
-
import
|
|
5
|
+
import NewVersionBanner from '@components/NewVersionBanner.astro';
|
|
6
6
|
import components from '@components/MDX/components';
|
|
7
7
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
@@ -11,7 +11,7 @@ import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
|
11
11
|
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
12
12
|
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
13
13
|
import { getIcon } from '@utils/badges';
|
|
14
|
-
import {
|
|
14
|
+
import { getResourceNoun } from '@utils/collections/util';
|
|
15
15
|
|
|
16
16
|
import { Page } from './_index.data';
|
|
17
17
|
|
|
@@ -31,9 +31,7 @@ const badges = (props.data.badges || []).map((badge: any) => ({
|
|
|
31
31
|
}));
|
|
32
32
|
|
|
33
33
|
const docsBasePath = `/docs/${props.data.resourceCollection}/${props.data.resourceId}/${props.data.resourceVersion}/${encodeURIComponent(props.data.type)}/${encodeURIComponent(props.data.id)}`;
|
|
34
|
-
const singularResourceName =
|
|
35
|
-
collectionToResourceMap[props.data.resourceCollection as keyof typeof collectionToResourceMap] ??
|
|
36
|
-
props.data.resourceCollection.slice(0, props.data.resourceCollection.length - 1);
|
|
34
|
+
const singularResourceName = getResourceNoun(props.data.resourceCollection);
|
|
37
35
|
const chatEnabled = isEventCatalogChatVisible();
|
|
38
36
|
const chatQuery = `Tell me about the ${props.data.type} doc "${title}" for ${props.data.resourceId} (version ${props.data.version})`;
|
|
39
37
|
|
|
@@ -89,14 +87,13 @@ const pagefindAttributes =
|
|
|
89
87
|
<div data-pagefind-ignore>
|
|
90
88
|
{
|
|
91
89
|
props.data.version !== props.data.latestVersion && (
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</Admonition>
|
|
90
|
+
<NewVersionBanner
|
|
91
|
+
subject={`${singularResourceName} doc`}
|
|
92
|
+
name={title}
|
|
93
|
+
latestOf="doc"
|
|
94
|
+
latestVersion={props.data.latestVersion}
|
|
95
|
+
href={buildUrl(`${docsBasePath}/${props.data.latestVersion}`)}
|
|
96
|
+
/>
|
|
100
97
|
)
|
|
101
98
|
}
|
|
102
99
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { render } from 'astro:content';
|
|
3
3
|
|
|
4
4
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
5
|
-
import
|
|
5
|
+
import NewVersionBanner from '@components/NewVersionBanner.astro';
|
|
6
6
|
import components from '@components/MDX/components';
|
|
7
7
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
@@ -10,7 +10,7 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
10
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
11
11
|
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
12
12
|
import { getIcon } from '@utils/badges';
|
|
13
|
-
import {
|
|
13
|
+
import { getResourceNoun } from '@utils/collections/util';
|
|
14
14
|
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
15
15
|
|
|
16
16
|
import { Page } from './_index.data';
|
|
@@ -31,9 +31,7 @@ const badges = (props.data.badges || []).map((badge: any) => ({
|
|
|
31
31
|
}));
|
|
32
32
|
|
|
33
33
|
const docsBasePath = `/docs/${props.data.resourceCollection}/${props.data.resourceId}/${props.data.resourceVersion}/${encodeURIComponent(props.data.type)}/${encodeURIComponent(props.data.id)}`;
|
|
34
|
-
const singularResourceName =
|
|
35
|
-
collectionToResourceMap[props.data.resourceCollection as keyof typeof collectionToResourceMap] ??
|
|
36
|
-
props.data.resourceCollection.slice(0, props.data.resourceCollection.length - 1);
|
|
34
|
+
const singularResourceName = getResourceNoun(props.data.resourceCollection);
|
|
37
35
|
const typeLabel = getResourceDocTypeLabel(props.data.type);
|
|
38
36
|
const chatEnabled = isEventCatalogChatVisible();
|
|
39
37
|
const chatQuery = `Tell me about the ${props.data.type} doc "${title}" for ${props.data.resourceId} (version ${props.data.version})`;
|
|
@@ -88,14 +86,13 @@ const pagefindAttributes =
|
|
|
88
86
|
<div data-pagefind-ignore>
|
|
89
87
|
{
|
|
90
88
|
props.data.version !== props.data.latestVersion && (
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</Admonition>
|
|
89
|
+
<NewVersionBanner
|
|
90
|
+
subject={`${singularResourceName} doc`}
|
|
91
|
+
name={title}
|
|
92
|
+
latestOf="doc"
|
|
93
|
+
latestVersion={props.data.latestVersion}
|
|
94
|
+
href={buildUrl(`${docsBasePath}/${props.data.latestVersion}`)}
|
|
95
|
+
/>
|
|
99
96
|
)
|
|
100
97
|
}
|
|
101
98
|
</div>
|
|
@@ -8,9 +8,10 @@ import { Page } from './_[filename].data';
|
|
|
8
8
|
import { getAbsoluteFilePathForAstroFile } from '@utils/files';
|
|
9
9
|
import { buildUrl, buildEditUrlForResource } from '@utils/url-builder';
|
|
10
10
|
import Admonition from '@components/MDX/Admonition';
|
|
11
|
+
import NewVersionBanner from '@components/NewVersionBanner.astro';
|
|
11
12
|
import Badge from '@components/Badge.astro';
|
|
12
|
-
|
|
13
|
-
import {
|
|
13
|
+
import { getResourceTypeBadge } from '@utils/collections/resource-type-badge';
|
|
14
|
+
import { getResourceNoun } from '@utils/collections/util';
|
|
14
15
|
|
|
15
16
|
export const prerender = Page.prerender;
|
|
16
17
|
export const getStaticPaths = Page.getStaticPaths;
|
|
@@ -38,9 +39,8 @@ if (isRemote) {
|
|
|
38
39
|
// Create comprehensive page title
|
|
39
40
|
const pageTitle = `${collection} | ${data.name} | GraphQL Schema`.replace(/^\w/, (c) => c.toUpperCase());
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
42
|
+
// The schema belongs to a service, event, command, query or domain
|
|
43
|
+
const getResourceBadge = () => [getResourceTypeBadge(collection)];
|
|
44
44
|
|
|
45
45
|
const getGraphQLBadge = () => {
|
|
46
46
|
return [
|
|
@@ -53,7 +53,7 @@ const getGraphQLBadge = () => {
|
|
|
53
53
|
];
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const badges = [...
|
|
56
|
+
const badges = [...getResourceBadge(), ...getGraphQLBadge()];
|
|
57
57
|
|
|
58
58
|
// Index only the latest version
|
|
59
59
|
const pagefindAttributes =
|
|
@@ -96,18 +96,13 @@ const pagefindAttributes =
|
|
|
96
96
|
<div data-pagefind-ignore>
|
|
97
97
|
{
|
|
98
98
|
data.version !== data.latestVersion && (
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
The latest version of this GraphQL schema is
|
|
107
|
-
<span>v{data.latestVersion}</span> →
|
|
108
|
-
</a>
|
|
109
|
-
</p>
|
|
110
|
-
</Admonition>
|
|
99
|
+
<NewVersionBanner
|
|
100
|
+
subject={getResourceNoun(collection)}
|
|
101
|
+
name={data.name}
|
|
102
|
+
latestOf="GraphQL schema"
|
|
103
|
+
latestVersion={data.latestVersion}
|
|
104
|
+
href={buildUrl(`/docs/${collection}/${data.id}/${data.latestVersion}/graphql/${filename}`)}
|
|
105
|
+
/>
|
|
111
106
|
)
|
|
112
107
|
}
|
|
113
108
|
</div>
|
|
@@ -13,6 +13,7 @@ import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
|
13
13
|
import ArchitectureGraph from '@components/MDX/ArchitectureGraph/ArchitectureGraph.astro';
|
|
14
14
|
import SchemaViewer from '@components/MDX/SchemaViewer/SchemaViewerRoot.astro';
|
|
15
15
|
import Admonition from '@components/MDX/Admonition';
|
|
16
|
+
import NewVersionBanner from '@components/NewVersionBanner.astro';
|
|
16
17
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
17
18
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
18
19
|
import FavoriteButton from '@components/FavoriteButton';
|
|
@@ -46,7 +47,12 @@ import {
|
|
|
46
47
|
} from 'lucide-react';
|
|
47
48
|
|
|
48
49
|
import { getSpecificationsForService } from '@utils/collections/services';
|
|
49
|
-
import {
|
|
50
|
+
import {
|
|
51
|
+
resourceToCollectionMap,
|
|
52
|
+
collectionToResourceMap,
|
|
53
|
+
getDeprecatedDetails,
|
|
54
|
+
getResourceNoun,
|
|
55
|
+
} from '@utils/collections/util';
|
|
50
56
|
import {
|
|
51
57
|
createAdrStatusBadge,
|
|
52
58
|
formatAdrDate,
|
|
@@ -305,16 +311,13 @@ const {
|
|
|
305
311
|
deprecatedDate: formattedDate,
|
|
306
312
|
} = getDeprecatedDetails(props as unknown as CollectionEntry<CollectionTypes>);
|
|
307
313
|
|
|
308
|
-
|
|
309
|
-
friendlyCollectionName = friendlyCollectionName === 'querie' ? 'query' : friendlyCollectionName;
|
|
310
|
-
friendlyCollectionName = friendlyCollectionName === 'entitie' ? 'entity' : friendlyCollectionName;
|
|
311
|
-
friendlyCollectionName = friendlyCollectionName === 'adr' ? 'architecture decision' : friendlyCollectionName;
|
|
314
|
+
const friendlyCollectionName = getResourceNoun(props.collection);
|
|
312
315
|
|
|
313
316
|
const schemasForResource = getSchemasFromResource(props);
|
|
314
317
|
|
|
315
318
|
const generatePromptForResource = (props: any) => {
|
|
316
319
|
return `
|
|
317
|
-
Please tell me more about the ${
|
|
320
|
+
Please tell me more about the ${friendlyCollectionName} - ${props.data.name} v${props.data.version} in this catalog.
|
|
318
321
|
`;
|
|
319
322
|
};
|
|
320
323
|
|
|
@@ -596,19 +599,13 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
596
599
|
<div data-pagefind-ignore>
|
|
597
600
|
{
|
|
598
601
|
props.data.version !== props.data.latestVersion && (
|
|
599
|
-
<
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
>
|
|
607
|
-
The latest version of this {props.collection.slice(0, props.collection.length - 1)} is
|
|
608
|
-
<span>v{props.data.latestVersion}</span> →
|
|
609
|
-
</a>
|
|
610
|
-
</p>
|
|
611
|
-
</Admonition>
|
|
602
|
+
<NewVersionBanner
|
|
603
|
+
subject={friendlyCollectionName}
|
|
604
|
+
name={props.data.name}
|
|
605
|
+
latestOf={friendlyCollectionName}
|
|
606
|
+
latestVersion={props.data.latestVersion}
|
|
607
|
+
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.latestVersion}`)}
|
|
608
|
+
/>
|
|
612
609
|
)
|
|
613
610
|
}
|
|
614
611
|
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getIconForCollection } from '@utils/collections/icons';
|
|
2
|
+
import { getResourceTypeLabel } from '@utils/collections/util';
|
|
3
|
+
|
|
4
|
+
/** A badge naming a resource's type, with its icon (e.g. on a GraphQL schema page, the resource it belongs to) */
|
|
5
|
+
export const getResourceTypeBadge = (collection: string) => ({
|
|
6
|
+
textColor: 'gray',
|
|
7
|
+
content: getResourceTypeLabel(collection),
|
|
8
|
+
icon: getIconForCollection(collection),
|
|
9
|
+
});
|
|
@@ -227,6 +227,16 @@ export const getResourceTypeLabel = (collection: string): string => {
|
|
|
227
227
|
.join(' ');
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
+
/**
|
|
231
|
+
* What a resource in a collection is called in a sentence, e.g. "a previous version of the query".
|
|
232
|
+
* e.g. 'queries' → 'query', 'data-products' → 'data product', 'adrs' → 'architecture decision'
|
|
233
|
+
*/
|
|
234
|
+
export const getResourceNoun = (collection: string): string => {
|
|
235
|
+
if (collection === 'adrs') return 'architecture decision';
|
|
236
|
+
const raw = (collectionToResourceMap as Record<string, string>)[collection] || collection;
|
|
237
|
+
return raw.replace(/-/g, ' ');
|
|
238
|
+
};
|
|
239
|
+
|
|
230
240
|
/**
|
|
231
241
|
* Returns the correct pointer field name for a collection and direction.
|
|
232
242
|
* Data-products use 'outputs'/'inputs' instead of 'sends'/'receives'.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sentences on the "New version found" banner (components/NewVersionBanner.astro), shown on a previous version of a
|
|
3
|
+
* page. Each ends with the space before what follows it (the name, then the version), so the markup can't lose it.
|
|
4
|
+
*/
|
|
5
|
+
export const getVersionBannerText = ({ subject, latestOf }: { subject: string; latestOf: string }) => ({
|
|
6
|
+
/** Followed by the name of what this page is a version of, e.g. "...of the query " Get Orders */
|
|
7
|
+
previous: `You are looking at a previous version of the ${subject} `,
|
|
8
|
+
/** Followed by the latest version, e.g. "...of this query is " v2.0.0 */
|
|
9
|
+
latest: `The latest version of this ${latestOf} is `,
|
|
10
|
+
});
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "BUSL-1.1",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "5.0.
|
|
10
|
+
"version": "5.0.2",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
"y-protocols": "^1.0.7",
|
|
141
141
|
"yjs": "^13.6.33",
|
|
142
142
|
"zod": "^4.6.6",
|
|
143
|
-
"@eventcatalog/visualiser": "^5.0.0",
|
|
144
143
|
"@eventcatalog/linter": "1.2.1",
|
|
144
|
+
"@eventcatalog/visualiser": "^5.0.0",
|
|
145
145
|
"@eventcatalog/sdk": "2.30.0"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createFileSystemSourceProvider
|
|
3
|
-
} from "./chunk-SDZQJTJW.js";
|
|
4
1
|
import {
|
|
5
2
|
createGitHubSourceProvider
|
|
6
3
|
} from "./chunk-352FGP6W.js";
|
|
4
|
+
import {
|
|
5
|
+
createFileSystemSourceProvider
|
|
6
|
+
} from "./chunk-SDZQJTJW.js";
|
|
7
7
|
|
|
8
8
|
// src/federation/source-provider.ts
|
|
9
9
|
var createFederationSourceProvider = (projectDirectory, providers = {}) => {
|