@eventcatalog/core 4.11.2 → 4.12.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +17 -11
  4. package/dist/analytics/log-build.js +4 -4
  5. package/dist/astro-config-path.cjs +51 -0
  6. package/dist/astro-config-path.d.cts +6 -0
  7. package/dist/astro-config-path.d.ts +6 -0
  8. package/dist/astro-config-path.js +6 -0
  9. package/dist/catalog-runtime.cjs +136 -0
  10. package/dist/catalog-runtime.d.cts +12 -0
  11. package/dist/catalog-runtime.d.ts +12 -0
  12. package/dist/catalog-runtime.js +8 -0
  13. package/dist/{chunk-B7HCX5HM.js → chunk-3SJDIENM.js} +1 -1
  14. package/dist/{chunk-AFPH6ERZ.js → chunk-5QRWGO2E.js} +1 -1
  15. package/dist/{chunk-6U72KINX.js → chunk-DJCOJ77J.js} +1 -0
  16. package/dist/{chunk-LHR4G2UO.js → chunk-EEZXGNF6.js} +1 -1
  17. package/dist/{chunk-XMRPNDXB.js → chunk-ISBBAOCD.js} +1 -1
  18. package/dist/{chunk-Z6OKCHWL.js → chunk-IUPFEQMU.js} +2 -2
  19. package/dist/{chunk-6QENHZZP.js → chunk-JE6RX7SJ.js} +11 -5
  20. package/dist/{chunk-LAWEGSJH.js → chunk-LU4GFIHH.js} +1 -1
  21. package/dist/{chunk-2YJRF4ZX.js → chunk-RYPZGCRN.js} +1 -1
  22. package/dist/chunk-SAN4U2WU.js +96 -0
  23. package/dist/{chunk-EGH3ALRY.js → chunk-TVLJNFDW.js} +4 -4
  24. package/dist/chunk-U63GDPPY.js +14 -0
  25. package/dist/chunk-VIJJ7JKH.js +17 -0
  26. package/dist/constants.cjs +1 -1
  27. package/dist/constants.js +1 -1
  28. package/dist/eventcatalog-config-file-utils.cjs +13 -7
  29. package/dist/eventcatalog-config-file-utils.d.cts +86 -2
  30. package/dist/eventcatalog-config-file-utils.d.ts +86 -2
  31. package/dist/eventcatalog-config-file-utils.js +1 -1
  32. package/dist/eventcatalog.cjs +227 -561
  33. package/dist/eventcatalog.js +62 -71
  34. package/dist/features.cjs +10 -6
  35. package/dist/features.js +2 -2
  36. package/dist/federation/federate.cjs +110 -106
  37. package/dist/federation/federate.js +4 -4
  38. package/dist/generate.cjs +11 -7
  39. package/dist/generate.js +4 -4
  40. package/dist/resolve-catalog-dependencies.cjs +12 -8
  41. package/dist/resolve-catalog-dependencies.js +2 -2
  42. package/dist/runtime-dependencies/@ai-sdk__react.mjs +3 -0
  43. package/dist/runtime-dependencies/@astrojs__markdown-remark.mjs +3 -0
  44. package/dist/runtime-dependencies/@astrojs__mdx.mjs +3 -0
  45. package/dist/runtime-dependencies/@astrojs__node.mjs +3 -0
  46. package/dist/runtime-dependencies/@astrojs__react.mjs +3 -0
  47. package/dist/runtime-dependencies/@astrojs__rss.mjs +3 -0
  48. package/dist/runtime-dependencies/@asyncapi__avro-schema-parser.mjs +3 -0
  49. package/dist/runtime-dependencies/@asyncapi__parser.mjs +3 -0
  50. package/dist/runtime-dependencies/@asyncapi__react-component.mjs +3 -0
  51. package/dist/runtime-dependencies/@asyncapi__react-component__styles__default.min.css.mjs +3 -0
  52. package/dist/runtime-dependencies/@auth__core.mjs +3 -0
  53. package/dist/runtime-dependencies/@auth__core__providers__auth0.mjs +3 -0
  54. package/dist/runtime-dependencies/@auth__core__providers__github.mjs +3 -0
  55. package/dist/runtime-dependencies/@auth__core__providers__google.mjs +3 -0
  56. package/dist/runtime-dependencies/@auth__core__providers__microsoft-entra-id.mjs +3 -0
  57. package/dist/runtime-dependencies/@auth__core__providers__okta.mjs +3 -0
  58. package/dist/runtime-dependencies/@auth__core__types.mjs +3 -0
  59. package/dist/runtime-dependencies/@eventcatalog__license.mjs +3 -0
  60. package/dist/runtime-dependencies/@eventcatalog__linter.mjs +3 -0
  61. package/dist/runtime-dependencies/@eventcatalog__sdk.mjs +3 -0
  62. package/dist/runtime-dependencies/@eventcatalog__visualiser.mjs +3 -0
  63. package/dist/runtime-dependencies/@eventcatalog__visualiser__styles-core.css.mjs +3 -0
  64. package/dist/runtime-dependencies/@fontsource__inter.mjs +3 -0
  65. package/dist/runtime-dependencies/@fontsource__inter__400.css.mjs +3 -0
  66. package/dist/runtime-dependencies/@fontsource__inter__700.css.mjs +3 -0
  67. package/dist/runtime-dependencies/@headlessui__react.mjs +3 -0
  68. package/dist/runtime-dependencies/@heroicons__react.mjs +3 -0
  69. package/dist/runtime-dependencies/@heroicons__react__16__solid__EnvelopeIcon.mjs +3 -0
  70. package/dist/runtime-dependencies/@heroicons__react__20__solid.mjs +3 -0
  71. package/dist/runtime-dependencies/@heroicons__react__24__outline.mjs +3 -0
  72. package/dist/runtime-dependencies/@heroicons__react__24__outline__MagnifyingGlassIcon.mjs +3 -0
  73. package/dist/runtime-dependencies/@heroicons__react__24__outline__RectangleGroupIcon.mjs +3 -0
  74. package/dist/runtime-dependencies/@heroicons__react__24__outline__ServerIcon.mjs +3 -0
  75. package/dist/runtime-dependencies/@heroicons__react__24__solid.mjs +3 -0
  76. package/dist/runtime-dependencies/@iconify-json__logos.mjs +3 -0
  77. package/dist/runtime-dependencies/@mermaid-js__layout-elk.mjs +3 -0
  78. package/dist/runtime-dependencies/@mermaid-js__layout-elk__dist__mermaid-layout-elk.core.mjs.mjs +3 -0
  79. package/dist/runtime-dependencies/@modelcontextprotocol__sdk.mjs +3 -0
  80. package/dist/runtime-dependencies/@modelcontextprotocol__sdk__server__mcp.js.mjs +3 -0
  81. package/dist/runtime-dependencies/@modelcontextprotocol__sdk__server__webStandardStreamableHttp.js.mjs +3 -0
  82. package/dist/runtime-dependencies/@nanostores__react.mjs +3 -0
  83. package/dist/runtime-dependencies/@parcel__watcher.mjs +3 -0
  84. package/dist/runtime-dependencies/@radix-ui__react-context-menu.mjs +3 -0
  85. package/dist/runtime-dependencies/@radix-ui__react-dialog.mjs +3 -0
  86. package/dist/runtime-dependencies/@radix-ui__react-dropdown-menu.mjs +3 -0
  87. package/dist/runtime-dependencies/@radix-ui__react-popover.mjs +3 -0
  88. package/dist/runtime-dependencies/@radix-ui__react-tooltip.mjs +3 -0
  89. package/dist/runtime-dependencies/@scalar__api-reference-react.mjs +3 -0
  90. package/dist/runtime-dependencies/@scalar__api-reference-react__style.css.mjs +3 -0
  91. package/dist/runtime-dependencies/@tailwindcss__typography.mjs +3 -0
  92. package/dist/runtime-dependencies/@tailwindcss__vite.mjs +3 -0
  93. package/dist/runtime-dependencies/@tanstack__react-table.mjs +3 -0
  94. package/dist/runtime-dependencies/@xyflow__react.mjs +3 -0
  95. package/dist/runtime-dependencies/@xyflow__react__dist__style.css.mjs +3 -0
  96. package/dist/runtime-dependencies/ai.mjs +3 -0
  97. package/dist/runtime-dependencies/astro-expressive-code.mjs +3 -0
  98. package/dist/runtime-dependencies/astro-expressive-code__components.mjs +3 -0
  99. package/dist/runtime-dependencies/astro-seo.mjs +3 -0
  100. package/dist/runtime-dependencies/astro.mjs +3 -0
  101. package/dist/runtime-dependencies/astro__assets__services__sharp.mjs +3 -0
  102. package/dist/runtime-dependencies/astro__config.mjs +3 -0
  103. package/dist/runtime-dependencies/astro__jsx-runtime.mjs +3 -0
  104. package/dist/runtime-dependencies/astro__loaders.mjs +3 -0
  105. package/dist/runtime-dependencies/astro__logger__node.mjs +3 -0
  106. package/dist/runtime-dependencies/astro__types.mjs +3 -0
  107. package/dist/runtime-dependencies/astro__zod.mjs +3 -0
  108. package/dist/runtime-dependencies/auth-astro.mjs +3 -0
  109. package/dist/runtime-dependencies/auth-astro__client.mjs +3 -0
  110. package/dist/runtime-dependencies/auth-astro__server.mjs +3 -0
  111. package/dist/runtime-dependencies/boxen.mjs +3 -0
  112. package/dist/runtime-dependencies/commander.mjs +3 -0
  113. package/dist/runtime-dependencies/cross-env.mjs +3 -0
  114. package/dist/runtime-dependencies/d3-drag.mjs +3 -0
  115. package/dist/runtime-dependencies/d3-force.mjs +3 -0
  116. package/dist/runtime-dependencies/d3-selection.mjs +3 -0
  117. package/dist/runtime-dependencies/d3-zoom.mjs +3 -0
  118. package/dist/runtime-dependencies/dagre.mjs +3 -0
  119. package/dist/runtime-dependencies/diff.mjs +3 -0
  120. package/dist/runtime-dependencies/diff2html.mjs +3 -0
  121. package/dist/runtime-dependencies/diff2html__bundles__css__diff2html.min.css.mjs +3 -0
  122. package/dist/runtime-dependencies/dotenv.mjs +3 -0
  123. package/dist/runtime-dependencies/elkjs.mjs +3 -0
  124. package/dist/runtime-dependencies/elkjs__lib__elk.bundled.js.mjs +3 -0
  125. package/dist/runtime-dependencies/glob.mjs +3 -0
  126. package/dist/runtime-dependencies/gray-matter.mjs +3 -0
  127. package/dist/runtime-dependencies/hono.mjs +3 -0
  128. package/dist/runtime-dependencies/html-to-image.mjs +3 -0
  129. package/dist/runtime-dependencies/js-yaml.mjs +3 -0
  130. package/dist/runtime-dependencies/jsonpath-plus.mjs +3 -0
  131. package/dist/runtime-dependencies/jsonwebtoken.mjs +3 -0
  132. package/dist/runtime-dependencies/lodash.debounce.mjs +3 -0
  133. package/dist/runtime-dependencies/lodash.merge.mjs +3 -0
  134. package/dist/runtime-dependencies/lucide-react.mjs +3 -0
  135. package/dist/runtime-dependencies/manifest.json +136 -0
  136. package/dist/runtime-dependencies/marked.mjs +3 -0
  137. package/dist/runtime-dependencies/mdast-util-find-and-replace.mjs +3 -0
  138. package/dist/runtime-dependencies/mermaid.mjs +3 -0
  139. package/dist/runtime-dependencies/minisearch.mjs +3 -0
  140. package/dist/runtime-dependencies/nanostores.mjs +3 -0
  141. package/dist/runtime-dependencies/pagefind.mjs +3 -0
  142. package/dist/runtime-dependencies/pako.mjs +3 -0
  143. package/dist/runtime-dependencies/parse5.mjs +3 -0
  144. package/dist/runtime-dependencies/picocolors.mjs +3 -0
  145. package/dist/runtime-dependencies/picomatch.mjs +3 -0
  146. package/dist/runtime-dependencies/react-dom.mjs +3 -0
  147. package/dist/runtime-dependencies/react-dom__client.mjs +3 -0
  148. package/dist/runtime-dependencies/react-dom__server.mjs +3 -0
  149. package/dist/runtime-dependencies/react-markdown.mjs +3 -0
  150. package/dist/runtime-dependencies/react-syntax-highlighter.mjs +3 -0
  151. package/dist/runtime-dependencies/react-syntax-highlighter__dist__cjs__styles__prism.mjs +3 -0
  152. package/dist/runtime-dependencies/react-syntax-highlighter__dist__cjs__styles__prism__index.js.mjs +3 -0
  153. package/dist/runtime-dependencies/react.mjs +3 -0
  154. package/dist/runtime-dependencies/react__jsx-dev-runtime.mjs +3 -0
  155. package/dist/runtime-dependencies/react__jsx-runtime.mjs +3 -0
  156. package/dist/runtime-dependencies/recast.mjs +3 -0
  157. package/dist/runtime-dependencies/recast__parsers__babel.js.mjs +3 -0
  158. package/dist/runtime-dependencies/rehype-autolink-headings.mjs +3 -0
  159. package/dist/runtime-dependencies/rehype-expressive-code.mjs +3 -0
  160. package/dist/runtime-dependencies/rehype-expressive-code__hast.mjs +3 -0
  161. package/dist/runtime-dependencies/rehype-slug.mjs +3 -0
  162. package/dist/runtime-dependencies/remark-comment.mjs +3 -0
  163. package/dist/runtime-dependencies/remark-directive.mjs +3 -0
  164. package/dist/runtime-dependencies/remark-gfm.mjs +3 -0
  165. package/dist/runtime-dependencies/rimraf.mjs +3 -0
  166. package/dist/runtime-dependencies/semver.mjs +3 -0
  167. package/dist/runtime-dependencies/shelljs.mjs +3 -0
  168. package/dist/runtime-dependencies/sonner.mjs +3 -0
  169. package/dist/runtime-dependencies/sql.js.mjs +3 -0
  170. package/dist/runtime-dependencies/tailwindcss.mjs +3 -0
  171. package/dist/runtime-dependencies/typescript.mjs +3 -0
  172. package/dist/runtime-dependencies/unist-util-visit.mjs +3 -0
  173. package/dist/runtime-dependencies/update-notifier.mjs +3 -0
  174. package/dist/runtime-dependencies/uuid.mjs +3 -0
  175. package/dist/runtime-dependencies/zod.mjs +3 -0
  176. package/dist/runtime-dependencies/zod__v4.mjs +3 -0
  177. package/dist/search-indexer.cjs +1 -0
  178. package/dist/search-indexer.js +1 -1
  179. package/dist/utils/cli-logger.cjs +1 -1
  180. package/dist/utils/cli-logger.js +2 -2
  181. package/dist/watcher.cjs +5 -204
  182. package/dist/watcher.js +1 -2
  183. package/eventcatalog/astro.config.mjs +57 -31
  184. package/eventcatalog/integrations/catalog-assets.mjs +204 -0
  185. package/eventcatalog/integrations/config-loader.mjs +85 -0
  186. package/eventcatalog/integrations/ecstudio-watcher.mjs +11 -9
  187. package/eventcatalog/integrations/eventcatalog-runtime.mjs +252 -0
  188. package/eventcatalog/integrations/expressive-code-config.mjs +6 -0
  189. package/eventcatalog/integrations/runtime-dependencies.mjs +49 -0
  190. package/eventcatalog/integrations/runtime-dependency-manifest.mjs +15 -0
  191. package/eventcatalog/integrations/runtime-paths.mjs +16 -0
  192. package/eventcatalog/src/content.config.ts +33 -46
  193. package/eventcatalog/src/enterprise/custom-pages/routes.ts +3 -2
  194. package/eventcatalog/src/enterprise/feature.ts +2 -1
  195. package/eventcatalog/src/enterprise/fields/field-indexer.ts +5 -2
  196. package/eventcatalog/src/enterprise/fields/pages/api/fields.ts +4 -3
  197. package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +32 -32
  198. package/eventcatalog/src/enterprise/mcp/mcp-auth.ts +1 -1
  199. package/eventcatalog/src/env.d.ts +7 -1
  200. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +15 -3
  201. package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +1 -1
  202. package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +2 -2
  203. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +2 -2
  204. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +2 -2
  205. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +1 -1
  206. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +2 -2
  207. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/index.astro +1 -1
  208. package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +1 -1
  209. package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +1 -1
  210. package/eventcatalog/src/pages/docs/teams/[id]/index.astro +2 -2
  211. package/eventcatalog/src/pages/docs/users/[id]/index.astro +2 -2
  212. package/eventcatalog/src/pages/index.astro +2 -3
  213. package/eventcatalog/src/styles/tailwind.css +3 -0
  214. package/eventcatalog/src/utils/eventcatalog-config/source.ts +9 -0
  215. package/eventcatalog/src/utils/feature.ts +2 -1
  216. package/eventcatalog/tsconfig.json +1 -4
  217. package/package.json +17 -4
  218. package/dist/catalog-to-astro-content-directory.cjs +0 -382
  219. package/dist/catalog-to-astro-content-directory.d.cts +0 -3
  220. package/dist/catalog-to-astro-content-directory.d.ts +0 -3
  221. package/dist/catalog-to-astro-content-directory.js +0 -9
  222. package/dist/chunk-BWN544LB.js +0 -73
  223. package/dist/chunk-DHH5U5PF.js +0 -53
  224. package/dist/chunk-KLOHNCNF.js +0 -101
  225. package/dist/chunk-T4RVWPIQ.js +0 -85
  226. package/dist/chunk-T5IUG523.js +0 -54
  227. package/dist/chunk-W5JQON7Z.js +0 -117
  228. package/dist/copy-core.cjs +0 -88
  229. package/dist/copy-core.d.cts +0 -4
  230. package/dist/copy-core.d.ts +0 -4
  231. package/dist/copy-core.js +0 -8
  232. package/dist/core-node-modules.cjs +0 -108
  233. package/dist/core-node-modules.d.cts +0 -7
  234. package/dist/core-node-modules.d.ts +0 -7
  235. package/dist/core-node-modules.js +0 -8
  236. package/dist/custom-components.cjs +0 -89
  237. package/dist/custom-components.d.cts +0 -4
  238. package/dist/custom-components.d.ts +0 -4
  239. package/dist/custom-components.js +0 -8
  240. package/dist/map-catalog-to-astro.cjs +0 -151
  241. package/dist/map-catalog-to-astro.d.cts +0 -28
  242. package/dist/map-catalog-to-astro.d.ts +0 -28
  243. package/dist/map-catalog-to-astro.js +0 -6
