@keycloakify/angular 0.2.10 → 0.2.12

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.
Files changed (80) hide show
  1. package/README.md +5 -6
  2. package/bin/187.index.js +3 -3
  3. package/bin/{811.index.js → 279.index.js} +196 -724
  4. package/bin/476.index.js +1 -675
  5. package/bin/671.index.js +618 -3
  6. package/bin/942.index.js +617 -2
  7. package/bin/index.js +686 -21
  8. package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
  9. package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
  10. package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
  11. package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
  12. package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
  13. package/fesm2022/keycloakify-angular-account-pages-password.mjs +3 -3
  14. package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
  15. package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
  16. package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
  17. package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
  18. package/fesm2022/keycloakify-angular-account-template.mjs +3 -3
  19. package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +3 -3
  20. package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
  21. package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
  22. package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
  23. package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
  24. package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
  25. package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +3 -3
  26. package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +3 -3
  27. package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +3 -3
  28. package/fesm2022/keycloakify-angular-login-components-group-label.mjs +3 -3
  29. package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +3 -3
  30. package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +3 -3
  31. package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +3 -3
  32. package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
  33. package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +3 -3
  34. package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +3 -3
  35. package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +3 -3
  36. package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +3 -3
  37. package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
  38. package/fesm2022/keycloakify-angular-login-pages-code.mjs +3 -3
  39. package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +3 -3
  40. package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +3 -3
  41. package/fesm2022/keycloakify-angular-login-pages-error.mjs +3 -3
  42. package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +3 -3
  43. package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +3 -3
  44. package/fesm2022/keycloakify-angular-login-pages-info.mjs +3 -3
  45. package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +3 -3
  46. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +3 -3
  47. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +3 -3
  48. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +3 -3
  49. package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +3 -3
  50. package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +3 -3
  51. package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +3 -3
  52. package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +3 -3
  53. package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +3 -3
  54. package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +3 -3
  55. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +3 -3
  56. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +3 -3
  57. package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +3 -3
  58. package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +3 -3
  59. package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +3 -3
  60. package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +3 -3
  61. package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +3 -3
  62. package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +3 -3
  63. package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +3 -3
  64. package/fesm2022/keycloakify-angular-login-pages-login.mjs +3 -3
  65. package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +3 -3
  66. package/fesm2022/keycloakify-angular-login-pages-register.mjs +3 -3
  67. package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +3 -3
  68. package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +3 -3
  69. package/fesm2022/keycloakify-angular-login-pages-terms.mjs +3 -3
  70. package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +3 -3
  71. package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +3 -3
  72. package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +3 -3
  73. package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +3 -3
  74. package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
  75. package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +3 -3
  76. package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +3 -3
  77. package/fesm2022/keycloakify-angular-login-template.mjs +3 -3
  78. package/package.json +2 -2
  79. package/src/bin/main.ts +9 -0
  80. package/bin/986.index.js +0 -1294
