@eventcatalog/core 2.26.0 → 2.26.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.
package/README.md CHANGED
@@ -32,7 +32,7 @@
32
32
  <h4>Features: Documentation generator for Event Driven Architectures, Integration with any broker, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
33
33
 
34
34
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
35
- [![All Contributors](https://img.shields.io/badge/all_contributors-48-orange.svg?style=flat-square)](#contributors-)
35
+ [![All Contributors](https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square)](#contributors-)
36
36
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
37
37
 
38
38
  [Read the Docs](https://www.eventcatalog.dev/product/documentation) | [View Demo](https://demo.eventcatalog.dev/docs)
@@ -128,9 +128,12 @@ Thank you to our project sponsors.
128
128
  </div> -->
129
129
 
130
130
  <div align="center">
131
- <img alt="hookdeck" src="./images/sponsors/gravitee-logo-black.svg" width="50%" />
131
+ <picture>
132
+ <source srcset="./images/sponsors/gravitee-logo-white.webp" media="(prefers-color-scheme: dark)" />
133
+ <img alt="hookdeck" src="./images/sponsors/gravitee-logo-black.svg" width="50%" />
134
+ </picture>
132
135
  <p style="margin: 0; padding: 0;">Manage, secure, and govern every API in your organization</p>
133
- <a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank" >Learn more</a>
136
+ <a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank">Learn more</a>
134
137
  </div>
135
138
 
136
139
  <hr />
@@ -252,6 +255,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
252
255
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/SebasRendon12"><img src="https://avatars.githubusercontent.com/u/69688183?v=4?s=100" width="100px;" alt="Sebastian Rendon"/><br /><sub><b>Sebastian Rendon</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=SebasRendon12" title="Code">💻</a></td>
253
256
  <td align="center" valign="top" width="14.28%"><a href="http://craig0990.co.uk"><img src="https://avatars.githubusercontent.com/u/461897?v=4?s=100" width="100px;" alt="Craig Roberts"/><br /><sub><b>Craig Roberts</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=craig0990" title="Code">💻</a></td>
254
257
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Vertygo"><img src="https://avatars.githubusercontent.com/u/1658326?v=4?s=100" width="100px;" alt="Ivan Milosavljevic"/><br /><sub><b>Ivan Milosavljevic</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Vertygo" title="Documentation">📖</a></td>
258
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mezzle"><img src="https://avatars.githubusercontent.com/u/570639?v=4?s=100" width="100px;" alt="Martin Meredith"/><br /><sub><b>Martin Meredith</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Mezzle" title="Code">💻</a></td>
255
259
  </tr>
256
260
  </tbody>
257
261
  </table>
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.26.0";
40
+ var version = "2.26.1";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-3EOBEGSB.js";
4
- import "../chunk-IY5HYH2G.js";
3
+ } from "../chunk-M7ERKXSB.js";
4
+ import "../chunk-TOTPAQ4C.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.26.0";
109
+ var version = "2.26.1";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-TFBAK5C5.js";
4
- import "../chunk-3EOBEGSB.js";
5
- import "../chunk-IY5HYH2G.js";
3
+ } from "../chunk-JCGLXXSE.js";
4
+ import "../chunk-M7ERKXSB.js";
5
+ import "../chunk-TOTPAQ4C.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -122,8 +122,6 @@ var COLLECTION_KEYS = [
122
122
  "events",
123
123
  "commands",
124
124
  "services",
125
- "users",
126
- "teams",
127
125
  "domains",
128
126
  "flows",
129
127
  "pages",
@@ -243,8 +241,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
243
241
  "events",
244
242
  "commands",
245
243
  "services",
246
- "users",
247
- "teams",
248
244
  "domains",
249
245
  "flows",
250
246
  "changelogs",
@@ -272,10 +268,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
272
268
  };
273
269
  var catalogToAstro = async (source, astroDir) => {
274
270
  const astroContentDir = path3.join(astroDir, "src/content/");
275
- const astroConfigFile = import_fs.default.readFileSync(path3.join(astroContentDir, "config.ts"));
276
- import_fs.default.rmSync(astroContentDir, { recursive: true });
271
+ if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
277
272
  import_fs.default.mkdirSync(astroContentDir);
278
- import_fs.default.writeFileSync(path3.join(astroContentDir, "config.ts"), astroConfigFile);
279
273
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
280
274
  await copyFiles(source, astroDir);
281
275
  await ensureAstroCollectionNotEmpty(astroDir);
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  catalogToAstro
3
- } from "./chunk-VCR3LHZR.js";
3
+ } from "./chunk-R2NILSWL.js";
4
4
  import "./chunk-E7TXTI7G.js";
