@eventcatalog/core 4.10.15 → 4.11.1

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.
Files changed (165) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/astro-output.cjs +60 -1
  6. package/dist/astro-output.js +1 -1
  7. package/dist/{chunk-U52FCZQ6.js → chunk-2YJRF4ZX.js} +1 -1
  8. package/dist/chunk-634NFV5U.js +75 -0
  9. package/dist/{chunk-I6HUOX4R.js → chunk-AXDNSGAN.js} +1 -1
  10. package/dist/chunk-DHH5U5PF.js +53 -0
  11. package/dist/{chunk-A4JRWRCV.js → chunk-DSCIWCX2.js} +1 -1
  12. package/dist/chunk-FWXEV4LF.js +19 -0
  13. package/dist/{chunk-Q2ATWE7N.js → chunk-GZVDXCYF.js} +1 -1
  14. package/dist/{chunk-7LWOCX4R.js → chunk-RYNPEIHQ.js} +1 -1
  15. package/dist/{chunk-HBVTU6ZP.js → chunk-YYVW4DCO.js} +1 -1
  16. package/dist/constants.cjs +1 -1
  17. package/dist/constants.js +1 -1
  18. package/dist/copy-core.cjs +88 -0
  19. package/dist/copy-core.d.cts +4 -0
  20. package/dist/copy-core.d.ts +4 -0
  21. package/dist/copy-core.js +8 -0
  22. package/dist/eventcatalog.cjs +234 -115
  23. package/dist/eventcatalog.js +36 -30
  24. package/dist/federation/federate.js +3 -3
  25. package/dist/federation/source-provider.js +2 -2
  26. package/dist/generate.cjs +1 -1
  27. package/dist/generate.js +3 -3
  28. package/dist/update-check.cjs +44 -0
  29. package/dist/update-check.d.cts +18 -0
  30. package/dist/update-check.d.ts +18 -0
  31. package/dist/update-check.js +8 -0
  32. package/dist/utils/cli-logger.cjs +1 -1
  33. package/dist/utils/cli-logger.js +2 -2
  34. package/eventcatalog/astro.config.mjs +8 -1
  35. package/eventcatalog/public/icons/languages/android.svg +1 -0
  36. package/eventcatalog/public/icons/languages/angular.svg +1 -0
  37. package/eventcatalog/public/icons/languages/apple.svg +1 -0
  38. package/eventcatalog/public/icons/languages/arduino.svg +1 -0
  39. package/eventcatalog/public/icons/languages/bash.svg +1 -0
  40. package/eventcatalog/public/icons/languages/bun.svg +1 -0
  41. package/eventcatalog/public/icons/languages/c.svg +1 -0
  42. package/eventcatalog/public/icons/languages/clojure.svg +1 -0
  43. package/eventcatalog/public/icons/languages/cpp.svg +1 -0
  44. package/eventcatalog/public/icons/languages/crystal.svg +1 -0
  45. package/eventcatalog/public/icons/languages/csharp.svg +1 -0
  46. package/eventcatalog/public/icons/languages/css.svg +1 -0
  47. package/eventcatalog/public/icons/languages/curl.svg +1 -0
  48. package/eventcatalog/public/icons/languages/dart.svg +1 -0
  49. package/eventcatalog/public/icons/languages/deno.svg +1 -0
  50. package/eventcatalog/public/icons/languages/docker.svg +1 -0
  51. package/eventcatalog/public/icons/languages/elm.svg +1 -0
  52. package/eventcatalog/public/icons/languages/erlang.svg +1 -0
  53. package/eventcatalog/public/icons/languages/flutter.svg +1 -0
  54. package/eventcatalog/public/icons/languages/fortran.svg +1 -0
  55. package/eventcatalog/public/icons/languages/fsharp.svg +1 -0
  56. package/eventcatalog/public/icons/languages/git.svg +1 -0
  57. package/eventcatalog/public/icons/languages/gradle.svg +1 -0
  58. package/eventcatalog/public/icons/languages/graphql.svg +1 -0
  59. package/eventcatalog/public/icons/languages/grpc.svg +1 -0
  60. package/eventcatalog/public/icons/languages/haskell.svg +1 -0
  61. package/eventcatalog/public/icons/languages/hasura.svg +1 -0
  62. package/eventcatalog/public/icons/languages/html.svg +1 -0
  63. package/eventcatalog/public/icons/languages/httpie.svg +1 -0
  64. package/eventcatalog/public/icons/languages/javascript.svg +1 -0
  65. package/eventcatalog/public/icons/languages/json-schema.svg +1 -0
  66. package/eventcatalog/public/icons/languages/json.svg +1 -0
  67. package/eventcatalog/public/icons/languages/julia.svg +1 -0
  68. package/eventcatalog/public/icons/languages/jupyter.svg +1 -0
  69. package/eventcatalog/public/icons/languages/kafka.svg +1 -0
  70. package/eventcatalog/public/icons/languages/kotlin.svg +1 -0
  71. package/eventcatalog/public/icons/languages/lua.svg +1 -0
  72. package/eventcatalog/public/icons/languages/markdown.svg +1 -0
  73. package/eventcatalog/public/icons/languages/maven.svg +1 -0
  74. package/eventcatalog/public/icons/languages/mongodb.svg +1 -0
  75. package/eventcatalog/public/icons/languages/mysql.svg +1 -0
  76. package/eventcatalog/public/icons/languages/nginx.svg +1 -0
  77. package/eventcatalog/public/icons/languages/nim.svg +1 -0
  78. package/eventcatalog/public/icons/languages/ocaml.svg +1 -0
  79. package/eventcatalog/public/icons/languages/perl.svg +1 -0
  80. package/eventcatalog/public/icons/languages/php.svg +1 -0
  81. package/eventcatalog/public/icons/languages/postgresql.svg +1 -0
  82. package/eventcatalog/public/icons/languages/prisma.svg +1 -0
  83. package/eventcatalog/public/icons/languages/purescript.svg +1 -0
  84. package/eventcatalog/public/icons/languages/python.svg +1 -0
  85. package/eventcatalog/public/icons/languages/r.svg +1 -0
  86. package/eventcatalog/public/icons/languages/react.svg +1 -0
  87. package/eventcatalog/public/icons/languages/reasonml.svg +1 -0
  88. package/eventcatalog/public/icons/languages/redis.svg +1 -0
  89. package/eventcatalog/public/icons/languages/ruby.svg +1 -0
  90. package/eventcatalog/public/icons/languages/rust.svg +1 -0
  91. package/eventcatalog/public/icons/languages/sass.svg +1 -0
  92. package/eventcatalog/public/icons/languages/scala.svg +1 -0
  93. package/eventcatalog/public/icons/languages/solidity.svg +1 -0
  94. package/eventcatalog/public/icons/languages/spring.svg +1 -0
  95. package/eventcatalog/public/icons/languages/sqlite.svg +1 -0
  96. package/eventcatalog/public/icons/languages/svelte.svg +1 -0
  97. package/eventcatalog/public/icons/languages/swagger.svg +1 -0
  98. package/eventcatalog/public/icons/languages/swift.svg +1 -0
  99. package/eventcatalog/public/icons/languages/tailwind.svg +1 -0
  100. package/eventcatalog/public/icons/languages/terraform.svg +1 -0
  101. package/eventcatalog/public/icons/languages/toml.svg +1 -0
  102. package/eventcatalog/public/icons/languages/typescript.svg +1 -0
  103. package/eventcatalog/public/icons/languages/unity.svg +1 -0
  104. package/eventcatalog/public/icons/languages/vim.svg +1 -0
  105. package/eventcatalog/public/icons/languages/vue.svg +1 -0
  106. package/eventcatalog/public/icons/languages/webassembly.svg +1 -0
  107. package/eventcatalog/public/icons/languages/yaml.svg +1 -0
  108. package/eventcatalog/public/icons/languages/zig.svg +1 -0
  109. package/eventcatalog/src/components/MDX/CodeGroup/CodeGroup.astro +12 -0
  110. package/eventcatalog/src/components/MDX/CodeGroup/CodeGroup.tsx +176 -0
  111. package/eventcatalog/src/components/MDX/CodeGroup/MarkdownCodeGroup.tsx +22 -0
  112. package/eventcatalog/src/components/MDX/CodeGroup/code-group-icons.ts +345 -0
  113. package/eventcatalog/src/components/MDX/CodeGroup/code-group.css +22 -0
  114. package/eventcatalog/src/components/MDX/CodeGroup/parse-panels.ts +11 -0
  115. package/eventcatalog/src/components/MDX/Columns/Column.astro +10 -0
  116. package/eventcatalog/src/components/MDX/Columns/Columns.astro +14 -0
  117. package/eventcatalog/src/components/MDX/Columns/MarkdownColumns.tsx +37 -0
  118. package/eventcatalog/src/components/MDX/Columns/layout.ts +16 -0
  119. package/eventcatalog/src/components/MDX/components.tsx +6 -0
  120. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -1
  121. package/eventcatalog/src/components/SchemaExplorer/ExamplesViewer.tsx +151 -114
  122. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +510 -248
  123. package/eventcatalog/src/components/SchemaExplorer/SchemaFlows.tsx +76 -0
  124. package/eventcatalog/src/components/SchemaExplorer/SchemaGraph.tsx +47 -0
  125. package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +11 -0
  126. package/eventcatalog/src/components/SchemaExplorer/SchemaUsage.tsx +17 -0
  127. package/eventcatalog/src/components/SchemaExplorer/types.ts +48 -3
  128. package/eventcatalog/src/components/SchemaExplorer/utils.ts +28 -1
  129. package/eventcatalog/src/content.config.ts +28 -0
  130. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/examples/[...filename].astro +38 -7
  131. package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +144 -37
  132. package/eventcatalog/src/pages/schemas/explorer/index.astro +5 -0
  133. package/eventcatalog/src/plugins/empty-collection-warning.d.ts +21 -0
  134. package/eventcatalog/src/plugins/empty-collection-warning.mjs +107 -0
  135. package/eventcatalog/src/plugins/quiet-empty-collections-logger.mjs +11 -0
  136. package/eventcatalog/src/remark-plugins/code-group.ts +39 -0
  137. package/eventcatalog/src/remark-plugins/markdown-code-group.ts +59 -0
  138. package/eventcatalog/src/remark-plugins/markdown-columns.ts +66 -0
  139. package/eventcatalog/src/utils/collections/channels.ts +12 -4
  140. package/eventcatalog/src/utils/collections/examples.ts +133 -41
  141. package/eventcatalog/src/utils/collections/flows.ts +43 -0
  142. package/eventcatalog/src/utils/collections/messages.ts +2 -2
  143. package/eventcatalog/src/utils/collections/schemas.ts +15 -0
  144. package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +17 -15
  145. package/eventcatalog/src/utils/schema-explorer.ts +73 -7
  146. package/eventcatalog/src/utils/schema-usage-graph.ts +92 -0
  147. package/package.json +5 -4
  148. package/dist/chunk-RDYYZQYU.js +0 -18
  149. package/eventcatalog/src/components/EnvironmentDropdown.test.ts +0 -64
  150. package/eventcatalog/src/components/Grids/message-link.spec.ts +0 -59
  151. package/eventcatalog/src/components/MDX/CustomProperties/custom-properties.spec.ts +0 -38
  152. package/eventcatalog/src/components/MDX/SchemaViewer/schema-viewer-utils.spec.ts +0 -116
  153. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.test.tsx +0 -114
  154. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.test.tsx +0 -91
  155. package/eventcatalog/src/components/SchemaExplorer/SchemaViewerHover.test.tsx +0 -33
  156. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.test.ts +0 -84
  157. package/eventcatalog/src/components/Search/search-utils.spec.ts +0 -173
  158. package/eventcatalog/src/components/SideNav/NestedSideBar/utils.spec.ts +0 -105
  159. package/eventcatalog/src/components/navigation-progress.spec.ts +0 -68
  160. package/eventcatalog/src/enterprise/directory/user-team-directory.spec.ts +0 -527
  161. package/eventcatalog/src/enterprise/fields/field-extractor.test.ts +0 -302
  162. package/eventcatalog/src/enterprise/fields/fields-db.test.ts +0 -185
  163. package/eventcatalog/src/stores/eventcatalog-store.spec.ts +0 -60
  164. package/eventcatalog/src/utils/collections/glob-loader.spec.ts +0 -87
  165. package/dist/{chunk-6K7XZAYI.js → chunk-A2RZR3U4.js} +3 -3
