@eventcatalog/core 5.0.0-beta.6 → 5.0.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 +3 -1
- package/dist/analytics/log-build.js +4 -4
- package/dist/{chunk-XMPFHLK4.js → chunk-4W55ZOOS.js} +2 -2
- package/dist/{chunk-PIYJM642.js → chunk-AWOO63ME.js} +70 -44
- package/dist/{chunk-QBP3BBSV.js → chunk-C6T2AAFR.js} +1 -1
- package/dist/{chunk-MDWB5HLO.js → chunk-ENAG6UH7.js} +5 -0
- package/dist/{chunk-56CD2NH6.js → chunk-PU25TOOJ.js} +1 -1
- package/dist/{chunk-L2IRFOE7.js → chunk-RDIZJ7UT.js} +1 -1
- package/dist/{chunk-DE3QHVJP.js → chunk-T4G3VVZ4.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +138 -90
- package/dist/eventcatalog.config.d.cts +47 -0
- package/dist/eventcatalog.config.d.ts +47 -0
- package/dist/eventcatalog.js +30 -11
- package/dist/features.cjs +8 -2
- package/dist/features.d.cts +3 -1
- package/dist/features.d.ts +3 -1
- package/dist/features.js +5 -3
- 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/dist/utils/license-status.cjs +70 -44
- package/dist/utils/license-status.d.cts +14 -5
- package/dist/utils/license-status.d.ts +14 -5
- package/dist/utils/license-status.js +1 -1
- package/eventcatalog/integrations/studio-server.mjs +15 -3
- package/eventcatalog/src/components/Header.astro +3 -3
- package/eventcatalog/src/features/integrations/eventcatalog-features.ts +10 -2
- package/eventcatalog/src/features/mcp/apps/canvas/shared.ts +9 -1
- package/eventcatalog/src/features/mcp/apps/canvas/view.tsx +9 -2
- package/eventcatalog/src/features/mcp/apps/generated/canvas.html +70 -69
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +69 -69
- package/eventcatalog/src/features/mcp/mcp-server.ts +5 -3
- package/eventcatalog/src/features/studio/agent-choreography.ts +8 -5
- package/eventcatalog/src/features/studio/canvas-actions.ts +148 -21
- package/eventcatalog/src/features/studio/canvas-doc.ts +138 -9
- package/eventcatalog/src/features/studio/canvas-preview.ts +53 -0
- package/eventcatalog/src/features/studio/catalog-resources.ts +5 -2
- package/eventcatalog/src/features/studio/clipboard.ts +97 -0
- package/eventcatalog/src/features/studio/components/CanvasControls.tsx +4 -3
- package/eventcatalog/src/features/studio/components/CanvasHeader.tsx +39 -22
- package/eventcatalog/src/features/studio/components/CanvasStatusMenu.tsx +117 -0
- package/eventcatalog/src/features/studio/components/Comments.tsx +345 -30
- package/eventcatalog/src/features/studio/components/ConnectAgentDialog.tsx +140 -76
- package/eventcatalog/src/features/studio/components/ConnectionsChooser.tsx +144 -0
- package/eventcatalog/src/features/studio/components/ContainerChooser.tsx +1 -1
- package/eventcatalog/src/features/studio/components/DragGhost.tsx +115 -0
- package/eventcatalog/src/features/studio/components/JoinForm.tsx +0 -24
- package/eventcatalog/src/features/studio/components/LeftPanel.tsx +131 -35
- package/eventcatalog/src/features/studio/components/Picture.tsx +21 -0
- package/eventcatalog/src/features/studio/components/Presence.tsx +2 -0
- package/eventcatalog/src/features/studio/components/PropertiesPanel.tsx +187 -50
- package/eventcatalog/src/features/studio/components/ShareDialog.tsx +260 -0
- package/eventcatalog/src/features/studio/components/StudioDesigner.tsx +442 -40
- package/eventcatalog/src/features/studio/components/canvas-nodes.tsx +198 -22
- package/eventcatalog/src/features/studio/components/icons.ts +6 -1
- package/eventcatalog/src/features/studio/components/status.ts +30 -1
- package/eventcatalog/src/features/studio/edges.ts +2 -0
- package/eventcatalog/src/features/studio/grouping.ts +95 -2
- package/eventcatalog/src/features/studio/hooks/presence-store.ts +5 -1
- package/eventcatalog/src/features/studio/hooks/use-canvas-webmcp.ts +13 -3
- package/eventcatalog/src/features/studio/hooks/use-comments.ts +8 -1
- package/eventcatalog/src/features/studio/hooks/use-follow-camera.ts +7 -2
- package/eventcatalog/src/features/studio/hooks/use-studio-flow.ts +174 -27
- package/eventcatalog/src/features/studio/identity.ts +35 -0
- package/eventcatalog/src/features/studio/layout.ts +7 -4
- package/eventcatalog/src/features/studio/levels.ts +138 -72
- package/eventcatalog/src/features/studio/node-types.ts +35 -3
- package/eventcatalog/src/features/studio/pages/[id].astro +7 -2
- package/eventcatalog/src/features/studio/pages/index.astro +555 -2
- package/eventcatalog/src/features/studio/pages/new.astro +24 -0
- package/eventcatalog/src/features/studio/pages/wake.ts +15 -0
- package/eventcatalog/src/features/studio/server/canvas-mcp.ts +48 -13
- package/eventcatalog/src/features/studio/server/runtime.ts +193 -14
- package/eventcatalog/src/features/studio/server/sign-in.ts +18 -0
- package/eventcatalog/src/features/studio/server/storage.ts +110 -0
- package/eventcatalog/src/features/studio/studio.css +184 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +1 -1
- package/eventcatalog/src/utils/feature.ts +7 -3
- package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +0 -2
- package/package.json +4 -4
|
@@ -176,7 +176,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
176
176
|
var import_os = __toESM(require("os"), 1);
|
|
177
177
|
|
|
178
178
|
// package.json
|
|
179
|
-
var version = "5.0.0-beta.
|
|
179
|
+
var version = "5.0.0-beta.8";
|
|
180
180
|
|
|
181
181
|
// src/constants.ts
|
|
182
182
|
var VERSION = version;
|
|
@@ -281,6 +281,7 @@ function serializeCounts(counts) {
|
|
|
281
281
|
|
|
282
282
|
// src/utils/license-status.ts
|
|
283
283
|
var import_boxen = __toESM(require("boxen"), 1);
|
|
284
|
+
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
284
285
|
var import_license2 = require("@eventcatalog/license");
|
|
285
286
|
|
|
286
287
|
// eventcatalog/src/utils/trial.ts
|
|
@@ -311,6 +312,7 @@ var getLicenseAnalytics = (license = { state: "none" }, tsd) => ({
|
|
|
311
312
|
licenseExpiry: "expiresAt" in license ? license.expiresAt?.getTime() : void 0,
|
|
312
313
|
trialExpiry: getTrialStatus(tsd)?.endsAt.getTime()
|
|
313
314
|
});
|
|
315
|
+
var COLOURS = { bold: import_picocolors.default.bold, dim: import_picocolors.default.dim, link: (text) => import_picocolors.default.cyan(text) };
|
|
314
316
|
|
|
315
317
|
// src/analytics/log-build.js
|
|
316
318
|
var isMCPEnabled = (configFile) => configFile.output === "server" && (configFile.mcp?.enabled ?? true);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-4W55ZOOS.js";
|
|
4
|
+
import "../chunk-AWOO63ME.js";
|
|
5
5
|
import "../chunk-ZAZHAVKB.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-C6T2AAFR.js";
|
|
7
|
+
import "../chunk-RDIZJ7UT.js";
|
|
8
8
|
import "../chunk-RFIXKATC.js";
|
|
9
9
|
export {
|
|
10
10
|
log_build_default as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLicenseAnalytics
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AWOO63ME.js";
|
|
4
4
|
import {
|
|
5
5
|
countResources,
|
|
6
6
|
hashCatalogContent,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-ZAZHAVKB.js";
|
|
9
9
|
import {
|
|
10
10
|
raiseEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-C6T2AAFR.js";
|
|
12
12
|
import {
|
|
13
13
|
getEventCatalogConfigFile,
|
|
14
14
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/utils/license-status.ts
|
|
2
2
|
import boxen from "boxen";
|
|
3
|
+
import pc from "picocolors";
|
|
3
4
|
import { isEventCatalogScaleEnabled, isEventCatalogStarterEnabled } from "@eventcatalog/license";
|
|
4
5
|
|
|
5
6
|
// eventcatalog/src/utils/trial.ts
|
|
@@ -122,75 +123,100 @@ var getLicenseAnalytics = (license = { state: "none" }, tsd) => ({
|
|
|
122
123
|
});
|
|
123
124
|
var formatDate = (date) => date.toLocaleDateString(void 0, { dateStyle: "medium" });
|
|
124
125
|
var formatDays = (days) => `${days} ${days === 1 ? "day" : "days"}`;
|
|
125
|
-
var
|
|
126
|
+
var PLAIN = { bold: (text) => text, dim: (text) => text, link: (text) => text };
|
|
127
|
+
var COLOURS = { bold: pc.bold, dim: pc.dim, link: (text) => pc.cyan(text) };
|
|
128
|
+
var render = ({ headline, rows, links }, colours) => {
|
|
129
|
+
const width = Math.max(0, ...[...rows, ...links].map(([label]) => label.length));
|
|
130
|
+
const row = ([label, value]) => `${colours.dim(label.padEnd(width))} ${value}`;
|
|
131
|
+
return [
|
|
132
|
+
colours.bold(headline),
|
|
133
|
+
...rows.length ? ["", ...rows.map(row)] : [],
|
|
134
|
+
...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : []
|
|
135
|
+
].join("\n");
|
|
136
|
+
};
|
|
137
|
+
var message = (content) => ({
|
|
138
|
+
...content,
|
|
139
|
+
text: render(content, PLAIN)
|
|
140
|
+
});
|
|
141
|
+
var getTrialRow = (tsd, now) => {
|
|
126
142
|
const trial = getTrialStatus(tsd, now);
|
|
127
143
|
if (!trial) return;
|
|
128
|
-
return
|
|
144
|
+
return [
|
|
145
|
+
"Trial",
|
|
146
|
+
trial.ended ? `Ended ${formatDate(trial.endsAt)}` : `${formatDays(trial.daysLeft)} left of ${TRIAL_LENGTH_DAYS} (ends ${formatDate(trial.endsAt)})`
|
|
147
|
+
];
|
|
129
148
|
};
|
|
130
149
|
var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
|
|
150
|
+
const licensing = ["Licensing", LICENSE_FAQ_URL];
|
|
151
|
+
const renew = ["Renew", LICENSE_RENEW_URL];
|
|
152
|
+
const licensedTo = "org" in license && license.org ? [["Licensed to", license.org]] : [];
|
|
131
153
|
if (license.state === "licensed") {
|
|
132
154
|
const daysLeft = Math.max(0, Math.ceil((license.expiresAt.getTime() - now) / DAY_IN_MS2));
|
|
133
|
-
const licensedTo = license.org ? `Licensed to ${license.org}` : "Licensed";
|
|
134
155
|
if (daysLeft < LICENSE_REMINDER_DAYS) {
|
|
135
|
-
return {
|
|
136
|
-
title: "EventCatalog
|
|
156
|
+
return message({
|
|
157
|
+
title: "EventCatalog license",
|
|
137
158
|
color: "yellow",
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
].join("\n")
|
|
143
|
-
};
|
|
159
|
+
headline: `Your commercial license expires in ${formatDays(daysLeft)}`,
|
|
160
|
+
rows: [...licensedTo, ["Expires", formatDate(license.expiresAt)]],
|
|
161
|
+
links: [renew]
|
|
162
|
+
});
|
|
144
163
|
}
|
|
145
|
-
return {
|
|
146
|
-
title: "EventCatalog
|
|
164
|
+
return message({
|
|
165
|
+
title: "EventCatalog license",
|
|
147
166
|
color: "green",
|
|
148
|
-
|
|
149
|
-
Valid until
|
|
150
|
-
|
|
167
|
+
headline: "Commercial license active",
|
|
168
|
+
rows: [...licensedTo, ["Valid until", `${formatDate(license.expiresAt)} (${formatDays(daysLeft)} left)`]],
|
|
169
|
+
links: []
|
|
170
|
+
});
|
|
151
171
|
}
|
|
152
172
|
if (license.state === "plan") return;
|
|
153
|
-
const
|
|
173
|
+
const trialRow = getTrialRow(tsd, now);
|
|
174
|
+
const trialRows = trialRow ? [trialRow] : [];
|
|
154
175
|
if (license.state === "none") {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return {
|
|
176
|
+
const trial = getTrialStatus(tsd, now);
|
|
177
|
+
if (!trial || !trialRow) return;
|
|
178
|
+
return message({
|
|
158
179
|
title: "EventCatalog trial",
|
|
159
|
-
color: ended ? "yellow" : "green",
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
180
|
+
color: trial.ended ? "yellow" : "green",
|
|
181
|
+
headline: trial.ended ? "Your EventCatalog trial has ended" : `You're on the ${TRIAL_LENGTH_DAYS}-day EventCatalog trial`,
|
|
182
|
+
rows: trialRows,
|
|
183
|
+
links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], licensing] : [licensing]
|
|
184
|
+
});
|
|
163
185
|
}
|
|
164
186
|
if (license.state === "expired") {
|
|
165
|
-
const expiredOn = license.expiresAt ?
|
|
166
|
-
|
|
167
|
-
|
|
187
|
+
const expiredOn = license.expiresAt ? [
|
|
188
|
+
[
|
|
189
|
+
"Expired",
|
|
190
|
+
`${formatDate(license.expiresAt)} (${formatDays(Math.floor((now - license.expiresAt.getTime()) / DAY_IN_MS2))} ago)`
|
|
191
|
+
]
|
|
192
|
+
] : [];
|
|
193
|
+
return message({
|
|
194
|
+
title: "EventCatalog license",
|
|
168
195
|
color: "yellow",
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
`Learn about licensing: ${LICENSE_FAQ_URL}`
|
|
174
|
-
].filter(Boolean).join("\n")
|
|
175
|
-
};
|
|
196
|
+
headline: "Your commercial license has expired",
|
|
197
|
+
rows: [...licensedTo, ...expiredOn, ...trialRows],
|
|
198
|
+
links: [renew, licensing]
|
|
199
|
+
});
|
|
176
200
|
}
|
|
177
|
-
return {
|
|
201
|
+
return message({
|
|
178
202
|
title: "EventCatalog license",
|
|
179
203
|
color: "yellow",
|
|
180
|
-
|
|
181
|
-
|
|
204
|
+
headline: "Your license.jwt couldn't be verified",
|
|
205
|
+
rows: [["Reason", license.reason.charAt(0).toUpperCase() + license.reason.slice(1)], ...trialRows],
|
|
206
|
+
links: [licensing]
|
|
207
|
+
});
|
|
182
208
|
};
|
|
183
209
|
var printLicenseStatus = (license, tsd) => {
|
|
184
|
-
const
|
|
185
|
-
if (!
|
|
210
|
+
const status = getLicenseStatusMessage(license, tsd);
|
|
211
|
+
if (!status) return;
|
|
186
212
|
console.log(
|
|
187
|
-
boxen(
|
|
188
|
-
padding: 1,
|
|
213
|
+
boxen(render(status, COLOURS), {
|
|
214
|
+
padding: { top: 1, bottom: 1, left: 2, right: 2 },
|
|
189
215
|
margin: 1,
|
|
190
216
|
borderStyle: "round",
|
|
191
|
-
borderColor:
|
|
192
|
-
title:
|
|
193
|
-
titleAlignment: "
|
|
217
|
+
borderColor: status.color,
|
|
218
|
+
title: status.title,
|
|
219
|
+
titleAlignment: "left"
|
|
194
220
|
})
|
|
195
221
|
);
|
|
196
222
|
};
|
|
@@ -13,6 +13,10 @@ var isOutputServer = async () => {
|
|
|
13
13
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
14
14
|
return config?.output === "server";
|
|
15
15
|
};
|
|
16
|
+
var isStudioEnabled = async () => {
|
|
17
|
+
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
18
|
+
return config?.output === "server" && config?.studio?.enabled === true;
|
|
19
|
+
};
|
|
16
20
|
var isIndexedSearchEnabled = async () => {
|
|
17
21
|
const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
|
|
18
22
|
return config?.search?.type === "indexed";
|
|
@@ -26,6 +30,7 @@ var isAuthEnabled = async () => {
|
|
|
26
30
|
export {
|
|
27
31
|
getProjectOutDir,
|
|
28
32
|
isOutputServer,
|
|
33
|
+
isStudioEnabled,
|
|
29
34
|
isIndexedSearchEnabled,
|
|
30
35
|
isAuthEnabled
|
|
31
36
|
};
|
package/dist/constants.cjs
CHANGED