@eventcatalog/core 4.12.0-beta.6 → 4.12.0-beta.8

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 (32) 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 +36 -4
  4. package/dist/analytics/log-build.js +4 -4
  5. package/dist/{chunk-HNFISK46.js → chunk-2VXWWWTT.js} +1 -1
  6. package/dist/{chunk-EEZXGNF6.js → chunk-36RYTYT5.js} +1 -1
  7. package/dist/{chunk-7NJ6XHQ3.js → chunk-3ZWYGVW6.js} +7 -5
  8. package/dist/{chunk-WNYQQG52.js → chunk-5HXYLZWD.js} +1 -1
  9. package/dist/{chunk-FKW33BKL.js → chunk-AP3ENLC2.js} +2 -2
  10. package/dist/{chunk-3SJDIENM.js → chunk-MDWB5HLO.js} +1 -1
  11. package/dist/{chunk-JE6RX7SJ.js → chunk-RFIXKATC.js} +33 -2
  12. package/dist/{chunk-FAZ3LEZ5.js → chunk-U4YJSTGV.js} +8 -8
  13. package/dist/{chunk-OFHPJR47.js → chunk-WR5Q4QXI.js} +1 -1
  14. package/dist/constants.cjs +1 -1
  15. package/dist/constants.js +1 -1
  16. package/dist/eventcatalog-config-file-utils.cjs +34 -2
  17. package/dist/eventcatalog-config-file-utils.d.cts +4 -1
  18. package/dist/eventcatalog-config-file-utils.d.ts +4 -1
  19. package/dist/eventcatalog-config-file-utils.js +3 -1
  20. package/dist/eventcatalog.cjs +36 -4
  21. package/dist/eventcatalog.config.d.cts +2 -0
  22. package/dist/eventcatalog.config.d.ts +2 -0
  23. package/dist/eventcatalog.js +16 -16
  24. package/dist/features.js +2 -2
  25. package/dist/federation/federate.js +5 -5
  26. package/dist/generate.cjs +1 -1
  27. package/dist/generate.js +4 -4
  28. package/dist/resolve-catalog-dependencies.js +2 -2
  29. package/dist/utils/cli-logger.cjs +1 -1
  30. package/dist/utils/cli-logger.js +2 -2
  31. package/eventcatalog/src/toolkit/layouts/Layout.astro +8 -3
  32. package/package.json +3 -3
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.12.0-beta.6";
39
+ var version = "4.12.0-beta.8";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-OFHPJR47.js";
4
- import "../chunk-WNYQQG52.js";
3
+ } from "../chunk-WR5Q4QXI.js";
4
+ import "../chunk-5HXYLZWD.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -132,11 +132,41 @@ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
132
132
  await cleanup(projectDirectory);
133
133
  }
134
134
  };
135
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
136
+ var addTrialStartDateToCatalogConfigFile = async (projectDirectory, { cId, tsd = Date.now() } = {}) => {
137
+ const configFilePath = import_node_path2.default.join(projectDirectory, "eventcatalog.config.js");
138
+ const content = await (0, import_promises2.readFile)(configFilePath, "utf8");
139
+ if (/^[ \t]*tsd\s*:/m.test(content)) return;
140
+ const cIdMatch = cId ? content.match(new RegExp(`^([ \\t]*)cId\\s*:\\s*(['"\`])${escapeRegExp(cId)}\\2(\\s*,)?`, "m")) : null;
141
+ if (cIdMatch) {
142
+ const indent = cIdMatch[1];
143
+ const cIdEnd = cIdMatch.index + cIdMatch[0].length;
144
+ const hasTrailingComma = Boolean(cIdMatch[3]);
145
+ const lineEnd = content.indexOf("\n", cIdEnd) === -1 ? content.length : content.indexOf("\n", cIdEnd);
146
+ const updated2 = content.slice(0, cIdEnd) + (hasTrailingComma ? "" : ",") + content.slice(cIdEnd, lineEnd) + `
147
+ ${indent}// required by eventcatalog
148
+ ${indent}tsd: ${tsd},` + content.slice(lineEnd);
149
+ await (0, import_promises2.writeFile)(configFilePath, updated2);
150
+ return;
151
+ }
152
+ const startIndex = content.indexOf("export default {");
153
+ if (startIndex === -1) return;
154
+ const insertPosition = content.indexOf("{", startIndex) + 1;
155
+ const updated = content.slice(0, insertPosition) + `
156
+ // required by eventcatalog
157
+ tsd: ${tsd},` + content.slice(insertPosition);
158
+ await (0, import_promises2.writeFile)(configFilePath, updated);
159
+ };
135
160
  var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
