@eventcatalog/generator-asyncapi 3.0.1 → 3.0.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/checkLicense.js +2 -1
- package/dist/checkLicense.js.map +1 -1
- package/dist/checkLicense.mjs +2 -1
- package/dist/checkLicense.mjs.map +1 -1
- package/dist/index.js +1203 -89
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1226 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,282 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
|
|
28
|
+
var require_boxes = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
single: {
|
|
32
|
+
topLeft: "\u250C",
|
|
33
|
+
top: "\u2500",
|
|
34
|
+
topRight: "\u2510",
|
|
35
|
+
right: "\u2502",
|
|
36
|
+
bottomRight: "\u2518",
|
|
37
|
+
bottom: "\u2500",
|
|
38
|
+
bottomLeft: "\u2514",
|
|
39
|
+
left: "\u2502"
|
|
40
|
+
},
|
|
41
|
+
double: {
|
|
42
|
+
topLeft: "\u2554",
|
|
43
|
+
top: "\u2550",
|
|
44
|
+
topRight: "\u2557",
|
|
45
|
+
right: "\u2551",
|
|
46
|
+
bottomRight: "\u255D",
|
|
47
|
+
bottom: "\u2550",
|
|
48
|
+
bottomLeft: "\u255A",
|
|
49
|
+
left: "\u2551"
|
|
50
|
+
},
|
|
51
|
+
round: {
|
|
52
|
+
topLeft: "\u256D",
|
|
53
|
+
top: "\u2500",
|
|
54
|
+
topRight: "\u256E",
|
|
55
|
+
right: "\u2502",
|
|
56
|
+
bottomRight: "\u256F",
|
|
57
|
+
bottom: "\u2500",
|
|
58
|
+
bottomLeft: "\u2570",
|
|
59
|
+
left: "\u2502"
|
|
60
|
+
},
|
|
61
|
+
bold: {
|
|
62
|
+
topLeft: "\u250F",
|
|
63
|
+
top: "\u2501",
|
|
64
|
+
topRight: "\u2513",
|
|
65
|
+
right: "\u2503",
|
|
66
|
+
bottomRight: "\u251B",
|
|
67
|
+
bottom: "\u2501",
|
|
68
|
+
bottomLeft: "\u2517",
|
|
69
|
+
left: "\u2503"
|
|
70
|
+
},
|
|
71
|
+
singleDouble: {
|
|
72
|
+
topLeft: "\u2553",
|
|
73
|
+
top: "\u2500",
|
|
74
|
+
topRight: "\u2556",
|
|
75
|
+
right: "\u2551",
|
|
76
|
+
bottomRight: "\u255C",
|
|
77
|
+
bottom: "\u2500",
|
|
78
|
+
bottomLeft: "\u2559",
|
|
79
|
+
left: "\u2551"
|
|
80
|
+
},
|
|
81
|
+
doubleSingle: {
|
|
82
|
+
topLeft: "\u2552",
|
|
83
|
+
top: "\u2550",
|
|
84
|
+
topRight: "\u2555",
|
|
85
|
+
right: "\u2502",
|
|
86
|
+
bottomRight: "\u255B",
|
|
87
|
+
bottom: "\u2550",
|
|
88
|
+
bottomLeft: "\u2558",
|
|
89
|
+
left: "\u2502"
|
|
90
|
+
},
|
|
91
|
+
classic: {
|
|
92
|
+
topLeft: "+",
|
|
93
|
+
top: "-",
|
|
94
|
+
topRight: "+",
|
|
95
|
+
right: "|",
|
|
96
|
+
bottomRight: "+",
|
|
97
|
+
bottom: "-",
|
|
98
|
+
bottomLeft: "+",
|
|
99
|
+
left: "|"
|
|
100
|
+
},
|
|
101
|
+
arrow: {
|
|
102
|
+
topLeft: "\u2198",
|
|
103
|
+
top: "\u2193",
|
|
104
|
+
topRight: "\u2199",
|
|
105
|
+
right: "\u2190",
|
|
106
|
+
bottomRight: "\u2196",
|
|
107
|
+
bottom: "\u2191",
|
|
108
|
+
bottomLeft: "\u2197",
|
|
109
|
+
left: "\u2192"
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
|
|
116
|
+
var require_cli_boxes = __commonJS({
|
|
117
|
+
"../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js"(exports, module) {
|
|
118
|
+
"use strict";
|
|
119
|
+
var cliBoxes2 = require_boxes();
|
|
120
|
+
module.exports = cliBoxes2;
|
|
121
|
+
module.exports.default = cliBoxes2;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
126
|
+
var require_ansi_regex = __commonJS({
|
|
127
|
+
"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
|
|
128
|
+
"use strict";
|
|
129
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
130
|
+
const pattern = [
|
|
131
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
132
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
133
|
+
].join("|");
|
|
134
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
140
|
+
var require_strip_ansi = __commonJS({
|
|
141
|
+
"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
|
|
142
|
+
"use strict";
|
|
143
|
+
var ansiRegex2 = require_ansi_regex();
|
|
144
|
+
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
149
|
+
var require_is_fullwidth_code_point = __commonJS({
|
|
150
|
+
"../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
|
|
151
|
+
"use strict";
|
|
152
|
+
var isFullwidthCodePoint = (codePoint) => {
|
|
153
|
+
if (Number.isNaN(codePoint)) {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
157
|
+
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
158
|
+
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
159
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
160
|
+
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
161
|
+
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
162
|
+
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
163
|
+
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
164
|
+
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
165
|
+
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
166
|
+
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
167
|
+
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
168
|
+
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
169
|
+
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
170
|
+
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
171
|
+
131072 <= codePoint && codePoint <= 262141)) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
return false;
|
|
175
|
+
};
|
|
176
|
+
module.exports = isFullwidthCodePoint;
|
|
177
|
+
module.exports.default = isFullwidthCodePoint;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
182
|
+
var require_emoji_regex = __commonJS({
|
|
183
|
+
"../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
|
|
184
|
+
"use strict";
|
|
185
|
+
module.exports = function() {
|
|
186
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
192
|
+
var require_string_width = __commonJS({
|
|
193
|
+
"../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
|
|
194
|
+
"use strict";
|
|
195
|
+
var stripAnsi2 = require_strip_ansi();
|
|
196
|
+
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
197
|
+
var emojiRegex = require_emoji_regex();
|
|
198
|
+
var stringWidth2 = (string) => {
|
|
199
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
200
|
+
return 0;
|
|
201
|
+
}
|
|
202
|
+
string = stripAnsi2(string);
|
|
203
|
+
if (string.length === 0) {
|
|
204
|
+
return 0;
|
|
205
|
+
}
|
|
206
|
+
string = string.replace(emojiRegex(), " ");
|
|
207
|
+
let width = 0;
|
|
208
|
+
for (let i = 0; i < string.length; i++) {
|
|
209
|
+
const code = string.codePointAt(i);
|
|
210
|
+
if (code <= 31 || code >= 127 && code <= 159) {
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
if (code >= 768 && code <= 879) {
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (code > 65535) {
|
|
217
|
+
i++;
|
|
218
|
+
}
|
|
219
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
220
|
+
}
|
|
221
|
+
return width;
|
|
222
|
+
};
|
|
223
|
+
module.exports = stringWidth2;
|
|
224
|
+
module.exports.default = stringWidth2;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
// ../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js
|
|
229
|
+
var require_ansi_align = __commonJS({
|
|
230
|
+
"../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js"(exports, module) {
|
|
231
|
+
"use strict";
|
|
232
|
+
var stringWidth2 = require_string_width();
|
|
233
|
+
function ansiAlign2(text, opts) {
|
|
234
|
+
if (!text) return text;
|
|
235
|
+
opts = opts || {};
|
|
236
|
+
const align = opts.align || "center";
|
|
237
|
+
if (align === "left") return text;
|
|
238
|
+
const split = opts.split || "\n";
|
|
239
|
+
const pad = opts.pad || " ";
|
|
240
|
+
const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
|
|
241
|
+
let returnString = false;
|
|
242
|
+
if (!Array.isArray(text)) {
|
|
243
|
+
returnString = true;
|
|
244
|
+
text = String(text).split(split);
|
|
245
|
+
}
|
|
246
|
+
let width;
|
|
247
|
+
let maxWidth = 0;
|
|
248
|
+
text = text.map(function(str) {
|
|
249
|
+
str = String(str);
|
|
250
|
+
width = stringWidth2(str);
|
|
251
|
+
maxWidth = Math.max(width, maxWidth);
|
|
252
|
+
return {
|
|
253
|
+
str,
|
|
254
|
+
width
|
|
255
|
+
};
|
|
256
|
+
}).map(function(obj) {
|
|
257
|
+
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
|
|
258
|
+
});
|
|
259
|
+
return returnString ? text.join(split) : text;
|
|
260
|
+
}
|
|
261
|
+
ansiAlign2.left = function left(text) {
|
|
262
|
+
return ansiAlign2(text, { align: "left" });
|
|
263
|
+
};
|
|
264
|
+
ansiAlign2.center = function center(text) {
|
|
265
|
+
return ansiAlign2(text, { align: "center" });
|
|
266
|
+
};
|
|
267
|
+
ansiAlign2.right = function right(text) {
|
|
268
|
+
return ansiAlign2(text, { align: "right" });
|
|
269
|
+
};
|
|
270
|
+
module.exports = ansiAlign2;
|
|
271
|
+
function halfDiff(maxWidth, curWidth) {
|
|
272
|
+
return Math.floor((maxWidth - curWidth) / 2);
|
|
273
|
+
}
|
|
274
|
+
function fullDiff(maxWidth, curWidth) {
|
|
275
|
+
return maxWidth - curWidth;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
|
|
1
280
|
// src/index.ts
|
|
2
281
|
import { Parser, fromFile, fromURL } from "@asyncapi/parser";
|
|
3
282
|
import utils from "@eventcatalog/sdk";
|
|
@@ -5,8 +284,921 @@ import { readFile } from "node:fs/promises";
|
|
|
5
284
|
import argv from "minimist";
|
|
6
285
|
import yaml from "js-yaml";
|
|
7
286
|
import { z } from "zod";
|
|
8
|
-
import
|
|
287
|
+
import chalk3 from "chalk";
|
|
288
|
+
import path2 from "path";
|
|
289
|
+
|
|
290
|
+
// package.json
|
|
291
|
+
var package_default = {
|
|
292
|
+
name: "@eventcatalog/generator-asyncapi",
|
|
293
|
+
version: "3.0.3",
|
|
294
|
+
description: "AsyncAPI generator for EventCatalog",
|
|
295
|
+
scripts: {
|
|
296
|
+
build: "tsup",
|
|
297
|
+
test: "vitest",
|
|
298
|
+
format: "prettier --write .",
|
|
299
|
+
"format:diff": "prettier --list-different .",
|
|
300
|
+
changeset: "changeset",
|
|
301
|
+
release: "changeset publish"
|
|
302
|
+
},
|
|
303
|
+
publishConfig: {
|
|
304
|
+
access: "public"
|
|
305
|
+
},
|
|
306
|
+
keywords: [],
|
|
307
|
+
author: "",
|
|
308
|
+
license: "ISC",
|
|
309
|
+
devDependencies: {
|
|
310
|
+
"@changesets/cli": "^2.27.9",
|
|
311
|
+
"@types/fs-extra": "^11.0.4",
|
|
312
|
+
"@types/js-yaml": "^4.0.9",
|
|
313
|
+
"@types/lodash": "^4.17.7",
|
|
314
|
+
"@types/minimist": "^1.2.5",
|
|
315
|
+
"@types/node": "^20.16.1",
|
|
316
|
+
prettier: "^3.3.3",
|
|
317
|
+
tsup: "^8.1.0",
|
|
318
|
+
typescript: "^5.5.3",
|
|
319
|
+
vitest: "^2.0.2"
|
|
320
|
+
},
|
|
321
|
+
files: [
|
|
322
|
+
"dist",
|
|
323
|
+
"package.json"
|
|
324
|
+
],
|
|
325
|
+
main: "./dist/index.js",
|
|
326
|
+
module: "./dist/index.mjs",
|
|
327
|
+
types: "./dist/index.d.ts",
|
|
328
|
+
dependencies: {
|
|
329
|
+
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
330
|
+
"@asyncapi/parser": "^3.3.0",
|
|
331
|
+
"@eventcatalog/sdk": "^1.4.8",
|
|
332
|
+
chalk: "^4",
|
|
333
|
+
"fs-extra": "^11.2.0",
|
|
334
|
+
glob: "^11.0.0",
|
|
335
|
+
"gray-matter": "^4.0.3",
|
|
336
|
+
"js-yaml": "^4.1.0",
|
|
337
|
+
lodash: "^4.17.21",
|
|
338
|
+
minimist: "^1.2.8",
|
|
339
|
+
slugify: "^1.6.6",
|
|
340
|
+
"update-notifier": "^7.3.1",
|
|
341
|
+
zod: "^3.23.8"
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
// ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
346
|
+
import process2 from "node:process";
|
|
347
|
+
|
|
348
|
+
// ../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js
|
|
349
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
350
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
351
|
+
const pattern = [
|
|
352
|
+
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
353
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
354
|
+
].join("|");
|
|
355
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
|
|
359
|
+
var regex = ansiRegex();
|
|
360
|
+
function stripAnsi(string) {
|
|
361
|
+
if (typeof string !== "string") {
|
|
362
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
363
|
+
}
|
|
364
|
+
return string.replace(regex, "");
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
|
|
368
|
+
function isAmbiguous(x) {
|
|
369
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
370
|
+
}
|
|
371
|
+
function isFullWidth(x) {
|
|
372
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
373
|
+
}
|
|
374
|
+
function isWide(x) {
|
|
375
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
|
|
379
|
+
function validate(codePoint) {
|
|
380
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
381
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
385
|
+
validate(codePoint);
|
|
386
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
387
|
+
return 2;
|
|
388
|
+
}
|
|
389
|
+
return 1;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// ../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.mjs
|
|
393
|
+
var emoji_regex_default = () => {
|
|
394
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
398
|
+
var segmenter = new Intl.Segmenter();
|
|
399
|
+
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
400
|
+
function stringWidth(string, options = {}) {
|
|
401
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
402
|
+
return 0;
|
|
403
|
+
}
|
|
404
|
+
const {
|
|
405
|
+
ambiguousIsNarrow = true,
|
|
406
|
+
countAnsiEscapeCodes = false
|
|
407
|
+
} = options;
|
|
408
|
+
if (!countAnsiEscapeCodes) {
|
|
409
|
+
string = stripAnsi(string);
|
|
410
|
+
}
|
|
411
|
+
if (string.length === 0) {
|
|
412
|
+
return 0;
|
|
413
|
+
}
|
|
414
|
+
let width = 0;
|
|
415
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
416
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
417
|
+
const codePoint = character.codePointAt(0);
|
|
418
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if (emoji_regex_default().test(character)) {
|
|
437
|
+
width += 2;
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
441
|
+
}
|
|
442
|
+
return width;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
446
|
+
import chalk from "chalk";
|
|
447
|
+
|
|
448
|
+
// ../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js
|
|
449
|
+
function widestLine(string) {
|
|
450
|
+
let lineWidth = 0;
|
|
451
|
+
for (const line of string.split("\n")) {
|
|
452
|
+
lineWidth = Math.max(lineWidth, stringWidth(line));
|
|
453
|
+
}
|
|
454
|
+
return lineWidth;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
458
|
+
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
459
|
+
|
|
460
|
+
// ../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js
|
|
461
|
+
var UPPERCASE = /[\p{Lu}]/u;
|
|
462
|
+
var LOWERCASE = /[\p{Ll}]/u;
|
|
463
|
+
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
|
464
|
+
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
|
465
|
+
var SEPARATORS = /[_.\- ]+/;
|
|
466
|
+
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
|
467
|
+
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
468
|
+
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
|
469
|
+
var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
470
|
+
let isLastCharLower = false;
|
|
471
|
+
let isLastCharUpper = false;
|
|
472
|
+
let isLastLastCharUpper = false;
|
|
473
|
+
let isLastLastCharPreserved = false;
|
|
474
|
+
for (let index = 0; index < string.length; index++) {
|
|
475
|
+
const character = string[index];
|
|
476
|
+
isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
|
|
477
|
+
if (isLastCharLower && UPPERCASE.test(character)) {
|
|
478
|
+
string = string.slice(0, index) + "-" + string.slice(index);
|
|
479
|
+
isLastCharLower = false;
|
|
480
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
481
|
+
isLastCharUpper = true;
|
|
482
|
+
index++;
|
|
483
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
|
|
484
|
+
string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
|
|
485
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
486
|
+
isLastCharUpper = false;
|
|
487
|
+
isLastCharLower = true;
|
|
488
|
+
} else {
|
|
489
|
+
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
|
490
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
491
|
+
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return string;
|
|
495
|
+
};
|
|
496
|
+
var preserveConsecutiveUppercase = (input, toLowerCase) => {
|
|
497
|
+
LEADING_CAPITAL.lastIndex = 0;
|
|
498
|
+
return input.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
|
|
499
|
+
};
|
|
500
|
+
var postProcess = (input, toUpperCase) => {
|
|
501
|
+
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
|
502
|
+
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
|
503
|
+
return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));
|
|
504
|
+
};
|
|
505
|
+
function camelCase(input, options) {
|
|
506
|
+
if (!(typeof input === "string" || Array.isArray(input))) {
|
|
507
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
|
508
|
+
}
|
|
509
|
+
options = {
|
|
510
|
+
pascalCase: false,
|
|
511
|
+
preserveConsecutiveUppercase: false,
|
|
512
|
+
...options
|
|
513
|
+
};
|
|
514
|
+
if (Array.isArray(input)) {
|
|
515
|
+
input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
|
516
|
+
} else {
|
|
517
|
+
input = input.trim();
|
|
518
|
+
}
|
|
519
|
+
if (input.length === 0) {
|
|
520
|
+
return "";
|
|
521
|
+
}
|
|
522
|
+
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
|
523
|
+
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
|
524
|
+
if (input.length === 1) {
|
|
525
|
+
if (SEPARATORS.test(input)) {
|
|
526
|
+
return "";
|
|
527
|
+
}
|
|
528
|
+
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
|
529
|
+
}
|
|
530
|
+
const hasUpperCase = input !== toLowerCase(input);
|
|
531
|
+
if (hasUpperCase) {
|
|
532
|
+
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
|
533
|
+
}
|
|
534
|
+
input = input.replace(LEADING_SEPARATORS, "");
|
|
535
|
+
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
|
536
|
+
if (options.pascalCase) {
|
|
537
|
+
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
538
|
+
}
|
|
539
|
+
return postProcess(input, toUpperCase);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
543
|
+
var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
544
|
+
|
|
545
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js
|
|
546
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
547
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
548
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
549
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
550
|
+
var styles = {
|
|
551
|
+
modifier: {
|
|
552
|
+
reset: [0, 0],
|
|
553
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
554
|
+
bold: [1, 22],
|
|
555
|
+
dim: [2, 22],
|
|
556
|
+
italic: [3, 23],
|
|
557
|
+
underline: [4, 24],
|
|
558
|
+
overline: [53, 55],
|
|
559
|
+
inverse: [7, 27],
|
|
560
|
+
hidden: [8, 28],
|
|
561
|
+
strikethrough: [9, 29]
|
|
562
|
+
},
|
|
563
|
+
color: {
|
|
564
|
+
black: [30, 39],
|
|
565
|
+
red: [31, 39],
|
|
566
|
+
green: [32, 39],
|
|
567
|
+
yellow: [33, 39],
|
|
568
|
+
blue: [34, 39],
|
|
569
|
+
magenta: [35, 39],
|
|
570
|
+
cyan: [36, 39],
|
|
571
|
+
white: [37, 39],
|
|
572
|
+
// Bright color
|
|
573
|
+
blackBright: [90, 39],
|
|
574
|
+
gray: [90, 39],
|
|
575
|
+
// Alias of `blackBright`
|
|
576
|
+
grey: [90, 39],
|
|
577
|
+
// Alias of `blackBright`
|
|
578
|
+
redBright: [91, 39],
|
|
579
|
+
greenBright: [92, 39],
|
|
580
|
+
yellowBright: [93, 39],
|
|
581
|
+
blueBright: [94, 39],
|
|
582
|
+
magentaBright: [95, 39],
|
|
583
|
+
cyanBright: [96, 39],
|
|
584
|
+
whiteBright: [97, 39]
|
|
585
|
+
},
|
|
586
|
+
bgColor: {
|
|
587
|
+
bgBlack: [40, 49],
|
|
588
|
+
bgRed: [41, 49],
|
|
589
|
+
bgGreen: [42, 49],
|
|
590
|
+
bgYellow: [43, 49],
|
|
591
|
+
bgBlue: [44, 49],
|
|
592
|
+
bgMagenta: [45, 49],
|
|
593
|
+
bgCyan: [46, 49],
|
|
594
|
+
bgWhite: [47, 49],
|
|
595
|
+
// Bright color
|
|
596
|
+
bgBlackBright: [100, 49],
|
|
597
|
+
bgGray: [100, 49],
|
|
598
|
+
// Alias of `bgBlackBright`
|
|
599
|
+
bgGrey: [100, 49],
|
|
600
|
+
// Alias of `bgBlackBright`
|
|
601
|
+
bgRedBright: [101, 49],
|
|
602
|
+
bgGreenBright: [102, 49],
|
|
603
|
+
bgYellowBright: [103, 49],
|
|
604
|
+
bgBlueBright: [104, 49],
|
|
605
|
+
bgMagentaBright: [105, 49],
|
|
606
|
+
bgCyanBright: [106, 49],
|
|
607
|
+
bgWhiteBright: [107, 49]
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
611
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
612
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
613
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
614
|
+
function assembleStyles() {
|
|
615
|
+
const codes = /* @__PURE__ */ new Map();
|
|
616
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
617
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
618
|
+
styles[styleName] = {
|
|
619
|
+
open: `\x1B[${style[0]}m`,
|
|
620
|
+
close: `\x1B[${style[1]}m`
|
|
621
|
+
};
|
|
622
|
+
group[styleName] = styles[styleName];
|
|
623
|
+
codes.set(style[0], style[1]);
|
|
624
|
+
}
|
|
625
|
+
Object.defineProperty(styles, groupName, {
|
|
626
|
+
value: group,
|
|
627
|
+
enumerable: false
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
Object.defineProperty(styles, "codes", {
|
|
631
|
+
value: codes,
|
|
632
|
+
enumerable: false
|
|
633
|
+
});
|
|
634
|
+
styles.color.close = "\x1B[39m";
|
|
635
|
+
styles.bgColor.close = "\x1B[49m";
|
|
636
|
+
styles.color.ansi = wrapAnsi16();
|
|
637
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
638
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
639
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
640
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
641
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
642
|
+
Object.defineProperties(styles, {
|
|
643
|
+
rgbToAnsi256: {
|
|
644
|
+
value: (red, green, blue) => {
|
|
645
|
+
if (red === green && green === blue) {
|
|
646
|
+
if (red < 8) {
|
|
647
|
+
return 16;
|
|
648
|
+
}
|
|
649
|
+
if (red > 248) {
|
|
650
|
+
return 231;
|
|
651
|
+
}
|
|
652
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
653
|
+
}
|
|
654
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
655
|
+
},
|
|
656
|
+
enumerable: false
|
|
657
|
+
},
|
|
658
|
+
hexToRgb: {
|
|
659
|
+
value: (hex) => {
|
|
660
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
661
|
+
if (!matches) {
|
|
662
|
+
return [0, 0, 0];
|
|
663
|
+
}
|
|
664
|
+
let [colorString] = matches;
|
|
665
|
+
if (colorString.length === 3) {
|
|
666
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
667
|
+
}
|
|
668
|
+
const integer = Number.parseInt(colorString, 16);
|
|
669
|
+
return [
|
|
670
|
+
/* eslint-disable no-bitwise */
|
|
671
|
+
integer >> 16 & 255,
|
|
672
|
+
integer >> 8 & 255,
|
|
673
|
+
integer & 255
|
|
674
|
+
/* eslint-enable no-bitwise */
|
|
675
|
+
];
|
|
676
|
+
},
|
|
677
|
+
enumerable: false
|
|
678
|
+
},
|
|
679
|
+
hexToAnsi256: {
|
|
680
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
681
|
+
enumerable: false
|
|
682
|
+
},
|
|
683
|
+
ansi256ToAnsi: {
|
|
684
|
+
value: (code) => {
|
|
685
|
+
if (code < 8) {
|
|
686
|
+
return 30 + code;
|
|
687
|
+
}
|
|
688
|
+
if (code < 16) {
|
|
689
|
+
return 90 + (code - 8);
|
|
690
|
+
}
|
|
691
|
+
let red;
|
|
692
|
+
let green;
|
|
693
|
+
let blue;
|
|
694
|
+
if (code >= 232) {
|
|
695
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
696
|
+
green = red;
|
|
697
|
+
blue = red;
|
|
698
|
+
} else {
|
|
699
|
+
code -= 16;
|
|
700
|
+
const remainder = code % 36;
|
|
701
|
+
red = Math.floor(code / 36) / 5;
|
|
702
|
+
green = Math.floor(remainder / 6) / 5;
|
|
703
|
+
blue = remainder % 6 / 5;
|
|
704
|
+
}
|
|
705
|
+
const value = Math.max(red, green, blue) * 2;
|
|
706
|
+
if (value === 0) {
|
|
707
|
+
return 30;
|
|
708
|
+
}
|
|
709
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
710
|
+
if (value === 2) {
|
|
711
|
+
result += 60;
|
|
712
|
+
}
|
|
713
|
+
return result;
|
|
714
|
+
},
|
|
715
|
+
enumerable: false
|
|
716
|
+
},
|
|
717
|
+
rgbToAnsi: {
|
|
718
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
719
|
+
enumerable: false
|
|
720
|
+
},
|
|
721
|
+
hexToAnsi: {
|
|
722
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
723
|
+
enumerable: false
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
return styles;
|
|
727
|
+
}
|
|
728
|
+
var ansiStyles = assembleStyles();
|
|
729
|
+
var ansi_styles_default = ansiStyles;
|
|
730
|
+
|
|
731
|
+
// ../../node_modules/.pnpm/wrap-ansi@9.0.0/node_modules/wrap-ansi/index.js
|
|
732
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
733
|
+
"\x1B",
|
|
734
|
+
"\x9B"
|
|
735
|
+
]);
|
|
736
|
+
var END_CODE = 39;
|
|
737
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
738
|
+
var ANSI_CSI = "[";
|
|
739
|
+
var ANSI_OSC = "]";
|
|
740
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
741
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
742
|
+
var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
743
|
+
var wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
744
|
+
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
745
|
+
var wrapWord = (rows, word, columns) => {
|
|
746
|
+
const characters = [...word];
|
|
747
|
+
let isInsideEscape = false;
|
|
748
|
+
let isInsideLinkEscape = false;
|
|
749
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
750
|
+
for (const [index, character] of characters.entries()) {
|
|
751
|
+
const characterLength = stringWidth(character);
|
|
752
|
+
if (visible + characterLength <= columns) {
|
|
753
|
+
rows[rows.length - 1] += character;
|
|
754
|
+
} else {
|
|
755
|
+
rows.push(character);
|
|
756
|
+
visible = 0;
|
|
757
|
+
}
|
|
758
|
+
if (ESCAPES.has(character)) {
|
|
759
|
+
isInsideEscape = true;
|
|
760
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
761
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
762
|
+
}
|
|
763
|
+
if (isInsideEscape) {
|
|
764
|
+
if (isInsideLinkEscape) {
|
|
765
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
766
|
+
isInsideEscape = false;
|
|
767
|
+
isInsideLinkEscape = false;
|
|
768
|
+
}
|
|
769
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
770
|
+
isInsideEscape = false;
|
|
771
|
+
}
|
|
772
|
+
continue;
|
|
773
|
+
}
|
|
774
|
+
visible += characterLength;
|
|
775
|
+
if (visible === columns && index < characters.length - 1) {
|
|
776
|
+
rows.push("");
|
|
777
|
+
visible = 0;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
781
|
+
rows[rows.length - 2] += rows.pop();
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
785
|
+
const words = string.split(" ");
|
|
786
|
+
let last = words.length;
|
|
787
|
+
while (last > 0) {
|
|
788
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
last--;
|
|
792
|
+
}
|
|
793
|
+
if (last === words.length) {
|
|
794
|
+
return string;
|
|
795
|
+
}
|
|
796
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
797
|
+
};
|
|
798
|
+
var exec = (string, columns, options = {}) => {
|
|
799
|
+
if (options.trim !== false && string.trim() === "") {
|
|
800
|
+
return "";
|
|
801
|
+
}
|
|
802
|
+
let returnValue = "";
|
|
803
|
+
let escapeCode;
|
|
804
|
+
let escapeUrl;
|
|
805
|
+
const lengths = wordLengths(string);
|
|
806
|
+
let rows = [""];
|
|
807
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
808
|
+
if (options.trim !== false) {
|
|
809
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
810
|
+
}
|
|
811
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
812
|
+
if (index !== 0) {
|
|
813
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
814
|
+
rows.push("");
|
|
815
|
+
rowLength = 0;
|
|
816
|
+
}
|
|
817
|
+
if (rowLength > 0 || options.trim === false) {
|
|
818
|
+
rows[rows.length - 1] += " ";
|
|
819
|
+
rowLength++;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
if (options.hard && lengths[index] > columns) {
|
|
823
|
+
const remainingColumns = columns - rowLength;
|
|
824
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
825
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
826
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
827
|
+
rows.push("");
|
|
828
|
+
}
|
|
829
|
+
wrapWord(rows, word, columns);
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
833
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
834
|
+
wrapWord(rows, word, columns);
|
|
835
|
+
continue;
|
|
836
|
+
}
|
|
837
|
+
rows.push("");
|
|
838
|
+
}
|
|
839
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
840
|
+
wrapWord(rows, word, columns);
|
|
841
|
+
continue;
|
|
842
|
+
}
|
|
843
|
+
rows[rows.length - 1] += word;
|
|
844
|
+
}
|
|
845
|
+
if (options.trim !== false) {
|
|
846
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
847
|
+
}
|
|
848
|
+
const preString = rows.join("\n");
|
|
849
|
+
const pre = [...preString];
|
|
850
|
+
let preStringIndex = 0;
|
|
851
|
+
for (const [index, character] of pre.entries()) {
|
|
852
|
+
returnValue += character;
|
|
853
|
+
if (ESCAPES.has(character)) {
|
|
854
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
855
|
+
if (groups.code !== void 0) {
|
|
856
|
+
const code2 = Number.parseFloat(groups.code);
|
|
857
|
+
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
858
|
+
} else if (groups.uri !== void 0) {
|
|
859
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
863
|
+
if (pre[index + 1] === "\n") {
|
|
864
|
+
if (escapeUrl) {
|
|
865
|
+
returnValue += wrapAnsiHyperlink("");
|
|
866
|
+
}
|
|
867
|
+
if (escapeCode && code) {
|
|
868
|
+
returnValue += wrapAnsiCode(code);
|
|
869
|
+
}
|
|
870
|
+
} else if (character === "\n") {
|
|
871
|
+
if (escapeCode && code) {
|
|
872
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
873
|
+
}
|
|
874
|
+
if (escapeUrl) {
|
|
875
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
preStringIndex += character.length;
|
|
879
|
+
}
|
|
880
|
+
return returnValue;
|
|
881
|
+
};
|
|
882
|
+
function wrapAnsi(string, columns, options) {
|
|
883
|
+
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
887
|
+
var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
|
|
888
|
+
var NEWLINE = "\n";
|
|
889
|
+
var PAD = " ";
|
|
890
|
+
var NONE = "none";
|
|
891
|
+
var terminalColumns = () => {
|
|
892
|
+
const { env, stdout, stderr } = process2;
|
|
893
|
+
if (stdout?.columns) {
|
|
894
|
+
return stdout.columns;
|
|
895
|
+
}
|
|
896
|
+
if (stderr?.columns) {
|
|
897
|
+
return stderr.columns;
|
|
898
|
+
}
|
|
899
|
+
if (env.COLUMNS) {
|
|
900
|
+
return Number.parseInt(env.COLUMNS, 10);
|
|
901
|
+
}
|
|
902
|
+
return 80;
|
|
903
|
+
};
|
|
904
|
+
var getObject = (detail) => typeof detail === "number" ? {
|
|
905
|
+
top: detail,
|
|
906
|
+
right: detail * 3,
|
|
907
|
+
bottom: detail,
|
|
908
|
+
left: detail * 3
|
|
909
|
+
} : {
|
|
910
|
+
top: 0,
|
|
911
|
+
right: 0,
|
|
912
|
+
bottom: 0,
|
|
913
|
+
left: 0,
|
|
914
|
+
...detail
|
|
915
|
+
};
|
|
916
|
+
var getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
|
|
917
|
+
var getBorderChars = (borderStyle) => {
|
|
918
|
+
const sides = [
|
|
919
|
+
"topLeft",
|
|
920
|
+
"topRight",
|
|
921
|
+
"bottomRight",
|
|
922
|
+
"bottomLeft",
|
|
923
|
+
"left",
|
|
924
|
+
"right",
|
|
925
|
+
"top",
|
|
926
|
+
"bottom"
|
|
927
|
+
];
|
|
928
|
+
let characters;
|
|
929
|
+
if (borderStyle === NONE) {
|
|
930
|
+
borderStyle = {};
|
|
931
|
+
for (const side of sides) {
|
|
932
|
+
borderStyle[side] = "";
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
if (typeof borderStyle === "string") {
|
|
936
|
+
characters = import_cli_boxes.default[borderStyle];
|
|
937
|
+
if (!characters) {
|
|
938
|
+
throw new TypeError(`Invalid border style: ${borderStyle}`);
|
|
939
|
+
}
|
|
940
|
+
} else {
|
|
941
|
+
if (typeof borderStyle?.vertical === "string") {
|
|
942
|
+
borderStyle.left = borderStyle.vertical;
|
|
943
|
+
borderStyle.right = borderStyle.vertical;
|
|
944
|
+
}
|
|
945
|
+
if (typeof borderStyle?.horizontal === "string") {
|
|
946
|
+
borderStyle.top = borderStyle.horizontal;
|
|
947
|
+
borderStyle.bottom = borderStyle.horizontal;
|
|
948
|
+
}
|
|
949
|
+
for (const side of sides) {
|
|
950
|
+
if (borderStyle[side] === null || typeof borderStyle[side] !== "string") {
|
|
951
|
+
throw new TypeError(`Invalid border style: ${side}`);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
characters = borderStyle;
|
|
955
|
+
}
|
|
956
|
+
return characters;
|
|
957
|
+
};
|
|
958
|
+
var makeTitle = (text, horizontal, alignment) => {
|
|
959
|
+
let title = "";
|
|
960
|
+
const textWidth = stringWidth(text);
|
|
961
|
+
switch (alignment) {
|
|
962
|
+
case "left": {
|
|
963
|
+
title = text + horizontal.slice(textWidth);
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
case "right": {
|
|
967
|
+
title = horizontal.slice(textWidth) + text;
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
default: {
|
|
971
|
+
horizontal = horizontal.slice(textWidth);
|
|
972
|
+
if (horizontal.length % 2 === 1) {
|
|
973
|
+
horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
|
|
974
|
+
title = horizontal.slice(1) + text + horizontal;
|
|
975
|
+
} else {
|
|
976
|
+
horizontal = horizontal.slice(horizontal.length / 2);
|
|
977
|
+
title = horizontal + text + horizontal;
|
|
978
|
+
}
|
|
979
|
+
break;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
return title;
|
|
983
|
+
};
|
|
984
|
+
var makeContentText = (text, { padding, width, textAlignment, height }) => {
|
|
985
|
+
text = (0, import_ansi_align.default)(text, { align: textAlignment });
|
|
986
|
+
let lines = text.split(NEWLINE);
|
|
987
|
+
const textWidth = widestLine(text);
|
|
988
|
+
const max = width - padding.left - padding.right;
|
|
989
|
+
if (textWidth > max) {
|
|
990
|
+
const newLines = [];
|
|
991
|
+
for (const line of lines) {
|
|
992
|
+
const createdLines = wrapAnsi(line, max, { hard: true });
|
|
993
|
+
const alignedLines = (0, import_ansi_align.default)(createdLines, { align: textAlignment });
|
|
994
|
+
const alignedLinesArray = alignedLines.split("\n");
|
|
995
|
+
const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
|
|
996
|
+
for (const alignedLine of alignedLinesArray) {
|
|
997
|
+
let paddedLine;
|
|
998
|
+
switch (textAlignment) {
|
|
999
|
+
case "center": {
|
|
1000
|
+
paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
case "right": {
|
|
1004
|
+
paddedLine = PAD.repeat(max - longestLength) + alignedLine;
|
|
1005
|
+
break;
|
|
1006
|
+
}
|
|
1007
|
+
default: {
|
|
1008
|
+
paddedLine = alignedLine;
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
newLines.push(paddedLine);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
lines = newLines;
|
|
1016
|
+
}
|
|
1017
|
+
if (textAlignment === "center" && textWidth < max) {
|
|
1018
|
+
lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
|
|
1019
|
+
} else if (textAlignment === "right" && textWidth < max) {
|
|
1020
|
+
lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
|
|
1021
|
+
}
|
|
1022
|
+
const paddingLeft = PAD.repeat(padding.left);
|
|
1023
|
+
const paddingRight = PAD.repeat(padding.right);
|
|
1024
|
+
lines = lines.map((line) => {
|
|
1025
|
+
const newLine = paddingLeft + line + paddingRight;
|
|
1026
|
+
return newLine + PAD.repeat(width - stringWidth(newLine));
|
|
1027
|
+
});
|
|
1028
|
+
if (padding.top > 0) {
|
|
1029
|
+
lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
|
|
1030
|
+
}
|
|
1031
|
+
if (padding.bottom > 0) {
|
|
1032
|
+
lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
|
|
1033
|
+
}
|
|
1034
|
+
if (height && lines.length > height) {
|
|
1035
|
+
lines = lines.slice(0, height);
|
|
1036
|
+
} else if (height && lines.length < height) {
|
|
1037
|
+
lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
|
|
1038
|
+
}
|
|
1039
|
+
return lines.join(NEWLINE);
|
|
1040
|
+
};
|
|
1041
|
+
var boxContent = (content, contentWidth, options) => {
|
|
1042
|
+
const colorizeBorder = (border) => {
|
|
1043
|
+
const newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;
|
|
1044
|
+
return options.dimBorder ? chalk.dim(newBorder) : newBorder;
|
|
1045
|
+
};
|
|
1046
|
+
const colorizeContent = (content2) => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content2) : content2;
|
|
1047
|
+
const chars = getBorderChars(options.borderStyle);
|
|
1048
|
+
const columns = terminalColumns();
|
|
1049
|
+
let marginLeft = PAD.repeat(options.margin.left);
|
|
1050
|
+
if (options.float === "center") {
|
|
1051
|
+
const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
|
|
1052
|
+
marginLeft = PAD.repeat(marginWidth);
|
|
1053
|
+
} else if (options.float === "right") {
|
|
1054
|
+
const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
|
|
1055
|
+
marginLeft = PAD.repeat(marginWidth);
|
|
1056
|
+
}
|
|
1057
|
+
let result = "";
|
|
1058
|
+
if (options.margin.top) {
|
|
1059
|
+
result += NEWLINE.repeat(options.margin.top);
|
|
1060
|
+
}
|
|
1061
|
+
if (options.borderStyle !== NONE || options.title) {
|
|
1062
|
+
result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
|
|
1063
|
+
}
|
|
1064
|
+
const lines = content.split(NEWLINE);
|
|
1065
|
+
result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
|
|
1066
|
+
if (options.borderStyle !== NONE) {
|
|
1067
|
+
result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
|
|
1068
|
+
}
|
|
1069
|
+
if (options.margin.bottom) {
|
|
1070
|
+
result += NEWLINE.repeat(options.margin.bottom);
|
|
1071
|
+
}
|
|
1072
|
+
return result;
|
|
1073
|
+
};
|
|
1074
|
+
var sanitizeOptions = (options) => {
|
|
1075
|
+
if (options.fullscreen && process2?.stdout) {
|
|
1076
|
+
let newDimensions = [process2.stdout.columns, process2.stdout.rows];
|
|
1077
|
+
if (typeof options.fullscreen === "function") {
|
|
1078
|
+
newDimensions = options.fullscreen(...newDimensions);
|
|
1079
|
+
}
|
|
1080
|
+
options.width || (options.width = newDimensions[0]);
|
|
1081
|
+
options.height || (options.height = newDimensions[1]);
|
|
1082
|
+
}
|
|
1083
|
+
options.width && (options.width = Math.max(1, options.width - getBorderWidth(options.borderStyle)));
|
|
1084
|
+
options.height && (options.height = Math.max(1, options.height - getBorderWidth(options.borderStyle)));
|
|
1085
|
+
return options;
|
|
1086
|
+
};
|
|
1087
|
+
var formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
|
|
1088
|
+
var determineDimensions = (text, options) => {
|
|
1089
|
+
options = sanitizeOptions(options);
|
|
1090
|
+
const widthOverride = options.width !== void 0;
|
|
1091
|
+
const columns = terminalColumns();
|
|
1092
|
+
const borderWidth = getBorderWidth(options.borderStyle);
|
|
1093
|
+
const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
|
|
1094
|
+
const widest = widestLine(wrapAnsi(text, columns - borderWidth, { hard: true, trim: false })) + options.padding.left + options.padding.right;
|
|
1095
|
+
if (options.title && widthOverride) {
|
|
1096
|
+
options.title = options.title.slice(0, Math.max(0, options.width - 2));
|
|
1097
|
+
options.title && (options.title = formatTitle(options.title, options.borderStyle));
|
|
1098
|
+
} else if (options.title) {
|
|
1099
|
+
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
|
|
1100
|
+
if (options.title) {
|
|
1101
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
1102
|
+
if (stringWidth(options.title) > widest) {
|
|
1103
|
+
options.width = stringWidth(options.title);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
options.width || (options.width = widest);
|
|
1108
|
+
if (!widthOverride) {
|
|
1109
|
+
if (options.margin.left && options.margin.right && options.width > maxWidth) {
|
|
1110
|
+
const spaceForMargins = columns - options.width - borderWidth;
|
|
1111
|
+
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
|
|
1112
|
+
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
|
|
1113
|
+
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
|
|
1114
|
+
}
|
|
1115
|
+
options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
|
|
1116
|
+
}
|
|
1117
|
+
if (options.width - (options.padding.left + options.padding.right) <= 0) {
|
|
1118
|
+
options.padding.left = 0;
|
|
1119
|
+
options.padding.right = 0;
|
|
1120
|
+
}
|
|
1121
|
+
if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
|
|
1122
|
+
options.padding.top = 0;
|
|
1123
|
+
options.padding.bottom = 0;
|
|
1124
|
+
}
|
|
1125
|
+
return options;
|
|
1126
|
+
};
|
|
1127
|
+
var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
|
|
1128
|
+
var isColorValid = (color) => typeof color === "string" && (chalk[color] ?? isHex(color));
|
|
1129
|
+
var getColorFunction = (color) => isHex(color) ? chalk.hex(color) : chalk[color];
|
|
1130
|
+
var getBGColorFunction = (color) => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(["bg", color])];
|
|
1131
|
+
function boxen(text, options) {
|
|
1132
|
+
options = {
|
|
1133
|
+
padding: 0,
|
|
1134
|
+
borderStyle: "single",
|
|
1135
|
+
dimBorder: false,
|
|
1136
|
+
textAlignment: "left",
|
|
1137
|
+
float: "left",
|
|
1138
|
+
titleAlignment: "left",
|
|
1139
|
+
...options
|
|
1140
|
+
};
|
|
1141
|
+
if (options.align) {
|
|
1142
|
+
options.textAlignment = options.align;
|
|
1143
|
+
}
|
|
1144
|
+
if (options.borderColor && !isColorValid(options.borderColor)) {
|
|
1145
|
+
throw new Error(`${options.borderColor} is not a valid borderColor`);
|
|
1146
|
+
}
|
|
1147
|
+
if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
|
|
1148
|
+
throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
|
|
1149
|
+
}
|
|
1150
|
+
options.padding = getObject(options.padding);
|
|
1151
|
+
options.margin = getObject(options.margin);
|
|
1152
|
+
options = determineDimensions(text, options);
|
|
1153
|
+
text = makeContentText(text, options);
|
|
1154
|
+
return boxContent(text, options.width, options);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// ../../shared/check-for-package-update.ts
|
|
1158
|
+
import fs from "fs";
|
|
9
1159
|
import path from "path";
|
|
1160
|
+
var getInstalledVersionOfPackage = (packageName) => {
|
|
1161
|
+
try {
|
|
1162
|
+
const PROJECT_DIR = process.env.PROJECT_DIR || process.cwd();
|
|
1163
|
+
const pkg = fs.readFileSync(path.join(PROJECT_DIR, "package.json"), "utf8");
|
|
1164
|
+
const json = JSON.parse(pkg);
|
|
1165
|
+
return json.dependencies[packageName];
|
|
1166
|
+
} catch (error) {
|
|
1167
|
+
return null;
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
async function checkForPackageUpdate(packageName) {
|
|
1171
|
+
const installedVersion = getInstalledVersionOfPackage(packageName);
|
|
1172
|
+
if (!installedVersion || installedVersion === "latest") return;
|
|
1173
|
+
const pkg = { name: packageName, version: installedVersion };
|
|
1174
|
+
const updateNotifierModule = await import("update-notifier");
|
|
1175
|
+
const notifier = updateNotifierModule.default({ pkg, updateCheckInterval: 0, shouldNotifyInNpmScript: true });
|
|
1176
|
+
const info = await notifier.fetchInfo();
|
|
1177
|
+
if (info?.type !== "latest") {
|
|
1178
|
+
const message = `Package ${packageName} update available ${info.current} \u2192 ${info.latest}
|
|
1179
|
+
Run npm i ${packageName} to update`;
|
|
1180
|
+
console.log(
|
|
1181
|
+
boxen(message, {
|
|
1182
|
+
padding: 1,
|
|
1183
|
+
margin: 1,
|
|
1184
|
+
align: "center",
|
|
1185
|
+
borderColor: "yellow",
|
|
1186
|
+
borderStyle: {
|
|
1187
|
+
topLeft: " ",
|
|
1188
|
+
topRight: " ",
|
|
1189
|
+
bottomLeft: " ",
|
|
1190
|
+
bottomRight: " ",
|
|
1191
|
+
right: " ",
|
|
1192
|
+
top: "-",
|
|
1193
|
+
bottom: "-",
|
|
1194
|
+
left: " "
|
|
1195
|
+
}
|
|
1196
|
+
})
|
|
1197
|
+
);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
// src/index.ts
|
|
10
1202
|
import { AvroSchemaParser } from "@asyncapi/avro-schema-parser";
|
|
11
1203
|
|
|
12
1204
|
// src/utils/schemas.ts
|
|
@@ -147,69 +1339,13 @@ var defaultMarkdown4 = (_document, channel) => {
|
|
|
147
1339
|
};
|
|
148
1340
|
|
|
149
1341
|
// src/checkLicense.ts
|
|
150
|
-
import
|
|
151
|
-
|
|
152
|
-
// package.json
|
|
153
|
-
var package_default = {
|
|
154
|
-
name: "@eventcatalog/generator-asyncapi",
|
|
155
|
-
version: "3.0.1",
|
|
156
|
-
description: "AsyncAPI generator for EventCatalog",
|
|
157
|
-
scripts: {
|
|
158
|
-
build: "tsup",
|
|
159
|
-
test: "vitest",
|
|
160
|
-
format: "prettier --write .",
|
|
161
|
-
"format:diff": "prettier --list-different .",
|
|
162
|
-
changeset: "changeset",
|
|
163
|
-
release: "changeset publish"
|
|
164
|
-
},
|
|
165
|
-
publishConfig: {
|
|
166
|
-
access: "public"
|
|
167
|
-
},
|
|
168
|
-
keywords: [],
|
|
169
|
-
author: "",
|
|
170
|
-
license: "ISC",
|
|
171
|
-
devDependencies: {
|
|
172
|
-
"@changesets/cli": "^2.27.9",
|
|
173
|
-
"@types/fs-extra": "^11.0.4",
|
|
174
|
-
"@types/js-yaml": "^4.0.9",
|
|
175
|
-
"@types/lodash": "^4.17.7",
|
|
176
|
-
"@types/minimist": "^1.2.5",
|
|
177
|
-
"@types/node": "^20.16.1",
|
|
178
|
-
prettier: "^3.3.3",
|
|
179
|
-
tsup: "^8.1.0",
|
|
180
|
-
typescript: "^5.5.3",
|
|
181
|
-
vitest: "^2.0.2"
|
|
182
|
-
},
|
|
183
|
-
files: [
|
|
184
|
-
"dist",
|
|
185
|
-
"package.json"
|
|
186
|
-
],
|
|
187
|
-
main: "./dist/index.js",
|
|
188
|
-
module: "./dist/index.mjs",
|
|
189
|
-
types: "./dist/index.d.ts",
|
|
190
|
-
dependencies: {
|
|
191
|
-
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
192
|
-
"@asyncapi/parser": "^3.3.0",
|
|
193
|
-
"@eventcatalog/sdk": "^1.4.8",
|
|
194
|
-
chalk: "^4",
|
|
195
|
-
"fs-extra": "^11.2.0",
|
|
196
|
-
glob: "^11.0.0",
|
|
197
|
-
"gray-matter": "^4.0.3",
|
|
198
|
-
"js-yaml": "^4.1.0",
|
|
199
|
-
lodash: "^4.17.21",
|
|
200
|
-
minimist: "^1.2.8",
|
|
201
|
-
slugify: "^1.6.6",
|
|
202
|
-
zod: "^3.23.8"
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
// src/checkLicense.ts
|
|
1342
|
+
import chalk2 from "chalk";
|
|
207
1343
|
var checkLicense_default = async (licenseKey) => {
|
|
208
1344
|
const LICENSE_KEY = process.env.EVENTCATALOG_LICENSE_KEY_ASYNCAPI || licenseKey || null;
|
|
209
1345
|
if (!LICENSE_KEY) {
|
|
210
|
-
console.log(
|
|
1346
|
+
console.log(chalk2.bgRed(`
|
|
211
1347
|
This plugin requires a license key to use`));
|
|
212
|
-
console.log(
|
|
1348
|
+
console.log(chalk2.redBright(`
|
|
213
1349
|
Visit https://eventcatalog.cloud/ to get a 14 day trial or purchase a license`));
|
|
214
1350
|
process.exit(1);
|
|
215
1351
|
}
|
|
@@ -221,21 +1357,21 @@ Visit https://eventcatalog.cloud/ to get a 14 day trial or purchase a license`))
|
|
|
221
1357
|
}
|
|
222
1358
|
});
|
|
223
1359
|
if (response.status !== 200) {
|
|
224
|
-
console.log(
|
|
1360
|
+
console.log(chalk2.bgRed(`
|
|
225
1361
|
Invalid license key`));
|
|
226
|
-
console.log(
|
|
1362
|
+
console.log(chalk2.redBright("Please check your plugin license key or purchase a license at https://eventcatalog.cloud/"));
|
|
227
1363
|
process.exit(1);
|
|
228
1364
|
}
|
|
229
1365
|
if (response.status === 200) {
|
|
230
1366
|
const data = await response.json();
|
|
231
1367
|
if (package_default.name !== data.plugin) {
|
|
232
|
-
console.log(
|
|
1368
|
+
console.log(chalk2.bgRed(`
|
|
233
1369
|
Invalid license key for this plugin`));
|
|
234
|
-
console.log(
|
|
1370
|
+
console.log(chalk2.redBright("Please check your plugin license key or purchase a license at https://eventcatalog.cloud/"));
|
|
235
1371
|
process.exit(1);
|
|
236
1372
|
}
|
|
237
1373
|
if (data.is_trial) {
|
|
238
|
-
console.log(
|
|
1374
|
+
console.log(chalk2.bgBlue(`
|
|
239
1375
|
You are using a trial license for this plugin`));
|
|
240
1376
|
}
|
|
241
1377
|
}
|
|
@@ -285,6 +1421,7 @@ var index_default = async (config, options) => {
|
|
|
285
1421
|
throw new Error("Please provide catalog url (env variable PROJECT_DIR)");
|
|
286
1422
|
}
|
|
287
1423
|
await checkLicense_default(options.licenseKey);
|
|
1424
|
+
await checkForPackageUpdate(package_default.name);
|
|
288
1425
|
const {
|
|
289
1426
|
writeService,
|
|
290
1427
|
writeEvent,
|
|
@@ -336,20 +1473,20 @@ var index_default = async (config, options) => {
|
|
|
336
1473
|
};
|
|
337
1474
|
validateOptions(options);
|
|
338
1475
|
const { services, saveParsedSpecFile = false, parseSchemas = true, parseChannels = false } = options;
|
|
339
|
-
console.log(
|
|
1476
|
+
console.log(chalk3.green(`Processing ${services.length} AsyncAPI files...`));
|
|
340
1477
|
for (const service of services) {
|
|
341
|
-
console.log(
|
|
1478
|
+
console.log(chalk3.gray(`Processing ${service.path}`));
|
|
342
1479
|
const { document, diagnostics } = service.path.startsWith("http") ? await fromURL(parser, service.path).parse({
|
|
343
1480
|
parseSchemas
|
|
344
1481
|
}) : await fromFile(parser, service.path).parse({
|
|
345
1482
|
parseSchemas
|
|
346
1483
|
});
|
|
347
1484
|
if (!document) {
|
|
348
|
-
console.log(
|
|
1485
|
+
console.log(chalk3.red("Failed to parse AsyncAPI file"));
|
|
349
1486
|
if (options.debug || cliArgs.debug) {
|
|
350
1487
|
console.log(diagnostics);
|
|
351
1488
|
} else {
|
|
352
|
-
console.log(
|
|
1489
|
+
console.log(chalk3.red("Run with debug option in the generator to see diagnostics"));
|
|
353
1490
|
}
|
|
354
1491
|
continue;
|
|
355
1492
|
}
|
|
@@ -366,7 +1503,7 @@ var index_default = async (config, options) => {
|
|
|
366
1503
|
let serviceSpecifications = {};
|
|
367
1504
|
let serviceSpecificationsFiles = [];
|
|
368
1505
|
let serviceMarkdown = defaultMarkdown2(document);
|
|
369
|
-
let servicePath = options.domain ?
|
|
1506
|
+
let servicePath = options.domain ? path2.join("../", "domains", options.domain.id, "services", service.id) : path2.join("../", "services", service.id);
|
|
370
1507
|
if (options.writeFilesToRoot) {
|
|
371
1508
|
servicePath = service.id;
|
|
372
1509
|
}
|
|
@@ -374,11 +1511,11 @@ var index_default = async (config, options) => {
|
|
|
374
1511
|
const { id: domainId, name: domainName, version: domainVersion, owners: domainOwners } = options.domain;
|
|
375
1512
|
const domain = await getDomain(options.domain.id, domainVersion || "latest");
|
|
376
1513
|
const currentDomain = await getDomain(options.domain.id, "latest");
|
|
377
|
-
console.log(
|
|
1514
|
+
console.log(chalk3.blue(`
|
|
378
1515
|
Processing domain: ${domainName} (v${domainVersion})`));
|
|
379
1516
|
if (currentDomain && currentDomain.version !== domainVersion) {
|
|
380
1517
|
await versionDomain(domainId);
|
|
381
|
-
console.log(
|
|
1518
|
+
console.log(chalk3.cyan(` - Versioned previous domain (v${currentDomain.version})`));
|
|
382
1519
|
}
|
|
383
1520
|
if (!domain || domain && domain.version !== domainVersion) {
|
|
384
1521
|
await writeDomain({
|
|
@@ -389,10 +1526,10 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
389
1526
|
...domainOwners && { owners: domainOwners }
|
|
390
1527
|
// services: [{ id: serviceId, version: version }],
|
|
391
1528
|
});
|
|
392
|
-
console.log(
|
|
1529
|
+
console.log(chalk3.cyan(` - Domain (v${domainVersion}) created`));
|
|
393
1530
|
}
|
|
394
1531
|
if (currentDomain && currentDomain.version === domainVersion) {
|
|
395
|
-
console.log(
|
|
1532
|
+
console.log(chalk3.yellow(` - Domain (v${domainVersion}) already exists, skipped creation...`));
|
|
396
1533
|
}
|
|
397
1534
|
await addServiceToDomain(domainId, { id: serviceId, version }, domainVersion);
|
|
398
1535
|
}
|
|
@@ -404,7 +1541,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
404
1541
|
const protocols = getChannelProtocols(channel);
|
|
405
1542
|
const channelVersion = channel.extensions().get("x-eventcatalog-channel-version")?.value() || version;
|
|
406
1543
|
let channelMarkdown = defaultMarkdown4(document, channel);
|
|
407
|
-
console.log(
|
|
1544
|
+
console.log(chalk3.blue(`Processing channel: ${channelId} (v${channelVersion})`));
|
|
408
1545
|
const paramsForCatalog = Object.keys(params).reduce(
|
|
409
1546
|
(acc, key) => {
|
|
410
1547
|
const param = params[key];
|
|
@@ -422,7 +1559,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
422
1559
|
channelMarkdown = catalogedChannel.markdown;
|
|
423
1560
|
if (catalogedChannel.version !== channelVersion) {
|
|
424
1561
|
await versionChannel(channelId);
|
|
425
|
-
console.log(
|
|
1562
|
+
console.log(chalk3.cyan(` - Versioned previous channel: ${channelId} (v${channelVersion})`));
|
|
426
1563
|
}
|
|
427
1564
|
}
|
|
428
1565
|
await writeChannel(
|
|
@@ -438,7 +1575,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
438
1575
|
},
|
|
439
1576
|
{ override: true }
|
|
440
1577
|
);
|
|
441
|
-
console.log(
|
|
1578
|
+
console.log(chalk3.cyan(` - Message ${channelId} (v${version}) created`));
|
|
442
1579
|
}
|
|
443
1580
|
}
|
|
444
1581
|
for (const operation of operations) {
|
|
@@ -461,7 +1598,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
461
1598
|
} = MESSAGE_OPERATIONS[eventType];
|
|
462
1599
|
let messageMarkdown = defaultMarkdown(document, message);
|
|
463
1600
|
const badges = message.tags().all() || [];
|
|
464
|
-
console.log(
|
|
1601
|
+
console.log(chalk3.blue(`Processing message: ${getMessageName(message)} (v${messageVersion})`));
|
|
465
1602
|
let messagePath = join(servicePath, folder, message.id());
|
|
466
1603
|
if (options.writeFilesToRoot) {
|
|
467
1604
|
messagePath = message.id();
|
|
@@ -472,7 +1609,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
472
1609
|
messageMarkdown = catalogedMessage.markdown;
|
|
473
1610
|
if (catalogedMessage.version !== messageVersion) {
|
|
474
1611
|
await versionMessage(messageId);
|
|
475
|
-
console.log(
|
|
1612
|
+
console.log(chalk3.cyan(` - Versioned previous message: (v${catalogedMessage.version})`));
|
|
476
1613
|
}
|
|
477
1614
|
}
|
|
478
1615
|
const channelsForMessage = parseChannels ? getChannelsForMessage(message, channels, document) : [];
|
|
@@ -493,7 +1630,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
493
1630
|
path: messagePath
|
|
494
1631
|
}
|
|
495
1632
|
);
|
|
496
|
-
console.log(
|
|
1633
|
+
console.log(chalk3.cyan(` - Message (v${messageVersion}) created`));
|
|
497
1634
|
if (messageHasSchema(message)) {
|
|
498
1635
|
const schema = message.payload()?.extensions()?.get("x-parser-original-payload")?.json() || message.payload()?.json();
|
|
499
1636
|
await addSchemaToMessage(
|
|
@@ -504,24 +1641,24 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
504
1641
|
},
|
|
505
1642
|
messageVersion
|
|
506
1643
|
);
|
|
507
|
-
console.log(
|
|
1644
|
+
console.log(chalk3.cyan(` - Schema added to message (v${messageVersion})`));
|
|
508
1645
|
}
|
|
509
1646
|
} else {
|
|
510
|
-
console.log(
|
|
1647
|
+
console.log(chalk3.yellow(` - Skipping external message: ${getMessageName(message)}(v${messageVersion})`));
|
|
511
1648
|
}
|
|
512
1649
|
if (isSent) sends.push({ id: messageId, version: messageVersion });
|
|
513
1650
|
if (isReceived) receives.push({ id: messageId, version: messageVersion });
|
|
514
1651
|
}
|
|
515
1652
|
}
|
|
516
1653
|
const latestServiceInCatalog = await getService(serviceId, "latest");
|
|
517
|
-
console.log(
|
|
1654
|
+
console.log(chalk3.blue(`Processing service: ${serviceId} (v${version})`));
|
|
518
1655
|
if (latestServiceInCatalog) {
|
|
519
1656
|
serviceMarkdown = latestServiceInCatalog.markdown;
|
|
520
1657
|
owners = latestServiceInCatalog.owners || owners;
|
|
521
1658
|
repository = latestServiceInCatalog.repository || null;
|
|
522
1659
|
if (latestServiceInCatalog.version !== version) {
|
|
523
1660
|
await versionService(serviceId);
|
|
524
|
-
console.log(
|
|
1661
|
+
console.log(chalk3.cyan(` - Versioned previous service (v${latestServiceInCatalog.version})`));
|
|
525
1662
|
}
|
|
526
1663
|
if (latestServiceInCatalog.version === version) {
|
|
527
1664
|
serviceMarkdown = latestServiceInCatalog.markdown;
|
|
@@ -531,7 +1668,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
531
1668
|
serviceSpecificationsFiles = await getSpecificationFilesForService(serviceId, version);
|
|
532
1669
|
}
|
|
533
1670
|
}
|
|
534
|
-
const fileName =
|
|
1671
|
+
const fileName = path2.basename(service.path);
|
|
535
1672
|
await writeService(
|
|
536
1673
|
{
|
|
537
1674
|
id: serviceId,
|
|
@@ -560,7 +1697,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
560
1697
|
...serviceSpecificationsFiles,
|
|
561
1698
|
{
|
|
562
1699
|
content: saveParsedSpecFile ? getParsedSpecFile(service, document) : await getRawSpecFile(service),
|
|
563
|
-
fileName:
|
|
1700
|
+
fileName: path2.basename(service.path) || "asyncapi.yml"
|
|
564
1701
|
}
|
|
565
1702
|
];
|
|
566
1703
|
for (const specFile of specFiles) {
|
|
@@ -573,8 +1710,8 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
573
1710
|
version
|
|
574
1711
|
);
|
|
575
1712
|
}
|
|
576
|
-
console.log(
|
|
577
|
-
console.log(
|
|
1713
|
+
console.log(chalk3.cyan(` - Service (v${version}) created`));
|
|
1714
|
+
console.log(chalk3.green(`
|
|
578
1715
|
Finished generating event catalog for AsyncAPI ${serviceId} (v${version})`));
|
|
579
1716
|
}
|
|
580
1717
|
};
|
|
@@ -588,7 +1725,7 @@ var getRawSpecFile = async (service) => {
|
|
|
588
1725
|
const response = await fetch(service.path);
|
|
589
1726
|
return response.text();
|
|
590
1727
|
} catch (error) {
|
|
591
|
-
console.log(
|
|
1728
|
+
console.log(chalk3.red(`
|
|
592
1729
|
Failed to request AsyncAPI file from ${service.path}`));
|
|
593
1730
|
return "";
|
|
594
1731
|
}
|