@@ -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.10.15";
39
+ var version = "4.11.1";
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-A4JRWRCV.js";
4
- import "../chunk-I6HUOX4R.js";
3
+ } from "../chunk-DSCIWCX2.js";
4
+ import "../chunk-AXDNSGAN.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.10.15";
143
+ var version = "4.11.1";
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-Q2ATWE7N.js";
4
- import "../chunk-A4JRWRCV.js";
3
+ } from "../chunk-GZVDXCYF.js";
4
+ import "../chunk-DSCIWCX2.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
- import "../chunk-I6HUOX4R.js";
6
+ import "../chunk-AXDNSGAN.js";
7
7
  import "../chunk-6QENHZZP.js";
8
8
  export {
9
9
  log_build_default as default
@@ -24,10 +24,69 @@ __export(astro_output_exports, {
24
24
  createAstroLineFilter: () => createAstroLineFilter
25
25
  });
26
26
  module.exports = __toCommonJS(astro_output_exports);
27
+
28
+ // eventcatalog/src/plugins/empty-collection-warning.mjs
29
+ var KNOWN_EVENTCATALOG_COLLECTIONS = /* @__PURE__ */ new Set([
30
+ "events",
31
+ "commands",
32
+ "queries",
33
+ "examples",
34
+ "services",
35
+ "agents",
36
+ "adrs",
37
+ "channels",
38
+ "users",
39
+ "teams",
40
+ "domains",
41
+ "systems",
42
+ "flows",
43
+ "pages",
44
+ "changelogs",
45
+ "containers",
46
+ "data-products",
47
+ "ubiquitousLanguages",
48
+ "entities",
49
+ "customPages",
50
+ "resourceDocs",
51
+ "resourceDocCategories",
52
+ "designs",
53
+ "diagrams",
54
+ "schemas",
55
+ "sidebars"
56
+ ]);
57
+ var EMPTY_COLLECTION_MESSAGE = /^The collection ("(?:\\.|[^"\\])*") does not exist or is empty\. Please check your content config file for errors\.$/;
58
+ var ANSI_PATTERN = /\u001B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g;
59
+ var ASTRO_CONTENT_WARN_PREFIX = /^[^[\]]*\[WARN\]\s+\[content\](?:\s+\[[^\]]+\])*\s*$/;
60
+ function collectionNameFromEmptyWarning(message) {
61
+ const match = message.match(EMPTY_COLLECTION_MESSAGE);
62
+ if (!match) return null;
63
+ try {
64
+ const name = JSON.parse(match[1]);
65
+ return typeof name === "string" ? name : null;
66
+ } catch {
67
+ return null;
68
+ }
69
+ }
70
+ function isIntentionalEmptyCollectionMessage(message) {
71
+ const name = collectionNameFromEmptyWarning(message);
72
+ return name !== null && KNOWN_EVENTCATALOG_COLLECTIONS.has(name);
73
+ }
74
+ function isIntentionalEmptyCollectionLine(line) {
75
+ const plain = line.replace(ANSI_PATTERN, "").replace(/\r/g, "").trim();
76
+ const marker = 'The collection "';
77
+ const start = plain.indexOf(marker);
78
+ if (start === -1) return false;
79
+ const message = plain.slice(start).trim();
80
+ if (!isIntentionalEmptyCollectionMessage(message)) return false;
81
+ const before = plain.slice(0, start).trim();
82
+ return before.length === 0 || ASTRO_CONTENT_WARN_PREFIX.test(before);
83
+ }
84
+
85
+ // src/astro-output.ts
27
86
  var createAstroLineFilter = () => {
28
87
  return (line) => {
29
88
  const isIgnoredGetStaticPathsWarning = line.includes("[router]") && line.includes("getStaticPaths() ignored in dynamic page");
30
- return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || /^\s*The collection ".*" does not exist or is empty\. Please check your content config file for errors\.\s*$/.test(line);
89
+ return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || isIntentionalEmptyCollectionLine(line);
31
90
  };
32
91
  };