136
161
  try {
137
162
  const config = await getEventCatalogConfigFile(projectDirectory);
138
- if (!config.cId) {
139
- await writeEventCatalogConfigFile(projectDirectory, { cId: (0, import_uuid.v4)() });
163
+ let cId = config.cId;
164
+ if (!cId) {
165
+ cId = (0, import_uuid.v4)();
166
+ await writeEventCatalogConfigFile(projectDirectory, { cId });
167
+ }
168
+ if (config.tsd === void 0 || config.tsd === null) {
169
+ await addTrialStartDateToCatalogConfigFile(projectDirectory, { cId });
140
170
  }
141
171
  } catch (error) {
142
172
  }
@@ -146,7 +176,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
146
176
  var import_os = __toESM(require("os"), 1);
147
177
 
148
178
  // package.json
149
- var version = "4.12.0-beta.6";
179
+ var version = "4.12.0-beta.8";
150
180
 
151
181
  // src/constants.ts
152
182
  var VERSION = version;
@@ -321,7 +351,7 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
321
351
  try {
322
352
  await verifyRequiredFieldsAreInCatalogConfigFile(projectDir);
323
353
  const configFile = await getEventCatalogConfigFile(projectDir);
324
- const { cId, organizationName, generators = [] } = configFile;
354
+ const { cId, tsd, organizationName, generators = [] } = configFile;
325
355
  let generatorNames = generators.length > 0 ? generators.map((generator) => generator[0]) : ["none"];
326
356
  if (isEventCatalogStarterEnabled) {
327
357
  generatorNames.push("@eventcatalog/eventcatalog-starter");
@@ -340,6 +370,8 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
340
370
  command,
341
371
  org: organizationName,
342
372
  cId,
373
+ // Trial start date (unix ms) from eventcatalog.config.js
374
+ tsd,
343
375
  // CI redeploys and human-run builds are different signals; tag rather than suppress
344
376
  ci: process.env.CI ? "true" : "false",
345
377
  // The commercial plan, separate from the generators list, so telemetry joins cleanly to licensing
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-7NJ6XHQ3.js";
4
- import "../chunk-OFHPJR47.js";
3
+ } from "../chunk-3ZWYGVW6.js";
5
4
  import "../chunk-ZAZHAVKB.js";
6
- import "../chunk-WNYQQG52.js";
7
- import "../chunk-JE6RX7SJ.js";
5
+ import "../chunk-WR5Q4QXI.js";
6
+ import "../chunk-5HXYLZWD.js";
7
+ import "../chunk-RFIXKATC.js";
8
8
  export {
9
9
  log_build_default as default
10
10
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WNYQQG52.js";
3
+ } from "./chunk-5HXYLZWD.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getEventCatalogConfigFile
3
- } from "./chunk-JE6RX7SJ.js";
3
+ } from "./chunk-RFIXKATC.js";
4
4
 
5
5
  // src/resolve-catalog-dependencies.js
6
6
  import path from "path";
@@ -1,15 +1,15 @@
1
- import {
2
- raiseEvent
3
- } from "./chunk-OFHPJR47.js";
4
1
  import {
5
2
  countResources,
6
3
  hashCatalogContent,
7
4
  serializeCounts
8
5
  } from "./chunk-ZAZHAVKB.js";
6
+ import {
7
+ raiseEvent
8
+ } from "./chunk-WR5Q4QXI.js";
9
9
  import {
10
10
  getEventCatalogConfigFile,
11
11
  verifyRequiredFieldsAreInCatalogConfigFile
12
- } from "./chunk-JE6RX7SJ.js";
12
+ } from "./chunk-RFIXKATC.js";
13
13
 
14
14
  // src/analytics/log-build.js
