@eventcatalog/core 2.21.1 → 2.21.2
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/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-4CHHTLUN.js → chunk-IVTWUNVW.js} +1 -1
- package/dist/{chunk-KC3LZQXV.js → chunk-IZQ5RLJU.js} +1 -1
- package/dist/{chunk-6UDSGYH7.js → chunk-WS3IUCJN.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +42 -1
- package/dist/eventcatalog.js +44 -3
- package/package.json +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-IVTWUNVW.js";
|
|
4
|
+
import "../chunk-WS3IUCJN.js";
|
|
5
|
+
import "../chunk-IZQ5RLJU.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
161
161
|
var import_os = __toESM(require("os"), 1);
|
|
162
162
|
|
|
163
163
|
// package.json
|
|
164
|
-
var version = "2.21.
|
|
164
|
+
var version = "2.21.2";
|
|
165
165
|
|
|
166
166
|
// src/constants.ts
|
|
167
167
|
var VERSION = version;
|
|
@@ -513,6 +513,24 @@ var resolve_catalog_dependencies_default = async (catalogDir, core2) => {
|
|
|
513
513
|
};
|
|
514
514
|
|
|
515
515
|
// src/eventcatalog.ts
|
|
516
|
+
var import_semver = __toESM(require("semver"), 1);
|
|
517
|
+
var import_boxen = __toESM(require("boxen"), 1);
|
|
518
|
+
var boxenOptions = {
|
|
519
|
+
padding: 1,
|
|
520
|
+
margin: 1,
|
|
521
|
+
align: "center",
|
|
522
|
+
borderColor: "yellow",
|
|
523
|
+
borderStyle: {
|
|
524
|
+
topLeft: " ",
|
|
525
|
+
topRight: " ",
|
|
526
|
+
bottomLeft: " ",
|
|
527
|
+
bottomRight: " ",
|
|
528
|
+
right: " ",
|
|
529
|
+
top: "-",
|
|
530
|
+
bottom: "-",
|
|
531
|
+
left: " "
|
|
532
|
+
}
|
|
533
|
+
};
|
|
516
534
|
var currentDir = import_node_path7.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
517
535
|
var program = new import_commander.Command().version(VERSION);
|
|
518
536
|
var dir = import_node_path7.default.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
@@ -539,8 +557,30 @@ var copyCore = () => {
|
|
|
539
557
|
var clearCore = () => {
|
|
540
558
|
if (import_fs2.default.existsSync(core)) import_fs2.default.rmSync(core, { recursive: true });
|
|
541
559
|
};
|
|
560
|
+
var checkForUpdate = () => {
|
|
561
|
+
try {
|
|
562
|
+
const packageJson = JSON.parse(import_fs2.default.readFileSync(import_node_path7.default.join(dir, "package.json"), "utf-8"));
|
|
563
|
+
const userEventCatalogVersion = packageJson.dependencies["@eventcatalog/core"];
|
|
564
|
+
const corePackageJson = JSON.parse(import_fs2.default.readFileSync(import_node_path7.default.join(core, "package.json"), "utf-8"));
|
|
565
|
+
const coreVersion = corePackageJson.version;
|
|
566
|
+
const userVersion = userEventCatalogVersion.replace(/[\^~]/, "");
|
|
567
|
+
if (import_semver.default.lt(userVersion, coreVersion)) {
|
|
568
|
+
const docusaurusUpdateMessage = (0, import_boxen.default)(
|
|
569
|
+
`Update available for EventCatalog
|
|
570
|
+
@eventcatalog/core ${userVersion} \u2192 ${coreVersion}
|
|
571
|
+
|
|
572
|
+
Run \`npm i @eventcatalog/core@${coreVersion}\` to update your EventCatalog
|
|
573
|
+
`,
|
|
574
|
+
boxenOptions
|
|
575
|
+
);
|
|
576
|
+
console.log(docusaurusUpdateMessage);
|
|
577
|
+
}
|
|
578
|
+
} catch (error) {
|
|
579
|
+
}
|
|
580
|
+
};
|
|
542
581
|
program.command("dev").description("Run development server of EventCatalog").option("-d, --debug", "Output EventCatalog application information into your terminal").option("--force-recreate", "Recreate the eventcatalog-core directory", false).action(async (options, command) => {
|
|
543
582
|
console.log("Setting up EventCatalog....");
|
|
583
|
+
checkForUpdate();
|
|
544
584
|
if (options.debug) {
|
|
545
585
|
console.log("Debug mode enabled");
|
|
546
586
|
console.log("PROJECT_DIR", dir);
|
|
@@ -574,6 +614,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
574
614
|
});
|
|
575
615
|
program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
|
|
576
616
|
console.log("Building EventCatalog...");
|
|
617
|
+
checkForUpdate();
|
|
577
618
|
copyCore();
|
|
578
619
|
await log_build_default(dir);
|
|
579
620
|
await resolve_catalog_dependencies_default(dir, core);
|
package/dist/eventcatalog.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-FSKZU5FH.js";
|
|
4
4
|
import {
|
|
5
5
|
log_build_default
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-IVTWUNVW.js";
|
|
7
|
+
import "./chunk-WS3IUCJN.js";
|
|
8
8
|
import {
|
|
9
9
|
catalogToAstro
|
|
10
10
|
} from "./chunk-WF34R5UT.js";
|
|
11
11
|
import {
|
|
12
12
|
VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IZQ5RLJU.js";
|
|
14
14
|
import {
|
|
15
15
|
generate
|
|
16
16
|
} from "./chunk-YEQVKHST.js";
|
|
@@ -28,6 +28,24 @@ import fs from "fs";
|
|
|
28
28
|
import path from "node:path";
|
|
29
29
|
import { fileURLToPath } from "node:url";
|
|
30
30
|
import concurrently from "concurrently";
|
|
31
|
+
import semver from "semver";
|
|
32
|
+
import boxen from "boxen";
|
|
33
|
+
var boxenOptions = {
|
|
34
|
+
padding: 1,
|
|
35
|
+
margin: 1,
|
|
36
|
+
align: "center",
|
|
37
|
+
borderColor: "yellow",
|
|
38
|
+
borderStyle: {
|
|
39
|
+
topLeft: " ",
|
|
40
|
+
topRight: " ",
|
|
41
|
+
bottomLeft: " ",
|
|
42
|
+
bottomRight: " ",
|
|
43
|
+
right: " ",
|
|
44
|
+
top: "-",
|
|
45
|
+
bottom: "-",
|
|
46
|
+
left: " "
|
|
47
|
+
}
|
|
48
|
+
};
|
|
31
49
|
var currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
32
50
|
var program = new Command().version(VERSION);
|
|
33
51
|
var dir = path.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
@@ -54,8 +72,30 @@ var copyCore = () => {
|
|
|
54
72
|
var clearCore = () => {
|
|
55
73
|
if (fs.existsSync(core)) fs.rmSync(core, { recursive: true });
|
|
56
74
|
};
|
|
75
|
+
var checkForUpdate = () => {
|
|
76
|
+
try {
|
|
77
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(dir, "package.json"), "utf-8"));
|
|
78
|
+
const userEventCatalogVersion = packageJson.dependencies["@eventcatalog/core"];
|
|
79
|
+
const corePackageJson = JSON.parse(fs.readFileSync(path.join(core, "package.json"), "utf-8"));
|
|
80
|
+
const coreVersion = corePackageJson.version;
|
|
81
|
+
const userVersion = userEventCatalogVersion.replace(/[\^~]/, "");
|
|
82
|
+
if (semver.lt(userVersion, coreVersion)) {
|
|
83
|
+
const docusaurusUpdateMessage = boxen(
|
|
84
|
+
`Update available for EventCatalog
|
|
85
|
+
@eventcatalog/core ${userVersion} \u2192 ${coreVersion}
|
|
86
|
+
|
|
87
|
+
Run \`npm i @eventcatalog/core@${coreVersion}\` to update your EventCatalog
|
|
88
|
+
`,
|
|
89
|
+
boxenOptions
|
|
90
|
+
);
|
|
91
|
+
console.log(docusaurusUpdateMessage);
|
|
92
|
+
}
|
|
93
|
+
} catch (error) {
|
|
94
|
+
}
|
|
95
|
+
};
|
|
57
96
|
program.command("dev").description("Run development server of EventCatalog").option("-d, --debug", "Output EventCatalog application information into your terminal").option("--force-recreate", "Recreate the eventcatalog-core directory", false).action(async (options, command) => {
|
|
58
97
|
console.log("Setting up EventCatalog....");
|
|
98
|
+
checkForUpdate();
|
|
59
99
|
if (options.debug) {
|
|
60
100
|
console.log("Debug mode enabled");
|
|
61
101
|
console.log("PROJECT_DIR", dir);
|
|
@@ -89,6 +129,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
89
129
|
});
|
|
90
130
|
program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
|
|
91
131
|
console.log("Building EventCatalog...");
|
|
132
|
+
checkForUpdate();
|
|
92
133
|
copyCore();
|
|
93
134
|
await log_build_default(dir);
|
|
94
135
|
await resolve_catalog_dependencies_default(dir, core);
|
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.21.
|
|
9
|
+
"version": "2.21.2",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"astro-pagefind": "^1.6.0",
|
|
43
43
|
"astro-seo": "^0.8.4",
|
|
44
44
|
"axios": "^1.7.7",
|
|
45
|
+
"boxen": "^8.0.1",
|
|
45
46
|
"commander": "^12.1.0",
|
|
46
47
|
"concurrently": "^8.2.2",
|
|
47
48
|
"cross-env": "^7.0.3",
|