@eventcatalog/core 4.1.0 → 4.1.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.
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.1.0";
39
+ var version = "4.1.2";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-PL4YZUAA.js";
4
- import "../chunk-OQ36RUHT.js";
3
+ } from "../chunk-6MLMZ7C6.js";
4
+ import "../chunk-BAPUZSRK.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
140
140
  var import_os = __toESM(require("os"), 1);
141
141
 
142
142
  // package.json
143
- var version = "4.1.0";
143
+ var version = "4.1.2";
144
144
 
145
145
  // src/constants.ts
146
146
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-2T6ESD3L.js";
4
- import "../chunk-PL4YZUAA.js";
3
+ } from "../chunk-XDI5KMKL.js";
4
+ import "../chunk-6MLMZ7C6.js";
5
5
  import "../chunk-DAOXTQVS.js";
6
- import "../chunk-OQ36RUHT.js";
6
+ import "../chunk-BAPUZSRK.js";
7
7
  import "../chunk-6QENHZZP.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-OQ36RUHT.js";
3
+ } from "./chunk-BAPUZSRK.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -20,6 +20,9 @@ var logger = {
20
20
  console.log(
21
21
  pc.dim("If you like the project, we would appreciate a star on GitHub \u2764\uFE0F - ") + pc.bold("https://github.com/event-catalog/eventcatalog/stargazers")
22
22
  );
23
+ console.log(
24
+ pc.dim("Using AI? Install EventCatalog Skills to help you manage your catalog - ") + pc.bold("https://github.com/event-catalog/skills")
25
+ );
23
26
  console.log();
24
27
  },
25
28
  info: (message, tag = "info") => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-OQ36RUHT.js";
3
+ } from "./chunk-BAPUZSRK.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.1.0";
2
+ var version = "4.1.2";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-RXZKZGDC.js";
3
+ } from "./chunk-2HP7DWTG.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-PL4YZUAA.js";
3
+ } from "./chunk-6MLMZ7C6.js";
4
4
  import {
5
5
  countResources,
6
6
  serializeCounts
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.1.0";
28
+ var version = "4.1.2";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-OQ36RUHT.js";
3
+ } from "./chunk-BAPUZSRK.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
144
144
  var import_picocolors = __toESM(require("picocolors"), 1);
145
145
 
146
146
  // package.json
147
- var version = "4.1.0";
147
+ var version = "4.1.2";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -166,6 +166,9 @@ var logger = {
166
166
  console.log(
167
167
  import_picocolors.default.dim("If you like the project, we would appreciate a star on GitHub \u2764\uFE0F - ") + import_picocolors.default.bold("https://github.com/event-catalog/eventcatalog/stargazers")
168
168
  );
169
+ console.log(
170
+ import_picocolors.default.dim("Using AI? Install EventCatalog Skills to help you manage your catalog - ") + import_picocolors.default.bold("https://github.com/event-catalog/skills")
171
+ );
169
172
  console.log();
170
173
  },
171
174
  info: (message, tag = "info") => {
@@ -1,16 +1,14 @@
1
1
  import {
2
2
  log_build_default
3
- } from "./chunk-2T6ESD3L.js";
4
- import {
5
- runMigrations
6
- } from "./chunk-XUAF2H54.js";
7
- import "./chunk-CA4U2JP7.js";
3
+ } from "./chunk-XDI5KMKL.js";
4
+ import "./chunk-6MLMZ7C6.js";
5
+ import "./chunk-DAOXTQVS.js";
8
6
  import {
9
7
  generate
10
- } from "./chunk-2PPDVKNK.js";
8
+ } from "./chunk-UKC6BKFK.js";
11
9
  import {
12
10
  logger
13
- } from "./chunk-RXZKZGDC.js";
11
+ } from "./chunk-2HP7DWTG.js";
14
12
  import {
15
13
  resolve_catalog_dependencies_default
16
14
  } from "./chunk-LHR4G2UO.js";
