keycloakify 11.8.46 → 11.8.47-rc.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/254.index.js +283 -0
- package/bin/30.index.js +25 -0
- package/bin/{864.index.js → 309.index.js} +6944 -28439
- package/bin/311.index.js +198 -0
- package/bin/{313.index.js → 355.index.js} +101 -147
- package/bin/{84.index.js → 502.index.js} +147 -101
- package/bin/626.index.js +194 -0
- package/bin/{698.index.js → 656.index.js} +101 -147
- package/bin/675.index.js +177 -0
- package/bin/69.index.js +1 -1
- package/bin/762.index.js +1475 -0
- package/bin/780.index.js +4 -2
- package/bin/786.index.js +115 -0
- package/bin/895.index.js +21501 -0
- package/bin/{618.index.js → 932.index.js} +117 -163
- package/bin/949.index.js +1 -1
- package/bin/97.index.js +537 -4
- package/bin/init/index.d.ts +1 -0
- package/bin/init/init.d.ts +3 -0
- package/bin/init/setupEslint.d.ts +4 -0
- package/bin/init/setupVitePluginIfNeeded.d.ts +4 -0
- package/bin/initialize-login-theme.d.ts +4 -0
- package/bin/main.js +19 -30
- package/bin/shared/customHandler.d.ts +1 -1
- package/bin/shared/customHandler.js.map +1 -1
- package/package.json +23 -7
- package/src/bin/init/index.ts +1 -0
- package/src/bin/init/init.ts +354 -0
- package/src/bin/init/setupEslint.ts +80 -0
- package/src/bin/init/setupVitePluginIfNeeded.ts +143 -0
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +4 -0
- package/src/bin/initialize-login-theme.ts +323 -0
- package/src/bin/main.ts +14 -0
- package/src/bin/shared/buildContext.ts +2 -37
- package/src/bin/shared/customHandler.ts +3 -1
- package/src/bin/sync-extensions/extensionModuleMeta.ts +89 -73
- package/src/bin/sync-extensions/managedGitignoreFiles.ts +32 -2
- package/vite-plugin/index.js +1 -24
- package/bin/433.index.js +0 -140
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
exports.id =
|
3
|
-
exports.ids = [
|
2
|
+
exports.id = 932;
|
3
|
+
exports.ids = [932,30,675];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
6
|
/***/ 16932:
|
@@ -132,58 +132,6 @@ async function command(params) {
|
|
132
132
|
|
133
133
|
/***/ }),
|
134
134
|
|
135
|
-
/***/ 80339:
|
136
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
137
|
-
|
138
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
139
|
-
/* harmony export */ "N": () => (/* binding */ addSyncExtensionsToPostinstallScript)
|
140
|
-
/* harmony export */ });
|
141
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
142
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
143
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29041);
|
144
|
-
|
145
|
-
|
146
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_1__/* .assert */ .h)();
|
147
|
-
function addSyncExtensionsToPostinstallScript(params) {
|
148
|
-
var _a;
|
149
|
-
const { parsedPackageJson, buildContext } = params;
|
150
|
-
const cmd_base = "keycloakify sync-extensions";
|
151
|
-
const projectCliOptionValue = (() => {
|
152
|
-
const packageJsonDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(buildContext.packageJsonFilePath);
|
153
|
-
const relativePath = (0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(packageJsonDirPath, buildContext.projectDirPath);
|
154
|
-
if (relativePath === "") {
|
155
|
-
return undefined;
|
156
|
-
}
|
157
|
-
return relativePath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).join("/");
|
158
|
-
})();
|
159
|
-
const generateCmd = (params) => {
|
160
|
-
const { cmd_preexisting } = params;
|
161
|
-
let cmd = cmd_preexisting === undefined ? "" : `${cmd_preexisting} && `;
|
162
|
-
cmd += cmd_base;
|
163
|
-
if (projectCliOptionValue !== undefined) {
|
164
|
-
cmd += ` -p ${projectCliOptionValue}`;
|
165
|
-
}
|
166
|
-
return cmd;
|
167
|
-
};
|
168
|
-
{
|
169
|
-
const scripts = ((_a = parsedPackageJson.scripts) !== null && _a !== void 0 ? _a : (parsedPackageJson.scripts = {}));
|
170
|
-
for (const scriptName of ["postinstall", "prepare"]) {
|
171
|
-
const cmd_preexisting = scripts[scriptName];
|
172
|
-
if (cmd_preexisting === undefined) {
|
173
|
-
continue;
|
174
|
-
}
|
175
|
-
if (!cmd_preexisting.includes(cmd_base)) {
|
176
|
-
scripts[scriptName] = generateCmd({ cmd_preexisting });
|
177
|
-
return;
|
178
|
-
}
|
179
|
-
}
|
180
|
-
}
|
181
|
-
parsedPackageJson.scripts = Object.assign({ postinstall: generateCmd({ cmd_preexisting: undefined }) }, parsedPackageJson.scripts);
|
182
|
-
}
|
183
|
-
//# sourceMappingURL=addSyncExtensionsToPostinstallScript.js.map
|
184
|
-
|
185
|
-
/***/ }),
|
186
|
-
|
187
135
|
/***/ 72138:
|
188
136
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
189
137
|
|
@@ -534,6 +482,121 @@ function getNodeModulesBinDirPath(params) {
|
|
534
482
|
|
535
483
|
/***/ }),
|
536
484
|
|
485
|
+
/***/ 48433:
|
486
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
487
|
+
|
488
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
489
|
+
/* harmony export */ "LG": () => (/* binding */ getPrettier),
|
490
|
+
/* harmony export */ "MT": () => (/* binding */ getIsPrettierAvailable),
|
491
|
+
/* harmony export */ "eY": () => (/* binding */ runPrettier)
|
492
|
+
/* harmony export */ });
|
493
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73776);
|
494
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
495
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
496
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73292);
|
497
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
|
498
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38469);
|
499
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29041);
|
500
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78818);
|
501
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_4__);
|
502
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6113);
|
503
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_5__);
|
504
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76030);
|
505
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(64795);
|
506
|
+
/* module decorator */ module = __webpack_require__.hmd(module);
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
517
|
+
async function getIsPrettierAvailable() {
|
518
|
+
var _a;
|
519
|
+
if (getIsPrettierAvailable.cache !== undefined) {
|
520
|
+
return getIsPrettierAvailable.cache;
|
521
|
+
}
|
522
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({
|
523
|
+
packageJsonFilePath: undefined
|
524
|
+
});
|
525
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesBinDirPath, "prettier");
|
526
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.stat(prettierBinPath).catch(() => undefined);
|
527
|
+
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
528
|
+
getIsPrettierAvailable.cache = isPrettierAvailable;
|
529
|
+
return isPrettierAvailable;
|
530
|
+
}
|
531
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
532
|
+
async function getPrettier() {
|
533
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(getIsPrettierAvailable());
|
534
|
+
if (getPrettier.cache !== undefined) {
|
535
|
+
return getPrettier.cache;
|
536
|
+
}
|
537
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
538
|
+
import_prettier: {
|
539
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
540
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
541
|
+
// So we do a sketchy eval to bypass ncc.
|
542
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
543
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__/* .readThisNpmPackageVersion */ .K)().startsWith("0.0.0")) {
|
544
|
+
const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({ packageJsonFilePath: undefined }), "..", "prettier"));
|
545
|
+
const isCJS = true && module.exports;
|
546
|
+
if (isCJS) {
|
547
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .r)({ prettier })} = require("${prettierDirPath}")`);
|
548
|
+
}
|
549
|
+
else {
|
550
|
+
prettier = await new Promise(_resolve => {
|
551
|
+
eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(prettierDirPath, "index.mjs").replace(/\\/g, "/")}").then(prettier => _resolve(prettier))`);
|
552
|
+
});
|
553
|
+
}
|
554
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__.is)(prettier));
|
555
|
+
break import_prettier;
|
556
|
+
}
|
557
|
+
prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 79421, 23));
|
558
|
+
}
|
559
|
+
const configHash = await (async () => {
|
560
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({ packageJsonFilePath: undefined }), "..", ".."));
|
561
|
+
if (configFilePath === null) {
|
562
|
+
return "";
|
563
|
+
}
|
564
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(configFilePath);
|
565
|
+
return crypto__WEBPACK_IMPORTED_MODULE_5__.createHash("sha256").update(data).digest("hex");
|
566
|
+
})();
|
567
|
+
const prettierAndConfig = {
|
568
|
+
prettier,
|
569
|
+
configHash
|
570
|
+
};
|
571
|
+
getPrettier.cache = prettierAndConfig;
|
572
|
+
return prettierAndConfig;
|
573
|
+
}
|
574
|
+
async function runPrettier(params) {
|
575
|
+
const { sourceCode, filePath } = params;
|
576
|
+
let formattedSourceCode;
|
577
|
+
try {
|
578
|
+
const { prettier } = await getPrettier();
|
579
|
+
const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
|
580
|
+
resolveConfig: true
|
581
|
+
});
|
582
|
+
if (ignored || inferredParser === null) {
|
583
|
+
return sourceCode;
|
584
|
+
}
|
585
|
+
const config = await prettier.resolveConfig(filePath);
|
586
|
+
formattedSourceCode = await prettier.format(typeof sourceCode === "string" ? sourceCode : sourceCode.toString("utf8"), Object.assign(Object.assign({}, config), { filePath, parser: inferredParser }));
|
587
|
+
}
|
588
|
+
catch (error) {
|
589
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_4___default().red(`You probably need to upgrade the version of prettier in your project`));
|
590
|
+
throw error;
|
591
|
+
}
|
592
|
+
return typeof sourceCode === "string"
|
593
|
+
? formattedSourceCode
|
594
|
+
: Buffer.from(formattedSourceCode, "utf8");
|
595
|
+
}
|
596
|
+
//# sourceMappingURL=runPrettier.js.map
|
597
|
+
|
598
|
+
/***/ }),
|
599
|
+
|
537
600
|
/***/ 18512:
|
538
601
|
/***/ ((module) => {
|
539
602
|
|
@@ -1103,115 +1166,6 @@ exports.withObjectValues = withObjectValues;
|
|
1103
1166
|
|
1104
1167
|
/***/ }),
|
1105
1168
|
|
1106
|
-
/***/ 50689:
|
1107
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
1108
|
-
|
1109
|
-
|
1110
|
-
var __extends = (this && this.__extends) || (function () {
|
1111
|
-
var extendStatics = function (d, b) {
|
1112
|
-
extendStatics = Object.setPrototypeOf ||
|
1113
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
1114
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
1115
|
-
return extendStatics(d, b);
|
1116
|
-
};
|
1117
|
-
return function (d, b) {
|
1118
|
-
if (typeof b !== "function" && b !== null)
|
1119
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
1120
|
-
extendStatics(d, b);
|
1121
|
-
function __() { this.constructor = d; }
|
1122
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1123
|
-
};
|
1124
|
-
})();
|
1125
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1126
|
-
exports.VoidDeferred = exports.Deferred = void 0;
|
1127
|
-
var overwriteReadonlyProp_1 = __webpack_require__(47803);
|
1128
|
-
var Deferred = /** @class */ (function () {
|
1129
|
-
function Deferred() {
|
1130
|
-
var _this_1 = this;
|
1131
|
-
this.isPending = true;
|
1132
|
-
var resolve;
|
1133
|
-
var reject;
|
1134
|
-
this.pr = new Promise(function (resolve_, reject_) {
|
1135
|
-
resolve = function (value) {
|
1136
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
1137
|
-
resolve_(value);
|
1138
|
-
};
|
1139
|
-
reject = function (error) {
|
1140
|
-
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this_1, "isPending", false);
|
1141
|
-
reject_(error);
|
1142
|
-
};
|
1143
|
-
});
|
1144
|
-
this.resolve = resolve;
|
1145
|
-
this.reject = reject;
|
1146
|
-
}
|
1147
|
-
return Deferred;
|
1148
|
-
}());
|
1149
|
-
exports.Deferred = Deferred;
|
1150
|
-
var VoidDeferred = /** @class */ (function (_super) {
|
1151
|
-
__extends(VoidDeferred, _super);
|
1152
|
-
function VoidDeferred() {
|
1153
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
1154
|
-
}
|
1155
|
-
return VoidDeferred;
|
1156
|
-
}(Deferred));
|
1157
|
-
exports.VoidDeferred = VoidDeferred;
|
1158
|
-
//# sourceMappingURL=Deferred.js.map
|
1159
|
-
|
1160
|
-
/***/ }),
|
1161
|
-
|
1162
|
-
/***/ 47803:
|
1163
|
-
/***/ (function(__unused_webpack_module, exports) {
|
1164
|
-
|
1165
|
-
|
1166
|
-
var __assign = (this && this.__assign) || function () {
|
1167
|
-
__assign = Object.assign || function(t) {
|
1168
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
1169
|
-
s = arguments[i];
|
1170
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
1171
|
-
t[p] = s[p];
|
1172
|
-
}
|
1173
|
-
return t;
|
1174
|
-
};
|
1175
|
-
return __assign.apply(this, arguments);
|
1176
|
-
};
|
1177
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1178
|
-
exports.overwriteReadonlyProp = void 0;
|
1179
|
-
/**
|
1180
|
-
* Assign a value to a property even if the object is freezed or if the property is not writable
|
1181
|
-
* Throw if the assignation fail ( for example if the property is non configurable write: false )
|
1182
|
-
* */
|
1183
|
-
var overwriteReadonlyProp = function (obj, propertyName, value) {
|
1184
|
-
try {
|
1185
|
-
obj[propertyName] = value;
|
1186
|
-
}
|
1187
|
-
catch (_a) { }
|
1188
|
-
if (obj[propertyName] === value) {
|
1189
|
-
return value;
|
1190
|
-
}
|
1191
|
-
var errorDefineProperty = undefined;
|
1192
|
-
var propertyDescriptor = Object.getOwnPropertyDescriptor(obj, propertyName) || {
|
1193
|
-
"enumerable": true,
|
1194
|
-
"configurable": true,
|
1195
|
-
};
|
1196
|
-
if (!!propertyDescriptor.get) {
|
1197
|
-
throw new Error("Probably a wrong ides to overwrite ".concat(String(propertyName), " getter"));
|
1198
|
-
}
|
1199
|
-
try {
|
1200
|
-
Object.defineProperty(obj, propertyName, __assign(__assign({}, propertyDescriptor), { value: value }));
|
1201
|
-
}
|
1202
|
-
catch (error) {
|
1203
|
-
errorDefineProperty = error;
|
1204
|
-
}
|
1205
|
-
if (obj[propertyName] !== value) {
|
1206
|
-
throw errorDefineProperty || new Error("Can't assign");
|
1207
|
-
}
|
1208
|
-
return value;
|
1209
|
-
};
|
1210
|
-
exports.overwriteReadonlyProp = overwriteReadonlyProp;
|
1211
|
-
//# sourceMappingURL=overwriteReadonlyProp.js.map
|
1212
|
-
|
1213
|
-
/***/ }),
|
1214
|
-
|
1215
1169
|
/***/ 76030:
|
1216
1170
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1217
1171
|
|