15
15
  var getFeatures = async (configFile) => {
@@ -84,7 +84,7 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
84
84
  try {
85
85
  await verifyRequiredFieldsAreInCatalogConfigFile(projectDir);
86
86
  const configFile = await getEventCatalogConfigFile(projectDir);
87
- const { cId, organizationName, generators = [] } = configFile;
87
+ const { cId, tsd, organizationName, generators = [] } = configFile;
88
88
  let generatorNames = generators.length > 0 ? generators.map((generator) => generator[0]) : ["none"];
89
89
  if (isEventCatalogStarterEnabled) {
90
90
  generatorNames.push("@eventcatalog/eventcatalog-starter");
@@ -103,6 +103,8 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
103
103
  command,
104
104
  org: organizationName,
105
105
  cId,
106
+ // Trial start date (unix ms) from eventcatalog.config.js
107
+ tsd,
106
108
  // CI redeploys and human-run builds are different signals; tag rather than suppress
107
109
  ci: process.env.CI ? "true" : "false",
108
110
  // The commercial plan, separate from the generators list, so telemetry joins cleanly to licensing
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.12.0-beta.6";
2
+ var version = "4.12.0-beta.8";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-HNFISK46.js";
3
+ } from "./chunk-2VXWWWTT.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
7
- } from "./chunk-JE6RX7SJ.js";
7
+ } from "./chunk-RFIXKATC.js";
8
8
 
9
9
  // src/generate.js
10
10
  import path from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getEventCatalogConfigFile
3
- } from "./chunk-JE6RX7SJ.js";
3
+ } from "./chunk-RFIXKATC.js";
4
4
 
5
5
  // src/features.ts
6
6
  import { join } from "path";
@@ -96,11 +96,41 @@ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
96
96
  await cleanup(projectDirectory);
97
97
  }
98
98
  };
99
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
100
+ var addTrialStartDateToCatalogConfigFile = async (projectDirectory, { cId, tsd = Date.now() } = {}) => {
101
+ const configFilePath = path2.join(projectDirectory, "eventcatalog.config.js");
102
+ const content = await readFile2(configFilePath, "utf8");
103
+ if (/^[ \t]*tsd\s*:/m.test(content)) return;
104
+ const cIdMatch = cId ? content.match(new RegExp(`^([ \\t]*)cId\\s*:\\s*(['"\`])${escapeRegExp(cId)}\\2(\\s*,)?`, "m")) : null;
105
+ if (cIdMatch) {
106
+ const indent = cIdMatch[1];
107
+ const cIdEnd = cIdMatch.index + cIdMatch[0].length;
108
+ const hasTrailingComma = Boolean(cIdMatch[3]);
109
+ const lineEnd = content.indexOf("\n", cIdEnd) === -1 ? content.length : content.indexOf("\n", cIdEnd);
110
+ const updated2 = content.slice(0, cIdEnd) + (hasTrailingComma ? "" : ",") + content.slice(cIdEnd, lineEnd) + `
111
+ ${indent}// required by eventcatalog
112
+ ${indent}tsd: ${tsd},` + content.slice(lineEnd);
113
+ await writeFile(configFilePath, updated2);
114
+ return;
115
+ }
116
+ const startIndex = content.indexOf("export default {");
117
+ if (startIndex === -1) return;
118
+ const insertPosition = content.indexOf("{", startIndex) + 1;
119
+ const updated = content.slice(0, insertPosition) + `
120
+ // required by eventcatalog
121
+ tsd: ${tsd},` + content.slice(insertPosition);
122
+ await writeFile(configFilePath, updated);
123
+ };
99
124
  var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
