@eventcatalog/core 4.2.0 → 4.2.2
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/astro-output.cjs +43 -0
- package/dist/astro-output.d.cts +4 -0
- package/dist/astro-output.d.ts +4 -0
- package/dist/astro-output.js +8 -0
- package/dist/{chunk-4FWALA6J.js → chunk-A5LDEHRI.js} +1 -1
- package/dist/{chunk-47LY7DY2.js → chunk-HIQ22EHS.js} +3 -3
- package/dist/{chunk-QKPPJU43.js → chunk-JV33GNVZ.js} +1 -1
- package/dist/chunk-RDYYZQYU.js +18 -0
- package/dist/{chunk-KPDU47YJ.js → chunk-Z2CMR4HM.js} +1 -1
- package/dist/{chunk-J7T5HUHY.js → chunk-ZGQNCIRW.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +49 -33
- package/dist/eventcatalog.js +51 -45
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version].md.ts +3 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version].mdx.ts +4 -2
- package/eventcatalog/src/utils/file-diffs.ts +4 -2
- package/package.json +3 -3
|
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
140
140
|
var import_os = __toESM(require("os"), 1);
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
|
-
var version = "4.2.
|
|
143
|
+
var version = "4.2.2";
|
|
144
144
|
|
|
145
145
|
// src/constants.ts
|
|
146
146
|
var VERSION = version;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-J7T5HUHY.js";
|
|
3
|
+
} from "../chunk-HIQ22EHS.js";
|
|
5
4
|
import "../chunk-K2XIENVT.js";
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-ZGQNCIRW.js";
|
|
6
|
+
import "../chunk-A5LDEHRI.js";
|
|
7
7
|
import "../chunk-6QENHZZP.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/astro-output.ts
|
|
21
|
+
var astro_output_exports = {};
|
|
22
|
+
__export(astro_output_exports, {
|
|
23
|
+
createAstroDevLineFilter: () => createAstroDevLineFilter,
|
|
24
|
+
createAstroLineFilter: () => createAstroLineFilter
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(astro_output_exports);
|
|
27
|
+
var createAstroLineFilter = () => {
|
|
28
|
+
return (line) => {
|
|
29
|
+
const isIgnoredGetStaticPathsWarning = line.includes("[router]") && line.includes("getStaticPaths() ignored in dynamic page");
|
|
30
|
+
return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || /^\s*The collection ".*" does not exist or is empty\. Please check your content config file for errors\.\s*$/.test(line);
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
var createAstroDevLineFilter = () => {
|
|
34
|
+
const shouldFilterAstroLine = createAstroLineFilter();
|
|
35
|
+
return (line) => {
|
|
36
|
+
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
createAstroDevLineFilter,
|
|
42
|
+
createAstroLineFilter
|
|
43
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
raiseEvent
|
|
3
|
-
} from "./chunk-J7T5HUHY.js";
|
|
4
1
|
import {
|
|
5
2
|
countResources,
|
|
6
3
|
serializeCounts
|
|
7
4
|
} from "./chunk-K2XIENVT.js";
|
|
5
|
+
import {
|
|
6
|
+
raiseEvent
|
|
7
|
+
} from "./chunk-ZGQNCIRW.js";
|
|
8
8
|
import {
|
|
9
9
|
getEventCatalogConfigFile,
|
|
10
10
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/astro-output.ts
|
|
2
|
+
var createAstroLineFilter = () => {
|
|
3
|
+
return (line) => {
|
|
4
|
+
const isIgnoredGetStaticPathsWarning = line.includes("[router]") && line.includes("getStaticPaths() ignored in dynamic page");
|
|
5
|
+
return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || /^\s*The collection ".*" does not exist or is empty\. Please check your content config file for errors\.\s*$/.test(line);
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
var createAstroDevLineFilter = () => {
|
|
9
|
+
const shouldFilterAstroLine = createAstroLineFilter();
|
|
10
|
+
return (line) => {
|
|
11
|
+
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
createAstroLineFilter,
|
|
17
|
+
createAstroDevLineFilter
|
|
18
|
+
};
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
144
144
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
145
145
|
|
|
146
146
|
// package.json
|
|
147
|
-
var version = "4.2.
|
|
147
|
+
var version = "4.2.2";
|
|
148
148
|
|
|
149
149
|
// src/constants.ts
|
|
150
150
|
var VERSION = version;
|
|
@@ -1831,6 +1831,20 @@ var linkCoreNodeModules = ({
|
|
|
1831
1831
|
import_fs2.default.symlinkSync(installedCoreNodeModules, coreNodeModules, process.platform === "win32" ? "junction" : "dir");
|
|
1832
1832
|
};
|
|
1833
1833
|
|
|
1834
|
+
// src/astro-output.ts
|
|
1835
|
+
var createAstroLineFilter = () => {
|
|
1836
|
+
return (line) => {
|
|
1837
|
+
const isIgnoredGetStaticPathsWarning = line.includes("[router]") && line.includes("getStaticPaths() ignored in dynamic page");
|
|
1838
|
+
return line.includes("[glob-loader]") || isIgnoredGetStaticPathsWarning || /^\s*The collection ".*" does not exist or is empty\. Please check your content config file for errors\.\s*$/.test(line);
|
|
1839
|
+
};
|
|
1840
|
+
};
|
|
1841
|
+
var createAstroDevLineFilter = () => {
|
|
1842
|
+
const shouldFilterAstroLine = createAstroLineFilter();
|
|
1843
|
+
return (line) => {
|
|
1844
|
+
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1834
1848
|
// src/eventcatalog.ts
|
|
1835
1849
|
var import_license = require("@eventcatalog/license");
|
|
1836
1850
|
var currentDir = import_node_path11.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
@@ -1903,17 +1917,6 @@ var startDevPrewarm = ({
|
|
|
1903
1917
|
};
|
|
1904
1918
|
setTimeout(tick, initialDelayMs);
|
|
1905
1919
|
};
|
|
1906
|
-
var createAstroLineFilter = () => {
|
|
1907
|
-
return (line) => {
|
|
1908
|
-
return line.includes("[glob-loader]") || /The collection.*does not exist/.test(line);
|
|
1909
|
-
};
|
|
1910
|
-
};
|
|
1911
|
-
var createAstroDevLineFilter = () => {
|
|
1912
|
-
const shouldFilterAstroLine = createAstroLineFilter();
|
|
1913
|
-
return (line) => {
|
|
1914
|
-
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
1915
|
-
};
|
|
1916
|
-
};
|
|
1917
1920
|
var buildDevSearchIndex = async ({ config }) => {
|
|
1918
1921
|
const result = await buildSearchIndex({
|
|
1919
1922
|
projectDir: dir,
|
|
@@ -2244,34 +2247,43 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
2244
2247
|
logger.info(`Indexed ${result.records} page(s) into ${import_node_path11.default.relative(dir, result.outputPath)}`, "search");
|
|
2245
2248
|
}
|
|
2246
2249
|
});
|
|
2247
|
-
var previewCatalog = ({
|
|
2250
|
+
var previewCatalog = async ({
|
|
2248
2251
|
command,
|
|
2249
2252
|
canEmbedPages = false,
|
|
2250
2253
|
isEventCatalogStarter = false,
|
|
2251
2254
|
isEventCatalogScale = false
|
|
2252
2255
|
}) => {
|
|
2253
|
-
|
|
2254
|
-
`
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2256
|
+
await runCommandWithFilteredOutput({
|
|
2257
|
+
command: `npx astro preview ${command.args.join(" ").trim()}`,
|
|
2258
|
+
cwd: core,
|
|
2259
|
+
env: {
|
|
2260
|
+
PROJECT_DIR: dir,
|
|
2261
|
+
CATALOG_DIR: core,
|
|
2262
|
+
ENABLE_EMBED: String(canEmbedPages),
|
|
2263
|
+
EVENTCATALOG_STARTER: String(isEventCatalogStarter),
|
|
2264
|
+
EVENTCATALOG_SCALE: String(isEventCatalogScale)
|
|
2265
|
+
},
|
|
2266
|
+
shouldFilterLine: createAstroLineFilter()
|
|
2267
|
+
});
|
|
2260
2268
|
};
|
|
2261
|
-
var startServerCatalog = ({
|
|
2262
|
-
command,
|
|
2269
|
+
var startServerCatalog = async ({
|
|
2263
2270
|
canEmbedPages = false,
|
|
2264
2271
|
isEventCatalogStarter = false,
|
|
2265
2272
|
isEventCatalogScale = false
|
|
2266
2273
|
}) => {
|
|
2267
2274
|
const serverEntryPath = import_node_path11.default.join(dir, "dist", "server", "entry.mjs");
|
|
2268
|
-
|
|
2269
|
-
`
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
+
await runCommandWithFilteredOutput({
|
|
2276
|
+
command: `node "${serverEntryPath}"`,
|
|
2277
|
+
cwd: core,
|
|
2278
|
+
env: {
|
|
2279
|
+
PROJECT_DIR: dir,
|
|
2280
|
+
CATALOG_DIR: core,
|
|
2281
|
+
ENABLE_EMBED: String(canEmbedPages),
|
|
2282
|
+
EVENTCATALOG_STARTER: String(isEventCatalogStarter),
|
|
2283
|
+
EVENTCATALOG_SCALE: String(isEventCatalogScale)
|
|
2284
|
+
},
|
|
2285
|
+
shouldFilterLine: createAstroLineFilter()
|
|
2286
|
+
});
|
|
2275
2287
|
};
|
|
2276
2288
|
program.command("preview").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
2277
2289
|
logger.welcome();
|
|
@@ -2285,7 +2297,12 @@ program.command("preview").description("Serves the contents of your eventcatalog
|
|
|
2285
2297
|
);
|
|
2286
2298
|
const isEventCatalogStarter = await (0, import_license.isEventCatalogStarterEnabled)();
|
|
2287
2299
|
const isEventCatalogScale = await (0, import_license.isEventCatalogScaleEnabled)();
|
|
2288
|
-
previewCatalog({
|
|
2300
|
+
await previewCatalog({
|
|
2301
|
+
command,
|
|
2302
|
+
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
2303
|
+
isEventCatalogStarter,
|
|
2304
|
+
isEventCatalogScale
|
|
2305
|
+
});
|
|
2289
2306
|
});
|
|
2290
2307
|
program.command("start").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
2291
2308
|
logger.welcome();
|
|
@@ -2301,14 +2318,13 @@ program.command("start").description("Serves the contents of your eventcatalog b
|
|
|
2301
2318
|
const isEventCatalogScale = await (0, import_license.isEventCatalogScaleEnabled)();
|
|
2302
2319
|
const isServerOutput = await isOutputServer();
|
|
2303
2320
|
if (isServerOutput) {
|
|
2304
|
-
startServerCatalog({
|
|
2305
|
-
command,
|
|
2321
|
+
await startServerCatalog({
|
|
2306
2322
|
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
2307
2323
|
isEventCatalogStarter,
|
|
2308
2324
|
isEventCatalogScale
|
|
2309
2325
|
});
|
|
2310
2326
|
} else {
|
|
2311
|
-
previewCatalog({
|
|
2327
|
+
await previewCatalog({
|
|
2312
2328
|
command,
|
|
2313
2329
|
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
2314
2330
|
isEventCatalogStarter,
|
package/dist/eventcatalog.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HIQ22EHS.js";
|
|
4
|
+
import "./chunk-K2XIENVT.js";
|
|
4
5
|
import {
|
|
5
6
|
runMigrations
|
|
6
7
|
} from "./chunk-XUAF2H54.js";
|
|
7
8
|
import "./chunk-CA4U2JP7.js";
|
|
9
|
+
import {
|
|
10
|
+
getProjectOutDir,
|
|
11
|
+
isAuthEnabled,
|
|
12
|
+
isIndexedSearchEnabled,
|
|
13
|
+
isOutputServer
|
|
14
|
+
} from "./chunk-B7HCX5HM.js";
|
|
8
15
|
import {
|
|
9
16
|
generate
|
|
10
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JV33GNVZ.js";
|
|
11
18
|
import {
|
|
12
19
|
logger
|
|
13
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Z2CMR4HM.js";
|
|
14
21
|
import {
|
|
15
22
|
resolve_catalog_dependencies_default
|
|
16
23
|
} from "./chunk-LHR4G2UO.js";
|
|
@@ -20,25 +27,22 @@ import {
|
|
|
20
27
|
import {
|
|
21
28
|
watch
|
|
22
29
|
} from "./chunk-CAJUIMDJ.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import
|
|
30
|
+
import "./chunk-ZGQNCIRW.js";
|
|
31
|
+
import {
|
|
32
|
+
createAstroDevLineFilter,
|
|
33
|
+
createAstroLineFilter
|
|
34
|
+
} from "./chunk-RDYYZQYU.js";
|
|
25
35
|
import {
|
|
26
36
|
catalogToAstro
|
|
27
37
|
} from "./chunk-W3SAPOZU.js";
|
|
28
38
|
import "./chunk-W5JQON7Z.js";
|
|
29
39
|
import {
|
|
30
40
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-A5LDEHRI.js";
|
|
32
42
|
import {
|
|
33
43
|
linkCoreNodeModules,
|
|
34
44
|
resolveInstalledCoreNodeModules
|
|
35
45
|
} from "./chunk-BWN544LB.js";
|
|
36
|
-
import {
|
|
37
|
-
getProjectOutDir,
|
|
38
|
-
isAuthEnabled,
|
|
39
|
-
isIndexedSearchEnabled,
|
|
40
|
-
isOutputServer
|
|
41
|
-
} from "./chunk-B7HCX5HM.js";
|
|
42
46
|
import {
|
|
43
47
|
getEventCatalogConfigFile,
|
|
44
48
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -46,7 +50,7 @@ import {
|
|
|
46
50
|
|
|
47
51
|
// src/eventcatalog.ts
|
|
48
52
|
import { Command } from "commander";
|
|
49
|
-
import {
|
|
53
|
+
import { spawn } from "child_process";
|
|
50
54
|
import { join } from "path";
|
|
51
55
|
import http from "http";
|
|
52
56
|
import fs3 from "fs";
|
|
@@ -677,17 +681,6 @@ var startDevPrewarm = ({
|
|
|
677
681
|
};
|
|
678
682
|
setTimeout(tick, initialDelayMs);
|
|
679
683
|
};
|
|
680
|
-
var createAstroLineFilter = () => {
|
|
681
|
-
return (line) => {
|
|
682
|
-
return line.includes("[glob-loader]") || /The collection.*does not exist/.test(line);
|
|
683
|
-
};
|
|
684
|
-
};
|
|
685
|
-
var createAstroDevLineFilter = () => {
|
|
686
|
-
const shouldFilterAstroLine = createAstroLineFilter();
|
|
687
|
-
return (line) => {
|
|
688
|
-
return shouldFilterAstroLine(line) || line.includes("[router]");
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
684
|
var buildDevSearchIndex = async ({ config }) => {
|
|
692
685
|
const result = await buildSearchIndex({
|
|
693
686
|
projectDir: dir,
|
|
@@ -1018,34 +1011,43 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
1018
1011
|
logger.info(`Indexed ${result.records} page(s) into ${path2.relative(dir, result.outputPath)}`, "search");
|
|
1019
1012
|
}
|
|
1020
1013
|
});
|
|
1021
|
-
var previewCatalog = ({
|
|
1014
|
+
var previewCatalog = async ({
|
|
1022
1015
|
command,
|
|
1023
1016
|
canEmbedPages = false,
|
|
1024
1017
|
isEventCatalogStarter = false,
|
|
1025
1018
|
isEventCatalogScale = false
|
|
1026
1019
|
}) => {
|
|
1027
|
-
|
|
1028
|
-
`
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1020
|
+
await runCommandWithFilteredOutput({
|
|
1021
|
+
command: `npx astro preview ${command.args.join(" ").trim()}`,
|
|
1022
|
+
cwd: core,
|
|
1023
|
+
env: {
|
|
1024
|
+
PROJECT_DIR: dir,
|
|
1025
|
+
CATALOG_DIR: core,
|
|
1026
|
+
ENABLE_EMBED: String(canEmbedPages),
|
|
1027
|
+
EVENTCATALOG_STARTER: String(isEventCatalogStarter),
|
|
1028
|
+
EVENTCATALOG_SCALE: String(isEventCatalogScale)
|
|
1029
|
+
},
|
|
1030
|
+
shouldFilterLine: createAstroLineFilter()
|
|
1031
|
+
});
|
|
1034
1032
|
};
|
|
1035
|
-
var startServerCatalog = ({
|
|
1036
|
-
command,
|
|
1033
|
+
var startServerCatalog = async ({
|
|
1037
1034
|
canEmbedPages = false,
|
|
1038
1035
|
isEventCatalogStarter = false,
|
|
1039
1036
|
isEventCatalogScale = false
|
|
1040
1037
|
}) => {
|
|
1041
1038
|
const serverEntryPath = path2.join(dir, "dist", "server", "entry.mjs");
|
|
1042
|
-
|
|
1043
|
-
`
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1039
|
+
await runCommandWithFilteredOutput({
|
|
1040
|
+
command: `node "${serverEntryPath}"`,
|
|
1041
|
+
cwd: core,
|
|
1042
|
+
env: {
|
|
1043
|
+
PROJECT_DIR: dir,
|
|
1044
|
+
CATALOG_DIR: core,
|
|
1045
|
+
ENABLE_EMBED: String(canEmbedPages),
|
|
1046
|
+
EVENTCATALOG_STARTER: String(isEventCatalogStarter),
|
|
1047
|
+
EVENTCATALOG_SCALE: String(isEventCatalogScale)
|
|
1048
|
+
},
|
|
1049
|
+
shouldFilterLine: createAstroLineFilter()
|
|
1050
|
+
});
|
|
1049
1051
|
};
|
|
1050
1052
|
program.command("preview").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
1051
1053
|
logger.welcome();
|
|
@@ -1059,7 +1061,12 @@ program.command("preview").description("Serves the contents of your eventcatalog
|
|
|
1059
1061
|
);
|
|
1060
1062
|
const isEventCatalogStarter = await isEventCatalogStarterEnabled();
|
|
1061
1063
|
const isEventCatalogScale = await isEventCatalogScaleEnabled();
|
|
1062
|
-
previewCatalog({
|
|
1064
|
+
await previewCatalog({
|
|
1065
|
+
command,
|
|
1066
|
+
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
1067
|
+
isEventCatalogStarter,
|
|
1068
|
+
isEventCatalogScale
|
|
1069
|
+
});
|
|
1063
1070
|
});
|
|
1064
1071
|
program.command("start").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
|
|
1065
1072
|
logger.welcome();
|
|
@@ -1075,14 +1082,13 @@ program.command("start").description("Serves the contents of your eventcatalog b
|
|
|
1075
1082
|
const isEventCatalogScale = await isEventCatalogScaleEnabled();
|
|
1076
1083
|
const isServerOutput = await isOutputServer();
|
|
1077
1084
|
if (isServerOutput) {
|
|
1078
|
-
startServerCatalog({
|
|
1079
|
-
command,
|
|
1085
|
+
await startServerCatalog({
|
|
1080
1086
|
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
1081
1087
|
isEventCatalogStarter,
|
|
1082
1088
|
isEventCatalogScale
|
|
1083
1089
|
});
|
|
1084
1090
|
} else {
|
|
1085
|
-
previewCatalog({
|
|
1091
|
+
await previewCatalog({
|
|
1086
1092
|
command,
|
|
1087
1093
|
canEmbedPages: canEmbedPages || isEventCatalogScale,
|
|
1088
1094
|
isEventCatalogStarter,
|
package/dist/generate.cjs
CHANGED
|
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
108
108
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
|
-
var version = "4.2.
|
|
111
|
+
var version = "4.2.2";
|
|
112
112
|
|
|
113
113
|
// src/constants.ts
|
|
114
114
|
var VERSION = version;
|
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JV33GNVZ.js";
|
|
4
|
+
import "./chunk-Z2CMR4HM.js";
|
|
5
|
+
import "./chunk-A5LDEHRI.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -9,6 +9,7 @@ import config from '@config';
|
|
|
9
9
|
import fs from 'fs';
|
|
10
10
|
import { isLLMSTxtEnabled } from '@utils/feature';
|
|
11
11
|
import { filterMarkdownForAgents } from '@utils/llms';
|
|
12
|
+
import { getAbsoluteFilePathForAstroFile } from '@utils/files';
|
|
12
13
|
|
|
13
14
|
const events = await getCollection('events');
|
|
14
15
|
const agents = await getCollection('agents');
|
|
@@ -67,7 +68,8 @@ export const GET: APIRoute = async ({ params, props }) => {
|
|
|
67
68
|
|
|
68
69
|
const content = props?.content ?? findContent(params);
|
|
69
70
|
if (content?.filePath) {
|
|
70
|
-
const
|
|
71
|
+
const absoluteFilePath = getAbsoluteFilePathForAstroFile(content.filePath);
|
|
72
|
+
const file = filterMarkdownForAgents(fs.readFileSync(absoluteFilePath, 'utf8'));
|
|
71
73
|
return new Response(file, { status: 200 });
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -8,6 +8,7 @@ import config from '@config';
|
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import { addSchemaToMarkdown, filterMarkdownForAgents } from '@utils/llms';
|
|
10
10
|
import { isLLMSTxtEnabled, isSSR } from '@utils/feature';
|
|
11
|
+
import { getAbsoluteFilePathForAstroFile } from '@utils/files';
|
|
11
12
|
const events = await getCollection('events');
|
|
12
13
|
const agents = await getCollection('agents');
|
|
13
14
|
const commands = await getCollection('commands');
|
|
@@ -67,10 +68,11 @@ export const GET: APIRoute = async ({ params, props }) => {
|
|
|
67
68
|
|
|
68
69
|
const content = props?.content ?? findContent(params);
|
|
69
70
|
if (content?.filePath) {
|
|
70
|
-
|
|
71
|
+
const absoluteFilePath = getAbsoluteFilePathForAstroFile(content.filePath);
|
|
72
|
+
let file = fs.readFileSync(absoluteFilePath, 'utf8');
|
|
71
73
|
|
|
72
74
|
try {
|
|
73
|
-
file = addSchemaToMarkdown(content, file);
|
|
75
|
+
file = addSchemaToMarkdown({ ...content, filePath: absoluteFilePath }, file);
|
|
74
76
|
} catch (error) {
|
|
75
77
|
console.log('Warning: Cant find the schema for', content.data.id, content.data.version);
|
|
76
78
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
2
|
+
import { dirname, isAbsolute, join } from 'node:path';
|
|
3
3
|
import { formatPatch, structuredPatch } from 'diff';
|
|
4
4
|
import { html, parse } from 'diff2html';
|
|
5
5
|
import { getItemsFromCollectionByIdAndSemverOrLatest } from './collections/util';
|
|
6
|
+
import { getAbsoluteFilePathForAstroFile } from './files';
|
|
6
7
|
import type { CollectionEntry } from 'astro:content';
|
|
7
8
|
import type { CollectionTypes } from '@types';
|
|
8
9
|
|
|
@@ -32,7 +33,8 @@ export async function getFilesForDiffInCollection(
|
|
|
32
33
|
const pathToFolder = collection.filePath;
|
|
33
34
|
if (!pathToFolder) return [];
|
|
34
35
|
|
|
35
|
-
const
|
|
36
|
+
const absolutePathToFolder = isAbsolute(pathToFolder) ? pathToFolder : getAbsoluteFilePathForAstroFile(pathToFolder);
|
|
37
|
+
const dir = dirname(absolutePathToFolder);
|
|
36
38
|
const allFilesInDirectory = await readdir(dir);
|
|
37
39
|
|
|
38
40
|
return allFilesInDirectory
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "4.2.
|
|
10
|
+
"version": "4.2.2",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
"uuid": "^10.0.0",
|
|
118
118
|
"zod": "^4.3.6",
|
|
119
119
|
"@eventcatalog/linter": "1.1.5",
|
|
120
|
-
"@eventcatalog/
|
|
121
|
-
"@eventcatalog/
|
|
120
|
+
"@eventcatalog/visualiser": "^4.1.0",
|
|
121
|
+
"@eventcatalog/sdk": "2.26.0"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@astrojs/check": "^0.9.9",
|