@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.8.12
4
+
5
+ ### Patch Changes
6
+
7
+ - e7cb5d7: chore(core): added astro file path to resources
8
+
3
9
  ## 2.8.11
4
10
 
5
11
  ### Patch Changes
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.8.11",
9
+ "version": "2.8.12",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -36,7 +36,7 @@ function findSchemaViewers(document: string) {
36
36
  }
37
37
 
38
38
  try {
39
- const file = await fs.readFile(catalog.absoluteFilePath, 'utf-8');
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.
@@ -31,6 +31,7 @@ const changelogs = defineCollection({
31
31
  .object({
32
32
  path: z.string(),
33
33
  absoluteFilePath: z.string(),
34
+ astroContentFilePath: z.string(),
34
35
  filePath: z.string(),
35
36
  publicPath: z.string(),
36
37
  type: z.string(),
@@ -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',
@@ -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',
@@ -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',