@eventcatalog/core 2.11.4 → 2.11.5

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.
@@ -419,6 +419,15 @@
419
419
  "contributions": [
420
420
  "code"
421
421
  ]
422
+ },
423
+ {
424
+ "login": "skyrpex",
425
+ "name": "Cristian Pallarés",
426
+ "avatar_url": "https://avatars.githubusercontent.com/u/1077520?v=4",
427
+ "profile": "https://pallares.io",
428
+ "contributions": [
429
+ "code"
430
+ ]
422
431
  }
423
432
  ],
424
433
  "contributorsPerLine": 7,
@@ -13,10 +13,10 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
- - uses: actions/setup-node@v4
16
+ - uses: pnpm/action-setup@v4
17
17
  with:
18
- node-version: '20.x'
18
+ version: 9
19
19
  - name: Installation
20
- run: npm ci
20
+ run: pnpm i
21
21
  - name: Prettier Code
22
- run: npm run format:diff
22
+ run: pnpm run format:diff
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.11.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 61e5cf1: fix(core): fixed outdir to output to users directory now
8
+ - 6e88fcf: chore(core): moved some GitHub CI/CD to pnpm
9
+ - b29d4f9: chore(core): removed code that copies over files twice to users catalog.
10
+ - a283534: fix(docs): remove blank space from the version tag
11
+
3
12
  ## 2.11.4
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
  <h4>Features: Documentation generator for Event Driven Architectures, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
30
30
 
