@settlemint/sdk-cli 1.0.8-pr16540c42 → 1.0.8-pr1bec8f0c
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/cli.js +246 -928
- package/dist/cli.js.map +14 -28
- package/package.json +5 -4
package/dist/cli.js
CHANGED
|
@@ -29,811 +29,6 @@ var __export = (target, all) => {
|
|
|
29
29
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
30
30
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
31
|
|
|
32
|
-
// ../../node_modules/console-table-printer/dist/src/utils/colored-console-line.js
|
|
33
|
-
var require_colored_console_line = __commonJS((exports) => {
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.DEFAULT_COLOR_MAP = undefined;
|
|
36
|
-
exports.DEFAULT_COLOR_MAP = {
|
|
37
|
-
red: "\x1B[31m",
|
|
38
|
-
green: "\x1B[32m",
|
|
39
|
-
yellow: "\x1B[33m",
|
|
40
|
-
blue: "\x1B[34m",
|
|
41
|
-
magenta: "\x1B[35m",
|
|
42
|
-
cyan: "\x1B[36m",
|
|
43
|
-
white: "\x1B[37m",
|
|
44
|
-
white_bold: "\x1B[01m",
|
|
45
|
-
reset: "\x1B[0m"
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
class ColoredConsoleLine {
|
|
49
|
-
constructor(colorMap = exports.DEFAULT_COLOR_MAP) {
|
|
50
|
-
this.text = "";
|
|
51
|
-
this.colorMap = colorMap;
|
|
52
|
-
}
|
|
53
|
-
addCharsWithColor(color, text) {
|
|
54
|
-
const colorAnsi = this.colorMap[color];
|
|
55
|
-
this.text += colorAnsi !== undefined ? `${colorAnsi}${text}${this.colorMap.reset}` : text;
|
|
56
|
-
}
|
|
57
|
-
renderConsole() {
|
|
58
|
-
return this.text;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.default = ColoredConsoleLine;
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// ../../node_modules/console-table-printer/dist/src/utils/table-constants.js
|
|
65
|
-
var require_table_constants = __commonJS((exports) => {
|
|
66
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.DEFAULT_HEADER_ALIGNMENT = exports.DEFAULT_ROW_ALIGNMENT = exports.DEFAULT_HEADER_FONT_COLOR = exports.DEFAULT_ROW_FONT_COLOR = exports.COLORS = exports.ALIGNMENTS = exports.DEFAULT_TABLE_STYLE = exports.DEFAULT_ROW_SEPARATOR = exports.DEFAULT_COLUMN_LEN = undefined;
|
|
68
|
-
exports.DEFAULT_COLUMN_LEN = 20;
|
|
69
|
-
exports.DEFAULT_ROW_SEPARATOR = false;
|
|
70
|
-
exports.DEFAULT_TABLE_STYLE = {
|
|
71
|
-
headerTop: {
|
|
72
|
-
left: "┌",
|
|
73
|
-
mid: "┬",
|
|
74
|
-
right: "┐",
|
|
75
|
-
other: "─"
|
|
76
|
-
},
|
|
77
|
-
headerBottom: {
|
|
78
|
-
left: "├",
|
|
79
|
-
mid: "┼",
|
|
80
|
-
right: "┤",
|
|
81
|
-
other: "─"
|
|
82
|
-
},
|
|
83
|
-
tableBottom: {
|
|
84
|
-
left: "└",
|
|
85
|
-
mid: "┴",
|
|
86
|
-
right: "┘",
|
|
87
|
-
other: "─"
|
|
88
|
-
},
|
|
89
|
-
vertical: "│",
|
|
90
|
-
rowSeparator: {
|
|
91
|
-
left: "├",
|
|
92
|
-
mid: "┼",
|
|
93
|
-
right: "┤",
|
|
94
|
-
other: "─"
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
exports.ALIGNMENTS = ["right", "left", "center"];
|
|
98
|
-
exports.COLORS = [
|
|
99
|
-
"red",
|
|
100
|
-
"green",
|
|
101
|
-
"yellow",
|
|
102
|
-
"white",
|
|
103
|
-
"blue",
|
|
104
|
-
"magenta",
|
|
105
|
-
"cyan",
|
|
106
|
-
"white_bold",
|
|
107
|
-
"reset"
|
|
108
|
-
];
|
|
109
|
-
exports.DEFAULT_ROW_FONT_COLOR = "white";
|
|
110
|
-
exports.DEFAULT_HEADER_FONT_COLOR = "white_bold";
|
|
111
|
-
exports.DEFAULT_ROW_ALIGNMENT = "right";
|
|
112
|
-
exports.DEFAULT_HEADER_ALIGNMENT = "center";
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// ../../node_modules/console-table-printer/dist/src/internalTable/input-converter.js
|
|
116
|
-
var require_input_converter = __commonJS((exports) => {
|
|
117
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
118
|
-
exports.rawColumnToInternalColumn = exports.objIfExists = undefined;
|
|
119
|
-
var table_constants_1 = require_table_constants();
|
|
120
|
-
var objIfExists = (key, val) => {
|
|
121
|
-
if (!val) {
|
|
122
|
-
return {};
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
[key]: val
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
exports.objIfExists = objIfExists;
|
|
129
|
-
var rawColumnToInternalColumn = (column) => {
|
|
130
|
-
var _a;
|
|
131
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ name: column.name, title: (_a = column.title) !== null && _a !== undefined ? _a : column.name }, (0, exports.objIfExists)("color", column.color)), (0, exports.objIfExists)("maxLen", column.maxLen)), (0, exports.objIfExists)("minLen", column.minLen)), { alignment: column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT });
|
|
132
|
-
};
|
|
133
|
-
exports.rawColumnToInternalColumn = rawColumnToInternalColumn;
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// ../../node_modules/simple-wcswidth/dist/src/non-spacing-chars.js
|
|
137
|
-
var require_non_spacing_chars = __commonJS((exports) => {
|
|
138
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
139
|
-
var combining = [
|
|
140
|
-
{ first: 768, last: 879 },
|
|
141
|
-
{ first: 1155, last: 1158 },
|
|
142
|
-
{ first: 1160, last: 1161 },
|
|
143
|
-
{ first: 1425, last: 1469 },
|
|
144
|
-
{ first: 1471, last: 1471 },
|
|
145
|
-
{ first: 1473, last: 1474 },
|
|
146
|
-
{ first: 1476, last: 1477 },
|
|
147
|
-
{ first: 1479, last: 1479 },
|
|
148
|
-
{ first: 1536, last: 1539 },
|
|
149
|
-
{ first: 1552, last: 1557 },
|
|
150
|
-
{ first: 1611, last: 1630 },
|
|
151
|
-
{ first: 1648, last: 1648 },
|
|
152
|
-
{ first: 1750, last: 1764 },
|
|
153
|
-
{ first: 1767, last: 1768 },
|
|
154
|
-
{ first: 1770, last: 1773 },
|
|
155
|
-
{ first: 1807, last: 1807 },
|
|
156
|
-
{ first: 1809, last: 1809 },
|
|
157
|
-
{ first: 1840, last: 1866 },
|
|
158
|
-
{ first: 1958, last: 1968 },
|
|
159
|
-
{ first: 2027, last: 2035 },
|
|
160
|
-
{ first: 2305, last: 2306 },
|
|
161
|
-
{ first: 2364, last: 2364 },
|
|
162
|
-
{ first: 2369, last: 2376 },
|
|
163
|
-
{ first: 2381, last: 2381 },
|
|
164
|
-
{ first: 2385, last: 2388 },
|
|
165
|
-
{ first: 2402, last: 2403 },
|
|
166
|
-
{ first: 2433, last: 2433 },
|
|
167
|
-
{ first: 2492, last: 2492 },
|
|
168
|
-
{ first: 2497, last: 2500 },
|
|
169
|
-
{ first: 2509, last: 2509 },
|
|
170
|
-
{ first: 2530, last: 2531 },
|
|
171
|
-
{ first: 2561, last: 2562 },
|
|
172
|
-
{ first: 2620, last: 2620 },
|
|
173
|
-
{ first: 2625, last: 2626 },
|
|
174
|
-
{ first: 2631, last: 2632 },
|
|
175
|
-
{ first: 2635, last: 2637 },
|
|
176
|
-
{ first: 2672, last: 2673 },
|
|
177
|
-
{ first: 2689, last: 2690 },
|
|
178
|
-
{ first: 2748, last: 2748 },
|
|
179
|
-
{ first: 2753, last: 2757 },
|
|
180
|
-
{ first: 2759, last: 2760 },
|
|
181
|
-
{ first: 2765, last: 2765 },
|
|
182
|
-
{ first: 2786, last: 2787 },
|
|
183
|
-
{ first: 2817, last: 2817 },
|
|
184
|
-
{ first: 2876, last: 2876 },
|
|
185
|
-
{ first: 2879, last: 2879 },
|
|
186
|
-
{ first: 2881, last: 2883 },
|
|
187
|
-
{ first: 2893, last: 2893 },
|
|
188
|
-
{ first: 2902, last: 2902 },
|
|
189
|
-
{ first: 2946, last: 2946 },
|
|
190
|
-
{ first: 3008, last: 3008 },
|
|
191
|
-
{ first: 3021, last: 3021 },
|
|
192
|
-
{ first: 3134, last: 3136 },
|
|
193
|
-
{ first: 3142, last: 3144 },
|
|
194
|
-
{ first: 3146, last: 3149 },
|
|
195
|
-
{ first: 3157, last: 3158 },
|
|
196
|
-
{ first: 3260, last: 3260 },
|
|
197
|
-
{ first: 3263, last: 3263 },
|
|
198
|
-
{ first: 3270, last: 3270 },
|
|
199
|
-
{ first: 3276, last: 3277 },
|
|
200
|
-
{ first: 3298, last: 3299 },
|
|
201
|
-
{ first: 3393, last: 3395 },
|
|
202
|
-
{ first: 3405, last: 3405 },
|
|
203
|
-
{ first: 3530, last: 3530 },
|
|
204
|
-
{ first: 3538, last: 3540 },
|
|
205
|
-
{ first: 3542, last: 3542 },
|
|
206
|
-
{ first: 3633, last: 3633 },
|
|
207
|
-
{ first: 3636, last: 3642 },
|
|
208
|
-
{ first: 3655, last: 3662 },
|
|
209
|
-
{ first: 3761, last: 3761 },
|
|
210
|
-
{ first: 3764, last: 3769 },
|
|
211
|
-
{ first: 3771, last: 3772 },
|
|
212
|
-
{ first: 3784, last: 3789 },
|
|
213
|
-
{ first: 3864, last: 3865 },
|
|
214
|
-
{ first: 3893, last: 3893 },
|
|
215
|
-
{ first: 3895, last: 3895 },
|
|
216
|
-
{ first: 3897, last: 3897 },
|
|
217
|
-
{ first: 3953, last: 3966 },
|
|
218
|
-
{ first: 3968, last: 3972 },
|
|
219
|
-
{ first: 3974, last: 3975 },
|
|
220
|
-
{ first: 3984, last: 3991 },
|
|
221
|
-
{ first: 3993, last: 4028 },
|
|
222
|
-
{ first: 4038, last: 4038 },
|
|
223
|
-
{ first: 4141, last: 4144 },
|
|
224
|
-
{ first: 4146, last: 4146 },
|
|
225
|
-
{ first: 4150, last: 4151 },
|
|
226
|
-
{ first: 4153, last: 4153 },
|
|
227
|
-
{ first: 4184, last: 4185 },
|
|
228
|
-
{ first: 4448, last: 4607 },
|
|
229
|
-
{ first: 4959, last: 4959 },
|
|
230
|
-
{ first: 5906, last: 5908 },
|
|
231
|
-
{ first: 5938, last: 5940 },
|
|
232
|
-
{ first: 5970, last: 5971 },
|
|
233
|
-
{ first: 6002, last: 6003 },
|
|
234
|
-
{ first: 6068, last: 6069 },
|
|
235
|
-
{ first: 6071, last: 6077 },
|
|
236
|
-
{ first: 6086, last: 6086 },
|
|
237
|
-
{ first: 6089, last: 6099 },
|
|
238
|
-
{ first: 6109, last: 6109 },
|
|
239
|
-
{ first: 6155, last: 6157 },
|
|
240
|
-
{ first: 6313, last: 6313 },
|
|
241
|
-
{ first: 6432, last: 6434 },
|
|
242
|
-
{ first: 6439, last: 6440 },
|
|
243
|
-
{ first: 6450, last: 6450 },
|
|
244
|
-
{ first: 6457, last: 6459 },
|
|
245
|
-
{ first: 6679, last: 6680 },
|
|
246
|
-
{ first: 6912, last: 6915 },
|
|
247
|
-
{ first: 6964, last: 6964 },
|
|
248
|
-
{ first: 6966, last: 6970 },
|
|
249
|
-
{ first: 6972, last: 6972 },
|
|
250
|
-
{ first: 6978, last: 6978 },
|
|
251
|
-
{ first: 7019, last: 7027 },
|
|
252
|
-
{ first: 7616, last: 7626 },
|
|
253
|
-
{ first: 7678, last: 7679 },
|
|
254
|
-
{ first: 8203, last: 8207 },
|
|
255
|
-
{ first: 8234, last: 8238 },
|
|
256
|
-
{ first: 8288, last: 8291 },
|
|
257
|
-
{ first: 8298, last: 8303 },
|
|
258
|
-
{ first: 8400, last: 8431 },
|
|
259
|
-
{ first: 12330, last: 12335 },
|
|
260
|
-
{ first: 12441, last: 12442 },
|
|
261
|
-
{ first: 43014, last: 43014 },
|
|
262
|
-
{ first: 43019, last: 43019 },
|
|
263
|
-
{ first: 43045, last: 43046 },
|
|
264
|
-
{ first: 64286, last: 64286 },
|
|
265
|
-
{ first: 65024, last: 65039 },
|
|
266
|
-
{ first: 65056, last: 65059 },
|
|
267
|
-
{ first: 65279, last: 65279 },
|
|
268
|
-
{ first: 65529, last: 65531 },
|
|
269
|
-
{ first: 68097, last: 68099 },
|
|
270
|
-
{ first: 68101, last: 68102 },
|
|
271
|
-
{ first: 68108, last: 68111 },
|
|
272
|
-
{ first: 68152, last: 68154 },
|
|
273
|
-
{ first: 68159, last: 68159 },
|
|
274
|
-
{ first: 119143, last: 119145 },
|
|
275
|
-
{ first: 119155, last: 119170 },
|
|
276
|
-
{ first: 119173, last: 119179 },
|
|
277
|
-
{ first: 119210, last: 119213 },
|
|
278
|
-
{ first: 119362, last: 119364 },
|
|
279
|
-
{ first: 917505, last: 917505 },
|
|
280
|
-
{ first: 917536, last: 917631 },
|
|
281
|
-
{ first: 917760, last: 917999 }
|
|
282
|
-
];
|
|
283
|
-
exports.default = combining;
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
// ../../node_modules/simple-wcswidth/dist/src/binary-search.js
|
|
287
|
-
var require_binary_search = __commonJS((exports) => {
|
|
288
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
289
|
-
var bisearch = (ucs, table, tableSize) => {
|
|
290
|
-
let min = 0;
|
|
291
|
-
let mid;
|
|
292
|
-
let max = tableSize;
|
|
293
|
-
if (ucs < table[0].first || ucs > table[max].last)
|
|
294
|
-
return 0;
|
|
295
|
-
while (max >= min) {
|
|
296
|
-
mid = Math.floor((min + max) / 2);
|
|
297
|
-
if (ucs > table[mid].last) {
|
|
298
|
-
min = mid + 1;
|
|
299
|
-
} else if (ucs < table[mid].first) {
|
|
300
|
-
max = mid - 1;
|
|
301
|
-
} else {
|
|
302
|
-
return 1;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return 0;
|
|
306
|
-
};
|
|
307
|
-
exports.default = bisearch;
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
// ../../node_modules/simple-wcswidth/dist/src/wcwidth.js
|
|
311
|
-
var require_wcwidth = __commonJS((exports) => {
|
|
312
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
313
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
314
|
-
};
|
|
315
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
316
|
-
var non_spacing_chars_1 = __importDefault(require_non_spacing_chars());
|
|
317
|
-
var binary_search_1 = __importDefault(require_binary_search());
|
|
318
|
-
var mk_wcwidth = (ucs) => {
|
|
319
|
-
if (ucs === 0) {
|
|
320
|
-
return 0;
|
|
321
|
-
}
|
|
322
|
-
if (ucs < 32 || ucs >= 127 && ucs < 160) {
|
|
323
|
-
return -1;
|
|
324
|
-
}
|
|
325
|
-
if (binary_search_1.default(ucs, non_spacing_chars_1.default, non_spacing_chars_1.default.length - 1)) {
|
|
326
|
-
return 0;
|
|
327
|
-
}
|
|
328
|
-
return 1 + Number(ucs >= 4352 && (ucs <= 4447 || ucs === 9001 || ucs === 9002 || ucs >= 11904 && ucs <= 42191 && ucs !== 12351 || ucs >= 44032 && ucs <= 55203 || ucs >= 63744 && ucs <= 64255 || ucs >= 65040 && ucs <= 65049 || ucs >= 65072 && ucs <= 65135 || ucs >= 65280 && ucs <= 65376 || ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
|
|
329
|
-
};
|
|
330
|
-
exports.default = mk_wcwidth;
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
// ../../node_modules/simple-wcswidth/dist/src/wcswidth.js
|
|
334
|
-
var require_wcswidth = __commonJS((exports) => {
|
|
335
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
336
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
337
|
-
};
|
|
338
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
339
|
-
var wcwidth_1 = __importDefault(require_wcwidth());
|
|
340
|
-
var mk_wcswidth = (pwcs) => {
|
|
341
|
-
let width = 0;
|
|
342
|
-
for (let i = 0;i < pwcs.length; i++) {
|
|
343
|
-
const charCode = pwcs.charCodeAt(i);
|
|
344
|
-
const w = wcwidth_1.default(charCode);
|
|
345
|
-
if (w < 0) {
|
|
346
|
-
return -1;
|
|
347
|
-
}
|
|
348
|
-
width += w;
|
|
349
|
-
}
|
|
350
|
-
return width;
|
|
351
|
-
};
|
|
352
|
-
exports.default = mk_wcswidth;
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
// ../../node_modules/simple-wcswidth/dist/index.js
|
|
356
|
-
var require_dist = __commonJS((exports) => {
|
|
357
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
358
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
359
|
-
};
|
|
360
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
361
|
-
exports.wcswidth = exports.wcwidth = undefined;
|
|
362
|
-
var wcswidth_1 = __importDefault(require_wcswidth());
|
|
363
|
-
exports.wcswidth = wcswidth_1.default;
|
|
364
|
-
var wcwidth_1 = __importDefault(require_wcwidth());
|
|
365
|
-
exports.wcwidth = wcwidth_1.default;
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
// ../../node_modules/console-table-printer/dist/src/utils/console-utils.js
|
|
369
|
-
var require_console_utils = __commonJS((exports) => {
|
|
370
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
371
|
-
exports.findWidthInConsole = exports.stripAnsi = undefined;
|
|
372
|
-
var simple_wcswidth_1 = require_dist();
|
|
373
|
-
var colorRegex = /\x1b\[\d{1,3}(;\d{1,3})*m/g;
|
|
374
|
-
var stripAnsi = (str) => str.replace(colorRegex, "");
|
|
375
|
-
exports.stripAnsi = stripAnsi;
|
|
376
|
-
var findWidthInConsole = (str, charLength) => {
|
|
377
|
-
let strLen = 0;
|
|
378
|
-
str = (0, exports.stripAnsi)(str);
|
|
379
|
-
if (charLength) {
|
|
380
|
-
Object.entries(charLength).forEach(([key, value]) => {
|
|
381
|
-
let regex = new RegExp(key, "g");
|
|
382
|
-
strLen += (str.match(regex) || []).length * value;
|
|
383
|
-
str = str.replace(key, "");
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
strLen += (0, simple_wcswidth_1.wcswidth)(str);
|
|
387
|
-
return strLen;
|
|
388
|
-
};
|
|
389
|
-
exports.findWidthInConsole = findWidthInConsole;
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
// ../../node_modules/console-table-printer/dist/src/utils/string-utils.js
|
|
393
|
-
var require_string_utils = __commonJS((exports) => {
|
|
394
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
395
|
-
exports.biggestWordInSentence = exports.textWithPadding = exports.splitTextIntoTextsOfMinLen = undefined;
|
|
396
|
-
var console_utils_1 = require_console_utils();
|
|
397
|
-
var splitTextIntoTextsOfMinLen = (inpStr, width, charLength) => {
|
|
398
|
-
const ret = [];
|
|
399
|
-
const lines = inpStr.split(/[\n\r]/);
|
|
400
|
-
lines.forEach((line) => {
|
|
401
|
-
const spaceSeparatedStrings = line.split(" ");
|
|
402
|
-
let now = [];
|
|
403
|
-
let cnt = 0;
|
|
404
|
-
spaceSeparatedStrings.forEach((strWithoutSpace) => {
|
|
405
|
-
const consoleWidth = (0, console_utils_1.findWidthInConsole)(strWithoutSpace, charLength);
|
|
406
|
-
if (cnt + consoleWidth <= width) {
|
|
407
|
-
cnt += consoleWidth + 1;
|
|
408
|
-
now.push(strWithoutSpace);
|
|
409
|
-
} else {
|
|
410
|
-
if (now.length > 0)
|
|
411
|
-
ret.push(now.join(" "));
|
|
412
|
-
now = [strWithoutSpace];
|
|
413
|
-
cnt = consoleWidth + 1;
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
ret.push(now.join(" "));
|
|
417
|
-
});
|
|
418
|
-
return ret;
|
|
419
|
-
};
|
|
420
|
-
exports.splitTextIntoTextsOfMinLen = splitTextIntoTextsOfMinLen;
|
|
421
|
-
var textWithPadding = (text, alignment, columnLen, charLength) => {
|
|
422
|
-
const curTextSize = (0, console_utils_1.findWidthInConsole)(text, charLength);
|
|
423
|
-
const leftPadding = Math.floor((columnLen - curTextSize) / 2);
|
|
424
|
-
const rightPadding = columnLen - leftPadding - curTextSize;
|
|
425
|
-
if (columnLen < curTextSize) {
|
|
426
|
-
const splittedLines = (0, exports.splitTextIntoTextsOfMinLen)(text, columnLen);
|
|
427
|
-
if (splittedLines.length === 1) {
|
|
428
|
-
return text;
|
|
429
|
-
}
|
|
430
|
-
return splittedLines.map((singleLine) => (0, exports.textWithPadding)(singleLine, alignment, columnLen, charLength)).join(`
|
|
431
|
-
`);
|
|
432
|
-
}
|
|
433
|
-
switch (alignment) {
|
|
434
|
-
case "left":
|
|
435
|
-
return text.concat(" ".repeat(columnLen - curTextSize));
|
|
436
|
-
case "center":
|
|
437
|
-
return " ".repeat(leftPadding).concat(text).concat(" ".repeat(rightPadding));
|
|
438
|
-
case "right":
|
|
439
|
-
default:
|
|
440
|
-
return " ".repeat(columnLen - curTextSize).concat(text);
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
exports.textWithPadding = textWithPadding;
|
|
444
|
-
var biggestWordInSentence = (inpStr, charLength) => inpStr.split(" ").reduce((a, b) => Math.max(a, (0, console_utils_1.findWidthInConsole)(b, charLength)), 0);
|
|
445
|
-
exports.biggestWordInSentence = biggestWordInSentence;
|
|
446
|
-
});
|
|
447
|
-
|
|
448
|
-
// ../../node_modules/console-table-printer/dist/src/utils/table-helpers.js
|
|
449
|
-
var require_table_helpers = __commonJS((exports) => {
|
|
450
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
451
|
-
exports.getWidthLimitedColumnsArray = exports.createHeaderAsRow = exports.renderTableHorizontalBorders = exports.findLenOfColumn = exports.createRow = exports.createColumFromComputedColumn = exports.createColumFromOnlyName = exports.createTableHorizontalBorders = exports.convertRawRowOptionsToStandard = exports.cellText = undefined;
|
|
452
|
-
var input_converter_1 = require_input_converter();
|
|
453
|
-
var console_utils_1 = require_console_utils();
|
|
454
|
-
var string_utils_1 = require_string_utils();
|
|
455
|
-
var table_constants_1 = require_table_constants();
|
|
456
|
-
var max = (a, b) => Math.max(a, b);
|
|
457
|
-
var cellText = (text) => text === undefined || text === null ? "" : `${text}`;
|
|
458
|
-
exports.cellText = cellText;
|
|
459
|
-
var convertRawRowOptionsToStandard = (options) => {
|
|
460
|
-
if (options) {
|
|
461
|
-
return {
|
|
462
|
-
color: options.color,
|
|
463
|
-
separator: options.separator || table_constants_1.DEFAULT_ROW_SEPARATOR
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
return;
|
|
467
|
-
};
|
|
468
|
-
exports.convertRawRowOptionsToStandard = convertRawRowOptionsToStandard;
|
|
469
|
-
var createTableHorizontalBorders = ({ left, mid, right, other }, column_lengths) => {
|
|
470
|
-
let ret = left;
|
|
471
|
-
column_lengths.forEach((len) => {
|
|
472
|
-
ret += other.repeat(len + 2);
|
|
473
|
-
ret += mid;
|
|
474
|
-
});
|
|
475
|
-
ret = ret.slice(0, -mid.length);
|
|
476
|
-
ret += right;
|
|
477
|
-
return ret;
|
|
478
|
-
};
|
|
479
|
-
exports.createTableHorizontalBorders = createTableHorizontalBorders;
|
|
480
|
-
var createColumFromOnlyName = (name) => ({
|
|
481
|
-
name,
|
|
482
|
-
title: name
|
|
483
|
-
});
|
|
484
|
-
exports.createColumFromOnlyName = createColumFromOnlyName;
|
|
485
|
-
var createColumFromComputedColumn = (column) => {
|
|
486
|
-
var _a;
|
|
487
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ name: column.name, title: (_a = column.title) !== null && _a !== undefined ? _a : column.name }, (0, input_converter_1.objIfExists)("color", column.color)), (0, input_converter_1.objIfExists)("maxLen", column.maxLen)), (0, input_converter_1.objIfExists)("minLen", column.minLen)), { alignment: column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT });
|
|
488
|
-
};
|
|
489
|
-
exports.createColumFromComputedColumn = createColumFromComputedColumn;
|
|
490
|
-
var createRow = (color, text, separator) => ({
|
|
491
|
-
color,
|
|
492
|
-
separator,
|
|
493
|
-
text
|
|
494
|
-
});
|
|
495
|
-
exports.createRow = createRow;
|
|
496
|
-
var findLenOfColumn = (column, rows, charLength) => {
|
|
497
|
-
const columnId = column.name;
|
|
498
|
-
const columnTitle = column.title;
|
|
499
|
-
let length = max(0, (column === null || column === undefined ? undefined : column.minLen) || 0);
|
|
500
|
-
if (column.maxLen) {
|
|
501
|
-
length = max(length, max(column.maxLen, (0, string_utils_1.biggestWordInSentence)(columnTitle, charLength)));
|
|
502
|
-
length = rows.reduce((acc, row) => max(acc, (0, string_utils_1.biggestWordInSentence)((0, exports.cellText)(row.text[columnId]), charLength)), length);
|
|
503
|
-
return length;
|
|
504
|
-
}
|
|
505
|
-
length = max(length, (0, console_utils_1.findWidthInConsole)(columnTitle, charLength));
|
|
506
|
-
rows.forEach((row) => {
|
|
507
|
-
length = max(length, (0, console_utils_1.findWidthInConsole)((0, exports.cellText)(row.text[columnId]), charLength));
|
|
508
|
-
});
|
|
509
|
-
return length;
|
|
510
|
-
};
|
|
511
|
-
exports.findLenOfColumn = findLenOfColumn;
|
|
512
|
-
var renderTableHorizontalBorders = (style, column_lengths) => {
|
|
513
|
-
const str = (0, exports.createTableHorizontalBorders)(style, column_lengths);
|
|
514
|
-
return str;
|
|
515
|
-
};
|
|
516
|
-
exports.renderTableHorizontalBorders = renderTableHorizontalBorders;
|
|
517
|
-
var createHeaderAsRow = (createRowFn, columns) => {
|
|
518
|
-
const headerColor = table_constants_1.DEFAULT_HEADER_FONT_COLOR;
|
|
519
|
-
const row = createRowFn(headerColor, {}, false);
|
|
520
|
-
columns.forEach((column) => {
|
|
521
|
-
row.text[column.name] = column.title;
|
|
522
|
-
});
|
|
523
|
-
return row;
|
|
524
|
-
};
|
|
525
|
-
exports.createHeaderAsRow = createHeaderAsRow;
|
|
526
|
-
var getWidthLimitedColumnsArray = (columns, row, charLength) => {
|
|
527
|
-
const ret = {};
|
|
528
|
-
columns.forEach((column) => {
|
|
529
|
-
ret[column.name] = (0, string_utils_1.splitTextIntoTextsOfMinLen)((0, exports.cellText)(row.text[column.name]), column.length || table_constants_1.DEFAULT_COLUMN_LEN, charLength);
|
|
530
|
-
});
|
|
531
|
-
return ret;
|
|
532
|
-
};
|
|
533
|
-
exports.getWidthLimitedColumnsArray = getWidthLimitedColumnsArray;
|
|
534
|
-
});
|
|
535
|
-
|
|
536
|
-
// ../../node_modules/console-table-printer/dist/src/internalTable/table-pre-processors.js
|
|
537
|
-
var require_table_pre_processors = __commonJS((exports) => {
|
|
538
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
539
|
-
exports.preProcessRows = exports.preProcessColumns = undefined;
|
|
540
|
-
var table_helpers_1 = require_table_helpers();
|
|
541
|
-
var createComputedColumnsIfNecessary = (table) => {
|
|
542
|
-
if (table.computedColumns.length) {
|
|
543
|
-
table.computedColumns.forEach((computedColumn) => {
|
|
544
|
-
table.addColumn(computedColumn);
|
|
545
|
-
table.rows.forEach((row) => {
|
|
546
|
-
row.text[computedColumn.name] = computedColumn.function(row.text);
|
|
547
|
-
});
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
var disableColumnsIfNecessary = (table) => {
|
|
552
|
-
if (table.enabledColumns.length) {
|
|
553
|
-
table.columns = table.columns.filter((col) => table.enabledColumns.includes(col.name));
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
var enableColumnsIfNecessary = (table) => {
|
|
557
|
-
if (table.disabledColumns.length) {
|
|
558
|
-
table.columns = table.columns.filter((col) => !table.disabledColumns.includes(col.name));
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
var findColumnWidth = (table) => {
|
|
562
|
-
table.columns.forEach((column) => {
|
|
563
|
-
column.length = (0, table_helpers_1.findLenOfColumn)(column, table.rows, table.charLength);
|
|
564
|
-
});
|
|
565
|
-
};
|
|
566
|
-
var preProcessColumns = (table) => {
|
|
567
|
-
createComputedColumnsIfNecessary(table);
|
|
568
|
-
enableColumnsIfNecessary(table);
|
|
569
|
-
disableColumnsIfNecessary(table);
|
|
570
|
-
findColumnWidth(table);
|
|
571
|
-
};
|
|
572
|
-
exports.preProcessColumns = preProcessColumns;
|
|
573
|
-
var preProcessRows = (table) => {
|
|
574
|
-
const newRows = table.rows.filter((r) => table.filterFunction(r.text)).sort((r1, r2) => table.sortFunction(r1.text, r2.text));
|
|
575
|
-
table.rows = newRows;
|
|
576
|
-
};
|
|
577
|
-
exports.preProcessRows = preProcessRows;
|
|
578
|
-
});
|
|
579
|
-
|
|
580
|
-
// ../../node_modules/console-table-printer/dist/src/internalTable/internal-table-printer.js
|
|
581
|
-
var require_internal_table_printer = __commonJS((exports) => {
|
|
582
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
583
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
584
|
-
};
|
|
585
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
586
|
-
exports.printSimpleTable = exports.renderSimpleTable = exports.renderTable = undefined;
|
|
587
|
-
var colored_console_line_1 = __importDefault(require_colored_console_line());
|
|
588
|
-
var string_utils_1 = require_string_utils();
|
|
589
|
-
var table_constants_1 = require_table_constants();
|
|
590
|
-
var table_helpers_1 = require_table_helpers();
|
|
591
|
-
var internal_table_1 = __importDefault(require_internal_table());
|
|
592
|
-
var table_pre_processors_1 = require_table_pre_processors();
|
|
593
|
-
var renderOneLine = (tableStyle, columns, currentLineIndex, widthLimitedColumnsArray, isHeader, row, colorMap, charLength) => {
|
|
594
|
-
const line = new colored_console_line_1.default(colorMap);
|
|
595
|
-
line.addCharsWithColor("", tableStyle.vertical);
|
|
596
|
-
columns.forEach((column) => {
|
|
597
|
-
const thisLineHasText = currentLineIndex < widthLimitedColumnsArray[column.name].length;
|
|
598
|
-
const textForThisLine = thisLineHasText ? (0, table_helpers_1.cellText)(widthLimitedColumnsArray[column.name][currentLineIndex]) : "";
|
|
599
|
-
line.addCharsWithColor(table_constants_1.DEFAULT_ROW_FONT_COLOR, " ");
|
|
600
|
-
line.addCharsWithColor(isHeader && table_constants_1.DEFAULT_HEADER_FONT_COLOR || column.color || row.color, (0, string_utils_1.textWithPadding)(textForThisLine, column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT, column.length || table_constants_1.DEFAULT_COLUMN_LEN, charLength));
|
|
601
|
-
line.addCharsWithColor("", ` ${tableStyle.vertical}`);
|
|
602
|
-
});
|
|
603
|
-
return line.renderConsole();
|
|
604
|
-
};
|
|
605
|
-
var renderWidthLimitedLines = (tableStyle, columns, row, colorMap, isHeader, charLength) => {
|
|
606
|
-
const widthLimitedColumnsArray = (0, table_helpers_1.getWidthLimitedColumnsArray)(columns, row, charLength);
|
|
607
|
-
const totalLines = Object.values(widthLimitedColumnsArray).reduce((a, b) => Math.max(a, b.length), 0);
|
|
608
|
-
const ret = [];
|
|
609
|
-
for (let currentLineIndex = 0;currentLineIndex < totalLines; currentLineIndex += 1) {
|
|
610
|
-
const singleLine = renderOneLine(tableStyle, columns, currentLineIndex, widthLimitedColumnsArray, isHeader, row, colorMap, charLength);
|
|
611
|
-
ret.push(singleLine);
|
|
612
|
-
}
|
|
613
|
-
return ret;
|
|
614
|
-
};
|
|
615
|
-
var renderRow = (table, row) => {
|
|
616
|
-
let ret = [];
|
|
617
|
-
ret = ret.concat(renderWidthLimitedLines(table.tableStyle, table.columns, row, table.colorMap, undefined, table.charLength));
|
|
618
|
-
return ret;
|
|
619
|
-
};
|
|
620
|
-
var renderTableTitle = (table) => {
|
|
621
|
-
const ret = [];
|
|
622
|
-
if (table.title === undefined) {
|
|
623
|
-
return ret;
|
|
624
|
-
}
|
|
625
|
-
const getTableWidth = () => {
|
|
626
|
-
const reducer = (accumulator, currentValue) => accumulator + currentValue + 2 + 1;
|
|
627
|
-
return table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN).reduce(reducer, 1);
|
|
628
|
-
};
|
|
629
|
-
const titleWithPadding = (0, string_utils_1.textWithPadding)(table.title, table_constants_1.DEFAULT_HEADER_ALIGNMENT, getTableWidth());
|
|
630
|
-
const styledText = new colored_console_line_1.default(table.colorMap);
|
|
631
|
-
styledText.addCharsWithColor(table_constants_1.DEFAULT_HEADER_FONT_COLOR, titleWithPadding);
|
|
632
|
-
ret.push(styledText.renderConsole());
|
|
633
|
-
return ret;
|
|
634
|
-
};
|
|
635
|
-
var renderTableHeaders = (table) => {
|
|
636
|
-
let ret = [];
|
|
637
|
-
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.headerTop, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
|
|
638
|
-
const row = (0, table_helpers_1.createHeaderAsRow)(table_helpers_1.createRow, table.columns);
|
|
639
|
-
ret = ret.concat(renderWidthLimitedLines(table.tableStyle, table.columns, row, table.colorMap, true));
|
|
640
|
-
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.headerBottom, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
|
|
641
|
-
return ret;
|
|
642
|
-
};
|
|
643
|
-
var renderTableEnding = (table) => {
|
|
644
|
-
const ret = [];
|
|
645
|
-
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.tableBottom, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
|
|
646
|
-
return ret;
|
|
647
|
-
};
|
|
648
|
-
var renderRowSeparator = (table, row) => {
|
|
649
|
-
const ret = [];
|
|
650
|
-
const lastRowIndex = table.rows.length - 1;
|
|
651
|
-
const currentRowIndex = table.rows.indexOf(row);
|
|
652
|
-
if (currentRowIndex !== lastRowIndex && row.separator) {
|
|
653
|
-
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.rowSeparator, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
|
|
654
|
-
}
|
|
655
|
-
return ret;
|
|
656
|
-
};
|
|
657
|
-
var renderTable = (table) => {
|
|
658
|
-
(0, table_pre_processors_1.preProcessColumns)(table);
|
|
659
|
-
(0, table_pre_processors_1.preProcessRows)(table);
|
|
660
|
-
const ret = [];
|
|
661
|
-
renderTableTitle(table).forEach((row) => ret.push(row));
|
|
662
|
-
renderTableHeaders(table).forEach((row) => ret.push(row));
|
|
663
|
-
table.rows.forEach((row) => {
|
|
664
|
-
renderRow(table, row).forEach((row_) => ret.push(row_));
|
|
665
|
-
renderRowSeparator(table, row).forEach((row_) => ret.push(row_));
|
|
666
|
-
});
|
|
667
|
-
renderTableEnding(table).forEach((row) => ret.push(row));
|
|
668
|
-
return ret.join(`
|
|
669
|
-
`);
|
|
670
|
-
};
|
|
671
|
-
exports.renderTable = renderTable;
|
|
672
|
-
var renderSimpleTable = (rows) => {
|
|
673
|
-
const table = new internal_table_1.default;
|
|
674
|
-
table.addRows(rows);
|
|
675
|
-
return (0, exports.renderTable)(table);
|
|
676
|
-
};
|
|
677
|
-
exports.renderSimpleTable = renderSimpleTable;
|
|
678
|
-
var printSimpleTable = (rows) => {
|
|
679
|
-
console.log((0, exports.renderSimpleTable)(rows));
|
|
680
|
-
};
|
|
681
|
-
exports.printSimpleTable = printSimpleTable;
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
// ../../node_modules/console-table-printer/dist/src/internalTable/internal-table.js
|
|
685
|
-
var require_internal_table = __commonJS((exports) => {
|
|
686
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
687
|
-
var colored_console_line_1 = require_colored_console_line();
|
|
688
|
-
var table_constants_1 = require_table_constants();
|
|
689
|
-
var table_helpers_1 = require_table_helpers();
|
|
690
|
-
var input_converter_1 = require_input_converter();
|
|
691
|
-
var internal_table_printer_1 = require_internal_table_printer();
|
|
692
|
-
var DEFAULT_ROW_SORT_FUNC = () => 0;
|
|
693
|
-
var DEFAULT_ROW_FILTER_FUNC = () => true;
|
|
694
|
-
|
|
695
|
-
class TableInternal {
|
|
696
|
-
initSimple(columns) {
|
|
697
|
-
this.columns = columns.map((column) => ({
|
|
698
|
-
name: column,
|
|
699
|
-
title: column,
|
|
700
|
-
alignment: table_constants_1.DEFAULT_ROW_ALIGNMENT
|
|
701
|
-
}));
|
|
702
|
-
}
|
|
703
|
-
initDetailed(options) {
|
|
704
|
-
var _a;
|
|
705
|
-
this.title = (options === null || options === undefined ? undefined : options.title) || this.title;
|
|
706
|
-
this.tableStyle = (options === null || options === undefined ? undefined : options.style) || this.tableStyle;
|
|
707
|
-
this.sortFunction = (options === null || options === undefined ? undefined : options.sort) || this.sortFunction;
|
|
708
|
-
this.filterFunction = (options === null || options === undefined ? undefined : options.filter) || this.filterFunction;
|
|
709
|
-
this.enabledColumns = (options === null || options === undefined ? undefined : options.enabledColumns) || this.enabledColumns;
|
|
710
|
-
this.disabledColumns = (options === null || options === undefined ? undefined : options.disabledColumns) || this.disabledColumns;
|
|
711
|
-
this.computedColumns = (options === null || options === undefined ? undefined : options.computedColumns) || this.computedColumns;
|
|
712
|
-
this.columns = ((_a = options === null || options === undefined ? undefined : options.columns) === null || _a === undefined ? undefined : _a.map(input_converter_1.rawColumnToInternalColumn)) || this.columns;
|
|
713
|
-
this.rowSeparator = (options === null || options === undefined ? undefined : options.rowSeparator) || this.rowSeparator;
|
|
714
|
-
this.charLength = (options === null || options === undefined ? undefined : options.charLength) || this.charLength;
|
|
715
|
-
if (options === null || options === undefined ? undefined : options.shouldDisableColors) {
|
|
716
|
-
this.colorMap = {};
|
|
717
|
-
} else if (options === null || options === undefined ? undefined : options.colorMap) {
|
|
718
|
-
this.colorMap = Object.assign(Object.assign({}, this.colorMap), options.colorMap);
|
|
719
|
-
}
|
|
720
|
-
if (options.rows !== undefined) {
|
|
721
|
-
this.addRows(options.rows);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
constructor(options) {
|
|
725
|
-
this.rows = [];
|
|
726
|
-
this.columns = [];
|
|
727
|
-
this.title = undefined;
|
|
728
|
-
this.tableStyle = table_constants_1.DEFAULT_TABLE_STYLE;
|
|
729
|
-
this.filterFunction = DEFAULT_ROW_FILTER_FUNC;
|
|
730
|
-
this.sortFunction = DEFAULT_ROW_SORT_FUNC;
|
|
731
|
-
this.enabledColumns = [];
|
|
732
|
-
this.disabledColumns = [];
|
|
733
|
-
this.computedColumns = [];
|
|
734
|
-
this.rowSeparator = table_constants_1.DEFAULT_ROW_SEPARATOR;
|
|
735
|
-
this.colorMap = colored_console_line_1.DEFAULT_COLOR_MAP;
|
|
736
|
-
this.charLength = {};
|
|
737
|
-
if (options instanceof Array) {
|
|
738
|
-
this.initSimple(options);
|
|
739
|
-
} else if (typeof options === "object") {
|
|
740
|
-
this.initDetailed(options);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
createColumnFromRow(text) {
|
|
744
|
-
const colNames = this.columns.map((col) => col.name);
|
|
745
|
-
Object.keys(text).forEach((key) => {
|
|
746
|
-
if (!colNames.includes(key)) {
|
|
747
|
-
this.columns.push((0, table_helpers_1.createColumFromOnlyName)(key));
|
|
748
|
-
}
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
addColumn(textOrObj) {
|
|
752
|
-
if (typeof textOrObj === "string") {
|
|
753
|
-
this.columns.push((0, table_helpers_1.createColumFromOnlyName)(textOrObj));
|
|
754
|
-
} else {
|
|
755
|
-
this.columns.push((0, table_helpers_1.createColumFromComputedColumn)(textOrObj));
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
addColumns(toBeInsertedColumns) {
|
|
759
|
-
toBeInsertedColumns.forEach((toBeInsertedColumn) => {
|
|
760
|
-
this.addColumn(toBeInsertedColumn);
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
addRow(text, options) {
|
|
764
|
-
this.createColumnFromRow(text);
|
|
765
|
-
this.rows.push((0, table_helpers_1.createRow)((options === null || options === undefined ? undefined : options.color) || table_constants_1.DEFAULT_ROW_FONT_COLOR, text, (options === null || options === undefined ? undefined : options.separator) !== undefined ? options === null || options === undefined ? undefined : options.separator : this.rowSeparator));
|
|
766
|
-
}
|
|
767
|
-
addRows(toBeInsertedRows, options) {
|
|
768
|
-
toBeInsertedRows.forEach((toBeInsertedRow) => {
|
|
769
|
-
this.addRow(toBeInsertedRow, options);
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
renderTable() {
|
|
773
|
-
return (0, internal_table_printer_1.renderTable)(this);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
exports.default = TableInternal;
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
// ../../node_modules/console-table-printer/dist/src/console-table-printer.js
|
|
780
|
-
var require_console_table_printer = __commonJS((exports) => {
|
|
781
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
782
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
783
|
-
};
|
|
784
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
785
|
-
var internal_table_1 = __importDefault(require_internal_table());
|
|
786
|
-
var table_helpers_1 = require_table_helpers();
|
|
787
|
-
|
|
788
|
-
class Table {
|
|
789
|
-
constructor(options) {
|
|
790
|
-
this.table = new internal_table_1.default(options);
|
|
791
|
-
}
|
|
792
|
-
addColumn(column) {
|
|
793
|
-
this.table.addColumn(column);
|
|
794
|
-
return this;
|
|
795
|
-
}
|
|
796
|
-
addColumns(columns) {
|
|
797
|
-
this.table.addColumns(columns);
|
|
798
|
-
return this;
|
|
799
|
-
}
|
|
800
|
-
addRow(text, rowOptions) {
|
|
801
|
-
this.table.addRow(text, (0, table_helpers_1.convertRawRowOptionsToStandard)(rowOptions));
|
|
802
|
-
return this;
|
|
803
|
-
}
|
|
804
|
-
addRows(toBeInsertedRows, rowOptions) {
|
|
805
|
-
this.table.addRows(toBeInsertedRows, (0, table_helpers_1.convertRawRowOptionsToStandard)(rowOptions));
|
|
806
|
-
return this;
|
|
807
|
-
}
|
|
808
|
-
printTable() {
|
|
809
|
-
const tableRendered = this.table.renderTable();
|
|
810
|
-
console.log(tableRendered);
|
|
811
|
-
}
|
|
812
|
-
render() {
|
|
813
|
-
return this.table.renderTable();
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
exports.default = Table;
|
|
817
|
-
});
|
|
818
|
-
|
|
819
|
-
// ../../node_modules/console-table-printer/dist/index.js
|
|
820
|
-
var require_dist2 = __commonJS((exports) => {
|
|
821
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
822
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
823
|
-
};
|
|
824
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
825
|
-
exports.renderTable = exports.printTable = exports.Table = undefined;
|
|
826
|
-
var console_table_printer_1 = __importDefault(require_console_table_printer());
|
|
827
|
-
exports.Table = console_table_printer_1.default;
|
|
828
|
-
var internal_table_printer_1 = require_internal_table_printer();
|
|
829
|
-
Object.defineProperty(exports, "printTable", { enumerable: true, get: function() {
|
|
830
|
-
return internal_table_printer_1.printSimpleTable;
|
|
831
|
-
} });
|
|
832
|
-
Object.defineProperty(exports, "renderTable", { enumerable: true, get: function() {
|
|
833
|
-
return internal_table_printer_1.renderSimpleTable;
|
|
834
|
-
} });
|
|
835
|
-
});
|
|
836
|
-
|
|
837
32
|
// ../../node_modules/@dotenvx/dotenvx/package.json
|
|
838
33
|
var require_package = __commonJS((exports, module) => {
|
|
839
34
|
module.exports = {
|
|
@@ -3227,7 +2422,7 @@ var require_types = __commonJS((exports) => {
|
|
|
3227
2422
|
});
|
|
3228
2423
|
|
|
3229
2424
|
// ../../node_modules/fdir/dist/index.js
|
|
3230
|
-
var
|
|
2425
|
+
var require_dist = __commonJS((exports) => {
|
|
3231
2426
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3232
2427
|
if (k2 === undefined)
|
|
3233
2428
|
k2 = k;
|
|
@@ -3259,7 +2454,7 @@ var require_dist3 = __commonJS((exports) => {
|
|
|
3259
2454
|
|
|
3260
2455
|
// ../../node_modules/@dotenvx/dotenvx/src/lib/services/ls.js
|
|
3261
2456
|
var require_ls = __commonJS((exports, module) => {
|
|
3262
|
-
var { fdir: Fdir } =
|
|
2457
|
+
var { fdir: Fdir } = require_dist();
|
|
3263
2458
|
var path = __require("path");
|
|
3264
2459
|
var picomatch = require_picomatch2();
|
|
3265
2460
|
|
|
@@ -9262,7 +8457,7 @@ var require_keys = __commonJS((exports) => {
|
|
|
9262
8457
|
});
|
|
9263
8458
|
|
|
9264
8459
|
// ../../node_modules/eciesjs/dist/index.js
|
|
9265
|
-
var
|
|
8460
|
+
var require_dist2 = __commonJS((exports) => {
|
|
9266
8461
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9267
8462
|
exports.utils = exports.PublicKey = exports.PrivateKey = exports.ECIES_CONFIG = undefined;
|
|
9268
8463
|
exports.encrypt = encrypt;
|
|
@@ -9406,7 +8601,7 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
9406
8601
|
|
|
9407
8602
|
// ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/decryptKeyValue.js
|
|
9408
8603
|
var require_decryptKeyValue = __commonJS((exports, module) => {
|
|
9409
|
-
var { decrypt } =
|
|
8604
|
+
var { decrypt } = require_dist2();
|
|
9410
8605
|
var Errors = require_errors();
|
|
9411
8606
|
var PREFIX = "encrypted:";
|
|
9412
8607
|
function decryptKeyValue(key, value, privateKeyName, privateKey) {
|
|
@@ -10167,7 +9362,7 @@ var require_run = __commonJS((exports, module) => {
|
|
|
10167
9362
|
|
|
10168
9363
|
// ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/encryptValue.js
|
|
10169
9364
|
var require_encryptValue = __commonJS((exports, module) => {
|
|
10170
|
-
var { encrypt } =
|
|
9365
|
+
var { encrypt } = require_dist2();
|
|
10171
9366
|
var PREFIX = "encrypted:";
|
|
10172
9367
|
function encryptValue(value, publicKey) {
|
|
10173
9368
|
const ciphertext = encrypt(publicKey, Buffer.from(value));
|
|
@@ -10275,7 +9470,7 @@ var require_findPublicKey = __commonJS((exports, module) => {
|
|
|
10275
9470
|
|
|
10276
9471
|
// ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/keypair.js
|
|
10277
9472
|
var require_keypair2 = __commonJS((exports, module) => {
|
|
10278
|
-
var { PrivateKey } =
|
|
9473
|
+
var { PrivateKey } = require_dist2();
|
|
10279
9474
|
function keypair(existingPrivateKey) {
|
|
10280
9475
|
let kp;
|
|
10281
9476
|
if (existingPrivateKey) {
|
|
@@ -13619,7 +12814,7 @@ var require_source_map_generator = __commonJS((exports) => {
|
|
|
13619
12814
|
});
|
|
13620
12815
|
|
|
13621
12816
|
// ../../node_modules/source-map-support/node_modules/source-map/lib/binary-search.js
|
|
13622
|
-
var
|
|
12817
|
+
var require_binary_search = __commonJS((exports) => {
|
|
13623
12818
|
exports.GREATEST_LOWER_BOUND = 1;
|
|
13624
12819
|
exports.LEAST_UPPER_BOUND = 2;
|
|
13625
12820
|
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
@@ -13701,7 +12896,7 @@ var require_quick_sort = __commonJS((exports) => {
|
|
|
13701
12896
|
// ../../node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js
|
|
13702
12897
|
var require_source_map_consumer = __commonJS((exports) => {
|
|
13703
12898
|
var util2 = require_util();
|
|
13704
|
-
var binarySearch =
|
|
12899
|
+
var binarySearch = require_binary_search();
|
|
13705
12900
|
var ArraySet = require_array_set().ArraySet;
|
|
13706
12901
|
var base64VLQ = require_base64_vlq();
|
|
13707
12902
|
var quickSort = require_quick_sort().quickSort;
|
|
@@ -210270,7 +209465,7 @@ ${Bt.cyan(Yt)}
|
|
|
210270
209465
|
code: "ENOENT"
|
|
210271
209466
|
}), getPathInfo = (e9, t7) => {
|
|
210272
209467
|
var r6 = t7.colon || or;
|
|
210273
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
209468
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.v4iSNGiIvH:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
210274
209469
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
210275
209470
|
var a5 = nr ? n6.split(r6) : [""];
|
|
210276
209471
|
if (nr) {
|
|
@@ -213407,7 +212602,7 @@ ${whileRunning(e9)}`;
|
|
|
213407
212602
|
};
|
|
213408
212603
|
ni = Object.assign(async function _main() {
|
|
213409
212604
|
var e9 = new Cli({
|
|
213410
|
-
binaryVersion: "1.0.8-
|
|
212605
|
+
binaryVersion: "1.0.8-pr1bec8f0c",
|
|
213411
212606
|
binaryLabel: "gql.tada CLI",
|
|
213412
212607
|
binaryName: "gql.tada"
|
|
213413
212608
|
});
|
|
@@ -220997,7 +220192,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
220997
220192
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
220998
220193
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
220999
220194
|
var getPathInfo2 = (cmd2, {
|
|
221000
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220195
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.v4iSNGiIvH:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221001
220196
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221002
220197
|
delimiter: optDelimiter = delimiter
|
|
221003
220198
|
}) => {
|
|
@@ -221201,7 +220396,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
221201
220396
|
let pathToInitial;
|
|
221202
220397
|
try {
|
|
221203
220398
|
pathToInitial = which.sync(initialCmd, {
|
|
221204
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220399
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.v4iSNGiIvH:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221205
220400
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
221206
220401
|
}).toLowerCase();
|
|
221207
220402
|
} catch (err) {
|
|
@@ -221918,7 +221113,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
221918
221113
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
221919
221114
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
221920
221115
|
var getPathInfo2 = (cmd2, {
|
|
221921
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221116
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.v4iSNGiIvH:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221922
221117
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221923
221118
|
delimiter: optDelimiter = delimiter
|
|
221924
221119
|
}) => {
|
|
@@ -235793,7 +234988,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235793
234988
|
const colon = opt2.colon || COLON;
|
|
235794
234989
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235795
234990
|
...isWindows2 ? [process.cwd()] : [],
|
|
235796
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234991
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.v4iSNGiIvH:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
235797
234992
|
];
|
|
235798
234993
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235799
234994
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -241551,7 +240746,7 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
|
|
|
241551
240746
|
});
|
|
241552
240747
|
|
|
241553
240748
|
// ../../node_modules/node-fetch-native/dist/index.cjs
|
|
241554
|
-
var
|
|
240749
|
+
var require_dist3 = __commonJS((exports) => {
|
|
241555
240750
|
var i6 = Object.defineProperty;
|
|
241556
240751
|
var l4 = (r6, t8) => i6(r6, "name", { value: t8, configurable: true });
|
|
241557
240752
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -241577,7 +240772,7 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
241577
240772
|
|
|
241578
240773
|
// ../../node_modules/node-fetch-native/lib/index.cjs
|
|
241579
240774
|
var require_lib14 = __commonJS((exports, module) => {
|
|
241580
|
-
var nodeFetch =
|
|
240775
|
+
var nodeFetch = require_dist3();
|
|
241581
240776
|
function fetch2(input, options) {
|
|
241582
240777
|
return nodeFetch.fetch(input, options);
|
|
241583
240778
|
}
|
|
@@ -257550,7 +256745,7 @@ function yoctoSpinner(options) {
|
|
|
257550
256745
|
}
|
|
257551
256746
|
|
|
257552
256747
|
// ../utils/dist/environment.mjs
|
|
257553
|
-
|
|
256748
|
+
import TTYTable from "tty-table";
|
|
257554
256749
|
|
|
257555
256750
|
// ../../node_modules/zod/lib/index.mjs
|
|
257556
256751
|
var util;
|
|
@@ -268275,7 +267470,7 @@ var {
|
|
|
268275
267470
|
|
|
268276
267471
|
// ../utils/dist/terminal.mjs
|
|
268277
267472
|
import { spawn } from "node:child_process";
|
|
268278
|
-
|
|
267473
|
+
import TTYTable2 from "tty-table";
|
|
268279
267474
|
var ascii = () => console.log(magentaBright(`
|
|
268280
267475
|
_________ __ __ .__ _____ .__ __
|
|
268281
267476
|
/ _____/ _____/ |__/ |_| | ____ / \\ |__| _____/ |_
|
|
@@ -268382,28 +267577,31 @@ function camelCaseToWords(s) {
|
|
|
268382
267577
|
const capitalized = capitalizeFirstLetter(withSpaces);
|
|
268383
267578
|
return capitalized.replace(/\s+/g, " ").trim();
|
|
268384
267579
|
}
|
|
268385
|
-
function table(title, data) {
|
|
267580
|
+
function table(title, data, compact = true) {
|
|
268386
267581
|
note(title);
|
|
268387
267582
|
if (!data || data.length === 0) {
|
|
268388
267583
|
note("No data to display");
|
|
268389
267584
|
return;
|
|
268390
267585
|
}
|
|
268391
267586
|
const columnKeys = Object.keys(data[0]);
|
|
268392
|
-
const
|
|
268393
|
-
|
|
268394
|
-
|
|
268395
|
-
|
|
268396
|
-
|
|
268397
|
-
|
|
268398
|
-
});
|
|
268399
|
-
|
|
268400
|
-
|
|
267587
|
+
const headers = columnKeys.map((key) => ({
|
|
267588
|
+
value: key,
|
|
267589
|
+
alias: whiteBright(camelCaseToWords(key)),
|
|
267590
|
+
headerAlign: "left",
|
|
267591
|
+
headerColor: "",
|
|
267592
|
+
align: "left"
|
|
267593
|
+
}));
|
|
267594
|
+
const config3 = {
|
|
267595
|
+
compact
|
|
267596
|
+
};
|
|
267597
|
+
const ttyTable = TTYTable2(headers, data, config3);
|
|
267598
|
+
console.log(ttyTable.render());
|
|
268401
267599
|
}
|
|
268402
267600
|
// package.json
|
|
268403
267601
|
var package_default = {
|
|
268404
267602
|
name: "@settlemint/sdk-cli",
|
|
268405
267603
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
268406
|
-
version: "1.0.8-
|
|
267604
|
+
version: "1.0.8-pr1bec8f0c",
|
|
268407
267605
|
type: "module",
|
|
268408
267606
|
private: false,
|
|
268409
267607
|
license: "FSL-1.1-MIT",
|
|
@@ -268444,7 +267642,8 @@ var package_default = {
|
|
|
268444
267642
|
},
|
|
268445
267643
|
dependencies: {
|
|
268446
267644
|
hardhat: "2.22.18",
|
|
268447
|
-
tinyexec: "0.3.2"
|
|
267645
|
+
tinyexec: "0.3.2",
|
|
267646
|
+
"tty-table": "4.2.3"
|
|
268448
267647
|
},
|
|
268449
267648
|
devDependencies: {
|
|
268450
267649
|
"@types/semver": "7.5.8",
|
|
@@ -268458,8 +267657,8 @@ var package_default = {
|
|
|
268458
267657
|
"@inquirer/input": "4.1.3",
|
|
268459
267658
|
"@inquirer/password": "4.0.6",
|
|
268460
267659
|
"@inquirer/select": "4.0.6",
|
|
268461
|
-
"@settlemint/sdk-js": "1.0.8-
|
|
268462
|
-
"@settlemint/sdk-utils": "1.0.8-
|
|
267660
|
+
"@settlemint/sdk-js": "1.0.8-pr1bec8f0c",
|
|
267661
|
+
"@settlemint/sdk-utils": "1.0.8-pr1bec8f0c",
|
|
268463
267662
|
"get-tsconfig": "4.9.0",
|
|
268464
267663
|
giget: "1.2.3",
|
|
268465
267664
|
yaml: "2.7.0"
|
|
@@ -268811,7 +268010,7 @@ async function installPackage(names, options = {}) {
|
|
|
268811
268010
|
}
|
|
268812
268011
|
|
|
268813
268012
|
// ../utils/dist/package-manager.mjs
|
|
268814
|
-
|
|
268013
|
+
import TTYTable3 from "tty-table";
|
|
268815
268014
|
var import_package_json = __toESM(require_lib12(), 1);
|
|
268816
268015
|
var import_package_json2 = __toESM(require_lib12(), 1);
|
|
268817
268016
|
async function projectRoot3(fallbackToCwd = false, cwd) {
|
|
@@ -273114,7 +272313,6 @@ var ApplicationFragment = graphql(`
|
|
|
273114
272313
|
workspace {
|
|
273115
272314
|
id
|
|
273116
272315
|
uniqueName
|
|
273117
|
-
name
|
|
273118
272316
|
}
|
|
273119
272317
|
}
|
|
273120
272318
|
`);
|
|
@@ -277257,14 +276455,6 @@ function configCommand() {
|
|
|
277257
276455
|
});
|
|
277258
276456
|
}
|
|
277259
276457
|
|
|
277260
|
-
// src/commands/platform/utils/formatting/format-service-sub-type.ts
|
|
277261
|
-
function formatServiceSubType(service, printToTerminal = true) {
|
|
277262
|
-
if ("__typename" in service && typeof service.__typename === "string") {
|
|
277263
|
-
return printToTerminal ? camelCaseToWords2(service.__typename) : service.__typename;
|
|
277264
|
-
}
|
|
277265
|
-
return printToTerminal ? "Unknown" : "Unknown";
|
|
277266
|
-
}
|
|
277267
|
-
|
|
277268
276458
|
// src/spinners/applications.spinner.ts
|
|
277269
276459
|
async function applicationsSpinner(settlemint, workspaceUniqueName) {
|
|
277270
276460
|
return spinner({
|
|
@@ -277276,48 +276466,6 @@ async function applicationsSpinner(settlemint, workspaceUniqueName) {
|
|
|
277276
276466
|
});
|
|
277277
276467
|
}
|
|
277278
276468
|
|
|
277279
|
-
// src/utils/get-platform-url.ts
|
|
277280
|
-
function getClusterServicePlatformUrl(instance, application, service, serviceType) {
|
|
277281
|
-
const applicationUrl = getApplicationUrl(instance, application);
|
|
277282
|
-
return new URL(`${getWorkspaceUrlPath(application.workspace)}${getApplicationUrlPath(application)}/${getUrlPathForService(service, serviceType)}`, applicationUrl).toString();
|
|
277283
|
-
}
|
|
277284
|
-
function getWorkspaceUrl(instance, workspace) {
|
|
277285
|
-
return new URL(getWorkspaceUrlPath(workspace), instance).toString();
|
|
277286
|
-
}
|
|
277287
|
-
function getApplicationUrl(instance, application) {
|
|
277288
|
-
return new URL(`${getWorkspaceUrlPath(application.workspace)}${getApplicationUrlPath(application)}/dashboard`, instance).toString();
|
|
277289
|
-
}
|
|
277290
|
-
function getUrlPathForService(service, serviceType) {
|
|
277291
|
-
if (serviceType === "blockchain-network") {
|
|
277292
|
-
return `networks/${encodeURIComponent(service.id)}/details`;
|
|
277293
|
-
}
|
|
277294
|
-
if (serviceType === "blockchain-node") {
|
|
277295
|
-
return `nodes/${encodeURIComponent(service.id)}/details`;
|
|
277296
|
-
}
|
|
277297
|
-
if (serviceType === "middleware") {
|
|
277298
|
-
return `middlewares/${encodeURIComponent(service.id)}/details`;
|
|
277299
|
-
}
|
|
277300
|
-
if (serviceType === "integration-tool") {
|
|
277301
|
-
return `integration/${encodeURIComponent(service.id)}/details`;
|
|
277302
|
-
}
|
|
277303
|
-
if (serviceType === "private-key") {
|
|
277304
|
-
return `keyvault/${encodeURIComponent(service.id)}/details`;
|
|
277305
|
-
}
|
|
277306
|
-
if (serviceType === "storage") {
|
|
277307
|
-
return `storage/${encodeURIComponent(service.id)}/details`;
|
|
277308
|
-
}
|
|
277309
|
-
if (serviceType === "insights") {
|
|
277310
|
-
return `insights/${encodeURIComponent(service.id)}/details`;
|
|
277311
|
-
}
|
|
277312
|
-
return "";
|
|
277313
|
-
}
|
|
277314
|
-
function getWorkspaceUrlPath(workspace) {
|
|
277315
|
-
return `/workspaces/${encodeURIComponent(workspace.id)}`;
|
|
277316
|
-
}
|
|
277317
|
-
function getApplicationUrlPath(application) {
|
|
277318
|
-
return `/applications/${encodeURIComponent(application.id)}`;
|
|
277319
|
-
}
|
|
277320
|
-
|
|
277321
276469
|
// ../../node_modules/yaml/dist/index.js
|
|
277322
276470
|
var composer = require_composer();
|
|
277323
276471
|
var Document = require_Document();
|
|
@@ -277364,12 +276512,118 @@ var $stringify = publicApi.stringify;
|
|
|
277364
276512
|
var $visit = visit2.visit;
|
|
277365
276513
|
var $visitAsync = visit2.visitAsync;
|
|
277366
276514
|
|
|
276515
|
+
// src/commands/platform/application/list.ts
|
|
276516
|
+
function applicationsListCommand() {
|
|
276517
|
+
return new Command("applications").alias("a").description("List applications").usage(createExamples([
|
|
276518
|
+
{
|
|
276519
|
+
description: "List applications",
|
|
276520
|
+
command: "platform list applications"
|
|
276521
|
+
},
|
|
276522
|
+
{
|
|
276523
|
+
description: "List applications in wide format with more information",
|
|
276524
|
+
command: "platform list applications -o wide"
|
|
276525
|
+
},
|
|
276526
|
+
{
|
|
276527
|
+
description: "List applications in JSON format",
|
|
276528
|
+
command: "platform list applications -o json > applications.json"
|
|
276529
|
+
},
|
|
276530
|
+
{
|
|
276531
|
+
description: "List applications in YAML format",
|
|
276532
|
+
command: "platform list applications -o yaml > applications.yaml"
|
|
276533
|
+
}
|
|
276534
|
+
])).option("-w, --workspace <workspace>", "The workspace unique name to list applications for (defaults to workspace from env)").addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ workspace, output }) => {
|
|
276535
|
+
const printToTerminal = !output || output === "wide";
|
|
276536
|
+
if (printToTerminal) {
|
|
276537
|
+
intro("Listing applications");
|
|
276538
|
+
}
|
|
276539
|
+
const env2 = await loadEnv(false, false);
|
|
276540
|
+
const selectedInstance = await instancePrompt(env2, true);
|
|
276541
|
+
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
276542
|
+
if (!personalAccessToken) {
|
|
276543
|
+
return missingPersonalAccessTokenError();
|
|
276544
|
+
}
|
|
276545
|
+
const settlemint = createSettleMintClient({
|
|
276546
|
+
accessToken: personalAccessToken.personalAccessToken,
|
|
276547
|
+
instance: selectedInstance
|
|
276548
|
+
});
|
|
276549
|
+
const workspaceUniqueName = workspace ?? env2.SETTLEMINT_WORKSPACE ?? await selectWorkspace(settlemint, env2);
|
|
276550
|
+
const applications = await applicationsSpinner(settlemint, workspaceUniqueName);
|
|
276551
|
+
const wide = output === "wide";
|
|
276552
|
+
const applicationsData = applications.map((application) => {
|
|
276553
|
+
const basicFields = {
|
|
276554
|
+
name: application.name,
|
|
276555
|
+
uniqueName: application.uniqueName
|
|
276556
|
+
};
|
|
276557
|
+
if (wide || !printToTerminal) {
|
|
276558
|
+
return {
|
|
276559
|
+
...basicFields,
|
|
276560
|
+
url: `https://console-release.settlemint.com/applications/${application.id}/overview`
|
|
276561
|
+
};
|
|
276562
|
+
}
|
|
276563
|
+
return basicFields;
|
|
276564
|
+
});
|
|
276565
|
+
if (printToTerminal) {
|
|
276566
|
+
const selectedWorkspace = await settlemint.workspace.read(workspaceUniqueName);
|
|
276567
|
+
table(`Applications for workspace ${selectedWorkspace.name} (${selectedWorkspace}) - ${"TODO: url"}`, applicationsData);
|
|
276568
|
+
} else if (output === "json") {
|
|
276569
|
+
console.log(JSON.stringify(applicationsData, null, 2));
|
|
276570
|
+
} else if (output === "yaml") {
|
|
276571
|
+
console.log($stringify(applicationsData));
|
|
276572
|
+
}
|
|
276573
|
+
if (printToTerminal) {
|
|
276574
|
+
outro("Applications listed");
|
|
276575
|
+
}
|
|
276576
|
+
});
|
|
276577
|
+
}
|
|
276578
|
+
async function selectWorkspace(settlemint, env2) {
|
|
276579
|
+
const workspaces = await workspaceSpinner(settlemint);
|
|
276580
|
+
const workspace = await workspacePrompt(env2, workspaces, true);
|
|
276581
|
+
return workspace.uniqueName;
|
|
276582
|
+
}
|
|
276583
|
+
|
|
276584
|
+
// src/commands/platform/utils/formatting/format-service-sub-type.ts
|
|
276585
|
+
function formatServiceSubType(service, printToTerminal = true) {
|
|
276586
|
+
if ("__typename" in service && typeof service.__typename === "string") {
|
|
276587
|
+
return printToTerminal ? camelCaseToWords2(service.__typename) : service.__typename;
|
|
276588
|
+
}
|
|
276589
|
+
return printToTerminal ? "Unknown" : "Unknown";
|
|
276590
|
+
}
|
|
276591
|
+
|
|
276592
|
+
// src/utils/get-cluster-service-platform-url.ts
|
|
276593
|
+
function getClusterServicePlatformUrl(instance, application, service, serviceType) {
|
|
276594
|
+
return new URL(`workspaces/${encodeURIComponent(application.workspace.id)}/applications/${encodeURIComponent(application.id)}/${getUrlPathForService(service, serviceType)}`, instance).toString();
|
|
276595
|
+
}
|
|
276596
|
+
function getUrlPathForService(service, serviceType) {
|
|
276597
|
+
if (serviceType === "blockchain-network") {
|
|
276598
|
+
return `networks/${encodeURIComponent(service.id)}/details`;
|
|
276599
|
+
}
|
|
276600
|
+
if (serviceType === "blockchain-node") {
|
|
276601
|
+
return `nodes/${encodeURIComponent(service.id)}/details`;
|
|
276602
|
+
}
|
|
276603
|
+
if (serviceType === "middleware") {
|
|
276604
|
+
return `middlewares/${encodeURIComponent(service.id)}/details`;
|
|
276605
|
+
}
|
|
276606
|
+
if (serviceType === "integration-tool") {
|
|
276607
|
+
return `integration/${encodeURIComponent(service.id)}/details`;
|
|
276608
|
+
}
|
|
276609
|
+
if (serviceType === "private-key") {
|
|
276610
|
+
return `keyvault/${encodeURIComponent(service.id)}/details`;
|
|
276611
|
+
}
|
|
276612
|
+
if (serviceType === "storage") {
|
|
276613
|
+
return `storage/${encodeURIComponent(service.id)}/details`;
|
|
276614
|
+
}
|
|
276615
|
+
if (serviceType === "insights") {
|
|
276616
|
+
return `insights/${encodeURIComponent(service.id)}/details`;
|
|
276617
|
+
}
|
|
276618
|
+
return "";
|
|
276619
|
+
}
|
|
276620
|
+
|
|
277367
276621
|
// src/commands/platform/utils/formatting/format-health-status.ts
|
|
277368
276622
|
function formatHealthStatus(healthStatus, printToTerminal = true) {
|
|
277369
276623
|
if (healthStatus === "HEALTHY") {
|
|
277370
276624
|
return printToTerminal ? greenBright("Healthy") : "Healthy";
|
|
277371
276625
|
}
|
|
277372
|
-
const label = camelCaseToWords2(replaceUnderscoresAndHyphensWithSpaces(healthStatus))
|
|
276626
|
+
const label = `Unhealthy (${camelCaseToWords2(replaceUnderscoresAndHyphensWithSpaces(healthStatus))})`;
|
|
277373
276627
|
return printToTerminal ? yellowBright(label) : label;
|
|
277374
276628
|
}
|
|
277375
276629
|
|
|
@@ -277429,7 +276683,7 @@ function servicesCommand() {
|
|
|
277429
276683
|
description: "List the application services for multiple types",
|
|
277430
276684
|
command: "platform list services --type blockchain-network blockchain-node middleware"
|
|
277431
276685
|
}
|
|
277432
|
-
])).option("-app, --application <application>", "The application unique name to list the services in (defaults to application from env)").addOption(new Option("-t, --type <type...>", "The type(s) of service to list").choices(SERVICE_TYPES)).addOption(new Option("-o, --output <output>", "The output format
|
|
276686
|
+
])).option("-app, --application <application>", "The application unique name to list the services in (defaults to application from env)").addOption(new Option("-t, --type <type...>", "The type(s) of service to list").choices(SERVICE_TYPES)).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ application, type: type4, output }) => {
|
|
277433
276687
|
const printToTerminal = !output || output === "wide";
|
|
277434
276688
|
if (printToTerminal) {
|
|
277435
276689
|
intro("Listing application services");
|
|
@@ -277458,26 +276712,14 @@ function servicesCommand() {
|
|
|
277458
276712
|
printToTerminal,
|
|
277459
276713
|
wide
|
|
277460
276714
|
});
|
|
277461
|
-
const selectedApplication = await settlemint.application.read(applicationUniqueName);
|
|
277462
|
-
const data = {
|
|
277463
|
-
workspace: {
|
|
277464
|
-
uniqueName: selectedApplication.workspace.uniqueName,
|
|
277465
|
-
name: selectedApplication.workspace.name,
|
|
277466
|
-
url: getWorkspaceUrl(selectedInstance, selectedApplication.workspace)
|
|
277467
|
-
},
|
|
277468
|
-
application: {
|
|
277469
|
-
uniqueName: selectedApplication.uniqueName,
|
|
277470
|
-
name: selectedApplication.name,
|
|
277471
|
-
url: getApplicationUrl(selectedInstance, selectedApplication)
|
|
277472
|
-
},
|
|
277473
|
-
services: servicesToShow
|
|
277474
|
-
};
|
|
277475
276715
|
if (printToTerminal) {
|
|
277476
|
-
|
|
276716
|
+
for (const service of servicesToShow) {
|
|
276717
|
+
table(service.label, service.items, !wide);
|
|
276718
|
+
}
|
|
277477
276719
|
} else if (output === "json") {
|
|
277478
|
-
console.log(JSON.stringify(
|
|
276720
|
+
console.log(JSON.stringify(servicesToShow, null, 2));
|
|
277479
276721
|
} else if (output === "yaml") {
|
|
277480
|
-
console.log($stringify(
|
|
276722
|
+
console.log($stringify(servicesToShow));
|
|
277481
276723
|
}
|
|
277482
276724
|
if (printToTerminal) {
|
|
277483
276725
|
outro("Application services listed");
|
|
@@ -277510,27 +276752,41 @@ async function getServicesAndMapResults({
|
|
|
277510
276752
|
if (serviceItems.length === 0 && !types2) {
|
|
277511
276753
|
return null;
|
|
277512
276754
|
}
|
|
277513
|
-
return
|
|
277514
|
-
|
|
277515
|
-
|
|
277516
|
-
|
|
277517
|
-
|
|
277518
|
-
|
|
277519
|
-
|
|
277520
|
-
|
|
277521
|
-
|
|
277522
|
-
|
|
277523
|
-
|
|
277524
|
-
|
|
276755
|
+
return {
|
|
276756
|
+
label: capitalizeFirstLetter2(labels.plural),
|
|
276757
|
+
items: serviceItems.map((s8) => {
|
|
276758
|
+
const basicFields = {
|
|
276759
|
+
status: formatStatus(s8.status, printToTerminal),
|
|
276760
|
+
healthSatus: formatHealthStatus(s8.healthStatus, printToTerminal),
|
|
276761
|
+
type: formatServiceSubType(s8, printToTerminal),
|
|
276762
|
+
provider: s8.provider,
|
|
276763
|
+
region: s8.region
|
|
276764
|
+
};
|
|
276765
|
+
if (wide) {
|
|
276766
|
+
return {
|
|
276767
|
+
nameAndUniqueName: `${s8.name}
|
|
276768
|
+
${s8.uniqueName}`,
|
|
276769
|
+
url: getClusterServicePlatformUrl(instance, application, s8, serviceType),
|
|
276770
|
+
...basicFields
|
|
276771
|
+
};
|
|
276772
|
+
}
|
|
276773
|
+
if (!printToTerminal) {
|
|
276774
|
+
return {
|
|
276775
|
+
name: s8.name,
|
|
276776
|
+
uniqueName: s8.uniqueName,
|
|
276777
|
+
...basicFields,
|
|
276778
|
+
url: getClusterServicePlatformUrl(instance, application, s8, serviceType)
|
|
276779
|
+
};
|
|
276780
|
+
}
|
|
277525
276781
|
return {
|
|
277526
|
-
|
|
277527
|
-
|
|
276782
|
+
name: s8.name,
|
|
276783
|
+
uniqueName: s8.uniqueName,
|
|
276784
|
+
...basicFields
|
|
277528
276785
|
};
|
|
277529
|
-
}
|
|
277530
|
-
|
|
277531
|
-
});
|
|
276786
|
+
})
|
|
276787
|
+
};
|
|
277532
276788
|
}).filter((result) => result !== null);
|
|
277533
|
-
return results
|
|
276789
|
+
return results;
|
|
277534
276790
|
}
|
|
277535
276791
|
function getItemsForServiceType(services, serviceType) {
|
|
277536
276792
|
switch (serviceType) {
|
|
@@ -277555,9 +276811,71 @@ function getItemsForServiceType(services, serviceType) {
|
|
|
277555
276811
|
}
|
|
277556
276812
|
}
|
|
277557
276813
|
|
|
276814
|
+
// src/commands/platform/workspace/list.ts
|
|
276815
|
+
function workspacesListCommand() {
|
|
276816
|
+
return new Command("workspaces").alias("w").description("List workspaces").usage(createExamples([
|
|
276817
|
+
{
|
|
276818
|
+
description: "List workspaces",
|
|
276819
|
+
command: "platform list workspaces"
|
|
276820
|
+
},
|
|
276821
|
+
{
|
|
276822
|
+
description: "List workspaces in wide format with more information",
|
|
276823
|
+
command: "platform list workspaces -o wide"
|
|
276824
|
+
},
|
|
276825
|
+
{
|
|
276826
|
+
description: "List workspaces in JSON format",
|
|
276827
|
+
command: "platform list workspaces -o json > workspaces.json"
|
|
276828
|
+
},
|
|
276829
|
+
{
|
|
276830
|
+
description: "List workspaces in YAML format",
|
|
276831
|
+
command: "platform list workspaces -o yaml > workspaces.yaml"
|
|
276832
|
+
}
|
|
276833
|
+
])).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ output }) => {
|
|
276834
|
+
const printToTerminal = !output || output === "wide";
|
|
276835
|
+
if (printToTerminal) {
|
|
276836
|
+
intro("Listing workspaces");
|
|
276837
|
+
}
|
|
276838
|
+
const env2 = await loadEnv(false, false);
|
|
276839
|
+
const selectedInstance = await instancePrompt(env2, true);
|
|
276840
|
+
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
276841
|
+
if (!personalAccessToken) {
|
|
276842
|
+
return missingPersonalAccessTokenError();
|
|
276843
|
+
}
|
|
276844
|
+
const settlemint = createSettleMintClient({
|
|
276845
|
+
accessToken: personalAccessToken.personalAccessToken,
|
|
276846
|
+
instance: selectedInstance
|
|
276847
|
+
});
|
|
276848
|
+
const workspaces = await workspaceSpinner(settlemint);
|
|
276849
|
+
const wide = output === "wide";
|
|
276850
|
+
const workspacesData = workspaces.map((workspace) => {
|
|
276851
|
+
const basicFields = {
|
|
276852
|
+
name: workspace.name,
|
|
276853
|
+
uniqueName: workspace.uniqueName
|
|
276854
|
+
};
|
|
276855
|
+
if (wide || !printToTerminal) {
|
|
276856
|
+
return {
|
|
276857
|
+
...basicFields,
|
|
276858
|
+
url: `https://console-release.settlemint.com/workspaces/${workspace.id}/overview`
|
|
276859
|
+
};
|
|
276860
|
+
}
|
|
276861
|
+
return basicFields;
|
|
276862
|
+
});
|
|
276863
|
+
if (printToTerminal) {
|
|
276864
|
+
table("Workspaces", workspacesData);
|
|
276865
|
+
} else if (output === "json") {
|
|
276866
|
+
console.log(JSON.stringify(workspacesData, null, 2));
|
|
276867
|
+
} else if (output === "yaml") {
|
|
276868
|
+
console.log($stringify(workspacesData));
|
|
276869
|
+
}
|
|
276870
|
+
if (printToTerminal) {
|
|
276871
|
+
outro("Workspaces listed");
|
|
276872
|
+
}
|
|
276873
|
+
});
|
|
276874
|
+
}
|
|
276875
|
+
|
|
277558
276876
|
// src/commands/platform/list.ts
|
|
277559
276877
|
function listCommand() {
|
|
277560
|
-
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand());
|
|
276878
|
+
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand()).addCommand(workspacesListCommand()).addCommand(applicationsListCommand());
|
|
277561
276879
|
}
|
|
277562
276880
|
|
|
277563
276881
|
// src/commands/platform.ts
|
|
@@ -278529,4 +277847,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
278529
277847
|
// src/cli.ts
|
|
278530
277848
|
sdkCliCommand();
|
|
278531
277849
|
|
|
278532
|
-
//# debugId=
|
|
277850
|
+
//# debugId=0D8113E342819C6964756E2164756E21
|