@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.d.mts CHANGED
@@ -8,6 +8,7 @@ declare const optionsSchema: z.ZodObject<{
8
8
  path: z.ZodString;
9
9
  draft: z.ZodOptional<z.ZodBoolean>;
10
10
  name: z.ZodOptional<z.ZodString>;
11
+ summary: z.ZodOptional<z.ZodString>;
11
12
  owners: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
13
  generateMarkdown: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
13
14
  service: z.ZodObject<{
@@ -47,6 +48,7 @@ declare const optionsSchema: z.ZodObject<{
47
48
  id: string;
48
49
  draft?: boolean | undefined;
49
50
  name?: string | undefined;
51
+ summary?: string | undefined;
50
52
  owners?: string[] | undefined;
51
53
  generateMarkdown?: ((args_0: {
52
54
  service: {
@@ -62,6 +64,7 @@ declare const optionsSchema: z.ZodObject<{
62
64
  id: string;
63
65
  draft?: boolean | undefined;
64
66
  name?: string | undefined;
67
+ summary?: string | undefined;
65
68
  owners?: string[] | undefined;
66
69
  generateMarkdown?: ((args_0: {
67
70
  service: {
@@ -198,6 +201,7 @@ declare const optionsSchema: z.ZodObject<{
198
201
  id: string;
199
202
  draft?: boolean | undefined;
200
203
  name?: string | undefined;
204
+ summary?: string | undefined;
201
205
  owners?: string[] | undefined;
202
206
  generateMarkdown?: ((args_0: {
203
207
  service: {
@@ -248,6 +252,7 @@ declare const optionsSchema: z.ZodObject<{
248
252
  id: string;
249
253
  draft?: boolean | undefined;
250
254
  name?: string | undefined;
255
+ summary?: string | undefined;
251
256
  owners?: string[] | undefined;
252
257
  generateMarkdown?: ((args_0: {
253
258
  service: {
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ declare const optionsSchema: z.ZodObject<{
8
8
  path: z.ZodString;
9
9
  draft: z.ZodOptional<z.ZodBoolean>;
10
10
  name: z.ZodOptional<z.ZodString>;
11
+ summary: z.ZodOptional<z.ZodString>;
11
12
  owners: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
13
  generateMarkdown: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
13
14
  service: z.ZodObject<{
@@ -47,6 +48,7 @@ declare const optionsSchema: z.ZodObject<{
47
48
  id: string;
48
49
  draft?: boolean | undefined;
49
50
  name?: string | undefined;
51
+ summary?: string | undefined;
50
52
  owners?: string[] | undefined;
51
53
  generateMarkdown?: ((args_0: {
52
54
  service: {
@@ -62,6 +64,7 @@ declare const optionsSchema: z.ZodObject<{
62
64
  id: string;
63
65
  draft?: boolean | undefined;
64
66
  name?: string | undefined;
67
+ summary?: string | undefined;
65
68
  owners?: string[] | undefined;
66
69
  generateMarkdown?: ((args_0: {
67
70
  service: {
@@ -198,6 +201,7 @@ declare const optionsSchema: z.ZodObject<{
198
201
  id: string;
199
202
  draft?: boolean | undefined;
200
203
  name?: string | undefined;
204
+ summary?: string | undefined;
201
205
  owners?: string[] | undefined;
202
206
  generateMarkdown?: ((args_0: {
203
207
  service: {
@@ -248,6 +252,7 @@ declare const optionsSchema: z.ZodObject<{
248
252
  id: string;
249
253
  draft?: boolean | undefined;
250
254
  name?: string | undefined;
255
+ summary?: string | undefined;
251
256
  owners?: string[] | undefined;
252
257
  generateMarkdown?: ((args_0: {
253
258
  service: {
package/dist/index.js CHANGED
@@ -303,7 +303,7 @@ var import_path3 = __toESM(require("path"));
303
303
  // package.json
304
304
  var package_default = {
305
305
  name: "@eventcatalog/generator-asyncapi",
306
- version: "4.5.2",
306
+ version: "4.5.3",
307
307
  description: "AsyncAPI generator for EventCatalog",
308
308
  scripts: {
309
309
  build: "tsup",
@@ -1183,31 +1183,34 @@ var getInstalledVersionOfPackage = (packageName) => {
1183
1183
  async function checkForPackageUpdate(packageName) {
1184
1184
  const installedVersion = getInstalledVersionOfPackage(packageName);
1185
1185
  if (!installedVersion || installedVersion === "latest") return;
1186
- const pkg = { name: packageName, version: installedVersion };
1187
- const updateNotifierModule = await import("update-notifier");
1188
- const notifier = updateNotifierModule.default({ pkg, updateCheckInterval: 0, shouldNotifyInNpmScript: true });
1189
- const info = await notifier.fetchInfo();
1190
- if (info?.type !== "latest") {
1191
- const message2 = `Package ${packageName} update available ${info.current} \u2192 ${info.latest}
1186
+ try {
1187
+ const pkg = { name: packageName, version: installedVersion };
1188
+ const updateNotifierModule = await import("update-notifier");
1189
+ const notifier = updateNotifierModule.default({ pkg, updateCheckInterval: 0, shouldNotifyInNpmScript: true });
1190
+ const info = await notifier.fetchInfo();
1191
+ if (info?.type !== "latest") {
1192
+ const message2 = `Package ${packageName} update available ${info.current} \u2192 ${info.latest}
1192
1193
  Run npm i ${packageName} to update`;
1193
- console.log(
1194
- boxen(message2, {
1195
- padding: 1,
1196
- margin: 1,
1197
- align: "center",
1198
- borderColor: "yellow",
1199
- borderStyle: {
1200
- topLeft: " ",
1201
- topRight: " ",
1202
- bottomLeft: " ",
1203
- bottomRight: " ",
1204
- right: " ",
1205
- top: "-",
1206
- bottom: "-",
1207
- left: " "
1208
- }
1209
- })
1210
- );
1194
+ console.log(
1195
+ boxen(message2, {
1196
+ padding: 1,
1197
+ margin: 1,
1198
+ align: "center",
1199
+ borderColor: "yellow",
1200
+ borderStyle: {
1201
+ topLeft: " ",
1202
+ topRight: " ",
1203
+ bottomLeft: " ",
1204
+ bottomRight: " ",
1205
+ right: " ",
1206
+ top: "-",
1207
+ bottom: "-",
1208
+ left: " "
1209
+ }
1210
+ })
1211
+ );
1212
+ }
1213
+ } catch (error) {
1211
1214
  }
1212
1215
  }
1213
1216
 
@@ -2727,6 +2730,7 @@ var optionsSchema = import_zod.z.object({
2727
2730
  path: import_zod.z.string({ required_error: "The service path is required. please provide the path to specification file" }),
2728
2731
  draft: import_zod.z.boolean().optional(),
2729
2732
  name: import_zod.z.string().optional(),
2733
+ summary: import_zod.z.string().optional(),
2730
2734
  owners: import_zod.z.array(import_zod.z.string()).optional(),
2731
2735
  generateMarkdown: import_zod.z.function().args(
2732
2736
  import_zod.z.object({
@@ -3092,7 +3096,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
3092
3096
  id: serviceId,
3093
3097
  name: serviceName,
3094
3098
  version,
3095
- summary: getSummary2(document),
3099
+ summary: service.summary || getSummary2(document),
3096
3100
  badges: badges || documentTags.map((tag2) => ({ content: tag2.name(), textColor: "blue", backgroundColor: "blue" })),
3097
3101
  markdown: serviceMarkdown,
3098
3102
  sends,