@eventcatalog/core 2.35.8 → 2.35.10

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.35.8";
40
+ var version = "2.35.10";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-RAHESCX4.js";
4
- import "../chunk-3LCAKJ2U.js";
3
+ } from "../chunk-APUSQIXG.js";
4
+ import "../chunk-BLST6HNF.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.35.8";
109
+ var version = "2.35.10";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-AS3INH2X.js";
4
- import "../chunk-RAHESCX4.js";
5
- import "../chunk-3LCAKJ2U.js";
3
+ } from "../chunk-X5PED26N.js";
4
+ import "../chunk-APUSQIXG.js";
5
+ import "../chunk-BLST6HNF.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -221,6 +221,9 @@ var catalogToAstro = async (source, astroDir) => {
221
221
  if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
222
222
  import_fs.default.mkdirSync(astroContentDir);
223
223
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
224
+ if (!import_fs.default.existsSync(path3.join(source, "eventcatalog.styles.css"))) {
225
+ import_fs.default.writeFileSync(path3.join(source, "eventcatalog.styles.css"), "");
226
+ }
224
227
  await copyFiles(source, astroDir);
225
228
  };
226
229
  var checkAndConvertMdToMdx = async (source, astroDir) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  catalogToAstro,
3
3
  checkAndConvertMdToMdx
4
- } from "./chunk-5ZG43YD2.js";
4
+ } from "./chunk-SLEMYHTU.js";
5
5
  import "./chunk-E7TXTI7G.js";
6
6
  import "./chunk-EXAALOQA.js";
7
7
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3LCAKJ2U.js";
3
+ } from "./chunk-BLST6HNF.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.35.8";
2
+ var version = "2.35.10";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -38,6 +38,9 @@ var catalogToAstro = async (source, astroDir) => {
38
38
  if (fs.existsSync(astroContentDir)) fs.rmSync(astroContentDir, { recursive: true });
39
39
  fs.mkdirSync(astroContentDir);
40
40
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
41
+ if (!fs.existsSync(path.join(source, "eventcatalog.styles.css"))) {
42
+ fs.writeFileSync(path.join(source, "eventcatalog.styles.css"), "");
43
+ }
41
44
  await copyFiles(source, astroDir);
42
45
  };
43
46
  var checkAndConvertMdToMdx = async (source, astroDir) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-RAHESCX4.js";
3
+ } from "./chunk-APUSQIXG.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.35.8";
28
+ var version = "2.35.10";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3LCAKJ2U.js";
3
+ } from "./chunk-BLST6HNF.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.35.8";
160
+ var version = "2.35.10";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -412,6 +412,9 @@ var catalogToAstro = async (source, astroDir) => {
412
412
  if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
413
413
  import_fs.default.mkdirSync(astroContentDir);
414
414
  await verifyRequiredFieldsAreInCatalogConfigFile(source);
415
+ if (!import_fs.default.existsSync(path5.join(source, "eventcatalog.styles.css"))) {
416
+ import_fs.default.writeFileSync(path5.join(source, "eventcatalog.styles.css"), "");
417
+ }
415
418
  await copyFiles(source, astroDir);
416
419
  };
417
420
  var checkAndConvertMdToMdx = async (source, astroDir) => {
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-AS3INH2X.js";
10
- import "./chunk-RAHESCX4.js";
9
+ } from "./chunk-X5PED26N.js";
10
+ import "./chunk-APUSQIXG.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
- } from "./chunk-5ZG43YD2.js";
14
+ } from "./chunk-SLEMYHTU.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-3LCAKJ2U.js";
17
+ } from "./chunk-BLST6HNF.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -45,6 +45,11 @@ const customDocs = await getCollection('customPages');
45
45
 
46
46
  import { isEventCatalogUpgradeEnabled } from '@utils/feature';
47
47
 
48
+ // Try and load any custom styles if they exist
49
+ try {
50
+ await import('../../eventcatalog.styles.css');
51
+ } catch (error) {}
52
+
48
53
  const currentPath = Astro.url.pathname;
49
54
 
50
55
  const catalogHasDefaultLandingPageForDocs = await hasLandingPageForDocs();
@@ -0,0 +1,22 @@
1
+ import * as HeroIcons from '@heroicons/react/24/outline';
2
+ import * as ProtocolIcons from '@icons/protocols';
3
+
4
+ // const allIcons = [...HeroIcons, ...ProtocolIcons];
5
+
6
+ const protocolIcons = Object.keys(ProtocolIcons).reduce(
7
+ (icons, key) => {
8
+ const iconKey = key as keyof typeof ProtocolIcons;
9
+ icons[key.toLowerCase()] = ProtocolIcons[iconKey];
10
+ return icons;
11
+ },
12
+ {} as { [key: string]: string }
13
+ );
14
+
15
+ const getIconForProtocol = (icon: keyof typeof protocolIcons) => {
16
+ const Icon = protocolIcons[icon];
17
+ return Icon ? (props: any) => <span {...props} dangerouslySetInnerHTML={{ __html: Icon }} /> : null;
18
+ };
19
+
20
+ export function getIcon(iconName: string) {
21
+ return getIconForProtocol(iconName as keyof typeof protocolIcons) || HeroIcons[iconName as keyof typeof HeroIcons] || null;
22
+ }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.35.8",
9
+ "version": "2.35.10",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -1,5 +0,0 @@
1
- import * as HeroIcons from '@heroicons/react/24/outline';
2
-
3
- export function getIcon(iconName: string) {
4
- return HeroIcons[iconName as keyof typeof HeroIcons] || null;
5
- }