keycloakify 10.0.0-rc.2 → 10.0.0-rc.20
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/PUBLIC_URL.js +1 -1
- package/PUBLIC_URL.js.map +1 -1
- package/account/Fallback.js +3 -0
- package/account/Fallback.js.map +1 -1
- package/account/Template.js +7 -7
- package/account/Template.js.map +1 -1
- package/account/i18n/baseMessages/index.js.map +1 -1
- package/account/i18n/i18n.d.ts +3 -4
- package/account/i18n/i18n.js +38 -31
- package/account/i18n/i18n.js.map +1 -1
- package/account/index.d.ts +1 -1
- package/account/kcContext/KcContext.d.ts +62 -59
- package/account/kcContext/KcContext.js.map +1 -1
- package/account/kcContext/createGetKcContext.d.ts +3 -3
- package/account/kcContext/createGetKcContext.js +20 -15
- package/account/kcContext/createGetKcContext.js.map +1 -1
- package/account/kcContext/getKcContext.js.map +1 -1
- package/account/kcContext/getKcContextFromWindow.d.ts +3 -1
- package/account/kcContext/getKcContextFromWindow.js +1 -1
- package/account/kcContext/getKcContextFromWindow.js.map +1 -1
- package/account/kcContext/kcContextMocks.js +155 -143
- package/account/kcContext/kcContextMocks.js.map +1 -1
- package/account/lib/useGetClassName.js +14 -14
- package/account/lib/useGetClassName.js.map +1 -1
- package/account/pages/Account.js +2 -2
- package/account/pages/Account.js.map +1 -1
- package/account/pages/Applications.js +3 -3
- package/account/pages/Applications.js.map +1 -1
- package/account/pages/FederatedIdentity.d.ts +7 -0
- package/account/pages/FederatedIdentity.js +8 -0
- package/account/pages/FederatedIdentity.js.map +1 -0
- package/account/pages/Log.js +2 -2
- package/account/pages/Log.js.map +1 -1
- package/account/pages/Password.js +9 -11
- package/account/pages/Password.js.map +1 -1
- package/account/pages/Sessions.js +1 -5
- package/account/pages/Sessions.js.map +1 -1
- package/account/pages/Totp.js +5 -5
- package/account/pages/Totp.js.map +1 -1
- package/bin/246.index.js +466 -0
- package/bin/420.index.js +508 -0
- package/bin/509.index.js +438 -0
- package/bin/772.index.js +1524 -0
- package/bin/main.js +155612 -0
- package/bin/{keycloakify/generateFtl/pageId.d.ts → shared/constants.d.ts} +16 -1
- package/bin/shared/constants.js +63 -0
- package/bin/shared/constants.js.map +1 -0
- package/lib/BASE_URL.js.map +1 -1
- package/lib/isStorybook.js +2 -1
- package/lib/isStorybook.js.map +1 -1
- package/lib/useGetClassName.js.map +1 -1
- package/login/Fallback.js.map +1 -1
- package/login/Template.js +17 -17
- package/login/Template.js.map +1 -1
- package/login/UserProfileFormFields.js +59 -59
- package/login/UserProfileFormFields.js.map +1 -1
- package/login/i18n/baseMessages/ca.d.ts +1 -1
- package/login/i18n/baseMessages/ca.js +1 -1
- package/login/i18n/baseMessages/el.d.ts +0 -1
- package/login/i18n/baseMessages/el.js +0 -1
- package/login/i18n/baseMessages/el.js.map +1 -1
- package/login/i18n/baseMessages/en.d.ts +1 -1
- package/login/i18n/baseMessages/en.js +1 -1
- package/login/i18n/baseMessages/es.d.ts +1 -1
- package/login/i18n/baseMessages/es.js +1 -1
- package/login/i18n/baseMessages/fa.d.ts +0 -1
- package/login/i18n/baseMessages/fa.js +0 -1
- package/login/i18n/baseMessages/fa.js.map +1 -1
- package/login/i18n/baseMessages/hu.d.ts +1 -1
- package/login/i18n/baseMessages/hu.js +1 -1
- package/login/i18n/baseMessages/index.d.ts +1 -2
- package/login/i18n/baseMessages/index.js.map +1 -1
- package/login/i18n/baseMessages/zh-CN.d.ts +1 -1
- package/login/i18n/baseMessages/zh-CN.js +1 -1
- package/login/i18n/i18n.d.ts +5 -5
- package/login/i18n/i18n.js +59 -41
- package/login/i18n/i18n.js.map +1 -1
- package/login/index.d.ts +1 -1
- package/login/kcContext/KcContext.d.ts +1 -0
- package/login/kcContext/KcContext.js +1 -0
- package/login/kcContext/KcContext.js.map +1 -1
- package/login/kcContext/createGetKcContext.d.ts +3 -3
- package/login/kcContext/createGetKcContext.js +30 -22
- package/login/kcContext/createGetKcContext.js.map +1 -1
- package/login/kcContext/getKcContext.js.map +1 -1
- package/login/kcContext/getKcContextFromWindow.d.ts +3 -1
- package/login/kcContext/getKcContextFromWindow.js +1 -1
- package/login/kcContext/getKcContextFromWindow.js.map +1 -1
- package/login/kcContext/kcContextMocks.js +235 -232
- package/login/kcContext/kcContextMocks.js.map +1 -1
- package/login/lib/useDownloadTerms.js +5 -6
- package/login/lib/useDownloadTerms.js.map +1 -1
- package/login/lib/useGetClassName.js +112 -112
- package/login/lib/useGetClassName.js.map +1 -1
- package/login/lib/useUserProfileForm.js +188 -188
- package/login/lib/useUserProfileForm.js.map +1 -1
- package/login/pages/Code.js +1 -1
- package/login/pages/Code.js.map +1 -1
- package/login/pages/DeleteAccountConfirm.js +5 -1
- package/login/pages/DeleteAccountConfirm.js.map +1 -1
- package/login/pages/DeleteCredential.js +1 -1
- package/login/pages/DeleteCredential.js.map +1 -1
- package/login/pages/Error.js +1 -1
- package/login/pages/Error.js.map +1 -1
- package/login/pages/FrontchannelLogout.js +1 -1
- package/login/pages/FrontchannelLogout.js.map +1 -1
- package/login/pages/IdpReviewUserProfile.js +1 -1
- package/login/pages/IdpReviewUserProfile.js.map +1 -1
- package/login/pages/Info.js +5 -5
- package/login/pages/Info.js.map +1 -1
- package/login/pages/Login.js +4 -4
- package/login/pages/Login.js.map +1 -1
- package/login/pages/LoginConfigTotp.js +2 -2
- package/login/pages/LoginConfigTotp.js.map +1 -1
- package/login/pages/LoginIdpLinkConfirm.js +1 -1
- package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
- package/login/pages/LoginIdpLinkEmail.js +1 -1
- package/login/pages/LoginIdpLinkEmail.js.map +1 -1
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js +1 -1
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js.map +1 -1
- package/login/pages/LoginOauthGrant.js +2 -2
- package/login/pages/LoginOauthGrant.js.map +1 -1
- package/login/pages/LoginOtp.js +1 -1
- package/login/pages/LoginOtp.js.map +1 -1
- package/login/pages/LoginPageExpired.js +1 -1
- package/login/pages/LoginPageExpired.js.map +1 -1
- package/login/pages/LoginPassword.js +3 -3
- package/login/pages/LoginPassword.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeConfig.js +6 -6
- package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeInput.js +1 -1
- package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
- package/login/pages/LoginResetOtp.js +1 -1
- package/login/pages/LoginResetOtp.js.map +1 -1
- package/login/pages/LoginResetPassword.js +2 -2
- package/login/pages/LoginResetPassword.js.map +1 -1
- package/login/pages/LoginUpdatePassword.js +3 -3
- package/login/pages/LoginUpdatePassword.js.map +1 -1
- package/login/pages/LoginUpdateProfile.js +2 -4
- package/login/pages/LoginUpdateProfile.js.map +1 -1
- package/login/pages/LoginUsername.js +3 -3
- package/login/pages/LoginUsername.js.map +1 -1
- package/login/pages/LoginVerifyEmail.js +1 -1
- package/login/pages/LoginVerifyEmail.js.map +1 -1
- package/login/pages/LoginX509Info.js +1 -1
- package/login/pages/LoginX509Info.js.map +1 -1
- package/login/pages/LogoutConfirm.js +1 -1
- package/login/pages/LogoutConfirm.js.map +1 -1
- package/login/pages/Register.js +4 -8
- package/login/pages/Register.js.map +1 -1
- package/login/pages/SamlPostForm.js +1 -1
- package/login/pages/SamlPostForm.js.map +1 -1
- package/login/pages/SelectAuthenticator.js +2 -2
- package/login/pages/SelectAuthenticator.js.map +1 -1
- package/login/pages/Terms.js +1 -1
- package/login/pages/Terms.js.map +1 -1
- package/login/pages/UpdateEmail.js +3 -5
- package/login/pages/UpdateEmail.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.js +17 -14
- package/login/pages/WebauthnAuthenticate.js.map +1 -1
- package/login/pages/WebauthnError.js +2 -2
- package/login/pages/WebauthnError.js.map +1 -1
- package/login/pages/WebauthnRegister.js +10 -10
- package/login/pages/WebauthnRegister.js.map +1 -1
- package/package.json +103 -512
- package/src/PUBLIC_URL.ts +4 -1
- package/src/account/Fallback.tsx +3 -0
- package/src/account/Template.tsx +7 -10
- package/src/account/TemplateProps.ts +4 -1
- package/src/account/i18n/i18n.tsx +44 -37
- package/src/account/index.ts +1 -1
- package/src/account/kcContext/KcContext.ts +76 -63
- package/src/account/kcContext/createGetKcContext.ts +48 -22
- package/src/account/kcContext/getKcContext.ts +3 -1
- package/src/account/kcContext/getKcContextFromWindow.ts +7 -3
- package/src/account/kcContext/kcContextMocks.ts +172 -162
- package/src/account/lib/useGetClassName.ts +15 -14
- package/src/account/pages/Account.tsx +2 -2
- package/src/account/pages/Applications.tsx +2 -2
- package/src/account/pages/FederatedIdentity.tsx +58 -0
- package/src/account/pages/Log.tsx +1 -1
- package/src/account/pages/Password.tsx +8 -8
- package/src/account/pages/Sessions.tsx +0 -3
- package/src/account/pages/Totp.tsx +23 -26
- package/src/bin/copy-keycloak-resources-to-public.ts +10 -106
- package/src/bin/download-keycloak-default-theme.ts +63 -0
- package/src/bin/eject-page.ts +176 -0
- package/src/bin/initialize-email-theme.ts +38 -29
- package/src/bin/keycloakify/buildJars/buildJar.ts +192 -72
- package/src/bin/keycloakify/buildJars/buildJars.ts +41 -23
- package/src/bin/keycloakify/buildJars/extensionVersions.ts +2 -1
- package/src/bin/keycloakify/buildJars/generatePom.ts +12 -4
- package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +73 -21
- package/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +182 -252
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +59 -15
- package/src/bin/keycloakify/generateFtl/index.ts +0 -1
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/bringInAccountV1.ts +34 -22
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/generateMessageProperties.ts +72 -20
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +34 -0
- package/src/bin/keycloakify/{generateTheme/generateSrcMainResources.ts → generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts} +113 -74
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +80 -0
- package/src/bin/keycloakify/generateSrcMainResources/index.ts +1 -0
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/readExtraPageNames.ts +21 -8
- package/src/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.ts +83 -0
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +31 -18
- package/src/bin/keycloakify/index.ts +0 -7
- package/src/bin/keycloakify/keycloakify.ts +77 -69
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +26 -7
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +8 -4
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +7 -4
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +25 -7
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +50 -12
- package/src/bin/main.ts +212 -0
- package/src/bin/shared/KeycloakVersionRange.ts +9 -0
- package/src/bin/shared/buildOptions.ts +307 -0
- package/src/bin/{keycloakify/generateFtl/pageId.ts → shared/constants.ts} +31 -1
- package/src/bin/shared/copyKeycloakResourcesToPublic.ts +104 -0
- package/src/bin/shared/downloadKeycloakDefaultTheme.ts +207 -0
- package/src/bin/shared/downloadKeycloakStaticResources.ts +53 -0
- package/src/bin/shared/getJarFileBasename.ts +11 -0
- package/src/bin/{getThemeSrcDirPath.ts → shared/getThemeSrcDirPath.ts} +6 -3
- package/src/bin/shared/metaInfKeycloakThemes.ts +61 -0
- package/src/bin/shared/promptKeycloakVersion.ts +125 -0
- package/src/bin/start-keycloak/appBuild.ts +129 -0
- package/src/bin/start-keycloak/index.ts +1 -0
- package/src/bin/start-keycloak/keycloakifyBuild.ts +41 -0
- package/src/bin/start-keycloak/myrealm-realm-23.json +2142 -0
- package/src/bin/start-keycloak/myrealm-realm-24.json +2318 -0
- package/src/bin/start-keycloak/start-keycloak.ts +467 -0
- package/src/bin/tools/SemVer.ts +32 -13
- package/src/bin/tools/String.prototype.replaceAll.ts +9 -2
- package/src/bin/tools/crawl.ts +4 -1
- package/src/bin/tools/crc32.ts +42 -24
- package/src/bin/tools/downloadAndExtractArchive/downloadAndExtractArchive.ts +262 -0
- package/src/bin/tools/downloadAndExtractArchive/fetchProxyOptions.ts +96 -0
- package/src/bin/tools/downloadAndExtractArchive/index.ts +1 -0
- package/src/bin/tools/extractArchive.ts +132 -0
- package/src/bin/tools/fetchProxyOptions.ts +31 -8
- package/src/bin/tools/fs.rmSync.ts +4 -4
- package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +17 -2
- package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +73 -0
- package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +8 -2
- package/src/bin/tools/octokit-addons/listTags.ts +15 -4
- package/src/bin/tools/partitionPromiseSettledResults.ts +12 -3
- package/src/bin/tools/{readThisNpmProjectVersion.ts → readThisNpmPackageVersion.ts} +6 -2
- package/src/bin/tools/transformCodebase.ts +29 -10
- package/src/bin/tools/trimIndent.ts +4 -1
- package/src/lib/isStorybook.ts +3 -1
- package/src/lib/useGetClassName.ts +12 -3
- package/src/login/Template.tsx +20 -36
- package/src/login/TemplateProps.ts +4 -1
- package/src/login/UserProfileFormFields.tsx +46 -47
- package/src/login/i18n/baseMessages/ca.ts +1 -1
- package/src/login/i18n/baseMessages/el.ts +0 -1
- package/src/login/i18n/baseMessages/en.ts +1 -1
- package/src/login/i18n/baseMessages/es.ts +1 -1
- package/src/login/i18n/baseMessages/fa.ts +0 -1
- package/src/login/i18n/baseMessages/hu.ts +1 -1
- package/src/login/i18n/baseMessages/zh-CN.ts +1 -1
- package/src/login/i18n/i18n.tsx +77 -54
- package/src/login/index.ts +1 -1
- package/src/login/kcContext/KcContext.ts +23 -4
- package/src/login/kcContext/createGetKcContext.ts +84 -37
- package/src/login/kcContext/getKcContext.ts +3 -1
- package/src/login/kcContext/getKcContextFromWindow.ts +7 -3
- package/src/login/kcContext/kcContextMocks.ts +340 -326
- package/src/login/lib/useDownloadTerms.ts +13 -9
- package/src/login/lib/useGetClassName.ts +119 -112
- package/src/login/lib/useUserProfileForm.tsx +227 -213
- package/src/login/pages/Code.tsx +1 -1
- package/src/login/pages/DeleteAccountConfirm.tsx +9 -3
- package/src/login/pages/FrontchannelLogout.tsx +1 -1
- package/src/login/pages/IdpReviewUserProfile.tsx +1 -1
- package/src/login/pages/Login.tsx +3 -3
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +3 -3
- package/src/login/pages/LoginResetPassword.tsx +2 -2
- package/src/login/pages/LoginUpdateProfile.tsx +1 -1
- package/src/login/pages/LoginUsername.tsx +3 -3
- package/src/login/pages/Register.tsx +1 -1
- package/src/login/pages/UpdateEmail.tsx +1 -1
- package/src/login/pages/WebauthnAuthenticate.tsx +11 -8
- package/src/login/pages/WebauthnRegister.tsx +8 -8
- package/src/tools/AndByDiscriminatingKey.ts +12 -6
- package/src/tools/Array.prototype.every.ts +4 -1
- package/src/tools/LazyOrNot.ts +3 -1
- package/src/tools/StatefulObservable/README.md +16 -0
- package/src/tools/StatefulObservable/StatefulObservable.ts +58 -0
- package/src/tools/StatefulObservable/hooks/index.ts +2 -0
- package/src/tools/StatefulObservable/hooks/useObservable.ts +25 -0
- package/src/tools/StatefulObservable/hooks/useRerenderOnChange.ts +19 -0
- package/src/tools/StatefulObservable/index.ts +2 -0
- package/src/tools/clsx.ts +7 -1
- package/src/tools/deepAssign.ts +15 -8
- package/src/tools/deepClone.ts +3 -1
- package/src/tools/formatNumber.ts +4 -1
- package/src/tools/useConstCallback.ts +3 -1
- package/src/tools/useInsertLinkTags.ts +20 -7
- package/src/tools/useInsertScriptTags.ts +7 -2
- package/src/tools/useSetClassName.ts +4 -1
- package/src/vite-plugin/tsconfig.json +2 -1
- package/src/vite-plugin/vite-plugin.ts +64 -52
- package/tools/Array.prototype.every.js +2 -1
- package/tools/Array.prototype.every.js.map +1 -1
- package/tools/HTMLElement.prototype.prepend.js.map +1 -1
- package/tools/StatefulObservable/StatefulObservable.d.ts +8 -0
- package/tools/StatefulObservable/StatefulObservable.js +36 -0
- package/tools/StatefulObservable/StatefulObservable.js.map +1 -0
- package/tools/StatefulObservable/hooks/index.d.ts +2 -0
- package/tools/StatefulObservable/hooks/index.js +3 -0
- package/tools/StatefulObservable/hooks/index.js.map +1 -0
- package/tools/StatefulObservable/hooks/useObservable.d.ts +8 -0
- package/tools/StatefulObservable/hooks/useObservable.js +17 -0
- package/tools/StatefulObservable/hooks/useObservable.js.map +1 -0
- package/tools/StatefulObservable/hooks/useRerenderOnChange.d.ts +5 -0
- package/tools/StatefulObservable/hooks/useRerenderOnChange.js +14 -0
- package/tools/StatefulObservable/hooks/useRerenderOnChange.js.map +1 -0
- package/tools/StatefulObservable/index.d.ts +2 -0
- package/tools/StatefulObservable/index.js +3 -0
- package/tools/StatefulObservable/index.js.map +1 -0
- package/tools/clsx.js.map +1 -1
- package/tools/deepAssign.js +9 -7
- package/tools/deepAssign.js.map +1 -1
- package/tools/deepClone.js.map +1 -1
- package/tools/formatNumber.js.map +1 -1
- package/tools/memoize.js.map +1 -1
- package/tools/useConstCallback.js.map +1 -1
- package/tools/useInsertLinkTags.js +5 -4
- package/tools/useInsertLinkTags.js.map +1 -1
- package/tools/useInsertScriptTags.js +5 -2
- package/tools/useInsertScriptTags.js.map +1 -1
- package/tools/useSetClassName.js.map +1 -1
- package/vite-plugin/index.js +50234 -3
- package/bin/constants.d.ts +0 -10
- package/bin/constants.js +0 -13
- package/bin/constants.js.map +0 -1
- package/bin/copy-keycloak-resources-to-public.d.ts +0 -14
- package/bin/copy-keycloak-resources-to-public.js +0 -216
- package/bin/copy-keycloak-resources-to-public.js.map +0 -1
- package/bin/download-builtin-keycloak-theme.d.ts +0 -10
- package/bin/download-builtin-keycloak-theme.js +0 -352
- package/bin/download-builtin-keycloak-theme.js.map +0 -1
- package/bin/downloadAndUnzip.d.ts +0 -16
- package/bin/downloadAndUnzip.js +0 -255
- package/bin/downloadAndUnzip.js.map +0 -1
- package/bin/eject-keycloak-page.d.ts +0 -2
- package/bin/eject-keycloak-page.js +0 -132
- package/bin/eject-keycloak-page.js.map +0 -1
- package/bin/getThemeSrcDirPath.d.ts +0 -6
- package/bin/getThemeSrcDirPath.js +0 -123
- package/bin/getThemeSrcDirPath.js.map +0 -1
- package/bin/initialize-email-theme.d.ts +0 -2
- package/bin/initialize-email-theme.js +0 -121
- package/bin/initialize-email-theme.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJar.d.ts +0 -14
- package/bin/keycloakify/buildJars/buildJar.js +0 -224
- package/bin/keycloakify/buildJars/buildJar.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJars.d.ts +0 -10
- package/bin/keycloakify/buildJars/buildJars.js +0 -95
- package/bin/keycloakify/buildJars/buildJars.js.map +0 -1
- package/bin/keycloakify/buildJars/extensionVersions.d.ts +0 -12
- package/bin/keycloakify/buildJars/extensionVersions.js +0 -7
- package/bin/keycloakify/buildJars/extensionVersions.js.map +0 -1
- package/bin/keycloakify/buildJars/generatePom.d.ts +0 -13
- package/bin/keycloakify/buildJars/generatePom.js +0 -95
- package/bin/keycloakify/buildJars/generatePom.js.map +0 -1
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.d.ts +0 -6
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js +0 -35
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js.map +0 -1
- package/bin/keycloakify/buildJars/index.d.ts +0 -1
- package/bin/keycloakify/buildJars/index.js +0 -18
- package/bin/keycloakify/buildJars/index.js.map +0 -1
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.d.ts +0 -35
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js +0 -14
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js.map +0 -1
- package/bin/keycloakify/buildOptions/buildOptions.d.ts +0 -25
- package/bin/keycloakify/buildOptions/buildOptions.js +0 -178
- package/bin/keycloakify/buildOptions/buildOptions.js.map +0 -1
- package/bin/keycloakify/buildOptions/getCacheDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getCacheDirPath.js +0 -22
- package/bin/keycloakify/buildOptions/getCacheDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js +0 -86
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js +0 -26
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/index.d.ts +0 -1
- package/bin/keycloakify/buildOptions/index.js +0 -18
- package/bin/keycloakify/buildOptions/index.js.map +0 -1
- package/bin/keycloakify/buildOptions/parsedPackageJson.d.ts +0 -10
- package/bin/keycloakify/buildOptions/parsedPackageJson.js +0 -49
- package/bin/keycloakify/buildOptions/parsedPackageJson.js.map +0 -1
- package/bin/keycloakify/buildOptions/resolvedViteConfig.d.ts +0 -13
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js +0 -77
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js.map +0 -1
- package/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +0 -604
- package/bin/keycloakify/generateFtl/generateFtl.d.ts +0 -23
- package/bin/keycloakify/generateFtl/generateFtl.js +0 -169
- package/bin/keycloakify/generateFtl/generateFtl.js.map +0 -1
- package/bin/keycloakify/generateFtl/index.d.ts +0 -2
- package/bin/keycloakify/generateFtl/index.js +0 -19
- package/bin/keycloakify/generateFtl/index.js.map +0 -1
- package/bin/keycloakify/generateFtl/pageId.js +0 -41
- package/bin/keycloakify/generateFtl/pageId.js.map +0 -1
- package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +0 -11
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js +0 -89
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +0 -1
- package/bin/keycloakify/generateTheme/bringInAccountV1.d.ts +0 -9
- package/bin/keycloakify/generateTheme/bringInAccountV1.js +0 -153
- package/bin/keycloakify/generateTheme/bringInAccountV1.js.map +0 -1
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.d.ts +0 -11
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js +0 -102
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateMessageProperties.d.ts +0 -8
- package/bin/keycloakify/generateTheme/generateMessageProperties.js +0 -271
- package/bin/keycloakify/generateTheme/generateMessageProperties.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateSrcMainResources.d.ts +0 -21
- package/bin/keycloakify/generateTheme/generateSrcMainResources.js +0 -340
- package/bin/keycloakify/generateTheme/generateSrcMainResources.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateTheme.d.ts +0 -13
- package/bin/keycloakify/generateTheme/generateTheme.js +0 -115
- package/bin/keycloakify/generateTheme/generateTheme.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateThemeVariants.d.ts +0 -5
- package/bin/keycloakify/generateTheme/generateThemeVariants.js +0 -67
- package/bin/keycloakify/generateTheme/generateThemeVariants.js.map +0 -1
- package/bin/keycloakify/generateTheme/index.d.ts +0 -1
- package/bin/keycloakify/generateTheme/index.js +0 -18
- package/bin/keycloakify/generateTheme/index.js.map +0 -1
- package/bin/keycloakify/generateTheme/readExtraPageNames.d.ts +0 -5
- package/bin/keycloakify/generateTheme/readExtraPageNames.js +0 -105
- package/bin/keycloakify/generateTheme/readExtraPageNames.js.map +0 -1
- package/bin/keycloakify/generateTheme/readFieldNameUsage.d.ts +0 -7
- package/bin/keycloakify/generateTheme/readFieldNameUsage.js +0 -141
- package/bin/keycloakify/generateTheme/readFieldNameUsage.js.map +0 -1
- package/bin/keycloakify/index.d.ts +0 -2
- package/bin/keycloakify/index.js +0 -23
- package/bin/keycloakify/index.js.map +0 -1
- package/bin/keycloakify/keycloakify.d.ts +0 -1
- package/bin/keycloakify/keycloakify.js +0 -166
- package/bin/keycloakify/keycloakify.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInCssCode.d.ts +0 -15
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js +0 -88
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.d.ts +0 -9
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +0 -38
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +0 -18
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +0 -70
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +0 -13
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +0 -95
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +0 -103
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +0 -1
- package/bin/promptKeycloakVersion.d.ts +0 -3
- package/bin/promptKeycloakVersion.js +0 -121
- package/bin/promptKeycloakVersion.js.map +0 -1
- package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
- package/bin/tools/OptionalIfCanBeUndefined.js +0 -3
- package/bin/tools/OptionalIfCanBeUndefined.js.map +0 -1
- package/bin/tools/SemVer.d.ts +0 -26
- package/bin/tools/SemVer.js +0 -119
- package/bin/tools/SemVer.js.map +0 -1
- package/bin/tools/String.prototype.replaceAll.d.ts +0 -1
- package/bin/tools/String.prototype.replaceAll.js +0 -29
- package/bin/tools/String.prototype.replaceAll.js.map +0 -1
- package/bin/tools/crawl.d.ts +0 -5
- package/bin/tools/crawl.js +0 -74
- package/bin/tools/crawl.js.map +0 -1
- package/bin/tools/crc32.d.ts +0 -9
- package/bin/tools/crc32.js +0 -64
- package/bin/tools/crc32.js.map +0 -1
- package/bin/tools/deflate.d.ts +0 -24
- package/bin/tools/deflate.js +0 -155
- package/bin/tools/deflate.js.map +0 -1
- package/bin/tools/fetchProxyOptions.d.ts +0 -5
- package/bin/tools/fetchProxyOptions.js +0 -172
- package/bin/tools/fetchProxyOptions.js.map +0 -1
- package/bin/tools/fs.existsAsync.d.ts +0 -1
- package/bin/tools/fs.existsAsync.js +0 -86
- package/bin/tools/fs.existsAsync.js.map +0 -1
- package/bin/tools/fs.rm.d.ts +0 -8
- package/bin/tools/fs.rm.js +0 -151
- package/bin/tools/fs.rm.js.map +0 -1
- package/bin/tools/fs.rmSync.d.ts +0 -8
- package/bin/tools/fs.rmSync.js +0 -58
- package/bin/tools/fs.rmSync.js.map +0 -1
- package/bin/tools/getAbsoluteAndInOsFormatPath.d.ts +0 -4
- package/bin/tools/getAbsoluteAndInOsFormatPath.js +0 -16
- package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.d.ts +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.js +0 -43
- package/bin/tools/getThisCodebaseRootDirPath.js.map +0 -1
- package/bin/tools/grant-exec-perms.d.ts +0 -1
- package/bin/tools/grant-exec-perms.js +0 -100
- package/bin/tools/grant-exec-perms.js.map +0 -1
- package/bin/tools/isInside.d.ts +0 -4
- package/bin/tools/isInside.js +0 -10
- package/bin/tools/isInside.js.map +0 -1
- package/bin/tools/kebabCaseToSnakeCase.d.ts +0 -1
- package/bin/tools/kebabCaseToSnakeCase.js +0 -35
- package/bin/tools/kebabCaseToSnakeCase.js.map +0 -1
- package/bin/tools/logger.d.ts +0 -12
- package/bin/tools/logger.js +0 -23
- package/bin/tools/logger.js.map +0 -1
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -14
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +0 -119
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +0 -1
- package/bin/tools/octokit-addons/listTags.d.ts +0 -13
- package/bin/tools/octokit-addons/listTags.js +0 -154
- package/bin/tools/octokit-addons/listTags.js.map +0 -1
- package/bin/tools/partitionPromiseSettledResults.d.ts +0 -2
- package/bin/tools/partitionPromiseSettledResults.js +0 -41
- package/bin/tools/partitionPromiseSettledResults.js.map +0 -1
- package/bin/tools/readThisNpmProjectVersion.d.ts +0 -1
- package/bin/tools/readThisNpmProjectVersion.js +0 -37
- package/bin/tools/readThisNpmProjectVersion.js.map +0 -1
- package/bin/tools/tee.d.ts +0 -3
- package/bin/tools/tee.js +0 -37
- package/bin/tools/tee.js.map +0 -1
- package/bin/tools/transformCodebase.d.ts +0 -20
- package/bin/tools/transformCodebase.js +0 -97
- package/bin/tools/transformCodebase.js.map +0 -1
- package/bin/tools/trimIndent.d.ts +0 -5
- package/bin/tools/trimIndent.js +0 -82
- package/bin/tools/trimIndent.js.map +0 -1
- package/bin/tools/unzip.d.ts +0 -2
- package/bin/tools/unzip.js +0 -274
- package/bin/tools/unzip.js.map +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -2
- package/index.js.map +0 -1
- package/lib/keycloakJsAdapter.d.ts +0 -51
- package/lib/keycloakJsAdapter.js +0 -74
- package/lib/keycloakJsAdapter.js.map +0 -1
- package/src/bin/constants.ts +0 -13
- package/src/bin/download-builtin-keycloak-theme.ts +0 -290
- package/src/bin/downloadAndUnzip.ts +0 -203
- package/src/bin/eject-keycloak-page.ts +0 -64
- package/src/bin/keycloakify/buildOptions/UserProvidedBuildOptions.ts +0 -21
- package/src/bin/keycloakify/buildOptions/buildOptions.ts +0 -189
- package/src/bin/keycloakify/buildOptions/getCacheDirPath.ts +0 -25
- package/src/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.ts +0 -49
- package/src/bin/keycloakify/buildOptions/getReactAppRootDirPath.ts +0 -23
- package/src/bin/keycloakify/buildOptions/index.ts +0 -1
- package/src/bin/keycloakify/buildOptions/parsedPackageJson.ts +0 -32
- package/src/bin/keycloakify/buildOptions/resolvedViteConfig.ts +0 -74
- package/src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts +0 -49
- package/src/bin/keycloakify/generateTheme/generateTheme.ts +0 -44
- package/src/bin/keycloakify/generateTheme/generateThemeVariants.ts +0 -50
- package/src/bin/keycloakify/generateTheme/index.ts +0 -1
- package/src/bin/keycloakify/generateTheme/readFieldNameUsage.ts +0 -55
- package/src/bin/promptKeycloakVersion.ts +0 -49
- package/src/bin/tools/grant-exec-perms.ts +0 -19
- package/src/bin/tools/logger.ts +0 -27
- package/src/bin/tools/unzip.ts +0 -141
- package/src/index.ts +0 -1
- package/src/lib/keycloakJsAdapter.ts +0 -118
- package/vite-plugin/index.js.map +0 -1
- package/vite-plugin/tsconfig.tsbuildinfo +0 -1
- package/vite-plugin/vite-plugin.d.ts +0 -6
- package/vite-plugin/vite-plugin.js +0 -158
- package/vite-plugin/vite-plugin.js.map +0 -1
package/bin/772.index.js
ADDED
@@ -0,0 +1,1524 @@
|
|
1
|
+
exports.id = 772;
|
2
|
+
exports.ids = [772,246];
|
3
|
+
exports.modules = {
|
4
|
+
|
5
|
+
/***/ 76047:
|
6
|
+
/***/ ((module) => {
|
7
|
+
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
|
11
|
+
const mimicFn = (to, from) => {
|
12
|
+
for (const prop of Reflect.ownKeys(from)) {
|
13
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
14
|
+
}
|
15
|
+
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
|
19
|
+
module.exports = mimicFn;
|
20
|
+
// TODO: Remove this for the next major release
|
21
|
+
module.exports["default"] = mimicFn;
|
22
|
+
|
23
|
+
|
24
|
+
/***/ }),
|
25
|
+
|
26
|
+
/***/ 89082:
|
27
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
28
|
+
|
29
|
+
"use strict";
|
30
|
+
|
31
|
+
const mimicFn = __webpack_require__(76047);
|
32
|
+
|
33
|
+
const calledFunctions = new WeakMap();
|
34
|
+
|
35
|
+
const onetime = (function_, options = {}) => {
|
36
|
+
if (typeof function_ !== 'function') {
|
37
|
+
throw new TypeError('Expected a function');
|
38
|
+
}
|
39
|
+
|
40
|
+
let returnValue;
|
41
|
+
let callCount = 0;
|
42
|
+
const functionName = function_.displayName || function_.name || '<anonymous>';
|
43
|
+
|
44
|
+
const onetime = function (...arguments_) {
|
45
|
+
calledFunctions.set(onetime, ++callCount);
|
46
|
+
|
47
|
+
if (callCount === 1) {
|
48
|
+
returnValue = function_.apply(this, arguments_);
|
49
|
+
function_ = null;
|
50
|
+
} else if (options.throw === true) {
|
51
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
52
|
+
}
|
53
|
+
|
54
|
+
return returnValue;
|
55
|
+
};
|
56
|
+
|
57
|
+
mimicFn(onetime, function_);
|
58
|
+
calledFunctions.set(onetime, callCount);
|
59
|
+
|
60
|
+
return onetime;
|
61
|
+
};
|
62
|
+
|
63
|
+
module.exports = onetime;
|
64
|
+
// TODO: Remove this for the next major release
|
65
|
+
module.exports["default"] = onetime;
|
66
|
+
|
67
|
+
module.exports.callCount = function_ => {
|
68
|
+
if (!calledFunctions.has(function_)) {
|
69
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
70
|
+
}
|
71
|
+
|
72
|
+
return calledFunctions.get(function_);
|
73
|
+
};
|
74
|
+
|
75
|
+
|
76
|
+
/***/ }),
|
77
|
+
|
78
|
+
/***/ 24931:
|
79
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
80
|
+
|
81
|
+
// Note: since nyc uses this module to output coverage, any lines
|
82
|
+
// that are in the direct sync flow of nyc's outputCoverage are
|
83
|
+
// ignored, since we can never get coverage for them.
|
84
|
+
// grab a reference to node's real process object right away
|
85
|
+
var process = global.process
|
86
|
+
|
87
|
+
const processOk = function (process) {
|
88
|
+
return process &&
|
89
|
+
typeof process === 'object' &&
|
90
|
+
typeof process.removeListener === 'function' &&
|
91
|
+
typeof process.emit === 'function' &&
|
92
|
+
typeof process.reallyExit === 'function' &&
|
93
|
+
typeof process.listeners === 'function' &&
|
94
|
+
typeof process.kill === 'function' &&
|
95
|
+
typeof process.pid === 'number' &&
|
96
|
+
typeof process.on === 'function'
|
97
|
+
}
|
98
|
+
|
99
|
+
// some kind of non-node environment, just no-op
|
100
|
+
/* istanbul ignore if */
|
101
|
+
if (!processOk(process)) {
|
102
|
+
module.exports = function () {
|
103
|
+
return function () {}
|
104
|
+
}
|
105
|
+
} else {
|
106
|
+
var assert = __webpack_require__(39491)
|
107
|
+
var signals = __webpack_require__(63710)
|
108
|
+
var isWin = /^win/i.test(process.platform)
|
109
|
+
|
110
|
+
var EE = __webpack_require__(82361)
|
111
|
+
/* istanbul ignore if */
|
112
|
+
if (typeof EE !== 'function') {
|
113
|
+
EE = EE.EventEmitter
|
114
|
+
}
|
115
|
+
|
116
|
+
var emitter
|
117
|
+
if (process.__signal_exit_emitter__) {
|
118
|
+
emitter = process.__signal_exit_emitter__
|
119
|
+
} else {
|
120
|
+
emitter = process.__signal_exit_emitter__ = new EE()
|
121
|
+
emitter.count = 0
|
122
|
+
emitter.emitted = {}
|
123
|
+
}
|
124
|
+
|
125
|
+
// Because this emitter is a global, we have to check to see if a
|
126
|
+
// previous version of this library failed to enable infinite listeners.
|
127
|
+
// I know what you're about to say. But literally everything about
|
128
|
+
// signal-exit is a compromise with evil. Get used to it.
|
129
|
+
if (!emitter.infinite) {
|
130
|
+
emitter.setMaxListeners(Infinity)
|
131
|
+
emitter.infinite = true
|
132
|
+
}
|
133
|
+
|
134
|
+
module.exports = function (cb, opts) {
|
135
|
+
/* istanbul ignore if */
|
136
|
+
if (!processOk(global.process)) {
|
137
|
+
return function () {}
|
138
|
+
}
|
139
|
+
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
|
140
|
+
|
141
|
+
if (loaded === false) {
|
142
|
+
load()
|
143
|
+
}
|
144
|
+
|
145
|
+
var ev = 'exit'
|
146
|
+
if (opts && opts.alwaysLast) {
|
147
|
+
ev = 'afterexit'
|
148
|
+
}
|
149
|
+
|
150
|
+
var remove = function () {
|
151
|
+
emitter.removeListener(ev, cb)
|
152
|
+
if (emitter.listeners('exit').length === 0 &&
|
153
|
+
emitter.listeners('afterexit').length === 0) {
|
154
|
+
unload()
|
155
|
+
}
|
156
|
+
}
|
157
|
+
emitter.on(ev, cb)
|
158
|
+
|
159
|
+
return remove
|
160
|
+
}
|
161
|
+
|
162
|
+
var unload = function unload () {
|
163
|
+
if (!loaded || !processOk(global.process)) {
|
164
|
+
return
|
165
|
+
}
|
166
|
+
loaded = false
|
167
|
+
|
168
|
+
signals.forEach(function (sig) {
|
169
|
+
try {
|
170
|
+
process.removeListener(sig, sigListeners[sig])
|
171
|
+
} catch (er) {}
|
172
|
+
})
|
173
|
+
process.emit = originalProcessEmit
|
174
|
+
process.reallyExit = originalProcessReallyExit
|
175
|
+
emitter.count -= 1
|
176
|
+
}
|
177
|
+
module.exports.unload = unload
|
178
|
+
|
179
|
+
var emit = function emit (event, code, signal) {
|
180
|
+
/* istanbul ignore if */
|
181
|
+
if (emitter.emitted[event]) {
|
182
|
+
return
|
183
|
+
}
|
184
|
+
emitter.emitted[event] = true
|
185
|
+
emitter.emit(event, code, signal)
|
186
|
+
}
|
187
|
+
|
188
|
+
// { <signal>: <listener fn>, ... }
|
189
|
+
var sigListeners = {}
|
190
|
+
signals.forEach(function (sig) {
|
191
|
+
sigListeners[sig] = function listener () {
|
192
|
+
/* istanbul ignore if */
|
193
|
+
if (!processOk(global.process)) {
|
194
|
+
return
|
195
|
+
}
|
196
|
+
// If there are no other listeners, an exit is coming!
|
197
|
+
// Simplest way: remove us and then re-send the signal.
|
198
|
+
// We know that this will kill the process, so we can
|
199
|
+
// safely emit now.
|
200
|
+
var listeners = process.listeners(sig)
|
201
|
+
if (listeners.length === emitter.count) {
|
202
|
+
unload()
|
203
|
+
emit('exit', null, sig)
|
204
|
+
/* istanbul ignore next */
|
205
|
+
emit('afterexit', null, sig)
|
206
|
+
/* istanbul ignore next */
|
207
|
+
if (isWin && sig === 'SIGHUP') {
|
208
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
209
|
+
// so use a supported signal instead
|
210
|
+
sig = 'SIGINT'
|
211
|
+
}
|
212
|
+
/* istanbul ignore next */
|
213
|
+
process.kill(process.pid, sig)
|
214
|
+
}
|
215
|
+
}
|
216
|
+
})
|
217
|
+
|
218
|
+
module.exports.signals = function () {
|
219
|
+
return signals
|
220
|
+
}
|
221
|
+
|
222
|
+
var loaded = false
|
223
|
+
|
224
|
+
var load = function load () {
|
225
|
+
if (loaded || !processOk(global.process)) {
|
226
|
+
return
|
227
|
+
}
|
228
|
+
loaded = true
|
229
|
+
|
230
|
+
// This is the number of onSignalExit's that are in play.
|
231
|
+
// It's important so that we can count the correct number of
|
232
|
+
// listeners on signals, and don't wait for the other one to
|
233
|
+
// handle it instead of us.
|
234
|
+
emitter.count += 1
|
235
|
+
|
236
|
+
signals = signals.filter(function (sig) {
|
237
|
+
try {
|
238
|
+
process.on(sig, sigListeners[sig])
|
239
|
+
return true
|
240
|
+
} catch (er) {
|
241
|
+
return false
|
242
|
+
}
|
243
|
+
})
|
244
|
+
|
245
|
+
process.emit = processEmit
|
246
|
+
process.reallyExit = processReallyExit
|
247
|
+
}
|
248
|
+
module.exports.load = load
|
249
|
+
|
250
|
+
var originalProcessReallyExit = process.reallyExit
|
251
|
+
var processReallyExit = function processReallyExit (code) {
|
252
|
+
/* istanbul ignore if */
|
253
|
+
if (!processOk(global.process)) {
|
254
|
+
return
|
255
|
+
}
|
256
|
+
process.exitCode = code || /* istanbul ignore next */ 0
|
257
|
+
emit('exit', process.exitCode, null)
|
258
|
+
/* istanbul ignore next */
|
259
|
+
emit('afterexit', process.exitCode, null)
|
260
|
+
/* istanbul ignore next */
|
261
|
+
originalProcessReallyExit.call(process, process.exitCode)
|
262
|
+
}
|
263
|
+
|
264
|
+
var originalProcessEmit = process.emit
|
265
|
+
var processEmit = function processEmit (ev, arg) {
|
266
|
+
if (ev === 'exit' && processOk(global.process)) {
|
267
|
+
/* istanbul ignore else */
|
268
|
+
if (arg !== undefined) {
|
269
|
+
process.exitCode = arg
|
270
|
+
}
|
271
|
+
var ret = originalProcessEmit.apply(this, arguments)
|
272
|
+
/* istanbul ignore next */
|
273
|
+
emit('exit', process.exitCode, null)
|
274
|
+
/* istanbul ignore next */
|
275
|
+
emit('afterexit', process.exitCode, null)
|
276
|
+
/* istanbul ignore next */
|
277
|
+
return ret
|
278
|
+
} else {
|
279
|
+
return originalProcessEmit.apply(this, arguments)
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
|
285
|
+
/***/ }),
|
286
|
+
|
287
|
+
/***/ 63710:
|
288
|
+
/***/ ((module) => {
|
289
|
+
|
290
|
+
// This is not the set of all possible signals.
|
291
|
+
//
|
292
|
+
// It IS, however, the set of all signals that trigger
|
293
|
+
// an exit on either Linux or BSD systems. Linux is a
|
294
|
+
// superset of the signal names supported on BSD, and
|
295
|
+
// the unknown signals just fail to register, so we can
|
296
|
+
// catch that easily enough.
|
297
|
+
//
|
298
|
+
// Don't bother with SIGKILL. It's uncatchable, which
|
299
|
+
// means that we can't fire any callbacks anyway.
|
300
|
+
//
|
301
|
+
// If a user does happen to register a handler on a non-
|
302
|
+
// fatal signal like SIGWINCH or something, and then
|
303
|
+
// exit, it'll end up firing `process.emit('exit')`, so
|
304
|
+
// the handler will be fired anyway.
|
305
|
+
//
|
306
|
+
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
307
|
+
// artificially, inherently leave the process in a
|
308
|
+
// state from which it is not safe to try and enter JS
|
309
|
+
// listeners.
|
310
|
+
module.exports = [
|
311
|
+
'SIGABRT',
|
312
|
+
'SIGALRM',
|
313
|
+
'SIGHUP',
|
314
|
+
'SIGINT',
|
315
|
+
'SIGTERM'
|
316
|
+
]
|
317
|
+
|
318
|
+
if (process.platform !== 'win32') {
|
319
|
+
module.exports.push(
|
320
|
+
'SIGVTALRM',
|
321
|
+
'SIGXCPU',
|
322
|
+
'SIGXFSZ',
|
323
|
+
'SIGUSR2',
|
324
|
+
'SIGTRAP',
|
325
|
+
'SIGSYS',
|
326
|
+
'SIGQUIT',
|
327
|
+
'SIGIOT'
|
328
|
+
// should detect profiler and enable/disable accordingly.
|
329
|
+
// see #21
|
330
|
+
// 'SIGPROF'
|
331
|
+
)
|
332
|
+
}
|
333
|
+
|
334
|
+
if (process.platform === 'linux') {
|
335
|
+
module.exports.push(
|
336
|
+
'SIGIO',
|
337
|
+
'SIGPOLL',
|
338
|
+
'SIGPWR',
|
339
|
+
'SIGSTKFLT',
|
340
|
+
'SIGUNUSED'
|
341
|
+
)
|
342
|
+
}
|
343
|
+
|
344
|
+
|
345
|
+
/***/ }),
|
346
|
+
|
347
|
+
/***/ 41772:
|
348
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
349
|
+
|
350
|
+
"use strict";
|
351
|
+
// ESM COMPAT FLAG
|
352
|
+
__webpack_require__.r(__webpack_exports__);
|
353
|
+
|
354
|
+
// EXPORTS
|
355
|
+
__webpack_require__.d(__webpack_exports__, {
|
356
|
+
"createLogUpdate": () => (/* binding */ createLogUpdate),
|
357
|
+
"default": () => (/* binding */ log_update),
|
358
|
+
"logUpdateStderr": () => (/* binding */ logUpdateStderr)
|
359
|
+
});
|
360
|
+
|
361
|
+
// EXTERNAL MODULE: external "node:process"
|
362
|
+
var external_node_process_ = __webpack_require__(97742);
|
363
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/ansi-escapes/index.js
|
364
|
+
const ESC = '\u001B[';
|
365
|
+
const OSC = '\u001B]';
|
366
|
+
const BEL = '\u0007';
|
367
|
+
const SEP = ';';
|
368
|
+
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
369
|
+
|
370
|
+
const ansiEscapes = {};
|
371
|
+
|
372
|
+
ansiEscapes.cursorTo = (x, y) => {
|
373
|
+
if (typeof x !== 'number') {
|
374
|
+
throw new TypeError('The `x` argument is required');
|
375
|
+
}
|
376
|
+
|
377
|
+
if (typeof y !== 'number') {
|
378
|
+
return ESC + (x + 1) + 'G';
|
379
|
+
}
|
380
|
+
|
381
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
382
|
+
};
|
383
|
+
|
384
|
+
ansiEscapes.cursorMove = (x, y) => {
|
385
|
+
if (typeof x !== 'number') {
|
386
|
+
throw new TypeError('The `x` argument is required');
|
387
|
+
}
|
388
|
+
|
389
|
+
let returnValue = '';
|
390
|
+
|
391
|
+
if (x < 0) {
|
392
|
+
returnValue += ESC + (-x) + 'D';
|
393
|
+
} else if (x > 0) {
|
394
|
+
returnValue += ESC + x + 'C';
|
395
|
+
}
|
396
|
+
|
397
|
+
if (y < 0) {
|
398
|
+
returnValue += ESC + (-y) + 'A';
|
399
|
+
} else if (y > 0) {
|
400
|
+
returnValue += ESC + y + 'B';
|
401
|
+
}
|
402
|
+
|
403
|
+
return returnValue;
|
404
|
+
};
|
405
|
+
|
406
|
+
ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
|
407
|
+
ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
|
408
|
+
ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
|
409
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
|
410
|
+
|
411
|
+
ansiEscapes.cursorLeft = ESC + 'G';
|
412
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
|
413
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
|
414
|
+
ansiEscapes.cursorGetPosition = ESC + '6n';
|
415
|
+
ansiEscapes.cursorNextLine = ESC + 'E';
|
416
|
+
ansiEscapes.cursorPrevLine = ESC + 'F';
|
417
|
+
ansiEscapes.cursorHide = ESC + '?25l';
|
418
|
+
ansiEscapes.cursorShow = ESC + '?25h';
|
419
|
+
|
420
|
+
ansiEscapes.eraseLines = count => {
|
421
|
+
let clear = '';
|
422
|
+
|
423
|
+
for (let i = 0; i < count; i++) {
|
424
|
+
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
|
425
|
+
}
|
426
|
+
|
427
|
+
if (count) {
|
428
|
+
clear += ansiEscapes.cursorLeft;
|
429
|
+
}
|
430
|
+
|
431
|
+
return clear;
|
432
|
+
};
|
433
|
+
|
434
|
+
ansiEscapes.eraseEndLine = ESC + 'K';
|
435
|
+
ansiEscapes.eraseStartLine = ESC + '1K';
|
436
|
+
ansiEscapes.eraseLine = ESC + '2K';
|
437
|
+
ansiEscapes.eraseDown = ESC + 'J';
|
438
|
+
ansiEscapes.eraseUp = ESC + '1J';
|
439
|
+
ansiEscapes.eraseScreen = ESC + '2J';
|
440
|
+
ansiEscapes.scrollUp = ESC + 'S';
|
441
|
+
ansiEscapes.scrollDown = ESC + 'T';
|
442
|
+
|
443
|
+
ansiEscapes.clearScreen = '\u001Bc';
|
444
|
+
|
445
|
+
ansiEscapes.clearTerminal = process.platform === 'win32' ?
|
446
|
+
`${ansiEscapes.eraseScreen}${ESC}0f` :
|
447
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
448
|
+
// 2. Erases the whole screen including scrollback buffer
|
449
|
+
// 3. Moves cursor to the top-left position
|
450
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
451
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
452
|
+
|
453
|
+
ansiEscapes.beep = BEL;
|
454
|
+
|
455
|
+
ansiEscapes.link = (text, url) => {
|
456
|
+
return [
|
457
|
+
OSC,
|
458
|
+
'8',
|
459
|
+
SEP,
|
460
|
+
SEP,
|
461
|
+
url,
|
462
|
+
BEL,
|
463
|
+
text,
|
464
|
+
OSC,
|
465
|
+
'8',
|
466
|
+
SEP,
|
467
|
+
SEP,
|
468
|
+
BEL
|
469
|
+
].join('');
|
470
|
+
};
|
471
|
+
|
472
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
473
|
+
let returnValue = `${OSC}1337;File=inline=1`;
|
474
|
+
|
475
|
+
if (options.width) {
|
476
|
+
returnValue += `;width=${options.width}`;
|
477
|
+
}
|
478
|
+
|
479
|
+
if (options.height) {
|
480
|
+
returnValue += `;height=${options.height}`;
|
481
|
+
}
|
482
|
+
|
483
|
+
if (options.preserveAspectRatio === false) {
|
484
|
+
returnValue += ';preserveAspectRatio=0';
|
485
|
+
}
|
486
|
+
|
487
|
+
return returnValue + ':' + buffer.toString('base64') + BEL;
|
488
|
+
};
|
489
|
+
|
490
|
+
ansiEscapes.iTerm = {
|
491
|
+
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
492
|
+
|
493
|
+
annotation: (message, options = {}) => {
|
494
|
+
let returnValue = `${OSC}1337;`;
|
495
|
+
|
496
|
+
const hasX = typeof options.x !== 'undefined';
|
497
|
+
const hasY = typeof options.y !== 'undefined';
|
498
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
|
499
|
+
throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
|
500
|
+
}
|
501
|
+
|
502
|
+
message = message.replace(/\|/g, '');
|
503
|
+
|
504
|
+
returnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
|
505
|
+
|
506
|
+
if (options.length > 0) {
|
507
|
+
returnValue +=
|
508
|
+
(hasX ?
|
509
|
+
[message, options.length, options.x, options.y] :
|
510
|
+
[options.length, message]).join('|');
|
511
|
+
} else {
|
512
|
+
returnValue += message;
|
513
|
+
}
|
514
|
+
|
515
|
+
return returnValue + BEL;
|
516
|
+
}
|
517
|
+
};
|
518
|
+
|
519
|
+
/* harmony default export */ const ansi_escapes = (ansiEscapes);
|
520
|
+
|
521
|
+
// EXTERNAL MODULE: ./node_modules/onetime/index.js
|
522
|
+
var onetime = __webpack_require__(89082);
|
523
|
+
// EXTERNAL MODULE: ./node_modules/signal-exit/index.js
|
524
|
+
var signal_exit = __webpack_require__(24931);
|
525
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/restore-cursor/index.js
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
const restoreCursor = onetime(() => {
|
531
|
+
signal_exit(() => {
|
532
|
+
external_node_process_.stderr.write('\u001B[?25h');
|
533
|
+
}, {alwaysLast: true});
|
534
|
+
});
|
535
|
+
|
536
|
+
/* harmony default export */ const restore_cursor = (restoreCursor);
|
537
|
+
|
538
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/cli-cursor/index.js
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
let isHidden = false;
|
543
|
+
|
544
|
+
const cliCursor = {};
|
545
|
+
|
546
|
+
cliCursor.show = (writableStream = external_node_process_.stderr) => {
|
547
|
+
if (!writableStream.isTTY) {
|
548
|
+
return;
|
549
|
+
}
|
550
|
+
|
551
|
+
isHidden = false;
|
552
|
+
writableStream.write('\u001B[?25h');
|
553
|
+
};
|
554
|
+
|
555
|
+
cliCursor.hide = (writableStream = external_node_process_.stderr) => {
|
556
|
+
if (!writableStream.isTTY) {
|
557
|
+
return;
|
558
|
+
}
|
559
|
+
|
560
|
+
restore_cursor();
|
561
|
+
isHidden = true;
|
562
|
+
writableStream.write('\u001B[?25l');
|
563
|
+
};
|
564
|
+
|
565
|
+
cliCursor.toggle = (force, writableStream) => {
|
566
|
+
if (force !== undefined) {
|
567
|
+
isHidden = force;
|
568
|
+
}
|
569
|
+
|
570
|
+
if (isHidden) {
|
571
|
+
cliCursor.show(writableStream);
|
572
|
+
} else {
|
573
|
+
cliCursor.hide(writableStream);
|
574
|
+
}
|
575
|
+
};
|
576
|
+
|
577
|
+
/* harmony default export */ const cli_cursor = (cliCursor);
|
578
|
+
|
579
|
+
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/wrap-ansi/index.js + 1 modules
|
580
|
+
var wrap_ansi = __webpack_require__(19246);
|
581
|
+
// EXTERNAL MODULE: ./node_modules/slice-ansi/index.js + 2 modules
|
582
|
+
var slice_ansi = __webpack_require__(32470);
|
583
|
+
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/strip-ansi/index.js + 1 modules
|
584
|
+
var strip_ansi = __webpack_require__(5505);
|
585
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/log-update/index.js
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
const defaultTerminalHeight = 24;
|
594
|
+
|
595
|
+
const getWidth = stream => {
|
596
|
+
const {columns} = stream;
|
597
|
+
|
598
|
+
if (!columns) {
|
599
|
+
return 80;
|
600
|
+
}
|
601
|
+
|
602
|
+
return columns;
|
603
|
+
};
|
604
|
+
|
605
|
+
const fitToTerminalHeight = (stream, text) => {
|
606
|
+
const terminalHeight = stream.rows || defaultTerminalHeight;
|
607
|
+
const lines = text.split('\n');
|
608
|
+
|
609
|
+
const toRemove = lines.length - terminalHeight;
|
610
|
+
if (toRemove <= 0) {
|
611
|
+
return text;
|
612
|
+
}
|
613
|
+
|
614
|
+
return (0,slice_ansi/* default */.Z)(
|
615
|
+
text,
|
616
|
+
(0,strip_ansi/* default */.Z)(lines.slice(0, toRemove).join('\n')).length + 1,
|
617
|
+
);
|
618
|
+
};
|
619
|
+
|
620
|
+
function createLogUpdate(stream, {showCursor = false} = {}) {
|
621
|
+
let previousLineCount = 0;
|
622
|
+
let previousWidth = getWidth(stream);
|
623
|
+
let previousOutput = '';
|
624
|
+
|
625
|
+
const render = (...arguments_) => {
|
626
|
+
if (!showCursor) {
|
627
|
+
cli_cursor.hide();
|
628
|
+
}
|
629
|
+
|
630
|
+
let output = arguments_.join(' ') + '\n';
|
631
|
+
output = fitToTerminalHeight(stream, output);
|
632
|
+
const width = getWidth(stream);
|
633
|
+
if (output === previousOutput && previousWidth === width) {
|
634
|
+
return;
|
635
|
+
}
|
636
|
+
|
637
|
+
previousOutput = output;
|
638
|
+
previousWidth = width;
|
639
|
+
output = (0,wrap_ansi["default"])(output, width, {
|
640
|
+
trim: false,
|
641
|
+
hard: true,
|
642
|
+
wordWrap: false,
|
643
|
+
});
|
644
|
+
stream.write(ansi_escapes.eraseLines(previousLineCount) + output);
|
645
|
+
previousLineCount = output.split('\n').length;
|
646
|
+
};
|
647
|
+
|
648
|
+
render.clear = () => {
|
649
|
+
stream.write(ansi_escapes.eraseLines(previousLineCount));
|
650
|
+
previousOutput = '';
|
651
|
+
previousWidth = getWidth(stream);
|
652
|
+
previousLineCount = 0;
|
653
|
+
};
|
654
|
+
|
655
|
+
render.done = () => {
|
656
|
+
previousOutput = '';
|
657
|
+
previousWidth = getWidth(stream);
|
658
|
+
previousLineCount = 0;
|
659
|
+
|
660
|
+
if (!showCursor) {
|
661
|
+
cli_cursor.show();
|
662
|
+
}
|
663
|
+
};
|
664
|
+
|
665
|
+
return render;
|
666
|
+
}
|
667
|
+
|
668
|
+
const logUpdate = createLogUpdate(external_node_process_.stdout);
|
669
|
+
/* harmony default export */ const log_update = (logUpdate);
|
670
|
+
|
671
|
+
const logUpdateStderr = createLogUpdate(external_node_process_.stderr);
|
672
|
+
|
673
|
+
|
674
|
+
/***/ }),
|
675
|
+
|
676
|
+
/***/ 19246:
|
677
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
678
|
+
|
679
|
+
"use strict";
|
680
|
+
// ESM COMPAT FLAG
|
681
|
+
__webpack_require__.r(__webpack_exports__);
|
682
|
+
|
683
|
+
// EXPORTS
|
684
|
+
__webpack_require__.d(__webpack_exports__, {
|
685
|
+
"default": () => (/* binding */ wrapAnsi)
|
686
|
+
});
|
687
|
+
|
688
|
+
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/string-width/index.js
|
689
|
+
var string_width = __webpack_require__(10509);
|
690
|
+
// EXTERNAL MODULE: ./node_modules/listr2/node_modules/strip-ansi/index.js + 1 modules
|
691
|
+
var strip_ansi = __webpack_require__(5505);
|
692
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/ansi-styles/index.js
|
693
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
694
|
+
|
695
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
696
|
+
|
697
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
698
|
+
|
699
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
700
|
+
|
701
|
+
const styles = {
|
702
|
+
modifier: {
|
703
|
+
reset: [0, 0],
|
704
|
+
// 21 isn't widely supported and 22 does the same thing
|
705
|
+
bold: [1, 22],
|
706
|
+
dim: [2, 22],
|
707
|
+
italic: [3, 23],
|
708
|
+
underline: [4, 24],
|
709
|
+
overline: [53, 55],
|
710
|
+
inverse: [7, 27],
|
711
|
+
hidden: [8, 28],
|
712
|
+
strikethrough: [9, 29],
|
713
|
+
},
|
714
|
+
color: {
|
715
|
+
black: [30, 39],
|
716
|
+
red: [31, 39],
|
717
|
+
green: [32, 39],
|
718
|
+
yellow: [33, 39],
|
719
|
+
blue: [34, 39],
|
720
|
+
magenta: [35, 39],
|
721
|
+
cyan: [36, 39],
|
722
|
+
white: [37, 39],
|
723
|
+
|
724
|
+
// Bright color
|
725
|
+
blackBright: [90, 39],
|
726
|
+
gray: [90, 39], // Alias of `blackBright`
|
727
|
+
grey: [90, 39], // Alias of `blackBright`
|
728
|
+
redBright: [91, 39],
|
729
|
+
greenBright: [92, 39],
|
730
|
+
yellowBright: [93, 39],
|
731
|
+
blueBright: [94, 39],
|
732
|
+
magentaBright: [95, 39],
|
733
|
+
cyanBright: [96, 39],
|
734
|
+
whiteBright: [97, 39],
|
735
|
+
},
|
736
|
+
bgColor: {
|
737
|
+
bgBlack: [40, 49],
|
738
|
+
bgRed: [41, 49],
|
739
|
+
bgGreen: [42, 49],
|
740
|
+
bgYellow: [43, 49],
|
741
|
+
bgBlue: [44, 49],
|
742
|
+
bgMagenta: [45, 49],
|
743
|
+
bgCyan: [46, 49],
|
744
|
+
bgWhite: [47, 49],
|
745
|
+
|
746
|
+
// Bright color
|
747
|
+
bgBlackBright: [100, 49],
|
748
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
749
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
750
|
+
bgRedBright: [101, 49],
|
751
|
+
bgGreenBright: [102, 49],
|
752
|
+
bgYellowBright: [103, 49],
|
753
|
+
bgBlueBright: [104, 49],
|
754
|
+
bgMagentaBright: [105, 49],
|
755
|
+
bgCyanBright: [106, 49],
|
756
|
+
bgWhiteBright: [107, 49],
|
757
|
+
},
|
758
|
+
};
|
759
|
+
|
760
|
+
const modifierNames = Object.keys(styles.modifier);
|
761
|
+
const foregroundColorNames = Object.keys(styles.color);
|
762
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
763
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
764
|
+
|
765
|
+
function assembleStyles() {
|
766
|
+
const codes = new Map();
|
767
|
+
|
768
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
769
|
+
for (const [styleName, style] of Object.entries(group)) {
|
770
|
+
styles[styleName] = {
|
771
|
+
open: `\u001B[${style[0]}m`,
|
772
|
+
close: `\u001B[${style[1]}m`,
|
773
|
+
};
|
774
|
+
|
775
|
+
group[styleName] = styles[styleName];
|
776
|
+
|
777
|
+
codes.set(style[0], style[1]);
|
778
|
+
}
|
779
|
+
|
780
|
+
Object.defineProperty(styles, groupName, {
|
781
|
+
value: group,
|
782
|
+
enumerable: false,
|
783
|
+
});
|
784
|
+
}
|
785
|
+
|
786
|
+
Object.defineProperty(styles, 'codes', {
|
787
|
+
value: codes,
|
788
|
+
enumerable: false,
|
789
|
+
});
|
790
|
+
|
791
|
+
styles.color.close = '\u001B[39m';
|
792
|
+
styles.bgColor.close = '\u001B[49m';
|
793
|
+
|
794
|
+
styles.color.ansi = wrapAnsi16();
|
795
|
+
styles.color.ansi256 = wrapAnsi256();
|
796
|
+
styles.color.ansi16m = wrapAnsi16m();
|
797
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
798
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
799
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
800
|
+
|
801
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
802
|
+
Object.defineProperties(styles, {
|
803
|
+
rgbToAnsi256: {
|
804
|
+
value: (red, green, blue) => {
|
805
|
+
// We use the extended greyscale palette here, with the exception of
|
806
|
+
// black and white. normal palette only has 4 greyscale shades.
|
807
|
+
if (red === green && green === blue) {
|
808
|
+
if (red < 8) {
|
809
|
+
return 16;
|
810
|
+
}
|
811
|
+
|
812
|
+
if (red > 248) {
|
813
|
+
return 231;
|
814
|
+
}
|
815
|
+
|
816
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
817
|
+
}
|
818
|
+
|
819
|
+
return 16
|
820
|
+
+ (36 * Math.round(red / 255 * 5))
|
821
|
+
+ (6 * Math.round(green / 255 * 5))
|
822
|
+
+ Math.round(blue / 255 * 5);
|
823
|
+
},
|
824
|
+
enumerable: false,
|
825
|
+
},
|
826
|
+
hexToRgb: {
|
827
|
+
value: hex => {
|
828
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
829
|
+
if (!matches) {
|
830
|
+
return [0, 0, 0];
|
831
|
+
}
|
832
|
+
|
833
|
+
let [colorString] = matches;
|
834
|
+
|
835
|
+
if (colorString.length === 3) {
|
836
|
+
colorString = [...colorString].map(character => character + character).join('');
|
837
|
+
}
|
838
|
+
|
839
|
+
const integer = Number.parseInt(colorString, 16);
|
840
|
+
|
841
|
+
return [
|
842
|
+
/* eslint-disable no-bitwise */
|
843
|
+
(integer >> 16) & 0xFF,
|
844
|
+
(integer >> 8) & 0xFF,
|
845
|
+
integer & 0xFF,
|
846
|
+
/* eslint-enable no-bitwise */
|
847
|
+
];
|
848
|
+
},
|
849
|
+
enumerable: false,
|
850
|
+
},
|
851
|
+
hexToAnsi256: {
|
852
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
853
|
+
enumerable: false,
|
854
|
+
},
|
855
|
+
ansi256ToAnsi: {
|
856
|
+
value: code => {
|
857
|
+
if (code < 8) {
|
858
|
+
return 30 + code;
|
859
|
+
}
|
860
|
+
|
861
|
+
if (code < 16) {
|
862
|
+
return 90 + (code - 8);
|
863
|
+
}
|
864
|
+
|
865
|
+
let red;
|
866
|
+
let green;
|
867
|
+
let blue;
|
868
|
+
|
869
|
+
if (code >= 232) {
|
870
|
+
red = (((code - 232) * 10) + 8) / 255;
|
871
|
+
green = red;
|
872
|
+
blue = red;
|
873
|
+
} else {
|
874
|
+
code -= 16;
|
875
|
+
|
876
|
+
const remainder = code % 36;
|
877
|
+
|
878
|
+
red = Math.floor(code / 36) / 5;
|
879
|
+
green = Math.floor(remainder / 6) / 5;
|
880
|
+
blue = (remainder % 6) / 5;
|
881
|
+
}
|
882
|
+
|
883
|
+
const value = Math.max(red, green, blue) * 2;
|
884
|
+
|
885
|
+
if (value === 0) {
|
886
|
+
return 30;
|
887
|
+
}
|
888
|
+
|
889
|
+
// eslint-disable-next-line no-bitwise
|
890
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
891
|
+
|
892
|
+
if (value === 2) {
|
893
|
+
result += 60;
|
894
|
+
}
|
895
|
+
|
896
|
+
return result;
|
897
|
+
},
|
898
|
+
enumerable: false,
|
899
|
+
},
|
900
|
+
rgbToAnsi: {
|
901
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
902
|
+
enumerable: false,
|
903
|
+
},
|
904
|
+
hexToAnsi: {
|
905
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
906
|
+
enumerable: false,
|
907
|
+
},
|
908
|
+
});
|
909
|
+
|
910
|
+
return styles;
|
911
|
+
}
|
912
|
+
|
913
|
+
const ansiStyles = assembleStyles();
|
914
|
+
|
915
|
+
/* harmony default export */ const ansi_styles = (ansiStyles);
|
916
|
+
|
917
|
+
;// CONCATENATED MODULE: ./node_modules/listr2/node_modules/wrap-ansi/index.js
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
const ESCAPES = new Set([
|
923
|
+
'\u001B',
|
924
|
+
'\u009B',
|
925
|
+
]);
|
926
|
+
|
927
|
+
const END_CODE = 39;
|
928
|
+
const ANSI_ESCAPE_BELL = '\u0007';
|
929
|
+
const ANSI_CSI = '[';
|
930
|
+
const ANSI_OSC = ']';
|
931
|
+
const ANSI_SGR_TERMINATOR = 'm';
|
932
|
+
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
933
|
+
|
934
|
+
const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
935
|
+
const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
|
936
|
+
|
937
|
+
// Calculate the length of words split on ' ', ignoring
|
938
|
+
// the extra characters added by ansi escape codes
|
939
|
+
const wordLengths = string => string.split(' ').map(character => (0,string_width/* default */.Z)(character));
|
940
|
+
|
941
|
+
// Wrap a long word across multiple rows
|
942
|
+
// Ansi escape codes do not count towards length
|
943
|
+
const wrapWord = (rows, word, columns) => {
|
944
|
+
const characters = [...word];
|
945
|
+
|
946
|
+
let isInsideEscape = false;
|
947
|
+
let isInsideLinkEscape = false;
|
948
|
+
let visible = (0,string_width/* default */.Z)((0,strip_ansi/* default */.Z)(rows[rows.length - 1]));
|
949
|
+
|
950
|
+
for (const [index, character] of characters.entries()) {
|
951
|
+
const characterLength = (0,string_width/* default */.Z)(character);
|
952
|
+
|
953
|
+
if (visible + characterLength <= columns) {
|
954
|
+
rows[rows.length - 1] += character;
|
955
|
+
} else {
|
956
|
+
rows.push(character);
|
957
|
+
visible = 0;
|
958
|
+
}
|
959
|
+
|
960
|
+
if (ESCAPES.has(character)) {
|
961
|
+
isInsideEscape = true;
|
962
|
+
isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);
|
963
|
+
}
|
964
|
+
|
965
|
+
if (isInsideEscape) {
|
966
|
+
if (isInsideLinkEscape) {
|
967
|
+
if (character === ANSI_ESCAPE_BELL) {
|
968
|
+
isInsideEscape = false;
|
969
|
+
isInsideLinkEscape = false;
|
970
|
+
}
|
971
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
972
|
+
isInsideEscape = false;
|
973
|
+
}
|
974
|
+
|
975
|
+
continue;
|
976
|
+
}
|
977
|
+
|
978
|
+
visible += characterLength;
|
979
|
+
|
980
|
+
if (visible === columns && index < characters.length - 1) {
|
981
|
+
rows.push('');
|
982
|
+
visible = 0;
|
983
|
+
}
|
984
|
+
}
|
985
|
+
|
986
|
+
// It's possible that the last row we copy over is only
|
987
|
+
// ansi escape characters, handle this edge-case
|
988
|
+
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
989
|
+
rows[rows.length - 2] += rows.pop();
|
990
|
+
}
|
991
|
+
};
|
992
|
+
|
993
|
+
// Trims spaces from a string ignoring invisible sequences
|
994
|
+
const stringVisibleTrimSpacesRight = string => {
|
995
|
+
const words = string.split(' ');
|
996
|
+
let last = words.length;
|
997
|
+
|
998
|
+
while (last > 0) {
|
999
|
+
if ((0,string_width/* default */.Z)(words[last - 1]) > 0) {
|
1000
|
+
break;
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
last--;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
if (last === words.length) {
|
1007
|
+
return string;
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
return words.slice(0, last).join(' ') + words.slice(last).join('');
|
1011
|
+
};
|
1012
|
+
|
1013
|
+
// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode
|
1014
|
+
//
|
1015
|
+
// 'hard' will never allow a string to take up more than columns characters
|
1016
|
+
//
|
1017
|
+
// 'soft' allows long words to expand past the column length
|
1018
|
+
const exec = (string, columns, options = {}) => {
|
1019
|
+
if (options.trim !== false && string.trim() === '') {
|
1020
|
+
return '';
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
let returnValue = '';
|
1024
|
+
let escapeCode;
|
1025
|
+
let escapeUrl;
|
1026
|
+
|
1027
|
+
const lengths = wordLengths(string);
|
1028
|
+
let rows = [''];
|
1029
|
+
|
1030
|
+
for (const [index, word] of string.split(' ').entries()) {
|
1031
|
+
if (options.trim !== false) {
|
1032
|
+
rows[rows.length - 1] = rows[rows.length - 1].trimStart();
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
let rowLength = (0,string_width/* default */.Z)(rows[rows.length - 1]);
|
1036
|
+
|
1037
|
+
if (index !== 0) {
|
1038
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
1039
|
+
// If we start with a new word but the current row length equals the length of the columns, add a new row
|
1040
|
+
rows.push('');
|
1041
|
+
rowLength = 0;
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
if (rowLength > 0 || options.trim === false) {
|
1045
|
+
rows[rows.length - 1] += ' ';
|
1046
|
+
rowLength++;
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'
|
1051
|
+
if (options.hard && lengths[index] > columns) {
|
1052
|
+
const remainingColumns = (columns - rowLength);
|
1053
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
1054
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
1055
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
1056
|
+
rows.push('');
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
wrapWord(rows, word, columns);
|
1060
|
+
continue;
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
1064
|
+
if (options.wordWrap === false && rowLength < columns) {
|
1065
|
+
wrapWord(rows, word, columns);
|
1066
|
+
continue;
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
rows.push('');
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
1073
|
+
wrapWord(rows, word, columns);
|
1074
|
+
continue;
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
rows[rows.length - 1] += word;
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
if (options.trim !== false) {
|
1081
|
+
rows = rows.map(row => stringVisibleTrimSpacesRight(row));
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
const pre = [...rows.join('\n')];
|
1085
|
+
|
1086
|
+
for (const [index, character] of pre.entries()) {
|
1087
|
+
returnValue += character;
|
1088
|
+
|
1089
|
+
if (ESCAPES.has(character)) {
|
1090
|
+
const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};
|
1091
|
+
if (groups.code !== undefined) {
|
1092
|
+
const code = Number.parseFloat(groups.code);
|
1093
|
+
escapeCode = code === END_CODE ? undefined : code;
|
1094
|
+
} else if (groups.uri !== undefined) {
|
1095
|
+
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
1096
|
+
}
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
const code = ansi_styles.codes.get(Number(escapeCode));
|
1100
|
+
|
1101
|
+
if (pre[index + 1] === '\n') {
|
1102
|
+
if (escapeUrl) {
|
1103
|
+
returnValue += wrapAnsiHyperlink('');
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
if (escapeCode && code) {
|
1107
|
+
returnValue += wrapAnsiCode(code);
|
1108
|
+
}
|
1109
|
+
} else if (character === '\n') {
|
1110
|
+
if (escapeCode && code) {
|
1111
|
+
returnValue += wrapAnsiCode(escapeCode);
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
if (escapeUrl) {
|
1115
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
1116
|
+
}
|
1117
|
+
}
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
return returnValue;
|
1121
|
+
};
|
1122
|
+
|
1123
|
+
// For each newline, invoke the method separately
|
1124
|
+
function wrapAnsi(string, columns, options) {
|
1125
|
+
return String(string)
|
1126
|
+
.normalize()
|
1127
|
+
.replace(/\r\n/g, '\n')
|
1128
|
+
.split('\n')
|
1129
|
+
.map(line => exec(line, columns, options))
|
1130
|
+
.join('\n');
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
|
1134
|
+
/***/ }),
|
1135
|
+
|
1136
|
+
/***/ 32470:
|
1137
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1138
|
+
|
1139
|
+
"use strict";
|
1140
|
+
|
1141
|
+
// EXPORTS
|
1142
|
+
__webpack_require__.d(__webpack_exports__, {
|
1143
|
+
"Z": () => (/* binding */ sliceAnsi)
|
1144
|
+
});
|
1145
|
+
|
1146
|
+
;// CONCATENATED MODULE: ./node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
|
1147
|
+
/* eslint-disable yoda */
|
1148
|
+
|
1149
|
+
function isFullwidthCodePoint(codePoint) {
|
1150
|
+
if (!Number.isInteger(codePoint)) {
|
1151
|
+
return false;
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
// Code points are derived from:
|
1155
|
+
// https://unicode.org/Public/UNIDATA/EastAsianWidth.txt
|
1156
|
+
return codePoint >= 0x1100 && (
|
1157
|
+
codePoint <= 0x115F || // Hangul Jamo
|
1158
|
+
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
1159
|
+
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
|
1160
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
1161
|
+
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
|
1162
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
1163
|
+
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
|
1164
|
+
// CJK Unified Ideographs .. Yi Radicals
|
1165
|
+
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
|
1166
|
+
// Hangul Jamo Extended-A
|
1167
|
+
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
1168
|
+
// Hangul Syllables
|
1169
|
+
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
1170
|
+
// CJK Compatibility Ideographs
|
1171
|
+
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
1172
|
+
// Vertical Forms
|
1173
|
+
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
1174
|
+
// CJK Compatibility Forms .. Small Form Variants
|
1175
|
+
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
|
1176
|
+
// Halfwidth and Fullwidth Forms
|
1177
|
+
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
1178
|
+
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
|
1179
|
+
// Kana Supplement
|
1180
|
+
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
1181
|
+
// Enclosed Ideographic Supplement
|
1182
|
+
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
|
1183
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
1184
|
+
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
|
1185
|
+
);
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
;// CONCATENATED MODULE: ./node_modules/slice-ansi/node_modules/ansi-styles/index.js
|
1189
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
1190
|
+
|
1191
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
1192
|
+
|
1193
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
1194
|
+
|
1195
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
1196
|
+
|
1197
|
+
const styles = {
|
1198
|
+
modifier: {
|
1199
|
+
reset: [0, 0],
|
1200
|
+
// 21 isn't widely supported and 22 does the same thing
|
1201
|
+
bold: [1, 22],
|
1202
|
+
dim: [2, 22],
|
1203
|
+
italic: [3, 23],
|
1204
|
+
underline: [4, 24],
|
1205
|
+
overline: [53, 55],
|
1206
|
+
inverse: [7, 27],
|
1207
|
+
hidden: [8, 28],
|
1208
|
+
strikethrough: [9, 29],
|
1209
|
+
},
|
1210
|
+
color: {
|
1211
|
+
black: [30, 39],
|
1212
|
+
red: [31, 39],
|
1213
|
+
green: [32, 39],
|
1214
|
+
yellow: [33, 39],
|
1215
|
+
blue: [34, 39],
|
1216
|
+
magenta: [35, 39],
|
1217
|
+
cyan: [36, 39],
|
1218
|
+
white: [37, 39],
|
1219
|
+
|
1220
|
+
// Bright color
|
1221
|
+
blackBright: [90, 39],
|
1222
|
+
gray: [90, 39], // Alias of `blackBright`
|
1223
|
+
grey: [90, 39], // Alias of `blackBright`
|
1224
|
+
redBright: [91, 39],
|
1225
|
+
greenBright: [92, 39],
|
1226
|
+
yellowBright: [93, 39],
|
1227
|
+
blueBright: [94, 39],
|
1228
|
+
magentaBright: [95, 39],
|
1229
|
+
cyanBright: [96, 39],
|
1230
|
+
whiteBright: [97, 39],
|
1231
|
+
},
|
1232
|
+
bgColor: {
|
1233
|
+
bgBlack: [40, 49],
|
1234
|
+
bgRed: [41, 49],
|
1235
|
+
bgGreen: [42, 49],
|
1236
|
+
bgYellow: [43, 49],
|
1237
|
+
bgBlue: [44, 49],
|
1238
|
+
bgMagenta: [45, 49],
|
1239
|
+
bgCyan: [46, 49],
|
1240
|
+
bgWhite: [47, 49],
|
1241
|
+
|
1242
|
+
// Bright color
|
1243
|
+
bgBlackBright: [100, 49],
|
1244
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
1245
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
1246
|
+
bgRedBright: [101, 49],
|
1247
|
+
bgGreenBright: [102, 49],
|
1248
|
+
bgYellowBright: [103, 49],
|
1249
|
+
bgBlueBright: [104, 49],
|
1250
|
+
bgMagentaBright: [105, 49],
|
1251
|
+
bgCyanBright: [106, 49],
|
1252
|
+
bgWhiteBright: [107, 49],
|
1253
|
+
},
|
1254
|
+
};
|
1255
|
+
|
1256
|
+
const modifierNames = Object.keys(styles.modifier);
|
1257
|
+
const foregroundColorNames = Object.keys(styles.color);
|
1258
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
1259
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
1260
|
+
|
1261
|
+
function assembleStyles() {
|
1262
|
+
const codes = new Map();
|
1263
|
+
|
1264
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
1265
|
+
for (const [styleName, style] of Object.entries(group)) {
|
1266
|
+
styles[styleName] = {
|
1267
|
+
open: `\u001B[${style[0]}m`,
|
1268
|
+
close: `\u001B[${style[1]}m`,
|
1269
|
+
};
|
1270
|
+
|
1271
|
+
group[styleName] = styles[styleName];
|
1272
|
+
|
1273
|
+
codes.set(style[0], style[1]);
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
Object.defineProperty(styles, groupName, {
|
1277
|
+
value: group,
|
1278
|
+
enumerable: false,
|
1279
|
+
});
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
Object.defineProperty(styles, 'codes', {
|
1283
|
+
value: codes,
|
1284
|
+
enumerable: false,
|
1285
|
+
});
|
1286
|
+
|
1287
|
+
styles.color.close = '\u001B[39m';
|
1288
|
+
styles.bgColor.close = '\u001B[49m';
|
1289
|
+
|
1290
|
+
styles.color.ansi = wrapAnsi16();
|
1291
|
+
styles.color.ansi256 = wrapAnsi256();
|
1292
|
+
styles.color.ansi16m = wrapAnsi16m();
|
1293
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
1294
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
1295
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
1296
|
+
|
1297
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
1298
|
+
Object.defineProperties(styles, {
|
1299
|
+
rgbToAnsi256: {
|
1300
|
+
value: (red, green, blue) => {
|
1301
|
+
// We use the extended greyscale palette here, with the exception of
|
1302
|
+
// black and white. normal palette only has 4 greyscale shades.
|
1303
|
+
if (red === green && green === blue) {
|
1304
|
+
if (red < 8) {
|
1305
|
+
return 16;
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
if (red > 248) {
|
1309
|
+
return 231;
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
1313
|
+
}
|
1314
|
+
|
1315
|
+
return 16
|
1316
|
+
+ (36 * Math.round(red / 255 * 5))
|
1317
|
+
+ (6 * Math.round(green / 255 * 5))
|
1318
|
+
+ Math.round(blue / 255 * 5);
|
1319
|
+
},
|
1320
|
+
enumerable: false,
|
1321
|
+
},
|
1322
|
+
hexToRgb: {
|
1323
|
+
value: hex => {
|
1324
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
1325
|
+
if (!matches) {
|
1326
|
+
return [0, 0, 0];
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
let [colorString] = matches;
|
1330
|
+
|
1331
|
+
if (colorString.length === 3) {
|
1332
|
+
colorString = [...colorString].map(character => character + character).join('');
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
const integer = Number.parseInt(colorString, 16);
|
1336
|
+
|
1337
|
+
return [
|
1338
|
+
/* eslint-disable no-bitwise */
|
1339
|
+
(integer >> 16) & 0xFF,
|
1340
|
+
(integer >> 8) & 0xFF,
|
1341
|
+
integer & 0xFF,
|
1342
|
+
/* eslint-enable no-bitwise */
|
1343
|
+
];
|
1344
|
+
},
|
1345
|
+
enumerable: false,
|
1346
|
+
},
|
1347
|
+
hexToAnsi256: {
|
1348
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
1349
|
+
enumerable: false,
|
1350
|
+
},
|
1351
|
+
ansi256ToAnsi: {
|
1352
|
+
value: code => {
|
1353
|
+
if (code < 8) {
|
1354
|
+
return 30 + code;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
if (code < 16) {
|
1358
|
+
return 90 + (code - 8);
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
let red;
|
1362
|
+
let green;
|
1363
|
+
let blue;
|
1364
|
+
|
1365
|
+
if (code >= 232) {
|
1366
|
+
red = (((code - 232) * 10) + 8) / 255;
|
1367
|
+
green = red;
|
1368
|
+
blue = red;
|
1369
|
+
} else {
|
1370
|
+
code -= 16;
|
1371
|
+
|
1372
|
+
const remainder = code % 36;
|
1373
|
+
|
1374
|
+
red = Math.floor(code / 36) / 5;
|
1375
|
+
green = Math.floor(remainder / 6) / 5;
|
1376
|
+
blue = (remainder % 6) / 5;
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
const value = Math.max(red, green, blue) * 2;
|
1380
|
+
|
1381
|
+
if (value === 0) {
|
1382
|
+
return 30;
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
// eslint-disable-next-line no-bitwise
|
1386
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
1387
|
+
|
1388
|
+
if (value === 2) {
|
1389
|
+
result += 60;
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
return result;
|
1393
|
+
},
|
1394
|
+
enumerable: false,
|
1395
|
+
},
|
1396
|
+
rgbToAnsi: {
|
1397
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
1398
|
+
enumerable: false,
|
1399
|
+
},
|
1400
|
+
hexToAnsi: {
|
1401
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
1402
|
+
enumerable: false,
|
1403
|
+
},
|
1404
|
+
});
|
1405
|
+
|
1406
|
+
return styles;
|
1407
|
+
}
|
1408
|
+
|
1409
|
+
const ansiStyles = assembleStyles();
|
1410
|
+
|
1411
|
+
/* harmony default export */ const ansi_styles = (ansiStyles);
|
1412
|
+
|
1413
|
+
;// CONCATENATED MODULE: ./node_modules/slice-ansi/index.js
|
1414
|
+
|
1415
|
+
|
1416
|
+
|
1417
|
+
const astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
|
1418
|
+
|
1419
|
+
const ESCAPES = [
|
1420
|
+
'\u001B',
|
1421
|
+
'\u009B'
|
1422
|
+
];
|
1423
|
+
|
1424
|
+
const wrapAnsi = code => `${ESCAPES[0]}[${code}m`;
|
1425
|
+
|
1426
|
+
const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
|
1427
|
+
let output = [];
|
1428
|
+
ansiCodes = [...ansiCodes];
|
1429
|
+
|
1430
|
+
for (let ansiCode of ansiCodes) {
|
1431
|
+
const ansiCodeOrigin = ansiCode;
|
1432
|
+
if (ansiCode.includes(';')) {
|
1433
|
+
ansiCode = ansiCode.split(';')[0][0] + '0';
|
1434
|
+
}
|
1435
|
+
|
1436
|
+
const item = ansi_styles.codes.get(Number.parseInt(ansiCode, 10));
|
1437
|
+
if (item) {
|
1438
|
+
const indexEscape = ansiCodes.indexOf(item.toString());
|
1439
|
+
if (indexEscape === -1) {
|
1440
|
+
output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
|
1441
|
+
} else {
|
1442
|
+
ansiCodes.splice(indexEscape, 1);
|
1443
|
+
}
|
1444
|
+
} else if (isEscapes) {
|
1445
|
+
output.push(wrapAnsi(0));
|
1446
|
+
break;
|
1447
|
+
} else {
|
1448
|
+
output.push(wrapAnsi(ansiCodeOrigin));
|
1449
|
+
}
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
if (isEscapes) {
|
1453
|
+
output = output.filter((element, index) => output.indexOf(element) === index);
|
1454
|
+
|
1455
|
+
if (endAnsiCode !== undefined) {
|
1456
|
+
const fistEscapeCode = wrapAnsi(ansi_styles.codes.get(Number.parseInt(endAnsiCode, 10)));
|
1457
|
+
// TODO: Remove the use of `.reduce` here.
|
1458
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
1459
|
+
output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
|
1460
|
+
}
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
return output.join('');
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
function sliceAnsi(string, begin, end) {
|
1467
|
+
const characters = [...string];
|
1468
|
+
const ansiCodes = [];
|
1469
|
+
|
1470
|
+
let stringEnd = typeof end === 'number' ? end : characters.length;
|
1471
|
+
let isInsideEscape = false;
|
1472
|
+
let ansiCode;
|
1473
|
+
let visible = 0;
|
1474
|
+
let output = '';
|
1475
|
+
|
1476
|
+
for (const [index, character] of characters.entries()) {
|
1477
|
+
let leftEscape = false;
|
1478
|
+
|
1479
|
+
if (ESCAPES.includes(character)) {
|
1480
|
+
const code = /\d[^m]*/.exec(string.slice(index, index + 18));
|
1481
|
+
ansiCode = code && code.length > 0 ? code[0] : undefined;
|
1482
|
+
|
1483
|
+
if (visible < stringEnd) {
|
1484
|
+
isInsideEscape = true;
|
1485
|
+
|
1486
|
+
if (ansiCode !== undefined) {
|
1487
|
+
ansiCodes.push(ansiCode);
|
1488
|
+
}
|
1489
|
+
}
|
1490
|
+
} else if (isInsideEscape && character === 'm') {
|
1491
|
+
isInsideEscape = false;
|
1492
|
+
leftEscape = true;
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
if (!isInsideEscape && !leftEscape) {
|
1496
|
+
visible++;
|
1497
|
+
}
|
1498
|
+
|
1499
|
+
if (!astralRegex.test(character) && isFullwidthCodePoint(character.codePointAt())) {
|
1500
|
+
visible++;
|
1501
|
+
|
1502
|
+
if (typeof end !== 'number') {
|
1503
|
+
stringEnd++;
|
1504
|
+
}
|
1505
|
+
}
|
1506
|
+
|
1507
|
+
if (visible > begin && visible <= stringEnd) {
|
1508
|
+
output += character;
|
1509
|
+
} else if (visible === begin && !isInsideEscape && ansiCode !== undefined) {
|
1510
|
+
output = checkAnsi(ansiCodes);
|
1511
|
+
} else if (visible >= stringEnd) {
|
1512
|
+
output += checkAnsi(ansiCodes, true, ansiCode);
|
1513
|
+
break;
|
1514
|
+
}
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
return output;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
|
1521
|
+
/***/ })
|
1522
|
+
|
1523
|
+
};
|
1524
|
+
;
|