@eventcatalog/core 3.35.0 → 3.36.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.
- 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-LUWCWNOR.js → chunk-6D65JSOA.js} +1 -1
- package/dist/{chunk-NEWQKEP7.js → chunk-C7JCOHTI.js} +1 -1
- package/dist/chunk-D6IBLY3O.js +320 -0
- package/dist/{chunk-Y5O6SCX3.js → chunk-HDENGAZL.js} +1 -1
- package/dist/{chunk-DFLUDECO.js → chunk-UJ7DX4SA.js} +3 -3
- package/dist/{chunk-3KXCGYET.js → chunk-ULZYHF3V.js} +5 -0
- package/dist/{chunk-B2LDVIVY.js → chunk-V22QY5Q3.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/01-overview.md +74 -0
- package/dist/docs/api/02-config.md +959 -0
- package/dist/docs/api/03-domain-api.md +394 -0
- package/dist/docs/api/04-service-api.md +368 -0
- package/dist/docs/api/05-command-api.md +319 -0
- package/dist/docs/api/06-event-api.md +318 -0
- package/dist/docs/api/06-query-api.md +316 -0
- package/dist/docs/api/08-channel-api.md +317 -0
- package/dist/docs/api/08-code-blocks.md +53 -0
- package/dist/docs/api/09-flow-api.md +362 -0
- package/dist/docs/api/10-entity-api.md +285 -0
- package/dist/docs/api/11-data-api.md +268 -0
- package/dist/docs/api/12-data-product-api.md +416 -0
- package/dist/docs/api/_category_.json +12 -0
- package/dist/docs/cli/channels.md +180 -0
- package/dist/docs/cli/commands.md +183 -0
- package/dist/docs/cli/custom-docs.md +78 -0
- package/dist/docs/cli/data-products.md +177 -0
- package/dist/docs/cli/data-stores.md +166 -0
- package/dist/docs/cli/diagrams.md +147 -0
- package/dist/docs/cli/domains.md +280 -0
- package/dist/docs/cli/entities.md +138 -0
- package/dist/docs/cli/events.md +186 -0
- package/dist/docs/cli/export.md +27 -0
- package/dist/docs/cli/governance.md +24 -0
- package/dist/docs/cli/import.md +26 -0
- package/dist/docs/cli/index.md +121 -0
- package/dist/docs/cli/messages.md +69 -0
- package/dist/docs/cli/queries.md +183 -0
- package/dist/docs/cli/services.md +266 -0
- package/dist/docs/cli/snapshots.md +44 -0
- package/dist/docs/cli/teams.md +75 -0
- package/dist/docs/cli/users.md +75 -0
- package/dist/docs/cli/utilities.md +43 -0
- package/dist/docs/contributing/01-overview.md +186 -0
- package/dist/docs/contributing/_category_.json +12 -0
- package/dist/docs/development/00-why-eventcatalog.md +87 -0
- package/dist/docs/development/01-fundamentals.md +34 -0
- package/dist/docs/development/01-getting-started/_category_.json +12 -0
- package/dist/docs/development/01-getting-started/configuration-overview.md +124 -0
- package/dist/docs/development/01-getting-started/develop-and-build.md +71 -0
- package/dist/docs/development/01-getting-started/installation.md +103 -0
- package/dist/docs/development/01-getting-started/project-structure.md +269 -0
- package/dist/docs/development/_category_.json +12 -0
- package/dist/docs/development/_getting-started.mdx +15 -0
- package/dist/docs/development/agent-resources/_category_.json +6 -0
- package/dist/docs/development/agent-resources/eventcatalog-skills.md +17 -0
- package/dist/docs/development/agent-resources/llms-full.md +17 -0
- package/dist/docs/development/agent-resources/llms.md +17 -0
- package/dist/docs/development/ask-your-architecture/01-intro.md +89 -0
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/01-what-is-eventcatalog-assistant.md +23 -0
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/02-configuration.md +72 -0
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/03-bring-your-own-tools.md +385 -0
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/_category_.json +11 -0
- package/dist/docs/development/ask-your-architecture/03-mcp-server/_category_.json +12 -0
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +216 -0
- package/dist/docs/development/ask-your-architecture/03-mcp-server/introduction.md +47 -0
- package/dist/docs/development/ask-your-architecture/04-skills/01-introduction.md +40 -0
- package/dist/docs/development/ask-your-architecture/04-skills/02-installation.md +60 -0
- package/dist/docs/development/ask-your-architecture/04-skills/_category_.json +11 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/01-introduction.md +63 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/02-slack-app-setup.md +154 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/03-installation.md +169 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/04-deployment.md +236 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/05-usage.md +140 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/06-troubleshooting.md +268 -0
- package/dist/docs/development/ask-your-architecture/05-slack-integration/_category_.json +12 -0
- package/dist/docs/development/ask-your-architecture/_category_.json +12 -0
- package/dist/docs/development/authentication/01-introduction.md +78 -0
- package/dist/docs/development/authentication/02-enabling-authentication.md +152 -0
- package/dist/docs/development/authentication/07-rbac-middleware.md +269 -0
- package/dist/docs/development/authentication/_category_.json +11 -0
- package/dist/docs/development/authentication/providers/03-setting-up-github.md +83 -0
- package/dist/docs/development/authentication/providers/03a-setting-up-google.md +92 -0
- package/dist/docs/development/authentication/providers/04-setting-up-azure-ad.md +100 -0
- package/dist/docs/development/authentication/providers/05-setting-up-okta.md +105 -0
- package/dist/docs/development/authentication/providers/06-setting-up-auth0.md +106 -0
- package/dist/docs/development/authentication/providers/_category_.json +11 -0
- package/dist/docs/development/bring-your-own-documentation/01-introduction.md +48 -0
- package/dist/docs/development/bring-your-own-documentation/_category_.json +12 -0
- package/dist/docs/development/bring-your-own-documentation/custom-pages/01-introduction.md +60 -0
- package/dist/docs/development/bring-your-own-documentation/custom-pages/02-adding-custom-docs.md +207 -0
- package/dist/docs/development/bring-your-own-documentation/custom-pages/03-components.md +46 -0
- package/dist/docs/development/bring-your-own-documentation/custom-pages/04-owners.md +45 -0
- package/dist/docs/development/bring-your-own-documentation/custom-pages/_category_.json +11 -0
- package/dist/docs/development/bring-your-own-documentation/resource-docs/01-introduction.md +34 -0
- package/dist/docs/development/bring-your-own-documentation/resource-docs/02-adding-resource-docs.md +143 -0
- package/dist/docs/development/bring-your-own-documentation/resource-docs/03-categories.md +68 -0
- package/dist/docs/development/bring-your-own-documentation/resource-docs/04-versioning.md +45 -0
- package/dist/docs/development/bring-your-own-documentation/resource-docs/_category_.json +11 -0
- package/dist/docs/development/components/04-snippets.md +134 -0
- package/dist/docs/development/components/05-using-components.md +67 -0
- package/dist/docs/development/components/07-resource-references.md +136 -0
- package/dist/docs/development/components/_category_.json +12 -0
- package/dist/docs/development/components/components/01-accordian.md +41 -0
- package/dist/docs/development/components/components/02-accordian-group.md +57 -0
- package/dist/docs/development/components/components/03-admonitions.md +43 -0
- package/dist/docs/development/components/components/04-attachments.md +56 -0
- package/dist/docs/development/components/components/05-channel-information.md +29 -0
- package/dist/docs/development/components/components/06-design.md +66 -0
- package/dist/docs/development/components/components/07-entitymap.md +71 -0
- package/dist/docs/development/components/components/08-flow.md +46 -0
- package/dist/docs/development/components/components/09-link.md +32 -0
- package/dist/docs/development/components/components/10-mermaid-file-loader.md +63 -0
- package/dist/docs/development/components/components/11-message-table.md +43 -0
- package/dist/docs/development/components/components/12-nodegraph.md +167 -0
- package/dist/docs/development/components/components/13-openapi.md +55 -0
- package/dist/docs/development/components/components/14-prompt.md +69 -0
- package/dist/docs/development/components/components/15-remote-schema.md +174 -0
- package/dist/docs/development/components/components/16-resource-group-table.md +86 -0
- package/dist/docs/development/components/components/17-resource-link.md +57 -0
- package/dist/docs/development/components/components/18-schema.md +44 -0
- package/dist/docs/development/components/components/19-schema-viewer.md +69 -0
- package/dist/docs/development/components/components/20-steps.md +83 -0
- package/dist/docs/development/components/components/21-tabs.md +55 -0
- package/dist/docs/development/components/components/22-tiles.md +53 -0
- package/dist/docs/development/components/components/23-visibility.md +61 -0
- package/dist/docs/development/components/components/_category_.json +12 -0
- package/dist/docs/development/components/diagram-syntax/01-mermaid.md +218 -0
- package/dist/docs/development/components/diagram-syntax/02-plantuml.md +140 -0
- package/dist/docs/development/components/diagram-syntax/03-structurizr.md +24 -0
- package/dist/docs/development/components/diagram-syntax/04-icepanel.md +75 -0
- package/dist/docs/development/components/diagram-syntax/_category_.json +12 -0
- package/dist/docs/development/components/external-diagram-embeds/01-miro.md +64 -0
- package/dist/docs/development/components/external-diagram-embeds/02-lucid.md +47 -0
- package/dist/docs/development/components/external-diagram-embeds/03-drawio.md +46 -0
- package/dist/docs/development/components/external-diagram-embeds/04-figjam.md +44 -0
- package/dist/docs/development/components/external-diagram-embeds/05-icepanel.md +68 -0
- package/dist/docs/development/components/external-diagram-embeds/_category_.json +12 -0
- package/dist/docs/development/customization/01-customize-landing-page.md +155 -0
- package/dist/docs/development/customization/02-themes.md +429 -0
- package/dist/docs/development/customization/03-search.md +79 -0
- package/dist/docs/development/customization/06-customize-tables.md +194 -0
- package/dist/docs/development/customization/_category_.json +12 -0
- package/dist/docs/development/customization/custom-components/00-what-is-mdx.md +73 -0
- package/dist/docs/development/customization/custom-components/01-introduction.md +28 -0
- package/dist/docs/development/customization/custom-components/02-adding-components.md +145 -0
- package/dist/docs/development/customization/custom-components/03-component-styling.md +27 -0
- package/dist/docs/development/customization/custom-components/04-javascript-components.md +32 -0
- package/dist/docs/development/customization/custom-components/_category_.json +11 -0
- package/dist/docs/development/customization/customize-sidebars/00-application-sidebar.md +45 -0
- package/dist/docs/development/customization/customize-sidebars/01-documentation-sidebar.md +187 -0
- package/dist/docs/development/customization/customize-sidebars/_category_.json +11 -0
- package/dist/docs/development/customization/customize-visualizer/00-visualizer-nodes.md +50 -0
- package/dist/docs/development/customization/customize-visualizer/_category_.json +11 -0
- package/dist/docs/development/deployment/_category_.json +12 -0
- package/dist/docs/development/deployment/build-and-deploy.md +71 -0
- package/dist/docs/development/deployment/build-ssr-mode.md +50 -0
- package/dist/docs/development/deployment/deployment-workflows.md +43 -0
- package/dist/docs/development/deployment/hosting-options.md +112 -0
- package/dist/docs/development/deployment/licenses.md +50 -0
- package/dist/docs/development/design/_category_.json +12 -0
- package/dist/docs/development/design/embed-designs-into-eventcatalog.md +29 -0
- package/dist/docs/development/design/further-reading.md +19 -0
- package/dist/docs/development/design/import-resources.md +27 -0
- package/dist/docs/development/design/intro.md +22 -0
- package/dist/docs/development/developer-tools/_category_.json +12 -0
- package/dist/docs/development/developer-tools/eventcatalog-linter.md +597 -0
- package/dist/docs/development/developer-tools/github-action.md +147 -0
- package/dist/docs/development/developer-tools/llms.txt.md +55 -0
- package/dist/docs/development/developer-tools/schemas.txt.md +42 -0
- package/dist/docs/development/governance/_category_.json +6 -0
- package/dist/docs/development/governance/architecture-change-detection/01-introduction.md +62 -0
- package/dist/docs/development/governance/architecture-change-detection/02-configuration.md +134 -0
- package/dist/docs/development/governance/architecture-change-detection/03-recipes.md +309 -0
- package/dist/docs/development/governance/architecture-change-detection/04-webhooks.md +187 -0
- package/dist/docs/development/governance/architecture-change-detection/05-ci-cd.md +121 -0
- package/dist/docs/development/governance/architecture-change-detection/06-pipeline-gates.md +162 -0
- package/dist/docs/development/governance/architecture-change-detection/_category_.json +6 -0
- package/dist/docs/development/guides/12-customize-your-sidebar.md +12 -0
- package/dist/docs/development/guides/99-adding-analytics.md +138 -0
- package/dist/docs/development/guides/_category_.json +11 -0
- package/dist/docs/development/guides/changelogs/01-introduction.md +33 -0
- package/dist/docs/development/guides/changelogs/02-adding-changelogs.md +94 -0
- package/dist/docs/development/guides/changelogs/03-automated-changelogs.md +44 -0
- package/dist/docs/development/guides/changelogs/_category_.json +11 -0
- package/dist/docs/development/guides/channels/01-introduction.md +111 -0
- package/dist/docs/development/guides/channels/02-adding-channels.md +198 -0
- package/dist/docs/development/guides/channels/04-adding-messages-to-services.md +292 -0
- package/dist/docs/development/guides/channels/09-configuration +39 -0
- package/dist/docs/development/guides/channels/_category_.json +11 -0
- package/dist/docs/development/guides/channels/ownership-and-components/01-owners.md +44 -0
- package/dist/docs/development/guides/channels/ownership-and-components/02-components.md +16 -0
- package/dist/docs/development/guides/channels/ownership-and-components/_category_.json +11 -0
- package/dist/docs/development/guides/channels/versioning-and-lifecycle/01-versioning.md +31 -0
- package/dist/docs/development/guides/channels/versioning-and-lifecycle/02-changelog.md +56 -0
- package/dist/docs/development/guides/channels/versioning-and-lifecycle/_category_.json +11 -0
- package/dist/docs/development/guides/data/01-introduction.md +34 -0
- package/dist/docs/development/guides/data/02-adding-data.md +86 -0
- package/dist/docs/development/guides/data/03a-adding-schemas-to-data-stores.md +73 -0
- package/dist/docs/development/guides/data/_category_.json +11 -0
- package/dist/docs/development/guides/data/ownership-and-components/01-owners.md +45 -0
- package/dist/docs/development/guides/data/ownership-and-components/02-components.md +17 -0
- package/dist/docs/development/guides/data/ownership-and-components/_category_.json +11 -0
- package/dist/docs/development/guides/data/versioning-and-lifecycle/01-versioning.md +32 -0
- package/dist/docs/development/guides/data/versioning-and-lifecycle/02-changelog.md +57 -0
- package/dist/docs/development/guides/data/versioning-and-lifecycle/03-deprecating.md +71 -0
- package/dist/docs/development/guides/data/versioning-and-lifecycle/_category_.json +11 -0
- package/dist/docs/development/guides/data-products/01-introduction.md +116 -0
- package/dist/docs/development/guides/data-products/02-adding-data-products.md +157 -0
- package/dist/docs/development/guides/data-products/03-inputs-and-outputs.md +128 -0
- package/dist/docs/development/guides/data-products/04-contracts.md +102 -0
- package/dist/docs/development/guides/data-products/05-versioning.md +240 -0
- package/dist/docs/development/guides/data-products/06-adding-to-domains.md +52 -0
- package/dist/docs/development/guides/data-products/_category_.json +11 -0
- package/dist/docs/development/guides/diagrams/01-introduction.md +78 -0
- package/dist/docs/development/guides/diagrams/02-creating-diagrams.md +195 -0
- package/dist/docs/development/guides/diagrams/03-referencing-diagrams.md +195 -0
- package/dist/docs/development/guides/diagrams/04-versioning-diagrams.md +204 -0
- package/dist/docs/development/guides/diagrams/05-comparing-diagrams.md +145 -0
- package/dist/docs/development/guides/diagrams/06-diagrams-with-llms.md +165 -0
- package/dist/docs/development/guides/diagrams/_category_.json +10 -0
- package/dist/docs/development/guides/domains/01-introduction.md +22 -0
- package/dist/docs/development/guides/domains/02-creating-domains/02-adding-domains.md +108 -0
- package/dist/docs/development/guides/domains/02-creating-domains/02a-subdomains.md +84 -0
- package/dist/docs/development/guides/domains/02-creating-domains/03-adding-services-to-domains.md +90 -0
- package/dist/docs/development/guides/domains/02-creating-domains/04-adding-messages-to-domains.md +107 -0
- package/dist/docs/development/guides/domains/02-creating-domains/05-adding-data-products-to-domains.md +105 -0
- package/dist/docs/development/guides/domains/02-creating-domains/_category_.json +11 -0
- package/dist/docs/development/guides/domains/03-ownership-and-language/01-owners.md +36 -0
- package/dist/docs/development/guides/domains/03-ownership-and-language/02-adding-ubiquitous-language.md +75 -0
- package/dist/docs/development/guides/domains/03-ownership-and-language/_category_.json +10 -0
- package/dist/docs/development/guides/domains/04-versioning-and-changelogs/01-versioning.md +40 -0
- package/dist/docs/development/guides/domains/04-versioning-and-changelogs/02-changelog.md +53 -0
- package/dist/docs/development/guides/domains/04-versioning-and-changelogs/_category_.json +10 -0
- package/dist/docs/development/guides/domains/05-entities/01-introduction.md +24 -0
- package/dist/docs/development/guides/domains/05-entities/02-adding-entities.md +157 -0
- package/dist/docs/development/guides/domains/05-entities/03-adding-entities-to-domains.md +30 -0
- package/dist/docs/development/guides/domains/05-entities/04-domain-entity-map.md +134 -0
- package/dist/docs/development/guides/domains/05-entities/_category_.json +11 -0
- package/dist/docs/development/guides/domains/08-domain-integration-map.md +41 -0
- package/dist/docs/development/guides/domains/_category_.json +11 -0
- package/dist/docs/development/guides/flows/01-introduction.md +36 -0
- package/dist/docs/development/guides/flows/02-adding-flows.md +198 -0
- package/dist/docs/development/guides/flows/03-flow-nodes.md +273 -0
- package/dist/docs/development/guides/flows/04-adding-flows-to-services.md +42 -0
- package/dist/docs/development/guides/flows/05-adding-flows-to-domains.md +43 -0
- package/dist/docs/development/guides/flows/06-versioning.md +27 -0
- package/dist/docs/development/guides/flows/07-create-flow-with-ai.md +171 -0
- package/dist/docs/development/guides/flows/_category_.json +11 -0
- package/dist/docs/development/guides/messages/01-overview.md +57 -0
- package/dist/docs/development/guides/messages/_category_.json +11 -0
- package/dist/docs/development/guides/messages/commands/01-introduction.md +26 -0
- package/dist/docs/development/guides/messages/commands/02-adding-commands.md +131 -0
- package/dist/docs/development/guides/messages/commands/_category_.json +11 -0
- package/dist/docs/development/guides/messages/common/01-map-to-producers-and-consumers.md +37 -0
- package/dist/docs/development/guides/messages/common/02-adding-schemas.md +58 -0
- package/dist/docs/development/guides/messages/common/02-deprecating.md +71 -0
- package/dist/docs/development/guides/messages/common/02-draft-messages.md +63 -0
- package/dist/docs/development/guides/messages/common/02-examples.md +99 -0
- package/dist/docs/development/guides/messages/common/03-owners.md +40 -0
- package/dist/docs/development/guides/messages/common/04-versioning.md +27 -0
- package/dist/docs/development/guides/messages/common/05-changelog.md +73 -0
- package/dist/docs/development/guides/messages/common/07-components.md +12 -0
- package/dist/docs/development/guides/messages/common/08-shared-messages-across-boundaries.md +70 -0
- package/dist/docs/development/guides/messages/common/09-grouping-messages.md +98 -0
- package/dist/docs/development/guides/messages/common/_category_.json +11 -0
- package/dist/docs/development/guides/messages/events/01-introduction.md +25 -0
- package/dist/docs/development/guides/messages/events/02-adding-events.md +130 -0
- package/dist/docs/development/guides/messages/events/_category_.json +11 -0
- package/dist/docs/development/guides/messages/queries/01-introduction.md +25 -0
- package/dist/docs/development/guides/messages/queries/02-adding-queries.md +130 -0
- package/dist/docs/development/guides/messages/queries/_category_.json +11 -0
- package/dist/docs/development/guides/owners/_category_.json +11 -0
- package/dist/docs/development/guides/owners/teams/01-introduction.md +21 -0
- package/dist/docs/development/guides/owners/teams/02-adding-teams.md +73 -0
- package/dist/docs/development/guides/owners/teams/_category_.json +11 -0
- package/dist/docs/development/guides/owners/users/01-introduction.md +20 -0
- package/dist/docs/development/guides/owners/users/02-adding-users.md +70 -0
- package/dist/docs/development/guides/owners/users/_category_.json +11 -0
- package/dist/docs/development/guides/schemas/01-introduction.md +64 -0
- package/dist/docs/development/guides/schemas/02-schema-explorer.md +74 -0
- package/dist/docs/development/guides/schemas/03-schema-api.md +59 -0
- package/dist/docs/development/guides/schemas/04-schema-mcp.md +22 -0
- package/dist/docs/development/guides/schemas/05-field-usage.md +120 -0
- package/dist/docs/development/guides/schemas/06-fields-explorer.md +120 -0
- package/dist/docs/development/guides/schemas/_category_.json +11 -0
- package/dist/docs/development/guides/services/01-introduction.md +33 -0
- package/dist/docs/development/guides/services/02-adding-services.md +113 -0
- package/dist/docs/development/guides/services/03-creating-external-systems.md +71 -0
- package/dist/docs/development/guides/services/_category_.json +11 -0
- package/dist/docs/development/guides/services/adding-to-services/01-messages.md +229 -0
- package/dist/docs/development/guides/services/adding-to-services/02-datastores.md +77 -0
- package/dist/docs/development/guides/services/adding-to-services/03-entities.md +47 -0
- package/dist/docs/development/guides/services/adding-to-services/04-openapi.md +97 -0
- package/dist/docs/development/guides/services/adding-to-services/05-asyncapi.md +97 -0
- package/dist/docs/development/guides/services/adding-to-services/06-graphql.md +96 -0
- package/dist/docs/development/guides/services/adding-to-services/_category_.json +10 -0
- package/dist/docs/development/guides/services/ownership-and-components/01-owners.md +41 -0
- package/dist/docs/development/guides/services/ownership-and-components/02-components.md +13 -0
- package/dist/docs/development/guides/services/ownership-and-components/_category_.json +11 -0
- package/dist/docs/development/guides/services/versioning-and-lifecycle/01-versioning.md +27 -0
- package/dist/docs/development/guides/services/versioning-and-lifecycle/02-changelog.md +52 -0
- package/dist/docs/development/guides/services/versioning-and-lifecycle/03-deprecating.md +70 -0
- package/dist/docs/development/guides/services/versioning-and-lifecycle/_category_.json +11 -0
- package/dist/docs/development/upgrading/_category_.json +12 -0
- package/dist/docs/development/upgrading/upgrading.md +142 -0
- package/dist/docs/development/upgrading/v2.md +69 -0
- package/dist/docs/development/upgrading/v3.md +277 -0
- package/dist/docs/miro/_category_.json +12 -0
- package/dist/docs/miro/contributing/01-getting-involved.md +53 -0
- package/dist/docs/miro/contributing/_category_.json +11 -0
- package/dist/docs/miro/getting-started/01-overview.md +63 -0
- package/dist/docs/miro/getting-started/02-installation.md +37 -0
- package/dist/docs/miro/getting-started/03-connecting-to-eventcatalog.md +59 -0
- package/dist/docs/miro/getting-started/_category_.json +11 -0
- package/dist/docs/miro/guides/01-adding-resources-to-board.md +90 -0
- package/dist/docs/miro/guides/02-creating-new-resources.md +61 -0
- package/dist/docs/miro/guides/03-editing-resources.md +50 -0
- package/dist/docs/miro/guides/04-connected-resources.md +54 -0
- package/dist/docs/miro/guides/05-services-and-dependencies.md +54 -0
- package/dist/docs/miro/guides/06-navigating-the-board.md +44 -0
- package/dist/docs/miro/guides/07-exporting-to-eventcatalog.md +75 -0
- package/dist/docs/miro/guides/_category_.json +11 -0
- package/dist/docs/miro/specifications/01-asyncapi.md +86 -0
- package/dist/docs/miro/specifications/02-openapi.md +86 -0
- package/dist/docs/miro/specifications/03-schema-registries.md +88 -0
- package/dist/docs/miro/specifications/_category_.json +11 -0
- package/dist/docs/miro/using-ai/01-overview.md +105 -0
- package/dist/docs/miro/using-ai/_category_.json +11 -0
- package/dist/docs/plugins/01-intro.md +49 -0
- package/dist/docs/plugins/02-generators.md +76 -0
- package/dist/docs/plugins/03-all-plugins.md +26 -0
- package/dist/docs/plugins/_category_.json +12 -0
- package/dist/docs/plugins/amazon-apigateway/00-intro.md +75 -0
- package/dist/docs/plugins/amazon-apigateway/01-installation.md +198 -0
- package/dist/docs/plugins/amazon-apigateway/02-plugin-configuration.md +136 -0
- package/dist/docs/plugins/amazon-apigateway/03-features.md +71 -0
- package/dist/docs/plugins/amazon-apigateway/04-examples.md +15 -0
- package/dist/docs/plugins/amazon-apigateway/_category_.json +11 -0
- package/dist/docs/plugins/apicurio/00-intro.md +102 -0
- package/dist/docs/plugins/apicurio/01-installation.md +165 -0
- package/dist/docs/plugins/apicurio/02-plugin-configuration.md +682 -0
- package/dist/docs/plugins/apicurio/03-features.md +221 -0
- package/dist/docs/plugins/apicurio/04-examples.md +20 -0
- package/dist/docs/plugins/apicurio/_category_.json +12 -0
- package/dist/docs/plugins/asyncapi/00-intro.md +81 -0
- package/dist/docs/plugins/asyncapi/01-installation.md +155 -0
- package/dist/docs/plugins/asyncapi/02-plugin-configuration.md +312 -0
- package/dist/docs/plugins/asyncapi/03-features.md +698 -0
- package/dist/docs/plugins/asyncapi/03a-workflows.md +153 -0
- package/dist/docs/plugins/asyncapi/04-examples.md +23 -0
- package/dist/docs/plugins/asyncapi/04-using-reference-objects.md +45 -0
- package/dist/docs/plugins/asyncapi/_category_.json +12 -0
- package/dist/docs/plugins/aws-glue-registry/00-intro.md +104 -0
- package/dist/docs/plugins/aws-glue-registry/00a-installation.md +305 -0
- package/dist/docs/plugins/aws-glue-registry/01-features.md +287 -0
- package/dist/docs/plugins/aws-glue-registry/02-examples.md +368 -0
- package/dist/docs/plugins/aws-glue-registry/03-api.md +282 -0
- package/dist/docs/plugins/aws-glue-registry/_category_.json +11 -0
- package/dist/docs/plugins/azure-schema-registry/00-intro.md +92 -0
- package/dist/docs/plugins/azure-schema-registry/01-installation.md +409 -0
- package/dist/docs/plugins/azure-schema-registry/02-plugin-configuration.md +375 -0
- package/dist/docs/plugins/azure-schema-registry/03-features.md +347 -0
- package/dist/docs/plugins/azure-schema-registry/04-examples.md +378 -0
- package/dist/docs/plugins/azure-schema-registry/_category_.json +12 -0
- package/dist/docs/plugins/backstage/00-intro.md +67 -0
- package/dist/docs/plugins/backstage/01-installation.md +250 -0
- package/dist/docs/plugins/backstage/02-api.md +51 -0
- package/dist/docs/plugins/backstage/03-examples.md +12 -0
- package/dist/docs/plugins/backstage/_category_.json +11 -0
- package/dist/docs/plugins/confluent-schema-registry/00-intro.md +90 -0
- package/dist/docs/plugins/confluent-schema-registry/01-installation.md +223 -0
- package/dist/docs/plugins/confluent-schema-registry/02-plugin-configuration.md +473 -0
- package/dist/docs/plugins/confluent-schema-registry/03-features.md +43 -0
- package/dist/docs/plugins/confluent-schema-registry/04-examples.md +19 -0
- package/dist/docs/plugins/confluent-schema-registry/_category_.json +12 -0
- package/dist/docs/plugins/eventbridge/00-intro.md +55 -0
- package/dist/docs/plugins/eventbridge/00a-installation.md +317 -0
- package/dist/docs/plugins/eventbridge/01-features.md +225 -0
- package/dist/docs/plugins/eventbridge/02-examples.md +17 -0
- package/dist/docs/plugins/eventbridge/03-api.md +441 -0
- package/dist/docs/plugins/eventbridge/03a-workflows.md +133 -0
- package/dist/docs/plugins/eventbridge/_category_.json +11 -0
- package/dist/docs/plugins/eventcatalog-federation/00-introduction.md +69 -0
- package/dist/docs/plugins/eventcatalog-federation/01-installation.md +182 -0
- package/dist/docs/plugins/eventcatalog-federation/02-plugin-configuration.md +208 -0
- package/dist/docs/plugins/eventcatalog-federation/03-examples.md +15 -0
- package/dist/docs/plugins/eventcatalog-federation/04-configuration.md +193 -0
- package/dist/docs/plugins/eventcatalog-federation/05-setup-team-catalog.md +97 -0
- package/dist/docs/plugins/eventcatalog-federation/_category_.json +11 -0
- package/dist/docs/plugins/github/00-intro.md +93 -0
- package/dist/docs/plugins/github/01-installation.md +293 -0
- package/dist/docs/plugins/github/02-plugin-configuration.md +253 -0
- package/dist/docs/plugins/github/03-features.md +42 -0
- package/dist/docs/plugins/github/04-examples.md +17 -0
- package/dist/docs/plugins/github/_category_.json +12 -0
- package/dist/docs/plugins/graphql/00-intro.md +74 -0
- package/dist/docs/plugins/graphql/01-installation.md +144 -0
- package/dist/docs/plugins/graphql/02-plugin-configuration.md +127 -0
- package/dist/docs/plugins/graphql/03-features.md +197 -0
- package/dist/docs/plugins/graphql/04-examples.md +15 -0
- package/dist/docs/plugins/graphql/_category_.json +12 -0
- package/dist/docs/plugins/hookdeck/01-intro.md +152 -0
- package/dist/docs/plugins/hookdeck/02-api.md +133 -0
- package/dist/docs/plugins/hookdeck/03-cli.md +45 -0
- package/dist/docs/plugins/hookdeck/_category_.json +11 -0
- package/dist/docs/plugins/openapi/00-intro.md +78 -0
- package/dist/docs/plugins/openapi/01-installation.md +148 -0
- package/dist/docs/plugins/openapi/02-plugin-configuration.md +332 -0
- package/dist/docs/plugins/openapi/03-features.md +790 -0
- package/dist/docs/plugins/openapi/03a-workflows.md +153 -0
- package/dist/docs/plugins/openapi/04-examples.md +23 -0
- package/dist/docs/plugins/openapi/_category_.json +12 -0
- package/dist/eventcatalog.cjs +434 -35
- package/dist/eventcatalog.config.d.cts +8 -0
- package/dist/eventcatalog.config.d.ts +8 -0
- package/dist/eventcatalog.js +87 -10
- package/dist/features.cjs +6 -0
- package/dist/features.d.cts +2 -1
- package/dist/features.d.ts +2 -1
- package/dist/features.js +3 -1
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/search-indexer.cjs +356 -0
- package/dist/search-indexer.d.cts +30 -0
- package/dist/search-indexer.d.ts +30 -0
- package/dist/search-indexer.js +10 -0
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/astro.config.mjs +28 -32
- package/eventcatalog/src/components/Search/SearchModal.tsx +248 -148
- package/eventcatalog/src/components/Search/search-utils.spec.ts +138 -1
- package/eventcatalog/src/components/Search/search-utils.ts +271 -0
- package/eventcatalog/src/env.d.ts +1 -0
- package/package.json +4 -3
package/dist/eventcatalog.cjs
CHANGED
|
@@ -29,10 +29,10 @@ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
|
29
29
|
// src/eventcatalog.ts
|
|
30
30
|
var import_commander = require("commander");
|
|
31
31
|
var import_node_child_process = require("child_process");
|
|
32
|
-
var
|
|
32
|
+
var import_node_path9 = require("path");
|
|
33
33
|
var import_node_http = __toESM(require("http"), 1);
|
|
34
34
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
35
|
-
var
|
|
35
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
36
36
|
var import_node_url = require("url");
|
|
37
37
|
|
|
38
38
|
// src/generate.js
|
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.
|
|
117
|
+
var version = "3.36.1";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
|
@@ -590,10 +590,23 @@ var import_boxen = __toESM(require("boxen"), 1);
|
|
|
590
590
|
// src/features.ts
|
|
591
591
|
var import_node_path5 = require("path");
|
|
592
592
|
var import_node_fs4 = __toESM(require("fs"), 1);
|
|
593
|
+
var getProjectOutDir = async () => {
|
|
594
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
595
|
+
return config?.outDir || "dist";
|
|
596
|
+
};
|
|
593
597
|
var isOutputServer = async () => {
|
|
594
598
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
595
599
|
return config?.output === "server";
|
|
596
600
|
};
|
|
601
|
+
var isIndexedSearchEnabled = async () => {
|
|
602
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
603
|
+
return config?.search?.type === "indexed";
|
|
604
|
+
};
|
|
605
|
+
var isAuthEnabled = async () => {
|
|
606
|
+
const directory = process.env.PROJECT_DIR || process.cwd();
|
|
607
|
+
const hasAuthConfig = import_node_fs4.default.existsSync((0, import_node_path5.join)(directory, "eventcatalog.auth.js"));
|
|
608
|
+
return hasAuthConfig;
|
|
609
|
+
};
|
|
597
610
|
|
|
598
611
|
// src/eventcatalog.ts
|
|
599
612
|
var import_update_notifier = __toESM(require("update-notifier"), 1);
|
|
@@ -1086,22 +1099,22 @@ function getAvroTypeName(type) {
|
|
|
1086
1099
|
function walkAvroRecord(schema, prefix, fields) {
|
|
1087
1100
|
if (!schema.fields || !Array.isArray(schema.fields)) return;
|
|
1088
1101
|
for (const field of schema.fields) {
|
|
1089
|
-
const
|
|
1102
|
+
const path10 = prefix ? `${prefix}.${field.name}` : field.name;
|
|
1090
1103
|
const isOptional = Array.isArray(field.type) && field.type.includes("null");
|
|
1091
1104
|
const typeName = getAvroTypeName(field.type);
|
|
1092
1105
|
fields.push({
|
|
1093
|
-
path:
|
|
1106
|
+
path: path10,
|
|
1094
1107
|
type: typeName,
|
|
1095
1108
|
description: field.doc || "",
|
|
1096
1109
|
required: !isOptional
|
|
1097
1110
|
});
|
|
1098
1111
|
const innerType = Array.isArray(field.type) ? field.type.find((t) => typeof t === "object" && t.type === "record") : typeof field.type === "object" && field.type.type === "record" ? field.type : null;
|
|
1099
1112
|
if (innerType) {
|
|
1100
|
-
walkAvroRecord(innerType,
|
|
1113
|
+
walkAvroRecord(innerType, path10, fields);
|
|
1101
1114
|
}
|
|
1102
1115
|
const arrayType = Array.isArray(field.type) ? field.type.find((t) => typeof t === "object" && t.type === "array") : typeof field.type === "object" && field.type.type === "array" ? field.type : null;
|
|
1103
1116
|
if (arrayType && typeof arrayType.items === "object" && arrayType.items.type === "record") {
|
|
1104
|
-
walkAvroRecord(arrayType.items, `${
|
|
1117
|
+
walkAvroRecord(arrayType.items, `${path10}[]`, fields);
|
|
1105
1118
|
}
|
|
1106
1119
|
}
|
|
1107
1120
|
}
|
|
@@ -1132,32 +1145,32 @@ function walkJsonSchema(node, prefix, requiredList, rootSchema, fields) {
|
|
|
1132
1145
|
}
|
|
1133
1146
|
if (!node.properties) return;
|
|
1134
1147
|
for (const [name, prop] of Object.entries(node.properties)) {
|
|
1135
|
-
const
|
|
1148
|
+
const path10 = prefix ? `${prefix}.${name}` : name;
|
|
1136
1149
|
const isRequired = requiredList.includes(name);
|
|
1137
1150
|
if (prop.$ref) {
|
|
1138
1151
|
const resolved = resolveLocalRef(prop.$ref, rootSchema);
|
|
1139
1152
|
if (resolved) {
|
|
1140
1153
|
const rawRefType = resolved.type || "object";
|
|
1141
1154
|
const type2 = Array.isArray(rawRefType) ? [...rawRefType].sort().join(" | ") : rawRefType;
|
|
1142
|
-
fields.push({ path:
|
|
1155
|
+
fields.push({ path: path10, type: type2, description: resolved.description || "", required: isRequired });
|
|
1143
1156
|
if (resolved.properties) {
|
|
1144
|
-
walkJsonSchema(resolved,
|
|
1157
|
+
walkJsonSchema(resolved, path10, resolved.required || [], rootSchema, fields);
|
|
1145
1158
|
}
|
|
1146
1159
|
} else {
|
|
1147
|
-
fields.push({ path:
|
|
1160
|
+
fields.push({ path: path10, type: "$ref", description: "", required: isRequired });
|
|
1148
1161
|
}
|
|
1149
1162
|
continue;
|
|
1150
1163
|
}
|
|
1151
1164
|
const rawType = prop.type || (prop.enum ? "enum" : prop.$ref ? "$ref" : "object");
|
|
1152
1165
|
const typeList = Array.isArray(rawType) ? rawType : [rawType];
|
|
1153
1166
|
const type = Array.isArray(rawType) ? [...rawType].sort().join(" | ") : rawType;
|
|
1154
|
-
fields.push({ path:
|
|
1167
|
+
fields.push({ path: path10, type, description: prop.description || "", required: isRequired });
|
|
1155
1168
|
if (typeList.includes("object") && prop.properties) {
|
|
1156
|
-
walkJsonSchema(prop,
|
|
1169
|
+
walkJsonSchema(prop, path10, prop.required || [], rootSchema, fields);
|
|
1157
1170
|
}
|
|
1158
1171
|
if (typeList.includes("array") && prop.items) {
|
|
1159
1172
|
if (prop.items.type === "object" && prop.items.properties) {
|
|
1160
|
-
walkJsonSchema(prop.items, `${
|
|
1173
|
+
walkJsonSchema(prop.items, `${path10}[]`, prop.items.required || [], rootSchema, fields);
|
|
1161
1174
|
}
|
|
1162
1175
|
}
|
|
1163
1176
|
}
|
|
@@ -1268,16 +1281,331 @@ async function buildFieldsIndex(catalogDir, outputDir) {
|
|
|
1268
1281
|
}
|
|
1269
1282
|
}
|
|
1270
1283
|
|
|
1284
|
+
// src/search-indexer.ts
|
|
1285
|
+
var import_promises2 = __toESM(require("fs/promises"), 1);
|
|
1286
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
1287
|
+
var import_glob4 = require("glob");
|
|
1288
|
+
var import_gray_matter4 = __toESM(require("gray-matter"), 1);
|
|
1289
|
+
var RESOURCE_COLLECTIONS = {
|
|
1290
|
+
channels: { docsPath: "channels", type: "Channel" },
|
|
1291
|
+
commands: { docsPath: "commands", type: "Command" },
|
|
1292
|
+
containers: { docsPath: "containers", type: "Container" },
|
|
1293
|
+
"data-products": { docsPath: "data-products", type: "Data Product" },
|
|
1294
|
+
domains: { docsPath: "domains", type: "Domain" },
|
|
1295
|
+
entities: { docsPath: "entities", type: "Entity" },
|
|
1296
|
+
events: { docsPath: "events", type: "Event" },
|
|
1297
|
+
flows: { docsPath: "flows", type: "Flow" },
|
|
1298
|
+
queries: { docsPath: "queries", type: "Query" },
|
|
1299
|
+
services: { docsPath: "services", type: "Service" },
|
|
1300
|
+
subdomains: { docsPath: "domains", type: "Domain" }
|
|
1301
|
+
};
|
|
1302
|
+
var IGNORED_GLOBS = [
|
|
1303
|
+
"**/.git/**",
|
|
1304
|
+
"**/.eventcatalog-core/**",
|
|
1305
|
+
"**/dist/**",
|
|
1306
|
+
"**/node_modules/**",
|
|
1307
|
+
"**/public/**",
|
|
1308
|
+
"**/snippets/**",
|
|
1309
|
+
"**/chat-prompts/**"
|
|
1310
|
+
];
|
|
1311
|
+
var trimSlashes = (value) => value.replace(/^\/+|\/+$/g, "");
|
|
1312
|
+
var normalizePath = (value) => value.replace(/\\/g, "/");
|
|
1313
|
+
var removeExtension = (value) => value.replace(/\.(md|mdx)$/i, "");
|
|
1314
|
+
var stripNumericPrefix = (value) => value.replace(/^\d+(?:[-_.\s]+)?/, "") || value;
|
|
1315
|
+
var normalizeUrlPath = (value) => {
|
|
1316
|
+
const withoutIndex = value.replace(/\/index$/i, "");
|
|
1317
|
+
return withoutIndex || "";
|
|
1318
|
+
};
|
|
1319
|
+
var buildUrl = (pathname, config) => {
|
|
1320
|
+
const base = config.base ? `/${trimSlashes(config.base)}` : "";
|
|
1321
|
+
const cleanPath = `/${trimSlashes(pathname)}`;
|
|
1322
|
+
const url = `${base}${cleanPath}`.replace(/\/{2,}/g, "/");
|
|
1323
|
+
if (config.trailingSlash === true && !url.endsWith("/")) {
|
|
1324
|
+
return `${url}/`;
|
|
1325
|
+
}
|
|
1326
|
+
return url || "/";
|
|
1327
|
+
};
|
|
1328
|
+
var valueToSearchText = (value) => {
|
|
1329
|
+
if (value === null || value === void 0) return "";
|
|
1330
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return String(value);
|
|
1331
|
+
if (Array.isArray(value)) return value.map(valueToSearchText).filter(Boolean).join(" ");
|
|
1332
|
+
if (typeof value === "object") return Object.values(value).map(valueToSearchText).filter(Boolean).join(" ");
|
|
1333
|
+
return "";
|
|
1334
|
+
};
|
|
1335
|
+
var markdownToSearchText = (content) => {
|
|
1336
|
+
return content.replace(/<!--[\s\S]*?-->/g, " ").replace(/^\s*import\s+.*$/gm, " ").replace(/^\s*export\s+.*$/gm, " ").replace(/```[\s\S]*?```/g, (match) => match.replace(/```[a-zA-Z0-9-]*\n?/g, " ").replace(/```/g, " ")).replace(/<([A-Z][A-Za-z0-9.]*)\b([^>]*)\/?>/g, (_match, _component, attributes) => {
|
|
1337
|
+
const quotedValues = [...String(attributes).matchAll(/(?:title|label|description|alt|summary)=["'`]([^"'`]+)["'`]/g)];
|
|
1338
|
+
return quotedValues.map((entry) => entry[1]).join(" ");
|
|
1339
|
+
}).replace(/<\/?[A-Za-z][^>]*>/g, " ").replace(/\[\[([^|\]]+)\|([^\]]+)\]\]/g, "$2").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/[`*_~>#|{}[\]():]/g, " ").replace(/\s+/g, " ").trim();
|
|
1340
|
+
};
|
|
1341
|
+
var inferDocIdFromFile = (relativePath, frontmatterId) => {
|
|
1342
|
+
if (frontmatterId) return frontmatterId;
|
|
1343
|
+
const fileName = import_node_path8.default.posix.basename(removeExtension(relativePath));
|
|
1344
|
+
if (fileName.toLowerCase() === "index") {
|
|
1345
|
+
return import_node_path8.default.posix.basename(import_node_path8.default.posix.dirname(relativePath));
|
|
1346
|
+
}
|
|
1347
|
+
return stripNumericPrefix(fileName);
|
|
1348
|
+
};
|
|
1349
|
+
var findResourceSegment = (segments) => {
|
|
1350
|
+
let match = null;
|
|
1351
|
+
for (let index = 0; index < segments.length - 1; index++) {
|
|
1352
|
+
const segment = segments[index];
|
|
1353
|
+
if (RESOURCE_COLLECTIONS[segment] && segments[index + 1]) {
|
|
1354
|
+
match = { index, segment };
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
return match;
|
|
1358
|
+
};
|
|
1359
|
+
var readResourceFrontmatter = async (projectDir, resourcePath) => {
|
|
1360
|
+
const candidates = [import_node_path8.default.join(projectDir, resourcePath, "index.mdx"), import_node_path8.default.join(projectDir, resourcePath, "index.md")];
|
|
1361
|
+
for (const candidate of candidates) {
|
|
1362
|
+
try {
|
|
1363
|
+
const file = await import_promises2.default.readFile(candidate, "utf8");
|
|
1364
|
+
return (0, import_gray_matter4.default)(file).data;
|
|
1365
|
+
} catch {
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
return {};
|
|
1369
|
+
};
|
|
1370
|
+
var deriveRecordFromPath = async ({
|
|
1371
|
+
projectDir,
|
|
1372
|
+
relativePath,
|
|
1373
|
+
data,
|
|
1374
|
+
config
|
|
1375
|
+
}) => {
|
|
1376
|
+
const normalizedRelativePath = normalizePath(relativePath);
|
|
1377
|
+
const segments = normalizedRelativePath.split("/").filter(Boolean);
|
|
1378
|
+
const fileName = segments[segments.length - 1] || "";
|
|
1379
|
+
const fileNameWithoutExtension = removeExtension(fileName);
|
|
1380
|
+
if (data.hidden === true || data.draft) {
|
|
1381
|
+
return null;
|
|
1382
|
+
}
|
|
1383
|
+
if (segments[0] === "docs") {
|
|
1384
|
+
const customPath = normalizeUrlPath(removeExtension(segments.slice(1).join("/")));
|
|
1385
|
+
const title = data.title || data.label || import_node_path8.default.posix.basename(customPath) || "Custom docs";
|
|
1386
|
+
return {
|
|
1387
|
+
url: buildUrl(`/docs/custom/${customPath}`, config),
|
|
1388
|
+
title,
|
|
1389
|
+
summary: data.summary,
|
|
1390
|
+
type: "Custom Doc",
|
|
1391
|
+
collection: "custom-docs",
|
|
1392
|
+
id: customPath
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
if (segments[0] === "users" || segments[0] === "teams") {
|
|
1396
|
+
const id = data.id || (fileNameWithoutExtension === "index" ? segments[1] : fileNameWithoutExtension);
|
|
1397
|
+
const type = segments[0] === "users" ? "User" : "Team";
|
|
1398
|
+
return {
|
|
1399
|
+
url: buildUrl(`/docs/${segments[0]}/${id}`, config),
|
|
1400
|
+
title: data.name || data.title || id,
|
|
1401
|
+
summary: data.summary,
|
|
1402
|
+
type,
|
|
1403
|
+
collection: segments[0],
|
|
1404
|
+
id
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
const resourceMatch = findResourceSegment(segments);
|
|
1408
|
+
if (!resourceMatch) {
|
|
1409
|
+
return null;
|
|
1410
|
+
}
|
|
1411
|
+
const resourceConfig = RESOURCE_COLLECTIONS[resourceMatch.segment];
|
|
1412
|
+
const resourceFolderId = segments[resourceMatch.index + 1];
|
|
1413
|
+
const resourcePathSegments = segments.slice(0, resourceMatch.index + 2);
|
|
1414
|
+
const versionFromPath = segments[resourceMatch.index + 2] === "versioned" && segments[resourceMatch.index + 3] ? segments[resourceMatch.index + 3] : void 0;
|
|
1415
|
+
if (versionFromPath) {
|
|
1416
|
+
resourcePathSegments.push("versioned", versionFromPath);
|
|
1417
|
+
}
|
|
1418
|
+
const resourcePath = resourcePathSegments.join("/");
|
|
1419
|
+
const resourceData = fileNameWithoutExtension === "index" ? data : await readResourceFrontmatter(projectDir, resourcePath);
|
|
1420
|
+
const resourceId = resourceData.id || data.resourceId || resourceFolderId;
|
|
1421
|
+
const resourceVersion = versionFromPath || resourceData.version || data.resourceVersion || data.version;
|
|
1422
|
+
if (!resourceVersion) {
|
|
1423
|
+
return null;
|
|
1424
|
+
}
|
|
1425
|
+
if (fileNameWithoutExtension === "index") {
|
|
1426
|
+
return {
|
|
1427
|
+
url: buildUrl(`/docs/${resourceConfig.docsPath}/${resourceId}/${resourceVersion}`, config),
|
|
1428
|
+
title: data.name || data.title || resourceId,
|
|
1429
|
+
summary: data.summary,
|
|
1430
|
+
type: resourceConfig.type,
|
|
1431
|
+
collection: resourceConfig.docsPath,
|
|
1432
|
+
id: resourceId,
|
|
1433
|
+
version: resourceVersion
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
if (fileNameWithoutExtension === "ubiquitous-language") {
|
|
1437
|
+
return {
|
|
1438
|
+
url: buildUrl(`/docs/${resourceConfig.docsPath}/${resourceId}/language`, config),
|
|
1439
|
+
title: data.title || `${resourceData.name || resourceId} ubiquitous language`,
|
|
1440
|
+
summary: data.summary,
|
|
1441
|
+
type: "Language",
|
|
1442
|
+
collection: "language",
|
|
1443
|
+
id: resourceId,
|
|
1444
|
+
version: resourceVersion
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
if (fileNameWithoutExtension === "changelog") {
|
|
1448
|
+
return {
|
|
1449
|
+
url: buildUrl(`/docs/${resourceConfig.docsPath}/${resourceId}/${resourceVersion}/changelog`, config),
|
|
1450
|
+
title: data.title || `${resourceData.name || resourceId} changelog`,
|
|
1451
|
+
summary: data.summary,
|
|
1452
|
+
type: "Changelog",
|
|
1453
|
+
collection: "changelog",
|
|
1454
|
+
id: resourceId,
|
|
1455
|
+
version: resourceVersion
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
const docsIndex = segments.indexOf("docs");
|
|
1459
|
+
if (docsIndex > resourceMatch.index) {
|
|
1460
|
+
const docType = data.type || segments[docsIndex + 1] || "pages";
|
|
1461
|
+
const docId = inferDocIdFromFile(normalizedRelativePath, data.id);
|
|
1462
|
+
const title = data.title || stripNumericPrefix(removeExtension(fileName));
|
|
1463
|
+
return {
|
|
1464
|
+
url: buildUrl(`/docs/${resourceConfig.docsPath}/${resourceId}/${resourceVersion}/${docType}/${docId}`, config),
|
|
1465
|
+
title,
|
|
1466
|
+
summary: data.summary,
|
|
1467
|
+
type: "Resource Doc",
|
|
1468
|
+
collection: docType,
|
|
1469
|
+
id: docId,
|
|
1470
|
+
version: data.version || resourceVersion
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
if (segments[0] === "diagrams") {
|
|
1474
|
+
const id = data.id || resourceFolderId;
|
|
1475
|
+
const version2 = data.version || resourceVersion;
|
|
1476
|
+
return {
|
|
1477
|
+
url: buildUrl(`/diagrams/${id}/${version2}`, config),
|
|
1478
|
+
title: data.name || data.title || id,
|
|
1479
|
+
summary: data.summary,
|
|
1480
|
+
type: "Design",
|
|
1481
|
+
collection: "diagrams",
|
|
1482
|
+
id,
|
|
1483
|
+
version: version2
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
return null;
|
|
1487
|
+
};
|
|
1488
|
+
var collectSearchRecords = async ({
|
|
1489
|
+
projectDir,
|
|
1490
|
+
config
|
|
1491
|
+
}) => {
|
|
1492
|
+
const files = await (0, import_glob4.glob)("**/*.{md,mdx}", {
|
|
1493
|
+
cwd: projectDir,
|
|
1494
|
+
absolute: true,
|
|
1495
|
+
nodir: true,
|
|
1496
|
+
ignore: IGNORED_GLOBS,
|
|
1497
|
+
windowsPathsNoEscape: process.platform === "win32"
|
|
1498
|
+
});
|
|
1499
|
+
const records = await Promise.all(
|
|
1500
|
+
files.map(async (file) => {
|
|
1501
|
+
const raw = await import_promises2.default.readFile(file, "utf8");
|
|
1502
|
+
const parsed = (0, import_gray_matter4.default)(raw);
|
|
1503
|
+
const relativePath = normalizePath(import_node_path8.default.relative(projectDir, file));
|
|
1504
|
+
const baseRecord = await deriveRecordFromPath({
|
|
1505
|
+
projectDir,
|
|
1506
|
+
relativePath,
|
|
1507
|
+
data: parsed.data,
|
|
1508
|
+
config
|
|
1509
|
+
});
|
|
1510
|
+
if (!baseRecord) {
|
|
1511
|
+
return null;
|
|
1512
|
+
}
|
|
1513
|
+
const frontmatterText = valueToSearchText({
|
|
1514
|
+
id: baseRecord.id,
|
|
1515
|
+
title: baseRecord.title,
|
|
1516
|
+
summary: baseRecord.summary,
|
|
1517
|
+
version: baseRecord.version,
|
|
1518
|
+
owners: parsed.data.owners,
|
|
1519
|
+
badges: parsed.data.badges
|
|
1520
|
+
});
|
|
1521
|
+
const content = [frontmatterText, markdownToSearchText(parsed.content)].filter(Boolean).join("\n\n");
|
|
1522
|
+
if (!content.trim()) {
|
|
1523
|
+
return null;
|
|
1524
|
+
}
|
|
1525
|
+
return {
|
|
1526
|
+
...baseRecord,
|
|
1527
|
+
content
|
|
1528
|
+
};
|
|
1529
|
+
})
|
|
1530
|
+
);
|
|
1531
|
+
const uniqueRecords = /* @__PURE__ */ new Map();
|
|
1532
|
+
for (const record of records) {
|
|
1533
|
+
if (!record) continue;
|
|
1534
|
+
uniqueRecords.set(record.url, record);
|
|
1535
|
+
}
|
|
1536
|
+
return [...uniqueRecords.values()].sort((a, b) => a.url.localeCompare(b.url));
|
|
1537
|
+
};
|
|
1538
|
+
var getSearchOutputPath = ({
|
|
1539
|
+
outDir,
|
|
1540
|
+
isServer,
|
|
1541
|
+
searchOutputPath
|
|
1542
|
+
}) => {
|
|
1543
|
+
if (searchOutputPath) {
|
|
1544
|
+
return searchOutputPath;
|
|
1545
|
+
}
|
|
1546
|
+
return import_node_path8.default.join(outDir, isServer ? "client" : "", "pagefind");
|
|
1547
|
+
};
|
|
1548
|
+
var buildSearchIndex = async ({ projectDir, outDir, config, isServer, searchOutputPath }) => {
|
|
1549
|
+
const records = await collectSearchRecords({ projectDir, config });
|
|
1550
|
+
if (records.length === 0) {
|
|
1551
|
+
throw new Error("No searchable Markdown or MDX content was found.");
|
|
1552
|
+
}
|
|
1553
|
+
const pagefind = await import("pagefind");
|
|
1554
|
+
const { index } = await pagefind.createIndex({
|
|
1555
|
+
keepIndexUrl: false,
|
|
1556
|
+
writePlayground: false
|
|
1557
|
+
});
|
|
1558
|
+
const errors = [];
|
|
1559
|
+
for (const record of records) {
|
|
1560
|
+
const result = await index.addCustomRecord({
|
|
1561
|
+
url: record.url,
|
|
1562
|
+
content: record.content,
|
|
1563
|
+
language: "en",
|
|
1564
|
+
meta: {
|
|
1565
|
+
title: record.title,
|
|
1566
|
+
summary: record.summary || "",
|
|
1567
|
+
type: record.type,
|
|
1568
|
+
collection: record.collection,
|
|
1569
|
+
id: record.id || "",
|
|
1570
|
+
version: record.version || ""
|
|
1571
|
+
},
|
|
1572
|
+
filters: {
|
|
1573
|
+
type: [record.type],
|
|
1574
|
+
collection: [record.collection]
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
if (result.errors?.length) {
|
|
1578
|
+
errors.push(...result.errors.map((error) => `${record.url}: ${error.message || error}`));
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
const outputPath = getSearchOutputPath({ outDir, isServer, searchOutputPath });
|
|
1582
|
+
await import_promises2.default.rm(outputPath, { recursive: true, force: true });
|
|
1583
|
+
const writeResult = await index.writeFiles({ outputPath });
|
|
1584
|
+
if (writeResult.errors?.length) {
|
|
1585
|
+
errors.push(...writeResult.errors.map((error) => error.message || String(error)));
|
|
1586
|
+
}
|
|
1587
|
+
await index.deleteIndex?.();
|
|
1588
|
+
await pagefind.close?.();
|
|
1589
|
+
if (errors.length > 0) {
|
|
1590
|
+
throw new Error(`Failed to build indexed search:
|
|
1591
|
+
${errors.join("\n")}`);
|
|
1592
|
+
}
|
|
1593
|
+
return {
|
|
1594
|
+
records: records.length,
|
|
1595
|
+
outputPath
|
|
1596
|
+
};
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1271
1599
|
// src/eventcatalog.ts
|
|
1272
1600
|
var import_license = require("@eventcatalog/license");
|
|
1273
|
-
var currentDir =
|
|
1601
|
+
var currentDir = import_node_path10.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
1274
1602
|
var program = new import_commander.Command().version(VERSION);
|
|
1275
|
-
var dir =
|
|
1276
|
-
var core =
|
|
1277
|
-
var eventCatalogDir =
|
|
1603
|
+
var dir = import_node_path10.default.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
1604
|
+
var core = import_node_path10.default.resolve(process.env.CATALOG_DIR || (0, import_node_path9.join)(dir, ".eventcatalog-core"));
|
|
1605
|
+
var eventCatalogDir = import_node_path10.default.resolve((0, import_node_path9.join)(currentDir, "../eventcatalog/"));
|
|
1278
1606
|
var getInstalledEventCatalogVersion = () => {
|
|
1279
1607
|
try {
|
|
1280
|
-
const pkg = import_fs2.default.readFileSync((0,
|
|
1608
|
+
const pkg = import_fs2.default.readFileSync((0, import_node_path9.join)(dir, "package.json"), "utf8");
|
|
1281
1609
|
const json = JSON.parse(pkg);
|
|
1282
1610
|
return json.dependencies["@eventcatalog/core"];
|
|
1283
1611
|
} catch (error) {
|
|
@@ -1351,6 +1679,57 @@ var createAstroDevLineFilter = () => {
|
|
|
1351
1679
|
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
1352
1680
|
};
|
|
1353
1681
|
};
|
|
1682
|
+
var buildDevSearchIndex = async ({ config }) => {
|
|
1683
|
+
const result = await buildSearchIndex({
|
|
1684
|
+
projectDir: dir,
|
|
1685
|
+
outDir: import_node_path10.default.join(core, "public"),
|
|
1686
|
+
searchOutputPath: import_node_path10.default.join(core, "public", "pagefind"),
|
|
1687
|
+
config,
|
|
1688
|
+
isServer: false
|
|
1689
|
+
});
|
|
1690
|
+
logger.info(`Indexed ${result.records} page(s) into ${import_node_path10.default.relative(core, result.outputPath)}`, "search");
|
|
1691
|
+
};
|
|
1692
|
+
var warnIfIndexedSearchUsesAuth = async () => {
|
|
1693
|
+
if (!await isAuthEnabled()) {
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
logger.info(
|
|
1697
|
+
"Indexed search creates client-readable search files. Make sure your deployment protects /pagefind assets if your catalog is private.",
|
|
1698
|
+
"search"
|
|
1699
|
+
);
|
|
1700
|
+
};
|
|
1701
|
+
var createDevSearchIndexWatcher = ({ config }) => {
|
|
1702
|
+
let timeout;
|
|
1703
|
+
let isBuilding = false;
|
|
1704
|
+
let queued = false;
|
|
1705
|
+
const run = async () => {
|
|
1706
|
+
if (isBuilding) {
|
|
1707
|
+
queued = true;
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
isBuilding = true;
|
|
1711
|
+
try {
|
|
1712
|
+
await buildDevSearchIndex({ config });
|
|
1713
|
+
} catch (err) {
|
|
1714
|
+
logger.info(`Failed to rebuild indexed search: ${err.message}`, "search");
|
|
1715
|
+
} finally {
|
|
1716
|
+
isBuilding = false;
|
|
1717
|
+
if (queued) {
|
|
1718
|
+
queued = false;
|
|
1719
|
+
run();
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
return (_err, events) => {
|
|
1724
|
+
if (!events.some((event) => event.path.endsWith(".md") || event.path.endsWith(".mdx"))) {
|
|
1725
|
+
return;
|
|
1726
|
+
}
|
|
1727
|
+
if (timeout) {
|
|
1728
|
+
clearTimeout(timeout);
|
|
1729
|
+
}
|
|
1730
|
+
timeout = setTimeout(run, 500);
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1354
1733
|
var replaceAstroReadyVersionLine = (line) => {
|
|
1355
1734
|
const matches = line.match(/^(\s*)astro(\s+)v\S+(\s+ready.*)$/i);
|
|
1356
1735
|
if (!matches) {
|
|
@@ -1482,8 +1861,8 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
1482
1861
|
logger.info("Setting up EventCatalog...", "eventcatalog");
|
|
1483
1862
|
const isServer = await isOutputServer();
|
|
1484
1863
|
logger.info(isServer ? "EventCatalog is running in Server Mode" : "EventCatalog is running in Static Mode", "config");
|
|
1485
|
-
if (import_fs2.default.existsSync(
|
|
1486
|
-
import_dotenv.default.config({ path:
|
|
1864
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
1865
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1487
1866
|
}
|
|
1488
1867
|
if (options.debug) {
|
|
1489
1868
|
logger.info("Debug mode enabled", "debug");
|
|
@@ -1496,6 +1875,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
1496
1875
|
await resolve_catalog_dependencies_default(dir, core);
|
|
1497
1876
|
await runMigrations(dir);
|
|
1498
1877
|
await catalogToAstro(dir, core);
|
|
1878
|
+
const config = await getEventCatalogConfigFile(dir);
|
|
1499
1879
|
const canEmbedPages = await (0, import_license.isFeatureEnabled)(
|
|
1500
1880
|
"@eventcatalog/backstage-plugin-eventcatalog",
|
|
1501
1881
|
process.env.EVENTCATALOG_LICENSE_KEY_BACKSTAGE
|
|
@@ -1515,10 +1895,16 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
1515
1895
|
logger.info(`Failed to build fields index: ${err.message}`, "fields");
|
|
1516
1896
|
}
|
|
1517
1897
|
}
|
|
1898
|
+
const shouldBuildIndexedSearch = await isIndexedSearchEnabled();
|
|
1899
|
+
if (shouldBuildIndexedSearch) {
|
|
1900
|
+
await warnIfIndexedSearchUsesAuth();
|
|
1901
|
+
logger.info("Building indexed search for local development...", "search");
|
|
1902
|
+
await buildDevSearchIndex({ config });
|
|
1903
|
+
}
|
|
1518
1904
|
checkForUpdate();
|
|
1519
1905
|
let watchUnsub;
|
|
1520
1906
|
try {
|
|
1521
|
-
watchUnsub = await watch(dir, core);
|
|
1907
|
+
watchUnsub = await watch(dir, core, shouldBuildIndexedSearch ? createDevSearchIndexWatcher({ config }) : void 0);
|
|
1522
1908
|
const args = command.args.join(" ").trim();
|
|
1523
1909
|
if (options.prewarm) {
|
|
1524
1910
|
const prewarmPort = await resolveDevPort({
|
|
@@ -1555,8 +1941,8 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
1555
1941
|
logger.info("Building EventCatalog...", "build");
|
|
1556
1942
|
const isServer = await isOutputServer();
|
|
1557
1943
|
logger.info(isServer ? "EventCatalog is running in Server Mode" : "EventCatalog is running in Static Mode", "config");
|
|
1558
|
-
if (import_fs2.default.existsSync(
|
|
1559
|
-
import_dotenv.default.config({ path:
|
|
1944
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
1945
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1560
1946
|
}
|
|
1561
1947
|
await verifyRequiredFieldsAreInCatalogConfigFile(dir);
|
|
1562
1948
|
copyCore();
|
|
@@ -1602,6 +1988,19 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
1602
1988
|
},
|
|
1603
1989
|
shouldFilterLine: createAstroLineFilter()
|
|
1604
1990
|
});
|
|
1991
|
+
if (await isIndexedSearchEnabled()) {
|
|
1992
|
+
await warnIfIndexedSearchUsesAuth();
|
|
1993
|
+
const config = await getEventCatalogConfigFile(dir);
|
|
1994
|
+
const outDir = import_node_path10.default.resolve(dir, await getProjectOutDir());
|
|
1995
|
+
logger.info("Building indexed search...", "search");
|
|
1996
|
+
const result = await buildSearchIndex({
|
|
1997
|
+
projectDir: dir,
|
|
1998
|
+
outDir,
|
|
1999
|
+
config,
|
|
2000
|
+
isServer
|
|
2001
|
+
});
|
|
2002
|
+
logger.info(`Indexed ${result.records} page(s) into ${import_node_path10.default.relative(dir, result.outputPath)}`, "search");
|
|
2003
|
+
}
|
|
1605
2004
|
});
|
|
1606
2005
|
var previewCatalog = ({
|
|
1607
2006
|
command,
|
|
@@ -1623,7 +2022,7 @@ var startServerCatalog = ({
|
|
|
1623
2022
|
isEventCatalogStarter = false,
|
|
1624
2023
|
isEventCatalogScale = false
|
|
1625
2024
|
}) => {
|
|
1626
|
-
const serverEntryPath =
|
|
2025
|
+
const serverEntryPath = import_node_path10.default.join(dir, "dist", "server", "entry.mjs");
|
|
1627
2026
|
(0, import_node_child_process.execSync)(
|
|
1628
2027
|
`cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} node "${serverEntryPath}"`,
|
|
1629
2028
|
{
|
|
@@ -1635,8 +2034,8 @@ var startServerCatalog = ({
|
|
|
1635
2034
|
program.command("preview").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
1636
2035
|
logger.welcome();
|
|
1637
2036
|
logger.info("Starting preview of your build...", "preview");
|
|
1638
|
-
if (import_fs2.default.existsSync(
|
|
1639
|
-
import_dotenv.default.config({ path:
|
|
2037
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
2038
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1640
2039
|
}
|
|
1641
2040
|
const canEmbedPages = await (0, import_license.isFeatureEnabled)(
|
|
1642
2041
|
"@eventcatalog/backstage-plugin-eventcatalog",
|
|
@@ -1649,8 +2048,8 @@ program.command("preview").description("Serves the contents of your eventcatalog
|
|
|
1649
2048
|
program.command("start").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
1650
2049
|
logger.welcome();
|
|
1651
2050
|
logger.info("Starting preview of your build...", "preview");
|
|
1652
|
-
if (import_fs2.default.existsSync(
|
|
1653
|
-
import_dotenv.default.config({ path:
|
|
2051
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
2052
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1654
2053
|
}
|
|
1655
2054
|
const canEmbedPages = await (0, import_license.isFeatureEnabled)(
|
|
1656
2055
|
"@eventcatalog/backstage-plugin-eventcatalog",
|
|
@@ -1678,22 +2077,22 @@ program.command("start").description("Serves the contents of your eventcatalog b
|
|
|
1678
2077
|
program.command("export").description("Export your EventCatalog using the SDK dumpCatalog function").option("--include-markdown", "Include markdown content in the export", false).action(async (options) => {
|
|
1679
2078
|
logger.welcome();
|
|
1680
2079
|
logger.info("Exporting EventCatalog...", "export");
|
|
1681
|
-
if (import_fs2.default.existsSync(
|
|
1682
|
-
import_dotenv.default.config({ path:
|
|
2080
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
2081
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1683
2082
|
}
|
|
1684
2083
|
const { default: initSDK } = await import("@eventcatalog/sdk");
|
|
1685
2084
|
const sdk = initSDK(dir);
|
|
1686
2085
|
const catalog = await sdk.dumpCatalog({ includeMarkdown: options.includeMarkdown });
|
|
1687
|
-
const exportsDir =
|
|
2086
|
+
const exportsDir = import_node_path10.default.join(dir, "exports");
|
|
1688
2087
|
ensureDir(exportsDir);
|
|
1689
2088
|
const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
1690
|
-
const exportFile =
|
|
2089
|
+
const exportFile = import_node_path10.default.join(exportsDir, `catalog-${date}.json`);
|
|
1691
2090
|
import_fs2.default.writeFileSync(exportFile, JSON.stringify(catalog, null, 2), "utf-8");
|
|
1692
2091
|
logger.info(`Catalog exported to ${exportFile}`, "export");
|
|
1693
2092
|
});
|
|
1694
2093
|
program.command("generate [siteDir]").description("Start the generator scripts.").action(async () => {
|
|
1695
|
-
if (import_fs2.default.existsSync(
|
|
1696
|
-
import_dotenv.default.config({ path:
|
|
2094
|
+
if (import_fs2.default.existsSync(import_node_path10.default.join(dir, ".env"))) {
|
|
2095
|
+
import_dotenv.default.config({ path: import_node_path10.default.join(dir, ".env") });
|
|
1697
2096
|
}
|
|
1698
2097
|
await generate(dir);
|
|
1699
2098
|
});
|
|
@@ -90,6 +90,14 @@ interface Config {
|
|
|
90
90
|
enabled: boolean;
|
|
91
91
|
limit: number;
|
|
92
92
|
};
|
|
93
|
+
search?: {
|
|
94
|
+
/**
|
|
95
|
+
* - 'resource': Fast default search across catalog resources.
|
|
96
|
+
* - 'indexed': Opt-in full-content search index generated at build time.
|
|
97
|
+
* @default 'resource'
|
|
98
|
+
*/
|
|
99
|
+
type?: 'resource' | 'indexed';
|
|
100
|
+
};
|
|
93
101
|
llmsTxt?: {
|
|
94
102
|
enabled: boolean;
|
|
95
103
|
};
|
|
@@ -90,6 +90,14 @@ interface Config {
|
|
|
90
90
|
enabled: boolean;
|
|
91
91
|
limit: number;
|
|
92
92
|
};
|
|
93
|
+
search?: {
|
|
94
|
+
/**
|
|
95
|
+
* - 'resource': Fast default search across catalog resources.
|
|
96
|
+
* - 'indexed': Opt-in full-content search index generated at build time.
|
|
97
|
+
* @default 'resource'
|
|
98
|
+
*/
|
|
99
|
+
type?: 'resource' | 'indexed';
|
|
100
|
+
};
|
|
93
101
|
llmsTxt?: {
|
|
94
102
|
enabled: boolean;
|
|
95
103
|
};
|