@eventcatalog/core 2.8.11 → 2.8.12
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/components/MDX/SchemaViewer/SchemaViewer.astro +1 -1
- package/src/content/config.ts +1 -0
- package/src/utils/commands.ts +1 -0
- package/src/utils/domains/domains.ts +1 -0
- package/src/utils/events.ts +1 -0
- package/src/utils/flows/flows.ts +1 -0
- package/src/utils/services/services.ts +1 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ function findSchemaViewers(document: string) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
try {
|
|
39
|
-
const file = await fs.readFile(catalog.
|
|
39
|
+
const file = await fs.readFile(catalog.astroContentFilePath, 'utf-8');
|
|
40
40
|
const schemaViewers = findSchemaViewers(file);
|
|
41
41
|
|
|
42
42
|
// Loop around all the possible SchemaViewers in the file.
|
package/src/content/config.ts
CHANGED
package/src/utils/commands.ts
CHANGED
|
@@ -54,6 +54,7 @@ export const getCommands = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
54
54
|
catalog: {
|
|
55
55
|
path: path.join(command.collection, command.id.replace('/index.mdx', '')),
|
|
56
56
|
absoluteFilePath: path.join(PROJECT_DIR, command.collection, command.id.replace('/index.mdx', '/index.md')),
|
|
57
|
+
astroContentFilePath: path.join(process.cwd(), 'src', 'content', command.collection, command.id),
|
|
57
58
|
filePath: path.join(process.cwd(), 'src', 'catalog-files', command.collection, command.id.replace('/index.mdx', '')),
|
|
58
59
|
publicPath: path.join('/generated', command.collection, command.id.replace('/index.mdx', '')),
|
|
59
60
|
type: 'command',
|
|
@@ -42,6 +42,7 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
|
|
|
42
42
|
catalog: {
|
|
43
43
|
path: path.join(domain.collection, domain.id.replace('/index.mdx', '')),
|
|
44
44
|
absoluteFilePath: path.join(PROJECT_DIR, domain.collection, domain.id.replace('/index.mdx', '/index.md')),
|
|
45
|
+
astroContentFilePath: path.join(process.cwd(), 'src', 'content', domain.collection, domain.id),
|
|
45
46
|
filePath: path.join(process.cwd(), 'src', 'catalog-files', domain.collection, domain.id.replace('/index.mdx', '')),
|
|
46
47
|
publicPath: path.join('/generated', domain.collection, domain.id.replace('/index.mdx', '')),
|
|
47
48
|
type: 'service',
|
package/src/utils/events.ts
CHANGED
|
@@ -55,6 +55,7 @@ export const getEvents = async ({ getAllVersions = true }: Props = {}): Promise<
|
|
|
55
55
|
catalog: {
|
|
56
56
|
path: path.join(event.collection, event.id.replace('/index.mdx', '')),
|
|
57
57
|
absoluteFilePath: path.join(PROJECT_DIR, event.collection, event.id.replace('/index.mdx', '/index.md')),
|
|
58
|
+
astroContentFilePath: path.join(process.cwd(), 'src', 'content', event.collection, event.id),
|
|
58
59
|
filePath: path.join(process.cwd(), 'src', 'catalog-files', event.collection, event.id.replace('/index.mdx', '')),
|
|
59
60
|
publicPath: path.join('/generated', event.collection, event.id.replace('/index.mdx', '')),
|
|
60
61
|
type: 'event',
|
package/src/utils/flows/flows.ts
CHANGED
|
@@ -49,6 +49,7 @@ export const getFlows = async ({ getAllVersions = true }: Props = {}): Promise<F
|
|
|
49
49
|
catalog: {
|
|
50
50
|
path: path.join(flow.collection, flow.id.replace('/index.mdx', '')),
|
|
51
51
|
absoluteFilePath: path.join(PROJECT_DIR, flow.collection, flow.id.replace('/index.mdx', '/index.md')),
|
|
52
|
+
astroContentFilePath: path.join(process.cwd(), 'src', 'content', flow.collection, flow.id),
|
|
52
53
|
filePath: path.join(process.cwd(), 'src', 'catalog-files', flow.collection, flow.id.replace('/index.mdx', '')),
|
|
53
54
|
publicPath: path.join('/generated', flow.collection, flow.id.replace('/index.mdx', '')),
|
|
54
55
|
type: 'flow',
|
|
@@ -56,6 +56,7 @@ export const getServices = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
56
56
|
// TODO: avoid use string replace at path due to win32
|
|
57
57
|
path: path.join(service.collection, service.id.replace('/index.mdx', '')),
|
|
58
58
|
absoluteFilePath: path.join(PROJECT_DIR, service.collection, service.id.replace('/index.mdx', '/index.md')),
|
|
59
|
+
astroContentFilePath: path.join(process.cwd(), 'src', 'content', service.collection, service.id),
|
|
59
60
|
filePath: path.join(process.cwd(), 'src', 'catalog-files', service.collection, service.id.replace('/index.mdx', '')),
|
|
60
61
|
publicPath: path.join('/generated', service.collection, service.id.replace('/index.mdx', '')),
|
|
61
62
|
type: 'service',
|