keycloakify 10.0.0-rc.73 → 10.0.0-rc.75
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/README.md +2 -3
- package/bin/266.index.js +806 -0
- package/bin/{772.index.js → 304.index.js} +262 -678
- package/bin/{363.index.js → 440.index.js} +24 -74
- package/bin/720.index.js +243 -0
- package/bin/877.index.js +275 -0
- package/bin/main.js +455 -330
- package/package.json +7 -9
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +3 -20
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +11 -16
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +30 -62
- package/bin/246.index.js +0 -466
- package/bin/420.index.js +0 -508
- package/bin/509.index.js +0 -438
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +0 -28
package/bin/246.index.js
DELETED
@@ -1,466 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
exports.id = 246;
|
3
|
-
exports.ids = [246];
|
4
|
-
exports.modules = {
|
5
|
-
|
6
|
-
/***/ 19246:
|
7
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
8
|
-
|
9
|
-
// ESM COMPAT FLAG
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
11
|
-
|
12
|
-
// EXPORTS
|
13
|
-
__webpack_require__.d(__webpack_exports__, {
|
14
|
-
"default": () => (/* binding */ wrapAnsi)
|
15
|
-
});
|
16
|
-
|
17
|
-
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/string-width/index.js
|
18
|
-
var string_width = __webpack_require__(10509);
|
19
|
-
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/strip-ansi/index.js + 1 modules
|
20
|
-
var strip_ansi = __webpack_require__(5505);
|
21
|
-
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/ansi-styles/index.js
|
22
|
-
const ANSI_BACKGROUND_OFFSET = 10;
|
23
|
-
|
24
|
-
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
25
|
-
|
26
|
-
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
27
|
-
|
28
|
-
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
29
|
-
|
30
|
-
const styles = {
|
31
|
-
modifier: {
|
32
|
-
reset: [0, 0],
|
33
|
-
// 21 isn't widely supported and 22 does the same thing
|
34
|
-
bold: [1, 22],
|
35
|
-
dim: [2, 22],
|
36
|
-
italic: [3, 23],
|
37
|
-
underline: [4, 24],
|
38
|
-
overline: [53, 55],
|
39
|
-
inverse: [7, 27],
|
40
|
-
hidden: [8, 28],
|
41
|
-
strikethrough: [9, 29],
|
42
|
-
},
|
43
|
-
color: {
|
44
|
-
black: [30, 39],
|
45
|
-
red: [31, 39],
|
46
|
-
green: [32, 39],
|
47
|
-
yellow: [33, 39],
|
48
|
-
blue: [34, 39],
|
49
|
-
magenta: [35, 39],
|
50
|
-
cyan: [36, 39],
|
51
|
-
white: [37, 39],
|
52
|
-
|
53
|
-
// Bright color
|
54
|
-
blackBright: [90, 39],
|
55
|
-
gray: [90, 39], // Alias of `blackBright`
|
56
|
-
grey: [90, 39], // Alias of `blackBright`
|
57
|
-
redBright: [91, 39],
|
58
|
-
greenBright: [92, 39],
|
59
|
-
yellowBright: [93, 39],
|
60
|
-
blueBright: [94, 39],
|
61
|
-
magentaBright: [95, 39],
|
62
|
-
cyanBright: [96, 39],
|
63
|
-
whiteBright: [97, 39],
|
64
|
-
},
|
65
|
-
bgColor: {
|
66
|
-
bgBlack: [40, 49],
|
67
|
-
bgRed: [41, 49],
|
68
|
-
bgGreen: [42, 49],
|
69
|
-
bgYellow: [43, 49],
|
70
|
-
bgBlue: [44, 49],
|
71
|
-
bgMagenta: [45, 49],
|
72
|
-
bgCyan: [46, 49],
|
73
|
-
bgWhite: [47, 49],
|
74
|
-
|
75
|
-
// Bright color
|
76
|
-
bgBlackBright: [100, 49],
|
77
|
-
bgGray: [100, 49], // Alias of `bgBlackBright`
|
78
|
-
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
79
|
-
bgRedBright: [101, 49],
|
80
|
-
bgGreenBright: [102, 49],
|
81
|
-
bgYellowBright: [103, 49],
|
82
|
-
bgBlueBright: [104, 49],
|
83
|
-
bgMagentaBright: [105, 49],
|
84
|
-
bgCyanBright: [106, 49],
|
85
|
-
bgWhiteBright: [107, 49],
|
86
|
-
},
|
87
|
-
};
|
88
|
-
|
89
|
-
const modifierNames = Object.keys(styles.modifier);
|
90
|
-
const foregroundColorNames = Object.keys(styles.color);
|
91
|
-
const backgroundColorNames = Object.keys(styles.bgColor);
|
92
|
-
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
93
|
-
|
94
|
-
function assembleStyles() {
|
95
|
-
const codes = new Map();
|
96
|
-
|
97
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
98
|
-
for (const [styleName, style] of Object.entries(group)) {
|
99
|
-
styles[styleName] = {
|
100
|
-
open: `\u001B[${style[0]}m`,
|
101
|
-
close: `\u001B[${style[1]}m`,
|
102
|
-
};
|
103
|
-
|
104
|
-
group[styleName] = styles[styleName];
|
105
|
-
|
106
|
-
codes.set(style[0], style[1]);
|
107
|
-
}
|
108
|
-
|
109
|
-
Object.defineProperty(styles, groupName, {
|
110
|
-
value: group,
|
111
|
-
enumerable: false,
|
112
|
-
});
|
113
|
-
}
|
114
|
-
|
115
|
-
Object.defineProperty(styles, 'codes', {
|
116
|
-
value: codes,
|
117
|
-
enumerable: false,
|
118
|
-
});
|
119
|
-
|
120
|
-
styles.color.close = '\u001B[39m';
|
121
|
-
styles.bgColor.close = '\u001B[49m';
|
122
|
-
|
123
|
-
styles.color.ansi = wrapAnsi16();
|
124
|
-
styles.color.ansi256 = wrapAnsi256();
|
125
|
-
styles.color.ansi16m = wrapAnsi16m();
|
126
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
127
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
128
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
129
|
-
|
130
|
-
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
131
|
-
Object.defineProperties(styles, {
|
132
|
-
rgbToAnsi256: {
|
133
|
-
value: (red, green, blue) => {
|
134
|
-
// We use the extended greyscale palette here, with the exception of
|
135
|
-
// black and white. normal palette only has 4 greyscale shades.
|
136
|
-
if (red === green && green === blue) {
|
137
|
-
if (red < 8) {
|
138
|
-
return 16;
|
139
|
-
}
|
140
|
-
|
141
|
-
if (red > 248) {
|
142
|
-
return 231;
|
143
|
-
}
|
144
|
-
|
145
|
-
return Math.round(((red - 8) / 247) * 24) + 232;
|
146
|
-
}
|
147
|
-
|
148
|
-
return 16
|
149
|
-
+ (36 * Math.round(red / 255 * 5))
|
150
|
-
+ (6 * Math.round(green / 255 * 5))
|
151
|
-
+ Math.round(blue / 255 * 5);
|
152
|
-
},
|
153
|
-
enumerable: false,
|
154
|
-
},
|
155
|
-
hexToRgb: {
|
156
|
-
value: hex => {
|
157
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
158
|
-
if (!matches) {
|
159
|
-
return [0, 0, 0];
|
160
|
-
}
|
161
|
-
|
162
|
-
let [colorString] = matches;
|
163
|
-
|
164
|
-
if (colorString.length === 3) {
|
165
|
-
colorString = [...colorString].map(character => character + character).join('');
|
166
|
-
}
|
167
|
-
|
168
|
-
const integer = Number.parseInt(colorString, 16);
|
169
|
-
|
170
|
-
return [
|
171
|
-
/* eslint-disable no-bitwise */
|
172
|
-
(integer >> 16) & 0xFF,
|
173
|
-
(integer >> 8) & 0xFF,
|
174
|
-
integer & 0xFF,
|
175
|
-
/* eslint-enable no-bitwise */
|
176
|
-
];
|
177
|
-
},
|
178
|
-
enumerable: false,
|
179
|
-
},
|
180
|
-
hexToAnsi256: {
|
181
|
-
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
182
|
-
enumerable: false,
|
183
|
-
},
|
184
|
-
ansi256ToAnsi: {
|
185
|
-
value: code => {
|
186
|
-
if (code < 8) {
|
187
|
-
return 30 + code;
|
188
|
-
}
|
189
|
-
|
190
|
-
if (code < 16) {
|
191
|
-
return 90 + (code - 8);
|
192
|
-
}
|
193
|
-
|
194
|
-
let red;
|
195
|
-
let green;
|
196
|
-
let blue;
|
197
|
-
|
198
|
-
if (code >= 232) {
|
199
|
-
red = (((code - 232) * 10) + 8) / 255;
|
200
|
-
green = red;
|
201
|
-
blue = red;
|
202
|
-
} else {
|
203
|
-
code -= 16;
|
204
|
-
|
205
|
-
const remainder = code % 36;
|
206
|
-
|
207
|
-
red = Math.floor(code / 36) / 5;
|
208
|
-
green = Math.floor(remainder / 6) / 5;
|
209
|
-
blue = (remainder % 6) / 5;
|
210
|
-
}
|
211
|
-
|
212
|
-
const value = Math.max(red, green, blue) * 2;
|
213
|
-
|
214
|
-
if (value === 0) {
|
215
|
-
return 30;
|
216
|
-
}
|
217
|
-
|
218
|
-
// eslint-disable-next-line no-bitwise
|
219
|
-
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
220
|
-
|
221
|
-
if (value === 2) {
|
222
|
-
result += 60;
|
223
|
-
}
|
224
|
-
|
225
|
-
return result;
|
226
|
-
},
|
227
|
-
enumerable: false,
|
228
|
-
},
|
229
|
-
rgbToAnsi: {
|
230
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
231
|
-
enumerable: false,
|
232
|
-
},
|
233
|
-
hexToAnsi: {
|
234
|
-
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
235
|
-
enumerable: false,
|
236
|
-
},
|
237
|
-
});
|
238
|
-
|
239
|
-
return styles;
|
240
|
-
}
|
241
|
-
|
242
|
-
const ansiStyles = assembleStyles();
|
243
|
-
|
244
|
-
/* harmony default export */ const ansi_styles = (ansiStyles);
|
245
|
-
|
246
|
-
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/wrap-ansi/index.js
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
const ESCAPES = new Set([
|
252
|
-
'\u001B',
|
253
|
-
'\u009B',
|
254
|
-
]);
|
255
|
-
|
256
|
-
const END_CODE = 39;
|
257
|
-
const ANSI_ESCAPE_BELL = '\u0007';
|
258
|
-
const ANSI_CSI = '[';
|
259
|
-
const ANSI_OSC = ']';
|
260
|
-
const ANSI_SGR_TERMINATOR = 'm';
|
261
|
-
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
262
|
-
|
263
|
-
const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
264
|
-
const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
|
265
|
-
|
266
|
-
// Calculate the length of words split on ' ', ignoring
|
267
|
-
// the extra characters added by ansi escape codes
|
268
|
-
const wordLengths = string => string.split(' ').map(character => (0,string_width/* default */.Z)(character));
|
269
|
-
|
270
|
-
// Wrap a long word across multiple rows
|
271
|
-
// Ansi escape codes do not count towards length
|
272
|
-
const wrapWord = (rows, word, columns) => {
|
273
|
-
const characters = [...word];
|
274
|
-
|
275
|
-
let isInsideEscape = false;
|
276
|
-
let isInsideLinkEscape = false;
|
277
|
-
let visible = (0,string_width/* default */.Z)((0,strip_ansi/* default */.Z)(rows[rows.length - 1]));
|
278
|
-
|
279
|
-
for (const [index, character] of characters.entries()) {
|
280
|
-
const characterLength = (0,string_width/* default */.Z)(character);
|
281
|
-
|
282
|
-
if (visible + characterLength <= columns) {
|
283
|
-
rows[rows.length - 1] += character;
|
284
|
-
} else {
|
285
|
-
rows.push(character);
|
286
|
-
visible = 0;
|
287
|
-
}
|
288
|
-
|
289
|
-
if (ESCAPES.has(character)) {
|
290
|
-
isInsideEscape = true;
|
291
|
-
isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);
|
292
|
-
}
|
293
|
-
|
294
|
-
if (isInsideEscape) {
|
295
|
-
if (isInsideLinkEscape) {
|
296
|
-
if (character === ANSI_ESCAPE_BELL) {
|
297
|
-
isInsideEscape = false;
|
298
|
-
isInsideLinkEscape = false;
|
299
|
-
}
|
300
|
-
} else if (character === ANSI_SGR_TERMINATOR) {
|
301
|
-
isInsideEscape = false;
|
302
|
-
}
|
303
|
-
|
304
|
-
continue;
|
305
|
-
}
|
306
|
-
|
307
|
-
visible += characterLength;
|
308
|
-
|
309
|
-
if (visible === columns && index < characters.length - 1) {
|
310
|
-
rows.push('');
|
311
|
-
visible = 0;
|
312
|
-
}
|
313
|
-
}
|
314
|
-
|
315
|
-
// It's possible that the last row we copy over is only
|
316
|
-
// ansi escape characters, handle this edge-case
|
317
|
-
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
318
|
-
rows[rows.length - 2] += rows.pop();
|
319
|
-
}
|
320
|
-
};
|
321
|
-
|
322
|
-
// Trims spaces from a string ignoring invisible sequences
|
323
|
-
const stringVisibleTrimSpacesRight = string => {
|
324
|
-
const words = string.split(' ');
|
325
|
-
let last = words.length;
|
326
|
-
|
327
|
-
while (last > 0) {
|
328
|
-
if ((0,string_width/* default */.Z)(words[last - 1]) > 0) {
|
329
|
-
break;
|
330
|
-
}
|
331
|
-
|
332
|
-
last--;
|
333
|
-
}
|
334
|
-
|
335
|
-
if (last === words.length) {
|
336
|
-
return string;
|
337
|
-
}
|
338
|
-
|
339
|
-
return words.slice(0, last).join(' ') + words.slice(last).join('');
|
340
|
-
};
|
341
|
-
|
342
|
-
// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode
|
343
|
-
//
|
344
|
-
// 'hard' will never allow a string to take up more than columns characters
|
345
|
-
//
|
346
|
-
// 'soft' allows long words to expand past the column length
|
347
|
-
const exec = (string, columns, options = {}) => {
|
348
|
-
if (options.trim !== false && string.trim() === '') {
|
349
|
-
return '';
|
350
|
-
}
|
351
|
-
|
352
|
-
let returnValue = '';
|
353
|
-
let escapeCode;
|
354
|
-
let escapeUrl;
|
355
|
-
|
356
|
-
const lengths = wordLengths(string);
|
357
|
-
let rows = [''];
|
358
|
-
|
359
|
-
for (const [index, word] of string.split(' ').entries()) {
|
360
|
-
if (options.trim !== false) {
|
361
|
-
rows[rows.length - 1] = rows[rows.length - 1].trimStart();
|
362
|
-
}
|
363
|
-
|
364
|
-
let rowLength = (0,string_width/* default */.Z)(rows[rows.length - 1]);
|
365
|
-
|
366
|
-
if (index !== 0) {
|
367
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
368
|
-
// If we start with a new word but the current row length equals the length of the columns, add a new row
|
369
|
-
rows.push('');
|
370
|
-
rowLength = 0;
|
371
|
-
}
|
372
|
-
|
373
|
-
if (rowLength > 0 || options.trim === false) {
|
374
|
-
rows[rows.length - 1] += ' ';
|
375
|
-
rowLength++;
|
376
|
-
}
|
377
|
-
}
|
378
|
-
|
379
|
-
// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'
|
380
|
-
if (options.hard && lengths[index] > columns) {
|
381
|
-
const remainingColumns = (columns - rowLength);
|
382
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
383
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
384
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
385
|
-
rows.push('');
|
386
|
-
}
|
387
|
-
|
388
|
-
wrapWord(rows, word, columns);
|
389
|
-
continue;
|
390
|
-
}
|
391
|
-
|
392
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
393
|
-
if (options.wordWrap === false && rowLength < columns) {
|
394
|
-
wrapWord(rows, word, columns);
|
395
|
-
continue;
|
396
|
-
}
|
397
|
-
|
398
|
-
rows.push('');
|
399
|
-
}
|
400
|
-
|
401
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
402
|
-
wrapWord(rows, word, columns);
|
403
|
-
continue;
|
404
|
-
}
|
405
|
-
|
406
|
-
rows[rows.length - 1] += word;
|
407
|
-
}
|
408
|
-
|
409
|
-
if (options.trim !== false) {
|
410
|
-
rows = rows.map(row => stringVisibleTrimSpacesRight(row));
|
411
|
-
}
|
412
|
-
|
413
|
-
const pre = [...rows.join('\n')];
|
414
|
-
|
415
|
-
for (const [index, character] of pre.entries()) {
|
416
|
-
returnValue += character;
|
417
|
-
|
418
|
-
if (ESCAPES.has(character)) {
|
419
|
-
const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};
|
420
|
-
if (groups.code !== undefined) {
|
421
|
-
const code = Number.parseFloat(groups.code);
|
422
|
-
escapeCode = code === END_CODE ? undefined : code;
|
423
|
-
} else if (groups.uri !== undefined) {
|
424
|
-
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
425
|
-
}
|
426
|
-
}
|
427
|
-
|
428
|
-
const code = ansi_styles.codes.get(Number(escapeCode));
|
429
|
-
|
430
|
-
if (pre[index + 1] === '\n') {
|
431
|
-
if (escapeUrl) {
|
432
|
-
returnValue += wrapAnsiHyperlink('');
|
433
|
-
}
|
434
|
-
|
435
|
-
if (escapeCode && code) {
|
436
|
-
returnValue += wrapAnsiCode(code);
|
437
|
-
}
|
438
|
-
} else if (character === '\n') {
|
439
|
-
if (escapeCode && code) {
|
440
|
-
returnValue += wrapAnsiCode(escapeCode);
|
441
|
-
}
|
442
|
-
|
443
|
-
if (escapeUrl) {
|
444
|
-
returnValue += wrapAnsiHyperlink(escapeUrl);
|
445
|
-
}
|
446
|
-
}
|
447
|
-
}
|
448
|
-
|
449
|
-
return returnValue;
|
450
|
-
};
|
451
|
-
|
452
|
-
// For each newline, invoke the method separately
|
453
|
-
function wrapAnsi(string, columns, options) {
|
454
|
-
return String(string)
|
455
|
-
.normalize()
|
456
|
-
.replace(/\r\n/g, '\n')
|
457
|
-
.split('\n')
|
458
|
-
.map(line => exec(line, columns, options))
|
459
|
-
.join('\n');
|
460
|
-
}
|
461
|
-
|
462
|
-
|
463
|
-
/***/ })
|
464
|
-
|
465
|
-
};
|
466
|
-
;
|