@@ -20,15 +18,17 @@ import {
20
18
  import {
21
19
  watch
22
20
  } from "./chunk-CAJUIMDJ.js";
23
- import "./chunk-PL4YZUAA.js";
24
- import "./chunk-DAOXTQVS.js";
21
+ import {
22
+ runMigrations
23
+ } from "./chunk-XUAF2H54.js";
24
+ import "./chunk-CA4U2JP7.js";
25
25
  import {
26
26
  catalogToAstro
27
27
  } from "./chunk-W3SAPOZU.js";
28
28
  import "./chunk-W5JQON7Z.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-OQ36RUHT.js";
31
+ } from "./chunk-BAPUZSRK.js";
32
32
  import {
33
33
  linkCoreNodeModules,
34
34
  resolveInstalledCoreNodeModules
package/dist/generate.cjs CHANGED
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
108
108
  var import_picocolors = __toESM(require("picocolors"), 1);
109
109
 
110
110
  // package.json
111
- var version = "4.1.0";
111
+ var version = "4.1.2";
112
112
 
113
113
  // src/constants.ts
114
114
  var VERSION = version;
@@ -130,6 +130,9 @@ var logger = {
130
130
  console.log(
131
131
  import_picocolors.default.dim("If you like the project, we would appreciate a star on GitHub \u2764\uFE0F - ") + import_picocolors.default.bold("https://github.com/event-catalog/eventcatalog/stargazers")
132
132
  );
133
+ console.log(
134
+ import_picocolors.default.dim("Using AI? Install EventCatalog Skills to help you manage your catalog - ") + import_picocolors.default.bold("https://github.com/event-catalog/skills")
135
+ );
133
136
  console.log();
134
137
  },
135
138
  info: (message, tag = "info") => {
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-2PPDVKNK.js";
4
- import "./chunk-RXZKZGDC.js";
5
- import "./chunk-OQ36RUHT.js";
3
+ } from "./chunk-UKC6BKFK.js";
4
+ import "./chunk-2HP7DWTG.js";
5
+ import "./chunk-BAPUZSRK.js";
6
6
  import "./chunk-6QENHZZP.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.1.0";
39
+ var version = "4.1.2";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -58,6 +58,9 @@ var logger = {
58
58
  console.log(
59
59
  import_picocolors.default.dim("If you like the project, we would appreciate a star on GitHub \u2764\uFE0F - ") + import_picocolors.default.bold("https://github.com/event-catalog/eventcatalog/stargazers")
60
60
  );
61
+ console.log(
62
+ import_picocolors.default.dim("Using AI? Install EventCatalog Skills to help you manage your catalog - ") + import_picocolors.default.bold("https://github.com/event-catalog/skills")
63
+ );
61
64
  console.log();
62
65
  },
63
66
  info: (message, tag = "info") => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-RXZKZGDC.js";
4
- import "../chunk-OQ36RUHT.js";
3
+ } from "../chunk-2HP7DWTG.js";
4
+ import "../chunk-BAPUZSRK.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -15,6 +15,7 @@ import remarkComment from 'remark-comment';
15
15
  import rehypeSlug from 'rehype-slug';
16
16
  import rehypeAutolinkHeadings from 'rehype-autolink-headings';
17
17
  import { eventCatalogLikeC4 } from './src/plugins/likec4';
18
+ import { astroTrailingSlashEndpointFix } from './src/plugins/astro-trailing-slash-endpoint-fix';
18
19
 
19
20
  import rehypeExpressiveCode from 'rehype-expressive-code';
20
21
 