5
- import "./chunk-7JDTB3U5.js";
5
+ import "./chunk-FIY5JLSQ.js";
6
6
  export {
7
7
  catalogToAstro
8
8
  };
@@ -4,8 +4,6 @@ var COLLECTION_KEYS = [
4
4
  "events",
5
5
  "commands",
6
6
  "services",
7
- "users",
8
- "teams",
9
7
  "domains",
10
8
  "flows",
11
9
  "pages",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-3EOBEGSB.js";
3
+ } from "./chunk-M7ERKXSB.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-IY5HYH2G.js";
3
+ } from "./chunk-TOTPAQ4C.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-E7TXTI7G.js";
5
5
  import {
6
6
  mapCatalogToAstro
7
- } from "./chunk-7JDTB3U5.js";
7
+ } from "./chunk-FIY5JLSQ.js";
8
8
 
9
9
  // src/catalog-to-astro-content-directory.js
10
10
  import { glob } from "glob";
@@ -43,8 +43,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
43
43
  "events",
44
44
  "commands",
45
45
  "services",
46
- "users",
47
- "teams",
48
46
  "domains",
49
47
  "flows",
50
48
  "changelogs",
@@ -72,10 +70,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
72
70
  };
73
71
  var catalogToAstro = async (source, astroDir) => {
74
72
  const astroContentDir = path.join(astroDir, "src/content/");
75
- const astroConfigFile = fs.readFileSync(path.join(astroContentDir, "config.ts"));
76
- fs.rmSync(astroContentDir, { recursive: true });
73
+ if (fs.existsSync(astroContentDir)) fs.rmSync(astroContentDir, { recursive: true });
77
74
  fs.mkdirSync(astroContentDir);
78
- fs.writeFileSync(path.join(astroContentDir, "config.ts"), astroConfigFile);
79
75
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
80
76
  await copyFiles(source, astroDir);
81
77
  await ensureAstroCollectionNotEmpty(astroDir);
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.26.0";
2
+ var version = "2.26.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-E7TXTI7G.js";
4
4
  import {
5
5
  mapCatalogToAstro
6
- } from "./chunk-7JDTB3U5.js";
6
+ } from "./chunk-FIY5JLSQ.js";
7
7
 
8
8
  // src/watcher.js
9
9
  import watcher from "@parcel/watcher";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.26.0";
28
+ var version = "2.26.1";
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-IY5HYH2G.js";
3
+ } from "./chunk-TOTPAQ4C.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
161
161
  var import_os = __toESM(require("os"), 1);
162
162
 
163
163
  // package.json
164
- var version = "2.26.0";
164
+ var version = "2.26.1";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -219,8 +219,6 @@ var COLLECTION_KEYS = [
219
219
  "events",
220
220
  "commands",
221
221
  "services",
222
- "users",
223
- "teams",
224
222
  "domains",
225
223
  "flows",
226
224
  "pages",
@@ -431,8 +429,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
431
429
  "events",
432
430
  "commands",
433
431
  "services",
434
- "users",
435
- "teams",
436
432
  "domains",
437
433
  "flows",
438
434
  "changelogs",
@@ -460,10 +456,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
460
456
  };
461
457
  var catalogToAstro = async (source, astroDir) => {
462
458
  const astroContentDir = path5.join(astroDir, "src/content/");
463
- const astroConfigFile = import_fs.default.readFileSync(path5.join(astroContentDir, "config.ts"));
464
- import_fs.default.rmSync(astroContentDir, { recursive: true });
459
+ if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
465
460
  import_fs.default.mkdirSync(astroContentDir);
466
- import_fs.default.writeFileSync(path5.join(astroContentDir, "config.ts"), astroConfigFile);
467
461
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
468
462
  await copyFiles(source, astroDir);
469
463
  await ensureAstroCollectionNotEmpty(astroDir);
@@ -3,17 +3,17 @@ import {
3
3
  } from "./chunk-BLDONK5J.js";
4
4
  import {
5
5
  watch
6
- } from "./chunk-OW2FQPYP.js";
6
+ } from "./chunk-WUCY3QHK.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-TFBAK5C5.js";
10
- import "./chunk-3EOBEGSB.js";
9
+ } from "./chunk-JCGLXXSE.js";
10
+ import "./chunk-M7ERKXSB.js";
11
11
  import {
12
12
  catalogToAstro
13
- } from "./chunk-VCR3LHZR.js";
13
+ } from "./chunk-R2NILSWL.js";
14
14
  import {
15
15
  VERSION
16
- } from "./chunk-IY5HYH2G.js";
16
+ } from "./chunk-TOTPAQ4C.js";
17
17
  import {
18
18
  isBackstagePluginEnabled
19
19
  } from "./chunk-XMDPVKIJ.js";
