@eventcatalog/core 5.0.0-beta.18 → 5.0.0-beta.19

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.
Files changed (33) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-ME6WTBTE.js → chunk-NQN3GVXD.js} +1 -1
  6. package/dist/{chunk-YPKOV5RT.js → chunk-UIUCUPK6.js} +1 -1
  7. package/dist/{chunk-7EYJYJIR.js → chunk-XGIDF7WX.js} +1 -1
  8. package/dist/{chunk-HNYQQJZI.js → chunk-YT2TD27M.js} +1 -1
  9. package/dist/{chunk-ORJKDV64.js → chunk-ZO55EMCM.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/eventcatalog.cjs +1 -1
  13. package/dist/eventcatalog.js +5 -5
  14. package/dist/generate.cjs +1 -1
  15. package/dist/generate.js +3 -3
  16. package/dist/utils/cli-logger.cjs +1 -1
  17. package/dist/utils/cli-logger.js +2 -2
  18. package/eventcatalog/src/components/Seo.astro +5 -1
  19. package/eventcatalog/src/features/auth/error.astro +4 -2
  20. package/eventcatalog/src/features/auth/login.astro +2 -1
  21. package/eventcatalog/src/features/auth/unauthorized.astro +1 -1
  22. package/eventcatalog/src/features/fields/pages/fields.astro +1 -1
  23. package/eventcatalog/src/features/studio/pages/[id].astro +1 -1
  24. package/eventcatalog/src/features/studio/pages/index.astro +1 -1
  25. package/eventcatalog/src/layouts/BaseLayout.astro +4 -4
  26. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +3 -2
  27. package/eventcatalog/src/pages/_index.astro +1 -1
  28. package/eventcatalog/src/pages/docs/[type]/[id]/index.astro +1 -1
  29. package/eventcatalog/src/pages/index.astro +1 -1
  30. package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -1
  31. package/eventcatalog/src/pages/visualiser/[type]/[id]/index.astro +1 -1
  32. package/eventcatalog/src/utils/page-title.ts +15 -0
  33. package/package.json +1 -1
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.0.0-beta.18";
39
+ var version = "5.0.0-beta.19";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-ME6WTBTE.js";
3
+ } from "../chunk-NQN3GVXD.js";
4
4
  import "../chunk-CPW6G62V.js";
5
- import "../chunk-HNYQQJZI.js";
5
+ import "../chunk-YT2TD27M.js";
6
6
  export {
7
7
  raiseEvent
8
8
  };
@@ -176,7 +176,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
176
176
  var import_os = __toESM(require("os"), 1);
177
177
 
178
178
  // package.json
179
- var version = "5.0.0-beta.18";
179
+ var version = "5.0.0-beta.19";
180
180
 
181
181
  // src/constants.ts
182
182
  var VERSION = version;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-7EYJYJIR.js";
3
+ } from "../chunk-XGIDF7WX.js";
4
4
  import "../chunk-AWOO63ME.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
- import "../chunk-ME6WTBTE.js";
6
+ import "../chunk-NQN3GVXD.js";
7
7
  import "../chunk-CPW6G62V.js";
8
- import "../chunk-HNYQQJZI.js";
8
+ import "../chunk-YT2TD27M.js";
9
9
  import "../chunk-RFIXKATC.js";
10
10
  export {
11
11
  log_build_default as default
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CPW6G62V.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-HNYQQJZI.js";
7
+ } from "./chunk-YT2TD27M.js";
8
8
 
9
9
  // src/analytics/analytics.js
10
10
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-HNYQQJZI.js";
3
+ } from "./chunk-YT2TD27M.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-ZAZHAVKB.js";
9
9
  import {
10
10
  raiseEvent
11
- } from "./chunk-ME6WTBTE.js";
11
+ } from "./chunk-NQN3GVXD.js";
12
12
  import {
13
13
  TELEMETRY_REQUEST_TIMEOUT_MS,
14
14
  isTelemetryDisabled
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "5.0.0-beta.18";
2
+ var version = "5.0.0-beta.19";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-YPKOV5RT.js";
3
+ } from "./chunk-UIUCUPK6.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "5.0.0-beta.18";
28
+ var version = "5.0.0-beta.19";
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-HNYQQJZI.js";
3
+ } from "./chunk-YT2TD27M.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -181,7 +181,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
181
181
  var import_picocolors = __toESM(require("picocolors"), 1);