31
31
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
32
- [![All Contributors](https://img.shields.io/badge/all_contributors-44-orange.svg?style=flat-square)](#contributors-)
32
+ [![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-)
33
33
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
34
34
 
35
35
  [Read the Docs](https://eventcatalog.dev/) | [Edit the Docs](https://github.com/event-catalog/docs) | [View Demo](https://demo.eventcatalog.dev/docs)
@@ -237,6 +237,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
237
237
  <tr>
238
238
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/hpatoio"><img src="https://avatars.githubusercontent.com/u/249948?v=4?s=100" width="100px;" alt="Simone Fumagalli"/><br /><sub><b>Simone Fumagalli</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=hpatoio" title="Documentation">📖</a></td>
239
239
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/d-o-h"><img src="https://avatars.githubusercontent.com/u/23699653?v=4?s=100" width="100px;" alt="d-o-h"/><br /><sub><b>d-o-h</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=d-o-h" title="Code">💻</a></td>
240
+ <td align="center" valign="top" width="14.28%"><a href="https://pallares.io"><img src="https://avatars.githubusercontent.com/u/1077520?v=4?s=100" width="100px;" alt="Cristian Pallarés"/><br /><sub><b>Cristian Pallarés</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=skyrpex" title="Code">💻</a></td>
240
241
  </tr>
241
242
  </tbody>
242
243
  </table>
package/astro.config.mjs CHANGED
@@ -10,7 +10,7 @@ import { join } from 'node:path';
10
10
  import config from './eventcatalog.config';
11
11
  import expressiveCode from 'astro-expressive-code';
12
12
 
13
- const coreDirectory = process.env.CATALOG_DIR || process.cwd();
13
+ const projectDirectory = process.env.PROJECT_DIR || process.cwd();
14
14
  const base = config.base || '/';
15
15
 
16
16
  // https://astro.build/config
@@ -18,7 +18,7 @@ export default defineConfig({
18
18
  base,
19
19
  server: { port: config.port || 3000 },
20
20
 
21
- outDir: config.outDir ? join(coreDirectory, config.outDir) : join(coreDirectory, 'dist'),
21
+ outDir: config.outDir ? join(projectDirectory, config.outDir) : join(projectDirectory, 'dist'),
22
22
 
23
23
  // https://docs.astro.build/en/reference/configuration-reference/#site
24
24
  site: config.homepageLink || 'https://eventcatalog.dev/',
@@ -40,16 +40,6 @@ var dir = process.cwd();
40
40
  var core = (0, import_node_path.join)(dir, ".eventcatalog-core");
41
41
  var eventCatalogDir = (0, import_node_path.join)(currentDir, "../../");
42
42
  program.name("eventcatalog").description("Documentation tool for event-driven architectures");
43
- var copyFile = (from, to) => {
44
- if (import_fs.default.existsSync(from)) {
45
- import_fs.default.cpSync(from, to);
46
- }
47
- };
48
- var copyFolder = (from, to) => {
49
- if (import_fs.default.existsSync(from)) {
50
- import_fs.default.cpSync(from, to, { recursive: true });
51
- }
52
- };
53
43
  var ensureDir = (dir2) => {
54
44
  if (!import_fs.default.existsSync(dir2)) {
55
45
  import_fs.default.mkdirSync(dir2);
@@ -76,9 +66,6 @@ program.command("dev").description("Run development server of EventCatalog").opt
76
66
  }
77
67
  if (options.forceRecreate) clearCore();
78
68
  copyCore();
79
- copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
80
- copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
81
- copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
82
69
  console.log("EventCatalog is starting at http://localhost:3000/docs");
83
70
  (0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
84
71
  cwd: core,
@@ -89,25 +76,17 @@ program.command("dev").description("Run development server of EventCatalog").opt
89
76
  program.command("build").description("Run build of EventCatalog").action((options) => {
90
77
  console.log("Building EventCatalog...");
91
78
  copyCore();
92
- copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
93
- copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
94
- copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
95
79
  (0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
96
80
  cwd: core,
97
81
  stdio: "inherit"
98
82
  });
99
- copyFolder((0, import_node_path.join)(core, "dist"), (0, import_node_path.join)(dir, "dist"));
100
83
  });
101
84
  var previewCatalog = () => {
102
85
  copyCore();
103
- copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
104
- copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
105
- copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
106
86
  (0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
107
87
  cwd: core,
108
88
  stdio: "inherit"
109
89
  });
110
- copyFolder((0, import_node_path.join)(core, "dist"), (0, import_node_path.join)(dir, "dist"));
111
90
  };
112
91
  program.command("preview").description("Serves the contents of your eventcatalog build directory").action((options) => {
113
92
  console.log("Starting preview of your build...");
@@ -119,9 +98,6 @@ program.command("start").description("Serves the contents of your eventcatalog b
119
98
  });
120
99
  program.command("generate [siteDir]").description("Start the generator scripts.").action(() => {
121
100
  copyCore();
122
- copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
123
- copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
124
- copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
125
101
  (0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' npm run generate`, {
126
102
  cwd: core,
127
103
  stdio: "inherit"
@@ -13,16 +13,6 @@ var dir = process.cwd();
13
13
  var core = join(dir, ".eventcatalog-core");
14
14
  var eventCatalogDir = join(currentDir, "../../");
15
15
  program.name("eventcatalog").description("Documentation tool for event-driven architectures");
16
- var copyFile = (from, to) => {
17
- if (fs.existsSync(from)) {
18
- fs.cpSync(from, to);
19
- }
20
- };
21
- var copyFolder = (from, to) => {
22
- if (fs.existsSync(from)) {
23
- fs.cpSync(from, to, { recursive: true });
24
- }
25
- };
26
16
  var ensureDir = (dir2) => {
27
17
  if (!fs.existsSync(dir2)) {
28
18
  fs.mkdirSync(dir2);
@@ -49,9 +39,6 @@ program.command("dev").description("Run development server of EventCatalog").opt
49
39
  }
50
40
  if (options.forceRecreate) clearCore();
51
41
  copyCore();
52
- copyFolder(join(dir, "public"), join(core, "public"));
53
- copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
54
- copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
55
42
  console.log("EventCatalog is starting at http://localhost:3000/docs");
56
43
  execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
57
44
  cwd: core,
@@ -62,25 +49,17 @@ program.command("dev").description("Run development server of EventCatalog").opt
62
49
  program.command("build").description("Run build of EventCatalog").action((options) => {
63
50
  console.log("Building EventCatalog...");
64
51
  copyCore();
65
- copyFolder(join(dir, "public"), join(core, "public"));
66
- copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
67
- copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
68
52
  execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
69
53
  cwd: core,
70
54
  stdio: "inherit"
71
55
  });
72
- copyFolder(join(core, "dist"), join(dir, "dist"));
73
56
  });
74
57
  var previewCatalog = () => {
75
58
  copyCore();
76
- copyFolder(join(dir, "public"), join(core, "public"));
77
- copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
78
- copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
79
59
  execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
80
60
  cwd: core,
81
61
  stdio: "inherit"
82
62
  });
83
- copyFolder(join(core, "dist"), join(dir, "dist"));
84
63
  };
85
64
  program.command("preview").description("Serves the contents of your eventcatalog build directory").action((options) => {
86
65
  console.log("Starting preview of your build...");
@@ -92,9 +71,6 @@ program.command("start").description("Serves the contents of your eventcatalog b
92
71
  });
93
72
  program.command("generate [siteDir]").description("Start the generator scripts.").action(() => {
94
73
  copyCore();
95
- copyFolder(join(dir, "public"), join(core, "public"));
96
- copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
97
- copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
98
74
  execSync(`cross-env PROJECT_DIR='${dir}' npm run generate`, {
99
75
  cwd: core,
100
76
  stdio: "inherit"
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.11.4",
9
+ "version": "2.11.5",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -2,7 +2,6 @@
2
2
 
3
3
  // This is used for CI on vercel. Must copy files before building.
4
4
  import { join } from 'node:path';
5
- import fs from 'fs';
6
5
  import { execSync } from 'node:child_process';
7
6
  const __dirname = import.meta.dirname;
8
7
 
@@ -12,10 +11,6 @@ const catalog = args[0] || 'default';
12
11
  const catalogDir = join(__dirname, '../');
13
12
  const projectDIR = join(__dirname, `../examples/${catalog}`);
14
13
 
15
- fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'eventcatalog.config.js'));
16
-
17
- fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
18
-
19
14
  execSync(
20
15
  `cross-env NODE_ENV=CI PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run build && astro check --minimumSeverity error`,
21
16
  {
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { join } from 'node:path';
3
- import fs from 'fs';
4
3
  import { execSync } from 'node:child_process';
5
4
  const __dirname = import.meta.dirname;
6
5
 
@@ -10,9 +9,6 @@ const catalog = args[0] || 'default';
10
9
  const catalogDir = join(__dirname, '../');
11
10
  const projectDIR = join(__dirname, `../examples/${catalog}`);
12
11
 
13
- fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'eventcatalog.config.js'));
14
- fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
15
-
16
12
  execSync(
17
13
  `cross-env NODE_ENV=development PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run scripts:hydrate-content && cross-env PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run dev:local`,
18
14
  {
@@ -173,8 +173,8 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
173
173
  class="underline hover:text-primary block pt-2"
174
174
  href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.latestVersion}`)}
175
175
  >
176
- The latest version of this {props.collection.slice(0, props.collection.length - 1)} is v
177
- {props.data.latestVersion} &rarr;
176
+ The latest version of this {props.collection.slice(0, props.collection.length - 1)} is
177
+ <span>v{props.data.latestVersion}</span> &rarr;
178
178
  </a>
179
179
  </p>
180
180
  </div>