package/bin/476.index.js CHANGED
@@ -119,7 +119,7 @@ function readThisNpmPackageVersion() {
119
119
  /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
120
120
  /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
121
121
  /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
122
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(797);
122
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(276);
123
123
  /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
124
124
  /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
125
125
  /* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
@@ -364,680 +364,6 @@ async function command(params) {
364
364
  }
365
365
 
366
366
 
367
- /***/ }),
368
-
369
- /***/ 797:
370
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
371
-
372
-
373
- // EXPORTS
374
- __webpack_require__.d(__webpack_exports__, {
375
- Ay: () => (/* binding */ source)
376
- });
377
-
378
- // UNUSED EXPORTS: Chalk, backgroundColorNames, backgroundColors, chalkStderr, colorNames, colors, foregroundColorNames, foregroundColors, modifierNames, modifiers, supportsColor, supportsColorStderr
379
-
380
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/ansi-styles/index.js
381
- const ANSI_BACKGROUND_OFFSET = 10;
382
-
383
- const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
384
-
385
- const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
386
-
387
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
388
-
389
- const styles = {
390
- modifier: {
391
- reset: [0, 0],
392
- // 21 isn't widely supported and 22 does the same thing
393
- bold: [1, 22],
394
- dim: [2, 22],
395
- italic: [3, 23],
396
- underline: [4, 24],
397
- overline: [53, 55],
398
- inverse: [7, 27],
399
- hidden: [8, 28],
400
- strikethrough: [9, 29],
401
- },
402
- color: {
403
- black: [30, 39],
404
- red: [31, 39],
405
- green: [32, 39],
406
- yellow: [33, 39],
407
- blue: [34, 39],
408
- magenta: [35, 39],
409
- cyan: [36, 39],
410
- white: [37, 39],
411
-
412
- // Bright color
413
- blackBright: [90, 39],
414
- gray: [90, 39], // Alias of `blackBright`
415
- grey: [90, 39], // Alias of `blackBright`
416
- redBright: [91, 39],
417
- greenBright: [92, 39],
418
- yellowBright: [93, 39],
419
- blueBright: [94, 39],
420
- magentaBright: [95, 39],
421
- cyanBright: [96, 39],
422
- whiteBright: [97, 39],
423
- },
424
- bgColor: {
425
- bgBlack: [40, 49],
426
- bgRed: [41, 49],
427
- bgGreen: [42, 49],
428
- bgYellow: [43, 49],
429
- bgBlue: [44, 49],
430
- bgMagenta: [45, 49],
431
- bgCyan: [46, 49],
432
- bgWhite: [47, 49],
433
-
434
- // Bright color
435
- bgBlackBright: [100, 49],
436
- bgGray: [100, 49], // Alias of `bgBlackBright`
437
- bgGrey: [100, 49], // Alias of `bgBlackBright`
438
- bgRedBright: [101, 49],
439
- bgGreenBright: [102, 49],
440
- bgYellowBright: [103, 49],
441
- bgBlueBright: [104, 49],
442
- bgMagentaBright: [105, 49],
443
- bgCyanBright: [106, 49],
444
- bgWhiteBright: [107, 49],
445
- },
446
- };
447
-
448
- const modifierNames = Object.keys(styles.modifier);
449
- const foregroundColorNames = Object.keys(styles.color);
450
- const backgroundColorNames = Object.keys(styles.bgColor);
451
- const colorNames = [...foregroundColorNames, ...backgroundColorNames];
452
-
453
- function assembleStyles() {
454
- const codes = new Map();
455
-
456
- for (const [groupName, group] of Object.entries(styles)) {
457
- for (const [styleName, style] of Object.entries(group)) {
458
- styles[styleName] = {
459
- open: `\u001B[${style[0]}m`,
460
- close: `\u001B[${style[1]}m`,
461
- };
462
-
463
- group[styleName] = styles[styleName];
464
-
465
- codes.set(style[0], style[1]);
466
- }
467
-
468
- Object.defineProperty(styles, groupName, {
469
- value: group,
470
- enumerable: false,
471
- });
472
- }
473
-
474
- Object.defineProperty(styles, 'codes', {
475
- value: codes,
476
- enumerable: false,
477
- });
478
-
479
- styles.color.close = '\u001B[39m';
480
- styles.bgColor.close = '\u001B[49m';
481
-
482
- styles.color.ansi = wrapAnsi16();
483
- styles.color.ansi256 = wrapAnsi256();
484
- styles.color.ansi16m = wrapAnsi16m();
485
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
486
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
487
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
488
-
489
- // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
490
- Object.defineProperties(styles, {
491
- rgbToAnsi256: {
492
- value(red, green, blue) {
493
- // We use the extended greyscale palette here, with the exception of
494
- // black and white. normal palette only has 4 greyscale shades.
495
- if (red === green && green === blue) {
496
- if (red < 8) {
497
- return 16;
498
- }
499
-
500
- if (red > 248) {
501
- return 231;
502
- }
503
-
504
- return Math.round(((red - 8) / 247) * 24) + 232;
505
- }
506
-
507
- return 16
508
- + (36 * Math.round(red / 255 * 5))
509
- + (6 * Math.round(green / 255 * 5))
510
- + Math.round(blue / 255 * 5);
511
- },
512
- enumerable: false,
513
- },
514
- hexToRgb: {
515
- value(hex) {
516
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
517
- if (!matches) {
518
- return [0, 0, 0];
519
- }
520
-
521
- let [colorString] = matches;
522
-
523
- if (colorString.length === 3) {
524
- colorString = [...colorString].map(character => character + character).join('');
525
- }
526
-
527
- const integer = Number.parseInt(colorString, 16);
528
-
529
- return [
530
- /* eslint-disable no-bitwise */
531
- (integer >> 16) & 0xFF,
532
- (integer >> 8) & 0xFF,
533
- integer & 0xFF,
534
- /* eslint-enable no-bitwise */
535
- ];
536
- },
537
- enumerable: false,
538
- },
539
- hexToAnsi256: {
540
- value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
541
- enumerable: false,
542
- },
543
- ansi256ToAnsi: {
544
- value(code) {
545
- if (code < 8) {
546
- return 30 + code;
547
- }
548
-
549
- if (code < 16) {
550
- return 90 + (code - 8);
551
- }
552
-
553
- let red;
554
- let green;
555
- let blue;
556
-
557
- if (code >= 232) {
558
- red = (((code - 232) * 10) + 8) / 255;
559
- green = red;
560
- blue = red;
561
- } else {
562
- code -= 16;
563
-
564
- const remainder = code % 36;
565
-
566
- red = Math.floor(code / 36) / 5;
567
- green = Math.floor(remainder / 6) / 5;
568
- blue = (remainder % 6) / 5;
569
- }
570
-
571
- const value = Math.max(red, green, blue) * 2;
572
-
573
- if (value === 0) {
574
- return 30;
575
- }
576
-
577
- // eslint-disable-next-line no-bitwise
578
- let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
579
-
580
- if (value === 2) {
581
- result += 60;
582
- }
583
-
584
- return result;
585
- },
586
- enumerable: false,
587
- },
588
- rgbToAnsi: {
589
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
590
- enumerable: false,
591
- },
592
- hexToAnsi: {
593
- value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
594
- enumerable: false,
595
- },
596
- });
597
-
598
- return styles;
599
- }
600
-
601
- const ansiStyles = assembleStyles();
602
-
603
- /* harmony default export */ const ansi_styles = (ansiStyles);
604
-
605
- // EXTERNAL MODULE: external "node:process"
606
- var external_node_process_ = __webpack_require__(708);
607
- // EXTERNAL MODULE: external "node:os"
608
- var external_node_os_ = __webpack_require__(161);
609
- // EXTERNAL MODULE: external "node:tty"
610
- var external_node_tty_ = __webpack_require__(66);
611
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/supports-color/index.js
612
-
613
-
614
-
615
-
616
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
617
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
618
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_.argv) {
619
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
620
- const position = argv.indexOf(prefix + flag);
621
- const terminatorPosition = argv.indexOf('--');
622
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
623
- }
624
-
625
- const {env} = external_node_process_;
626
-
627
- let flagForceColor;
628
- if (
629
- hasFlag('no-color')
630
- || hasFlag('no-colors')
631
- || hasFlag('color=false')
632
- || hasFlag('color=never')
633
- ) {
634
- flagForceColor = 0;
635
- } else if (
636
- hasFlag('color')
637
- || hasFlag('colors')
638
- || hasFlag('color=true')
639
- || hasFlag('color=always')
640
- ) {
641
- flagForceColor = 1;
642
- }
643
-
644
- function envForceColor() {
645
- if ('FORCE_COLOR' in env) {
646
- if (env.FORCE_COLOR === 'true') {
647
- return 1;
648
- }
649
-
650
- if (env.FORCE_COLOR === 'false') {
651
- return 0;
652
- }
653
-
654
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
655
- }
656
- }
657
-
658
- function translateLevel(level) {
659
- if (level === 0) {
660
- return false;
661
- }
662
-
663
- return {
664
- level,
665
- hasBasic: true,
666
- has256: level >= 2,
667
- has16m: level >= 3,
668
- };
669
- }
670
-
671
- function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
672
- const noFlagForceColor = envForceColor();
673
- if (noFlagForceColor !== undefined) {
674
- flagForceColor = noFlagForceColor;
675
- }
676
-
677
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
678
-
679
- if (forceColor === 0) {
680
- return 0;
681
- }
682
-
683
- if (sniffFlags) {
684
- if (hasFlag('color=16m')
685
- || hasFlag('color=full')
686
- || hasFlag('color=truecolor')) {
687
- return 3;
688
- }
689
-
690
- if (hasFlag('color=256')) {
691
- return 2;
692
- }
693
- }
694
-
695
- // Check for Azure DevOps pipelines.
696
- // Has to be above the `!streamIsTTY` check.
697
- if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
698
- return 1;
699
- }
700
-
701
- if (haveStream && !streamIsTTY && forceColor === undefined) {
702
- return 0;
703
- }
704
-
705
- const min = forceColor || 0;
706
-
707
- if (env.TERM === 'dumb') {
708
- return min;
709
- }
710
-
711
- if (external_node_process_.platform === 'win32') {
712
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
713
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
714
- const osRelease = external_node_os_.release().split('.');
715
- if (
716
- Number(osRelease[0]) >= 10
717
- && Number(osRelease[2]) >= 10_586
718
- ) {
719
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
720
- }
721
-
722
- return 1;
723
- }
724
-
725
- if ('CI' in env) {
726
- if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
727
- return 3;
728
- }
729
-
730
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
731
- return 1;
732
- }
733
-
734
- return min;
735
- }
736
-
737
- if ('TEAMCITY_VERSION' in env) {
738
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
739
- }
740
-
741
- if (env.COLORTERM === 'truecolor') {
742
- return 3;
743
- }
744
-
745
- if (env.TERM === 'xterm-kitty') {
746
- return 3;
747
- }
748
-
749
- if ('TERM_PROGRAM' in env) {
750
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
751
-
752
- switch (env.TERM_PROGRAM) {
753
- case 'iTerm.app': {
754
- return version >= 3 ? 3 : 2;
755
- }
756
-
757
- case 'Apple_Terminal': {
758
- return 2;
759
- }
760
- // No default
761
- }
762
- }
763
-
764
- if (/-256(color)?$/i.test(env.TERM)) {
765
- return 2;
766
- }
767
-
768
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
769
- return 1;
770
- }
771
-
772
- if ('COLORTERM' in env) {
773
- return 1;
774
- }
775
-
776
- return min;
777
- }
778
-
779
- function createSupportsColor(stream, options = {}) {
780
- const level = _supportsColor(stream, {
781
- streamIsTTY: stream && stream.isTTY,
782
- ...options,
783
- });
784
-
785
- return translateLevel(level);
786
- }
787
-
788
- const supportsColor = {
789
- stdout: createSupportsColor({isTTY: external_node_tty_.isatty(1)}),
790
- stderr: createSupportsColor({isTTY: external_node_tty_.isatty(2)}),
791
- };
792
-
793
- /* harmony default export */ const supports_color = (supportsColor);
794
-
795
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/utilities.js
796
- // TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
797
- function stringReplaceAll(string, substring, replacer) {
798
- let index = string.indexOf(substring);
799
- if (index === -1) {
800
- return string;
801
- }
802
-
803
- const substringLength = substring.length;
804
- let endIndex = 0;
805
- let returnValue = '';
806
- do {
807
- returnValue += string.slice(endIndex, index) + substring + replacer;
808
- endIndex = index + substringLength;
809
- index = string.indexOf(substring, endIndex);
810
- } while (index !== -1);
811
-
812
- returnValue += string.slice(endIndex);
813
- return returnValue;
814
- }
815
-
816
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
817
- let endIndex = 0;
818
- let returnValue = '';
819
- do {
820
- const gotCR = string[index - 1] === '\r';
821
- returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
822
- endIndex = index + 1;
823
- index = string.indexOf('\n', endIndex);
824
- } while (index !== -1);
825
-
826
- returnValue += string.slice(endIndex);
827
- return returnValue;
828
- }
829
-
830
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/index.js
831
-
832
-
833
-
834
-
835
- const {stdout: stdoutColor, stderr: stderrColor} = supports_color;
836
-
837
- const GENERATOR = Symbol('GENERATOR');
838
- const STYLER = Symbol('STYLER');
839
- const IS_EMPTY = Symbol('IS_EMPTY');
840
-
841
- // `supportsColor.level` → `ansiStyles.color[name]` mapping
842
- const levelMapping = [
843
- 'ansi',
844
- 'ansi',
845
- 'ansi256',
846
- 'ansi16m',
847
- ];
848
-
849
- const source_styles = Object.create(null);
850
-
851
- const applyOptions = (object, options = {}) => {
852
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
853
- throw new Error('The `level` option should be an integer from 0 to 3');
854
- }
855
-
856
- // Detect level if not set manually
857
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
858
- object.level = options.level === undefined ? colorLevel : options.level;
859
- };
860
-
861
- class Chalk {
862
- constructor(options) {
863
- // eslint-disable-next-line no-constructor-return
864
- return chalkFactory(options);
865
- }
866
- }
867
-
868
- const chalkFactory = options => {
869
- const chalk = (...strings) => strings.join(' ');
870
- applyOptions(chalk, options);
871
-
872
- Object.setPrototypeOf(chalk, createChalk.prototype);
873
-
874
- return chalk;
875
- };
876
-
877
- function createChalk(options) {
878
- return chalkFactory(options);
879
- }
880
-
881
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
882
-
883
- for (const [styleName, style] of Object.entries(ansi_styles)) {
884
- source_styles[styleName] = {
885
- get() {
886
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
887
- Object.defineProperty(this, styleName, {value: builder});
888
- return builder;
889
- },
890
- };
891
- }
892
-
893
- source_styles.visible = {
894
- get() {
895
- const builder = createBuilder(this, this[STYLER], true);
896
- Object.defineProperty(this, 'visible', {value: builder});
897
- return builder;
898
- },
899
- };
900
-
901
- const getModelAnsi = (model, level, type, ...arguments_) => {
902
- if (model === 'rgb') {
903
- if (level === 'ansi16m') {
904
- return ansi_styles[type].ansi16m(...arguments_);
905
- }
906
-
907
- if (level === 'ansi256') {
908
- return ansi_styles[type].ansi256(ansi_styles.rgbToAnsi256(...arguments_));
909
- }
910
-
911
- return ansi_styles[type].ansi(ansi_styles.rgbToAnsi(...arguments_));
912
- }
913
-
914
- if (model === 'hex') {
915
- return getModelAnsi('rgb', level, type, ...ansi_styles.hexToRgb(...arguments_));
916
- }
917
-
918
- return ansi_styles[type][model](...arguments_);
919
- };
920
-
921
- const usedModels = ['rgb', 'hex', 'ansi256'];
922
-
923
- for (const model of usedModels) {
924
- source_styles[model] = {
925
- get() {
926
- const {level} = this;
927
- return function (...arguments_) {
928
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansi_styles.color.close, this[STYLER]);
929
- return createBuilder(this, styler, this[IS_EMPTY]);
930
- };
931
- },
932
- };
933
-
934
- const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
935
- source_styles[bgModel] = {
936
- get() {
937
- const {level} = this;
938
- return function (...arguments_) {
939
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansi_styles.bgColor.close, this[STYLER]);
940
- return createBuilder(this, styler, this[IS_EMPTY]);
941
- };
942
- },
943
- };
944
- }
945
-
946
- const proto = Object.defineProperties(() => {}, {
947
- ...source_styles,
948
- level: {
949
- enumerable: true,
950
- get() {
951
- return this[GENERATOR].level;
952
- },
953
- set(level) {
954
- this[GENERATOR].level = level;
955
- },
956
- },
957
- });
958
-
959
- const createStyler = (open, close, parent) => {
960
- let openAll;
961
- let closeAll;
962
- if (parent === undefined) {
963
- openAll = open;
964
- closeAll = close;
965
- } else {
966
- openAll = parent.openAll + open;
967
- closeAll = close + parent.closeAll;
968
- }
969
-
970
- return {
971
- open,
972
- close,
973
- openAll,
974
- closeAll,
975
- parent,
976
- };
977
- };
978
-
979
- const createBuilder = (self, _styler, _isEmpty) => {
980
- // Single argument is hot path, implicit coercion is faster than anything
981
- // eslint-disable-next-line no-implicit-coercion
982
- const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
983
-
984
- // We alter the prototype because we must return a function, but there is
985
- // no way to create a function with a different prototype
986
- Object.setPrototypeOf(builder, proto);
987
-
988
- builder[GENERATOR] = self;
989
- builder[STYLER] = _styler;
990
- builder[IS_EMPTY] = _isEmpty;
991
-
992
- return builder;
993
- };
994
-
995
- const applyStyle = (self, string) => {
996
- if (self.level <= 0 || !string) {
997
- return self[IS_EMPTY] ? '' : string;
998
- }
999
-
1000
- let styler = self[STYLER];
1001
-
1002
- if (styler === undefined) {
1003
- return string;
1004
- }
1005
-
1006
- const {openAll, closeAll} = styler;
1007
- if (string.includes('\u001B')) {
1008
- while (styler !== undefined) {
1009
- // Replace any instances already present with a re-opening code
1010
- // otherwise only the part of the string until said closing code
1011
- // will be colored, and the rest will simply be 'plain'.
1012
- string = stringReplaceAll(string, styler.close, styler.open);
1013
-
1014
- styler = styler.parent;
1015
- }
1016
- }
1017
-
1018
- // We can move both next actions out of loop, because remaining actions in loop won't have
1019
- // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
1020
- // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
1021
- const lfIndex = string.indexOf('\n');
1022
- if (lfIndex !== -1) {
1023
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1024
- }
1025
-
1026
- return openAll + string + closeAll;
1027
- };
1028
-
1029
- Object.defineProperties(createChalk.prototype, source_styles);
1030
-
1031
- const chalk = createChalk();
1032
- const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
1033
-
1034
-
1035
-
1036
-
1037
-
1038
- /* harmony default export */ const source = (chalk);
1039
-
1040
-
1041
367
  /***/ }),
1042
368
 
1043
369
  /***/ 94: