@eventcatalog/generator-asyncapi 4.5.2 → 4.5.3

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/index.mjs CHANGED
@@ -292,7 +292,7 @@ import path3 from "path";
292
292
  // package.json
293
293
  var package_default = {
294
294
  name: "@eventcatalog/generator-asyncapi",
295
- version: "4.5.2",
295
+ version: "4.5.3",
296
296
  description: "AsyncAPI generator for EventCatalog",
297
297
  scripts: {
298
298
  build: "tsup",
@@ -1172,31 +1172,34 @@ var getInstalledVersionOfPackage = (packageName) => {
1172
1172
  async function checkForPackageUpdate(packageName) {
1173
1173
  const installedVersion = getInstalledVersionOfPackage(packageName);
1174
1174
  if (!installedVersion || installedVersion === "latest") return;
1175
- const pkg = { name: packageName, version: installedVersion };
1176
- const updateNotifierModule = await import("update-notifier");
1177
- const notifier = updateNotifierModule.default({ pkg, updateCheckInterval: 0, shouldNotifyInNpmScript: true });
1178
- const info = await notifier.fetchInfo();
1179
- if (info?.type !== "latest") {
1180
- const message2 = `Package ${packageName} update available ${info.current} \u2192 ${info.latest}
1175
+ try {
1176
+ const pkg = { name: packageName, version: installedVersion };
1177
+ const updateNotifierModule = await import("update-notifier");
1178
+ const notifier = updateNotifierModule.default({ pkg, updateCheckInterval: 0, shouldNotifyInNpmScript: true });
1179
+ const info = await notifier.fetchInfo();
1180
+ if (info?.type !== "latest") {
1181
+ const message2 = `Package ${packageName} update available ${info.current} \u2192 ${info.latest}
1181
1182
  Run npm i ${packageName} to update`;
1182
- console.log(
1183
- boxen(message2, {
1184
- padding: 1,
1185
- margin: 1,
1186
- align: "center",
1187
- borderColor: "yellow",
1188
- borderStyle: {
1189
- topLeft: " ",
1190
- topRight: " ",
1191
- bottomLeft: " ",
1192
- bottomRight: " ",
1193
- right: " ",
1194
- top: "-",
1195
- bottom: "-",
1196
- left: " "
1197
- }
1198
- })
1199
- );
1183
+ console.log(
1184
+ boxen(message2, {
1185
+ padding: 1,
1186
+ margin: 1,
1187
+ align: "center",
1188
+ borderColor: "yellow",
1189
+ borderStyle: {
1190
+ topLeft: " ",
1191
+ topRight: " ",
1192
+ bottomLeft: " ",
1193
+ bottomRight: " ",
1194
+ right: " ",
1195
+ top: "-",
1196
+ bottom: "-",
1197
+ left: " "
1198
+ }
1199
+ })
1200
+ );
1201
+ }
1202
+ } catch (error) {
1200
1203
  }
1201
1204
  }
1202
1205
 
@@ -2716,6 +2719,7 @@ var optionsSchema = z.object({
2716
2719
  path: z.string({ required_error: "The service path is required. please provide the path to specification file" }),
2717
2720
  draft: z.boolean().optional(),
2718
2721
  name: z.string().optional(),
2722
+ summary: z.string().optional(),
2719
2723
  owners: z.array(z.string()).optional(),
2720
2724
  generateMarkdown: z.function().args(
2721
2725
  z.object({
@@ -3081,7 +3085,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
3081
3085
  id: serviceId,
3082
3086
  name: serviceName,
3083
3087
  version,
3084
- summary: getSummary2(document),
3088
+ summary: service.summary || getSummary2(document),
3085
3089
  badges: badges || documentTags.map((tag2) => ({ content: tag2.name(), textColor: "blue", backgroundColor: "blue" })),
3086
3090
  markdown: serviceMarkdown,
3087
3091
  sends,