@eventcatalog/core 2.35.3 → 2.35.4

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.3";
40
+ var version = "2.35.4";
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-66QXZSU5.js";
4
- import "../chunk-BQ5AYBCA.js";
3
+ } from "../chunk-JMNFCO7D.js";
4
+ import "../chunk-4BDLSFLA.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.3";
109
+ var version = "2.35.4";
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-DGPXNBAU.js";
4
- import "../chunk-66QXZSU5.js";
5
- import "../chunk-BQ5AYBCA.js";
3
+ } from "../chunk-U7Y5REI4.js";
4
+ import "../chunk-JMNFCO7D.js";
5
+ import "../chunk-4BDLSFLA.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.35.3";
2
+ var version = "2.35.4";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-BQ5AYBCA.js";
3
+ } from "./chunk-4BDLSFLA.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-66QXZSU5.js";
3
+ } from "./chunk-JMNFCO7D.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.3";
28
+ var version = "2.35.4";
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-BQ5AYBCA.js";
3
+ } from "./chunk-4BDLSFLA.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.3";
160
+ var version = "2.35.4";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -792,6 +792,20 @@ var previewCatalog = ({
792
792
  }
793
793
  );
794
794
  };
795
+ var startServerCatalog = ({
796
+ command,
797
+ canEmbedPages = false,
798
+ isEventCatalogStarter = false,
799
+ isEventCatalogScale = false
800
+ }) => {
801
+ (0, import_node_child_process.execSync)(
802
+ `cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} node ./dist/server/entry.mjs`,
803
+ {
804
+ cwd: dir,
805
+ stdio: "inherit"
806
+ }
807
+ );
808
+ };
795
809
  program.command("preview").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
796
810
  console.log("Starting preview of your build...");
797
811
  if (import_fs2.default.existsSync(import_node_path7.default.join(dir, ".env"))) {
@@ -811,7 +825,12 @@ program.command("start").description("Serves the contents of your eventcatalog b
811
825
  const canEmbedPages = await isBackstagePluginEnabled();
812
826
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
813
827
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
814
- previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
828
+ const isServerOutput = await isOutputServer();
829
+ if (isServerOutput) {
830
+ startServerCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
831
+ } else {
832
+ previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
833
+ }
815
834
  });
816
835
  program.command("generate [siteDir]").description("Start the generator scripts.").action(async () => {
817
836
  await generate(dir);
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-DGPXNBAU.js";
10
- import "./chunk-66QXZSU5.js";
9
+ } from "./chunk-U7Y5REI4.js";
10
+ import "./chunk-JMNFCO7D.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
14
  } from "./chunk-5ZG43YD2.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-BQ5AYBCA.js";
17
+ } from "./chunk-4BDLSFLA.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -217,6 +217,20 @@ var previewCatalog = ({
217
217
  }
218
218
  );
219
219
  };
220
+ var startServerCatalog = ({
221
+ command,
222
+ canEmbedPages = false,
223
+ isEventCatalogStarter = false,
224
+ isEventCatalogScale = false
225
+ }) => {
226
+ execSync(
227
+ `cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} node ./dist/server/entry.mjs`,
228
+ {
229
+ cwd: dir,
230
+ stdio: "inherit"
231
+ }
232
+ );
233
+ };
220
234
  program.command("preview").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
221
235
  console.log("Starting preview of your build...");
222
236
  if (fs.existsSync(path.join(dir, ".env"))) {
@@ -236,7 +250,12 @@ program.command("start").description("Serves the contents of your eventcatalog b
236
250
  const canEmbedPages = await isBackstagePluginEnabled();
237
251
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
238
252
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
239
- previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
253
+ const isServerOutput = await isOutputServer();
254
+ if (isServerOutput) {
255
+ startServerCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
256
+ } else {
257
+ previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
258
+ }
240
259
  });
241
260
  program.command("generate [siteDir]").description("Start the generator scripts.").action(async () => {
242
261
  await generate(dir);
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.3",
9
+ "version": "2.35.4",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },