keycloakify 10.1.0-rc.1 → 10.1.0
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 +2 -2
- package/PUBLIC_URL.js.map +1 -1
- package/account/KcContext/kcContextMocks.js +3 -3
- package/account/KcContext/kcContextMocks.js.map +1 -1
- package/bin/193.index.js +198 -62
- package/bin/{365.index.js → 20.index.js} +302 -263
- package/bin/31.index.js +15 -23
- package/bin/{430.index.js → 33.index.js} +579 -4
- package/bin/{678.index.js → 36.index.js} +2 -577
- package/bin/{440.index.js → 499.index.js} +259 -181
- package/bin/526.index.js +3 -784
- package/bin/599.index.js +4 -1
- package/bin/780.index.js +1 -1
- package/bin/{525.index.js → 903.index.js} +4840 -97
- package/bin/932.index.js +115 -886
- package/bin/main.js +4 -4
- package/bin/shared/buildContext.d.ts +0 -2
- package/bin/shared/buildContext.js.map +1 -1
- package/bin/shared/constants.d.ts +5 -6
- package/bin/shared/constants.js +5 -6
- package/bin/shared/constants.js.map +1 -1
- package/bin/shared/copyKeycloakResourcesToPublic.d.ts +2 -4
- package/bin/shared/copyKeycloakResourcesToPublic.js.map +1 -1
- package/login/KcContext/KcContext.d.ts +9 -18
- package/login/KcContext/KcContext.js.map +1 -1
- package/login/KcContext/kcContextMocks.js +6 -10
- package/login/KcContext/kcContextMocks.js.map +1 -1
- package/login/Template.js +4 -59
- package/login/Template.js.map +1 -1
- package/login/Template.useStylesAndScripts.d.ts +17 -0
- package/login/Template.useStylesAndScripts.js +69 -0
- package/login/Template.useStylesAndScripts.js.map +1 -0
- package/login/pages/Login.js +1 -1
- package/login/pages/Login.js.map +1 -1
- package/login/pages/LoginIdpLinkConfirmOverride.js +0 -1
- package/login/pages/LoginIdpLinkConfirmOverride.js.map +1 -1
- package/login/pages/LoginPasskeysConditionalAuthenticate.js +6 -49
- package/login/pages/LoginPasskeysConditionalAuthenticate.js.map +1 -1
- package/login/pages/LoginPasskeysConditionalAuthenticate.useScript.d.ts +20 -0
- package/login/pages/LoginPasskeysConditionalAuthenticate.useScript.js +49 -0
- package/login/pages/LoginPasskeysConditionalAuthenticate.useScript.js.map +1 -0
- package/login/pages/LoginRecoveryAuthnCodeConfig.js +4 -126
- package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeConfig.useScript.d.ts +9 -0
- package/login/pages/LoginRecoveryAuthnCodeConfig.useScript.js +133 -0
- package/login/pages/LoginRecoveryAuthnCodeConfig.useScript.js.map +1 -0
- package/login/pages/LoginUsername.js +1 -1
- package/login/pages/LoginUsername.js.map +1 -1
- package/login/pages/Register.js +6 -3
- package/login/pages/Register.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.js +13 -116
- package/login/pages/WebauthnAuthenticate.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.useScript.d.ts +21 -0
- package/login/pages/WebauthnAuthenticate.useScript.js +41 -0
- package/login/pages/WebauthnAuthenticate.useScript.js.map +1 -0
- package/login/pages/WebauthnRegister.js +8 -178
- package/login/pages/WebauthnRegister.js.map +1 -1
- package/login/pages/WebauthnRegister.useScript.d.ts +27 -0
- package/login/pages/WebauthnRegister.useScript.js +49 -0
- package/login/pages/WebauthnRegister.useScript.js.map +1 -0
- package/package.json +125 -15
- package/res/account-v1/account.ftl +70 -0
- package/res/account-v1/applications.ftl +76 -0
- package/res/account-v1/federatedIdentity.ftl +42 -0
- package/res/account-v1/log.ftl +35 -0
- package/res/account-v1/messages/messages_ar.properties +406 -0
- package/res/account-v1/messages/messages_ca.properties +147 -0
- package/res/account-v1/messages/messages_cs.properties +171 -0
- package/res/account-v1/messages/messages_da.properties +339 -0
- package/res/account-v1/messages/messages_de.properties +353 -0
- package/res/account-v1/messages/messages_en.properties +404 -0
- package/res/account-v1/messages/messages_es.properties +147 -0
- package/res/account-v1/messages/messages_fi.properties +400 -0
- package/res/account-v1/messages/messages_fr.properties +180 -0
- package/res/account-v1/messages/messages_hu.properties +334 -0
- package/res/account-v1/messages/messages_it.properties +336 -0
- package/res/account-v1/messages/messages_ja.properties +335 -0
- package/res/account-v1/messages/messages_lt.properties +154 -0
- package/res/account-v1/messages/messages_lv.properties +197 -0
- package/res/account-v1/messages/messages_nl.properties +371 -0
- package/res/account-v1/messages/messages_no.properties +152 -0
- package/res/account-v1/messages/messages_pl.properties +248 -0
- package/res/account-v1/messages/messages_pt_BR.properties +349 -0
- package/res/account-v1/messages/messages_ru.properties +235 -0
- package/res/account-v1/messages/messages_sk.properties +196 -0
- package/res/account-v1/messages/messages_sv.properties +150 -0
- package/res/account-v1/messages/messages_tr.properties +315 -0
- package/res/account-v1/messages/messages_zh_CN.properties +153 -0
- package/res/account-v1/password.ftl +59 -0
- package/res/account-v1/resource-detail.ftl +277 -0
- package/res/account-v1/resources/css/account.css +277 -0
- package/res/account-v1/resources/img/icon-sidebar-active.png +0 -0
- package/res/account-v1/resources/img/keycloak-logo.png +0 -0
- package/res/account-v1/resources/img/logo.png +0 -0
- package/res/account-v1/resources/resources-common/img/favicon.ico +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css +5 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/css/patternfly.min.css +8 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
- package/res/account-v1/resources/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
- package/res/account-v1/resources.ftl +403 -0
- package/res/account-v1/sessions.ftl +44 -0
- package/res/account-v1/template.ftl +88 -0
- package/res/account-v1/theme.properties +14 -0
- package/res/account-v1/totp.ftl +141 -0
- package/res/public/.keycloakify/account/css/account.css +277 -0
- package/res/public/.keycloakify/account/img/icon-sidebar-active.png +0 -0
- package/res/public/.keycloakify/account/img/keycloak-logo.png +0 -0
- package/res/public/.keycloakify/account/img/logo.png +0 -0
- package/res/public/.keycloakify/account/resources-common/img/favicon.ico +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css +5 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/css/patternfly.min.css +8 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
- package/res/public/.keycloakify/account/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
- package/res/public/.keycloakify/login/css/login.css +629 -0
- package/res/public/.keycloakify/login/img/feedback-error-arrow-down.png +0 -0
- package/res/public/.keycloakify/login/img/feedback-error-sign.png +0 -0
- package/res/public/.keycloakify/login/img/feedback-success-arrow-down.png +0 -0
- package/res/public/.keycloakify/login/img/feedback-success-sign.png +0 -0
- package/res/public/.keycloakify/login/img/feedback-warning-arrow-down.png +0 -0
- package/res/public/.keycloakify/login/img/feedback-warning-sign.png +0 -0
- package/res/public/.keycloakify/login/img/keycloak-bg.png +0 -0
- package/res/public/.keycloakify/login/img/keycloak-logo-text.png +0 -0
- package/res/public/.keycloakify/login/img/keycloak-logo.png +0 -0
- package/res/public/.keycloakify/login/js/authChecker.js +49 -0
- package/res/public/.keycloakify/login/js/common.js +48 -0
- package/res/public/.keycloakify/login/js/kcMultivalued.js +106 -0
- package/res/public/.keycloakify/login/js/kcNumberFormat.js +21 -0
- package/res/public/.keycloakify/login/js/kcNumberUnFormat.js +19 -0
- package/res/public/.keycloakify/login/js/menu-button-links.js +315 -0
- package/{src/bin/shared/downloadKeycloakDefaultTheme/extra-assets → res/public/.keycloakify/login/js}/passkeysConditionalAuth.js +1 -1
- package/res/public/.keycloakify/login/js/passwordVisibility.js +15 -0
- package/res/public/.keycloakify/login/js/userProfile.js +71 -0
- package/res/public/.keycloakify/login/js/webauthnRegister.js +140 -0
- package/res/public/.keycloakify/login/resources-common/img/favicon.ico +0 -0
- package/res/public/.keycloakify/login/resources-common/lib/pficon/pficon.css +22 -0
- package/res/public/.keycloakify/login/resources-common/lib/pficon/pficon.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/@patternfly/patternfly/patternfly.min.css +2 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/jquery/dist/jquery.min.js +2 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css +5 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/css/patternfly.min.css +8 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.ttf +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/fonts/fontawesome-webfont.woff2 +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/patternfly/dist/img/bg-login.jpg +0 -0
- package/res/public/.keycloakify/login/resources-common/node_modules/rfc4648/lib/rfc4648.js +178 -0
- package/src/PUBLIC_URL.ts +5 -3
- package/src/account/KcContext/kcContextMocks.ts +3 -3
- package/src/bin/copy-keycloak-resources-to-public.ts +1 -1
- package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +4 -1
- package/src/bin/initialize-email-theme.ts +28 -8
- package/src/bin/keycloakify/buildJars/buildJar.ts +3 -7
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +3 -7
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +65 -90
- package/src/bin/keycloakify/keycloakify.ts +38 -21
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +2 -2
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +3 -3
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +3 -3
- package/src/bin/shared/buildContext.ts +1 -8
- package/src/bin/shared/constants.ts +5 -7
- package/src/bin/shared/copyKeycloakResourcesToPublic.ts +30 -40
- package/src/bin/start-keycloak/start-keycloak.ts +3 -7
- package/src/login/KcContext/KcContext.ts +9 -18
- package/src/login/KcContext/kcContextMocks.ts +5 -13
- package/src/login/Template.tsx +4 -67
- package/src/login/Template.useStylesAndScripts.ts +94 -0
- package/src/login/pages/Login.tsx +1 -1
- package/src/login/pages/LoginIdpLinkConfirmOverride.tsx +0 -1
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.tsx +6 -81
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.useScript.tsx +72 -0
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +4 -126
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.useScript.tsx +142 -0
- package/src/login/pages/LoginUsername.tsx +1 -1
- package/src/login/pages/Register.tsx +35 -13
- package/src/login/pages/WebauthnAuthenticate.tsx +20 -133
- package/src/login/pages/WebauthnAuthenticate.useScript.tsx +64 -0
- package/src/login/pages/WebauthnRegister.tsx +8 -195
- package/src/login/pages/WebauthnRegister.useScript.tsx +93 -0
- package/src/tools/useInsertScriptTags.ts +14 -4
- package/src/vite-plugin/vite-plugin.ts +11 -15
- package/tools/useInsertScriptTags.d.ts +2 -2
- package/tools/useInsertScriptTags.js +8 -2
- package/tools/useInsertScriptTags.js.map +1 -1
- package/vite-plugin/index.js +3357 -47132
- package/bin/697.index.js +0 -4749
- package/bin/shared/downloadKeycloakStaticResources.d.ts +0 -9
- package/bin/shared/downloadKeycloakStaticResources.js.map +0 -1
- package/src/bin/keycloakify/generateResources/bringInAccountV1.ts +0 -89
- package/src/bin/shared/downloadKeycloakDefaultTheme/downloadKeycloakDefaultTheme.ts +0 -338
- package/src/bin/shared/downloadKeycloakDefaultTheme/index.ts +0 -1
- package/src/bin/shared/downloadKeycloakStaticResources.ts +0 -53
- /package/{src/bin/shared/downloadKeycloakDefaultTheme/extra-assets → res/public/.keycloakify/login/js}/webauthnAuthenticate.js +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
exports.id =
|
3
|
-
exports.ids = [
|
2
|
+
exports.id = 499;
|
3
|
+
exports.ids = [499];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
6
|
/***/ 73817:
|
@@ -155,7 +155,7 @@ function generateMessageProperties(params) {
|
|
155
155
|
|
156
156
|
/***/ }),
|
157
157
|
|
158
|
-
/***/
|
158
|
+
/***/ 70499:
|
159
159
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
160
160
|
|
161
161
|
// ESM COMPAT FLAG
|
@@ -242,8 +242,8 @@ function replaceImportsInJsCode_vite(params) {
|
|
242
242
|
.map(basenameOfAssetsFile => `${staticDir}${basenameOfAssetsFile}`)
|
243
243
|
.forEach(relativePathOfAssetFile => {
|
244
244
|
var _a;
|
245
|
-
fixedJsCode = replaceAll(fixedJsCode, `"${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${constants/*
|
246
|
-
fixedJsCode = replaceAll(fixedJsCode, `"${(_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/"}${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath + "/${constants/*
|
245
|
+
fixedJsCode = replaceAll(fixedJsCode, `"${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
|
246
|
+
fixedJsCode = replaceAll(fixedJsCode, `"${(_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/"}${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
|
247
247
|
});
|
248
248
|
}
|
249
249
|
return { fixedJsCode };
|
@@ -289,7 +289,7 @@ function replaceImportsInJsCode_webpack(params) {
|
|
289
289
|
});
|
290
290
|
}
|
291
291
|
return "${u}";
|
292
|
-
})()] = ${isArrowFunction ? `${e} =>` : `function(${e}) { return `} "/${constants/*
|
292
|
+
})()] = ${isArrowFunction ? `${e} =>` : `function(${e}) { return `} "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${staticDir}${language}/"`
|
293
293
|
.replace(/\s+/g, " ")
|
294
294
|
.trim();
|
295
295
|
}
|
@@ -297,7 +297,7 @@ function replaceImportsInJsCode_webpack(params) {
|
|
297
297
|
fixedJsCode = fixedJsCode
|
298
298
|
.replace(...getReplaceArgs("js"))
|
299
299
|
.replace(...getReplaceArgs("css"))
|
300
|
-
.replace(new RegExp(`[a-zA-Z]+\\.[a-zA-Z]+\\+"${staticDir.replace(/\//g, "\\/")}`, "g"), `window.kcContext["x-keycloakify"].resourcesPath + "/${constants/*
|
300
|
+
.replace(new RegExp(`[a-zA-Z]+\\.[a-zA-Z]+\\+"${staticDir.replace(/\//g, "\\/")}`, "g"), `window.kcContext["x-keycloakify"].resourcesPath + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${staticDir}`);
|
301
301
|
return { fixedJsCode };
|
302
302
|
}
|
303
303
|
//# sourceMappingURL=webpack.js.map
|
@@ -373,7 +373,7 @@ function replaceImportsInCssCode(params) {
|
|
373
373
|
if (cssFileRelativeDirPath !== undefined) {
|
374
374
|
break inline_style_in_html;
|
375
375
|
}
|
376
|
-
return `url("\${xKeycloakify.resourcesPath}/${constants/*
|
376
|
+
return `url("\${xKeycloakify.resourcesPath}/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}${assetFileAbsoluteUrlPathname}")`;
|
377
377
|
}
|
378
378
|
const assetFileRelativeUrlPathname = external_path_.posix.relative(cssFileRelativeDirPath.replace(/\\/g, "/"), assetFileAbsoluteUrlPathname.replace(/^\//, ""));
|
379
379
|
return `url("${assetFileRelativeUrlPathname}")`;
|
@@ -429,7 +429,7 @@ function generateFtlFilesCodeFactory(params) {
|
|
429
429
|
if (href === undefined) {
|
430
430
|
return;
|
431
431
|
}
|
432
|
-
$(element).attr(attrName, href.replace(new RegExp(`^${((_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/").replace(/\//g, "\\/")}`), `\${xKeycloakify.resourcesPath}/${constants/*
|
432
|
+
$(element).attr(attrName, href.replace(new RegExp(`^${((_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/").replace(/\//g, "\\/")}`), `\${xKeycloakify.resourcesPath}/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/`));
|
433
433
|
}));
|
434
434
|
}
|
435
435
|
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
|
@@ -440,7 +440,7 @@ function generateFtlFilesCodeFactory(params) {
|
|
440
440
|
.replace("{{keycloakifyVersion}}", keycloakifyVersion)
|
441
441
|
.replace("{{themeVersion}}", buildContext.themeVersion)
|
442
442
|
.replace("{{fieldNames}}", fieldNames.map(name => `"${name}"`).join(", "))
|
443
|
-
.replace("{{RESOURCES_COMMON}}", constants/* RESOURCES_COMMON */.
|
443
|
+
.replace("{{RESOURCES_COMMON}}", constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.RESOURCES_COMMON */.Ju.RESOURCES_COMMON)
|
444
444
|
.replace("{{userDefinedExclusions}}", (_a = buildContext.kcContextExclusionsFtlCode) !== null && _a !== void 0 ? _a : "");
|
445
445
|
const ftlObjectToJsCodeDeclaringAnObjectPlaceholder = '{ "x": "vIdLqMeOed9sdLdIdOxdK0d" }';
|
446
446
|
$("head").prepend(`<script>\n${ftlObjectToJsCodeDeclaringAnObjectPlaceholder}\n</script>`);
|
@@ -481,8 +481,6 @@ function generateFtlFilesCodeFactory(params) {
|
|
481
481
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateFtl/index.js
|
482
482
|
|
483
483
|
//# sourceMappingURL=index.js.map
|
484
|
-
// EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakStaticResources.js
|
485
|
-
var downloadKeycloakStaticResources = __webpack_require__(62190);
|
486
484
|
// EXTERNAL MODULE: ./dist/bin/tools/crawl.js
|
487
485
|
var crawl = __webpack_require__(73036);
|
488
486
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/readFieldNameUsage.js
|
@@ -595,64 +593,6 @@ function readExtraPagesNames(params) {
|
|
595
593
|
//# sourceMappingURL=readExtraPageNames.js.map
|
596
594
|
// EXTERNAL MODULE: ./dist/bin/keycloakify/generateResources/generateMessageProperties.js
|
597
595
|
var generateMessageProperties = __webpack_require__(73817);
|
598
|
-
// EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakDefaultTheme/index.js + 1 modules
|
599
|
-
var downloadKeycloakDefaultTheme = __webpack_require__(33168);
|
600
|
-
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/bringInAccountV1.js
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
(0,assert.assert)();
|
608
|
-
async function bringInAccountV1(params) {
|
609
|
-
const { resourcesDirPath, buildContext } = params;
|
610
|
-
const { defaultThemeDirPath } = await (0,downloadKeycloakDefaultTheme/* downloadKeycloakDefaultTheme */.x)({
|
611
|
-
keycloakVersion: constants/* LAST_KEYCLOAK_VERSION_WITH_ACCOUNT_V1 */.rK,
|
612
|
-
buildContext
|
613
|
-
});
|
614
|
-
const accountV1DirPath = (0,external_path_.join)(resourcesDirPath, "theme", constants/* ACCOUNT_V1_THEME_NAME */.ZQ, "account");
|
615
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
616
|
-
srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "base", "account"),
|
617
|
-
destDirPath: accountV1DirPath
|
618
|
-
});
|
619
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
620
|
-
srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "keycloak", "account", "resources"),
|
621
|
-
destDirPath: (0,external_path_.join)(accountV1DirPath, "resources")
|
622
|
-
});
|
623
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
624
|
-
srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
|
625
|
-
destDirPath: (0,external_path_.join)(accountV1DirPath, "resources", constants/* RESOURCES_COMMON */.nX)
|
626
|
-
});
|
627
|
-
external_fs_.writeFileSync((0,external_path_.join)(accountV1DirPath, "theme.properties"), Buffer.from([
|
628
|
-
"accountResourceProvider=account-v1",
|
629
|
-
"",
|
630
|
-
"locales=ar,ca,cs,da,de,en,es,fr,fi,hu,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN",
|
631
|
-
"",
|
632
|
-
"styles=" +
|
633
|
-
[
|
634
|
-
"css/account.css",
|
635
|
-
"img/icon-sidebar-active.png",
|
636
|
-
"img/logo.png",
|
637
|
-
...[
|
638
|
-
"patternfly.min.css",
|
639
|
-
"patternfly-additions.min.css",
|
640
|
-
"patternfly-additions.min.css"
|
641
|
-
].map(fileBasename => `${constants/* RESOURCES_COMMON */.nX}/node_modules/patternfly/dist/css/${fileBasename}`)
|
642
|
-
].join(" "),
|
643
|
-
"",
|
644
|
-
"##### css classes for form buttons",
|
645
|
-
"# main class used for all buttons",
|
646
|
-
"kcButtonClass=btn",
|
647
|
-
"# classes defining priority of the button - primary or default (there is typically only one priority button for the form)",
|
648
|
-
"kcButtonPrimaryClass=btn-primary",
|
649
|
-
"kcButtonDefaultClass=btn-default",
|
650
|
-
"# classes defining size of the button",
|
651
|
-
"kcButtonLargeClass=btn-lg",
|
652
|
-
""
|
653
|
-
].join("\n"), "utf8"));
|
654
|
-
}
|
655
|
-
//# sourceMappingURL=bringInAccountV1.js.map
|
656
596
|
// EXTERNAL MODULE: ./dist/bin/tools/fs.rmSync.js
|
657
597
|
var fs_rmSync = __webpack_require__(89693);
|
658
598
|
// EXTERNAL MODULE: ./dist/bin/tools/readThisNpmPackageVersion.js
|
@@ -682,8 +622,9 @@ function writeMetaInfKeycloakThemes(params) {
|
|
682
622
|
var objectEntries = __webpack_require__(39612);
|
683
623
|
// EXTERNAL MODULE: ./dist/bin/tools/escapeStringForPropertiesFile.js
|
684
624
|
var escapeStringForPropertiesFile = __webpack_require__(27190);
|
685
|
-
// EXTERNAL MODULE:
|
686
|
-
var
|
625
|
+
// EXTERNAL MODULE: external "child_process"
|
626
|
+
var external_child_process_ = __webpack_require__(32081);
|
627
|
+
var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_);
|
687
628
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResourcesForMainTheme.js
|
688
629
|
|
689
630
|
|
@@ -703,7 +644,6 @@ var downloadAndExtractArchive = __webpack_require__(38367);
|
|
703
644
|
|
704
645
|
|
705
646
|
|
706
|
-
|
707
647
|
(0,assert.assert)();
|
708
648
|
async function generateResourcesForMainTheme(params) {
|
709
649
|
var _a;
|
@@ -721,7 +661,7 @@ async function generateResourcesForMainTheme(params) {
|
|
721
661
|
buildContext.implementedThemeTypes.account.type === "Single-Page");
|
722
662
|
const themeTypeDirPath = getThemeTypeDirPath({ themeType });
|
723
663
|
apply_replacers_and_move_to_theme_resources: {
|
724
|
-
const destDirPath = (0,external_path_.join)(themeTypeDirPath, "resources", constants/*
|
664
|
+
const destDirPath = (0,external_path_.join)(themeTypeDirPath, "resources", constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST);
|
725
665
|
// NOTE: Prevent accumulation of files in the assets dir, as names are hashed they pile up.
|
726
666
|
(0,fs_rmSync/* rmSync */.a)(destDirPath, { recursive: true, force: true });
|
727
667
|
if (themeType === "account" &&
|
@@ -730,17 +670,17 @@ async function generateResourcesForMainTheme(params) {
|
|
730
670
|
(0,transformCodebase/* transformCodebase */.N)({
|
731
671
|
srcDirPath: (0,external_path_.join)(getThemeTypeDirPath({
|
732
672
|
themeType: "login"
|
733
|
-
}), "resources", constants/*
|
673
|
+
}), "resources", constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST),
|
734
674
|
destDirPath
|
735
675
|
});
|
736
676
|
break apply_replacers_and_move_to_theme_resources;
|
737
677
|
}
|
738
678
|
{
|
739
|
-
const dirPath = (0,external_path_.join)(buildContext.projectBuildDirPath, constants/*
|
679
|
+
const dirPath = (0,external_path_.join)(buildContext.projectBuildDirPath, constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DOT_KEYCLOAKIFY */.Ju.DOT_KEYCLOAKIFY);
|
740
680
|
if (external_fs_.existsSync(dirPath)) {
|
741
681
|
(0,assert.assert)(buildContext.bundler === "webpack");
|
742
682
|
throw new Error([
|
743
|
-
`Keycloakify build error: The ${constants/*
|
683
|
+
`Keycloakify build error: The ${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DOT_KEYCLOAKIFY */.Ju.DOT_KEYCLOAKIFY} directory shouldn't exist in your build directory.`,
|
744
684
|
`(${(0,external_path_.relative)(process.cwd(), dirPath)}).\n`,
|
745
685
|
`Theses assets are only required for local development with Storybook.",
|
746
686
|
"Please remove this directory as an additional step of your command.\n`,
|
@@ -822,29 +762,41 @@ async function generateResourcesForMainTheme(params) {
|
|
822
762
|
external_fs_.writeFileSync(propertiesFilePath, Buffer.from(propertiesFileSource, "utf8"));
|
823
763
|
});
|
824
764
|
}
|
765
|
+
bring_in_account_v3_i18n_messages: {
|
766
|
+
if (!buildContext.implementedThemeTypes.account.isImplemented) {
|
767
|
+
break bring_in_account_v3_i18n_messages;
|
768
|
+
}
|
769
|
+
if (buildContext.implementedThemeTypes.account.type !== "Single-Page") {
|
770
|
+
break bring_in_account_v3_i18n_messages;
|
771
|
+
}
|
772
|
+
const accountUiDirPath = external_child_process_.execSync("npm list @keycloakify/keycloak-account-ui --parseable", {
|
773
|
+
cwd: (0,external_path_.dirname)(buildContext.packageJsonFilePath)
|
774
|
+
})
|
775
|
+
.toString("utf8")
|
776
|
+
.trim();
|
777
|
+
const messagesDirPath = (0,external_path_.join)(accountUiDirPath, "messages");
|
778
|
+
if (!external_fs_.existsSync(messagesDirPath)) {
|
779
|
+
throw new Error(`Please update @keycloakify/keycloak-account-ui to 25.0.4-rc.5 or later.`);
|
780
|
+
}
|
781
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
782
|
+
srcDirPath: messagesDirPath,
|
783
|
+
destDirPath: (0,external_path_.join)(getThemeTypeDirPath({ themeType: "account" }), "messages")
|
784
|
+
});
|
785
|
+
}
|
825
786
|
keycloak_static_resources: {
|
826
787
|
if (isForAccountSpa) {
|
827
788
|
break keycloak_static_resources;
|
828
789
|
}
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
case "account":
|
833
|
-
return constants/* LAST_KEYCLOAK_VERSION_WITH_ACCOUNT_V1 */.rK;
|
834
|
-
case "login":
|
835
|
-
return buildContext.loginThemeResourcesFromKeycloakVersion;
|
836
|
-
}
|
837
|
-
})(),
|
838
|
-
themeDirPath: (0,external_path_.resolve)((0,external_path_.join)(themeTypeDirPath, "..")),
|
839
|
-
themeType,
|
840
|
-
buildContext
|
790
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
791
|
+
srcDirPath: (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "res", "public", constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DOT_KEYCLOAKIFY */.Ju.DOT_KEYCLOAKIFY, themeType),
|
792
|
+
destDirPath: (0,external_path_.join)(themeTypeDirPath, "resources")
|
841
793
|
});
|
842
794
|
}
|
843
795
|
external_fs_.writeFileSync((0,external_path_.join)(themeTypeDirPath, "theme.properties"), Buffer.from([
|
844
796
|
`parent=${(() => {
|
845
797
|
switch (themeType) {
|
846
798
|
case "account":
|
847
|
-
return isForAccountSpa ? "base" :
|
799
|
+
return isForAccountSpa ? "base" : "account-v1";
|
848
800
|
case "login":
|
849
801
|
return "keycloak";
|
850
802
|
}
|
@@ -872,35 +824,9 @@ async function generateResourcesForMainTheme(params) {
|
|
872
824
|
if (buildContext.implementedThemeTypes.account.type !== "Multi-Page") {
|
873
825
|
break bring_in_account_v1;
|
874
826
|
}
|
875
|
-
await bringInAccountV1({
|
876
|
-
resourcesDirPath,
|
877
|
-
buildContext
|
878
|
-
});
|
879
|
-
}
|
880
|
-
bring_in_account_v3_i18n_messages: {
|
881
|
-
if (!buildContext.implementedThemeTypes.account.isImplemented) {
|
882
|
-
break bring_in_account_v3_i18n_messages;
|
883
|
-
}
|
884
|
-
if (buildContext.implementedThemeTypes.account.type !== "Single-Page") {
|
885
|
-
break bring_in_account_v3_i18n_messages;
|
886
|
-
}
|
887
|
-
const { extractedDirPath } = await (0,downloadAndExtractArchive/* downloadAndExtractArchive */.I)({
|
888
|
-
url: "https://repo1.maven.org/maven2/org/keycloak/keycloak-account-ui/25.0.1/keycloak-account-ui-25.0.1.jar",
|
889
|
-
cacheDirPath: buildContext.cacheDirPath,
|
890
|
-
fetchOptions: buildContext.fetchOptions,
|
891
|
-
uniqueIdOfOnArchiveFile: "bring_in_account_v3_i18n_messages",
|
892
|
-
onArchiveFile: async ({ fileRelativePath, writeFile }) => {
|
893
|
-
if (!fileRelativePath.startsWith((0,external_path_.join)("theme", "keycloak.v3", "account", "messages"))) {
|
894
|
-
return;
|
895
|
-
}
|
896
|
-
await writeFile({
|
897
|
-
fileRelativePath: (0,external_path_.basename)(fileRelativePath)
|
898
|
-
});
|
899
|
-
}
|
900
|
-
});
|
901
827
|
(0,transformCodebase/* transformCodebase */.N)({
|
902
|
-
srcDirPath:
|
903
|
-
destDirPath: (0,external_path_.join)(
|
828
|
+
srcDirPath: (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "res", "account-v1"),
|
829
|
+
destDirPath: (0,external_path_.join)(resourcesDirPath, "theme", "account-v1", "account")
|
904
830
|
});
|
905
831
|
}
|
906
832
|
{
|
@@ -913,7 +839,7 @@ async function generateResourcesForMainTheme(params) {
|
|
913
839
|
});
|
914
840
|
if (buildContext.implementedThemeTypes.account.isImplemented) {
|
915
841
|
metaInfKeycloakThemes.themes.push({
|
916
|
-
name:
|
842
|
+
name: "account-v1",
|
917
843
|
types: ["account"]
|
918
844
|
});
|
919
845
|
}
|
@@ -996,9 +922,6 @@ async function generateResources(params) {
|
|
996
922
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/index.js
|
997
923
|
|
998
924
|
//# sourceMappingURL=index.js.map
|
999
|
-
// EXTERNAL MODULE: external "child_process"
|
1000
|
-
var external_child_process_ = __webpack_require__(32081);
|
1001
|
-
var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_);
|
1002
925
|
// EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
|
1003
926
|
var shared_buildContext = __webpack_require__(56031);
|
1004
927
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/extensionVersions.js
|
@@ -1153,7 +1076,6 @@ var isInside = __webpack_require__(90665);
|
|
1153
1076
|
|
1154
1077
|
|
1155
1078
|
|
1156
|
-
|
1157
1079
|
(0,assert.assert)();
|
1158
1080
|
async function buildJar(params) {
|
1159
1081
|
const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, resourcesDirPath, doesImplementAccountV1Theme, buildContext } = params;
|
@@ -1168,7 +1090,7 @@ async function buildJar(params) {
|
|
1168
1090
|
: (params) => {
|
1169
1091
|
const { fileRelativePath, sourceCode } = params;
|
1170
1092
|
if ((0,isInside/* isInside */.V)({
|
1171
|
-
dirPath: (0,external_path_.join)("theme",
|
1093
|
+
dirPath: (0,external_path_.join)("theme", "account-v1"),
|
1172
1094
|
filePath: fileRelativePath
|
1173
1095
|
})) {
|
1174
1096
|
return undefined;
|
@@ -1178,7 +1100,7 @@ async function buildJar(params) {
|
|
1178
1100
|
(0,external_path_.join)("theme", themeName, "account", "theme.properties")) {
|
1179
1101
|
const modifiedSourceCode = Buffer.from(sourceCode
|
1180
1102
|
.toString("utf8")
|
1181
|
-
.replace(`parent
|
1103
|
+
.replace(`parent=account-v1`, "parent=keycloak"), "utf8");
|
1182
1104
|
(0,assert.assert)(Buffer.compare(modifiedSourceCode, sourceCode) !== 0);
|
1183
1105
|
return { modifiedSourceCode };
|
1184
1106
|
}
|
@@ -1199,7 +1121,7 @@ async function buildJar(params) {
|
|
1199
1121
|
resourcesDirPath: tmpResourcesDirPath,
|
1200
1122
|
getNewMetaInfKeycloakTheme: ({ metaInfKeycloakTheme }) => {
|
1201
1123
|
(0,assert.assert)(metaInfKeycloakTheme !== undefined);
|
1202
|
-
metaInfKeycloakTheme.themes = metaInfKeycloakTheme.themes.filter(({ name }) => name !==
|
1124
|
+
metaInfKeycloakTheme.themes = metaInfKeycloakTheme.themes.filter(({ name }) => name !== "account-v1");
|
1203
1125
|
return metaInfKeycloakTheme;
|
1204
1126
|
}
|
1205
1127
|
});
|
@@ -1305,6 +1227,8 @@ var external_os_ = __webpack_require__(22037);
|
|
1305
1227
|
|
1306
1228
|
|
1307
1229
|
async function command(params) {
|
1230
|
+
const { cliCommandOptions } = params;
|
1231
|
+
const buildContext = (0,shared_buildContext/* getBuildContext */.s)({ cliCommandOptions });
|
1308
1232
|
exit_if_maven_not_installed: {
|
1309
1233
|
let commandOutput = undefined;
|
1310
1234
|
try {
|
@@ -1316,22 +1240,31 @@ async function command(params) {
|
|
1316
1240
|
if (commandOutput === null || commandOutput === void 0 ? void 0 : commandOutput.toString("utf8").includes("Apache Maven")) {
|
1317
1241
|
break exit_if_maven_not_installed;
|
1318
1242
|
}
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1243
|
+
if (external_fs_.readFileSync(buildContext.packageJsonFilePath)
|
1244
|
+
.toString("utf8")
|
1245
|
+
.includes(`"mvn"`)) {
|
1246
|
+
console.log(source_default().red([
|
1247
|
+
"Please remove the 'mvn' package from your package.json'dependencies list,",
|
1248
|
+
"reinstall your dependencies and try again.",
|
1249
|
+
"We need the Apache Maven CLI, not this: https://www.npmjs.com/package/mvn"
|
1250
|
+
].join(" ")));
|
1251
|
+
}
|
1252
|
+
else {
|
1253
|
+
const installationCommand = (() => {
|
1254
|
+
switch (external_os_.platform()) {
|
1255
|
+
case "darwin":
|
1256
|
+
return "brew install mvn";
|
1257
|
+
case "win32":
|
1258
|
+
return "choco install mvn";
|
1259
|
+
case "linux":
|
1260
|
+
default:
|
1261
|
+
return "sudo apt-get install mvn";
|
1262
|
+
}
|
1263
|
+
})();
|
1264
|
+
console.log(`${source_default().red("Apache Maven required.")} Install it with \`${source_default().bold(installationCommand)}\` (for example)`);
|
1265
|
+
}
|
1331
1266
|
process.exit(1);
|
1332
1267
|
}
|
1333
|
-
const { cliCommandOptions } = params;
|
1334
|
-
const buildContext = (0,shared_buildContext/* getBuildContext */.s)({ cliCommandOptions });
|
1335
1268
|
console.log([
|
1336
1269
|
source_default().cyan(`keycloakify v${(0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)()}`),
|
1337
1270
|
source_default().green(`Building the keycloak theme in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), buildContext.keycloakifyBuildDirPath)} ...`)
|
@@ -1376,54 +1309,88 @@ async function command(params) {
|
|
1376
1309
|
|
1377
1310
|
/***/ }),
|
1378
1311
|
|
1379
|
-
/***/
|
1312
|
+
/***/ 12171:
|
1380
1313
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1381
1314
|
|
1382
1315
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1383
|
-
/* harmony export */ "
|
1316
|
+
/* harmony export */ "h": () => (/* binding */ SemVer)
|
1384
1317
|
/* harmony export */ });
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
/* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
|
1400
|
-
async function downloadKeycloakStaticResources(params) {
|
1401
|
-
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
1402
|
-
const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
|
1403
|
-
keycloakVersion,
|
1404
|
-
buildContext
|
1405
|
-
});
|
1406
|
-
const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
|
1407
|
-
repatriate_base_resources: {
|
1408
|
-
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
|
1409
|
-
if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
|
1410
|
-
break repatriate_base_resources;
|
1318
|
+
var SemVer;
|
1319
|
+
(function (SemVer) {
|
1320
|
+
const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
|
1321
|
+
function parse(versionStr) {
|
1322
|
+
const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
|
1323
|
+
if (!match) {
|
1324
|
+
throw new Error(`${versionStr} is not a valid semantic version`);
|
1411
1325
|
}
|
1412
|
-
(
|
1413
|
-
|
1414
|
-
|
1326
|
+
const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
|
1327
|
+
const str = match[3];
|
1328
|
+
return str === undefined ? 0 : parseInt(str);
|
1329
|
+
})() }, (() => {
|
1330
|
+
const str = match[4];
|
1331
|
+
return str === undefined ? {} : { rc: parseInt(str) };
|
1332
|
+
})());
|
1333
|
+
const initialStr = stringify(semVer);
|
1334
|
+
Object.defineProperty(semVer, "parsedFrom", {
|
1335
|
+
enumerable: true,
|
1336
|
+
get: function () {
|
1337
|
+
const currentStr = stringify(this);
|
1338
|
+
if (currentStr !== initialStr) {
|
1339
|
+
throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
|
1340
|
+
}
|
1341
|
+
return versionStr;
|
1342
|
+
}
|
1415
1343
|
});
|
1344
|
+
return semVer;
|
1416
1345
|
}
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
}
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1346
|
+
SemVer.parse = parse;
|
1347
|
+
function stringify(v) {
|
1348
|
+
return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
|
1349
|
+
}
|
1350
|
+
SemVer.stringify = stringify;
|
1351
|
+
/**
|
1352
|
+
*
|
1353
|
+
* v1 < v2 => -1
|
1354
|
+
* v1 === v2 => 0
|
1355
|
+
* v1 > v2 => 1
|
1356
|
+
*
|
1357
|
+
*/
|
1358
|
+
function compare(v1, v2) {
|
1359
|
+
const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
|
1360
|
+
const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
|
1361
|
+
for (const level of ["major", "minor", "patch", "rc"]) {
|
1362
|
+
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
1363
|
+
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
1364
|
+
}
|
1365
|
+
}
|
1366
|
+
return 0;
|
1367
|
+
}
|
1368
|
+
SemVer.compare = compare;
|
1369
|
+
/*
|
1370
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
|
1371
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
|
1372
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
|
1373
|
+
*/
|
1374
|
+
function bumpType(params) {
|
1375
|
+
const versionAhead = typeof params.versionAhead === "string"
|
1376
|
+
? parse(params.versionAhead)
|
1377
|
+
: params.versionAhead;
|
1378
|
+
const versionBehind = typeof params.versionBehind === "string"
|
1379
|
+
? parse(params.versionBehind)
|
1380
|
+
: params.versionBehind;
|
1381
|
+
if (compare(versionBehind, versionAhead) === 1) {
|
1382
|
+
throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
|
1383
|
+
}
|
1384
|
+
for (const level of ["major", "minor", "patch", "rc"]) {
|
1385
|
+
if (versionBehind[level] !== versionAhead[level]) {
|
1386
|
+
return level;
|
1387
|
+
}
|
1388
|
+
}
|
1389
|
+
return "no bump";
|
1390
|
+
}
|
1391
|
+
SemVer.bumpType = bumpType;
|
1392
|
+
})(SemVer || (SemVer = {}));
|
1393
|
+
//# sourceMappingURL=SemVer.js.map
|
1427
1394
|
|
1428
1395
|
/***/ }),
|
1429
1396
|
|
@@ -1500,6 +1467,49 @@ function escapeStringForPropertiesFile(str) {
|
|
1500
1467
|
|
1501
1468
|
/***/ }),
|
1502
1469
|
|
1470
|
+
/***/ 89693:
|
1471
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1472
|
+
|
1473
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1474
|
+
/* harmony export */ "a": () => (/* binding */ rmSync)
|
1475
|
+
/* harmony export */ });
|
1476
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57147);
|
1477
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
1478
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
1479
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
1480
|
+
/* harmony import */ var _SemVer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12171);
|
1481
|
+
|
1482
|
+
|
1483
|
+
|
1484
|
+
/**
|
1485
|
+
* Polyfill of fs.rmSync(dirPath, { "recursive": true })
|
1486
|
+
* For older version of Node
|
1487
|
+
*/
|
1488
|
+
function rmSync(dirPath, options) {
|
1489
|
+
if (_SemVer__WEBPACK_IMPORTED_MODULE_2__/* .SemVer.compare */ .h.compare(_SemVer__WEBPACK_IMPORTED_MODULE_2__/* .SemVer.parse */ .h.parse(process.version), _SemVer__WEBPACK_IMPORTED_MODULE_2__/* .SemVer.parse */ .h.parse("14.14.0")) > 0) {
|
1490
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.rmSync(dirPath, options);
|
1491
|
+
return;
|
1492
|
+
}
|
1493
|
+
const { force = true } = options;
|
1494
|
+
if (force && !fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(dirPath)) {
|
1495
|
+
return;
|
1496
|
+
}
|
1497
|
+
const removeDir_rec = (dirPath) => fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync(dirPath).forEach(basename => {
|
1498
|
+
const fileOrDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(dirPath, basename);
|
1499
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.lstatSync(fileOrDirPath).isDirectory()) {
|
1500
|
+
removeDir_rec(fileOrDirPath);
|
1501
|
+
return;
|
1502
|
+
}
|
1503
|
+
else {
|
1504
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.unlinkSync(fileOrDirPath);
|
1505
|
+
}
|
1506
|
+
});
|
1507
|
+
removeDir_rec(dirPath);
|
1508
|
+
}
|
1509
|
+
//# sourceMappingURL=fs.rmSync.js.map
|
1510
|
+
|
1511
|
+
/***/ }),
|
1512
|
+
|
1503
1513
|
/***/ 90665:
|
1504
1514
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1505
1515
|
|
@@ -1515,6 +1525,74 @@ function isInside(params) {
|
|
1515
1525
|
}
|
1516
1526
|
//# sourceMappingURL=isInside.js.map
|
1517
1527
|
|
1528
|
+
/***/ }),
|
1529
|
+
|
1530
|
+
/***/ 60332:
|
1531
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1532
|
+
|
1533
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1534
|
+
/* harmony export */ "N": () => (/* binding */ transformCodebase)
|
1535
|
+
/* harmony export */ });
|
1536
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57147);
|
1537
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
1538
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
1539
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
1540
|
+
/* harmony import */ var _crawl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73036);
|
1541
|
+
/* harmony import */ var _tools_fs_rmSync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89693);
|
1542
|
+
|
1543
|
+
|
1544
|
+
|
1545
|
+
|
1546
|
+
/**
|
1547
|
+
* Apply a transformation function to every file of directory
|
1548
|
+
* If source and destination are the same this function can be used to apply the transformation in place
|
1549
|
+
* like filtering out some files or modifying them.
|
1550
|
+
* */
|
1551
|
+
function transformCodebase(params) {
|
1552
|
+
const { srcDirPath, transformSourceCode } = params;
|
1553
|
+
const isTargetSameAsSource = path__WEBPACK_IMPORTED_MODULE_1__.relative(srcDirPath, params.destDirPath) === "";
|
1554
|
+
const destDirPath = isTargetSameAsSource
|
1555
|
+
? path__WEBPACK_IMPORTED_MODULE_1__.join(srcDirPath, "..", "tmp_xOsPdkPsTdzPs34sOkHs")
|
1556
|
+
: params.destDirPath;
|
1557
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(destDirPath, {
|
1558
|
+
recursive: true
|
1559
|
+
});
|
1560
|
+
for (const fileRelativePath of (0,_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
|
1561
|
+
dirPath: srcDirPath,
|
1562
|
+
returnedPathsType: "relative to dirPath"
|
1563
|
+
})) {
|
1564
|
+
const filePath = path__WEBPACK_IMPORTED_MODULE_1__.join(srcDirPath, fileRelativePath);
|
1565
|
+
const destFilePath = path__WEBPACK_IMPORTED_MODULE_1__.join(destDirPath, fileRelativePath);
|
1566
|
+
// NOTE: Optimization, if we don't need to transform the file, just copy
|
1567
|
+
// it using the lower level implementation.
|
1568
|
+
if (transformSourceCode === undefined) {
|
1569
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(path__WEBPACK_IMPORTED_MODULE_1__.dirname(destFilePath), {
|
1570
|
+
recursive: true
|
1571
|
+
});
|
1572
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.copyFileSync(filePath, destFilePath);
|
1573
|
+
continue;
|
1574
|
+
}
|
1575
|
+
const transformSourceCodeResult = transformSourceCode({
|
1576
|
+
sourceCode: fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(filePath),
|
1577
|
+
filePath,
|
1578
|
+
fileRelativePath
|
1579
|
+
});
|
1580
|
+
if (transformSourceCodeResult === undefined) {
|
1581
|
+
continue;
|
1582
|
+
}
|
1583
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(path__WEBPACK_IMPORTED_MODULE_1__.dirname(destFilePath), {
|
1584
|
+
recursive: true
|
1585
|
+
});
|
1586
|
+
const { newFileName, modifiedSourceCode } = transformSourceCodeResult;
|
1587
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(path__WEBPACK_IMPORTED_MODULE_1__.join(path__WEBPACK_IMPORTED_MODULE_1__.dirname(destFilePath), newFileName !== null && newFileName !== void 0 ? newFileName : path__WEBPACK_IMPORTED_MODULE_1__.basename(destFilePath)), modifiedSourceCode);
|
1588
|
+
}
|
1589
|
+
if (isTargetSameAsSource) {
|
1590
|
+
(0,_tools_fs_rmSync__WEBPACK_IMPORTED_MODULE_3__/* .rmSync */ .a)(srcDirPath, { recursive: true });
|
1591
|
+
fs__WEBPACK_IMPORTED_MODULE_0__.renameSync(destDirPath, srcDirPath);
|
1592
|
+
}
|
1593
|
+
}
|
1594
|
+
//# sourceMappingURL=transformCodebase.js.map
|
1595
|
+
|
1518
1596
|
/***/ })
|
1519
1597
|
|
1520
1598
|
};
|