@eventcatalog/core 2.14.2 → 2.15.0

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 (229) hide show
  1. package/README.md +4 -3
  2. package/bin/eventcatalog.js +2 -0
  3. package/dist/analytics/analytics.cjs +71 -0
  4. package/dist/analytics/analytics.d.cts +3 -0
  5. package/dist/analytics/analytics.d.ts +3 -0
  6. package/dist/analytics/analytics.js +7 -0
  7. package/dist/analytics/log-build.cjs +155 -0
  8. package/dist/analytics/log-build.d.cts +7 -0
  9. package/dist/analytics/log-build.d.ts +7 -0
  10. package/dist/analytics/log-build.js +9 -0
  11. package/dist/catalog-to-astro-content-directory.cjs +277 -0
  12. package/dist/catalog-to-astro-content-directory.d.cts +3 -0
  13. package/dist/catalog-to-astro-content-directory.d.ts +3 -0
  14. package/dist/catalog-to-astro-content-directory.js +8 -0
  15. package/dist/chunk-65VQIGAP.js +33 -0
  16. package/{scripts/watcher.js → dist/chunk-7HYM3M5I.js} +29 -52
  17. package/dist/chunk-E7TXTI7G.js +78 -0
  18. package/dist/chunk-KI4KAUWW.js +30 -0
  19. package/dist/chunk-O6BGVVOW.js +86 -0
  20. package/dist/chunk-PK2EQVPD.js +89 -0
  21. package/dist/chunk-TGOUSS6C.js +9 -0
  22. package/dist/chunk-YEQVKHST.js +56 -0
  23. package/dist/constants.cjs +35 -0
  24. package/dist/constants.d.cts +3 -0
  25. package/dist/constants.d.ts +3 -0
  26. package/dist/constants.js +6 -0
  27. package/dist/eventcatalog-config-file-utils.cjs +116 -0
  28. package/dist/eventcatalog-config-file-utils.d.cts +7 -0
  29. package/dist/eventcatalog-config-file-utils.d.ts +7 -0
  30. package/dist/eventcatalog-config-file-utils.js +14 -0
  31. package/{bin/dist → dist}/eventcatalog.cjs +23 -33
  32. package/{bin/dist → dist}/eventcatalog.config.cjs +1 -1
  33. package/dist/eventcatalog.config.js +0 -0
  34. package/dist/eventcatalog.d.cts +2 -0
  35. package/dist/eventcatalog.d.ts +2 -0
  36. package/dist/eventcatalog.js +116 -0
  37. package/dist/generate.cjs +121 -0
  38. package/dist/generate.d.cts +3 -0
  39. package/dist/generate.d.ts +3 -0
  40. package/dist/generate.js +7 -0
  41. package/dist/map-catalog-to-astro.cjs +123 -0
  42. package/dist/map-catalog-to-astro.d.cts +28 -0
  43. package/dist/map-catalog-to-astro.d.ts +28 -0
  44. package/dist/map-catalog-to-astro.js +6 -0
  45. package/dist/watcher.cjs +223 -0
  46. package/dist/watcher.d.cts +21 -0
  47. package/dist/watcher.d.ts +21 -0
  48. package/dist/watcher.js +8 -0
  49. package/eventcatalog/public/icons/ms-teams.svg +2 -0
  50. package/{src → eventcatalog/src}/components/MDX/NodeGraph/NodeGraph.tsx +27 -38
  51. package/{src → eventcatalog/src}/content/config.ts +2 -0
  52. package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +89 -0
  53. package/{src → eventcatalog/src}/pages/docs/[type]/[id]/[version]/asyncapi/index.astro +2 -1
  54. package/{src → eventcatalog/src}/pages/docs/teams/[id]/index.astro +10 -0
  55. package/{src → eventcatalog/src}/pages/docs/users/[id]/index.astro +10 -0
  56. package/{src → eventcatalog/src}/utils/node-graphs/message-node-graph.ts +2 -27
  57. package/{src → eventcatalog/src}/utils/node-graphs/utils/utils.ts +60 -3
  58. package/package.json +11 -3
  59. package/.all-contributorsrc +0 -436
  60. package/.changeset/config.json +0 -11
  61. package/.github/CODEOWNERS +0 -3
  62. package/.github/ISSUE_TEMPLATE/bug.yml +0 -84
  63. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  64. package/.github/ISSUE_TEMPLATE/feature.yml +0 -48
  65. package/.github/PULL_REQUEST_TEMPLATE.md +0 -14
  66. package/.github/funding.yml +0 -1
  67. package/.github/workflows/lint.yml +0 -22
  68. package/.github/workflows/release.yml +0 -34
  69. package/.github/workflows/test-bin.yml +0 -29
  70. package/.github/workflows/test-e2e.yml +0 -27
  71. package/.github/workflows/verify-build.yml +0 -28
  72. package/.prettierignore +0 -7
  73. package/.prettierrc +0 -18
  74. package/CHANGELOG.md +0 -1289
  75. package/bin/dist/eventcatalog.d.cts +0 -1
  76. package/bin/dist/eventcatalog.d.ts +0 -1
  77. package/bin/dist/eventcatalog.js +0 -531
  78. package/bin/eventcatalog.config.ts +0 -34
  79. package/images/example.png +0 -0
  80. package/images/sponsors/gravitee-logo-black.svg +0 -54
  81. package/images/sponsors/hookdeck.svg +0 -11
  82. package/images/sponsors/oso-logo-green.png +0 -0
  83. package/scripts/analytics/analytics.js +0 -31
  84. package/scripts/analytics/log-build.js +0 -26
  85. package/scripts/build-ci.js +0 -27
  86. package/scripts/catalog-to-astro-content-directory.js +0 -115
  87. package/scripts/ci/test.js +0 -24
  88. package/scripts/constants.ts +0 -3
  89. package/scripts/eventcatalog-config-file-utils.js +0 -89
  90. package/scripts/generate.js +0 -65
  91. package/scripts/map-catalog-to-astro.js +0 -174
  92. package/scripts/start-catalog-locally.js +0 -26
  93. /package/{bin/dist → dist}/eventcatalog.config.d.cts +0 -0
  94. /package/{bin/dist → dist}/eventcatalog.config.d.ts +0 -0
  95. /package/{astro.config.mjs → eventcatalog/astro.config.mjs} +0 -0
  96. /package/{global.d.ts → eventcatalog/global.d.ts} +0 -0
  97. /package/{public → eventcatalog/public}/favicon.ico +0 -0
  98. /package/{public → eventcatalog/public}/icons/asyncapi.svg +0 -0
  99. /package/{public → eventcatalog/public}/icons/discord.svg +0 -0
  100. /package/{public → eventcatalog/public}/icons/github-purple.svg +0 -0
  101. /package/{public → eventcatalog/public}/icons/github.svg +0 -0
  102. /package/{public → eventcatalog/public}/icons/openapi.svg +0 -0
  103. /package/{public → eventcatalog/public}/icons/protocols/kafka.svg +0 -0
  104. /package/{public → eventcatalog/public}/icons/x-twitter.svg +0 -0
  105. /package/{public → eventcatalog/public}/icons/youtube.svg +0 -0
  106. /package/{public → eventcatalog/public}/logo.png +0 -0
  107. /package/{public → eventcatalog/public}/openapi.yml +0 -0
  108. /package/{public → eventcatalog/public}/opengraph.png +0 -0
  109. /package/{public → eventcatalog/public}/slack-icon.svg +0 -0
  110. /package/{src → eventcatalog/src}/components/DiscoverInsight.astro +0 -0
  111. /package/{src → eventcatalog/src}/components/DocsNavigation.astro +0 -0
  112. /package/{src → eventcatalog/src}/components/Header.astro +0 -0
  113. /package/{src → eventcatalog/src}/components/Lists/OwnersList.tsx +0 -0
  114. /package/{src → eventcatalog/src}/components/Lists/PillList.tsx +0 -0
  115. /package/{src → eventcatalog/src}/components/Lists/PillListFlat.styles.css +0 -0
  116. /package/{src → eventcatalog/src}/components/Lists/PillListFlat.tsx +0 -0
  117. /package/{src → eventcatalog/src}/components/Lists/ProtocolList.tsx +0 -0
  118. /package/{src → eventcatalog/src}/components/Lists/RepositoryList.astro +0 -0
  119. /package/{src → eventcatalog/src}/components/Lists/SpecificationsList.astro +0 -0
  120. /package/{src → eventcatalog/src}/components/Lists/VersionList.astro +0 -0
  121. /package/{src → eventcatalog/src}/components/MDX/Accordion/Accordion.astro +0 -0
  122. /package/{src → eventcatalog/src}/components/MDX/Accordion/Accordion.tsx +0 -0
  123. /package/{src → eventcatalog/src}/components/MDX/Accordion/AccordionGroup.astro +0 -0
  124. /package/{src → eventcatalog/src}/components/MDX/Admonition.tsx +0 -0
  125. /package/{src → eventcatalog/src}/components/MDX/AsyncAPI/AsyncAPI.astro +0 -0
  126. /package/{src → eventcatalog/src}/components/MDX/ChannelInformation/ChannelInformation.tsx +0 -0
  127. /package/{src → eventcatalog/src}/components/MDX/File.tsx +0 -0
  128. /package/{src → eventcatalog/src}/components/MDX/Flow/Flow.astro +0 -0
  129. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/DownloadButton.tsx +0 -0
  130. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Edges/AnimatedMessageEdge.tsx +0 -0
  131. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/NodeGraph.astro +0 -0
  132. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/NodeGraphPortal.tsx +0 -0
  133. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Channel.tsx +0 -0
  134. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Command.tsx +0 -0
  135. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Event.tsx +0 -0
  136. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/ExternalSystem.tsx +0 -0
  137. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Query.tsx +0 -0
  138. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Service.tsx +0 -0
  139. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/Step.tsx +0 -0
  140. /package/{src → eventcatalog/src}/components/MDX/NodeGraph/Nodes/User.tsx +0 -0
  141. /package/{src → eventcatalog/src}/components/MDX/OpenAPI/OpenAPI.astro +0 -0
  142. /package/{src → eventcatalog/src}/components/MDX/Schema.astro +0 -0
  143. /package/{src → eventcatalog/src}/components/MDX/SchemaViewer/SchemaViewer.astro +0 -0
  144. /package/{src → eventcatalog/src}/components/MDX/SchemaViewer/SchemaViewer.tsx +0 -0
  145. /package/{src → eventcatalog/src}/components/MDX/SchemaViewer/SchemaViewerPortal.tsx +0 -0
  146. /package/{src → eventcatalog/src}/components/MDX/Steps/Step.astro +0 -0
  147. /package/{src → eventcatalog/src}/components/MDX/Steps/Steps.astro +0 -0
  148. /package/{src → eventcatalog/src}/components/MDX/Tiles/Tile.astro +0 -0
  149. /package/{src → eventcatalog/src}/components/MDX/Tiles/Tiles.astro +0 -0
  150. /package/{src → eventcatalog/src}/components/MDX/components.tsx +0 -0
  151. /package/{src → eventcatalog/src}/components/MDX/page-components.tsx +0 -0
  152. /package/{src → eventcatalog/src}/components/Search.astro +0 -0
  153. /package/{src → eventcatalog/src}/components/Seo.astro +0 -0
  154. /package/{src → eventcatalog/src}/components/SideBars/CatalogResourcesSideBar/index.tsx +0 -0
  155. /package/{src → eventcatalog/src}/components/SideBars/CatalogResourcesSideBar/styles.css +0 -0
  156. /package/{src → eventcatalog/src}/components/SideBars/ChannelSideBar.astro +0 -0
  157. /package/{src → eventcatalog/src}/components/SideBars/DomainSideBar.astro +0 -0
  158. /package/{src → eventcatalog/src}/components/SideBars/MessageSideBar.astro +0 -0
  159. /package/{src → eventcatalog/src}/components/SideBars/ServiceSideBar.astro +0 -0
  160. /package/{src → eventcatalog/src}/components/Tables/DebouncedInput.tsx +0 -0
  161. /package/{src → eventcatalog/src}/components/Tables/Table.tsx +0 -0
  162. /package/{src → eventcatalog/src}/components/Tables/columns/DomainTableColumns.tsx +0 -0
  163. /package/{src → eventcatalog/src}/components/Tables/columns/FlowTableColumns.tsx +0 -0
  164. /package/{src → eventcatalog/src}/components/Tables/columns/MessageTableColumns.tsx +0 -0
  165. /package/{src → eventcatalog/src}/components/Tables/columns/ServiceTableColumns.tsx +0 -0
  166. /package/{src → eventcatalog/src}/components/Tables/columns/index.tsx +0 -0
  167. /package/{src → eventcatalog/src}/components/Tables/filters/custom-filters.ts +0 -0
  168. /package/{src → eventcatalog/src}/env.d.ts +0 -0
  169. /package/{src → eventcatalog/src}/icons/protocols/WebSocket.svg +0 -0
  170. /package/{src → eventcatalog/src}/icons/protocols/amqp.svg +0 -0
  171. /package/{src → eventcatalog/src}/icons/protocols/eventbridge.svg +0 -0
  172. /package/{src → eventcatalog/src}/icons/protocols/googlepubsub.svg +0 -0
  173. /package/{src → eventcatalog/src}/icons/protocols/http.svg +0 -0
  174. /package/{src → eventcatalog/src}/icons/protocols/index.ts +0 -0
  175. /package/{src → eventcatalog/src}/icons/protocols/jms.svg +0 -0
  176. /package/{src → eventcatalog/src}/icons/protocols/kafka.svg +0 -0
  177. /package/{src → eventcatalog/src}/icons/protocols/mercure.svg +0 -0
  178. /package/{src → eventcatalog/src}/icons/protocols/mqtt.svg +0 -0
  179. /package/{src → eventcatalog/src}/icons/protocols/nats.svg +0 -0
  180. /package/{src → eventcatalog/src}/icons/protocols/pulsar.svg +0 -0
  181. /package/{src → eventcatalog/src}/icons/protocols/redis.svg +0 -0
  182. /package/{src → eventcatalog/src}/icons/protocols/sns.svg +0 -0
  183. /package/{src → eventcatalog/src}/icons/protocols/solace.svg +0 -0
  184. /package/{src → eventcatalog/src}/icons/protocols/sqs.svg +0 -0
  185. /package/{src → eventcatalog/src}/icons/protocols/ws.svg +0 -0
  186. /package/{src → eventcatalog/src}/layouts/CustomDocsPageLayout.astro +0 -0
  187. /package/{src → eventcatalog/src}/layouts/DiscoverLayout.astro +0 -0
  188. /package/{src → eventcatalog/src}/layouts/Footer.astro +0 -0
  189. /package/{src → eventcatalog/src}/layouts/PlainPage.astro +0 -0
  190. /package/{src → eventcatalog/src}/layouts/VerticalSideBarLayout.astro +0 -0
  191. /package/{src → eventcatalog/src}/layouts/VisualiserLayout.astro +0 -0
  192. /package/{src → eventcatalog/src}/pages/discover/[type]/index.astro +0 -0
  193. /package/{src → eventcatalog/src}/pages/docs/[type]/[id]/[version]/changelog/index.astro +0 -0
  194. /package/{src → eventcatalog/src}/pages/docs/[type]/[id]/[version]/index.astro +0 -0
  195. /package/{src → eventcatalog/src}/pages/docs/[type]/[id]/[version]/spec/_styles.css +0 -0
  196. /package/{src → eventcatalog/src}/pages/docs/[type]/[id]/[version]/spec/index.astro +0 -0
  197. /package/{src → eventcatalog/src}/pages/docs/[type]/[id]/index.astro +0 -0
  198. /package/{src → eventcatalog/src}/pages/docs/index.astro +0 -0
  199. /package/{src → eventcatalog/src}/pages/index.astro +0 -0
  200. /package/{src → eventcatalog/src}/pages/visualiser/[type]/[id]/[version]/index.astro +0 -0
  201. /package/{src → eventcatalog/src}/pages/visualiser/[type]/[id]/index.astro +0 -0
  202. /package/{src → eventcatalog/src}/remark-plugins/mermaid.ts +0 -0
  203. /package/{src → eventcatalog/src}/types/index.ts +0 -0
  204. /package/{src → eventcatalog/src}/utils/channels.ts +0 -0
  205. /package/{src → eventcatalog/src}/utils/collections/changelogs.ts +0 -0
  206. /package/{src → eventcatalog/src}/utils/collections/domains.ts +0 -0
  207. /package/{src → eventcatalog/src}/utils/collections/file-diffs.ts +0 -0
  208. /package/{src → eventcatalog/src}/utils/collections/flows.ts +0 -0
  209. /package/{src → eventcatalog/src}/utils/collections/icons.ts +0 -0
  210. /package/{src → eventcatalog/src}/utils/collections/services.ts +0 -0
  211. /package/{src → eventcatalog/src}/utils/collections/util.ts +0 -0
  212. /package/{src → eventcatalog/src}/utils/collections/versions.ts +0 -0
  213. /package/{src → eventcatalog/src}/utils/colors.ts +0 -0
  214. /package/{src → eventcatalog/src}/utils/commands.ts +0 -0
  215. /package/{src → eventcatalog/src}/utils/eventcatalog-config/catalog.ts +0 -0
  216. /package/{src → eventcatalog/src}/utils/events.ts +0 -0
  217. /package/{src → eventcatalog/src}/utils/example-remark-plugin.mjs +0 -0
  218. /package/{src → eventcatalog/src}/utils/messages.ts +0 -0
  219. /package/{src → eventcatalog/src}/utils/node-graphs/domains-node-graph.ts +0 -0
  220. /package/{src → eventcatalog/src}/utils/node-graphs/flows-node-graph.ts +0 -0
  221. /package/{src → eventcatalog/src}/utils/node-graphs/services-node-graph.ts +0 -0
  222. /package/{src → eventcatalog/src}/utils/page-loaders/page-data-loader.ts +0 -0
  223. /package/{src → eventcatalog/src}/utils/pages.ts +0 -0
  224. /package/{src → eventcatalog/src}/utils/queries.ts +0 -0
  225. /package/{src → eventcatalog/src}/utils/teams.ts +0 -0
  226. /package/{src → eventcatalog/src}/utils/url-builder.ts +0 -0
  227. /package/{src → eventcatalog/src}/utils/users.ts +0 -0
  228. /package/{tailwind.config.mjs → eventcatalog/tailwind.config.mjs} +0 -0
  229. /package/{tsconfig.json → eventcatalog/tsconfig.json} +0 -0