182
182
 
183
183
  // package.json
184
- var version = "5.0.0-beta.18";
184
+ var version = "5.0.0-beta.19";
185
185
 
186
186
  // src/constants.ts
187
187
  var VERSION = version;
@@ -4,7 +4,7 @@ import {
4
4
  import "./chunk-CA4U2JP7.js";
5
5
  import {
6
6
  log_build_default
7
- } from "./chunk-7EYJYJIR.js";
7
+ } from "./chunk-XGIDF7WX.js";
8
8
  import {
9
9
  getLicenseStatus,
10
10
  printLicenseStatus
@@ -33,10 +33,10 @@ import {
33
33
  } from "./chunk-MDWB5HLO.js";
34
34
  import {
35
35
  generate
36
- } from "./chunk-ORJKDV64.js";
36
+ } from "./chunk-ZO55EMCM.js";
37
37
  import {
38
38
  logger
39
- } from "./chunk-YPKOV5RT.js";
39
+ } from "./chunk-UIUCUPK6.js";
40
40
  import {
41
41
  resolve_catalog_dependencies_default
42
42
  } from "./chunk-36RYTYT5.js";
@@ -50,7 +50,7 @@ import {
50
50
  import {
51
51
  watch
52
52
  } from "./chunk-U63GDPPY.js";
53
- import "./chunk-ME6WTBTE.js";
53
+ import "./chunk-NQN3GVXD.js";
54
54
  import "./chunk-CPW6G62V.js";
55
55
  import {
56
56
  getAstroConfigPath
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-LFQJXLHG.js";
68
68
  import {
69
69
  VERSION
70
- } from "./chunk-HNYQQJZI.js";
70
+ } from "./chunk-YT2TD27M.js";
71
71
  import {
72
72
  getEventCatalogConfigFile,
73
73
  verifyRequiredFieldsAreInCatalogConfigFile
package/dist/generate.cjs CHANGED
@@ -112,7 +112,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
112
112
  var import_picocolors = __toESM(require("picocolors"), 1);
113
113
 
114
114
  // package.json
115
- var version = "5.0.0-beta.18";
115
+ var version = "5.0.0-beta.19";
116
116
 
117
117
  // src/constants.ts
118
118
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-ORJKDV64.js";
4
- import "./chunk-YPKOV5RT.js";
5
- import "./chunk-HNYQQJZI.js";
3
+ } from "./chunk-ZO55EMCM.js";
4
+ import "./chunk-UIUCUPK6.js";
5
+ import "./chunk-YT2TD27M.js";
6
6
  import "./chunk-RFIXKATC.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 = "5.0.0-beta.18";
39
+ var version = "5.0.0-beta.19";
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-YPKOV5RT.js";
4
- import "../chunk-HNYQQJZI.js";
3
+ } from "../chunk-UIUCUPK6.js";
4
+ import "../chunk-YT2TD27M.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -3,8 +3,12 @@ import { SEO } from 'astro-seo';
3
3
  import config from '@config';
4
4
  import defaultImageFile from '../../public/opengraph.png';
5
5
  import { buildUrl } from '@utils/url-builder';
6
+ import { formatPageTitle } from '@utils/page-title';
6
7
 
7
- const { title = config.title, description = config.tagline, ogTitle = title, ogType = 'website' } = Astro.props;
8
+ const { description = config.tagline, ogType = 'website' } = Astro.props;
9
+ // The page's own title (none for the homepage), followed by the catalog's
10
+ const title = formatPageTitle(Astro.props.title);
11
+ const ogTitle = title;
8
12
 
9
13
  const siteBaseURL = new URL(Astro.url);
10
14
  const defaultImage = new URL(defaultImageFile.src, siteBaseURL);
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import '../../styles/tailwind.css';
3
+ import { formatPageTitle } from '@utils/page-title';
3
4
  // src/pages/auth/error.astro
4
5
 
5
6
  const { searchParams } = new URL(Astro.request.url);
