@eventcatalog/core 2.7.16 → 2.8.1

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 (40) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/.github/workflows/test-bin.yml +29 -0
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +2 -2
  5. package/bin/dist/eventcatalog.cjs +11 -3050
  6. package/bin/dist/eventcatalog.js +9 -3042
  7. package/package.json +13 -8
  8. package/src/components/DocsNavigation.astro +2 -2
  9. package/src/components/Header.astro +2 -2
  10. package/src/components/Lists/BasicList.tsx +2 -2
  11. package/src/components/Lists/OwnersList.tsx +5 -5
  12. package/src/components/Lists/PillList.tsx +3 -3
  13. package/src/components/Lists/SpecificationsList.astro +2 -2
  14. package/src/components/Lists/VersionList.astro +1 -1
  15. package/src/components/MDX/NodeGraph/DownloadButton.tsx +13 -9
  16. package/src/components/MDX/NodeGraph/NodeGraph.astro +3 -1
  17. package/src/components/MDX/NodeGraph/NodeGraph.tsx +81 -25
  18. package/src/components/MDX/NodeGraph/Nodes/ExternalSystem.tsx +1 -1
  19. package/src/components/MDX/Steps/Step.astro +1 -1
  20. package/src/components/MDX/Tiles/Tile.astro +2 -2
  21. package/src/components/MDX/page-components.tsx +1 -1
  22. package/src/components/SideBars/DomainSideBar.astro +2 -2
  23. package/src/components/SideBars/MessageSideBar.astro +2 -2
  24. package/src/components/SideBars/ServiceSideBar.astro +2 -2
  25. package/src/components/Tables/columns/DomainTableColumns.tsx +3 -3
  26. package/src/components/Tables/columns/FlowTableColumns.tsx +2 -2
  27. package/src/components/Tables/columns/MessageTableColumns.tsx +4 -4
  28. package/src/components/Tables/columns/ServiceTableColumns.tsx +4 -4
  29. package/src/layouts/CustomDocsPageLayout.astro +11 -18
  30. package/src/layouts/Footer.astro +4 -4
  31. package/src/layouts/VisualiserLayout.astro +1 -1
  32. package/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +1 -1
  33. package/src/pages/docs/[type]/[id]/[version]/index.astro +2 -1
  34. package/src/pages/docs/[type]/[id]/[version]/spec/index.astro +8 -6
  35. package/src/pages/docs/teams/[id]/index.astro +2 -2
  36. package/src/pages/docs/users/[id]/index.astro +2 -2
  37. package/src/pages/index.astro +1 -1
  38. package/src/pages/visualiser/[type]/[id]/[version]/index.astro +1 -0
  39. package/tailwind.config.mjs +18 -5
  40. package/bin/dist/chunk-62DEEFN2.js +0 -48