package/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
  <h4>Features: Documentation generator for Event Driven Architectures, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
30
30
 
31
31
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
32
- [![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-)
32
+ [![All Contributors](https://img.shields.io/badge/all_contributors-46-orange.svg?style=flat-square)](#contributors-)
33
33
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
34
34
 
35
35
  [Read the Docs](https://eventcatalog.dev/) | [Edit the Docs](https://github.com/event-catalog/docs) | [View Demo](https://demo.eventcatalog.dev/docs)
@@ -117,11 +117,11 @@ Thank you to our project sponsors.
117
117
 
118
118
  ## Gold sponsors
119
119
 
120
- <div align="center">
120
+ <!-- <div align="center">
121
121
  <img alt="hookdeck" src="./images/sponsors/hookdeck.svg" />
122
122
  <p style="margin: 0; padding: 0;">Serverless infrastructure for event-driven architecture. </p>
123
123
  <a href="https://hookdeck.com/?ref=eventcatalog-sponsor" target="_blank" >Learn more</a>
124
- </div>
124
+ </div> -->
125
125
 
126
126
  <hr />
127
127
 
@@ -247,6 +247,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
247
247
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/hpatoio"><img src="https://avatars.githubusercontent.com/u/249948?v=4?s=100" width="100px;" alt="Simone Fumagalli"/><br /><sub><b>Simone Fumagalli</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=hpatoio" title="Documentation">📖</a></td>
248
248
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/d-o-h"><img src="https://avatars.githubusercontent.com/u/23699653?v=4?s=100" width="100px;" alt="d-o-h"/><br /><sub><b>d-o-h</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=d-o-h" title="Code">💻</a></td>
249
249
  <td align="center" valign="top" width="14.28%"><a href="https://pallares.io"><img src="https://avatars.githubusercontent.com/u/1077520?v=4?s=100" width="100px;" alt="Cristian Pallarés"/><br /><sub><b>Cristian Pallarés</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=skyrpex" title="Code">💻</a></td>
250
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/SebasRendon12"><img src="https://avatars.githubusercontent.com/u/69688183?v=4?s=100" width="100px;" alt="Sebastian Rendon"/><br /><sub><b>Sebastian Rendon</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=SebasRendon12" title="Code">💻</a></td>
250
251
  </tr>
251
252
  </tbody>
252
253
  </table>
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/eventcatalog.js';
@@ -0,0 +1,71 @@
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/analytics/analytics.js
31
+ var analytics_exports = {};
32
+ __export(analytics_exports, {
33
+ raiseEvent: () => raiseEvent
34
+ });
35
+ module.exports = __toCommonJS(analytics_exports);
36
+ var import_axios = __toESM(require("axios"), 1);
37
+ var import_os = __toESM(require("os"), 1);
38
+
39
+ // package.json
40
+ var version = "2.15.0";
41
+
42
+ // src/constants.ts
43
+ var VERSION = version;
44
+
45
+ // src/analytics/analytics.js
46
+ async function raiseEvent(eventData) {
47
+ const url = "https://queue.simpleanalyticscdn.com/events";
48
+ const userAgent = `@eventcatalog/eventcatalog@${VERSION} (${import_os.default.platform()}; ${import_os.default.arch()}; Node/${process.version})`;
49
+ const headers = {
50
+ "Content-Type": "application/json"
51
+ };
52
+ const payload = {
53
+ type: "event",
54
+ hostname: "eventcatalog.dev",
55
+ event: "@eventcatalog/eventcatalog",
56
+ metadata: {
57
+ ...eventData,
58
+ t: `t;${(/* @__PURE__ */ new Date()).toISOString()}`,
59
+ ua: userAgent
60
+ },
61
+ ua: userAgent
62
+ };
63
+ try {
64
+ await import_axios.default.post(url, payload, { headers });
65
+ } catch (error) {
66
+ }
67
+ }
68
+ // Annotate the CommonJS export names for ESM import in node:
69
+ 0 && (module.exports = {
70
+ raiseEvent
71
+ });
@@ -0,0 +1,3 @@
1
+ declare function raiseEvent(eventData: any): Promise<void>;
2
+
3
+ export { raiseEvent };
@@ -0,0 +1,3 @@
1
+ declare function raiseEvent(eventData: any): Promise<void>;
2
+
3
+ export { raiseEvent };
@@ -0,0 +1,7 @@
1
+ import {
2
+ raiseEvent
3
+ } from "../chunk-65VQIGAP.js";
4
+ import "../chunk-TGOUSS6C.js";
5
+ export {
6
+ raiseEvent
7
+ };
@@ -0,0 +1,155 @@
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/analytics/log-build.js
31
+ var log_build_exports = {};
32
+ __export(log_build_exports, {
33
+ default: () => log_build_default
34
+ });
35
+ module.exports = __toCommonJS(log_build_exports);
36
+
37
+ // src/eventcatalog-config-file-utils.js
38
+ var import_promises = require("fs/promises");
39
+ var import_node_fs = require("fs");
40
+ var import_promises2 = require("fs/promises");
41
+ var import_node_path = __toESM(require("path"), 1);
42
+ var import_uuid = require("uuid");
43
+ var import_url = require("url");
44
+ var import_gray_matter = __toESM(require("gray-matter"), 1);
45
+ async function cleanup(projectDirectory) {
46
+ const filePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
47
+ if ((0, import_node_fs.existsSync)(filePath)) {
48
+ await (0, import_promises.rm)(filePath);
49
+ }
50
+ }
51
+ var getEventCatalogConfigFile = async (projectDirectory) => {
52
+ try {
53
+ let configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.js");
54
+ const filePath = import_node_path.default.join(projectDirectory, "package.json");
55
+ const packageJson = JSON.parse(await (0, import_promises.readFile)(filePath, "utf-8"));
56
+ if (packageJson?.type !== "module") {
57
+ await (0, import_promises2.copyFile)(configFilePath, import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs"));
58
+ configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
59
+ }
60
+ const configFileURL = (0, import_url.pathToFileURL)(configFilePath).href;
61
+ const config = await import(
62
+ /* @vite-ignore */
63
+ configFileURL
64
+ );
65
+ return config.default;
66
+ } finally {
67
+ await cleanup(projectDirectory);
68
+ }
69
+ };
70
+ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
71
+ try {
72
+ const configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.js");
73
+ let content = await (0, import_promises.readFile)(configFilePath, "utf8");
74
+ const startIndex = content.indexOf("export default {");
75
+ if (startIndex === -1) {
76
+ return;
77
+ }
78
+ Object.entries(newConfig).forEach(([key, value]) => {
79
+ const valueString = JSON.stringify(value, null, 2).replace(/"/g, "'").replace(/\n/g, "\n ");
80
+ const keyRegex = new RegExp(`(${key}\\s*:)([^,}]+)`, "g");
81
+ if (content.match(keyRegex)) {
82
+ content = content.replace(keyRegex, `$1 ${valueString}`);
83
+ } else {
84
+ const insertPosition = content.indexOf("{", startIndex) + 1;
85
+ content = content.slice(0, insertPosition) + `
86
+ ${key}: ${valueString},` + content.slice(insertPosition);
87
+ }
88
+ });
89
+ await (0, import_promises.writeFile)(configFilePath, content);
90
+ } finally {
91
+ await cleanup(projectDirectory);
92
+ }
93
+ };
94
+ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
95
+ try {
96
+ const config = await getEventCatalogConfigFile(projectDirectory);
97
+ if (!config.cId) {
98
+ await writeEventCatalogConfigFile(projectDirectory, { cId: (0, import_uuid.v4)() });
99
+ }
100
+ } catch (error) {
101
+ }
102
+ };
103
+
104
+ // src/analytics/analytics.js
105
+ var import_axios = __toESM(require("axios"), 1);
106
+ var import_os = __toESM(require("os"), 1);
107
+
108
+ // package.json
109
+ var version = "2.15.0";
110
+
111
+ // src/constants.ts
112
+ var VERSION = version;
113
+
114
+ // src/analytics/analytics.js
115
+ async function raiseEvent(eventData) {
116
+ const url = "https://queue.simpleanalyticscdn.com/events";
117
+ const userAgent = `@eventcatalog/eventcatalog@${VERSION} (${import_os.default.platform()}; ${import_os.default.arch()}; Node/${process.version})`;
118
+ const headers = {
119
+ "Content-Type": "application/json"
120
+ };
121
+ const payload = {
122
+ type: "event",
123
+ hostname: "eventcatalog.dev",
124
+ event: "@eventcatalog/eventcatalog",
125
+ metadata: {
126
+ ...eventData,
127
+ t: `t;${(/* @__PURE__ */ new Date()).toISOString()}`,
128
+ ua: userAgent
129
+ },
130
+ ua: userAgent
131
+ };
132
+ try {
133
+ await import_axios.default.post(url, payload, { headers });
134
+ } catch (error) {
135
+ }
136
+ }
137
+
138
+ // src/analytics/log-build.js
139
+ var main = async (projectDir) => {
140
+ if (process.env.NODE_ENV === "CI") return;
141
+ try {
142
+ await verifyRequiredFieldsAreInCatalogConfigFile(projectDir);
143
+ const configFile = await getEventCatalogConfigFile(projectDir);
144
+ const { cId, organizationName, generators = [] } = configFile;
145
+ const generatorNames = generators.length > 0 ? generators.map((generator) => generator[0]) : ["none"];
146
+ await raiseEvent({
147
+ command: "build",
148
+ org: organizationName,
149
+ cId,
150
+ generators: generatorNames.toString()
151
+ });
152
+ } catch (error) {
153
+ }
154
+ };
155
+ var log_build_default = main;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param {string} projectDir
4
+ */
5
+ declare function main(projectDir: string): Promise<void>;
6
+
7
+ export { main as default };
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param {string} projectDir
4
+ */
5
+ declare function main(projectDir: string): Promise<void>;
6
+
7
+ export { main as default };
@@ -0,0 +1,9 @@
1
+ import {
2
+ log_build_default
3
+ } from "../chunk-KI4KAUWW.js";
4
+ import "../chunk-65VQIGAP.js";
5
+ import "../chunk-TGOUSS6C.js";
6
+ import "../chunk-E7TXTI7G.js";
7
+ export {
8
+ log_build_default as default
9
+ };
@@ -0,0 +1,277 @@
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/catalog-to-astro-content-directory.js
31
+ var catalog_to_astro_content_directory_exports = {};
32
+ __export(catalog_to_astro_content_directory_exports, {
33
+ catalogToAstro: () => catalogToAstro
34
+ });
35
+ module.exports = __toCommonJS(catalog_to_astro_content_directory_exports);
36
+
37
+ // node_modules/tsup/assets/cjs_shims.js
38
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
39
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
40
+
41
+ // src/catalog-to-astro-content-directory.js
42
+ var import_glob = require("glob");
43
+ var path3 = __toESM(require("path"), 1);
44
+ var import_fs = __toESM(require("fs"), 1);
45
+ var import_url2 = require("url");
46
+ var import_node_os = __toESM(require("os"), 1);
47
+
48
+ // src/eventcatalog-config-file-utils.js
49
+ var import_promises = require("fs/promises");
50
+ var import_node_fs = require("fs");
51
+ var import_promises2 = require("fs/promises");
52
+ var import_node_path = __toESM(require("path"), 1);
53
+ var import_uuid = require("uuid");
54
+ var import_url = require("url");
55
+ var import_gray_matter = __toESM(require("gray-matter"), 1);
56
+ async function cleanup(projectDirectory) {
57
+ const filePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
58
+ if ((0, import_node_fs.existsSync)(filePath)) {
59
+ await (0, import_promises.rm)(filePath);
60
+ }
61
+ }
62
+ var getEventCatalogConfigFile = async (projectDirectory) => {
63
+ try {
64
+ let configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.js");
65
+ const filePath = import_node_path.default.join(projectDirectory, "package.json");
66
+ const packageJson = JSON.parse(await (0, import_promises.readFile)(filePath, "utf-8"));
67
+ if (packageJson?.type !== "module") {
68
+ await (0, import_promises2.copyFile)(configFilePath, import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs"));
69
+ configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
70
+ }
71
+ const configFileURL = (0, import_url.pathToFileURL)(configFilePath).href;
72
+ const config = await import(
73
+ /* @vite-ignore */
74
+ configFileURL
75
+ );
76
+ return config.default;
77
+ } finally {
78
+ await cleanup(projectDirectory);
79
+ }
80
+ };
81
+ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
82
+ try {
83
+ const configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.js");
84
+ let content = await (0, import_promises.readFile)(configFilePath, "utf8");
85
+ const startIndex = content.indexOf("export default {");
86
+ if (startIndex === -1) {
87
+ return;
88
+ }
89
+ Object.entries(newConfig).forEach(([key, value]) => {
90
+ const valueString = JSON.stringify(value, null, 2).replace(/"/g, "'").replace(/\n/g, "\n ");
91
+ const keyRegex = new RegExp(`(${key}\\s*:)([^,}]+)`, "g");
92
+ if (content.match(keyRegex)) {
93
+ content = content.replace(keyRegex, `$1 ${valueString}`);
94
+ } else {
95
+ const insertPosition = content.indexOf("{", startIndex) + 1;
96
+ content = content.slice(0, insertPosition) + `
97
+ ${key}: ${valueString},` + content.slice(insertPosition);
98
+ }
99
+ });
100
+ await (0, import_promises.writeFile)(configFilePath, content);
101
+ } finally {
102
+ await cleanup(projectDirectory);
103
+ }
104
+ };
105
+ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
106
+ try {
107
+ const config = await getEventCatalogConfigFile(projectDirectory);
108
+ if (!config.cId) {
109
+ await writeEventCatalogConfigFile(projectDirectory, { cId: (0, import_uuid.v4)() });
110
+ }
111
+ } catch (error) {
112
+ }
113
+ };
114
+ function addPropertyToFrontMatter(input, newProperty, newValue) {
115
+ const file = (0, import_gray_matter.default)(input);
116
+ return import_gray_matter.default.stringify(file.content, { ...file.data, [newProperty]: newValue });
117
+ }
118
+
119
+ // src/map-catalog-to-astro.js
120
+ var import_node_path2 = __toESM(require("path"), 1);
121
+ var COLLECTION_KEYS = [
122
+ "events",
123
+ "commands",
124
+ "services",
125
+ "users",
126
+ "teams",
127
+ "domains",
128
+ "flows",
129
+ "pages",
130
+ "changelogs",
131
+ "queries",
132
+ "channels"
133
+ ];
134
+ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
135
+ const relativeFilePath = removeBasePath(filePath, projectDir);
136
+ if (!isCatalogRelated(relativeFilePath)) {
137
+ return [];
138
+ }
139
+ const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
140
+ const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
141
+ return baseTargetPaths.map(
142
+ (base) => import_node_path2.default.join(astroDir, base, relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx"))
143
+ );
144
+ }
145
+ function removeBasePath(fullPath, basePath) {
146
+ const relativePath = import_node_path2.default.relative(basePath, fullPath);
147
+ return relativePath.startsWith("..") ? fullPath : relativePath;
148
+ }
149
+ function isCollectionKey(key) {
150
+ return COLLECTION_KEYS.includes(key);
151
+ }
152
+ function isCatalogRelated(filePath) {
153
+ const filePathArr = filePath.split(import_node_path2.default.sep).filter(Boolean);
154
+ if ([
155
+ "eventcatalog.config.js",
156
+ // config file at root
157
+ "eventcatalog.styles.css",
158
+ // custom styles file at root
159
+ "components",
160
+ // custom components
161
+ "public",
162
+ // public assets
163
+ ...COLLECTION_KEYS
164
+ ].includes(filePathArr[0])) {
165
+ return true;
166
+ }
167
+ return false;
168
+ }
169
+ function getBaseTargetPaths(filePath) {
170
+ const filePathArr = filePath.split(import_node_path2.default.sep).filter(Boolean);
171
+ if (isCollectionKey(filePathArr[0])) {
172
+ if (filePathArr[filePathArr.length - 1] == "changelog.md") {
173
+ return [import_node_path2.default.join("src", "content", "changelogs")];
174
+ }
175
+ if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
176
+ return [import_node_path2.default.join("src", "content")];
177
+ }
178
+ const hasExtension = (str) => /\.[a-zA-Z0-9]{2,}$/.test(str);
179
+ if (hasExtension(filePath)) {
180
+ return [import_node_path2.default.join("public", "generated"), import_node_path2.default.join("src", "catalog-files")];
181
+ }
182
+ return [import_node_path2.default.join("public", "generated"), import_node_path2.default.join("src", "catalog-files"), import_node_path2.default.join("src", "content")];
183
+ }
184
+ if (filePathArr[0] == "components") {
185
+ return [import_node_path2.default.join("src", "custom-defined-components")];
186
+ }
187
+ if (filePathArr[0] == "public") {
188
+ return [import_node_path2.default.join("public")];
189
+ }
190
+ return [import_node_path2.default.join("/")];
191
+ }
192
+ function getRelativeTargetPath(filePath) {
193
+ const filePathArr = filePath.split(import_node_path2.default.sep).filter(Boolean);
194
+ if (filePathArr[0] == "public" || filePathArr[0] == "components") {
195
+ filePathArr.shift();
196
+ }
197
+ const relativePath = [];
198
+ for (let i = filePathArr.length - 1; i >= 0; i--) {
199
+ relativePath.unshift(filePathArr[i]);
200
+ if (isCollectionKey(filePathArr[i])) break;
201
+ }
202
+ return import_node_path2.default.join(...relativePath);
203
+ }
204
+
205
+ // src/catalog-to-astro-content-directory.js
206
+ var __filename2 = (0, import_url2.fileURLToPath)(importMetaUrl);
207
+ var rootPkg = path3.resolve(path3.dirname(__filename2), "../");
208
+ var copyFiles = async (source, target) => {
209
+ const files = await (0, import_glob.glob)(path3.join(source, "**"), {
210
+ nodir: true,
211
+ windowsPathsNoEscape: import_node_os.default.platform() == "win32"
212
+ });
213
+ for (const file of files) {
214
+ mapCatalogToAstro({
215
+ filePath: file,
216
+ astroDir: target,
217
+ projectDir: source
218
+ }).map((astroPath) => {
219
+ import_fs.default.cpSync(file, astroPath);
220
+ return { oldPath: file, newPath: astroPath };
221
+ }).map(({ oldPath, newPath }) => {
222
+ if (!oldPath.endsWith(".md") && !oldPath.endsWith(".mdx")) return;
223
+ try {
224
+ const content = import_fs.default.readFileSync(newPath, "utf-8");
225
+ const frontmatter = addPropertyToFrontMatter(content, "pathToFile", oldPath);
226
+ import_fs.default.writeFileSync(newPath, frontmatter);
227
+ } catch (error) {
228
+ }
229
+ });
230
+ }
231
+ };
232
+ var ensureAstroCollectionNotEmpty = async (astroDir) => {
233
+ const COLLECTIONS = [
234
+ "events",
235
+ "commands",
236
+ "services",
237
+ "users",
238
+ "teams",
239
+ "domains",
240
+ "flows",
241
+ "pages",
242
+ "changelogs",
243
+ "queries",
244
+ "channels"
245
+ ];
246
+ const emptyCollections = [];
247
+ for (const collection of COLLECTIONS) {
248
+ const markdownFiles = await (0, import_glob.glob)(path3.join(astroDir, "src/content/", collection, "**"), {
249
+ nodir: true,
250
+ windowsPathsNoEscape: import_node_os.default.platform() == "win32"
251
+ });
252
+ if (markdownFiles.length === 0) emptyCollections.push(collection);
253
+ }
254
+ const defaultCollectionFilesDir = path3.join(rootPkg, "default-files-for-collections");
255
+ for (const collection of emptyCollections) {
256
+ const defaultFile = path3.join(defaultCollectionFilesDir, `${collection}.md`);
257
+ const targetDir = path3.join(astroDir, "src/content/", collection);
258
+ if (!import_fs.default.existsSync(targetDir)) {
259
+ import_fs.default.mkdirSync(targetDir, { recursive: true });
260
+ }
261
+ import_fs.default.cpSync(defaultFile, path3.join(targetDir, `${collection}.md`));
262
+ }
263
+ };
264
+ var catalogToAstro = async (source, astroDir) => {
265
+ const astroContentDir = path3.join(astroDir, "src/content/");
266
+ const astroConfigFile = import_fs.default.readFileSync(path3.join(astroContentDir, "config.ts"));
267
+ import_fs.default.rmSync(astroContentDir, { recursive: true });
268
+ import_fs.default.mkdirSync(astroContentDir);
269
+ import_fs.default.writeFileSync(path3.join(astroContentDir, "config.ts"), astroConfigFile);
270
+ await verifyRequiredFieldsAreInCatalogConfigFile(source);
271
+ await copyFiles(source, astroDir);
272
+ await ensureAstroCollectionNotEmpty(astroDir);
273
+ };
274
+ // Annotate the CommonJS export names for ESM import in node:
275
+ 0 && (module.exports = {
276
+ catalogToAstro
277
+ });
@@ -0,0 +1,3 @@
1
+ declare function catalogToAstro(source: any, astroDir: any): Promise<void>;
2
+
3
+ export { catalogToAstro };
@@ -0,0 +1,3 @@
1
+ declare function catalogToAstro(source: any, astroDir: any): Promise<void>;
2
+
3
+ export { catalogToAstro };
@@ -0,0 +1,8 @@
1
+ import {
2
+ catalogToAstro
3
+ } from "./chunk-O6BGVVOW.js";
4
+ import "./chunk-E7TXTI7G.js";
5
+ import "./chunk-PK2EQVPD.js";
6
+ export {
7
+ catalogToAstro
8
+ };
@@ -0,0 +1,33 @@
1
+ import {
2
+ VERSION
3
+ } from "./chunk-TGOUSS6C.js";
4
+
5
+ // src/analytics/analytics.js
6
+ import axios from "axios";
7
+ import os from "os";
8
+ async function raiseEvent(eventData) {
9
+ const url = "https://queue.simpleanalyticscdn.com/events";
10
+ const userAgent = `@eventcatalog/eventcatalog@${VERSION} (${os.platform()}; ${os.arch()}; Node/${process.version})`;
11
+ const headers = {
12
+ "Content-Type": "application/json"
13
+ };
14
+ const payload = {
15
+ type: "event",
16
+ hostname: "eventcatalog.dev",
17
+ event: "@eventcatalog/eventcatalog",
18
+ metadata: {
19
+ ...eventData,
20
+ t: `t;${(/* @__PURE__ */ new Date()).toISOString()}`,
21
+ ua: userAgent
22
+ },
23
+ ua: userAgent
24
+ };
25
+ try {
26
+ await axios.post(url, payload, { headers });
27
+ } catch (error) {
28
+ }
29
+ }
30
+
31
+ export {
32
+ raiseEvent
33
+ };