keycloakify 11.6.0 → 11.6.2
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/363.index.js +1528 -0
- package/bin/453.index.js +1 -1
- package/bin/{33.index.js → 568.index.js} +2 -113
- package/bin/735.index.js +53 -24
- package/bin/{653.index.js → 840.index.js} +387 -213
- package/bin/921.index.js +1 -1
- package/bin/930.index.js +165 -0
- package/bin/946.index.js +20 -0
- package/bin/initialize-admin-theme.d.ts +4 -0
- package/bin/main.js +72 -18
- package/bin/{eject-file.d.ts → own.d.ts} +2 -1
- package/bin/shared/addSyncExtensionsToPostinstallScript.d.ts +10 -0
- package/bin/shared/customHandler.d.ts +1 -1
- package/bin/shared/customHandler.js.map +1 -1
- package/bin/{postinstall/uiModuleMeta.d.ts → sync-extensions/extensionModuleMeta.d.ts} +5 -5
- package/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.d.ts +12 -0
- package/bin/sync-extensions/index.d.ts +1 -0
- package/bin/{postinstall/installUiModulesPeerDependencies.d.ts → sync-extensions/installExtensionModulesPeerDependencies.d.ts} +3 -3
- package/bin/{postinstall → sync-extensions}/managedGitignoreFile.d.ts +4 -4
- package/bin/tools/isKnownByGit.d.ts +3 -0
- package/bin/tools/npmInstall.d.ts +1 -1
- package/package.json +27 -22
- package/src/bin/eject-page.ts +1 -3
- 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 +76 -17
- package/src/bin/own.ts +209 -0
- package/src/bin/shared/addSyncExtensionsToPostinstallScript.ts +70 -0
- package/src/bin/shared/customHandler.ts +1 -0
- package/src/bin/{postinstall/uiModuleMeta.ts → sync-extensions/extensionModuleMeta.ts} +55 -43
- package/src/bin/{postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts → sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts} +32 -21
- package/src/bin/sync-extensions/index.ts +1 -0
- package/src/bin/{postinstall/installUiModulesPeerDependencies.ts → sync-extensions/installExtensionModulesPeerDependencies.ts} +16 -14
- package/src/bin/{postinstall → sync-extensions}/managedGitignoreFile.ts +18 -18
- package/src/bin/{postinstall/postinstall.ts → sync-extensions/sync-extension.ts} +14 -26
- package/src/bin/tools/isKnownByGit.ts +45 -0
- package/src/bin/tools/listInstalledModules.ts +2 -2
- package/src/bin/tools/npmInstall.ts +46 -9
- package/src/bin/tools/untrackFromGit.ts +19 -3
- package/bin/356.index.js +0 -755
- package/bin/854.index.js +0 -68
- package/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.d.ts +0 -12
- package/bin/postinstall/index.d.ts +0 -1
- package/bin/tools/isTrackedByGit.d.ts +0 -3
- package/src/bin/eject-file.ts +0 -68
- package/src/bin/postinstall/index.ts +0 -1
- package/src/bin/tools/isTrackedByGit.ts +0 -29
- /package/bin/{postinstall/postinstall.d.ts → sync-extensions/sync-extension.d.ts} +0 -0
package/bin/453.index.js
CHANGED
@@ -70,7 +70,7 @@ async function command(params) {
|
|
70
70
|
return value;
|
71
71
|
})();
|
72
72
|
if (themeType === "admin") {
|
73
|
-
console.log("Use `npx keycloakify
|
73
|
+
console.log("Use `npx keycloakify own` command instead, see documentation");
|
74
74
|
process.exit(-1);
|
75
75
|
}
|
76
76
|
if (themeType === "account" &&
|
@@ -1,5 +1,5 @@
|
|
1
|
-
exports.id =
|
2
|
-
exports.ids = [
|
1
|
+
exports.id = 568;
|
2
|
+
exports.ids = [568];
|
3
3
|
exports.modules = {
|
4
4
|
|
5
5
|
/***/ 18512:
|
@@ -695,63 +695,6 @@ exports.withObjectValues = withObjectValues;
|
|
695
695
|
|
696
696
|
/***/ }),
|
697
697
|
|
698
|
-
/***/ 50689:
|
699
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
700
|
-
|
701
|
-
"use strict";
|
702
|
-
|
703
|
-
var __extends = (this && this.__extends) || (function () {
|
704
|
-
var extendStatics = function (d, b) {
|
705
|
-
extendStatics = Object.setPrototypeOf ||
|
706
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
707
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
708
|
-
return extendStatics(d, b);
|
709
|
-
};
|
710
|
-
return function (d, b) {
|
711
|
-
if (typeof b !== "function" && b !== null)
|
712
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
713
|
-
extendStatics(d, b);
|
714
|
-
function __() { this.constructor = d; }
|
715
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
716
|
-
};
|
717
|
-
})();
|
718
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
719
|
-
exports.VoidDeferred = exports.Deferred = void 0;
|
720
|
-
var overwriteReadonlyProp_1 = __webpack_require__(47803);
|
721
|
-
var Deferred = /** @class */ (function () {
|
722
|
-
function Deferred() {
|
723
|
-
var _this_1 = this;
|
724
|
-
this.isPending = true;
|
725
|
-
var resolve;
|
726
|
-
var reject;
|
727
|
-
this.pr = new Promise(function (resolve_, reject_) {
|
728
|
-
resolve = function (value) {
|
729
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
730
|
-
resolve_(value);
|
731
|
-
};
|
732
|
-
reject = function (error) {
|
733
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
734
|
-
reject_(error);
|
735
|
-
};
|
736
|
-
});
|
737
|
-
this.resolve = resolve;
|
738
|
-
this.reject = reject;
|
739
|
-
}
|
740
|
-
return Deferred;
|
741
|
-
}());
|
742
|
-
exports.Deferred = Deferred;
|
743
|
-
var VoidDeferred = /** @class */ (function (_super) {
|
744
|
-
__extends(VoidDeferred, _super);
|
745
|
-
function VoidDeferred() {
|
746
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
747
|
-
}
|
748
|
-
return VoidDeferred;
|
749
|
-
}(Deferred));
|
750
|
-
exports.VoidDeferred = VoidDeferred;
|
751
|
-
//# sourceMappingURL=Deferred.js.map
|
752
|
-
|
753
|
-
/***/ }),
|
754
|
-
|
755
698
|
/***/ 65010:
|
756
699
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
757
700
|
|
@@ -1115,60 +1058,6 @@ function pendGo(self, fn) {
|
|
1115
1058
|
}
|
1116
1059
|
|
1117
1060
|
|
1118
|
-
/***/ }),
|
1119
|
-
|
1120
|
-
/***/ 47803:
|
1121
|
-
/***/ (function(__unused_webpack_module, exports) {
|
1122
|
-
|
1123
|
-
"use strict";
|
1124
|
-
|
1125
|
-
var __assign = (this && this.__assign) || function () {
|
1126
|
-
__assign = Object.assign || function(t) {
|
1127
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
1128
|
-
s = arguments[i];
|
1129
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
1130
|
-
t[p] = s[p];
|
1131
|
-
}
|
1132
|
-
return t;
|
1133
|
-
};
|
1134
|
-
return __assign.apply(this, arguments);
|
1135
|
-
};
|
1136
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1137
|
-
exports.overwriteReadonlyProp = void 0;
|
1138
|
-
/**
|
1139
|
-
* Assign a value to a property even if the object is freezed or if the property is not writable
|
1140
|
-
* Throw if the assignation fail ( for example if the property is non configurable write: false )
|
1141
|
-
* */
|
1142
|
-
var overwriteReadonlyProp = function (obj, propertyName, value) {
|
1143
|
-
try {
|
1144
|
-
obj[propertyName] = value;
|
1145
|
-
}
|
1146
|
-
catch (_a) { }
|
1147
|
-
if (obj[propertyName] === value) {
|
1148
|
-
return value;
|
1149
|
-
}
|
1150
|
-
var errorDefineProperty = undefined;
|
1151
|
-
var propertyDescriptor = Object.getOwnPropertyDescriptor(obj, propertyName) || {
|
1152
|
-
"enumerable": true,
|
1153
|
-
"configurable": true,
|
1154
|
-
};
|
1155
|
-
if (!!propertyDescriptor.get) {
|
1156
|
-
throw new Error("Probably a wrong ides to overwrite ".concat(String(propertyName), " getter"));
|
1157
|
-
}
|
1158
|
-
try {
|
1159
|
-
Object.defineProperty(obj, propertyName, __assign(__assign({}, propertyDescriptor), { value: value }));
|
1160
|
-
}
|
1161
|
-
catch (error) {
|
1162
|
-
errorDefineProperty = error;
|
1163
|
-
}
|
1164
|
-
if (obj[propertyName] !== value) {
|
1165
|
-
throw errorDefineProperty || new Error("Can't assign");
|
1166
|
-
}
|
1167
|
-
return value;
|
1168
|
-
};
|
1169
|
-
exports.overwriteReadonlyProp = overwriteReadonlyProp;
|
1170
|
-
//# sourceMappingURL=overwriteReadonlyProp.js.map
|
1171
|
-
|
1172
1061
|
/***/ }),
|
1173
1062
|
|
1174
1063
|
/***/ 78781:
|
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("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
|
}
|