@keycloakify/angular 0.0.1-rc.20 → 0.0.1-rc.22
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/account/account.d.ts +12 -0
- package/account/defaultPage.d.ts +3 -0
- package/{login/getDefaultPageComponent → account}/index.d.ts +1 -1
- package/account/providers/keycloakify-angular/keycloakify-angular.providers.d.ts +1 -1
- package/account/public-api.d.ts +1 -0
- package/bin/338.index.js +298 -0
- package/bin/755.index.js +4928 -0
- package/bin/758.index.js +130 -0
- package/bin/925.index.js +1712 -0
- package/bin/main.js +334 -105
- package/esm2022/account/account.mjs +3 -0
- package/esm2022/account/defaultPage.mjs +26 -0
- package/esm2022/account/keycloakify-angular-account.mjs +5 -0
- package/esm2022/account/pages/account/account.component.mjs +2 -3
- package/esm2022/account/pages/applications/applications.component.mjs +2 -3
- package/esm2022/account/pages/federatedIdentity/federatedIdentity.component.mjs +2 -3
- package/esm2022/account/pages/log/log.component.mjs +2 -3
- package/esm2022/account/pages/password/password.component.mjs +2 -3
- package/esm2022/account/pages/sessions/sessions.component.mjs +2 -3
- package/esm2022/account/pages/totp/totp.component.mjs +2 -3
- package/esm2022/account/providers/keycloakify-angular/keycloakify-angular.providers.mjs +2 -2
- package/esm2022/account/public-api.mjs +2 -0
- package/esm2022/login/containers/template/template.component.mjs +4 -10
- package/esm2022/login/defaultPage.mjs +77 -0
- package/esm2022/login/keycloakify-angular-login.mjs +5 -0
- package/esm2022/login/login.mjs +3 -0
- package/esm2022/login/pages/code/code.component.mjs +2 -3
- package/esm2022/login/pages/delete-account-confirm/delete-account-confirm.component.mjs +1 -1
- package/esm2022/login/pages/delete-credential/delete-credential.component.mjs +2 -3
- package/esm2022/login/pages/error/error.component.mjs +2 -3
- package/esm2022/login/pages/frontchannel-logout/frontchannel-logout.component.mjs +2 -3
- package/esm2022/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +7 -8
- package/esm2022/login/pages/info/info.component.mjs +2 -3
- package/esm2022/login/pages/login/login.component.mjs +2 -3
- package/esm2022/login/pages/login-config-totp/login-config-totp.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +2 -3
- package/esm2022/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +2 -3
- package/esm2022/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.mjs +2 -3
- package/esm2022/login/pages/login-otp/login-otp.component.mjs +2 -3
- package/esm2022/login/pages/login-page-expired/login-page-expired.component.mjs +2 -3
- package/esm2022/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +2 -3
- package/esm2022/login/pages/login-password/login-password.component.mjs +2 -3
- package/esm2022/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.mjs +2 -3
- package/esm2022/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +2 -3
- package/esm2022/login/pages/login-reset-otp/login-reset-otp.component.mjs +2 -3
- package/esm2022/login/pages/login-reset-password/login-reset-password.component.mjs +2 -3
- package/esm2022/login/pages/login-update-password/login-update-password.component.mjs +2 -3
- package/esm2022/login/pages/login-update-profile/login-update-profile.component.mjs +7 -8
- package/esm2022/login/pages/login-username/login-username.component.mjs +2 -3
- package/esm2022/login/pages/login-verify-email/login-verify-email.component.mjs +2 -3
- package/esm2022/login/pages/login-x509-info/login-x509-info.component.mjs +2 -3
- package/esm2022/login/pages/logout-confirm/logout-confirm.component.mjs +2 -3
- package/esm2022/login/pages/register/register.component.mjs +7 -8
- package/esm2022/login/pages/saml-post-form/saml-post-form.component.mjs +2 -3
- package/esm2022/login/pages/select-authenticator/select-authenticator.component.mjs +2 -3
- package/esm2022/login/pages/terms/terms.component.mjs +2 -3
- package/esm2022/login/pages/update-email/update-email.component.mjs +7 -8
- package/esm2022/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +2 -3
- package/esm2022/login/pages/webauthn-error/webauthn-error.component.mjs +2 -3
- package/esm2022/login/pages/webauthn-register/webauthn-register.component.mjs +2 -3
- package/esm2022/login/providers/keycloakify-angular/keycloakify-angular.providers.mjs +2 -2
- package/esm2022/login/public-api.mjs +2 -0
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-account.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-log.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-providers-keycloakify-angular.mjs +2 -2
- package/fesm2022/keycloakify-angular-account-providers-keycloakify-angular.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account.mjs +34 -0
- package/fesm2022/keycloakify-angular-account.mjs.map +1 -0
- package/fesm2022/keycloakify-angular-login-containers-template.mjs +3 -9
- package/fesm2022/keycloakify-angular-login-containers-template.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +7 -8
- package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs.map +1 -1
- package/fesm2022/{keycloakify-angular-login-getDefaultPageComponent.mjs → keycloakify-angular-login.mjs} +3 -1
- package/fesm2022/keycloakify-angular-login.mjs.map +1 -0
- package/login/containers/template/template.component.d.ts +2 -4
- package/login/index.d.ts +5 -0
- package/login/login.d.ts +13 -0
- package/login/pages/code/code.component.d.ts +1 -1
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +1 -1
- package/login/pages/delete-credential/delete-credential.component.d.ts +1 -1
- package/login/pages/error/error.component.d.ts +1 -1
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +1 -1
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +2 -4
- package/login/pages/info/info.component.d.ts +1 -1
- package/login/pages/login/login.component.d.ts +1 -1
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +1 -1
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +1 -1
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +1 -1
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +1 -1
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +1 -1
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +1 -1
- package/login/pages/login-otp/login-otp.component.d.ts +1 -1
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +1 -1
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +1 -1
- package/login/pages/login-password/login-password.component.d.ts +1 -1
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +1 -1
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +1 -1
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +1 -1
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +1 -1
- package/login/pages/login-update-password/login-update-password.component.d.ts +1 -1
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +2 -4
- package/login/pages/login-username/login-username.component.d.ts +1 -1
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +1 -1
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +1 -1
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +1 -1
- package/login/pages/register/register.component.d.ts +2 -4
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +1 -1
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +1 -1
- package/login/pages/terms/terms.component.d.ts +1 -1
- package/login/pages/update-email/update-email.component.d.ts +2 -4
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +1 -1
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +1 -1
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +1 -1
- package/login/providers/keycloakify-angular/keycloakify-angular.providers.d.ts +1 -1
- package/login/public-api.d.ts +1 -0
- package/package.json +21 -15
- package/src/account/DefaultPage.ts +1 -1
- package/src/account/account.ts +13 -0
- package/src/account/classes/component-reference/index.ts +1 -0
- package/src/account/containers/template/index.ts +1 -0
- package/src/account/containers/template/template.component.ts +2 -2
- package/src/account/defaultPage.ts +44 -0
- package/src/account/directives/kc-class/index.ts +1 -0
- package/src/account/index.ts +1 -0
- package/src/account/pages/account/account.component.ts +3 -4
- package/src/account/pages/account/index.ts +1 -0
- package/src/account/pages/applications/applications.component.ts +3 -4
- package/src/account/pages/applications/index.ts +1 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.ts +3 -4
- package/src/account/pages/federatedIdentity/index.ts +1 -0
- package/src/account/pages/log/index.ts +1 -0
- package/src/account/pages/log/log.component.ts +3 -4
- package/src/account/pages/password/index.ts +1 -0
- package/src/account/pages/password/password.component.ts +3 -4
- package/src/account/pages/sessions/index.ts +1 -0
- package/src/account/pages/sessions/sessions.component.ts +3 -4
- package/src/account/pages/totp/index.ts +1 -0
- package/src/account/pages/totp/totp.component.ts +3 -4
- package/src/account/providers/keycloakify-angular/index.ts +1 -0
- package/src/account/providers/keycloakify-angular/keycloakify-angular.providers.ts +2 -4
- package/src/account/services/account-resource-injector/account-resource-injector.service.ts +1 -1
- package/src/account/services/account-resource-injector/index.ts +1 -0
- package/src/account/services/i18n/index.ts +1 -0
- package/src/account/tokens/classes/index.ts +1 -0
- package/src/account/tokens/i18n/index.ts +1 -0
- package/src/account/tokens/kc-context/index.ts +1 -0
- package/src/account/tokens/kc-context/kc-context.token.ts +1 -1
- package/src/bin/core.ts +10 -0
- package/src/bin/eject-page.ts +310 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContext.ts +11 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContextMock.ts +18 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPage.ts +19 -0
- package/src/bin/initialize-account-theme/boilerplate/i18n.ts +11 -0
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +98 -0
- package/src/bin/initialize-account-theme/updateAccountThemeImplementationInConfig.ts +99 -0
- package/src/bin/main.ts +38 -0
- package/src/bin/tools/SemVer.ts +114 -0
- package/src/bin/tools/String.prototype.replaceAll.ts +37 -0
- package/src/bin/tools/crawl.ts +35 -0
- package/src/bin/tools/fs.rmSync.ts +34 -0
- package/src/bin/tools/getThisCodebaseRootDirPath.ts +19 -0
- package/src/bin/tools/kebabCaseToSnakeCase.ts +7 -0
- package/src/bin/tools/transformCodebase.ts +88 -0
- package/src/bin/tsconfig.json +20 -0
- package/src/bin/update-kc-gen.ts +135 -0
- package/src/index.ts +1 -0
- package/src/lib/directives/attributes/index.ts +1 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/models/script/index.ts +1 -0
- package/src/lib/pipes/input-type/index.ts +1 -0
- package/src/lib/pipes/is-array-with-empty-object/index.ts +1 -0
- package/src/lib/pipes/kc-sanitize/index.ts +1 -0
- package/src/lib/pipes/to-array/index.ts +1 -0
- package/src/lib/pipes/to-number/index.ts +1 -0
- package/src/lib/services/resource-injector/index.ts +1 -0
- package/src/lib/tokens/use-default-css/index.ts +1 -0
- package/src/login/classes/component-reference/index.ts +1 -0
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +1 -1
- package/src/login/components/add-remove-buttons-multi-valued-attribute/index.ts +1 -0
- package/src/login/components/field-errors/index.ts +1 -0
- package/src/login/components/group-label/group-label.component.ts +1 -1
- package/src/login/components/group-label/index.ts +1 -0
- package/src/login/components/input-field-by-type/index.ts +1 -0
- package/src/login/components/input-tag/index.ts +1 -0
- package/src/login/components/input-tag/input-tag.component.ts +1 -1
- package/src/login/components/input-tag-selects/index.ts +1 -0
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +1 -1
- package/src/login/components/logout-other-sessions/index.ts +1 -0
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +1 -1
- package/src/login/components/password-wrapper/index.ts +1 -0
- package/src/login/components/password-wrapper/password-wrapper.component.ts +1 -1
- package/src/login/components/select-tag/index.ts +1 -0
- package/src/login/components/select-tag/select-tag.component.ts +1 -1
- package/src/login/components/textarea-tag/index.ts +1 -0
- package/src/login/components/user-profile-form-fields/index.ts +1 -0
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +2 -2
- package/src/login/containers/template/index.ts +1 -0
- package/src/login/containers/template/template.component.ts +2 -8
- package/src/login/{getDefaultPageComponent.ts → defaultPage.ts} +1 -1
- package/src/login/directives/kc-class/index.ts +1 -0
- package/src/login/index.ts +1 -0
- package/src/login/login.ts +14 -0
- package/src/login/pages/code/code.component.ts +4 -5
- package/src/login/pages/code/index.ts +1 -0
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +3 -3
- package/src/login/pages/delete-account-confirm/index.ts +1 -0
- package/src/login/pages/delete-credential/delete-credential.component.ts +4 -5
- package/src/login/pages/delete-credential/index.ts +1 -0
- package/src/login/pages/error/error.component.ts +4 -5
- package/src/login/pages/error/index.ts +1 -0
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +4 -5
- package/src/login/pages/frontchannel-logout/index.ts +1 -0
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +1 -1
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +4 -6
- package/src/login/pages/idp-review-user-profile/index.ts +1 -0
- package/src/login/pages/info/index.ts +1 -0
- package/src/login/pages/info/info.component.ts +4 -5
- package/src/login/pages/login/index.ts +1 -0
- package/src/login/pages/login/login.component.ts +4 -5
- package/src/login/pages/login-config-totp/index.ts +1 -0
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +4 -5
- package/src/login/pages/login-idp-link-confirm/index.ts +1 -0
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +4 -5
- package/src/login/pages/login-idp-link-confirm-override/index.ts +1 -0
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +4 -5
- package/src/login/pages/login-idp-link-email/index.ts +1 -0
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +4 -5
- package/src/login/pages/login-oauth-grant/index.ts +1 -0
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +4 -5
- package/src/login/pages/login-oauth2-device-verify-user-code/index.ts +1 -0
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +4 -5
- package/src/login/pages/login-otp/index.ts +1 -0
- package/src/login/pages/login-otp/login-otp.component.ts +4 -5
- package/src/login/pages/login-page-expired/index.ts +1 -0
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +4 -5
- package/src/login/pages/login-passkeys-conditional-authenticate/index.ts +1 -0
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +4 -5
- package/src/login/pages/login-password/index.ts +1 -0
- package/src/login/pages/login-password/login-password.component.ts +4 -5
- package/src/login/pages/login-recovery-authn-code-config/index.ts +1 -0
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +4 -5
- package/src/login/pages/login-recovery-authn-code-input/index.ts +1 -0
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +4 -5
- package/src/login/pages/login-reset-otp/index.ts +1 -0
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +4 -5
- package/src/login/pages/login-reset-password/index.ts +1 -0
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +4 -5
- package/src/login/pages/login-update-password/index.ts +1 -0
- package/src/login/pages/login-update-password/login-update-password.component.ts +4 -5
- package/src/login/pages/login-update-profile/index.ts +1 -0
- package/src/login/pages/login-update-profile/login-update-profile.component.html +1 -1
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +4 -6
- package/src/login/pages/login-username/index.ts +1 -0
- package/src/login/pages/login-username/login-username.component.ts +4 -5
- package/src/login/pages/login-verify-email/index.ts +1 -0
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +4 -5
- package/src/login/pages/login-x509-info/index.ts +1 -0
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +4 -5
- package/src/login/pages/logout-confirm/index.ts +1 -0
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +4 -5
- package/src/login/pages/register/index.ts +1 -0
- package/src/login/pages/register/register.component.html +1 -1
- package/src/login/pages/register/register.component.ts +4 -6
- package/src/login/pages/saml-post-form/index.ts +1 -0
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +4 -5
- package/src/login/pages/select-authenticator/index.ts +1 -0
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +4 -5
- package/src/login/pages/terms/index.ts +1 -0
- package/src/login/pages/terms/terms.component.ts +4 -5
- package/src/login/pages/update-email/index.ts +1 -0
- package/src/login/pages/update-email/update-email.component.html +1 -1
- package/src/login/pages/update-email/update-email.component.ts +4 -6
- package/src/login/pages/webauthn-authenticate/index.ts +1 -0
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +4 -5
- package/src/login/pages/webauthn-error/index.ts +1 -0
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +4 -5
- package/src/login/pages/webauthn-register/index.ts +1 -0
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +4 -5
- package/src/login/providers/keycloakify-angular/index.ts +1 -0
- package/src/login/providers/keycloakify-angular/keycloakify-angular.providers.ts +2 -2
- package/src/login/services/i18n/index.ts +1 -0
- package/src/login/services/login-resource-injector/index.ts +1 -0
- package/src/login/services/login-resource-injector/login-resource-injector.service.ts +1 -1
- package/src/login/services/submit/index.ts +1 -0
- package/src/login/services/user-profile-form/index.ts +1 -0
- package/src/login/services/user-profile-form/user-profile-form.service.ts +2 -2
- package/src/login/tokens/classes/index.ts +1 -0
- package/src/login/tokens/i18n/index.ts +1 -0
- package/src/login/tokens/kc-context/index.ts +1 -0
- package/src/login/tokens/kc-context/kc-context.token.ts +1 -1
- package/src/login/tokens/make-user-confirm-password/index.ts +1 -0
- package/esm2022/login/getDefaultPageComponent/getDefaultPageComponent.mjs +0 -77
- package/esm2022/login/getDefaultPageComponent/keycloakify-angular-login-getDefaultPageComponent.mjs +0 -5
- package/esm2022/login/getDefaultPageComponent/public-api.mjs +0 -2
- package/fesm2022/keycloakify-angular-login-getDefaultPageComponent.mjs.map +0 -1
- package/login/getDefaultPageComponent/public-api.d.ts +0 -1
- /package/login/{getDefaultPageComponent/getDefaultPageComponent.d.ts → defaultPage.d.ts} +0 -0
- /package/{stories → src/stories}/login/pages/login/login.stories.ts +0 -0
package/bin/925.index.js
ADDED
|
@@ -0,0 +1,1712 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 925;
|
|
3
|
+
exports.ids = [925];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 925:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// EXPORTS
|
|
11
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
command: () => (/* binding */ command)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// EXTERNAL MODULE: ./dist/bin/tools/getThisCodebaseRootDirPath.js
|
|
16
|
+
var getThisCodebaseRootDirPath = __webpack_require__(427);
|
|
17
|
+
// EXTERNAL MODULE: ./node_modules/cli-select/dist/index.js
|
|
18
|
+
var dist = __webpack_require__(546);
|
|
19
|
+
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
20
|
+
// EXTERNAL MODULE: ./node_modules/keycloakify/bin/shared/constants.js
|
|
21
|
+
var constants = __webpack_require__(316);
|
|
22
|
+
// EXTERNAL MODULE: external "fs"
|
|
23
|
+
var external_fs_ = __webpack_require__(896);
|
|
24
|
+
// EXTERNAL MODULE: external "path"
|
|
25
|
+
var external_path_ = __webpack_require__(928);
|
|
26
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 2 modules
|
|
27
|
+
var assert = __webpack_require__(249);
|
|
28
|
+
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js + 3 modules
|
|
29
|
+
var source = __webpack_require__(797);
|
|
30
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/crawl.js
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const crawlRec = (dirPath, filePaths) => {
|
|
34
|
+
for (const basename of external_fs_.readdirSync(dirPath)) {
|
|
35
|
+
const fileOrDirPath = (0,external_path_.join)(dirPath, basename);
|
|
36
|
+
if (external_fs_.lstatSync(fileOrDirPath).isDirectory()) {
|
|
37
|
+
crawlRec(fileOrDirPath, filePaths);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
filePaths.push(fileOrDirPath);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/** List all files in a given directory return paths relative to the dir_path */
|
|
44
|
+
function crawl(params) {
|
|
45
|
+
const { dirPath, returnedPathsType } = params;
|
|
46
|
+
const filePaths = [];
|
|
47
|
+
crawlRec(dirPath, filePaths);
|
|
48
|
+
switch (returnedPathsType) {
|
|
49
|
+
case 'absolute':
|
|
50
|
+
return filePaths;
|
|
51
|
+
case 'relative to dirPath':
|
|
52
|
+
return filePaths.map(filePath => (0,external_path_.relative)(dirPath, filePath));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/SemVer.js
|
|
57
|
+
var SemVer;
|
|
58
|
+
(function (SemVer) {
|
|
59
|
+
const bumpTypes = ['major', 'minor', 'patch', 'rc', 'no bump'];
|
|
60
|
+
function parse(versionStr) {
|
|
61
|
+
const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
|
|
62
|
+
if (!match) {
|
|
63
|
+
throw new Error(`${versionStr} is not a valid semantic version`);
|
|
64
|
+
}
|
|
65
|
+
const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
|
|
66
|
+
const str = match[3];
|
|
67
|
+
return str === undefined ? 0 : parseInt(str);
|
|
68
|
+
})() }, (() => {
|
|
69
|
+
const str = match[4];
|
|
70
|
+
return str === undefined ? {} : { rc: parseInt(str) };
|
|
71
|
+
})());
|
|
72
|
+
const initialStr = stringify(semVer);
|
|
73
|
+
Object.defineProperty(semVer, 'parsedFrom', {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
const currentStr = stringify(this);
|
|
77
|
+
if (currentStr !== initialStr) {
|
|
78
|
+
throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
|
|
79
|
+
}
|
|
80
|
+
return versionStr;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return semVer;
|
|
84
|
+
}
|
|
85
|
+
SemVer.parse = parse;
|
|
86
|
+
function stringify(v) {
|
|
87
|
+
return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? '' : `-rc.${v.rc}`}`;
|
|
88
|
+
}
|
|
89
|
+
SemVer.stringify = stringify;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* v1 < v2 => -1
|
|
93
|
+
* v1 === v2 => 0
|
|
94
|
+
* v1 > v2 => 1
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
function compare(v1, v2) {
|
|
98
|
+
const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
|
|
99
|
+
const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
|
|
100
|
+
for (const level of ['major', 'minor', 'patch', 'rc']) {
|
|
101
|
+
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
|
102
|
+
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
SemVer.compare = compare;
|
|
108
|
+
/*
|
|
109
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
|
|
110
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
|
|
111
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
|
|
112
|
+
*/
|
|
113
|
+
function bumpType(params) {
|
|
114
|
+
const versionAhead = typeof params.versionAhead === 'string'
|
|
115
|
+
? parse(params.versionAhead)
|
|
116
|
+
: params.versionAhead;
|
|
117
|
+
const versionBehind = typeof params.versionBehind === 'string'
|
|
118
|
+
? parse(params.versionBehind)
|
|
119
|
+
: params.versionBehind;
|
|
120
|
+
if (compare(versionBehind, versionAhead) === 1) {
|
|
121
|
+
throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
|
|
122
|
+
}
|
|
123
|
+
for (const level of ['major', 'minor', 'patch', 'rc']) {
|
|
124
|
+
if (versionBehind[level] !== versionAhead[level]) {
|
|
125
|
+
return level;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return 'no bump';
|
|
129
|
+
}
|
|
130
|
+
SemVer.bumpType = bumpType;
|
|
131
|
+
})(SemVer || (SemVer = {}));
|
|
132
|
+
|
|
133
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/fs.rmSync.js
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Polyfill of fs.rmSync(dirPath, { "recursive": true })
|
|
139
|
+
* For older version of Node
|
|
140
|
+
*/
|
|
141
|
+
function rmSync(dirPath, options) {
|
|
142
|
+
if (SemVer.compare(SemVer.parse(process.version), SemVer.parse('14.14.0')) > 0) {
|
|
143
|
+
external_fs_.rmSync(dirPath, options);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const { force = true } = options;
|
|
147
|
+
if (force && !external_fs_.existsSync(dirPath)) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const removeDir_rec = (dirPath) => external_fs_.readdirSync(dirPath).forEach(basename => {
|
|
151
|
+
const fileOrDirPath = (0,external_path_.join)(dirPath, basename);
|
|
152
|
+
if (external_fs_.lstatSync(fileOrDirPath).isDirectory()) {
|
|
153
|
+
removeDir_rec(fileOrDirPath);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
external_fs_.unlinkSync(fileOrDirPath);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
removeDir_rec(dirPath);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/transformCodebase.js
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Apply a transformation function to every file of directory
|
|
170
|
+
* If source and destination are the same this function can be used to apply the transformation in place
|
|
171
|
+
* like filtering out some files or modifying them.
|
|
172
|
+
* */
|
|
173
|
+
function transformCodebase(params) {
|
|
174
|
+
const { srcDirPath, transformSourceCode } = params;
|
|
175
|
+
const isTargetSameAsSource = external_path_.relative(srcDirPath, params.destDirPath) === '';
|
|
176
|
+
const destDirPath = isTargetSameAsSource
|
|
177
|
+
? external_path_.join(srcDirPath, '..', 'tmp_xOsPdkPsTdzPs34sOkHs')
|
|
178
|
+
: params.destDirPath;
|
|
179
|
+
external_fs_.mkdirSync(destDirPath, {
|
|
180
|
+
recursive: true
|
|
181
|
+
});
|
|
182
|
+
for (const fileRelativePath of crawl({
|
|
183
|
+
dirPath: srcDirPath,
|
|
184
|
+
returnedPathsType: 'relative to dirPath'
|
|
185
|
+
})) {
|
|
186
|
+
const filePath = external_path_.join(srcDirPath, fileRelativePath);
|
|
187
|
+
const destFilePath = external_path_.join(destDirPath, fileRelativePath);
|
|
188
|
+
// NOTE: Optimization, if we don't need to transform the file, just copy
|
|
189
|
+
// it using the lower level implementation.
|
|
190
|
+
if (transformSourceCode === undefined) {
|
|
191
|
+
external_fs_.mkdirSync(external_path_.dirname(destFilePath), {
|
|
192
|
+
recursive: true
|
|
193
|
+
});
|
|
194
|
+
external_fs_.copyFileSync(filePath, destFilePath);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
const transformSourceCodeResult = transformSourceCode({
|
|
198
|
+
sourceCode: external_fs_.readFileSync(filePath),
|
|
199
|
+
filePath,
|
|
200
|
+
fileRelativePath
|
|
201
|
+
});
|
|
202
|
+
if (transformSourceCodeResult === undefined) {
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
external_fs_.mkdirSync(external_path_.dirname(destFilePath), {
|
|
206
|
+
recursive: true
|
|
207
|
+
});
|
|
208
|
+
const { newFileName, modifiedSourceCode } = transformSourceCodeResult;
|
|
209
|
+
external_fs_.writeFileSync(external_path_.join(external_path_.dirname(destFilePath), newFileName !== null && newFileName !== void 0 ? newFileName : external_path_.basename(destFilePath)), modifiedSourceCode);
|
|
210
|
+
}
|
|
211
|
+
if (isTargetSameAsSource) {
|
|
212
|
+
rmSync(srcDirPath, { recursive: true });
|
|
213
|
+
external_fs_.renameSync(destDirPath, srcDirPath);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/capitalize.mjs
|
|
218
|
+
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
219
|
+
function capitalize(str) {
|
|
220
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
221
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
//# sourceMappingURL=capitalize.mjs.map
|
|
226
|
+
|
|
227
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/kebabCaseToSnakeCase.js
|
|
228
|
+
|
|
229
|
+
function kebabCaseToCamelCase(kebabCaseString) {
|
|
230
|
+
const [first, ...rest] = kebabCaseString.split('-');
|
|
231
|
+
return [first, ...rest.map(capitalize)].join('');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/String.prototype.replaceAll.js
|
|
235
|
+
function replaceAll(string, searchValue, replaceValue) {
|
|
236
|
+
if (string.replaceAll !== undefined) {
|
|
237
|
+
return string.replaceAll(searchValue, replaceValue);
|
|
238
|
+
}
|
|
239
|
+
// If the searchValue is a string
|
|
240
|
+
if (typeof searchValue === 'string') {
|
|
241
|
+
// Escape special characters in the string to be used in a regex
|
|
242
|
+
var escapedSearchValue = searchValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
243
|
+
var regex = new RegExp(escapedSearchValue, 'g');
|
|
244
|
+
return string.replace(regex, replaceValue);
|
|
245
|
+
}
|
|
246
|
+
// If the searchValue is a global RegExp, use it directly
|
|
247
|
+
if (searchValue instanceof RegExp && searchValue.global) {
|
|
248
|
+
return string.replace(searchValue, replaceValue);
|
|
249
|
+
}
|
|
250
|
+
// If the searchValue is a non-global RegExp, throw an error
|
|
251
|
+
if (searchValue instanceof RegExp) {
|
|
252
|
+
throw new TypeError('replaceAll must be called with a global RegExp');
|
|
253
|
+
}
|
|
254
|
+
// Convert searchValue to string if it's not a string or RegExp
|
|
255
|
+
var searchString = String(searchValue);
|
|
256
|
+
var regexFromString = new RegExp(searchString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
|
|
257
|
+
return string.replace(regexFromString, replaceValue);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
;// CONCATENATED MODULE: ./dist/bin/eject-page.js
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
async function command(params) {
|
|
272
|
+
const { buildContext } = params;
|
|
273
|
+
console.log(source/* default */.Ay.cyan('Theme type:'));
|
|
274
|
+
const themeType = await (async () => {
|
|
275
|
+
const values = constants/* THEME_TYPES */.qA.filter(themeType => {
|
|
276
|
+
switch (themeType) {
|
|
277
|
+
case 'account':
|
|
278
|
+
return buildContext.implementedThemeTypes.account.isImplemented;
|
|
279
|
+
case 'login':
|
|
280
|
+
return buildContext.implementedThemeTypes.login.isImplemented;
|
|
281
|
+
}
|
|
282
|
+
(0,assert/* assert */.v)(false);
|
|
283
|
+
});
|
|
284
|
+
(0,assert/* assert */.v)(values.length > 0, 'No theme is implemented in this project');
|
|
285
|
+
if (values.length === 1) {
|
|
286
|
+
return values[0];
|
|
287
|
+
}
|
|
288
|
+
const { value } = await dist_default()({
|
|
289
|
+
values
|
|
290
|
+
}).catch(() => {
|
|
291
|
+
process.exit(-1);
|
|
292
|
+
});
|
|
293
|
+
return value;
|
|
294
|
+
})();
|
|
295
|
+
console.log(`→ ${themeType}`);
|
|
296
|
+
console.log(source/* default */.Ay.cyan('Select the page you want to customize:'));
|
|
297
|
+
const templateValue = 'template.ftl (Layout common to every page)';
|
|
298
|
+
const { value: pageIdOrComponent } = await dist_default()({
|
|
299
|
+
values: (() => {
|
|
300
|
+
switch (themeType) {
|
|
301
|
+
case 'login':
|
|
302
|
+
return [templateValue, ...constants/* LOGIN_THEME_PAGE_IDS */.hz];
|
|
303
|
+
case 'account':
|
|
304
|
+
return [templateValue, ...constants/* ACCOUNT_THEME_PAGE_IDS */.Hp];
|
|
305
|
+
}
|
|
306
|
+
(0,assert/* assert */.v)(false);
|
|
307
|
+
})()
|
|
308
|
+
}).catch(() => {
|
|
309
|
+
process.exit(-1);
|
|
310
|
+
});
|
|
311
|
+
console.log(`→ ${pageIdOrComponent}`);
|
|
312
|
+
const componentDirRelativeToThemeTypePath = (() => {
|
|
313
|
+
if (pageIdOrComponent === templateValue) {
|
|
314
|
+
return (0,external_path_.join)('containers', 'template');
|
|
315
|
+
}
|
|
316
|
+
return (0,external_path_.join)('pages', pageIdOrComponent.replace(/\.ftl$/, ''));
|
|
317
|
+
})();
|
|
318
|
+
{
|
|
319
|
+
const componentDirRelativeToThemeTypePaths = [
|
|
320
|
+
componentDirRelativeToThemeTypePath
|
|
321
|
+
];
|
|
322
|
+
while (componentDirRelativeToThemeTypePaths.length !== 0) {
|
|
323
|
+
const componentDirRelativeToThemeTypePath_i = componentDirRelativeToThemeTypePaths.pop();
|
|
324
|
+
(0,assert/* assert */.v)(componentDirRelativeToThemeTypePath_i !== undefined);
|
|
325
|
+
const destDirPath = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, componentDirRelativeToThemeTypePath_i);
|
|
326
|
+
if (external_fs_.existsSync(destDirPath) && external_fs_.readdirSync(destDirPath).length !== 0) {
|
|
327
|
+
if (componentDirRelativeToThemeTypePath_i ===
|
|
328
|
+
componentDirRelativeToThemeTypePath) {
|
|
329
|
+
console.log(`${pageIdOrComponent.split('.ftl')[0]} is already ejected, ${(0,external_path_.relative)(process.cwd(), destDirPath)} already exists`);
|
|
330
|
+
process.exit(-1);
|
|
331
|
+
}
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
const localThemeTypeDirPath = (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.J)(), 'src', themeType);
|
|
335
|
+
transformCodebase({
|
|
336
|
+
srcDirPath: (0,external_path_.join)(localThemeTypeDirPath, componentDirRelativeToThemeTypePath_i),
|
|
337
|
+
destDirPath,
|
|
338
|
+
transformSourceCode: ({ filePath, sourceCode }) => {
|
|
339
|
+
if (!filePath.endsWith('.ts')) {
|
|
340
|
+
return { modifiedSourceCode: sourceCode };
|
|
341
|
+
}
|
|
342
|
+
const fileRelativeToThemeTypePath = (0,external_path_.relative)(localThemeTypeDirPath, filePath);
|
|
343
|
+
let modifiedSourceCode_str = sourceCode.toString();
|
|
344
|
+
const getPosixPathRelativeToFile = (params) => {
|
|
345
|
+
const { pathRelativeToThemeType } = params;
|
|
346
|
+
const path = (0,external_path_.relative)((0,external_path_.dirname)(fileRelativeToThemeTypePath), pathRelativeToThemeType)
|
|
347
|
+
.split(external_path_.sep)
|
|
348
|
+
.join('/');
|
|
349
|
+
return path.startsWith('.') ? path : `./${path}`;
|
|
350
|
+
};
|
|
351
|
+
modifiedSourceCode_str = replaceAll(modifiedSourceCode_str, `@keycloakify/angular/${themeType}/i18n`, getPosixPathRelativeToFile({
|
|
352
|
+
pathRelativeToThemeType: 'i18n'
|
|
353
|
+
}));
|
|
354
|
+
modifiedSourceCode_str = replaceAll(modifiedSourceCode_str, `@keycloakify/angular/${themeType}/KcContext`, getPosixPathRelativeToFile({
|
|
355
|
+
pathRelativeToThemeType: 'KcContext'
|
|
356
|
+
}));
|
|
357
|
+
modifiedSourceCode_str = modifiedSourceCode_str.replace(new RegExp(`@keycloakify/angular/${themeType}/components/([^'"]+)`, 'g'), (...[, componentDirRelativeToComponentsPath]) => {
|
|
358
|
+
const componentDirRelativeToThemeTypePath = (0,external_path_.join)('components', componentDirRelativeToComponentsPath);
|
|
359
|
+
componentDirRelativeToThemeTypePaths.push(componentDirRelativeToThemeTypePath);
|
|
360
|
+
return getPosixPathRelativeToFile({
|
|
361
|
+
pathRelativeToThemeType: componentDirRelativeToThemeTypePath
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
return {
|
|
365
|
+
modifiedSourceCode: Buffer.from(modifiedSourceCode_str, 'utf8')
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
console.log(`${source/* default */.Ay.green('✓')} ${source/* default */.Ay.bold(`.${external_path_.sep}` + (0,external_path_.relative)(process.cwd(), destDirPath))} moved from the @keycloakify/angular to your project`);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
edit_KcPage: {
|
|
373
|
+
if (pageIdOrComponent !== templateValue) {
|
|
374
|
+
break edit_KcPage;
|
|
375
|
+
}
|
|
376
|
+
const kcAppTsFilePath = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, 'KcPage.ts');
|
|
377
|
+
const kcAppTsCode = external_fs_.readFileSync(kcAppTsFilePath).toString('utf8');
|
|
378
|
+
const modifiedKcAppTsCode = (() => {
|
|
379
|
+
const componentRelativeDirPath_posix = componentDirRelativeToThemeTypePath
|
|
380
|
+
.split(external_path_.sep)
|
|
381
|
+
.join('/');
|
|
382
|
+
return kcAppTsCode.replace(`@keycloakify/angular/${themeType}/${componentRelativeDirPath_posix}`, `./${componentRelativeDirPath_posix}`);
|
|
383
|
+
})();
|
|
384
|
+
if (modifiedKcAppTsCode === kcAppTsCode) {
|
|
385
|
+
console.log(source/* default */.Ay.red('Unable to automatically update KcPage.tsx, please update it manually'));
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
external_fs_.writeFileSync(kcAppTsFilePath, Buffer.from(modifiedKcAppTsCode, 'utf8'));
|
|
389
|
+
console.log(`${source/* default */.Ay.green('✓')} ${source/* default */.Ay.bold(`.${external_path_.sep}` + (0,external_path_.relative)(process.cwd(), kcAppTsFilePath))} Updated`);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
const pageId = pageIdOrComponent;
|
|
393
|
+
console.log([
|
|
394
|
+
``,
|
|
395
|
+
`You now need to update your page router:`,
|
|
396
|
+
``,
|
|
397
|
+
`${source/* default */.Ay.bold((0,external_path_.join)('.', (0,external_path_.relative)(process.cwd(), buildContext.themeSrcDirPath), themeType, 'KcPage.ts'))}:`,
|
|
398
|
+
source/* default */.Ay.grey('```'),
|
|
399
|
+
`// ...`,
|
|
400
|
+
``,
|
|
401
|
+
...[
|
|
402
|
+
` export async function getKcPage(pageId: KcContext['pageId']): Promise<KcPage> {`,
|
|
403
|
+
` switch (pageId) {`,
|
|
404
|
+
`+ case '${pageId}':`,
|
|
405
|
+
`+ return {`,
|
|
406
|
+
`+ PageComponent: (await import('./${componentDirRelativeToThemeTypePath.split(external_path_.sep).join('/')}')).${kebabCaseToCamelCase(pageId.replace(/\.ftl$/, ''))}Component,`,
|
|
407
|
+
`+ TemplateComponent,`,
|
|
408
|
+
...(themeType === 'login' ? [`+ doMakeUserConfirmPassword,`] : []),
|
|
409
|
+
`+ doUseDefaultCss,`,
|
|
410
|
+
`+ classes,`,
|
|
411
|
+
`+ };`,
|
|
412
|
+
` //...`,
|
|
413
|
+
` default:`,
|
|
414
|
+
` return {`,
|
|
415
|
+
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
416
|
+
` TemplateComponent,`,
|
|
417
|
+
...(themeType === 'login' ? [` doMakeUserConfirmPassword,`] : []),
|
|
418
|
+
` doUseDefaultCss,`,
|
|
419
|
+
` classes,`,
|
|
420
|
+
` };`,
|
|
421
|
+
` }`,
|
|
422
|
+
` }`
|
|
423
|
+
].map(line => {
|
|
424
|
+
if (line.startsWith('+')) {
|
|
425
|
+
return source/* default */.Ay.green(line);
|
|
426
|
+
}
|
|
427
|
+
if (line.startsWith('-')) {
|
|
428
|
+
return source/* default */.Ay.red(line);
|
|
429
|
+
}
|
|
430
|
+
return source/* default */.Ay.grey(line);
|
|
431
|
+
}),
|
|
432
|
+
source/* default */.Ay.grey('```')
|
|
433
|
+
].join('\n'));
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
/***/ }),
|
|
438
|
+
|
|
439
|
+
/***/ 427:
|
|
440
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
441
|
+
|
|
442
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
443
|
+
/* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath)
|
|
444
|
+
/* harmony export */ });
|
|
445
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
|
|
446
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
447
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
|
|
448
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
function getThisCodebaseRootDirPath_rec(dirPath) {
|
|
452
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
|
|
453
|
+
return dirPath;
|
|
454
|
+
}
|
|
455
|
+
return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
|
|
456
|
+
}
|
|
457
|
+
let result = undefined;
|
|
458
|
+
function getThisCodebaseRootDirPath() {
|
|
459
|
+
if (result !== undefined) {
|
|
460
|
+
return result;
|
|
461
|
+
}
|
|
462
|
+
return (result = getThisCodebaseRootDirPath_rec(__dirname));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
/***/ }),
|
|
467
|
+
|
|
468
|
+
/***/ 672:
|
|
469
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
474
|
+
value: true
|
|
475
|
+
}));
|
|
476
|
+
exports.withPromise = exports.withCallback = void 0;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Open the input with a normal callback function
|
|
480
|
+
*
|
|
481
|
+
* @param {Input} input - input object
|
|
482
|
+
* @param {function} valueMapper - function which maps the resulting id and value back to the expected format
|
|
483
|
+
* @param {function} callback - callback function
|
|
484
|
+
*/
|
|
485
|
+
const withCallback = (input, valueMapper, callback) => {
|
|
486
|
+
input.open();
|
|
487
|
+
input.onSelect((id, value) => callback(valueMapper(id, value)));
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Open the input with a promise
|
|
491
|
+
*
|
|
492
|
+
* @param {Input} input - input object
|
|
493
|
+
* @param {function} valueMapper - function which maps the resulting id and value back to the expected format
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
exports.withCallback = withCallback;
|
|
498
|
+
|
|
499
|
+
const withPromise = (input, valueMapper) => {
|
|
500
|
+
return new Promise((resolve, reject) => {
|
|
501
|
+
input.open();
|
|
502
|
+
input.onSelect((id, value) => {
|
|
503
|
+
if (id === null) {
|
|
504
|
+
reject();
|
|
505
|
+
} else {
|
|
506
|
+
resolve(valueMapper(id, value));
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
exports.withPromise = withPromise;
|
|
513
|
+
|
|
514
|
+
/***/ }),
|
|
515
|
+
|
|
516
|
+
/***/ 546:
|
|
517
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
522
|
+
value: true
|
|
523
|
+
}));
|
|
524
|
+
exports["default"] = void 0;
|
|
525
|
+
|
|
526
|
+
var _input = _interopRequireDefault(__webpack_require__(938));
|
|
527
|
+
|
|
528
|
+
var _renderer = _interopRequireDefault(__webpack_require__(547));
|
|
529
|
+
|
|
530
|
+
var _callbackMappers = __webpack_require__(672);
|
|
531
|
+
|
|
532
|
+
var _valueMappers = __webpack_require__(348);
|
|
533
|
+
|
|
534
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
535
|
+
|
|
536
|
+
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; }
|
|
537
|
+
|
|
538
|
+
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; }
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Default options
|
|
542
|
+
*/
|
|
543
|
+
const defaultOptions = {
|
|
544
|
+
outputStream: process.stdout,
|
|
545
|
+
inputStream: process.stdin,
|
|
546
|
+
values: [],
|
|
547
|
+
defaultValue: 0,
|
|
548
|
+
selected: '(x)',
|
|
549
|
+
unselected: '( )',
|
|
550
|
+
indentation: 0,
|
|
551
|
+
cleanup: true,
|
|
552
|
+
valueRenderer: value => value
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* Create an instance of cli-select with the given options
|
|
556
|
+
*
|
|
557
|
+
* @param {object} options - options for cli-select
|
|
558
|
+
* @param {function} callback - if specified, a callback will be used, otherwise a promise gets returned (optional)
|
|
559
|
+
*/
|
|
560
|
+
|
|
561
|
+
const creator = (options, callback) => {
|
|
562
|
+
// merge options with default options
|
|
563
|
+
options = _objectSpread({}, defaultOptions, options); // create renderer and input instances
|
|
564
|
+
|
|
565
|
+
const renderer = new _renderer.default(options, options.outputStream);
|
|
566
|
+
const input = new _input.default(options.inputStream);
|
|
567
|
+
input.setDefaultValue(options.defaultValue);
|
|
568
|
+
input.attachRenderer(renderer); // handle array and object values
|
|
569
|
+
|
|
570
|
+
let valueMapper;
|
|
571
|
+
|
|
572
|
+
if (Array.isArray(options.values)) {
|
|
573
|
+
valueMapper = (0, _valueMappers.withArrayValues)(options);
|
|
574
|
+
} else {
|
|
575
|
+
valueMapper = (0, _valueMappers.withObjectValues)(options);
|
|
576
|
+
} // map values
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
options.values = valueMapper.input;
|
|
580
|
+
input.setValues(options.values); // handle different callback methods
|
|
581
|
+
|
|
582
|
+
if (typeof callback === 'function') {
|
|
583
|
+
return (0, _callbackMappers.withCallback)(input, valueMapper.output, callback);
|
|
584
|
+
} else {
|
|
585
|
+
return (0, _callbackMappers.withPromise)(input, valueMapper.output);
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
exports = module.exports = creator;
|
|
590
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
591
|
+
value: true
|
|
592
|
+
}));
|
|
593
|
+
var _default = creator;
|
|
594
|
+
exports["default"] = _default;
|
|
595
|
+
|
|
596
|
+
/***/ }),
|
|
597
|
+
|
|
598
|
+
/***/ 938:
|
|
599
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
604
|
+
value: true
|
|
605
|
+
}));
|
|
606
|
+
exports["default"] = void 0;
|
|
607
|
+
|
|
608
|
+
var _readline = _interopRequireDefault(__webpack_require__(785));
|
|
609
|
+
|
|
610
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Handle cli input
|
|
614
|
+
*/
|
|
615
|
+
class Input {
|
|
616
|
+
/**
|
|
617
|
+
* Input constructor
|
|
618
|
+
*
|
|
619
|
+
* @param {any} stream - stream to catch (optional)
|
|
620
|
+
*/
|
|
621
|
+
constructor(stream = process.stdin) {
|
|
622
|
+
// set default values
|
|
623
|
+
this.stream = stream;
|
|
624
|
+
this.values = [];
|
|
625
|
+
this.selectedValue = 0;
|
|
626
|
+
|
|
627
|
+
this.onSelectListener = () => {};
|
|
628
|
+
|
|
629
|
+
this.onKeyPress = this.onKeyPress.bind(this);
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Set the available values
|
|
633
|
+
*
|
|
634
|
+
* @param {array} values - all available values
|
|
635
|
+
*/
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
setValues(values) {
|
|
639
|
+
this.values = values;
|
|
640
|
+
|
|
641
|
+
if (this.renderer) {
|
|
642
|
+
this.renderer.setValues(values);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Set the default value
|
|
647
|
+
*
|
|
648
|
+
* @param {number} defaultValue - default value id
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
setDefaultValue(defaultValue) {
|
|
653
|
+
this.selectedValue = defaultValue;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Attach a renderer to the input catcher
|
|
657
|
+
*
|
|
658
|
+
* @param {Renderer} renderer - renderer to use for rendering responses
|
|
659
|
+
*/
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
attachRenderer(renderer) {
|
|
663
|
+
this.renderer = renderer;
|
|
664
|
+
this.renderer.setValues(this.values);
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Register an on select listener
|
|
668
|
+
*
|
|
669
|
+
* @param {function} listener - listener function which receives two parameters: valueId and value
|
|
670
|
+
*/
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
onSelect(listener) {
|
|
674
|
+
this.onSelectListener = listener;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Open the stream and listen for input
|
|
678
|
+
*/
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
open() {
|
|
682
|
+
// register keypress event
|
|
683
|
+
_readline.default.emitKeypressEvents(this.stream); // handle keypress
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
this.stream.on('keypress', this.onKeyPress); // initially render the response
|
|
687
|
+
|
|
688
|
+
if (this.renderer) {
|
|
689
|
+
this.renderer.render(this.selectedValue);
|
|
690
|
+
} // hide pressed keys and start listening on input
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
this.stream.setRawMode(true);
|
|
694
|
+
this.stream.resume();
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Close the stream
|
|
698
|
+
*
|
|
699
|
+
* @param {boolean} cancelled - true if no value was selected (optional)
|
|
700
|
+
*/
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
close(cancelled = false) {
|
|
704
|
+
// reset stream properties
|
|
705
|
+
this.stream.setRawMode(false);
|
|
706
|
+
this.stream.pause(); // cleanup the output
|
|
707
|
+
|
|
708
|
+
if (this.renderer) {
|
|
709
|
+
this.renderer.cleanup();
|
|
710
|
+
} // call the on select listener
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
if (cancelled) {
|
|
714
|
+
this.onSelectListener(null);
|
|
715
|
+
} else {
|
|
716
|
+
this.onSelectListener(this.selectedValue, this.values[this.selectedValue]);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
this.stream.removeListener('keypress', this.onKeyPress);
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Render the response
|
|
723
|
+
*/
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
render() {
|
|
727
|
+
if (!this.renderer) {
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
this.renderer.render(this.selectedValue);
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Handle key press event
|
|
735
|
+
*
|
|
736
|
+
* @param {string} string - input string
|
|
737
|
+
* @param {object} key - object containing information about the pressed key
|
|
738
|
+
*/
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
onKeyPress(string, key) {
|
|
742
|
+
if (key) {
|
|
743
|
+
if (key.name === 'up' && this.selectedValue > 0) {
|
|
744
|
+
this.selectedValue--;
|
|
745
|
+
this.render();
|
|
746
|
+
} else if (key.name === 'down' && this.selectedValue + 1 < this.values.length) {
|
|
747
|
+
this.selectedValue++;
|
|
748
|
+
this.render();
|
|
749
|
+
} else if (key.name === 'return') {
|
|
750
|
+
this.close();
|
|
751
|
+
} else if (key.name === 'escape' || key.name === 'c' && key.ctrl) {
|
|
752
|
+
this.close(true);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
exports["default"] = Input;
|
|
760
|
+
|
|
761
|
+
/***/ }),
|
|
762
|
+
|
|
763
|
+
/***/ 547:
|
|
764
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
769
|
+
value: true
|
|
770
|
+
}));
|
|
771
|
+
exports["default"] = void 0;
|
|
772
|
+
|
|
773
|
+
var _readline = _interopRequireDefault(__webpack_require__(785));
|
|
774
|
+
|
|
775
|
+
var _ansiEscapes = __webpack_require__(719);
|
|
776
|
+
|
|
777
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Response renderer
|
|
781
|
+
*/
|
|
782
|
+
class Renderer {
|
|
783
|
+
/**
|
|
784
|
+
* Renderer constructor
|
|
785
|
+
*
|
|
786
|
+
* @param {object} options - renderer options
|
|
787
|
+
* @param {any} stream - stream to write to (optional)
|
|
788
|
+
*/
|
|
789
|
+
constructor(options, stream = process.stdout) {
|
|
790
|
+
this.options = options;
|
|
791
|
+
this.stream = stream;
|
|
792
|
+
this.values = [];
|
|
793
|
+
this.initialRender = true;
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Set the available values
|
|
797
|
+
*
|
|
798
|
+
* @param {array} values - all available values
|
|
799
|
+
*/
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
setValues(values) {
|
|
803
|
+
this.values = values;
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Render the values
|
|
807
|
+
*
|
|
808
|
+
* @param {number} selectedValue - selected value (optional)
|
|
809
|
+
*/
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
render(selectedValue = 0) {
|
|
813
|
+
if (this.initialRender) {
|
|
814
|
+
// hide the cursor initially
|
|
815
|
+
this.initialRender = false;
|
|
816
|
+
this.stream.write(_ansiEscapes.cursorHide);
|
|
817
|
+
} else {
|
|
818
|
+
// remove previous lines and values
|
|
819
|
+
this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
|
|
820
|
+
} // output the current values
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
this.values.forEach((value, index) => {
|
|
824
|
+
const symbol = selectedValue === index ? this.options.selected : this.options.unselected;
|
|
825
|
+
const indentation = ' '.repeat(this.options.indentation);
|
|
826
|
+
const renderedValue = this.options.valueRenderer(value, selectedValue === index);
|
|
827
|
+
const end = index !== this.values.length - 1 ? '\n' : '';
|
|
828
|
+
this.stream.write(indentation + symbol + ' ' + renderedValue + end);
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Cleanup the console at the end
|
|
833
|
+
*/
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
cleanup() {
|
|
837
|
+
this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
|
|
838
|
+
this.stream.write(_ansiEscapes.cursorShow);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
exports["default"] = Renderer;
|
|
844
|
+
|
|
845
|
+
/***/ }),
|
|
846
|
+
|
|
847
|
+
/***/ 348:
|
|
848
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
853
|
+
value: true
|
|
854
|
+
}));
|
|
855
|
+
exports.withObjectValues = exports.withArrayValues = void 0;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Map incoming and outgoing values if the initial values are an array
|
|
859
|
+
*
|
|
860
|
+
* @param {object} options - cli-select options
|
|
861
|
+
*/
|
|
862
|
+
const withArrayValues = options => {
|
|
863
|
+
return {
|
|
864
|
+
input: options.values,
|
|
865
|
+
output: (id, value) => {
|
|
866
|
+
return {
|
|
867
|
+
id,
|
|
868
|
+
value
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
/**
|
|
874
|
+
* Map incoming and outgoing values if the initial values are an object
|
|
875
|
+
*
|
|
876
|
+
* @param {object} options - cli-select options
|
|
877
|
+
*/
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
exports.withArrayValues = withArrayValues;
|
|
881
|
+
|
|
882
|
+
const withObjectValues = options => {
|
|
883
|
+
const originalValues = options.values;
|
|
884
|
+
return {
|
|
885
|
+
input: Object.values(originalValues),
|
|
886
|
+
output: (id, value) => {
|
|
887
|
+
return {
|
|
888
|
+
id: Object.keys(originalValues)[id],
|
|
889
|
+
value
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
exports.withObjectValues = withObjectValues;
|
|
896
|
+
|
|
897
|
+
/***/ }),
|
|
898
|
+
|
|
899
|
+
/***/ 719:
|
|
900
|
+
/***/ ((module) => {
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
const x = module.exports;
|
|
904
|
+
const ESC = '\u001B[';
|
|
905
|
+
const OSC = '\u001B]';
|
|
906
|
+
const BEL = '\u0007';
|
|
907
|
+
const SEP = ';';
|
|
908
|
+
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
909
|
+
|
|
910
|
+
x.cursorTo = (x, y) => {
|
|
911
|
+
if (typeof x !== 'number') {
|
|
912
|
+
throw new TypeError('The `x` argument is required');
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
if (typeof y !== 'number') {
|
|
916
|
+
return ESC + (x + 1) + 'G';
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
x.cursorMove = (x, y) => {
|
|
923
|
+
if (typeof x !== 'number') {
|
|
924
|
+
throw new TypeError('The `x` argument is required');
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
let ret = '';
|
|
928
|
+
|
|
929
|
+
if (x < 0) {
|
|
930
|
+
ret += ESC + (-x) + 'D';
|
|
931
|
+
} else if (x > 0) {
|
|
932
|
+
ret += ESC + x + 'C';
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if (y < 0) {
|
|
936
|
+
ret += ESC + (-y) + 'A';
|
|
937
|
+
} else if (y > 0) {
|
|
938
|
+
ret += ESC + y + 'B';
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
return ret;
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
945
|
+
x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
946
|
+
x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
947
|
+
x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
948
|
+
|
|
949
|
+
x.cursorLeft = ESC + 'G';
|
|
950
|
+
x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
|
|
951
|
+
x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
|
|
952
|
+
x.cursorGetPosition = ESC + '6n';
|
|
953
|
+
x.cursorNextLine = ESC + 'E';
|
|
954
|
+
x.cursorPrevLine = ESC + 'F';
|
|
955
|
+
x.cursorHide = ESC + '?25l';
|
|
956
|
+
x.cursorShow = ESC + '?25h';
|
|
957
|
+
|
|
958
|
+
x.eraseLines = count => {
|
|
959
|
+
let clear = '';
|
|
960
|
+
|
|
961
|
+
for (let i = 0; i < count; i++) {
|
|
962
|
+
clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
if (count) {
|
|
966
|
+
clear += x.cursorLeft;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
return clear;
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
x.eraseEndLine = ESC + 'K';
|
|
973
|
+
x.eraseStartLine = ESC + '1K';
|
|
974
|
+
x.eraseLine = ESC + '2K';
|
|
975
|
+
x.eraseDown = ESC + 'J';
|
|
976
|
+
x.eraseUp = ESC + '1J';
|
|
977
|
+
x.eraseScreen = ESC + '2J';
|
|
978
|
+
x.scrollUp = ESC + 'S';
|
|
979
|
+
x.scrollDown = ESC + 'T';
|
|
980
|
+
|
|
981
|
+
x.clearScreen = '\u001Bc';
|
|
982
|
+
|
|
983
|
+
x.clearTerminal = process.platform === 'win32' ?
|
|
984
|
+
`${x.eraseScreen}${ESC}0f` :
|
|
985
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
986
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
987
|
+
// 3. Moves cursor to the top-left position
|
|
988
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
989
|
+
`${x.eraseScreen}${ESC}3J${ESC}H`;
|
|
990
|
+
|
|
991
|
+
x.beep = BEL;
|
|
992
|
+
|
|
993
|
+
x.link = (text, url) => {
|
|
994
|
+
return [
|
|
995
|
+
OSC,
|
|
996
|
+
'8',
|
|
997
|
+
SEP,
|
|
998
|
+
SEP,
|
|
999
|
+
url,
|
|
1000
|
+
BEL,
|
|
1001
|
+
text,
|
|
1002
|
+
OSC,
|
|
1003
|
+
'8',
|
|
1004
|
+
SEP,
|
|
1005
|
+
SEP,
|
|
1006
|
+
BEL
|
|
1007
|
+
].join('');
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
x.image = (buf, opts) => {
|
|
1011
|
+
opts = opts || {};
|
|
1012
|
+
|
|
1013
|
+
let ret = OSC + '1337;File=inline=1';
|
|
1014
|
+
|
|
1015
|
+
if (opts.width) {
|
|
1016
|
+
ret += `;width=${opts.width}`;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
if (opts.height) {
|
|
1020
|
+
ret += `;height=${opts.height}`;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
if (opts.preserveAspectRatio === false) {
|
|
1024
|
+
ret += ';preserveAspectRatio=0';
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
return ret + ':' + buf.toString('base64') + BEL;
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
x.iTerm = {};
|
|
1031
|
+
|
|
1032
|
+
x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
/***/ }),
|
|
1036
|
+
|
|
1037
|
+
/***/ 797:
|
|
1038
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
// EXPORTS
|
|
1042
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
1043
|
+
Ay: () => (/* binding */ source)
|
|
1044
|
+
});
|
|
1045
|
+
|
|
1046
|
+
// UNUSED EXPORTS: Chalk, backgroundColorNames, backgroundColors, chalkStderr, colorNames, colors, foregroundColorNames, foregroundColors, modifierNames, modifiers, supportsColor, supportsColorStderr
|
|
1047
|
+
|
|
1048
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1049
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
1050
|
+
|
|
1051
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
|
1052
|
+
|
|
1053
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
|
1054
|
+
|
|
1055
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1056
|
+
|
|
1057
|
+
const styles = {
|
|
1058
|
+
modifier: {
|
|
1059
|
+
reset: [0, 0],
|
|
1060
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1061
|
+
bold: [1, 22],
|
|
1062
|
+
dim: [2, 22],
|
|
1063
|
+
italic: [3, 23],
|
|
1064
|
+
underline: [4, 24],
|
|
1065
|
+
overline: [53, 55],
|
|
1066
|
+
inverse: [7, 27],
|
|
1067
|
+
hidden: [8, 28],
|
|
1068
|
+
strikethrough: [9, 29],
|
|
1069
|
+
},
|
|
1070
|
+
color: {
|
|
1071
|
+
black: [30, 39],
|
|
1072
|
+
red: [31, 39],
|
|
1073
|
+
green: [32, 39],
|
|
1074
|
+
yellow: [33, 39],
|
|
1075
|
+
blue: [34, 39],
|
|
1076
|
+
magenta: [35, 39],
|
|
1077
|
+
cyan: [36, 39],
|
|
1078
|
+
white: [37, 39],
|
|
1079
|
+
|
|
1080
|
+
// Bright color
|
|
1081
|
+
blackBright: [90, 39],
|
|
1082
|
+
gray: [90, 39], // Alias of `blackBright`
|
|
1083
|
+
grey: [90, 39], // Alias of `blackBright`
|
|
1084
|
+
redBright: [91, 39],
|
|
1085
|
+
greenBright: [92, 39],
|
|
1086
|
+
yellowBright: [93, 39],
|
|
1087
|
+
blueBright: [94, 39],
|
|
1088
|
+
magentaBright: [95, 39],
|
|
1089
|
+
cyanBright: [96, 39],
|
|
1090
|
+
whiteBright: [97, 39],
|
|
1091
|
+
},
|
|
1092
|
+
bgColor: {
|
|
1093
|
+
bgBlack: [40, 49],
|
|
1094
|
+
bgRed: [41, 49],
|
|
1095
|
+
bgGreen: [42, 49],
|
|
1096
|
+
bgYellow: [43, 49],
|
|
1097
|
+
bgBlue: [44, 49],
|
|
1098
|
+
bgMagenta: [45, 49],
|
|
1099
|
+
bgCyan: [46, 49],
|
|
1100
|
+
bgWhite: [47, 49],
|
|
1101
|
+
|
|
1102
|
+
// Bright color
|
|
1103
|
+
bgBlackBright: [100, 49],
|
|
1104
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
|
1105
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
|
1106
|
+
bgRedBright: [101, 49],
|
|
1107
|
+
bgGreenBright: [102, 49],
|
|
1108
|
+
bgYellowBright: [103, 49],
|
|
1109
|
+
bgBlueBright: [104, 49],
|
|
1110
|
+
bgMagentaBright: [105, 49],
|
|
1111
|
+
bgCyanBright: [106, 49],
|
|
1112
|
+
bgWhiteBright: [107, 49],
|
|
1113
|
+
},
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
const modifierNames = Object.keys(styles.modifier);
|
|
1117
|
+
const foregroundColorNames = Object.keys(styles.color);
|
|
1118
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
|
1119
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1120
|
+
|
|
1121
|
+
function assembleStyles() {
|
|
1122
|
+
const codes = new Map();
|
|
1123
|
+
|
|
1124
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1125
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
1126
|
+
styles[styleName] = {
|
|
1127
|
+
open: `\u001B[${style[0]}m`,
|
|
1128
|
+
close: `\u001B[${style[1]}m`,
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
group[styleName] = styles[styleName];
|
|
1132
|
+
|
|
1133
|
+
codes.set(style[0], style[1]);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
Object.defineProperty(styles, groupName, {
|
|
1137
|
+
value: group,
|
|
1138
|
+
enumerable: false,
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
Object.defineProperty(styles, 'codes', {
|
|
1143
|
+
value: codes,
|
|
1144
|
+
enumerable: false,
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
styles.color.close = '\u001B[39m';
|
|
1148
|
+
styles.bgColor.close = '\u001B[49m';
|
|
1149
|
+
|
|
1150
|
+
styles.color.ansi = wrapAnsi16();
|
|
1151
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
1152
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
1153
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1154
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1155
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1156
|
+
|
|
1157
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
1158
|
+
Object.defineProperties(styles, {
|
|
1159
|
+
rgbToAnsi256: {
|
|
1160
|
+
value(red, green, blue) {
|
|
1161
|
+
// We use the extended greyscale palette here, with the exception of
|
|
1162
|
+
// black and white. normal palette only has 4 greyscale shades.
|
|
1163
|
+
if (red === green && green === blue) {
|
|
1164
|
+
if (red < 8) {
|
|
1165
|
+
return 16;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
if (red > 248) {
|
|
1169
|
+
return 231;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
return 16
|
|
1176
|
+
+ (36 * Math.round(red / 255 * 5))
|
|
1177
|
+
+ (6 * Math.round(green / 255 * 5))
|
|
1178
|
+
+ Math.round(blue / 255 * 5);
|
|
1179
|
+
},
|
|
1180
|
+
enumerable: false,
|
|
1181
|
+
},
|
|
1182
|
+
hexToRgb: {
|
|
1183
|
+
value(hex) {
|
|
1184
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
1185
|
+
if (!matches) {
|
|
1186
|
+
return [0, 0, 0];
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
let [colorString] = matches;
|
|
1190
|
+
|
|
1191
|
+
if (colorString.length === 3) {
|
|
1192
|
+
colorString = [...colorString].map(character => character + character).join('');
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
const integer = Number.parseInt(colorString, 16);
|
|
1196
|
+
|
|
1197
|
+
return [
|
|
1198
|
+
/* eslint-disable no-bitwise */
|
|
1199
|
+
(integer >> 16) & 0xFF,
|
|
1200
|
+
(integer >> 8) & 0xFF,
|
|
1201
|
+
integer & 0xFF,
|
|
1202
|
+
/* eslint-enable no-bitwise */
|
|
1203
|
+
];
|
|
1204
|
+
},
|
|
1205
|
+
enumerable: false,
|
|
1206
|
+
},
|
|
1207
|
+
hexToAnsi256: {
|
|
1208
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
1209
|
+
enumerable: false,
|
|
1210
|
+
},
|
|
1211
|
+
ansi256ToAnsi: {
|
|
1212
|
+
value(code) {
|
|
1213
|
+
if (code < 8) {
|
|
1214
|
+
return 30 + code;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
if (code < 16) {
|
|
1218
|
+
return 90 + (code - 8);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
let red;
|
|
1222
|
+
let green;
|
|
1223
|
+
let blue;
|
|
1224
|
+
|
|
1225
|
+
if (code >= 232) {
|
|
1226
|
+
red = (((code - 232) * 10) + 8) / 255;
|
|
1227
|
+
green = red;
|
|
1228
|
+
blue = red;
|
|
1229
|
+
} else {
|
|
1230
|
+
code -= 16;
|
|
1231
|
+
|
|
1232
|
+
const remainder = code % 36;
|
|
1233
|
+
|
|
1234
|
+
red = Math.floor(code / 36) / 5;
|
|
1235
|
+
green = Math.floor(remainder / 6) / 5;
|
|
1236
|
+
blue = (remainder % 6) / 5;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
const value = Math.max(red, green, blue) * 2;
|
|
1240
|
+
|
|
1241
|
+
if (value === 0) {
|
|
1242
|
+
return 30;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
// eslint-disable-next-line no-bitwise
|
|
1246
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
|
1247
|
+
|
|
1248
|
+
if (value === 2) {
|
|
1249
|
+
result += 60;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
return result;
|
|
1253
|
+
},
|
|
1254
|
+
enumerable: false,
|
|
1255
|
+
},
|
|
1256
|
+
rgbToAnsi: {
|
|
1257
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
1258
|
+
enumerable: false,
|
|
1259
|
+
},
|
|
1260
|
+
hexToAnsi: {
|
|
1261
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
1262
|
+
enumerable: false,
|
|
1263
|
+
},
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
return styles;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
const ansiStyles = assembleStyles();
|
|
1270
|
+
|
|
1271
|
+
/* harmony default export */ const ansi_styles = (ansiStyles);
|
|
1272
|
+
|
|
1273
|
+
// EXTERNAL MODULE: external "node:process"
|
|
1274
|
+
var external_node_process_ = __webpack_require__(708);
|
|
1275
|
+
// EXTERNAL MODULE: external "node:os"
|
|
1276
|
+
var external_node_os_ = __webpack_require__(161);
|
|
1277
|
+
// EXTERNAL MODULE: external "node:tty"
|
|
1278
|
+
var external_node_tty_ = __webpack_require__(66);
|
|
1279
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/supports-color/index.js
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
|
|
1285
|
+
/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
|
|
1286
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_.argv) {
|
|
1287
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
1288
|
+
const position = argv.indexOf(prefix + flag);
|
|
1289
|
+
const terminatorPosition = argv.indexOf('--');
|
|
1290
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
const {env} = external_node_process_;
|
|
1294
|
+
|
|
1295
|
+
let flagForceColor;
|
|
1296
|
+
if (
|
|
1297
|
+
hasFlag('no-color')
|
|
1298
|
+
|| hasFlag('no-colors')
|
|
1299
|
+
|| hasFlag('color=false')
|
|
1300
|
+
|| hasFlag('color=never')
|
|
1301
|
+
) {
|
|
1302
|
+
flagForceColor = 0;
|
|
1303
|
+
} else if (
|
|
1304
|
+
hasFlag('color')
|
|
1305
|
+
|| hasFlag('colors')
|
|
1306
|
+
|| hasFlag('color=true')
|
|
1307
|
+
|| hasFlag('color=always')
|
|
1308
|
+
) {
|
|
1309
|
+
flagForceColor = 1;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
function envForceColor() {
|
|
1313
|
+
if ('FORCE_COLOR' in env) {
|
|
1314
|
+
if (env.FORCE_COLOR === 'true') {
|
|
1315
|
+
return 1;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
if (env.FORCE_COLOR === 'false') {
|
|
1319
|
+
return 0;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
function translateLevel(level) {
|
|
1327
|
+
if (level === 0) {
|
|
1328
|
+
return false;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
return {
|
|
1332
|
+
level,
|
|
1333
|
+
hasBasic: true,
|
|
1334
|
+
has256: level >= 2,
|
|
1335
|
+
has16m: level >= 3,
|
|
1336
|
+
};
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
1340
|
+
const noFlagForceColor = envForceColor();
|
|
1341
|
+
if (noFlagForceColor !== undefined) {
|
|
1342
|
+
flagForceColor = noFlagForceColor;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
1346
|
+
|
|
1347
|
+
if (forceColor === 0) {
|
|
1348
|
+
return 0;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
if (sniffFlags) {
|
|
1352
|
+
if (hasFlag('color=16m')
|
|
1353
|
+
|| hasFlag('color=full')
|
|
1354
|
+
|| hasFlag('color=truecolor')) {
|
|
1355
|
+
return 3;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
if (hasFlag('color=256')) {
|
|
1359
|
+
return 2;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
// Check for Azure DevOps pipelines.
|
|
1364
|
+
// Has to be above the `!streamIsTTY` check.
|
|
1365
|
+
if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
|
|
1366
|
+
return 1;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
1370
|
+
return 0;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
const min = forceColor || 0;
|
|
1374
|
+
|
|
1375
|
+
if (env.TERM === 'dumb') {
|
|
1376
|
+
return min;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
if (external_node_process_.platform === 'win32') {
|
|
1380
|
+
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
1381
|
+
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
1382
|
+
const osRelease = external_node_os_.release().split('.');
|
|
1383
|
+
if (
|
|
1384
|
+
Number(osRelease[0]) >= 10
|
|
1385
|
+
&& Number(osRelease[2]) >= 10_586
|
|
1386
|
+
) {
|
|
1387
|
+
return Number(osRelease[2]) >= 14_931 ? 3 : 2;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
return 1;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
if ('CI' in env) {
|
|
1394
|
+
if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
|
|
1395
|
+
return 3;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
1399
|
+
return 1;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
return min;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
1406
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
if (env.COLORTERM === 'truecolor') {
|
|
1410
|
+
return 3;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
if (env.TERM === 'xterm-kitty') {
|
|
1414
|
+
return 3;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
if ('TERM_PROGRAM' in env) {
|
|
1418
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
1419
|
+
|
|
1420
|
+
switch (env.TERM_PROGRAM) {
|
|
1421
|
+
case 'iTerm.app': {
|
|
1422
|
+
return version >= 3 ? 3 : 2;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
case 'Apple_Terminal': {
|
|
1426
|
+
return 2;
|
|
1427
|
+
}
|
|
1428
|
+
// No default
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
1433
|
+
return 2;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
1437
|
+
return 1;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
if ('COLORTERM' in env) {
|
|
1441
|
+
return 1;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
return min;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
function createSupportsColor(stream, options = {}) {
|
|
1448
|
+
const level = _supportsColor(stream, {
|
|
1449
|
+
streamIsTTY: stream && stream.isTTY,
|
|
1450
|
+
...options,
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
return translateLevel(level);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
const supportsColor = {
|
|
1457
|
+
stdout: createSupportsColor({isTTY: external_node_tty_.isatty(1)}),
|
|
1458
|
+
stderr: createSupportsColor({isTTY: external_node_tty_.isatty(2)}),
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
/* harmony default export */ const supports_color = (supportsColor);
|
|
1462
|
+
|
|
1463
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/utilities.js
|
|
1464
|
+
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
|
|
1465
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
1466
|
+
let index = string.indexOf(substring);
|
|
1467
|
+
if (index === -1) {
|
|
1468
|
+
return string;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
const substringLength = substring.length;
|
|
1472
|
+
let endIndex = 0;
|
|
1473
|
+
let returnValue = '';
|
|
1474
|
+
do {
|
|
1475
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
1476
|
+
endIndex = index + substringLength;
|
|
1477
|
+
index = string.indexOf(substring, endIndex);
|
|
1478
|
+
} while (index !== -1);
|
|
1479
|
+
|
|
1480
|
+
returnValue += string.slice(endIndex);
|
|
1481
|
+
return returnValue;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
1485
|
+
let endIndex = 0;
|
|
1486
|
+
let returnValue = '';
|
|
1487
|
+
do {
|
|
1488
|
+
const gotCR = string[index - 1] === '\r';
|
|
1489
|
+
returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
|
1490
|
+
endIndex = index + 1;
|
|
1491
|
+
index = string.indexOf('\n', endIndex);
|
|
1492
|
+
} while (index !== -1);
|
|
1493
|
+
|
|
1494
|
+
returnValue += string.slice(endIndex);
|
|
1495
|
+
return returnValue;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/index.js
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
const {stdout: stdoutColor, stderr: stderrColor} = supports_color;
|
|
1504
|
+
|
|
1505
|
+
const GENERATOR = Symbol('GENERATOR');
|
|
1506
|
+
const STYLER = Symbol('STYLER');
|
|
1507
|
+
const IS_EMPTY = Symbol('IS_EMPTY');
|
|
1508
|
+
|
|
1509
|
+
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
1510
|
+
const levelMapping = [
|
|
1511
|
+
'ansi',
|
|
1512
|
+
'ansi',
|
|
1513
|
+
'ansi256',
|
|
1514
|
+
'ansi16m',
|
|
1515
|
+
];
|
|
1516
|
+
|
|
1517
|
+
const source_styles = Object.create(null);
|
|
1518
|
+
|
|
1519
|
+
const applyOptions = (object, options = {}) => {
|
|
1520
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
1521
|
+
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
// Detect level if not set manually
|
|
1525
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
1526
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
class Chalk {
|
|
1530
|
+
constructor(options) {
|
|
1531
|
+
// eslint-disable-next-line no-constructor-return
|
|
1532
|
+
return chalkFactory(options);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
const chalkFactory = options => {
|
|
1537
|
+
const chalk = (...strings) => strings.join(' ');
|
|
1538
|
+
applyOptions(chalk, options);
|
|
1539
|
+
|
|
1540
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
1541
|
+
|
|
1542
|
+
return chalk;
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
function createChalk(options) {
|
|
1546
|
+
return chalkFactory(options);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
1550
|
+
|
|
1551
|
+
for (const [styleName, style] of Object.entries(ansi_styles)) {
|
|
1552
|
+
source_styles[styleName] = {
|
|
1553
|
+
get() {
|
|
1554
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
1555
|
+
Object.defineProperty(this, styleName, {value: builder});
|
|
1556
|
+
return builder;
|
|
1557
|
+
},
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
source_styles.visible = {
|
|
1562
|
+
get() {
|
|
1563
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
1564
|
+
Object.defineProperty(this, 'visible', {value: builder});
|
|
1565
|
+
return builder;
|
|
1566
|
+
},
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
1570
|
+
if (model === 'rgb') {
|
|
1571
|
+
if (level === 'ansi16m') {
|
|
1572
|
+
return ansi_styles[type].ansi16m(...arguments_);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
if (level === 'ansi256') {
|
|
1576
|
+
return ansi_styles[type].ansi256(ansi_styles.rgbToAnsi256(...arguments_));
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
return ansi_styles[type].ansi(ansi_styles.rgbToAnsi(...arguments_));
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
if (model === 'hex') {
|
|
1583
|
+
return getModelAnsi('rgb', level, type, ...ansi_styles.hexToRgb(...arguments_));
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
return ansi_styles[type][model](...arguments_);
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
const usedModels = ['rgb', 'hex', 'ansi256'];
|
|
1590
|
+
|
|
1591
|
+
for (const model of usedModels) {
|
|
1592
|
+
source_styles[model] = {
|
|
1593
|
+
get() {
|
|
1594
|
+
const {level} = this;
|
|
1595
|
+
return function (...arguments_) {
|
|
1596
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansi_styles.color.close, this[STYLER]);
|
|
1597
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
1598
|
+
};
|
|
1599
|
+
},
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
|
1603
|
+
source_styles[bgModel] = {
|
|
1604
|
+
get() {
|
|
1605
|
+
const {level} = this;
|
|
1606
|
+
return function (...arguments_) {
|
|
1607
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansi_styles.bgColor.close, this[STYLER]);
|
|
1608
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
1609
|
+
};
|
|
1610
|
+
},
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
const proto = Object.defineProperties(() => {}, {
|
|
1615
|
+
...source_styles,
|
|
1616
|
+
level: {
|
|
1617
|
+
enumerable: true,
|
|
1618
|
+
get() {
|
|
1619
|
+
return this[GENERATOR].level;
|
|
1620
|
+
},
|
|
1621
|
+
set(level) {
|
|
1622
|
+
this[GENERATOR].level = level;
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
const createStyler = (open, close, parent) => {
|
|
1628
|
+
let openAll;
|
|
1629
|
+
let closeAll;
|
|
1630
|
+
if (parent === undefined) {
|
|
1631
|
+
openAll = open;
|
|
1632
|
+
closeAll = close;
|
|
1633
|
+
} else {
|
|
1634
|
+
openAll = parent.openAll + open;
|
|
1635
|
+
closeAll = close + parent.closeAll;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
return {
|
|
1639
|
+
open,
|
|
1640
|
+
close,
|
|
1641
|
+
openAll,
|
|
1642
|
+
closeAll,
|
|
1643
|
+
parent,
|
|
1644
|
+
};
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
1648
|
+
// Single argument is hot path, implicit coercion is faster than anything
|
|
1649
|
+
// eslint-disable-next-line no-implicit-coercion
|
|
1650
|
+
const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
|
1651
|
+
|
|
1652
|
+
// We alter the prototype because we must return a function, but there is
|
|
1653
|
+
// no way to create a function with a different prototype
|
|
1654
|
+
Object.setPrototypeOf(builder, proto);
|
|
1655
|
+
|
|
1656
|
+
builder[GENERATOR] = self;
|
|
1657
|
+
builder[STYLER] = _styler;
|
|
1658
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
1659
|
+
|
|
1660
|
+
return builder;
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
const applyStyle = (self, string) => {
|
|
1664
|
+
if (self.level <= 0 || !string) {
|
|
1665
|
+
return self[IS_EMPTY] ? '' : string;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
let styler = self[STYLER];
|
|
1669
|
+
|
|
1670
|
+
if (styler === undefined) {
|
|
1671
|
+
return string;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
const {openAll, closeAll} = styler;
|
|
1675
|
+
if (string.includes('\u001B')) {
|
|
1676
|
+
while (styler !== undefined) {
|
|
1677
|
+
// Replace any instances already present with a re-opening code
|
|
1678
|
+
// otherwise only the part of the string until said closing code
|
|
1679
|
+
// will be colored, and the rest will simply be 'plain'.
|
|
1680
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1681
|
+
|
|
1682
|
+
styler = styler.parent;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
// We can move both next actions out of loop, because remaining actions in loop won't have
|
|
1687
|
+
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
|
1688
|
+
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
|
1689
|
+
const lfIndex = string.indexOf('\n');
|
|
1690
|
+
if (lfIndex !== -1) {
|
|
1691
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
return openAll + string + closeAll;
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1697
|
+
Object.defineProperties(createChalk.prototype, source_styles);
|
|
1698
|
+
|
|
1699
|
+
const chalk = createChalk();
|
|
1700
|
+
const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
/* harmony default export */ const source = (chalk);
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
/***/ })
|
|
1710
|
+
|
|
1711
|
+
};
|
|
1712
|
+
;
|