@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 +7 -3
- 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/catalog-to-astro-content-directory.cjs +1 -7
- package/dist/catalog-to-astro-content-directory.js +2 -2
- package/dist/{chunk-7JDTB3U5.js → chunk-FIY5JLSQ.js} +0 -2
- package/dist/{chunk-TFBAK5C5.js → chunk-JCGLXXSE.js} +1 -1
- package/dist/{chunk-3EOBEGSB.js → chunk-M7ERKXSB.js} +1 -1
- package/dist/{chunk-VCR3LHZR.js → chunk-R2NILSWL.js} +2 -6
- package/dist/{chunk-IY5HYH2G.js → chunk-TOTPAQ4C.js} +1 -1
- package/dist/{chunk-OW2FQPYP.js → chunk-WUCY3QHK.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +2 -8
- package/dist/eventcatalog.js +6 -6
- package/dist/map-catalog-to-astro.cjs +0 -2
- package/dist/map-catalog-to-astro.js +1 -1
- package/dist/watcher.cjs +0 -2
- package/dist/watcher.js +2 -2
- package/eventcatalog/src/{content/config.ts → content.config.ts} +12 -2
- package/eventcatalog/src/pages/chat/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +6 -13
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +7 -13
- package/eventcatalog/src/utils/users.ts +2 -2
- package/package.json +1 -1
- package/default-files-for-collections/teams.md +0 -11
- package/default-files-for-collections/users.md +0 -11
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
|
-
[](#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
|
-
<
|
|
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"
|
|
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>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
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
|
-
|
|
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);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-E7TXTI7G.js";
|
|
5
5
|
import {
|
|
6
6
|
mapCatalogToAstro
|
|
7
|
-
} from "./chunk-
|
|
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
|
-
|
|
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);
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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);
|
package/dist/eventcatalog.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-BLDONK5J.js";
|
|
4
4
|
import {
|
|
5
5
|
watch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WUCY3QHK.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JCGLXXSE.js";
|
|
10
|
+
import "./chunk-M7ERKXSB.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R2NILSWL.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
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-
|
|
24
|
+
import "./chunk-FIY5JLSQ.js";
|
|
25
25
|
|
|
26
26
|
// src/eventcatalog.ts
|
|
27
27
|
import { Command } from "commander";
|
package/dist/watcher.cjs
CHANGED
package/dist/watcher.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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/
|
|
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
|
-
|
|
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
|
|
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
|
|
15
|
+
const users = await getUsers();
|
|
15
16
|
|
|
16
|
-
return
|
|
17
|
-
params: {
|
|
18
|
-
|
|
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
|
|
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
|
|
36
|
-
return item.data.owners?.some((owner) => owner.id === user.data.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
|
@@ -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 -->
|