@eventcatalog/core 2.0.29 → 2.0.30
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/.all-contributorsrc +18 -0
- package/CHANGELOG.md +8 -0
- package/README.md +3 -1
- package/astro.config.mjs +3 -2
- package/bin/dist/eventcatalog.cjs +4 -4
- package/bin/dist/eventcatalog.js +4 -4
- package/package.json +1 -1
- package/scripts/build-ci.js +1 -1
- package/scripts/catalog-to-astro-content-directory.js +5 -2
- package/scripts/start-catalog-locally.js +1 -1
- package/src/components/SideBars/DomainSideBar.astro +1 -1
package/.all-contributorsrc
CHANGED
|
@@ -374,6 +374,24 @@
|
|
|
374
374
|
"contributions": [
|
|
375
375
|
"code"
|
|
376
376
|
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"login": "jacktomlinson",
|
|
380
|
+
"name": "Jack Tomlinson",
|
|
381
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/15871032?v=4",
|
|
382
|
+
"profile": "https://www.jacktomlinson.co.uk/",
|
|
383
|
+
"contributions": [
|
|
384
|
+
"code"
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"login": "carlosallexandre",
|
|
389
|
+
"name": "Carlos Rodrigues",
|
|
390
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/20143946?v=4",
|
|
391
|
+
"profile": "https://github.com/carlosallexandre",
|
|
392
|
+
"contributions": [
|
|
393
|
+
"code"
|
|
394
|
+
]
|
|
377
395
|
}
|
|
378
396
|
],
|
|
379
397
|
"contributorsPerLine": 7,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 2.0.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 32f93a9: fix(core): running eventcatalog on windows (cross-compatibility between operational systems)
|
|
8
|
+
- 956dd32: fix(core): updated service list to render with with name rather than id
|
|
9
|
+
- 6580ff2: fix(core): fixed missing base in redirect target
|
|
10
|
+
|
|
3
11
|
## 2.0.29
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<!-- [![MIT License][license-badge]][license] -->
|
|
12
12
|
<!-- [![PRs Welcome][prs-badge]][prs] -->
|
|
13
13
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
14
|
-
[](#contributors-)
|
|
15
15
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
16
16
|
|
|
17
17
|
<!-- [![Watch on GitHub][github-watch-badge]][github-watch] -->
|
|
@@ -193,6 +193,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
193
193
|
<td align="center" valign="top" width="14.28%"><a href="http://www.ennovative-solutions.be"><img src="https://avatars.githubusercontent.com/u/2007116?v=4?s=100" width="100px;" alt="Baerten Dennis"/><br /><sub><b>Baerten Dennis</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=debae" title="Code">💻</a></td>
|
|
194
194
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ryancormack"><img src="https://avatars.githubusercontent.com/u/1962883?v=4?s=100" width="100px;" alt="Ryan Cormack"/><br /><sub><b>Ryan Cormack</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=ryancormack" title="Code">💻</a></td>
|
|
195
195
|
<td align="center" valign="top" width="14.28%"><a href="https://natee.biz"><img src="https://avatars.githubusercontent.com/u/4300215?v=4?s=100" width="100px;" alt="Nathan Birrell"/><br /><sub><b>Nathan Birrell</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=nathanbirrell" title="Code">💻</a></td>
|
|
196
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.jacktomlinson.co.uk/"><img src="https://avatars.githubusercontent.com/u/15871032?v=4?s=100" width="100px;" alt="Jack Tomlinson"/><br /><sub><b>Jack Tomlinson</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=jacktomlinson" title="Code">💻</a></td>
|
|
197
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/carlosallexandre"><img src="https://avatars.githubusercontent.com/u/20143946?v=4?s=100" width="100px;" alt="Carlos Rodrigues"/><br /><sub><b>Carlos Rodrigues</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=carlosallexandre" title="Code">💻</a></td>
|
|
196
198
|
</tr>
|
|
197
199
|
</tbody>
|
|
198
200
|
</table>
|
package/astro.config.mjs
CHANGED
|
@@ -11,10 +11,11 @@ import config from './eventcatalog.config';
|
|
|
11
11
|
import expressiveCode from 'astro-expressive-code';
|
|
12
12
|
|
|
13
13
|
const coreDirectory = process.env.CATALOG_DIR || process.cwd();
|
|
14
|
+
const base = config.base || '/';
|
|
14
15
|
|
|
15
16
|
// https://astro.build/config
|
|
16
17
|
export default defineConfig({
|
|
17
|
-
base
|
|
18
|
+
base,
|
|
18
19
|
server: { port: config.port || 3000 },
|
|
19
20
|
|
|
20
21
|
outDir: join(coreDirectory, 'dist'),
|
|
@@ -43,7 +44,7 @@ export default defineConfig({
|
|
|
43
44
|
pagefind(),
|
|
44
45
|
],
|
|
45
46
|
redirects: {
|
|
46
|
-
"/": config.landingPage || '/docs',
|
|
47
|
+
"/": join(base, config.landingPage || '/docs'),
|
|
47
48
|
},
|
|
48
49
|
vite: {
|
|
49
50
|
build: {
|
|
@@ -3118,7 +3118,7 @@ program2.command("dev").description("Run development server of EventCatalog").op
|
|
|
3118
3118
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
|
|
3119
3119
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
|
|
3120
3120
|
console.log("EventCatalog is starting at http://localhost:3000/docs");
|
|
3121
|
-
(0, import_node_child_process.execSync)(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
|
|
3121
|
+
(0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
|
|
3122
3122
|
cwd: core,
|
|
3123
3123
|
// @ts-ignore
|
|
3124
3124
|
stdio: "inherit"
|
|
@@ -3130,7 +3130,7 @@ program2.command("build").description("Run build of EventCatalog").action((optio
|
|
|
3130
3130
|
copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
|
|
3131
3131
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
|
|
3132
3132
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
|
|
3133
|
-
(0, import_node_child_process.execSync)(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
|
|
3133
|
+
(0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
|
|
3134
3134
|
cwd: core,
|
|
3135
3135
|
stdio: "inherit"
|
|
3136
3136
|
});
|
|
@@ -3141,7 +3141,7 @@ var previewCatalog = () => {
|
|
|
3141
3141
|
copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
|
|
3142
3142
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
|
|
3143
3143
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
|
|
3144
|
-
(0, import_node_child_process.execSync)(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
|
|
3144
|
+
(0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
|
|
3145
3145
|
cwd: core,
|
|
3146
3146
|
stdio: "inherit"
|
|
3147
3147
|
});
|
|
@@ -3160,7 +3160,7 @@ program2.command("generate [siteDir]").description("Start the generator scripts.
|
|
|
3160
3160
|
copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
|
|
3161
3161
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
|
|
3162
3162
|
copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
|
|
3163
|
-
(0, import_node_child_process.execSync)(`PROJECT_DIR='${dir}' npm run generate`, {
|
|
3163
|
+
(0, import_node_child_process.execSync)(`cross-env PROJECT_DIR='${dir}' npm run generate`, {
|
|
3164
3164
|
cwd: core,
|
|
3165
3165
|
stdio: "inherit"
|
|
3166
3166
|
});
|
package/bin/dist/eventcatalog.js
CHANGED
|
@@ -3085,7 +3085,7 @@ program2.command("dev").description("Run development server of EventCatalog").op
|
|
|
3085
3085
|
copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
|
|
3086
3086
|
copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
|
|
3087
3087
|
console.log("EventCatalog is starting at http://localhost:3000/docs");
|
|
3088
|
-
execSync(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
|
|
3088
|
+
execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run dev`, {
|
|
3089
3089
|
cwd: core,
|
|
3090
3090
|
// @ts-ignore
|
|
3091
3091
|
stdio: "inherit"
|
|
@@ -3097,7 +3097,7 @@ program2.command("build").description("Run build of EventCatalog").action((optio
|
|
|
3097
3097
|
copyFolder(join(dir, "public"), join(core, "public"));
|
|
3098
3098
|
copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
|
|
3099
3099
|
copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
|
|
3100
|
-
execSync(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
|
|
3100
|
+
execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run build`, {
|
|
3101
3101
|
cwd: core,
|
|
3102
3102
|
stdio: "inherit"
|
|
3103
3103
|
});
|
|
@@ -3108,7 +3108,7 @@ var previewCatalog = () => {
|
|
|
3108
3108
|
copyFolder(join(dir, "public"), join(core, "public"));
|
|
3109
3109
|
copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
|
|
3110
3110
|
copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
|
|
3111
|
-
execSync(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
|
|
3111
|
+
execSync(`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview -- --root ${dir} --port 3000`, {
|
|
3112
3112
|
cwd: core,
|
|
3113
3113
|
stdio: "inherit"
|
|
3114
3114
|
});
|
|
@@ -3127,7 +3127,7 @@ program2.command("generate [siteDir]").description("Start the generator scripts.
|
|
|
3127
3127
|
copyFolder(join(dir, "public"), join(core, "public"));
|
|
3128
3128
|
copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
|
|
3129
3129
|
copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
|
|
3130
|
-
execSync(`PROJECT_DIR='${dir}' npm run generate`, {
|
|
3130
|
+
execSync(`cross-env PROJECT_DIR='${dir}' npm run generate`, {
|
|
3131
3131
|
cwd: core,
|
|
3132
3132
|
stdio: "inherit"
|
|
3133
3133
|
});
|
package/package.json
CHANGED
package/scripts/build-ci.js
CHANGED
|
@@ -16,7 +16,7 @@ fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'ev
|
|
|
16
16
|
|
|
17
17
|
fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
|
|
18
18
|
|
|
19
|
-
execSync(`NODE_ENV=CI PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run scripts:hydrate-content`, {
|
|
19
|
+
execSync(`cross-env NODE_ENV=CI PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run scripts:hydrate-content`, {
|
|
20
20
|
cwd: catalogDir,
|
|
21
21
|
stdio: 'inherit',
|
|
22
22
|
});
|
|
@@ -2,13 +2,14 @@ import { glob } from 'glob';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
|
+
import os from 'node:os';
|
|
5
6
|
|
|
6
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
8
|
const scriptsDir = path.dirname(__filename);
|
|
8
9
|
|
|
9
10
|
const getTargetPath = (source, target, type, file) => {
|
|
10
11
|
const relativePath = path.relative(source, file);
|
|
11
|
-
const cleanedRelativePath = relativePath.split(
|
|
12
|
+
const cleanedRelativePath = relativePath.split(type);
|
|
12
13
|
const targetForEvents = path.join(type, cleanedRelativePath[1]);
|
|
13
14
|
return path.join(target, targetForEvents);
|
|
14
15
|
};
|
|
@@ -25,12 +26,14 @@ const copyFiles = async ({ source, target, catalogFilesDir, pathToMarkdownFiles,
|
|
|
25
26
|
// Find all the event files
|
|
26
27
|
const markdownFiles = await glob(pathToMarkdownFiles, {
|
|
27
28
|
nodir: true,
|
|
29
|
+
windowsPathsNoEscape: os.platform() == 'win32',
|
|
28
30
|
});
|
|
29
31
|
const files = await glob(pathToAllFiles, {
|
|
30
32
|
ignore: {
|
|
31
33
|
ignored: (p) => /\.md$/.test(p.name),
|
|
32
34
|
},
|
|
33
35
|
nodir: true,
|
|
36
|
+
windowsPathsNoEscape: os.platform() == 'win32',
|
|
34
37
|
});
|
|
35
38
|
|
|
36
39
|
const publicDir = path.join(target, '../../public/generated');
|
|
@@ -52,7 +55,7 @@ const copyFiles = async ({ source, target, catalogFilesDir, pathToMarkdownFiles,
|
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
const relativePath = path.relative(source, file);
|
|
55
|
-
const cleanedRelativePath = relativePath.split(
|
|
58
|
+
const cleanedRelativePath = relativePath.split(type);
|
|
56
59
|
if (!cleanedRelativePath[1]) continue;
|
|
57
60
|
const targetForEvents = path.join(type, cleanedRelativePath[1]);
|
|
58
61
|
|
|
@@ -14,7 +14,7 @@ fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'ev
|
|
|
14
14
|
fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
|
|
15
15
|
|
|
16
16
|
execSync(
|
|
17
|
-
`NODE_ENV=development PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run scripts:hydrate-content && PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run dev:local`,
|
|
17
|
+
`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
18
|
{
|
|
19
19
|
cwd: catalogDir,
|
|
20
20
|
stdio: 'inherit',
|
|
@@ -17,7 +17,7 @@ const ownersRaw = domain.data?.owners || [];
|
|
|
17
17
|
const owners = await Promise.all(ownersRaw.map((o) => getEntry(o)));
|
|
18
18
|
|
|
19
19
|
const serviceList = services.map((p) => ({
|
|
20
|
-
label: p.data.
|
|
20
|
+
label: p.data.name,
|
|
21
21
|
badge: p.collection,
|
|
22
22
|
tag: `v${p.data.version}`,
|
|
23
23
|
href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
|