@@ -116,7 +117,11 @@ export default defineConfig({
116
117
  eventCatalogIntegration(),
117
118
  ].filter(Boolean),
118
119
  vite: {
119
- plugins: [tailwindcss(), ...(await eventCatalogLikeC4(projectDirectory))],
120
+ plugins: [
121
+ tailwindcss(),
122
+ ...(await eventCatalogLikeC4(projectDirectory)),
123
+ ...(config.trailingSlash === true ? [astroTrailingSlashEndpointFix()] : []),
124
+ ],
120
125
  define: {
121
126
  /**
122
127
  * Trailing slash is exposed as global variable here principally for `@utils/url-builder`.
@@ -0,0 +1,52 @@
1
+ import type { Plugin } from 'vite';
2
+
3
+ // Works around a regression in Astro >= 7.0.4 (withastro/astro PR #17224).
4
+ //
5
+ // With `trailingSlash: 'always'`, Astro's prerender path generation
6
+ // (dist/runtime/prerender/static-paths.js) appends a trailing slash to every
7
+ // generated path, including dynamic file endpoints such as
8
+ // /docs/teams/[id].md -> /docs/teams/customer-platform.md/. Since 7.0.4 the
9
+ // route *pattern* for those endpoints no longer accepts a trailing slash, so
10
+ // at render time `getParams` fails to extract any params and static builds
11
+ // crash with `TypeError: Missing parameter: id`.
12
+ //
13
+ // The generation side runs in the Astro CLI process and cannot be patched
14
+ // here, but `getParams` (dist/core/render/params-and-props.js) is bundled
15
+ // through Vite into the prerender/server entries. This plugin rewrites it to
16
+ // retry with the trailing slash flipped when no route pattern matches - a
17
+ // no-op on unaffected Astro versions and once the regression is fixed
18
+ // upstream.
19
+ //
20
+ // The regex below matches Astro 7.0.3 (`const paramsMatch`) through 7.0.7
21
+ // (`let paramsMatch`). A unit test asserts it still applies to the installed
22
+ // Astro version so a future refactor is caught in CI rather than as a broken
23
+ // user build.
24
+ const GET_PARAMS_PATTERN =
25
+ /(?:const|let)( paramsMatch = allPatterns\.map\(\(pattern\) => pattern\.exec\(path\)\)\.find\(\(x\) => x\);)/;
26
+
27
+ export const applyGetParamsTrailingSlashFix = (code: string): string | undefined => {
28
+ if (!GET_PARAMS_PATTERN.test(code)) return undefined;
29
+ return code.replace(
30
+ GET_PARAMS_PATTERN,
31
+ `let$1
32
+ if (!paramsMatch) {
33
+ const flipped = path.endsWith('/') ? path.slice(0, -1) : path + '/';
34
+ paramsMatch = allPatterns.map((p) => p.exec(flipped)).find((x) => x);
35
+ }`
36
+ );
37
+ };
38
+
39
+ export const astroTrailingSlashEndpointFix = (): Plugin => ({
40
+ name: 'eventcatalog:astro-trailing-slash-endpoint-fix',
41
+ transform(code, id) {
42
+ if (!id.replace(/\\/g, '/').includes('astro/dist/core/render/params-and-props.js')) return;
43
+ const patched = applyGetParamsTrailingSlashFix(code);
44
+ if (!patched) {
45
+ console.warn(
46
+ '[eventcatalog] Could not apply the Astro trailing-slash endpoint fix; builds with trailingSlash: true may fail. Please raise an issue at https://github.com/event-catalog/eventcatalog/issues'
47
+ );
48
+ return;
49
+ }
50
+ return { code: patched, map: null };
51
+ },
52
+ });
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.1.0",
10
+ "version": "4.1.2",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -116,9 +116,9 @@
116
116
  "update-notifier": "^7.3.1",
117
117
  "uuid": "^10.0.0",
118
118
  "zod": "^4.3.6",
119
+ "@eventcatalog/linter": "1.1.4",
119
120
  "@eventcatalog/sdk": "2.25.0",
120
- "@eventcatalog/visualiser": "^4.0.1",
121
- "@eventcatalog/linter": "1.1.4"
121
+ "@eventcatalog/visualiser": "^4.0.1"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@astrojs/check": "^0.9.9",