@keycloakify/angular 0.2.11 → 0.2.13
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 +6 -5
- package/bin/187.index.js +3 -3
- package/bin/{811.index.js → 279.index.js} +2 -676
- package/bin/476.index.js +1 -675
- package/bin/671.index.js +629 -5
- package/bin/942.index.js +617 -2
- package/bin/index.js +682 -20
- package/package.json +2 -2
- package/src/bin/eject-page.ts +16 -2
- package/src/bin/main.ts +9 -0
- package/src/bin/tsconfig.json +1 -1
- package/bin/986.index.js +0 -1294
package/bin/671.index.js
CHANGED
|
@@ -2,6 +2,575 @@ export const id = 671;
|
|
|
2
2
|
export const ids = [671];
|
|
3
3
|
export const modules = {
|
|
4
4
|
|
|
5
|
+
/***/ 672:
|
|
6
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
11
|
+
value: true
|
|
12
|
+
}));
|
|
13
|
+
exports.withPromise = exports.withCallback = void 0;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Open the input with a normal callback function
|
|
17
|
+
*
|
|
18
|
+
* @param {Input} input - input object
|
|
19
|
+
* @param {function} valueMapper - function which maps the resulting id and value back to the expected format
|
|
20
|
+
* @param {function} callback - callback function
|
|
21
|
+
*/
|
|
22
|
+
const withCallback = (input, valueMapper, callback) => {
|
|
23
|
+
input.open();
|
|
24
|
+
input.onSelect((id, value) => callback(valueMapper(id, value)));
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Open the input with a promise
|
|
28
|
+
*
|
|
29
|
+
* @param {Input} input - input object
|
|
30
|
+
* @param {function} valueMapper - function which maps the resulting id and value back to the expected format
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.withCallback = withCallback;
|
|
35
|
+
|
|
36
|
+
const withPromise = (input, valueMapper) => {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
input.open();
|
|
39
|
+
input.onSelect((id, value) => {
|
|
40
|
+
if (id === null) {
|
|
41
|
+
reject();
|
|
42
|
+
} else {
|
|
43
|
+
resolve(valueMapper(id, value));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.withPromise = withPromise;
|
|
50
|
+
|
|
51
|
+
/***/ }),
|
|
52
|
+
|
|
53
|
+
/***/ 546:
|
|
54
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
59
|
+
value: true
|
|
60
|
+
}));
|
|
61
|
+
exports["default"] = void 0;
|
|
62
|
+
|
|
63
|
+
var _input = _interopRequireDefault(__webpack_require__(938));
|
|
64
|
+
|
|
65
|
+
var _renderer = _interopRequireDefault(__webpack_require__(547));
|
|
66
|
+
|
|
67
|
+
var _callbackMappers = __webpack_require__(672);
|
|
68
|
+
|
|
69
|
+
var _valueMappers = __webpack_require__(348);
|
|
70
|
+
|
|
71
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
72
|
+
|
|
73
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
74
|
+
|
|
75
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Default options
|
|
79
|
+
*/
|
|
80
|
+
const defaultOptions = {
|
|
81
|
+
outputStream: process.stdout,
|
|
82
|
+
inputStream: process.stdin,
|
|
83
|
+
values: [],
|
|
84
|
+
defaultValue: 0,
|
|
85
|
+
selected: '(x)',
|
|
86
|
+
unselected: '( )',
|
|
87
|
+
indentation: 0,
|
|
88
|
+
cleanup: true,
|
|
89
|
+
valueRenderer: value => value
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Create an instance of cli-select with the given options
|
|
93
|
+
*
|
|
94
|
+
* @param {object} options - options for cli-select
|
|
95
|
+
* @param {function} callback - if specified, a callback will be used, otherwise a promise gets returned (optional)
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
const creator = (options, callback) => {
|
|
99
|
+
// merge options with default options
|
|
100
|
+
options = _objectSpread({}, defaultOptions, options); // create renderer and input instances
|
|
101
|
+
|
|
102
|
+
const renderer = new _renderer.default(options, options.outputStream);
|
|
103
|
+
const input = new _input.default(options.inputStream);
|
|
104
|
+
input.setDefaultValue(options.defaultValue);
|
|
105
|
+
input.attachRenderer(renderer); // handle array and object values
|
|
106
|
+
|
|
107
|
+
let valueMapper;
|
|
108
|
+
|
|
109
|
+
if (Array.isArray(options.values)) {
|
|
110
|
+
valueMapper = (0, _valueMappers.withArrayValues)(options);
|
|
111
|
+
} else {
|
|
112
|
+
valueMapper = (0, _valueMappers.withObjectValues)(options);
|
|
113
|
+
} // map values
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
options.values = valueMapper.input;
|
|
117
|
+
input.setValues(options.values); // handle different callback methods
|
|
118
|
+
|
|
119
|
+
if (typeof callback === 'function') {
|
|
120
|
+
return (0, _callbackMappers.withCallback)(input, valueMapper.output, callback);
|
|
121
|
+
} else {
|
|
122
|
+
return (0, _callbackMappers.withPromise)(input, valueMapper.output);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
exports = module.exports = creator;
|
|
127
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
128
|
+
value: true
|
|
129
|
+
}));
|
|
130
|
+
var _default = creator;
|
|
131
|
+
exports["default"] = _default;
|
|
132
|
+
|
|
133
|
+
/***/ }),
|
|
134
|
+
|
|
135
|
+
/***/ 938:
|
|
136
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
141
|
+
value: true
|
|
142
|
+
}));
|
|
143
|
+
exports["default"] = void 0;
|
|
144
|
+
|
|
145
|
+
var _readline = _interopRequireDefault(__webpack_require__(785));
|
|
146
|
+
|
|
147
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Handle cli input
|
|
151
|
+
*/
|
|
152
|
+
class Input {
|
|
153
|
+
/**
|
|
154
|
+
* Input constructor
|
|
155
|
+
*
|
|
156
|
+
* @param {any} stream - stream to catch (optional)
|
|
157
|
+
*/
|
|
158
|
+
constructor(stream = process.stdin) {
|
|
159
|
+
// set default values
|
|
160
|
+
this.stream = stream;
|
|
161
|
+
this.values = [];
|
|
162
|
+
this.selectedValue = 0;
|
|
163
|
+
|
|
164
|
+
this.onSelectListener = () => {};
|
|
165
|
+
|
|
166
|
+
this.onKeyPress = this.onKeyPress.bind(this);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Set the available values
|
|
170
|
+
*
|
|
171
|
+
* @param {array} values - all available values
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
setValues(values) {
|
|
176
|
+
this.values = values;
|
|
177
|
+
|
|
178
|
+
if (this.renderer) {
|
|
179
|
+
this.renderer.setValues(values);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Set the default value
|
|
184
|
+
*
|
|
185
|
+
* @param {number} defaultValue - default value id
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
setDefaultValue(defaultValue) {
|
|
190
|
+
this.selectedValue = defaultValue;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Attach a renderer to the input catcher
|
|
194
|
+
*
|
|
195
|
+
* @param {Renderer} renderer - renderer to use for rendering responses
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
attachRenderer(renderer) {
|
|
200
|
+
this.renderer = renderer;
|
|
201
|
+
this.renderer.setValues(this.values);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Register an on select listener
|
|
205
|
+
*
|
|
206
|
+
* @param {function} listener - listener function which receives two parameters: valueId and value
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
onSelect(listener) {
|
|
211
|
+
this.onSelectListener = listener;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Open the stream and listen for input
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
open() {
|
|
219
|
+
// register keypress event
|
|
220
|
+
_readline.default.emitKeypressEvents(this.stream); // handle keypress
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
this.stream.on('keypress', this.onKeyPress); // initially render the response
|
|
224
|
+
|
|
225
|
+
if (this.renderer) {
|
|
226
|
+
this.renderer.render(this.selectedValue);
|
|
227
|
+
} // hide pressed keys and start listening on input
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
this.stream.setRawMode(true);
|
|
231
|
+
this.stream.resume();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Close the stream
|
|
235
|
+
*
|
|
236
|
+
* @param {boolean} cancelled - true if no value was selected (optional)
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
close(cancelled = false) {
|
|
241
|
+
// reset stream properties
|
|
242
|
+
this.stream.setRawMode(false);
|
|
243
|
+
this.stream.pause(); // cleanup the output
|
|
244
|
+
|
|
245
|
+
if (this.renderer) {
|
|
246
|
+
this.renderer.cleanup();
|
|
247
|
+
} // call the on select listener
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
if (cancelled) {
|
|
251
|
+
this.onSelectListener(null);
|
|
252
|
+
} else {
|
|
253
|
+
this.onSelectListener(this.selectedValue, this.values[this.selectedValue]);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
this.stream.removeListener('keypress', this.onKeyPress);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Render the response
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
render() {
|
|
264
|
+
if (!this.renderer) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
this.renderer.render(this.selectedValue);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Handle key press event
|
|
272
|
+
*
|
|
273
|
+
* @param {string} string - input string
|
|
274
|
+
* @param {object} key - object containing information about the pressed key
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
onKeyPress(string, key) {
|
|
279
|
+
if (key) {
|
|
280
|
+
if (key.name === 'up' && this.selectedValue > 0) {
|
|
281
|
+
this.selectedValue--;
|
|
282
|
+
this.render();
|
|
283
|
+
} else if (key.name === 'down' && this.selectedValue + 1 < this.values.length) {
|
|
284
|
+
this.selectedValue++;
|
|
285
|
+
this.render();
|
|
286
|
+
} else if (key.name === 'return') {
|
|
287
|
+
this.close();
|
|
288
|
+
} else if (key.name === 'escape' || key.name === 'c' && key.ctrl) {
|
|
289
|
+
this.close(true);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
exports["default"] = Input;
|
|
297
|
+
|
|
298
|
+
/***/ }),
|
|
299
|
+
|
|
300
|
+
/***/ 547:
|
|
301
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
306
|
+
value: true
|
|
307
|
+
}));
|
|
308
|
+
exports["default"] = void 0;
|
|
309
|
+
|
|
310
|
+
var _readline = _interopRequireDefault(__webpack_require__(785));
|
|
311
|
+
|
|
312
|
+
var _ansiEscapes = __webpack_require__(719);
|
|
313
|
+
|
|
314
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Response renderer
|
|
318
|
+
*/
|
|
319
|
+
class Renderer {
|
|
320
|
+
/**
|
|
321
|
+
* Renderer constructor
|
|
322
|
+
*
|
|
323
|
+
* @param {object} options - renderer options
|
|
324
|
+
* @param {any} stream - stream to write to (optional)
|
|
325
|
+
*/
|
|
326
|
+
constructor(options, stream = process.stdout) {
|
|
327
|
+
this.options = options;
|
|
328
|
+
this.stream = stream;
|
|
329
|
+
this.values = [];
|
|
330
|
+
this.initialRender = true;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Set the available values
|
|
334
|
+
*
|
|
335
|
+
* @param {array} values - all available values
|
|
336
|
+
*/
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
setValues(values) {
|
|
340
|
+
this.values = values;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Render the values
|
|
344
|
+
*
|
|
345
|
+
* @param {number} selectedValue - selected value (optional)
|
|
346
|
+
*/
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
render(selectedValue = 0) {
|
|
350
|
+
if (this.initialRender) {
|
|
351
|
+
// hide the cursor initially
|
|
352
|
+
this.initialRender = false;
|
|
353
|
+
this.stream.write(_ansiEscapes.cursorHide);
|
|
354
|
+
} else {
|
|
355
|
+
// remove previous lines and values
|
|
356
|
+
this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
|
|
357
|
+
} // output the current values
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
this.values.forEach((value, index) => {
|
|
361
|
+
const symbol = selectedValue === index ? this.options.selected : this.options.unselected;
|
|
362
|
+
const indentation = ' '.repeat(this.options.indentation);
|
|
363
|
+
const renderedValue = this.options.valueRenderer(value, selectedValue === index);
|
|
364
|
+
const end = index !== this.values.length - 1 ? '\n' : '';
|
|
365
|
+
this.stream.write(indentation + symbol + ' ' + renderedValue + end);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Cleanup the console at the end
|
|
370
|
+
*/
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
cleanup() {
|
|
374
|
+
this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
|
|
375
|
+
this.stream.write(_ansiEscapes.cursorShow);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
exports["default"] = Renderer;
|
|
381
|
+
|
|
382
|
+
/***/ }),
|
|
383
|
+
|
|
384
|
+
/***/ 348:
|
|
385
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
390
|
+
value: true
|
|
391
|
+
}));
|
|
392
|
+
exports.withObjectValues = exports.withArrayValues = void 0;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Map incoming and outgoing values if the initial values are an array
|
|
396
|
+
*
|
|
397
|
+
* @param {object} options - cli-select options
|
|
398
|
+
*/
|
|
399
|
+
const withArrayValues = options => {
|
|
400
|
+
return {
|
|
401
|
+
input: options.values,
|
|
402
|
+
output: (id, value) => {
|
|
403
|
+
return {
|
|
404
|
+
id,
|
|
405
|
+
value
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* Map incoming and outgoing values if the initial values are an object
|
|
412
|
+
*
|
|
413
|
+
* @param {object} options - cli-select options
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
exports.withArrayValues = withArrayValues;
|
|
418
|
+
|
|
419
|
+
const withObjectValues = options => {
|
|
420
|
+
const originalValues = options.values;
|
|
421
|
+
return {
|
|
422
|
+
input: Object.values(originalValues),
|
|
423
|
+
output: (id, value) => {
|
|
424
|
+
return {
|
|
425
|
+
id: Object.keys(originalValues)[id],
|
|
426
|
+
value
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
exports.withObjectValues = withObjectValues;
|
|
433
|
+
|
|
434
|
+
/***/ }),
|
|
435
|
+
|
|
436
|
+
/***/ 719:
|
|
437
|
+
/***/ ((module) => {
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
const x = module.exports;
|
|
441
|
+
const ESC = '\u001B[';
|
|
442
|
+
const OSC = '\u001B]';
|
|
443
|
+
const BEL = '\u0007';
|
|
444
|
+
const SEP = ';';
|
|
445
|
+
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
446
|
+
|
|
447
|
+
x.cursorTo = (x, y) => {
|
|
448
|
+
if (typeof x !== 'number') {
|
|
449
|
+
throw new TypeError('The `x` argument is required');
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
if (typeof y !== 'number') {
|
|
453
|
+
return ESC + (x + 1) + 'G';
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
x.cursorMove = (x, y) => {
|
|
460
|
+
if (typeof x !== 'number') {
|
|
461
|
+
throw new TypeError('The `x` argument is required');
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
let ret = '';
|
|
465
|
+
|
|
466
|
+
if (x < 0) {
|
|
467
|
+
ret += ESC + (-x) + 'D';
|
|
468
|
+
} else if (x > 0) {
|
|
469
|
+
ret += ESC + x + 'C';
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (y < 0) {
|
|
473
|
+
ret += ESC + (-y) + 'A';
|
|
474
|
+
} else if (y > 0) {
|
|
475
|
+
ret += ESC + y + 'B';
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
return ret;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
482
|
+
x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
483
|
+
x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
484
|
+
x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
485
|
+
|
|
486
|
+
x.cursorLeft = ESC + 'G';
|
|
487
|
+
x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
|
|
488
|
+
x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
|
|
489
|
+
x.cursorGetPosition = ESC + '6n';
|
|
490
|
+
x.cursorNextLine = ESC + 'E';
|
|
491
|
+
x.cursorPrevLine = ESC + 'F';
|
|
492
|
+
x.cursorHide = ESC + '?25l';
|
|
493
|
+
x.cursorShow = ESC + '?25h';
|
|
494
|
+
|
|
495
|
+
x.eraseLines = count => {
|
|
496
|
+
let clear = '';
|
|
497
|
+
|
|
498
|
+
for (let i = 0; i < count; i++) {
|
|
499
|
+
clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if (count) {
|
|
503
|
+
clear += x.cursorLeft;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
return clear;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
x.eraseEndLine = ESC + 'K';
|
|
510
|
+
x.eraseStartLine = ESC + '1K';
|
|
511
|
+
x.eraseLine = ESC + '2K';
|
|
512
|
+
x.eraseDown = ESC + 'J';
|
|
513
|
+
x.eraseUp = ESC + '1J';
|
|
514
|
+
x.eraseScreen = ESC + '2J';
|
|
515
|
+
x.scrollUp = ESC + 'S';
|
|
516
|
+
x.scrollDown = ESC + 'T';
|
|
517
|
+
|
|
518
|
+
x.clearScreen = '\u001Bc';
|
|
519
|
+
|
|
520
|
+
x.clearTerminal = process.platform === 'win32' ?
|
|
521
|
+
`${x.eraseScreen}${ESC}0f` :
|
|
522
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
523
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
524
|
+
// 3. Moves cursor to the top-left position
|
|
525
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
526
|
+
`${x.eraseScreen}${ESC}3J${ESC}H`;
|
|
527
|
+
|
|
528
|
+
x.beep = BEL;
|
|
529
|
+
|
|
530
|
+
x.link = (text, url) => {
|
|
531
|
+
return [
|
|
532
|
+
OSC,
|
|
533
|
+
'8',
|
|
534
|
+
SEP,
|
|
535
|
+
SEP,
|
|
536
|
+
url,
|
|
537
|
+
BEL,
|
|
538
|
+
text,
|
|
539
|
+
OSC,
|
|
540
|
+
'8',
|
|
541
|
+
SEP,
|
|
542
|
+
SEP,
|
|
543
|
+
BEL
|
|
544
|
+
].join('');
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
x.image = (buf, opts) => {
|
|
548
|
+
opts = opts || {};
|
|
549
|
+
|
|
550
|
+
let ret = OSC + '1337;File=inline=1';
|
|
551
|
+
|
|
552
|
+
if (opts.width) {
|
|
553
|
+
ret += `;width=${opts.width}`;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (opts.height) {
|
|
557
|
+
ret += `;height=${opts.height}`;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if (opts.preserveAspectRatio === false) {
|
|
561
|
+
ret += ';preserveAspectRatio=0';
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return ret + ':' + buf.toString('base64') + BEL;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
x.iTerm = {};
|
|
568
|
+
|
|
569
|
+
x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
/***/ }),
|
|
573
|
+
|
|
5
574
|
/***/ 671:
|
|
6
575
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
576
|
|
|
@@ -24,8 +593,8 @@ var external_fs_ = __webpack_require__(896);
|
|
|
24
593
|
var external_path_ = __webpack_require__(928);
|
|
25
594
|
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
|
26
595
|
var assert = __webpack_require__(966);
|
|
27
|
-
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js +
|
|
28
|
-
var source = __webpack_require__(
|
|
596
|
+
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js + 6 modules
|
|
597
|
+
var source = __webpack_require__(276);
|
|
29
598
|
;// CONCATENATED MODULE: ./dist/bin/tools/crawl.ts
|
|
30
599
|
|
|
31
600
|
|
|
@@ -300,6 +869,7 @@ async function command(params) {
|
|
|
300
869
|
console.log(source/* default */.Ay.cyan('Select the page you want to customize:'));
|
|
301
870
|
const templateValue = 'template.ftl (Layout common to every page)';
|
|
302
871
|
const userProfileFormFieldsValue = 'user-profile-commons.ftl (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)';
|
|
872
|
+
const otherPageValue = "The page you're looking for isn't listed here";
|
|
303
873
|
const { value: pageIdOrComponent } = await dist_default()({
|
|
304
874
|
values: (() => {
|
|
305
875
|
switch (themeType) {
|
|
@@ -307,10 +877,11 @@ async function command(params) {
|
|
|
307
877
|
return [
|
|
308
878
|
templateValue,
|
|
309
879
|
userProfileFormFieldsValue,
|
|
310
|
-
...constants/* LOGIN_THEME_PAGE_IDS */.hz
|
|
880
|
+
...constants/* LOGIN_THEME_PAGE_IDS */.hz,
|
|
881
|
+
otherPageValue
|
|
311
882
|
];
|
|
312
883
|
case 'account':
|
|
313
|
-
return [templateValue, ...constants/* ACCOUNT_THEME_PAGE_IDS */.Hp];
|
|
884
|
+
return [templateValue, ...constants/* ACCOUNT_THEME_PAGE_IDS */.Hp, otherPageValue];
|
|
314
885
|
case 'admin':
|
|
315
886
|
return [];
|
|
316
887
|
}
|
|
@@ -319,6 +890,13 @@ async function command(params) {
|
|
|
319
890
|
}).catch(() => {
|
|
320
891
|
process.exit(-1);
|
|
321
892
|
});
|
|
893
|
+
if (pageIdOrComponent === otherPageValue) {
|
|
894
|
+
console.log([
|
|
895
|
+
'To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,',
|
|
896
|
+
'refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak'
|
|
897
|
+
].join(' '));
|
|
898
|
+
process.exit(0);
|
|
899
|
+
}
|
|
322
900
|
console.log(`→ ${pageIdOrComponent}`);
|
|
323
901
|
const componentRelativeDirPath_posix_to_componentRelativeFilePath_posix = (params) => {
|
|
324
902
|
const { componentRelativeDirPath_posix } = params;
|
|
@@ -635,7 +1213,7 @@ function readThisNpmPackageVersion() {
|
|
|
635
1213
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
|
|
636
1214
|
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
|
|
637
1215
|
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
|
|
638
|
-
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
1216
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(276);
|
|
639
1217
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
|
|
640
1218
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
641
1219
|
/* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
|
|
@@ -720,6 +1298,52 @@ async function runPrettier(params) {
|
|
|
720
1298
|
}
|
|
721
1299
|
|
|
722
1300
|
|
|
1301
|
+
/***/ }),
|
|
1302
|
+
|
|
1303
|
+
/***/ 94:
|
|
1304
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1305
|
+
|
|
1306
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1307
|
+
/* harmony export */ id: () => (/* binding */ id)
|
|
1308
|
+
/* harmony export */ });
|
|
1309
|
+
/** https://docs.tsafe.dev/id */
|
|
1310
|
+
const id = (x) => x;
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
//# sourceMappingURL=id.mjs.map
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
/***/ }),
|
|
1317
|
+
|
|
1318
|
+
/***/ 289:
|
|
1319
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1320
|
+
|
|
1321
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1322
|
+
/* harmony export */ is: () => (/* reexport safe */ _assert_mjs__WEBPACK_IMPORTED_MODULE_0__.is)
|
|
1323
|
+
/* harmony export */ });
|
|
1324
|
+
/* harmony import */ var _assert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
|
|
1325
|
+
|
|
1326
|
+
//# sourceMappingURL=is.mjs.map
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
/***/ }),
|
|
1330
|
+
|
|
1331
|
+
/***/ 886:
|
|
1332
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1333
|
+
|
|
1334
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1335
|
+
/* harmony export */ I: () => (/* binding */ symToStr)
|
|
1336
|
+
/* harmony export */ });
|
|
1337
|
+
/** @see <https://docs.tsafe.dev/main/symtostr> */
|
|
1338
|
+
function symToStr(wrap) {
|
|
1339
|
+
// @ts-expect-error: We know better
|
|
1340
|
+
return Object.keys(wrap)[0];
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
//# sourceMappingURL=symToStr.mjs.map
|
|
1345
|
+
|
|
1346
|
+
|
|
723
1347
|
/***/ })
|
|
724
1348
|
|
|
725
1349
|
};
|