100
125
  try {
101
126
  const config = await getEventCatalogConfigFile(projectDirectory);
102
- if (!config.cId) {
103
- await writeEventCatalogConfigFile(projectDirectory, { cId: uuidV4() });
127
+ let cId = config.cId;
128
+ if (!cId) {
129
+ cId = uuidV4();
130
+ await writeEventCatalogConfigFile(projectDirectory, { cId });
131
+ }
132
+ if (config.tsd === void 0 || config.tsd === null) {
133
+ await addTrialStartDateToCatalogConfigFile(projectDirectory, { cId });
104
134
  }
105
135
  } catch (error) {
106
136
  }
@@ -114,6 +144,7 @@ export {
114
144
  cleanup,
115
145
  getEventCatalogConfigFile,
116
146
  writeEventCatalogConfigFile,
147
+ addTrialStartDateToCatalogConfigFile,
117
148
  verifyRequiredFieldsAreInCatalogConfigFile,
118
149
  addPropertyToFrontMatter
119
150
  };
@@ -1,10 +1,3 @@
1
- import {
2
- getFederationDiagnostics,
3
- resolveFederationRules
4
- } from "./chunk-JJPB6EOZ.js";
5
- import {
6
- isFederationEnabled
7
- } from "./chunk-FV56YFM4.js";
8
1
  import {
9
2
  withFederationOutputTransaction
10
3
  } from "./chunk-WRNH5C3U.js";
@@ -17,9 +10,16 @@ import {
17
10
  import {
18
11
  createFederationContentCache
19
12
  } from "./chunk-R7Z5ALYI.js";
13
+ import {
14
+ getFederationDiagnostics,
15
+ resolveFederationRules
16
+ } from "./chunk-JJPB6EOZ.js";
17
+ import {
18
+ isFederationEnabled
19
+ } from "./chunk-FV56YFM4.js";
20
20
  import {
21
21
  getEventCatalogConfigFile
22
- } from "./chunk-JE6RX7SJ.js";
22
+ } from "./chunk-RFIXKATC.js";
23
23
 
24
24
  // src/federation/federate.ts
25
25
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WNYQQG52.js";
3
+ } from "./chunk-5HXYLZWD.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.12.0-beta.6";
28
+ var version = "4.12.0-beta.8";
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-WNYQQG52.js";
3
+ } from "./chunk-5HXYLZWD.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var eventcatalog_config_file_utils_exports = {};
32
32
  __export(eventcatalog_config_file_utils_exports, {
33
33
  addPropertyToFrontMatter: () => addPropertyToFrontMatter,
34
+ addTrialStartDateToCatalogConfigFile: () => addTrialStartDateToCatalogConfigFile,
34
35
  cleanup: () => cleanup,
35
36
  getEventCatalogConfigFile: () => getEventCatalogConfigFile,
36
37
  verifyRequiredFieldsAreInCatalogConfigFile: () => verifyRequiredFieldsAreInCatalogConfigFile,
@@ -134,11 +135,41 @@ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
134
135
  await cleanup(projectDirectory);
135
136
  }
136
137
  };
138
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
139
+ var addTrialStartDateToCatalogConfigFile = async (projectDirectory, { cId, tsd = Date.now() } = {}) => {
140
+ const configFilePath = import_node_path2.default.join(projectDirectory, "eventcatalog.config.js");
141
+ const content = await (0, import_promises2.readFile)(configFilePath, "utf8");
142
+ if (/^[ \t]*tsd\s*:/m.test(content)) return;
143
+ const cIdMatch = cId ? content.match(new RegExp(`^([ \\t]*)cId\\s*:\\s*(['"\`])${escapeRegExp(cId)}\\2(\\s*,)?`, "m")) : null;
144
+ if (cIdMatch) {
145
+ const indent = cIdMatch[1];
146
+ const cIdEnd = cIdMatch.index + cIdMatch[0].length;
147
+ const hasTrailingComma = Boolean(cIdMatch[3]);
148
+ const lineEnd = content.indexOf("\n", cIdEnd) === -1 ? content.length : content.indexOf("\n", cIdEnd);
149
+ const updated2 = content.slice(0, cIdEnd) + (hasTrailingComma ? "" : ",") + content.slice(cIdEnd, lineEnd) + `
150
+ ${indent}// required by eventcatalog
151
+ ${indent}tsd: ${tsd},` + content.slice(lineEnd);
152
+ await (0, import_promises2.writeFile)(configFilePath, updated2);
153
+ return;
154
+ }
155
+ const startIndex = content.indexOf("export default {");
156
+ if (startIndex === -1) return;
157
+ const insertPosition = content.indexOf("{", startIndex) + 1;
158
+ const updated = content.slice(0, insertPosition) + `
159
+ // required by eventcatalog
160
+ tsd: ${tsd},` + content.slice(insertPosition);
161
+ await (0, import_promises2.writeFile)(configFilePath, updated);
162
+ };
137
163
  var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