@@ -26,7 +26,7 @@ export const columns = () => [
26
26
  <span className={`bg-${color}-500 group-hover:bg-${color}-600 h-full rounded-tl rounded-bl p-1`}>
27
27
  <ServerIcon className="h-4 w-4 text-white" />
28
28
  </span>
29
- <span className="leading-none px-2 group-hover:underline group-hover:text-purple-500">
29
+ <span className="leading-none px-2 group-hover:underline group-hover:text-primary">
30
30
  {messageRaw.data.name} (v{messageRaw.data.version})
31
31
  </span>
32
32
  </span>
@@ -79,7 +79,7 @@ export const columns = () => [
79
79
  <li key={consumer.data.id} className="py-1 group font-light ">
80
80
  <a
81
81
  href={buildUrl(`/docs/${consumer.collection}/${consumer.data.id}/${consumer.data.version}`)}
82
- className="group-hover:text-purple-500 flex space-x-1 items-center "
82
+ className="group-hover:text-primary flex space-x-1 items-center "
83
83
  >
84
84
  <div className={`flex items-center border border-gray-300 shadow-sm rounded-md`}>
85
85
  <span className="flex items-center">
@@ -122,7 +122,7 @@ export const columns = () => [
122
122
  <li key={consumer.data.id} className="py-1 group font-light">
123
123
  <a
124
124
  href={buildUrl(`/docs/${consumer.collection}/${consumer.data.id}/${consumer.data.version}`)}
125
- className="group-hover:text-purple-500 flex space-x-1 items-center "
125
+ className="group-hover:text-primary flex space-x-1 items-center "
126
126
  >
127
127
  <div className={`flex items-center border border-gray-300 shadow-sm rounded-md`}>
128
128
  <span className="flex items-center">
@@ -150,7 +150,7 @@ export const columns = () => [
150
150
  const domain = info.row.original;
151
151
  return (
152
152
  <a
153
- className="hover:text-purple-500 hover:underline px-4 font-light"
153
+ className="hover:text-primary hover:underline px-4 font-light"
154
154
  href={buildUrl(`/visualiser/${domain.collection}/${domain.data.id}/${domain.data.version}`)}
155
155
  >
156
156
  Visualiser &rarr;
@@ -49,53 +49,46 @@ import { buildUrl } from '@utils/url-builder';
49
49
  To get started you can read the following guides:
50
50
  <ul>
51
51
  <li>
52
- <a
53
- class="text-purple-500"
54
- href="https://eventcatalog.dev/docs/development/getting-started/introduction"
52
+ <a class="text-primary" href="https://eventcatalog.dev/docs/development/getting-started/introduction"
55
53
  >Getting started with EventCatalog</a
56
54
  >
57
55
  </li>
58
56
  <li>
59
- <a
60
- class="text-purple-500"
61
- href="https://eventcatalog.dev/docs/development/guides/domains/adding-domains">Creating domains</a
57
+ <a class="text-primary" href="https://eventcatalog.dev/docs/development/guides/domains/adding-domains"
58
+ >Creating domains</a
62
59
  >
63
60
  </li>
64
61
  <li>
65
62
  <a
66
- class="text-purple-500"
63
+ class="text-primary"
67
64
  href="https://eventcatalog.dev/docs/development/guides/services/adding-services"
68
65
  >Creating services</a
69
66
  >
70
67
  </li>
71
68
  <li>
72
69
  <a
73
- class="text-purple-500"
70
+ class="text-primary"
74
71
  href="https://eventcatalog.dev/docs/development/guides/messages/commands/introduction"
75
72
  >Creating commands</a
76
73
  >
77
74
  </li>
78
75
  <li>
79
76
  <a
80
- class="text-purple-500"
77
+ class="text-primary"
81
78
  href="https://eventcatalog.dev/docs/development/guides/messages/events/introduction"
82
79
  >Creating events</a
83
80
  >
84
81
  </li>
85
82
  <li>
86
- <a class="text-purple-500" href="https://eventcatalog.dev/docs/owners"
87
- >Assigning owners to resources</a
88
- >
83
+ <a class="text-primary" href="https://eventcatalog.dev/docs/owners">Assigning owners to resources</a>
89
84
  </li>
90
85
  <li>
91
- <a
92
- class="text-purple-500"
93
- href="https://eventcatalog.dev/docs/development/components/using-components"
86
+ <a class="text-primary" href="https://eventcatalog.dev/docs/development/components/using-components"
94
87
  >Using components in your pages (Schemas, OpenAPI, etc)</a
95
88
  >
96
89
  </li>
97
90
  <li>
98
- <a class="text-purple-500" href="https://eventcatalog.dev/docs/development/deployment"
91
+ <a class="text-primary" href="https://eventcatalog.dev/docs/development/deployment"
99
92
  >Deploying and hosting your EventCatalog</a
100
93
  >
101
94
  </li>
@@ -104,14 +97,14 @@ import { buildUrl } from '@utils/url-builder';
104
97
  <h3>Join the community</h3>
105
98
  <p>
106
99
  Got questions about EventCatalog? Feature requests or need support? <a
107
- class="text-purple-500"
100
+ class="text-primary"
108
101
  href="https://discord.gg/3rjaZMmrAm">Join our community on Discord.</a
109
102
  >
110
103
  </p>
111
104
  <h3>Enterprise support</h3>
112
105
  <p>
113
106
  Using EventCatalog and needs enterprise support? Work with us, find out what we offer on our <a
114
- class="text-purple-500"
107
+ class="text-primary"
115
108
  href="https://eventcatalog.dev/enterprise">enterprise page</a
116
109
  >.
117
110
  </p>
@@ -8,26 +8,26 @@ const { className } = Astro.props;
8
8
  <div class="flex space-x-5">
9
9
  <a href="https://github.com/event-catalog/eventcatalog" target="_blank"
10
10
  ><svg
11
- class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400"
11
+ class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
12
12
  style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
13
13
  ></svg></a
14
14
  >
15
15
  <a href="https://x.com/event_catalog" target="_blank"
16
16
  ><span class="sr-only">x</span><svg
17
- class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400"
17
+ class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
18
18
  style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
19
19
  ></svg></a
20
20
  >
21
21
  <a href="https://www.youtube.com/@event-catalog" target="_blank"
22
22
  ><span class="sr-only">x</span><svg
23
- class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400"
23
+ class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
24
24
  style={`mask-image: url("${buildUrl('/icons/youtube.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
25
25
  ></svg></a
26
26
  >
27
27
  </div>
28
28
  <a
29
29
  target="_blank"
30
- class="hover:text-purple-500 hover:underline text-gray-400 font-light not-prose"
30
+ class="hover:text-primary hover:underline text-gray-400 font-light not-prose"
31
31
  href="https://eventcatalog.dev">Powered by EventCatalog</a
32
32
  >
33
33
  </div>
@@ -92,7 +92,7 @@ const getColor = (collection: string) => {
92
92
  <main class="flex-1 h-full w-full relative">
93
93
  <button
94
94
  id="fullscreen-toggle"
95
- class="absolute top-[1em] z-40 left-5 bg-white hover:bg-gray-100/50 border border-gray-200 hover:text-purple-500 text-gray-800 font-semibold py-2 px-4 rounded-lg transition duration-300 ease-in-out flex items-center space-x-2 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75"
95
+ class="absolute top-[1em] z-40 left-5 bg-white hover:bg-gray-100/50 border border-gray-200 hover:text-primary text-gray-800 font-semibold py-2 px-4 rounded-lg transition duration-300 ease-in-out flex items-center space-x-2 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75"
96
96
  >
97
97
  <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
98
98
  <path
@@ -142,7 +142,7 @@ const badges = [getBadge()];
142
142
  <a
143
143
  href={buildUrl(`${log.url}/${log.version}`)}
144
144
  class={
145
- 'bg-purple-500 hover:bg-purple-400 text-white flex h-8 w-14 items-center justify-center rounded-full ring-8 ring-white'
145
+ 'bg-primary hover:bg-primary/80 text-white flex h-8 w-14 items-center justify-center rounded-full ring-8 ring-white'
146
146
  }
147
147
  >
148
148
  {log.version}
@@ -169,7 +169,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
169
169
  You are looking at a previous version of the {props.collection.slice(0, props.collection.length - 1)}{' '}
170
170
  <strong>{props.data.name}</strong>.{' '}
171
171
  <a
172
- class="underline hover:text-purple-500 block pt-2"
172
+ class="underline hover:text-primary block pt-2"
173
173
  href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.latestVersion}`)}
174
174
  >
175
175
  The latest version of this {props.collection.slice(0, props.collection.length - 1)} is v
@@ -195,6 +195,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
195
195
  collection={props.collection}
196
196
  version={props.data.version}
197
197
  mode="simple"
198
+ linksToVisualiser={true}
198
199
  href={{
199
200
  label: 'Open in Visualiser',
200
201
  url: buildUrl(`/visualiser/${props.collection}/${props.data.id}/${props.data.version}`),
@@ -53,24 +53,26 @@ const fileExists = fs.existsSync(pathOnDisk);
53
53
  ) : (
54
54
  <rapi-doc
55
55
  spec-url={buildUrl(pathToSpec, true)}
56
+ render-style="read"
56
57
  show-header="false"
57
58
  allow-authentication="true"
58
59
  allow-try="true"
60
+ default-schema-tab="schema"
61
+ show-curl-before-try="true"
62
+ use-path-in-nav-bar="true"
63
+ show-method-in-nav-bar="as-colored-block"
64
+ theme="light"
65
+ schema-style="table"
59
66
  class="relative top-0"
60
67
  style={{ height: '100vh', width: '100%', zIndex: 100 }}
61
68
  regular-font="ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
62
- schema-style="table"
63
- default-schema-tab="schema"
64
69
  bg-color="#ffffff"
65
- text-color=""
70
+ primary-color="#6b21a8"
66
71
  nav-bg-color="#fff"
67
72
  nav-text-color=""
68
73
  nav-hover-bg-color="#fff"
69
74
  nav-hover-text-color="#6b21a8"
70
75
  nav-accent-color=""
71
- primary-color="#6b21a8"
72
- theme="light"
73
- render-style="read"
74
76
  />
75
77
  )
76
78
  }
@@ -82,7 +82,7 @@ const ownedEventsList = [...events, ...commands].map((p) => ({
82
82
  <div class="space-y-2">
83
83
  {
84
84
  props.data.email && (
85
- <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-purple-500">
85
+ <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
86
86
  <EnvelopeIcon className="w-4 h-4 text-purple-400" />
87
87
  <a href={`mailto:${props.data.email}`}>Email</a>
88
88
  </div>
@@ -90,7 +90,7 @@ const ownedEventsList = [...events, ...commands].map((p) => ({
90
90
  }
91
91
  {
92
92
  props.data.slackDirectMessageUrl && (
93
- <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-purple-500">
93
+ <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
94
94
  <img src="/slack-icon.svg" class="w-4 h-3" />
95
95
  <a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
96
96
  </div>
@@ -78,7 +78,7 @@ const associatedTeams = teams.map((o) => ({
78
78
  <div class="space-y-1">
79
79
  {
80
80
  props.data.email && (
81
- <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-purple-500">
81
+ <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
82
82
  <EnvelopeIcon className="w-4 h-4 text-purple-400" />
83
83
  <a href={`mailto:${props.data.email}`}>Email</a>
84
84
  </div>
@@ -86,7 +86,7 @@ const associatedTeams = teams.map((o) => ({
86
86
  }
87
87
  {
88
88
  props.data.slackDirectMessageUrl && (
89
- <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-purple-500">
89
+ <div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
90
90
  <img src="/slack-icon.svg" class="w-4 h-3" />
91
91
  <a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
92
92
  </div>
@@ -19,7 +19,7 @@ const flows = await getFlows();
19
19
  <body class="min-h-screen">
20
20
  <main class="container mx-auto px-6 py-20 max-w-[90em]">
21
21
  <section class="text-center mb-8">
22
- <h1 class="text-5xl font-bold mb-6 text-gray-800">Welcome to <span class="text-purple-600">EventCatalog</span></h1>
22
+ <h1 class="text-5xl font-bold mb-6 text-gray-800">Welcome to <span class="text-primary">EventCatalog</span></h1>
23
23
  <p class="text-xl mb-8 text-gray-700 max-w-2xl mx-auto font-light">
24
24
  Discover and document your event-driven architecture effortlessly. EventCatalog centralizes your events, services, and
25
25
  schemas in one place.
@@ -50,6 +50,7 @@ const {
50
50
  mode="full"
51
51
  linkTo="visualiser"
52
52
  version={props.data.version}
53
+ linksToVisualiser={false}
53
54
  href={{
54
55
  label: `Open documentation for ${props.data.name} v${props.data.version}`,
55
56
  url: buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`),
@@ -1,18 +1,31 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
+ import config from './eventcatalog.config.js';
3
+ const theme = config.theme || {};
2
4
  export default {
3
5
  content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
4
6
  theme: {
5
7
  extend: {
6
8
  screens: {
7
- 'xxl': '1990px',
9
+ xxl: '1990px',
10
+ },
11
+ colors: {
12
+ primary: {
13
+ DEFAULT: '#a855f7',
14
+ },
15
+ secondary: {
16
+ light: '#ff9980',
17
+ DEFAULT: '#ff6633',
18
+ dark: '#cc3300',
19
+ },
20
+ ...theme
8
21
  },
9
22
  },
10
23
  },
11
24
  safelist: [
12
- {pattern: /border-.*-(200|400|500)/},
13
- {pattern: /bg-.*-(100|200|400|500)/},
14
- {pattern: /from-.*-(100|200|400|500|700)/},
15
- {pattern: /text-.*-(400|500|800)/},
25
+ { pattern: /border-.*-(200|400|500)/ },
26
+ { pattern: /bg-.*-(100|200|400|500)/ },
27
+ { pattern: /from-.*-(100|200|400|500|700)/ },
28
+ { pattern: /text-.*-(400|500|800)/ },
16
29
  'border-blue-200',
17
30
  'border-green-300',
18
31
  'bg-blue-600',
@@ -1,48 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __esm = (fn, res) => function __init() {
14
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
15
- };
16
- var __commonJS = (cb, mod) => function __require2() {
17
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
- };
19
- var __copyProps = (to, from, except, desc) => {
20
- if (from && typeof from === "object" || typeof from === "function") {
21
- for (let key of __getOwnPropNames(from))
22
- if (!__hasOwnProp.call(to, key) && key !== except)
23
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
- }
25
- return to;
26
- };
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
- // If the importer is in node compatibility mode or this is not an ESM
29
- // file that has been converted to a CommonJS file using a Babel-
30
- // compatible transform (i.e. "__esModule" has not been set), then set
31
- // "default" to the CommonJS "module.exports" for node compatibility.
32
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
- mod
34
- ));
35
-
36
- // node_modules/tsup/assets/esm_shims.js
37
- var init_esm_shims = __esm({
38
- "node_modules/tsup/assets/esm_shims.js"() {
39
- "use strict";
40
- }
41
- });
42
-
43
- export {
44
- __require,
45
- __commonJS,
46
- __toESM,
47
- init_esm_shims
48
- };