@@ -14,6 +15,7 @@ const errorMessages = {
14
15
 
15
16
  // @ts-ignore
16
17
  const errorMessage = errorMessages[error] || errorMessages.Default;
18
+ const pageTitle = formatPageTitle('Authentication Error');
17
19
  ---
18
20
 
19
21
  <!doctype html>
@@ -25,10 +27,10 @@ const errorMessage = errorMessages[error] || errorMessages.Default;
25
27
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
26
28
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
27
29
  <meta name="generator" content={Astro.generator} />
28
- <title>Authentication Error - EventCatalog</title>
30
+ <title>{pageTitle}</title>
29
31
  </head>
30
32
  <body>
31
- <main title="Authentication Error - EventCatalog">
33
+ <main title={pageTitle}>
32
34
  <div class="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
33
35
  <div class="max-w-md w-full space-y-8 text-center">
34
36
  <div>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  import '../../styles/tailwind.css';
3
3
  import config from '@config';
4
+ import { formatPageTitle } from '@utils/page-title';
4
5
  const { title, logo } = config;
5
6
  import { join } from 'node:path';
6
7
  import { isAuthEnabled, isSSR } from '@utils/feature';
@@ -106,7 +107,7 @@ const providerConfig = {
106
107
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
107
108
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
108
109
  <meta name="generator" content={Astro.generator} />
109
- <title>Sign In | {title}</title>
110
+ <title>{formatPageTitle('Sign In')}</title>
110
111
  <link rel="preconnect" href="https://fonts.googleapis.com" />
111
112
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
112
113
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
@@ -2,7 +2,7 @@
2
2
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
3
  ---
4
4
 
5
- <VerticalSideBarLayout title="Unauthorized - EventCatalog" showNestedSideBar={false}>
5
+ <VerticalSideBarLayout title="Unauthorized" showNestedSideBar={false}>
6
6
  <div class="flex h-[calc(100vh-120px)] bg-white">
7
7
  <main class="flex w-full items-center justify-center bg-white text-center sm:p-12">
8
8
  <div class="w-full max-w-xl text-center">
@@ -7,7 +7,7 @@ import FieldsExplorer from '@components/FieldsExplorer/FieldsExplorer';
7
7
  export const prerender = false;
8
8
  ---
9
9
 
10
- <VerticalSideBarLayout title="Fields Explorer - EventCatalog" showNestedSideBar={false}>
10
+ <VerticalSideBarLayout title="Fields Explorer" showNestedSideBar={false}>
11
11
  <style is:global>
12
12
  #eventcatalog-header {
13
13
  left: calc(var(--ec-vertical-nav-width, 14rem) + var(--ec-fields-sidebar-width, 320px)) !important;
@@ -33,7 +33,7 @@ const keptInMemory = runtime?.storage.type === 'memory';
33
33
  const signedInAs = getSignedInUser(Astro.locals);
34
34
  ---
35
35
 
36
- <VerticalSideBarLayout title="Studio - EventCatalog" showNestedSideBar={false}>
36
+ <VerticalSideBarLayout title="Studio" showNestedSideBar={false}>
37
37
  <main
38
38
  class="min-h-0 overflow-hidden bg-[rgb(var(--ec-page-bg))]"
39
39
  style="margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1); height: calc(100dvh - 60px);"
@@ -101,7 +101,7 @@ const strokeOf = (preview: NonNullable<CanvasSummary['preview']>, ratio: number)
101
101
  Math.max(preview.width, preview.height) / ratio;
102
102
  ---
103
103
 
104
- <VerticalSideBarLayout title="Studio - EventCatalog" showNestedSideBar={false}>
104
+ <VerticalSideBarLayout title="Studio" showNestedSideBar={false}>
105
105
  {
106
106
  unavailable ? (
107
107
  <main
@@ -6,12 +6,12 @@ import NavigationProgress from '../components/NavigationProgress.astro';
6
6
  import config from '@config';
7
7
 
8
8
  interface Props {
9
- title: string;
9
+ /** The page's own title; the catalog's title follows it (the homepage has none) */
10
+ title?: string;
10
11
  description?: string;
11
- ogTitle?: string;
12
12
  }
13
13
 
14
- const { title, description, ogTitle } = Astro.props;
14
+ const { title, description } = Astro.props;
15
15
  const catalogTheme = config.theme || 'default';
16
16
  ---
17
17
 
@@ -50,7 +50,7 @@ const catalogTheme = config.theme || 'default';
50
50
  document.addEventListener('astro:page-load', applyTheme);
51
51
  })();
52
52
  </script>
53
- <SEO title={title} description={description} ogTitle={ogTitle} />
53
+ <SEO title={title} description={description} />
54
54
  <AnalyticsHead />
55
55
  <slot name="head" />
56
56
  </head>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  interface Props {
3
- title: string;
3
+ /** The page's own title; the catalog's title follows it (the homepage has none) */
4
+ title?: string;
4
5
  sidebar?: boolean;
5
6
  description?: string;
6
7
  showNestedSideBar?: boolean;
@@ -430,7 +431,7 @@ const { title, description, showNestedSideBar = true, showHeader = true, reduced
430
431
  const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/docs', true)];
431
432
  ---
432
433
 
433
- <BaseLayout title={`EventCatalog | ${title}`} description={description} ogTitle={title}>
434
+ <BaseLayout title={title} description={description}>
434
435
  <Fragment slot="head">
435
436
  <script is:inline define:vars={{ verticalNavAutoCollapsePaths }}>
436
437
  (() => {
@@ -134,7 +134,7 @@ const exploreCards: ExploreCard[] = [
134
134
  ];
135
135
  ---
136
136
 
137
- <VerticalSideBarLayout title="EventCatalog" showNestedSideBar={showNestedSideBar}>
137
+ <VerticalSideBarLayout showNestedSideBar={showNestedSideBar}>
138
138
  <div class="ec-home min-h-screen">
139
139
  <!-- Hero -->
140
140
  <header class="ec-hero">
@@ -17,7 +17,7 @@ const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion, false, t
17
17
  <!doctype html>
18
18
  <html lang="en">
19
19
  <head>
20
- <Seo title={`EventCatalog | ${pageTitle}`} ogTitle={pageTitle} />
20
+ <Seo title={pageTitle} />
21
21
  </head>
22
22
  <body>
23
23
  <p>You are being redirected to <a href={redirectUrl}>{redirectUrl}</a></p>
@@ -60,7 +60,7 @@ if (config.landingPage) {
60
60
 
61
61
  {
62
62
  CustomContent ? (
63
- <VerticalSideBarLayout title="EventCatalog" reducedContentPadding>
63
+ <VerticalSideBarLayout reducedContentPadding>
64
64
  <main class="flex docs-layout h-full">
65
65
  <div class="flex docs-layout w-full">
66
66
  <div class="w-full overflow-y-auto py-8">
@@ -11,7 +11,7 @@ export const getStaticPaths = Page.getStaticPaths;
11
11
  const { schemas } = await Page.getData(Astro);
12
12
  ---
13
13
 
14
- <VerticalSideBarLayout title="Schema Explorer - EventCatalog" showNestedSideBar={false}>
14
+ <VerticalSideBarLayout title="Schema Explorer" showNestedSideBar={false}>
15
15
  <style is:global>
16
16
  .react-flow__attribution {
17
17
  display: none;
@@ -53,7 +53,7 @@ const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion, false, t
53
53
  <!doctype html>
54
54
  <html lang="en">
55
55
  <head>
56
- <Seo title={`EventCatalog | ${pageTitle}`} ogTitle={pageTitle} />
56
+ <Seo title={pageTitle} />
57
57
  </head>
58
58
  <body>
59
59
  <p>You are being redirected to <a href={redirectUrl}>{redirectUrl}</a></p>
@@ -0,0 +1,15 @@
1
+ import config from '@config';
2
+
3
+ /** The catalog's name: `title` in eventcatalog.config.js, or EventCatalog when it has none */
4
+ export const getCatalogTitle = (): string => config?.title?.trim() || 'EventCatalog';
5
+
6
+ /**
7
+ * A page's title, as browser tabs and link previews show it: the page's own title, then the
8
+ * catalog's (`Domains | Ordering | Acme Inc`), so tabs show the page first. A page without a title
9
+ * of its own (the homepage) is just the catalog's.
10
+ */
11
+ export const formatPageTitle = (title?: string): string => {
12
+ const catalogTitle = getCatalogTitle();
13
+ const pageTitle = title?.trim();
14
+ return pageTitle && pageTitle !== catalogTitle ? `${pageTitle} | ${catalogTitle}` : catalogTitle;
15
+ };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "BUSL-1.1",
9
9
  "type": "module",
10
- "version": "5.0.0-beta.18",
10
+ "version": "5.0.0-beta.19",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },