@eventcatalog/core 2.7.7 → 2.7.9

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,17 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.7.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 4cad2eb: fix(core): fixing generate command (again)
8
+
9
+ ## 2.7.8
10
+
11
+ ### Patch Changes
12
+
13
+ - c67052f: fix(core): fixed generate command
14
+
3
15
  ## 2.7.7
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.7.7",
4
+ "version": "2.7.9",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import { getEventCatalogConfigFile, cleanup } from './eventcatalog-config-file-utils';
2
+ import { getEventCatalogConfigFile, cleanup } from './eventcatalog-config-file-utils.js';
3
3
 
4
4
  function getDefaultExport(importedModule) {
5
5
  if (importedModule === null || typeof importedModule !== 'object') {
@@ -18,9 +18,8 @@ function getDefaultExport(importedModule) {
18
18
  }
19
19
 
20
20
  const generate = async () => {
21
+ const PROJECT_DIRECTORY = process.env.PROJECT_DIR;
21
22
  try {
22
- const PROJECT_DIRECTORY = process.env.PROJECT_DIR;
23
-
24
23
  const config = await getEventCatalogConfigFile(PROJECT_DIRECTORY);
25
24
 
26
25
  const { generators = [] } = config;
@@ -53,16 +52,16 @@ const generate = async () => {
53
52
  // Use importedGenerator here
54
53
  } catch (error) {
55
54
  console.error('Error loading plugin:', error);
56
- await cleanup();
55
+ await cleanup(PROJECT_DIRECTORY);
57
56
  return;
58
57
  }
59
58
  }
60
59
 
61
- await cleanup();
60
+ await cleanup(PROJECT_DIRECTORY);
62
61
  } catch (error) {
63
62
  // Failed to generate clean up...
64
63
  console.error(error);
65
- await cleanup();
64
+ await cleanup(PROJECT_DIRECTORY);
66
65
  }
67
66
  };
68
67