33
92
  var createAstroDevLineFilter = () => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAstroDevLineFilter,
3
3
  createAstroLineFilter
4
- } from "./chunk-RDYYZQYU.js";
4
+ } from "./chunk-634NFV5U.js";
5
5
  export {
6
6
  createAstroDevLineFilter,
7
7
  createAstroLineFilter
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-5EPNFDT5.js";
7
7
  import {
8
8
  createFederationSourceProvider
9
- } from "./chunk-6K7XZAYI.js";
9
+ } from "./chunk-A2RZR3U4.js";
10
10
  import {
11
11
  createFederationContentCache
12
12
  } from "./chunk-R7Z5ALYI.js";
@@ -0,0 +1,75 @@
1
+ // eventcatalog/src/plugins/empty-collection-warning.mjs
2
+ var KNOWN_EVENTCATALOG_COLLECTIONS = /* @__PURE__ */ new Set([
3
+ "events",
4
+ "commands",
5
+ "queries",
6
+ "examples",
7
+ "services",
8
+ "agents",
9
+ "adrs",
10
+ "channels",
11
+ "users",
12
+ "teams",
13
+ "domains",
14
+ "systems",
15
+ "flows",
16
+ "pages",
17
+ "changelogs",
18
+ "containers",
19
+ "data-products",
20
+ "ubiquitousLanguages",
21
+ "entities",
22
+ "customPages",
23
+ "resourceDocs",
24
+ "resourceDocCategories",
25
+ "designs",
26
+ "diagrams",
27
+ "schemas",
28
+ "sidebars"
29
+ ]);
30
+ var EMPTY_COLLECTION_MESSAGE = /^The collection ("(?:\\.|[^"\\])*") does not exist or is empty\. Please check your content config file for errors\.$/;
31
+ var ANSI_PATTERN = /\u001B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g;
32
+ var ASTRO_CONTENT_WARN_PREFIX = /^[^[\]]*\[WARN\]\s+\[content\](?:\s+\[[^\]]+\])*\s*$/;
33
+ function collectionNameFromEmptyWarning(message) {
34
+ const match = message.match(EMPTY_COLLECTION_MESSAGE);
35
+ if (!match) return null;
36
+ try {
37
+ const name = JSON.parse(match[1]);
38
+ return typeof name === "string" ? name : null;
39
+ } catch {
40
+ return null;
41
+ }
42
+ }
43
+ function isIntentionalEmptyCollectionMessage(message) {
44
+ const name = collectionNameFromEmptyWarning(message);
45
+ return name !== null && KNOWN_EVENTCATALOG_COLLECTIONS.has(name);
46
+ }
47
+ function isIntentionalEmptyCollectionLine(line) {
48
+ const plain = line.replace(ANSI_PATTERN, "").replace(/\r/g, "").trim();
49
+ const marker = 'The collection "';
50
+ const start = plain.indexOf(marker);
51
+ if (start === -1) return false;
52
+ const message = plain.slice(start).trim();
53
+ if (!isIntentionalEmptyCollectionMessage(message)) return false;
54
+ const before = plain.slice(0, start).trim();
55
+ return before.length === 0 || ASTRO_CONTENT_WARN_PREFIX.test(before);
56
+ }
57
+
58
+ // src/astro-output.ts
59
+ var createAstroLineFilter = () => {
60
+ return (line) => {
61
+ const isIgnoredGetStaticPathsWarning = line.includes("[router]") && line.includes("getStaticPaths() ignored in dynamic page");
62
+ return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || isIntentionalEmptyCollectionLine(line);
63
+ };
64
+ };
65
+ var createAstroDevLineFilter = () => {
66
+ const shouldFilterAstroLine = createAstroLineFilter();
67
+ return (line) => {
68
+ return shouldFilterAstroLine(line) || line.includes("[router]");
69
+ };
70
+ };
71
+
72
+ export {
73
+ createAstroLineFilter,
74
+ createAstroDevLineFilter
75
+ };
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.10.15";
2
+ var version = "4.11.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -0,0 +1,53 @@
1
+ // src/copy-core.ts
2
+ import fs from "fs";
3
+ import path from "path";
4
+ var IGNORED_CORE_DIRECTORIES = /* @__PURE__ */ new Set([".astro", "dist", "node_modules", "__tests__"]);
5
+ var COLOCATED_TEST_SUFFIXES = [
6
+ ".spec.js",
7
+ ".spec.jsx",
8
+ ".spec.cjs",
9
+ ".spec.mjs",
10
+ ".spec.ts",
11
+ ".spec.tsx",
12
+ ".spec.cts",
13
+ ".spec.mts",
14
+ ".test.js",
15
+ ".test.jsx",
16
+ ".test.cjs",
17
+ ".test.mjs",
18
+ ".test.ts",
19
+ ".test.tsx",
20
+ ".test.cts",
21
+ ".test.mts"
22
+ ];
23
+ var isColocatedTestFile = (fileName) => COLOCATED_TEST_SUFFIXES.some((suffix) => fileName.endsWith(suffix));
24
+ var shouldCopyCoreEntry = (sourceRoot, sourcePath) => {
25
+ const relativePath = path.relative(sourceRoot, sourcePath);
26
+ if (relativePath === "") return true;
27
+ const pathParts = relativePath.split(path.sep);
28
+ if (pathParts.some((part) => IGNORED_CORE_DIRECTORIES.has(part))) return false;
29
+ const fileName = pathParts[pathParts.length - 1] ?? "";
30
+ return !isColocatedTestFile(fileName);
31
+ };
32
+ var PRUNE_SKIPPED_DIRECTORIES = /* @__PURE__ */ new Set([".astro", "dist", "node_modules"]);
33
+ var pruneExcludedCoreEntries = (coreDir) => {
34
+ if (!fs.existsSync(coreDir)) return;
35
+ const visit = (directory) => {
36
+ for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
37
+ const entryPath = path.join(directory, entry.name);
38
+ if (entry.name === "__tests__" || isColocatedTestFile(entry.name)) {
39
+ fs.rmSync(entryPath, { recursive: true, force: true });
40
+ continue;
41
+ }
42
+ if (entry.isDirectory() && !PRUNE_SKIPPED_DIRECTORIES.has(entry.name)) {
43
+ visit(entryPath);
44
+ }
45
+ }
46
+ };
47
+ visit(coreDir);
48
+ };
49
+
50
+ export {
51
+ shouldCopyCoreEntry,
52
+ pruneExcludedCoreEntries
53
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-I6HUOX4R.js";
3
+ } from "./chunk-AXDNSGAN.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -0,0 +1,19 @@
1
+ // src/update-check.ts
2
+ import { gt, valid } from "semver";
3
+ var resolveInstalledCoreVersion = (runningVersion, declaredDependency) => {
4
+ if (valid(runningVersion)) return runningVersion;
5
+ if (declaredDependency && valid(declaredDependency)) return declaredDependency;
6
+ return null;
7
+ };
8
+ var getEventCatalogUpdateMessage = (current, latest) => {
9
+ if (!latest || !valid(current) || !valid(latest) || !gt(latest, current)) {
10
+ return null;
11
+ }
12
+ return `EventCatalog update available ${current} \u2192 ${latest}
13
+ Run npm i @eventcatalog/core to update`;
14
+ };
15
+
16
+ export {
17
+ resolveInstalledCoreVersion,
18
+ getEventCatalogUpdateMessage
19
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-A4JRWRCV.js";
3
+ } from "./chunk-DSCIWCX2.js";
4
4
  import {
5
5
  countResources,
6
6
  hashCatalogContent,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-HBVTU6ZP.js";
3
+ } from "./chunk-YYVW4DCO.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-I6HUOX4R.js";
3
+ } from "./chunk-AXDNSGAN.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.10.15";
28
+ var version = "4.11.1";
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-I6HUOX4R.js";
3
+ } from "./chunk-AXDNSGAN.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/copy-core.ts
31
+ var copy_core_exports = {};
32
+ __export(copy_core_exports, {
33
+ pruneExcludedCoreEntries: () => pruneExcludedCoreEntries,
34
+ shouldCopyCoreEntry: () => shouldCopyCoreEntry
35
+ });
36
+ module.exports = __toCommonJS(copy_core_exports);
37
+ var import_node_fs = __toESM(require("fs"), 1);
38
+ var import_node_path = __toESM(require("path"), 1);
39
+ var IGNORED_CORE_DIRECTORIES = /* @__PURE__ */ new Set([".astro", "dist", "node_modules", "__tests__"]);
40
+ var COLOCATED_TEST_SUFFIXES = [
41
+ ".spec.js",
42
+ ".spec.jsx",
43
+ ".spec.cjs",
44
+ ".spec.mjs",
45
+ ".spec.ts",
46
+ ".spec.tsx",
47
+ ".spec.cts",
48
+ ".spec.mts",
49
+ ".test.js",
50
+ ".test.jsx",
51
+ ".test.cjs",
52
+ ".test.mjs",
53
+ ".test.ts",
54
+ ".test.tsx",
55
+ ".test.cts",
56
+ ".test.mts"
57
+ ];
58
+ var isColocatedTestFile = (fileName) => COLOCATED_TEST_SUFFIXES.some((suffix) => fileName.endsWith(suffix));
59
+ var shouldCopyCoreEntry = (sourceRoot, sourcePath) => {
60
+ const relativePath = import_node_path.default.relative(sourceRoot, sourcePath);
61
+ if (relativePath === "") return true;
62
+ const pathParts = relativePath.split(import_node_path.default.sep);
63
+ if (pathParts.some((part) => IGNORED_CORE_DIRECTORIES.has(part))) return false;
64
+ const fileName = pathParts[pathParts.length - 1] ?? "";
65
+ return !isColocatedTestFile(fileName);
66
+ };
67
+ var PRUNE_SKIPPED_DIRECTORIES = /* @__PURE__ */ new Set([".astro", "dist", "node_modules"]);
68
+ var pruneExcludedCoreEntries = (coreDir) => {
69
+ if (!import_node_fs.default.existsSync(coreDir)) return;
70
+ const visit = (directory) => {
71
+ for (const entry of import_node_fs.default.readdirSync(directory, { withFileTypes: true })) {
72
+ const entryPath = import_node_path.default.join(directory, entry.name);
73
+ if (entry.name === "__tests__" || isColocatedTestFile(entry.name)) {
74
+ import_node_fs.default.rmSync(entryPath, { recursive: true, force: true });
75
+ continue;
76
+ }
77
+ if (entry.isDirectory() && !PRUNE_SKIPPED_DIRECTORIES.has(entry.name)) {
78
+ visit(entryPath);
79
+ }
80
+ }
81
+ };
82
+ visit(coreDir);
83
+ };
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ pruneExcludedCoreEntries,
87
+ shouldCopyCoreEntry
88
+ });
@@ -0,0 +1,4 @@
1
+ declare const shouldCopyCoreEntry: (sourceRoot: string, sourcePath: string) => boolean;
2
+ declare const pruneExcludedCoreEntries: (coreDir: string) => void;
3
+
4
+ export { pruneExcludedCoreEntries, shouldCopyCoreEntry };
@@ -0,0 +1,4 @@
1
+ declare const shouldCopyCoreEntry: (sourceRoot: string, sourcePath: string) => boolean;
2
+ declare const pruneExcludedCoreEntries: (coreDir: string) => void;
3
+
4
+ export { pruneExcludedCoreEntries, shouldCopyCoreEntry };
@@ -0,0 +1,8 @@
1
+ import {
2
+ pruneExcludedCoreEntries,
3
+ shouldCopyCoreEntry
4
+ } from "./chunk-DHH5U5PF.js";
5
+ export {
6
+ pruneExcludedCoreEntries,
7
+ shouldCopyCoreEntry
8
+ };