@@ -1,151 +0,0 @@
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/map-catalog-to-astro.js
31
- var map_catalog_to_astro_exports = {};
32
- __export(map_catalog_to_astro_exports, {
33
- mapCatalogToAstro: () => mapCatalogToAstro
34
- });
35
- module.exports = __toCommonJS(map_catalog_to_astro_exports);
36
- var import_node_path = __toESM(require("path"), 1);
37
- var CUSTOM_PAGE_EXTENSIONS = [".astro", ".ts", ".js", ".mjs"];
38
- var COLLECTION_KEYS = [
39
- "agents",
40
- "events",
41
- "commands",
42
- "services",
43
- "domains",
44
- "flows",
45
- "pages",
46
- "changelogs",
47
- "queries",
48
- "channels",
49
- "ubiquitousLanguages",
50
- "dependencies"
51
- ];
52
- function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
53
- const relativeFilePath = removeBasePath(filePath, projectDir);
54
- if (isLikeC4Source(relativeFilePath)) {
55
- return [];
56
- }
57
- if (!isCatalogRelated(relativeFilePath)) {
58
- return [];
59
- }
60
- const customPageTargetPaths = getCustomPageTargetPaths(relativeFilePath, astroDir);
61
- if (customPageTargetPaths) {
62
- return customPageTargetPaths;
63
- }
64
- const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
65
- const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
66
- return baseTargetPaths.map((base) => import_node_path.default.join(astroDir, base, relativeTargetPath));
67
- }
68
- function removeBasePath(fullPath, basePath) {
69
- const relativePath = import_node_path.default.relative(basePath, fullPath);
70
- return relativePath.startsWith("..") ? fullPath : relativePath;
71
- }
72
- function isCollectionKey(key) {
73
- return COLLECTION_KEYS.includes(key);
74
- }
75
- function isLikeC4Source(filePath) {
76
- return filePath.endsWith(".c4") || filePath.endsWith(".likec4");
77
- }
78
- var hasExtension = (str) => /\.[a-zA-Z0-9]{2,}$/.test(str);
79
- function getCustomPageTargetPaths(filePath, astroDir) {
80
- const filePathArr = filePath.split(import_node_path.default.sep).filter(Boolean);
81
- if (filePathArr[0] !== "pages") {
82
- return null;
83
- }
84
- const customPagePath = import_node_path.default.join(astroDir, "src", "custom-pages", ...filePathArr.slice(1));
85
- if (CUSTOM_PAGE_EXTENSIONS.includes(import_node_path.default.extname(filePath).toLowerCase())) {
86
- return [customPagePath];
87
- }
88
- if (!hasExtension(filePath)) {
89
- return [customPagePath, import_node_path.default.join(astroDir, "public", "generated", ...filePathArr)];
90
- }
91
- return [import_node_path.default.join(astroDir, "public", "generated", ...filePathArr)];
92
- }
93
- function isCatalogRelated(filePath) {
94
- const filePathArr = filePath.split(import_node_path.default.sep).filter(Boolean);
95
- if ([
96
- "eventcatalog.config.js",
97
- // config file at root
98
- "eventcatalog.styles.css",
99
- // custom styles file at root
100
- "components",
101
- // custom components
102
- "snippets",
103
- // custom snippets
104
- "public",
105
- // public assets
106
- ".env",
107
- // env file
108
- ...COLLECTION_KEYS
109
- ].includes(filePathArr[0])) {
110
- return true;
111
- }
112
- return false;
113
- }
114
- function getBaseTargetPaths(filePath) {
115
- const filePathArr = filePath.split(import_node_path.default.sep).filter(Boolean);
116
- if (isCollectionKey(filePathArr[0])) {
117
- if (hasExtension(filePath)) {
118
- return [import_node_path.default.join("public", "generated")];
119
- }
120
- return [import_node_path.default.join("public", "generated")];
121
- }
122
- if (filePathArr[0] == "components") {
123
- return [import_node_path.default.join("src", "custom-defined-components")];
124
- }
125
- if (filePathArr[0] == "snippets") {
126
- return [import_node_path.default.join("src")];
127
- }
128
- if (filePathArr[0] == "public") {
129
- return [import_node_path.default.join("public")];
130
- }
131
- return [import_node_path.default.join("/")];
132
- }
133
- function getRelativeTargetPath(filePath) {
134
- const filePathArr = filePath.split(import_node_path.default.sep).filter(Boolean);
135
- if (filePathArr[0] == "public" || filePathArr[0] == "components") {
136
- filePathArr.shift();
137
- }
138
- if (filePathArr[0] == "snippets") {
139
- return import_node_path.default.join("snippets", ...filePathArr.slice(1));
140
- }
141
- const relativePath = [];
142
- for (let i = filePathArr.length - 1; i >= 0; i--) {
143
- relativePath.unshift(filePathArr[i]);
144
- if (isCollectionKey(filePathArr[i]) && filePathArr[i] != "snippets") break;
145
- }
146
- return import_node_path.default.join(...relativePath);
147
- }
148
- // Annotate the CommonJS export names for ESM import in node:
149
- 0 && (module.exports = {
150
- mapCatalogToAstro
151
- });
@@ -1,28 +0,0 @@
1
- /**
2
- * @typedef {Object} MapCatalogToAstroParams
3
- * @prop {string} filePath The catalog file path
4
- * @prop {string} astroDir The astro directory
5
- * @prop {string} projectDir The user's project directory
6
- */
7
- /**
8
- *
9
- * @param {MapCatalogToAstroParams} params
10
- * @returns {string[]} The astro file paths
11
- */
12
- declare function mapCatalogToAstro({ filePath, astroDir, projectDir }: MapCatalogToAstroParams): string[];
13
- type MapCatalogToAstroParams = {
14
- /**
15
- * The catalog file path
16
- */
17
- filePath: string;
18
- /**
19
- * The astro directory
20
- */
21
- astroDir: string;
22
- /**
23
- * The user's project directory
24
- */
25
- projectDir: string;
26
- };
27
-
28
- export { type MapCatalogToAstroParams, mapCatalogToAstro };
@@ -1,28 +0,0 @@
1
- /**
2
- * @typedef {Object} MapCatalogToAstroParams
3
- * @prop {string} filePath The catalog file path
4
- * @prop {string} astroDir The astro directory
5
- * @prop {string} projectDir The user's project directory
6
- */
7
- /**
8
- *
9
- * @param {MapCatalogToAstroParams} params
10
- * @returns {string[]} The astro file paths
11
- */
12
- declare function mapCatalogToAstro({ filePath, astroDir, projectDir }: MapCatalogToAstroParams): string[];
13
- type MapCatalogToAstroParams = {
14
- /**
15
- * The catalog file path
16
- */
17
- filePath: string;
18
- /**
19
- * The astro directory
20
- */
21
- astroDir: string;
22
- /**
23
- * The user's project directory
24
- */
25
- projectDir: string;
26
- };
27
-
28
- export { type MapCatalogToAstroParams, mapCatalogToAstro };
@@ -1,6 +0,0 @@
1
- import {
2
- mapCatalogToAstro
3
- } from "./chunk-W5JQON7Z.js";
4
- export {
5
- mapCatalogToAstro
6
- };