138
164
  try {
139
165
  const config = await getEventCatalogConfigFile(projectDirectory);
140
- if (!config.cId) {
141
- await writeEventCatalogConfigFile(projectDirectory, { cId: (0, import_uuid.v4)() });
166
+ let cId = config.cId;
167
+ if (!cId) {
168
+ cId = (0, import_uuid.v4)();
169
+ await writeEventCatalogConfigFile(projectDirectory, { cId });
170
+ }
171
+ if (config.tsd === void 0 || config.tsd === null) {
172
+ await addTrialStartDateToCatalogConfigFile(projectDirectory, { cId });
142
173
  }
143
174
  } catch (error) {
144
175
  }
@@ -150,6 +181,7 @@ function addPropertyToFrontMatter(input, newProperty, newValue) {
150
181
  // Annotate the CommonJS export names for ESM import in node:
151
182
  0 && (module.exports = {
152
183
  addPropertyToFrontMatter,
184
+ addTrialStartDateToCatalogConfigFile,
153
185
  cleanup,
154
186
  getEventCatalogConfigFile,
155
187
  verifyRequiredFieldsAreInCatalogConfigFile,
@@ -86,6 +86,9 @@ const getEventCatalogConfigFile = async (projectDirectory) => {
86
86
 
87
87
  declare function addPropertyToFrontMatter(input: any, newProperty: any, newValue: any): string;
88
88
  declare function writeEventCatalogConfigFile(projectDirectory: any, newConfig: any): Promise<void>;
89
+ declare function addTrialStartDateToCatalogConfigFile(projectDirectory: any, { cId, tsd }?: {
90
+ tsd?: number | undefined;
91
+ }): Promise<void>;
89
92
  declare function verifyRequiredFieldsAreInCatalogConfigFile(projectDirectory: any): Promise<void>;
90
93
 
91
- export { addPropertyToFrontMatter, cleanup, getEventCatalogConfigFile, verifyRequiredFieldsAreInCatalogConfigFile, writeEventCatalogConfigFile };
94
+ export { addPropertyToFrontMatter, addTrialStartDateToCatalogConfigFile, cleanup, getEventCatalogConfigFile, verifyRequiredFieldsAreInCatalogConfigFile, writeEventCatalogConfigFile };
@@ -86,6 +86,9 @@ const getEventCatalogConfigFile = async (projectDirectory) => {
86
86
 
87
87
  declare function addPropertyToFrontMatter(input: any, newProperty: any, newValue: any): string;
88
88
  declare function writeEventCatalogConfigFile(projectDirectory: any, newConfig: any): Promise<void>;
89
+ declare function addTrialStartDateToCatalogConfigFile(projectDirectory: any, { cId, tsd }?: {
90
+ tsd?: number | undefined;
91
+ }): Promise<void>;
89
92
  declare function verifyRequiredFieldsAreInCatalogConfigFile(projectDirectory: any): Promise<void>;
90
93
 
91
- export { addPropertyToFrontMatter, cleanup, getEventCatalogConfigFile, verifyRequiredFieldsAreInCatalogConfigFile, writeEventCatalogConfigFile };
94
+ export { addPropertyToFrontMatter, addTrialStartDateToCatalogConfigFile, cleanup, getEventCatalogConfigFile, verifyRequiredFieldsAreInCatalogConfigFile, writeEventCatalogConfigFile };
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  addPropertyToFrontMatter,
3
+ addTrialStartDateToCatalogConfigFile,
3
4
  cleanup,
4
5
  getEventCatalogConfigFile,
5
6
  verifyRequiredFieldsAreInCatalogConfigFile,
6
7
  writeEventCatalogConfigFile
7
- } from "./chunk-JE6RX7SJ.js";
8
+ } from "./chunk-RFIXKATC.js";
8
9
  export {
9
10
  addPropertyToFrontMatter,
11
+ addTrialStartDateToCatalogConfigFile,
10
12
  cleanup,
11
13
  getEventCatalogConfigFile,
12
14
  verifyRequiredFieldsAreInCatalogConfigFile,
@@ -137,11 +137,41 @@ var writeEventCatalogConfigFile = async (projectDirectory, newConfig) => {
137
137
  await cleanup(projectDirectory);
138
138
  }
139
139
  };
140
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
141
+ var addTrialStartDateToCatalogConfigFile = async (projectDirectory, { cId, tsd = Date.now() } = {}) => {
142
+ const configFilePath = import_node_path2.default.join(projectDirectory, "eventcatalog.config.js");
143
+ const content = await (0, import_promises2.readFile)(configFilePath, "utf8");
144
+ if (/^[ \t]*tsd\s*:/m.test(content)) return;
145
+ const cIdMatch = cId ? content.match(new RegExp(`^([ \\t]*)cId\\s*:\\s*(['"\`])${escapeRegExp(cId)}\\2(\\s*,)?`, "m")) : null;
146
+ if (cIdMatch) {
147
+ const indent = cIdMatch[1];
148
+ const cIdEnd = cIdMatch.index + cIdMatch[0].length;
149
+ const hasTrailingComma = Boolean(cIdMatch[3]);
150
+ const lineEnd = content.indexOf("\n", cIdEnd) === -1 ? content.length : content.indexOf("\n", cIdEnd);
151
+ const updated2 = content.slice(0, cIdEnd) + (hasTrailingComma ? "" : ",") + content.slice(cIdEnd, lineEnd) + `
152
+ ${indent}// required by eventcatalog
153
+ ${indent}tsd: ${tsd},` + content.slice(lineEnd);
154
+ await (0, import_promises2.writeFile)(configFilePath, updated2);
155
+ return;
156
+ }
157
+ const startIndex = content.indexOf("export default {");
158
+ if (startIndex === -1) return;
159
+ const insertPosition = content.indexOf("{", startIndex) + 1;
160
+ const updated = content.slice(0, insertPosition) + `
161
+ // required by eventcatalog
162
+ tsd: ${tsd},` + content.slice(insertPosition);
163
+ await (0, import_promises2.writeFile)(configFilePath, updated);
164
+ };
140
165
  var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
141
166
  try {
142
167
  const config = await getEventCatalogConfigFile(projectDirectory);
143
- if (!config.cId) {
144
- await writeEventCatalogConfigFile(projectDirectory, { cId: (0, import_uuid.v4)() });
168
+ let cId = config.cId;
169
+ if (!cId) {
170
+ cId = (0, import_uuid.v4)();
171
+ await writeEventCatalogConfigFile(projectDirectory, { cId });
172
+ }
173
+ if (config.tsd === void 0 || config.tsd === null) {
174
+ await addTrialStartDateToCatalogConfigFile(projectDirectory, { cId });
145
175
  }
146
176
  } catch (error) {
147
177
  }
@@ -151,7 +181,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
151
181
  var import_picocolors = __toESM(require("picocolors"), 1);
152
182
 
153
183
  // package.json
154
- var version = "4.12.0-beta.6";
184
+ var version = "4.12.0-beta.8";
155
185
 
156
186
  // src/constants.ts
157
187
  var VERSION = version;
@@ -443,7 +473,7 @@ var main = async (projectDir, { isEventCatalogStarterEnabled: isEventCatalogStar
443
473
  try {
444
474
  await verifyRequiredFieldsAreInCatalogConfigFile(projectDir);
445
475
  const configFile = await getEventCatalogConfigFile(projectDir);
446
- const { cId, organizationName, generators = [] } = configFile;
476
+ const { cId, tsd, organizationName, generators = [] } = configFile;
447
477
  let generatorNames = generators.length > 0 ? generators.map((generator) => generator[0]) : ["none"];
448
478
  if (isEventCatalogStarterEnabled2) {
449
479
  generatorNames.push("@eventcatalog/eventcatalog-starter");
@@ -462,6 +492,8 @@ var main = async (projectDir, { isEventCatalogStarterEnabled: isEventCatalogStar
462
492
  command,
463
493
  org: organizationName,
464
494
  cId,
495
+ // Trial start date (unix ms) from eventcatalog.config.js
496
+ tsd,
465
497
  // CI redeploys and human-run builds are different signals; tag rather than suppress
466
498
  ci: process.env.CI ? "true" : "false",
467
499
  // The commercial plan, separate from the generators list, so telemetry joins cleanly to licensing
@@ -229,6 +229,8 @@ type CatalogTheme = 'default' | 'ocean' | 'sapphire' | 'sunset' | 'forest' | (st
229
229
  type ScalarConfiguration = any;
230
230
  interface Config {
231
231
  cId: string;
232
+ /** Trial start date (unix timestamp in ms), added automatically by EventCatalog */
233
+ tsd?: number;
232
234
  title: string;
233
235
  organizationName: string;
234
236
  tagline?: string | false;
@@ -229,6 +229,8 @@ type CatalogTheme = 'default' | 'ocean' | 'sapphire' | 'sunset' | 'forest' | (st
229
229
  type ScalarConfiguration = any;
230
230
  interface Config {
231
231
  cId: string;
232
+ /** Trial start date (unix timestamp in ms), added automatically by EventCatalog */
233
+ tsd?: number;
232
234
  title: string;
233
235
  organizationName: string;
234
236
  tagline?: string | false;
@@ -1,25 +1,25 @@
1
- import {
2
- log_build_default
3
- } from "./chunk-7NJ6XHQ3.js";
4
- import "./chunk-OFHPJR47.js";
5
- import "./chunk-ZAZHAVKB.js";
6
1
  import {
7
2
  runMigrations
8
3
  } from "./chunk-XUAF2H54.js";
9
4
  import "./chunk-CA4U2JP7.js";
5
+ import {
6
+ log_build_default
7
+ } from "./chunk-3ZWYGVW6.js";
8
+ import "./chunk-ZAZHAVKB.js";
10
9
  import {
11
10
  FederationConflictError,
12
11
  FederationDiagnosticError,
13
12
  federateCatalog
14
- } from "./chunk-FAZ3LEZ5.js";
13
+ } from "./chunk-U4YJSTGV.js";
14
+ import "./chunk-WRNH5C3U.js";
15
+ import "./chunk-5EPNFDT5.js";
16
+ import "./chunk-A2RZR3U4.js";
17
+ import "./chunk-R7Z5ALYI.js";
15
18
  import {
16
19
  getFederationDiagnosticCounts,
17
20
  getVisibleFederationDiagnostics
18
21
  } from "./chunk-JJPB6EOZ.js";
19
22
  import "./chunk-FV56YFM4.js";
20
- import "./chunk-WRNH5C3U.js";
21
- import "./chunk-5EPNFDT5.js";
22
- import "./chunk-A2RZR3U4.js";
23
23
  import "./chunk-SDZQJTJW.js";
24
24
  import "./chunk-352FGP6W.js";
25
25
  import {
@@ -27,16 +27,16 @@ import {
27
27
  isAuthEnabled,
28
28
  isIndexedSearchEnabled,
29
29
  isOutputServer
30
- } from "./chunk-3SJDIENM.js";
30
+ } from "./chunk-MDWB5HLO.js";
31
31
  import {
32
32
  generate
33
- } from "./chunk-FKW33BKL.js";
33
+ } from "./chunk-AP3ENLC2.js";
34
34
  import {
35
35
  logger
36
- } from "./chunk-HNFISK46.js";
36
+ } from "./chunk-2VXWWWTT.js";
37
37
  import {
38
38
  resolve_catalog_dependencies_default
39
- } from "./chunk-EEZXGNF6.js";
39
+ } from "./chunk-36RYTYT5.js";
40
40
  import {
41
41
  buildSearchIndex
42
42
  } from "./chunk-DJCOJ77J.js";
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  watch
49
49
  } from "./chunk-U63GDPPY.js";
50
- import "./chunk-R7Z5ALYI.js";
50
+ import "./chunk-WR5Q4QXI.js";
51
51
  import {
52
52
  getAstroConfigPath
53
53
  } from "./chunk-VIJJ7JKH.js";
@@ -63,11 +63,11 @@ import {
63
63
  } from "./chunk-LFQJXLHG.js";
64
64
  import {
65
65
  VERSION
66
- } from "./chunk-WNYQQG52.js";
66
+ } from "./chunk-5HXYLZWD.js";
67
67
  import {
68
68
  getEventCatalogConfigFile,
69
69
  verifyRequiredFieldsAreInCatalogConfigFile
70
- } from "./chunk-JE6RX7SJ.js";
70
+ } from "./chunk-RFIXKATC.js";
71
71
 
72
72
  // src/eventcatalog.ts
73
73
  import { Command } from "commander";
package/dist/features.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  isAuthEnabled,
4
4
  isIndexedSearchEnabled,
5
5
  isOutputServer
6
- } from "./chunk-3SJDIENM.js";
7
- import "./chunk-JE6RX7SJ.js";
6
+ } from "./chunk-MDWB5HLO.js";
7
+ import "./chunk-RFIXKATC.js";
8
8
  export {
9
9
  getProjectOutDir,
10
10
  isAuthEnabled,
@@ -2,16 +2,16 @@ import {
2
2
  FederationConflictError,
3
3
  FederationDiagnosticError,
4
4
  federateCatalog
5
- } from "../chunk-FAZ3LEZ5.js";
6
- import "../chunk-JJPB6EOZ.js";
7
- import "../chunk-FV56YFM4.js";
5
+ } from "../chunk-U4YJSTGV.js";
8
6
  import "../chunk-WRNH5C3U.js";
9
7
  import "../chunk-5EPNFDT5.js";
10
8
  import "../chunk-A2RZR3U4.js";
9
+ import "../chunk-R7Z5ALYI.js";
10
+ import "../chunk-JJPB6EOZ.js";
11
+ import "../chunk-FV56YFM4.js";
11
12
  import "../chunk-SDZQJTJW.js";
12
13
  import "../chunk-352FGP6W.js";
13
- import "../chunk-R7Z5ALYI.js";
14
- import "../chunk-JE6RX7SJ.js";
14
+ import "../chunk-RFIXKATC.js";
15
15
  export {
16
16
  FederationConflictError,
17
17
  FederationDiagnosticError,
package/dist/generate.cjs CHANGED
@@ -112,7 +112,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
112
112
  var import_picocolors = __toESM(require("picocolors"), 1);
113
113
 
114
114
  // package.json
115
- var version = "4.12.0-beta.6";
115
+ var version = "4.12.0-beta.8";
116
116
 
117
117
  // src/constants.ts
118
118
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-FKW33BKL.js";
4
- import "./chunk-HNFISK46.js";
5
- import "./chunk-WNYQQG52.js";
6
- import "./chunk-JE6RX7SJ.js";
3
+ } from "./chunk-AP3ENLC2.js";
4
+ import "./chunk-2VXWWWTT.js";
5
+ import "./chunk-5HXYLZWD.js";
6
+ import "./chunk-RFIXKATC.js";
7
7
  export {
8
8
  generate
9
9
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolve_catalog_dependencies_default
3
- } from "./chunk-EEZXGNF6.js";
4
- import "./chunk-JE6RX7SJ.js";
3
+ } from "./chunk-36RYTYT5.js";
4
+ import "./chunk-RFIXKATC.js";
5
5
  export {
6
6
  resolve_catalog_dependencies_default as default
7
7
  };
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.12.0-beta.6";
39
+ var version = "4.12.0-beta.8";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-HNFISK46.js";
4
- import "../chunk-WNYQQG52.js";
3
+ } from "../chunk-2VXWWWTT.js";
4
+ import "../chunk-5HXYLZWD.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -13,11 +13,13 @@ interface Props {
13
13
  sidebar?: boolean;
14
14
  /** Show the EventCatalog header (search, navigation). Defaults to true. */
15
15
  showHeader?: boolean;
16
+ /** Render content edge-to-edge without EventCatalog's page padding. Defaults to false. */
17
+ fullWidth?: boolean;
16
18
  }
17
19
 
18
20
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
19
21
 
20
- const { title, description, sidebar = true, showHeader = true } = Astro.props;
22
+ const { title, description, sidebar = true, showHeader = true, fullWidth = false } = Astro.props;
21
23
  ---
22
24
 
23
25
  <VerticalSideBarLayout
@@ -25,7 +27,10 @@ const { title, description, sidebar = true, showHeader = true } = Astro.props;
25
27
  description={description}
26
28
  showHeader={showHeader}
27
29
  showNestedSideBar={sidebar}
28
- wrapContent={false}
30
+ wrapContent={!fullWidth}
29
31
  >
30
- <slot />
32
+ {/* Full-width pages keep control of their layout, so only the theme text color is inherited. */}
33
+ <div class:list={['text-[rgb(var(--ec-page-text))]', fullWidth ? 'contents' : 'py-8']}>
34
+ <slot />
35
+ </div>
31
36
  </VerticalSideBarLayout>
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.12.0-beta.6",
10
+ "version": "4.12.0-beta.8",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -134,8 +134,8 @@
134
134
  "uuid": "^11.1.1",
135
135
  "zod": "^4.3.6",
136
136
  "@eventcatalog/linter": "1.1.20",
137
- "@eventcatalog/visualiser": "^4.1.4",
138
- "@eventcatalog/sdk": "2.29.1"
137
+ "@eventcatalog/sdk": "2.29.1",
138
+ "@eventcatalog/visualiser": "^4.1.4"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@astrojs/check": "^0.9.10",