@eventcatalog/core 4.12.0-beta.7 → 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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +36 -4
- package/dist/analytics/log-build.js +4 -4
- package/dist/{chunk-M4O7O6JF.js → chunk-2VXWWWTT.js} +1 -1
- package/dist/{chunk-EEZXGNF6.js → chunk-36RYTYT5.js} +1 -1
- package/dist/{chunk-SJHKPXAN.js → chunk-3ZWYGVW6.js} +5 -3
- package/dist/{chunk-VXERKVOD.js → chunk-5HXYLZWD.js} +1 -1
- package/dist/{chunk-PXJXGUB7.js → chunk-AP3ENLC2.js} +2 -2
- package/dist/{chunk-3SJDIENM.js → chunk-MDWB5HLO.js} +1 -1
- package/dist/{chunk-JE6RX7SJ.js → chunk-RFIXKATC.js} +33 -2
- package/dist/{chunk-RYPZGCRN.js → chunk-U4YJSTGV.js} +1 -1
- package/dist/{chunk-SSWCO2GQ.js → chunk-WR5Q4QXI.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog-config-file-utils.cjs +34 -2
- package/dist/eventcatalog-config-file-utils.d.cts +4 -1
- package/dist/eventcatalog-config-file-utils.d.ts +4 -1
- package/dist/eventcatalog-config-file-utils.js +3 -1
- package/dist/eventcatalog.cjs +36 -4
- package/dist/eventcatalog.config.d.cts +2 -0
- package/dist/eventcatalog.config.d.ts +2 -0
- package/dist/eventcatalog.js +9 -9
- package/dist/features.js +2 -2
- package/dist/federation/federate.js +2 -2
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +4 -4
- package/dist/resolve-catalog-dependencies.js +2 -2
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/package.json +1 -1
|
@@ -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
|
-
|
|
139
|
-
|
|
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.
|
|
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-
|
|
3
|
+
} from "../chunk-3ZWYGVW6.js";
|
|
4
4
|
import "../chunk-ZAZHAVKB.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
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
|
};
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from "./chunk-ZAZHAVKB.js";
|
|
6
6
|
import {
|
|
7
7
|
raiseEvent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WR5Q4QXI.js";
|
|
9
9
|
import {
|
|
10
10
|
getEventCatalogConfigFile,
|
|
11
11
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
12
|
-
} from "./chunk-
|
|
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
|
|
@@ -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
|
-
|
|
103
|
-
|
|
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
|
};
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -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
|
-
|
|
141
|
-
|
|
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-
|
|
8
|
+
} from "./chunk-RFIXKATC.js";
|
|
8
9
|
export {
|
|
9
10
|
addPropertyToFrontMatter,
|
|
11
|
+
addTrialStartDateToCatalogConfigFile,
|
|
10
12
|
cleanup,
|
|
11
13
|
getEventCatalogConfigFile,
|
|
12
14
|
verifyRequiredFieldsAreInCatalogConfigFile,
|
package/dist/eventcatalog.cjs
CHANGED
|
@@ -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
|
-
|
|
144
|
-
|
|
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.
|
|
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;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
5
|
import {
|
|
6
6
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3ZWYGVW6.js";
|
|
8
8
|
import "./chunk-ZAZHAVKB.js";
|
|
9
9
|
import {
|
|
10
10
|
FederationConflictError,
|
|
11
11
|
FederationDiagnosticError,
|
|
12
12
|
federateCatalog
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U4YJSTGV.js";
|
|
14
14
|
import "./chunk-WRNH5C3U.js";
|
|
15
15
|
import "./chunk-5EPNFDT5.js";
|
|
16
16
|
import "./chunk-A2RZR3U4.js";
|
|
@@ -27,16 +27,16 @@ import {
|
|
|
27
27
|
isAuthEnabled,
|
|
28
28
|
isIndexedSearchEnabled,
|
|
29
29
|
isOutputServer
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MDWB5HLO.js";
|
|
31
31
|
import {
|
|
32
32
|
generate
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AP3ENLC2.js";
|
|
34
34
|
import {
|
|
35
35
|
logger
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-2VXWWWTT.js";
|
|
37
37
|
import {
|
|
38
38
|
resolve_catalog_dependencies_default
|
|
39
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
66
|
+
} from "./chunk-5HXYLZWD.js";
|
|
67
67
|
import {
|
|
68
68
|
getEventCatalogConfigFile,
|
|
69
69
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-RFIXKATC.js";
|
|
71
71
|
|
|
72
72
|
// src/eventcatalog.ts
|
|
73
73
|
import { Command } from "commander";
|
package/dist/features.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
FederationConflictError,
|
|
3
3
|
FederationDiagnosticError,
|
|
4
4
|
federateCatalog
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-U4YJSTGV.js";
|
|
6
6
|
import "../chunk-WRNH5C3U.js";
|
|
7
7
|
import "../chunk-5EPNFDT5.js";
|
|
8
8
|
import "../chunk-A2RZR3U4.js";
|
|
@@ -11,7 +11,7 @@ import "../chunk-JJPB6EOZ.js";
|
|
|
11
11
|
import "../chunk-FV56YFM4.js";
|
|
12
12
|
import "../chunk-SDZQJTJW.js";
|
|
13
13
|
import "../chunk-352FGP6W.js";
|
|
14
|
-
import "../chunk-
|
|
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.
|
|
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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
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
|
};
|
package/dist/utils/cli-logger.js
CHANGED