@@ -21,7 +21,7 @@ import {
21
21
  generate
22
22
  } from "./chunk-YEQVKHST.js";
23
23
  import "./chunk-E7TXTI7G.js";
24
- import "./chunk-7JDTB3U5.js";
24
+ import "./chunk-FIY5JLSQ.js";
25
25
 
26
26
  // src/eventcatalog.ts
27
27
  import { Command } from "commander";
@@ -38,8 +38,6 @@ var COLLECTION_KEYS = [
38
38
  "events",
39
39
  "commands",
40
40
  "services",
41
- "users",
42
- "teams",
43
41
  "domains",
44
42
  "flows",
45
43
  "pages",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mapCatalogToAstro
3
- } from "./chunk-7JDTB3U5.js";
3
+ } from "./chunk-FIY5JLSQ.js";
4
4
  export {
5
5
  mapCatalogToAstro
6
6
  };
package/dist/watcher.cjs CHANGED
@@ -42,8 +42,6 @@ var COLLECTION_KEYS = [
42
42
  "events",
43
43
  "commands",
44
44
  "services",
45
- "users",
46
- "teams",
47
45
  "domains",
48
46
  "flows",
49
47
  "pages",
package/dist/watcher.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  watch
3
- } from "./chunk-OW2FQPYP.js";
3
+ } from "./chunk-WUCY3QHK.js";
4
4
  import "./chunk-E7TXTI7G.js";
5
- import "./chunk-7JDTB3U5.js";
5
+ import "./chunk-FIY5JLSQ.js";
6
6
  export {
7
7
  watch
8
8
  };
@@ -1,4 +1,6 @@
1
1
  import { z, defineCollection, reference } from 'astro:content';
2
+ import { glob } from 'astro/loaders';
3
+ import { join } from 'node:path';
2
4
 
3
5
  const badge = z.object({
4
6
  content: z.string(),
@@ -252,8 +254,16 @@ const ubiquitousLanguages = defineCollection({
252
254
  }),
253
255
  });
254
256
 
