@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 +12 -0
- package/package.json +1 -1
- package/scripts/generate.js +5 -6
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/scripts/generate.js
CHANGED
|
@@ -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
|
|