keycloakify 11.6.0 → 11.6.1
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/bin/{805.index.js → 174.index.js} +111 -2
- package/bin/{356.index.js → 300.index.js} +19 -4
- package/bin/{33.index.js → 568.index.js} +2 -113
- package/bin/615.index.js +1009 -0
- package/bin/653.index.js +53 -135
- package/bin/735.index.js +53 -24
- package/bin/854.index.js +1 -1
- package/bin/921.index.js +1 -1
- package/bin/initialize-admin-theme.d.ts +4 -0
- package/bin/main.js +17 -5
- package/bin/shared/addPostinstallScriptIfNotPresent.d.ts +10 -0
- package/bin/shared/customHandler.d.ts +1 -1
- package/bin/shared/customHandler.js.map +1 -1
- package/bin/tools/npmInstall.d.ts +1 -1
- package/package.json +9 -4
- package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +3 -1
- package/src/bin/initialize-admin-theme.ts +146 -0
- package/src/bin/main.ts +15 -1
- package/src/bin/postinstall/installUiModulesPeerDependencies.ts +1 -1
- package/src/bin/postinstall/uiModuleMeta.ts +7 -1
- package/src/bin/shared/addPostinstallScriptIfNotPresent.ts +70 -0
- package/src/bin/shared/customHandler.ts +1 -0
- package/src/bin/tools/npmInstall.ts +46 -9
package/bin/653.index.js
CHANGED
@@ -14,8 +14,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
14
14
|
"command": () => (/* reexport */ command)
|
15
15
|
});
|
16
16
|
|
17
|
-
// EXTERNAL MODULE: ./dist/bin/postinstall/uiModuleMeta.js +
|
18
|
-
var postinstall_uiModuleMeta = __webpack_require__(
|
17
|
+
// EXTERNAL MODULE: ./dist/bin/postinstall/uiModuleMeta.js + 3 modules
|
18
|
+
var postinstall_uiModuleMeta = __webpack_require__(58644);
|
19
19
|
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
20
20
|
var assert = __webpack_require__(29041);
|
21
21
|
// EXTERNAL MODULE: ./node_modules/zod/lib/index.mjs
|
@@ -125,7 +125,7 @@ async function installUiModulesPeerDependencies(params) {
|
|
125
125
|
});
|
126
126
|
}
|
127
127
|
await promises_.writeFile(buildContext.packageJsonFilePath, packageJsonContentStr);
|
128
|
-
(0,npmInstall/* npmInstall */.c)({
|
128
|
+
await (0,npmInstall/* npmInstall */.c)({
|
129
129
|
packageJsonDirPath: (0,external_path_.dirname)(buildContext.packageJsonFilePath)
|
130
130
|
});
|
131
131
|
process.exit(0);
|
@@ -392,13 +392,15 @@ function rmSync(dirPath, options) {
|
|
392
392
|
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_2__);
|
393
393
|
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78818);
|
394
394
|
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
|
395
|
-
/* harmony import */ var
|
395
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52300);
|
396
396
|
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29041);
|
397
|
-
/* harmony import */ var
|
398
|
-
/* harmony import */ var
|
397
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38469);
|
398
|
+
/* harmony import */ var tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23483);
|
399
399
|
/* harmony import */ var _getAbsoluteAndInOsFormatPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84794);
|
400
|
-
/* harmony import */ var
|
400
|
+
/* harmony import */ var tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(83101);
|
401
401
|
/* harmony import */ var _fs_rmSync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(89693);
|
402
|
+
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50689);
|
403
|
+
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__);
|
402
404
|
|
403
405
|
|
404
406
|
|
@@ -410,7 +412,8 @@ function rmSync(dirPath, options) {
|
|
410
412
|
|
411
413
|
|
412
414
|
|
413
|
-
|
415
|
+
|
416
|
+
async function npmInstall(params) {
|
414
417
|
const { packageJsonDirPath } = params;
|
415
418
|
const packageManagerBinName = (() => {
|
416
419
|
const packageMangers = [
|
@@ -453,22 +456,46 @@ function npmInstall(params) {
|
|
453
456
|
break install_without_breaking_links;
|
454
457
|
}
|
455
458
|
console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().green("Installing in a way that won't break the links..."));
|
456
|
-
installWithoutBreakingLinks({
|
459
|
+
await installWithoutBreakingLinks({
|
457
460
|
packageJsonDirPath,
|
458
461
|
garronejLinkInfos
|
459
462
|
});
|
460
463
|
return;
|
461
464
|
}
|
462
465
|
try {
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
+
await runPackageManagerInstall({
|
467
|
+
packageManagerBinName,
|
468
|
+
cwd: packageJsonDirPath
|
466
469
|
});
|
467
470
|
}
|
468
471
|
catch (_a) {
|
469
472
|
console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`\`${packageManagerBinName} install\` failed, continuing anyway...`));
|
470
473
|
}
|
471
474
|
}
|
475
|
+
async function runPackageManagerInstall(params) {
|
476
|
+
const { packageManagerBinName, cwd } = params;
|
477
|
+
const dCompleted = new evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__.Deferred();
|
478
|
+
const child = child_process__WEBPACK_IMPORTED_MODULE_2__.spawn(packageManagerBinName, ["install"], {
|
479
|
+
cwd,
|
480
|
+
env: process.env,
|
481
|
+
shell: true
|
482
|
+
});
|
483
|
+
child.stdout.on("data", data => process.stdout.write(data));
|
484
|
+
child.stderr.on("data", data => {
|
485
|
+
if (data.toString("utf8").includes("has unmet peer dependency")) {
|
486
|
+
return;
|
487
|
+
}
|
488
|
+
process.stderr.write(data);
|
489
|
+
});
|
490
|
+
child.on("exit", code => {
|
491
|
+
if (code !== 0) {
|
492
|
+
dCompleted.reject(new Error(`Failed with code ${code}`));
|
493
|
+
return;
|
494
|
+
}
|
495
|
+
dCompleted.resolve();
|
496
|
+
});
|
497
|
+
await dCompleted.pr;
|
498
|
+
}
|
472
499
|
function getGarronejLinkInfos(params) {
|
473
500
|
const { packageJsonDirPath } = params;
|
474
501
|
const nodeModuleDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, "node_modules");
|
@@ -534,16 +561,16 @@ function getGarronejLinkInfos(params) {
|
|
534
561
|
}
|
535
562
|
return { linkedModuleNames, yarnHomeDirPath };
|
536
563
|
}
|
537
|
-
function installWithoutBreakingLinks(params) {
|
564
|
+
async function installWithoutBreakingLinks(params) {
|
538
565
|
const { packageJsonDirPath, garronejLinkInfos: { linkedModuleNames, yarnHomeDirPath } } = params;
|
539
566
|
const parsedPackageJson = (() => {
|
540
567
|
const packageJsonFilePath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, "package.json");
|
541
568
|
const zParsedPackageJson = (() => {
|
542
|
-
const zTargetType =
|
543
|
-
scripts:
|
569
|
+
const zTargetType = zod__WEBPACK_IMPORTED_MODULE_8__.z.object({
|
570
|
+
scripts: zod__WEBPACK_IMPORTED_MODULE_8__.z.record(zod__WEBPACK_IMPORTED_MODULE_8__.z.string()).optional()
|
544
571
|
});
|
545
572
|
tsafe_assert__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .h;
|
546
|
-
return (0,
|
573
|
+
return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_9__.id)(zTargetType);
|
547
574
|
})();
|
548
575
|
const parsedPackageJson = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(packageJsonFilePath).toString("utf8"));
|
549
576
|
zParsedPackageJson.parse(parsedPackageJson);
|
@@ -558,7 +585,7 @@ function installWithoutBreakingLinks(params) {
|
|
558
585
|
if (parsedPackageJson.scripts === undefined) {
|
559
586
|
break delete_postinstall_script;
|
560
587
|
}
|
561
|
-
for (const scriptName of (0,
|
588
|
+
for (const scriptName of (0,tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__/* .objectKeys */ .Y)(isImplementedScriptByName)) {
|
562
589
|
if (parsedPackageJson.scripts[scriptName] === undefined) {
|
563
590
|
continue;
|
564
591
|
}
|
@@ -574,20 +601,20 @@ function installWithoutBreakingLinks(params) {
|
|
574
601
|
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, "package.json"), JSON.stringify(parsedPackageJson, undefined, 4));
|
575
602
|
const YARN_LOCK = "yarn.lock";
|
576
603
|
fs__WEBPACK_IMPORTED_MODULE_0__.copyFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, YARN_LOCK), (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, YARN_LOCK));
|
577
|
-
|
578
|
-
|
579
|
-
|
604
|
+
await runPackageManagerInstall({
|
605
|
+
packageManagerBinName: "yarn",
|
606
|
+
cwd: tmpProjectDirPath
|
580
607
|
});
|
581
608
|
// NOTE: Moving the modules from the tmp project to the actual project
|
582
609
|
// without messing up the links.
|
583
610
|
{
|
584
611
|
const { getAreSameVersions } = (() => {
|
585
612
|
const zParsedPackageJson = (() => {
|
586
|
-
const zTargetType =
|
587
|
-
version:
|
613
|
+
const zTargetType = zod__WEBPACK_IMPORTED_MODULE_8__.z.object({
|
614
|
+
version: zod__WEBPACK_IMPORTED_MODULE_8__.z.string()
|
588
615
|
});
|
589
616
|
tsafe_assert__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .h;
|
590
|
-
return (0,
|
617
|
+
return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_9__.id)(zTargetType);
|
591
618
|
})();
|
592
619
|
function readVersion(params) {
|
593
620
|
const { moduleDirPath } = params;
|
@@ -628,7 +655,7 @@ function installWithoutBreakingLinks(params) {
|
|
628
655
|
moduleDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesDirPath, basename, subBasename)
|
629
656
|
};
|
630
657
|
})
|
631
|
-
.filter((0,
|
658
|
+
.filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__/* .exclude */ .D)(undefined));
|
632
659
|
}
|
633
660
|
if (!fs__WEBPACK_IMPORTED_MODULE_0__.lstatSync(path).isDirectory()) {
|
634
661
|
return undefined;
|
@@ -641,7 +668,7 @@ function installWithoutBreakingLinks(params) {
|
|
641
668
|
}
|
642
669
|
];
|
643
670
|
})
|
644
|
-
.filter((0,
|
671
|
+
.filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__/* .exclude */ .D)(undefined))
|
645
672
|
.flat();
|
646
673
|
for (const { moduleName, moduleDirPath, moduleDirPath_tmpProject } of modulePaths) {
|
647
674
|
if (linkedModuleNames.includes(moduleName)) {
|
@@ -691,7 +718,7 @@ function installWithoutBreakingLinks(params) {
|
|
691
718
|
}
|
692
719
|
fs__WEBPACK_IMPORTED_MODULE_0__.cpSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, YARN_LOCK), (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, YARN_LOCK));
|
693
720
|
(0,_fs_rmSync__WEBPACK_IMPORTED_MODULE_6__/* .rmSync */ .a)(tmpProjectDirPath, { recursive: true });
|
694
|
-
for (const scriptName of (0,
|
721
|
+
for (const scriptName of (0,tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__/* .objectKeys */ .Y)(isImplementedScriptByName)) {
|
695
722
|
if (!isImplementedScriptByName[scriptName]) {
|
696
723
|
continue;
|
697
724
|
}
|
@@ -705,115 +732,6 @@ function installWithoutBreakingLinks(params) {
|
|
705
732
|
|
706
733
|
/***/ }),
|
707
734
|
|
708
|
-
/***/ 50689:
|
709
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
710
|
-
|
711
|
-
|
712
|
-
var __extends = (this && this.__extends) || (function () {
|
713
|
-
var extendStatics = function (d, b) {
|
714
|
-
extendStatics = Object.setPrototypeOf ||
|
715
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
716
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
717
|
-
return extendStatics(d, b);
|
718
|
-
};
|
719
|
-
return function (d, b) {
|
720
|
-
if (typeof b !== "function" && b !== null)
|
721
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
722
|
-
extendStatics(d, b);
|
723
|
-
function __() { this.constructor = d; }
|
724
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
725
|
-
};
|
726
|
-
})();
|
727
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
728
|
-
exports.VoidDeferred = exports.Deferred = void 0;
|
729
|
-
var overwriteReadonlyProp_1 = __webpack_require__(47803);
|
730
|
-
var Deferred = /** @class */ (function () {
|
731
|
-
function Deferred() {
|
732
|
-
var _this_1 = this;
|
733
|
-
this.isPending = true;
|
734
|
-
var resolve;
|
735
|
-
var reject;
|
736
|
-
this.pr = new Promise(function (resolve_, reject_) {
|
737
|
-
resolve = function (value) {
|
738
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
739
|
-
resolve_(value);
|
740
|
-
};
|
741
|
-
reject = function (error) {
|
742
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
743
|
-
reject_(error);
|
744
|
-
};
|
745
|
-
});
|
746
|
-
this.resolve = resolve;
|
747
|
-
this.reject = reject;
|
748
|
-
}
|
749
|
-
return Deferred;
|
750
|
-
}());
|
751
|
-
exports.Deferred = Deferred;
|
752
|
-
var VoidDeferred = /** @class */ (function (_super) {
|
753
|
-
__extends(VoidDeferred, _super);
|
754
|
-
function VoidDeferred() {
|
755
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
756
|
-
}
|
757
|
-
return VoidDeferred;
|
758
|
-
}(Deferred));
|
759
|
-
exports.VoidDeferred = VoidDeferred;
|
760
|
-
//# sourceMappingURL=Deferred.js.map
|
761
|
-
|
762
|
-
/***/ }),
|
763
|
-
|
764
|
-
/***/ 47803:
|
765
|
-
/***/ (function(__unused_webpack_module, exports) {
|
766
|
-
|
767
|
-
|
768
|
-
var __assign = (this && this.__assign) || function () {
|
769
|
-
__assign = Object.assign || function(t) {
|
770
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
771
|
-
s = arguments[i];
|
772
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
773
|
-
t[p] = s[p];
|
774
|
-
}
|
775
|
-
return t;
|
776
|
-
};
|
777
|
-
return __assign.apply(this, arguments);
|
778
|
-
};
|
779
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
780
|
-
exports.overwriteReadonlyProp = void 0;
|
781
|
-
/**
|
782
|
-
* Assign a value to a property even if the object is freezed or if the property is not writable
|
783
|
-
* Throw if the assignation fail ( for example if the property is non configurable write: false )
|
784
|
-
* */
|
785
|
-
var overwriteReadonlyProp = function (obj, propertyName, value) {
|
786
|
-
try {
|
787
|
-
obj[propertyName] = value;
|
788
|
-
}
|
789
|
-
catch (_a) { }
|
790
|
-
if (obj[propertyName] === value) {
|
791
|
-
return value;
|
792
|
-
}
|
793
|
-
var errorDefineProperty = undefined;
|
794
|
-
var propertyDescriptor = Object.getOwnPropertyDescriptor(obj, propertyName) || {
|
795
|
-
"enumerable": true,
|
796
|
-
"configurable": true,
|
797
|
-
};
|
798
|
-
if (!!propertyDescriptor.get) {
|
799
|
-
throw new Error("Probably a wrong ides to overwrite ".concat(String(propertyName), " getter"));
|
800
|
-
}
|
801
|
-
try {
|
802
|
-
Object.defineProperty(obj, propertyName, __assign(__assign({}, propertyDescriptor), { value: value }));
|
803
|
-
}
|
804
|
-
catch (error) {
|
805
|
-
errorDefineProperty = error;
|
806
|
-
}
|
807
|
-
if (obj[propertyName] !== value) {
|
808
|
-
throw errorDefineProperty || new Error("Can't assign");
|
809
|
-
}
|
810
|
-
return value;
|
811
|
-
};
|
812
|
-
exports.overwriteReadonlyProp = overwriteReadonlyProp;
|
813
|
-
//# sourceMappingURL=overwriteReadonlyProp.js.map
|
814
|
-
|
815
|
-
/***/ }),
|
816
|
-
|
817
735
|
/***/ 23483:
|
818
736
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
819
737
|
|
package/bin/735.index.js
CHANGED
@@ -114,7 +114,9 @@ async function initializeAccountTheme_singlePage(params) {
|
|
114
114
|
delete parsedPackageJson.devDependencies;
|
115
115
|
}
|
116
116
|
fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(buildContext.packageJsonFilePath, JSON.stringify(parsedPackageJson, undefined, 4));
|
117
|
-
(0,_tools_npmInstall__WEBPACK_IMPORTED_MODULE_7__/* .npmInstall */ .c)({
|
117
|
+
await (0,_tools_npmInstall__WEBPACK_IMPORTED_MODULE_7__/* .npmInstall */ .c)({
|
118
|
+
packageJsonDirPath: (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(buildContext.packageJsonFilePath)
|
119
|
+
});
|
118
120
|
(0,_copyBoilerplate__WEBPACK_IMPORTED_MODULE_8__/* .copyBoilerplate */ .T)({
|
119
121
|
accountThemeType: "Single-Page",
|
120
122
|
accountThemeSrcDirPath
|
@@ -544,13 +546,16 @@ function rmSync(dirPath, options) {
|
|
544
546
|
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_2__);
|
545
547
|
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78818);
|
546
548
|
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
|
547
|
-
/* harmony import */ var
|
549
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52300);
|
548
550
|
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29041);
|
549
|
-
/* harmony import */ var
|
550
|
-
/* harmony import */ var
|
551
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38469);
|
552
|
+
/* harmony import */ var tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23483);
|
551
553
|
/* harmony import */ var _getAbsoluteAndInOsFormatPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84794);
|
552
|
-
/* harmony import */ var
|
554
|
+
/* harmony import */ var tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(83101);
|
553
555
|
/* harmony import */ var _fs_rmSync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(89693);
|
556
|
+
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50689);
|
557
|
+
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__);
|
558
|
+
|
554
559
|
|
555
560
|
|
556
561
|
|
@@ -562,7 +567,7 @@ function rmSync(dirPath, options) {
|
|
562
567
|
|
563
568
|
|
564
569
|
|
565
|
-
function npmInstall(params) {
|
570
|
+
async function npmInstall(params) {
|
566
571
|
const { packageJsonDirPath } = params;
|
567
572
|
const packageManagerBinName = (() => {
|
568
573
|
const packageMangers = [
|
@@ -605,22 +610,46 @@ function npmInstall(params) {
|
|
605
610
|
break install_without_breaking_links;
|
606
611
|
}
|
607
612
|
console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().green("Installing in a way that won't break the links..."));
|
608
|
-
installWithoutBreakingLinks({
|
613
|
+
await installWithoutBreakingLinks({
|
609
614
|
packageJsonDirPath,
|
610
615
|
garronejLinkInfos
|
611
616
|
});
|
612
617
|
return;
|
613
618
|
}
|
614
619
|
try {
|
615
|
-
|
616
|
-
|
617
|
-
|
620
|
+
await runPackageManagerInstall({
|
621
|
+
packageManagerBinName,
|
622
|
+
cwd: packageJsonDirPath
|
618
623
|
});
|
619
624
|
}
|
620
625
|
catch (_a) {
|
621
626
|
console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`\`${packageManagerBinName} install\` failed, continuing anyway...`));
|
622
627
|
}
|
623
628
|
}
|
629
|
+
async function runPackageManagerInstall(params) {
|
630
|
+
const { packageManagerBinName, cwd } = params;
|
631
|
+
const dCompleted = new evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_7__.Deferred();
|
632
|
+
const child = child_process__WEBPACK_IMPORTED_MODULE_2__.spawn(packageManagerBinName, ["install"], {
|
633
|
+
cwd,
|
634
|
+
env: process.env,
|
635
|
+
shell: true
|
636
|
+
});
|
637
|
+
child.stdout.on("data", data => process.stdout.write(data));
|
638
|
+
child.stderr.on("data", data => {
|
639
|
+
if (data.toString("utf8").includes("has unmet peer dependency")) {
|
640
|
+
return;
|
641
|
+
}
|
642
|
+
process.stderr.write(data);
|
643
|
+
});
|
644
|
+
child.on("exit", code => {
|
645
|
+
if (code !== 0) {
|
646
|
+
dCompleted.reject(new Error(`Failed with code ${code}`));
|
647
|
+
return;
|
648
|
+
}
|
649
|
+
dCompleted.resolve();
|
650
|
+
});
|
651
|
+
await dCompleted.pr;
|
652
|
+
}
|
624
653
|
function getGarronejLinkInfos(params) {
|
625
654
|
const { packageJsonDirPath } = params;
|
626
655
|
const nodeModuleDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, "node_modules");
|
@@ -686,16 +715,16 @@ function getGarronejLinkInfos(params) {
|
|
686
715
|
}
|
687
716
|
return { linkedModuleNames, yarnHomeDirPath };
|
688
717
|
}
|
689
|
-
function installWithoutBreakingLinks(params) {
|
718
|
+
async function installWithoutBreakingLinks(params) {
|
690
719
|
const { packageJsonDirPath, garronejLinkInfos: { linkedModuleNames, yarnHomeDirPath } } = params;
|
691
720
|
const parsedPackageJson = (() => {
|
692
721
|
const packageJsonFilePath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, "package.json");
|
693
722
|
const zParsedPackageJson = (() => {
|
694
|
-
const zTargetType =
|
695
|
-
scripts:
|
723
|
+
const zTargetType = zod__WEBPACK_IMPORTED_MODULE_8__.z.object({
|
724
|
+
scripts: zod__WEBPACK_IMPORTED_MODULE_8__.z.record(zod__WEBPACK_IMPORTED_MODULE_8__.z.string()).optional()
|
696
725
|
});
|
697
726
|
tsafe_assert__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .h;
|
698
|
-
return (0,
|
727
|
+
return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_9__.id)(zTargetType);
|
699
728
|
})();
|
700
729
|
const parsedPackageJson = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(packageJsonFilePath).toString("utf8"));
|
701
730
|
zParsedPackageJson.parse(parsedPackageJson);
|
@@ -710,7 +739,7 @@ function installWithoutBreakingLinks(params) {
|
|
710
739
|
if (parsedPackageJson.scripts === undefined) {
|
711
740
|
break delete_postinstall_script;
|
712
741
|
}
|
713
|
-
for (const scriptName of (0,
|
742
|
+
for (const scriptName of (0,tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__/* .objectKeys */ .Y)(isImplementedScriptByName)) {
|
714
743
|
if (parsedPackageJson.scripts[scriptName] === undefined) {
|
715
744
|
continue;
|
716
745
|
}
|
@@ -726,20 +755,20 @@ function installWithoutBreakingLinks(params) {
|
|
726
755
|
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, "package.json"), JSON.stringify(parsedPackageJson, undefined, 4));
|
727
756
|
const YARN_LOCK = "yarn.lock";
|
728
757
|
fs__WEBPACK_IMPORTED_MODULE_0__.copyFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, YARN_LOCK), (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, YARN_LOCK));
|
729
|
-
|
730
|
-
|
731
|
-
|
758
|
+
await runPackageManagerInstall({
|
759
|
+
packageManagerBinName: "yarn",
|
760
|
+
cwd: tmpProjectDirPath
|
732
761
|
});
|
733
762
|
// NOTE: Moving the modules from the tmp project to the actual project
|
734
763
|
// without messing up the links.
|
735
764
|
{
|
736
765
|
const { getAreSameVersions } = (() => {
|
737
766
|
const zParsedPackageJson = (() => {
|
738
|
-
const zTargetType =
|
739
|
-
version:
|
767
|
+
const zTargetType = zod__WEBPACK_IMPORTED_MODULE_8__.z.object({
|
768
|
+
version: zod__WEBPACK_IMPORTED_MODULE_8__.z.string()
|
740
769
|
});
|
741
770
|
tsafe_assert__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .h;
|
742
|
-
return (0,
|
771
|
+
return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_9__.id)(zTargetType);
|
743
772
|
})();
|
744
773
|
function readVersion(params) {
|
745
774
|
const { moduleDirPath } = params;
|
@@ -780,7 +809,7 @@ function installWithoutBreakingLinks(params) {
|
|
780
809
|
moduleDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesDirPath, basename, subBasename)
|
781
810
|
};
|
782
811
|
})
|
783
|
-
.filter((0,
|
812
|
+
.filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__/* .exclude */ .D)(undefined));
|
784
813
|
}
|
785
814
|
if (!fs__WEBPACK_IMPORTED_MODULE_0__.lstatSync(path).isDirectory()) {
|
786
815
|
return undefined;
|
@@ -793,7 +822,7 @@ function installWithoutBreakingLinks(params) {
|
|
793
822
|
}
|
794
823
|
];
|
795
824
|
})
|
796
|
-
.filter((0,
|
825
|
+
.filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_11__/* .exclude */ .D)(undefined))
|
797
826
|
.flat();
|
798
827
|
for (const { moduleName, moduleDirPath, moduleDirPath_tmpProject } of modulePaths) {
|
799
828
|
if (linkedModuleNames.includes(moduleName)) {
|
@@ -843,7 +872,7 @@ function installWithoutBreakingLinks(params) {
|
|
843
872
|
}
|
844
873
|
fs__WEBPACK_IMPORTED_MODULE_0__.cpSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)(tmpProjectDirPath, YARN_LOCK), (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(packageJsonDirPath, YARN_LOCK));
|
845
874
|
(0,_fs_rmSync__WEBPACK_IMPORTED_MODULE_6__/* .rmSync */ .a)(tmpProjectDirPath, { recursive: true });
|
846
|
-
for (const scriptName of (0,
|
875
|
+
for (const scriptName of (0,tsafe_objectKeys__WEBPACK_IMPORTED_MODULE_10__/* .objectKeys */ .Y)(isImplementedScriptByName)) {
|
847
876
|
if (!isImplementedScriptByName[scriptName]) {
|
848
877
|
continue;
|
849
878
|
}
|
package/bin/854.index.js
CHANGED
@@ -14,7 +14,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
14
14
|
/* harmony import */ var _tools_getAbsoluteAndInOsFormatPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84794);
|
15
15
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71017);
|
16
16
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
17
|
-
/* harmony import */ var _postinstall_uiModuleMeta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
17
|
+
/* harmony import */ var _postinstall_uiModuleMeta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58644);
|
18
18
|
/* harmony import */ var _tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21022);
|
19
19
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73292);
|
20
20
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_5__);
|
package/bin/921.index.js
CHANGED
@@ -160,7 +160,7 @@ async function command(params) {
|
|
160
160
|
break;
|
161
161
|
case "Single-Page":
|
162
162
|
{
|
163
|
-
const { initializeAccountTheme_singlePage } = await Promise.all(/* import() */[__webpack_require__.e(
|
163
|
+
const { initializeAccountTheme_singlePage } = await Promise.all(/* import() */[__webpack_require__.e(174), __webpack_require__.e(525), __webpack_require__.e(375), __webpack_require__.e(735)]).then(__webpack_require__.bind(__webpack_require__, 84735));
|
164
164
|
await initializeAccountTheme_singlePage({
|
165
165
|
accountThemeSrcDirPath,
|
166
166
|
buildContext
|
package/bin/main.js
CHANGED
@@ -16201,7 +16201,7 @@ program
|
|
16201
16201
|
.task({
|
16202
16202
|
skip,
|
16203
16203
|
handler: async ({ projectDirPath, keycloakVersion, port, realmJsonFilePath }) => {
|
16204
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
16204
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(174), __nccwpck_require__.e(525), __nccwpck_require__.e(568), __nccwpck_require__.e(503), __nccwpck_require__.e(153)]).then(__nccwpck_require__.bind(__nccwpck_require__, 43153));
|
16205
16205
|
await command({
|
16206
16206
|
buildContext: getBuildContext({ projectDirPath }),
|
16207
16207
|
cliCommandOptions: {
|
@@ -16244,14 +16244,14 @@ program
|
|
16244
16244
|
.task({
|
16245
16245
|
skip,
|
16246
16246
|
handler: async ({ projectDirPath }) => {
|
16247
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
16247
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(174), __nccwpck_require__.e(525), __nccwpck_require__.e(375), __nccwpck_require__.e(568), __nccwpck_require__.e(490)]).then(__nccwpck_require__.bind(__nccwpck_require__, 23490));
|
16248
16248
|
await command({ buildContext: getBuildContext({ projectDirPath }) });
|
16249
16249
|
}
|
16250
16250
|
});
|
16251
16251
|
program
|
16252
16252
|
.command({
|
16253
16253
|
name: "initialize-account-theme",
|
16254
|
-
description: "Initialize
|
16254
|
+
description: "Initialize an Account Single-Page or Multi-Page custom Account UI."
|
16255
16255
|
})
|
16256
16256
|
.task({
|
16257
16257
|
skip,
|
@@ -16260,6 +16260,18 @@ program
|
|
16260
16260
|
await command({ buildContext: getBuildContext({ projectDirPath }) });
|
16261
16261
|
}
|
16262
16262
|
});
|
16263
|
+
program
|
16264
|
+
.command({
|
16265
|
+
name: "initialize-admin-theme",
|
16266
|
+
description: "Initialize an Admin Console custom UI."
|
16267
|
+
})
|
16268
|
+
.task({
|
16269
|
+
skip,
|
16270
|
+
handler: async ({ projectDirPath }) => {
|
16271
|
+
const { command } = await __nccwpck_require__.e(/* import() */ 615).then(__nccwpck_require__.bind(__nccwpck_require__, 61615));
|
16272
|
+
await command({ buildContext: getBuildContext({ projectDirPath }) });
|
16273
|
+
}
|
16274
|
+
});
|
16263
16275
|
program
|
16264
16276
|
.command({
|
16265
16277
|
name: "copy-keycloak-resources-to-public",
|
@@ -16292,7 +16304,7 @@ program
|
|
16292
16304
|
.task({
|
16293
16305
|
skip,
|
16294
16306
|
handler: async ({ projectDirPath }) => {
|
16295
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
16307
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(174), __nccwpck_require__.e(300), __nccwpck_require__.e(653)]).then(__nccwpck_require__.bind(__nccwpck_require__, 2653));
|
16296
16308
|
await command({ buildContext: getBuildContext({ projectDirPath }) });
|
16297
16309
|
}
|
16298
16310
|
});
|
@@ -16320,7 +16332,7 @@ program
|
|
16320
16332
|
.task({
|
16321
16333
|
skip,
|
16322
16334
|
handler: async ({ projectDirPath, file }) => {
|
16323
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
16335
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(300), __nccwpck_require__.e(854)]).then(__nccwpck_require__.bind(__nccwpck_require__, 85854));
|
16324
16336
|
await command({
|
16325
16337
|
buildContext: getBuildContext({ projectDirPath }),
|
16326
16338
|
cliCommandOptions: { file }
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type BuildContextLike = {
|
2
|
+
projectDirPath: string;
|
3
|
+
packageJsonFilePath: string;
|
4
|
+
};
|
5
|
+
export declare function addPostinstallScriptIfNotPresent(params: {
|
6
|
+
parsedPackageJson: {
|
7
|
+
scripts?: Record<string, string | undefined>;
|
8
|
+
};
|
9
|
+
buildContext: BuildContextLike;
|
10
|
+
}): void;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { BuildContext } from "./buildContext";
|
2
2
|
export declare const BIN_NAME = "_keycloakify-custom-handler";
|
3
3
|
export declare const NOT_IMPLEMENTED_EXIT_CODE = 78;
|
4
|
-
export type CommandName = "update-kc-gen" | "eject-page" | "add-story" | "initialize-account-theme" | "initialize-admin-theme" | "initialize-email-theme" | "copy-keycloak-resources-to-public";
|
4
|
+
export type CommandName = "update-kc-gen" | "eject-page" | "add-story" | "initialize-account-theme" | "initialize-admin-theme" | "initialize-admin-theme" | "initialize-email-theme" | "copy-keycloak-resources-to-public";
|
5
5
|
export type ApiVersion = "v1";
|
6
6
|
export declare function readParams(params: {
|
7
7
|
apiVersion: ApiVersion;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"customHandler.js","sourceRoot":"","sources":["../../src/bin/shared/customHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"customHandler.js","sourceRoot":"","sources":["../../src/bin/shared/customHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAc5C,MAAM,UAAU,UAAU,CAAC,MAAkC;IACzD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAE9B,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC;IAE5B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE;QACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;QAEpE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,QAAuB,CAAC;IACnC,CAAC,CAAC,EAAE,CAAC;IAEL,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAErE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAiB,CAAC;IAChD,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACzC,CAAC"}
|