257
+ const projectDirBase = (() => {
258
+ if (process.platform === 'win32') {
259
+ const projectDirPath = process.env.PROJECT_DIR!.replace(/\\/g, '/');
260
+ return projectDirPath.startsWith('/') ? projectDirPath : `/${projectDirPath}`;
261
+ }
262
+ return process.env.PROJECT_DIR;
263
+ })();
264
+
255
265
  const users = defineCollection({
256
- type: 'content',
266
+ loader: glob({ pattern: 'users/*.md', base: projectDirBase, generateId: ({ data }) => data.id as string }),
257
267
  schema: z.object({
258
268
  id: z.string(),
259
269
  name: z.string(),
@@ -274,7 +284,7 @@ const users = defineCollection({
274
284
  });
275
285
 
276
286
  const teams = defineCollection({
277
- type: 'content',
287
+ loader: glob({ pattern: 'teams/*.md', base: projectDirBase, generateId: ({ data }) => data.id as string }),
278
288
  schema: z.object({
279
289
  id: z.string(),
280
290
  name: z.string(),
@@ -108,7 +108,7 @@ const generatorConfig = `
108
108
  <h3 class="text-lg text-white font-semibold mb-3">Quick Setup</h3>
109
109
  <Code code={`npm install @eventcatalog/generator-ai`} lang="bash" frame="none" />
110
110
  <a
111
- href="https://www.eventcatalog.dev/feature/ai-assistant"
111
+ href="https://www.eventcatalog.dev/features/ai-assistant"
112
112
  class="inline-flex items-center text-sm text-white mt-4"
113
113
  >
114
114
  Learn more about setup →
@@ -3,7 +3,7 @@ import components from '@components/MDX/components';
3
3
 
4
4
  // SideBars
5
5
  import { getTeams } from '@utils/teams';
6
- import { getEntry } from 'astro:content';
6
+ import { getEntry, render } from 'astro:content';
7
7
  import type { CollectionEntry } from 'astro:content';
8
8
  import OwnersList from '@components/Lists/OwnersList';
9
9
  import PillListFlat from '@components/Lists/PillListFlat';
@@ -15,23 +15,16 @@ export async function getStaticPaths() {
15
15
  const teams = await getTeams();
16
16
 
17
17
  return teams.map((team) => ({
18
- params: {
19
- type: 'teams',
20
- id: team.data.id,
21
- },
22
- props: {
23
- type: 'team',
24
- ...team,
25
- },
18
+ params: { id: team.data.id },
19
+ props: team,
26
20
  }));
27
21
  }
28
22
 
29
- const { render, ...props } = Astro.props;
30
-
31
- const { Content } = await render();
23
+ const props = Astro.props;
24
+ const { Content } = await render(props);
32
25
 
33
26
  const membersRaw = props.data.members || [];
34
- const members = await Promise.all(membersRaw.map((m) => getEntry(m)));
27
+ const members = (await Promise.all(membersRaw.map((m) => getEntry(m)))).filter(Boolean);
35
28
 
36
29
  const domains = props.data.ownedDomains as CollectionEntry<'domains'>[];
37
30
  const services = props.data.ownedServices as CollectionEntry<'services'>[];
@@ -2,6 +2,7 @@
2
2
  import components from '@components/MDX/components';
3
3
 
4
4
  // SideBars
5
+ import { render } from 'astro:content';
5
6
  import type { CollectionEntry } from 'astro:content';
6
7
  import OwnersList from '@components/Lists/OwnersList';
7
8
  import PillListFlat from '@components/Lists/PillListFlat';
@@ -11,23 +12,16 @@ import { buildUrl } from '@utils/url-builder';
11
12
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
12
13
 
13
14
  export async function getStaticPaths() {
14
- const teams = await getUsers();
15
+ const users = await getUsers();
15
16
 
16
- return teams.map((team) => ({
17
- params: {
18
- type: team.collection,
19
- id: team.data.id,
20
- },
21
- props: {
22
- type: 'team',
23
- ...team,
24
- },
17
+ return users.map((user) => ({
18
+ params: { id: user.data.id },
19
+ props: user,
25
20
  }));
26
21
  }
27
22
 
28
- const { render, ...props } = Astro.props;
29
-
30
- const { Content } = await render();
23
+ const props = Astro.props;
24
+ const { Content } = await render(props);
31
25
 
32
26
  const domains = props.data.ownedDomains as CollectionEntry<'domains'>[];
33
27
  const services = props.data.ownedServices as CollectionEntry<'services'>[];
@@ -32,8 +32,8 @@ export const getUsers = async (): Promise<User[]> => {
32
32
  });
33
33
 
34
34
  const isOwnedByUserOrAssociatedTeam = (item: CollectionEntry<CollectionTypes>) => {
35
- const associatedTeamsSlug: string[] = associatedTeams.map((team) => team.slug);
36
- return item.data.owners?.some((owner) => owner.id === user.data.id || associatedTeamsSlug.includes(owner.id));
35
+ const associatedTeamsId: string[] = associatedTeams.map((team) => team.data.id);
36
+ return item.data.owners?.some((owner) => owner.id === user.data.id || associatedTeamsId.includes(owner.id));
37
37
  };
38
38
 
39
39
  const ownedServices = services.filter(isOwnedByUserOrAssociatedTeam);
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.26.0",
9
+ "version": "2.26.1",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -1,11 +0,0 @@
1
- ---
2
- id: dboyne
3
- name: David Boyne
4
- avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png"
5
- role: Lead developer
6
- email: test@test.com
7
- hidden: true
8
- slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
9
- ---
10
-
11
- <!-- Do not delete this file, required for EC, you an ignore this file -->
@@ -1,11 +0,0 @@
1
- ---
2
- id: dboyne
3
- name: David Boyne
4
- avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png"
5
- role: Lead developer
6
- email: test@test.com
7
- hidden: true
8
- slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
9
- ---
10
-
11
- <!-- Do not delete this file, required for EC, you an ignore this file -->