@keycloakify/angular 0.1.7 → 0.1.8
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/108.index.js +91 -37
- package/bin/338.index.js +91 -37
- package/bin/{603.index.js → 398.index.js} +20 -2
- package/bin/{402.index.js → 693.index.js} +56 -2
- package/bin/758.index.js +172 -35
- package/bin/84.index.js +94 -40
- package/bin/main.js +3 -3
- package/esm2022/login/pages/info/info.component.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
- package/login/pages/info/info.component.d.ts +1 -1
- package/package.json +1 -1
- package/src/bin/tools/readThisNpmPackageVersion.ts +24 -0
- package/src/bin/tools/runPrettier.ts +24 -3
- package/src/login/pages/info/info.component.ts +1 -1
package/bin/108.index.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.modules = {
|
|
|
18
18
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
|
19
19
|
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(966);
|
|
20
20
|
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(797);
|
|
21
|
-
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
21
|
+
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(685);
|
|
22
22
|
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(316);
|
|
23
23
|
|
|
24
24
|
|
|
@@ -81,7 +81,7 @@ async function command(params) {
|
|
|
81
81
|
if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__/* .getIsPrettierAvailable */ .L)())) {
|
|
82
82
|
break run_prettier;
|
|
83
83
|
}
|
|
84
|
-
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__/* .runPrettier */ .
|
|
84
|
+
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__/* .runPrettier */ .JS)({
|
|
85
85
|
filePath: targetFilePath,
|
|
86
86
|
sourceCode: sourceCode
|
|
87
87
|
});
|
|
@@ -131,19 +131,14 @@ function getThisCodebaseRootDirPath() {
|
|
|
131
131
|
|
|
132
132
|
/***/ }),
|
|
133
133
|
|
|
134
|
-
/***/
|
|
134
|
+
/***/ 717:
|
|
135
135
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// EXTERNAL MODULE: external "path"
|
|
145
|
-
var external_path_ = __webpack_require__(928);
|
|
146
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/nodeModulesBinDirPath.js
|
|
137
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
138
|
+
/* harmony export */ p: () => (/* binding */ getNodeModulesBinDirPath)
|
|
139
|
+
/* harmony export */ });
|
|
140
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
141
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
147
142
|
|
|
148
143
|
let cache = undefined;
|
|
149
144
|
function getNodeModulesBinDirPath() {
|
|
@@ -153,7 +148,7 @@ function getNodeModulesBinDirPath() {
|
|
|
153
148
|
const binPath = process.argv[1];
|
|
154
149
|
const segments = ['.bin'];
|
|
155
150
|
let foundNodeModules = false;
|
|
156
|
-
for (const segment of binPath.split(
|
|
151
|
+
for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
|
|
157
152
|
skip_segment: {
|
|
158
153
|
if (foundNodeModules) {
|
|
159
154
|
break skip_segment;
|
|
@@ -166,56 +161,115 @@ function getNodeModulesBinDirPath() {
|
|
|
166
161
|
}
|
|
167
162
|
segments.unshift(segment);
|
|
168
163
|
}
|
|
169
|
-
const nodeModulesBinDirPath = segments.join(
|
|
164
|
+
const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
|
|
170
165
|
cache = nodeModulesBinDirPath;
|
|
171
166
|
return nodeModulesBinDirPath;
|
|
172
167
|
}
|
|
173
168
|
|
|
174
|
-
// EXTERNAL MODULE: external "fs/promises"
|
|
175
|
-
var promises_ = __webpack_require__(943);
|
|
176
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/id.mjs
|
|
177
|
-
var id = __webpack_require__(94);
|
|
178
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
|
179
|
-
var assert = __webpack_require__(966);
|
|
180
|
-
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js + 3 modules
|
|
181
|
-
var source = __webpack_require__(797);
|
|
182
|
-
// EXTERNAL MODULE: external "crypto"
|
|
183
|
-
var external_crypto_ = __webpack_require__(982);
|
|
184
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/runPrettier.js
|
|
185
169
|
|
|
170
|
+
/***/ }),
|
|
186
171
|
|
|
172
|
+
/***/ 86:
|
|
173
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
174
|
+
|
|
175
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
176
|
+
/* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
|
|
177
|
+
/* harmony export */ });
|
|
178
|
+
/* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(427);
|
|
179
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
|
|
180
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896);
|
|
181
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
|
182
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
|
|
183
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
|
187
184
|
|
|
188
185
|
|
|
189
186
|
|
|
190
187
|
|
|
188
|
+
let cache = undefined;
|
|
189
|
+
function readThisNpmPackageVersion() {
|
|
190
|
+
if (cache !== undefined) {
|
|
191
|
+
return cache;
|
|
192
|
+
}
|
|
193
|
+
const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
|
|
194
|
+
.toString('utf8'))['version'];
|
|
195
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .v)(typeof version === 'string');
|
|
196
|
+
cache = version;
|
|
197
|
+
return version;
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
|
|
192
|
-
|
|
201
|
+
/***/ }),
|
|
202
|
+
|
|
203
|
+
/***/ 685:
|
|
204
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
205
|
+
|
|
206
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
207
|
+
/* harmony export */ JS: () => (/* binding */ runPrettier),
|
|
208
|
+
/* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
|
|
209
|
+
/* harmony export */ });
|
|
210
|
+
/* unused harmony export getPrettier */
|
|
211
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(717);
|
|
212
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
213
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
214
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
|
|
215
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
|
|
216
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
|
|
217
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
|
|
218
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(797);
|
|
219
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
|
|
220
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
221
|
+
/* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
|
|
222
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(886);
|
|
223
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86);
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
193
235
|
async function getIsPrettierAvailable() {
|
|
194
236
|
var _a;
|
|
195
237
|
if (getIsPrettierAvailable.cache !== undefined) {
|
|
196
238
|
return getIsPrettierAvailable.cache;
|
|
197
239
|
}
|
|
198
|
-
const nodeModulesBinDirPath = getNodeModulesBinDirPath();
|
|
199
|
-
const prettierBinPath = (0,
|
|
200
|
-
const stats = await
|
|
240
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)();
|
|
241
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
|
|
242
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
|
|
201
243
|
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
|
202
244
|
getIsPrettierAvailable.cache = isPrettierAvailable;
|
|
203
245
|
return isPrettierAvailable;
|
|
204
246
|
}
|
|
205
|
-
getPrettier.cache = (0,
|
|
247
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
206
248
|
async function getPrettier() {
|
|
207
|
-
(0,
|
|
249
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(getIsPrettierAvailable());
|
|
208
250
|
if (getPrettier.cache !== undefined) {
|
|
209
251
|
return getPrettier.cache;
|
|
210
252
|
}
|
|
211
|
-
|
|
253
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
254
|
+
import_prettier: {
|
|
255
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
|
256
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
|
257
|
+
// So we do a sketchy eval to bypass ncc.
|
|
258
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
|
259
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
|
|
260
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .I)({ prettier })} = require("${(0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'))}")`);
|
|
261
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!(0,tsafe_is__WEBPACK_IMPORTED_MODULE_4__.is)(prettier));
|
|
262
|
+
break import_prettier;
|
|
263
|
+
}
|
|
264
|
+
prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 824, 23));
|
|
265
|
+
}
|
|
212
266
|
const configHash = await (async () => {
|
|
213
|
-
const configFilePath = await prettier.resolveConfigFile((0,
|
|
267
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..'));
|
|
214
268
|
if (configFilePath === null) {
|
|
215
269
|
return '';
|
|
216
270
|
}
|
|
217
|
-
const data = await
|
|
218
|
-
return
|
|
271
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
|
|
272
|
+
return crypto__WEBPACK_IMPORTED_MODULE_3__.createHash('sha256').update(data).digest('hex');
|
|
219
273
|
})();
|
|
220
274
|
const prettierAndConfig = {
|
|
221
275
|
prettier,
|
|
@@ -239,7 +293,7 @@ async function runPrettier(params) {
|
|
|
239
293
|
formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
|
|
240
294
|
}
|
|
241
295
|
catch (error) {
|
|
242
|
-
console.log(
|
|
296
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
|
|
243
297
|
throw error;
|
|
244
298
|
}
|
|
245
299
|
return formattedSourceCode;
|
package/bin/338.index.js
CHANGED
|
@@ -175,19 +175,14 @@ function getThisCodebaseRootDirPath() {
|
|
|
175
175
|
|
|
176
176
|
/***/ }),
|
|
177
177
|
|
|
178
|
-
/***/
|
|
178
|
+
/***/ 717:
|
|
179
179
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
// EXTERNAL MODULE: external "path"
|
|
189
|
-
var external_path_ = __webpack_require__(928);
|
|
190
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/nodeModulesBinDirPath.js
|
|
181
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
182
|
+
/* harmony export */ p: () => (/* binding */ getNodeModulesBinDirPath)
|
|
183
|
+
/* harmony export */ });
|
|
184
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
185
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
191
186
|
|
|
192
187
|
let cache = undefined;
|
|
193
188
|
function getNodeModulesBinDirPath() {
|
|
@@ -197,7 +192,7 @@ function getNodeModulesBinDirPath() {
|
|
|
197
192
|
const binPath = process.argv[1];
|
|
198
193
|
const segments = ['.bin'];
|
|
199
194
|
let foundNodeModules = false;
|
|
200
|
-
for (const segment of binPath.split(
|
|
195
|
+
for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
|
|
201
196
|
skip_segment: {
|
|
202
197
|
if (foundNodeModules) {
|
|
203
198
|
break skip_segment;
|
|
@@ -210,22 +205,66 @@ function getNodeModulesBinDirPath() {
|
|
|
210
205
|
}
|
|
211
206
|
segments.unshift(segment);
|
|
212
207
|
}
|
|
213
|
-
const nodeModulesBinDirPath = segments.join(
|
|
208
|
+
const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
|
|
214
209
|
cache = nodeModulesBinDirPath;
|
|
215
210
|
return nodeModulesBinDirPath;
|
|
216
211
|
}
|
|
217
212
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
var
|
|
228
|
-
|
|
213
|
+
|
|
214
|
+
/***/ }),
|
|
215
|
+
|
|
216
|
+
/***/ 86:
|
|
217
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
218
|
+
|
|
219
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
220
|
+
/* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
|
|
221
|
+
/* harmony export */ });
|
|
222
|
+
/* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(427);
|
|
223
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
|
|
224
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896);
|
|
225
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
|
226
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
|
|
227
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
let cache = undefined;
|
|
233
|
+
function readThisNpmPackageVersion() {
|
|
234
|
+
if (cache !== undefined) {
|
|
235
|
+
return cache;
|
|
236
|
+
}
|
|
237
|
+
const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
|
|
238
|
+
.toString('utf8'))['version'];
|
|
239
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .v)(typeof version === 'string');
|
|
240
|
+
cache = version;
|
|
241
|
+
return version;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
/***/ }),
|
|
246
|
+
|
|
247
|
+
/***/ 685:
|
|
248
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
249
|
+
|
|
250
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
251
|
+
/* harmony export */ JS: () => (/* binding */ runPrettier),
|
|
252
|
+
/* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
|
|
253
|
+
/* harmony export */ });
|
|
254
|
+
/* unused harmony export getPrettier */
|
|
255
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(717);
|
|
256
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
257
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
258
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
|
|
259
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
|
|
260
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
|
|
261
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
|
|
262
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(797);
|
|
263
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
|
|
264
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
265
|
+
/* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
|
|
266
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(886);
|
|
267
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86);
|
|
229
268
|
|
|
230
269
|
|
|
231
270
|
|
|
@@ -233,33 +272,48 @@ var external_crypto_ = __webpack_require__(982);
|
|
|
233
272
|
|
|
234
273
|
|
|
235
274
|
|
|
236
|
-
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
237
279
|
async function getIsPrettierAvailable() {
|
|
238
280
|
var _a;
|
|
239
281
|
if (getIsPrettierAvailable.cache !== undefined) {
|
|
240
282
|
return getIsPrettierAvailable.cache;
|
|
241
283
|
}
|
|
242
|
-
const nodeModulesBinDirPath = getNodeModulesBinDirPath();
|
|
243
|
-
const prettierBinPath = (0,
|
|
244
|
-
const stats = await
|
|
284
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)();
|
|
285
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
|
|
286
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
|
|
245
287
|
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
|
246
288
|
getIsPrettierAvailable.cache = isPrettierAvailable;
|
|
247
289
|
return isPrettierAvailable;
|
|
248
290
|
}
|
|
249
|
-
getPrettier.cache = (0,
|
|
291
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
250
292
|
async function getPrettier() {
|
|
251
|
-
(0,
|
|
293
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(getIsPrettierAvailable());
|
|
252
294
|
if (getPrettier.cache !== undefined) {
|
|
253
295
|
return getPrettier.cache;
|
|
254
296
|
}
|
|
255
|
-
|
|
297
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
298
|
+
import_prettier: {
|
|
299
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
|
300
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
|
301
|
+
// So we do a sketchy eval to bypass ncc.
|
|
302
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
|
303
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
|
|
304
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .I)({ prettier })} = require("${(0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'))}")`);
|
|
305
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!(0,tsafe_is__WEBPACK_IMPORTED_MODULE_4__.is)(prettier));
|
|
306
|
+
break import_prettier;
|
|
307
|
+
}
|
|
308
|
+
prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 824, 23));
|
|
309
|
+
}
|
|
256
310
|
const configHash = await (async () => {
|
|
257
|
-
const configFilePath = await prettier.resolveConfigFile((0,
|
|
311
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..'));
|
|
258
312
|
if (configFilePath === null) {
|
|
259
313
|
return '';
|
|
260
314
|
}
|
|
261
|
-
const data = await
|
|
262
|
-
return
|
|
315
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
|
|
316
|
+
return crypto__WEBPACK_IMPORTED_MODULE_3__.createHash('sha256').update(data).digest('hex');
|
|
263
317
|
})();
|
|
264
318
|
const prettierAndConfig = {
|
|
265
319
|
prettier,
|
|
@@ -283,7 +337,7 @@ async function runPrettier(params) {
|
|
|
283
337
|
formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
|
|
284
338
|
}
|
|
285
339
|
catch (error) {
|
|
286
|
-
console.log(
|
|
340
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
|
|
287
341
|
throw error;
|
|
288
342
|
}
|
|
289
343
|
return formattedSourceCode;
|
|
@@ -302,7 +356,7 @@ async function runPrettier(params) {
|
|
|
302
356
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
303
357
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
|
|
304
358
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
305
|
-
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
359
|
+
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(685);
|
|
306
360
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(982);
|
|
307
361
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);
|
|
308
362
|
|
|
@@ -441,7 +495,7 @@ async function command(params) {
|
|
|
441
495
|
if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .getIsPrettierAvailable */ .L)())) {
|
|
442
496
|
break run_prettier;
|
|
443
497
|
}
|
|
444
|
-
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .runPrettier */ .
|
|
498
|
+
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .runPrettier */ .JS)({
|
|
445
499
|
filePath,
|
|
446
500
|
sourceCode
|
|
447
501
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports.id =
|
|
3
|
-
exports.ids = [
|
|
2
|
+
exports.id = 398;
|
|
3
|
+
exports.ids = [398];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
6
|
/***/ 797:
|
|
@@ -711,6 +711,24 @@ function is(_value) {
|
|
|
711
711
|
//# sourceMappingURL=is.mjs.map
|
|
712
712
|
|
|
713
713
|
|
|
714
|
+
/***/ }),
|
|
715
|
+
|
|
716
|
+
/***/ 886:
|
|
717
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
718
|
+
|
|
719
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
720
|
+
/* harmony export */ I: () => (/* binding */ symToStr)
|
|
721
|
+
/* harmony export */ });
|
|
722
|
+
/** @see <https://docs.tsafe.dev/main/symtostr> */
|
|
723
|
+
function symToStr(wrap) {
|
|
724
|
+
// @ts-expect-error: We know better
|
|
725
|
+
return Object.keys(wrap)[0];
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
//# sourceMappingURL=symToStr.mjs.map
|
|
730
|
+
|
|
731
|
+
|
|
714
732
|
/***/ }),
|
|
715
733
|
|
|
716
734
|
/***/ 383:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports.id =
|
|
3
|
-
exports.ids = [
|
|
2
|
+
exports.id = 693;
|
|
3
|
+
exports.ids = [693];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
6
|
/***/ 672:
|
|
@@ -1244,6 +1244,60 @@ const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
|
1244
1244
|
/* harmony default export */ const source = (chalk);
|
|
1245
1245
|
|
|
1246
1246
|
|
|
1247
|
+
/***/ }),
|
|
1248
|
+
|
|
1249
|
+
/***/ 289:
|
|
1250
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1251
|
+
|
|
1252
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1253
|
+
/* harmony export */ is: () => (/* binding */ is)
|
|
1254
|
+
/* harmony export */ });
|
|
1255
|
+
/* harmony import */ var _zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
1259
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1260
|
+
const errorMessage = [
|
|
1261
|
+
`Wrong usage of the ${is.name} function refer to`,
|
|
1262
|
+
`https://docs.tsafe.dev/${is.name.toLowerCase()}`,
|
|
1263
|
+
].join(" ");
|
|
1264
|
+
function is(_value) {
|
|
1265
|
+
const ref = {};
|
|
1266
|
+
if (_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref !== undefined) {
|
|
1267
|
+
_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref = undefined;
|
|
1268
|
+
throw new Error(errorMessage);
|
|
1269
|
+
}
|
|
1270
|
+
_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref = ref;
|
|
1271
|
+
Promise.resolve().then(() => {
|
|
1272
|
+
if (_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref === ref) {
|
|
1273
|
+
throw new Error(errorMessage);
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
return null;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
//# sourceMappingURL=is.mjs.map
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
/***/ }),
|
|
1284
|
+
|
|
1285
|
+
/***/ 886:
|
|
1286
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1287
|
+
|
|
1288
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1289
|
+
/* harmony export */ I: () => (/* binding */ symToStr)
|
|
1290
|
+
/* harmony export */ });
|
|
1291
|
+
/** @see <https://docs.tsafe.dev/main/symtostr> */
|
|
1292
|
+
function symToStr(wrap) {
|
|
1293
|
+
// @ts-expect-error: We know better
|
|
1294
|
+
return Object.keys(wrap)[0];
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
//# sourceMappingURL=symToStr.mjs.map
|
|
1299
|
+
|
|
1300
|
+
|
|
1247
1301
|
/***/ })
|
|
1248
1302
|
|
|
1249
1303
|
};
|
package/bin/758.index.js
CHANGED
|
@@ -3,19 +3,43 @@ exports.id = 758;
|
|
|
3
3
|
exports.ids = [758];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 427:
|
|
7
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
8
|
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
|
|
13
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
14
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
|
|
15
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
9
16
|
|
|
10
|
-
// EXPORTS
|
|
11
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
L: () => (/* binding */ getIsPrettierAvailable),
|
|
13
|
-
J: () => (/* binding */ runPrettier)
|
|
14
|
-
});
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
function getThisCodebaseRootDirPath_rec(dirPath) {
|
|
19
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
|
|
20
|
+
return dirPath;
|
|
21
|
+
}
|
|
22
|
+
return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
|
|
23
|
+
}
|
|
24
|
+
let result = undefined;
|
|
25
|
+
function getThisCodebaseRootDirPath() {
|
|
26
|
+
if (result !== undefined) {
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
return (result = getThisCodebaseRootDirPath_rec(__dirname));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/***/ }),
|
|
34
|
+
|
|
35
|
+
/***/ 717:
|
|
36
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
37
|
+
|
|
38
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39
|
+
/* harmony export */ p: () => (/* binding */ getNodeModulesBinDirPath)
|
|
40
|
+
/* harmony export */ });
|
|
41
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
42
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
19
43
|
|
|
20
44
|
let cache = undefined;
|
|
21
45
|
function getNodeModulesBinDirPath() {
|
|
@@ -25,7 +49,7 @@ function getNodeModulesBinDirPath() {
|
|
|
25
49
|
const binPath = process.argv[1];
|
|
26
50
|
const segments = ['.bin'];
|
|
27
51
|
let foundNodeModules = false;
|
|
28
|
-
for (const segment of binPath.split(
|
|
52
|
+
for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
|
|
29
53
|
skip_segment: {
|
|
30
54
|
if (foundNodeModules) {
|
|
31
55
|
break skip_segment;
|
|
@@ -38,22 +62,68 @@ function getNodeModulesBinDirPath() {
|
|
|
38
62
|
}
|
|
39
63
|
segments.unshift(segment);
|
|
40
64
|
}
|
|
41
|
-
const nodeModulesBinDirPath = segments.join(
|
|
65
|
+
const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
|
|
42
66
|
cache = nodeModulesBinDirPath;
|
|
43
67
|
return nodeModulesBinDirPath;
|
|
44
68
|
}
|
|
45
69
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
70
|
+
|
|
71
|
+
/***/ }),
|
|
72
|
+
|
|
73
|
+
/***/ 86:
|
|
74
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
75
|
+
|
|
76
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
77
|
+
/* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
|
|
78
|
+
/* harmony export */ });
|
|
79
|
+
/* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(427);
|
|
80
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
|
|
81
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896);
|
|
82
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
|
83
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
|
|
84
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
let cache = undefined;
|
|
90
|
+
function readThisNpmPackageVersion() {
|
|
91
|
+
if (cache !== undefined) {
|
|
92
|
+
return cache;
|
|
93
|
+
}
|
|
94
|
+
const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
|
|
95
|
+
.toString('utf8'))['version'];
|
|
96
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .v)(typeof version === 'string');
|
|
97
|
+
cache = version;
|
|
98
|
+
return version;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/***/ }),
|
|
103
|
+
|
|
104
|
+
/***/ 685:
|
|
105
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
106
|
+
|
|
107
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
108
|
+
/* harmony export */ JS: () => (/* binding */ runPrettier),
|
|
109
|
+
/* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
|
|
110
|
+
/* harmony export */ });
|
|
111
|
+
/* unused harmony export getPrettier */
|
|
112
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(717);
|
|
113
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
114
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
115
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
|
|
116
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
|
|
117
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
|
|
118
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
|
|
119
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(797);
|
|
120
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
|
|
121
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
122
|
+
/* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
|
|
123
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(886);
|
|
124
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86);
|
|
125
|
+
|
|
126
|
+
|
|
57
127
|
|
|
58
128
|
|
|
59
129
|
|
|
@@ -61,33 +131,46 @@ var external_crypto_ = __webpack_require__(982);
|
|
|
61
131
|
|
|
62
132
|
|
|
63
133
|
|
|
64
|
-
|
|
134
|
+
|
|
135
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
65
136
|
async function getIsPrettierAvailable() {
|
|
66
137
|
var _a;
|
|
67
138
|
if (getIsPrettierAvailable.cache !== undefined) {
|
|
68
139
|
return getIsPrettierAvailable.cache;
|
|
69
140
|
}
|
|
70
|
-
const nodeModulesBinDirPath = getNodeModulesBinDirPath();
|
|
71
|
-
const prettierBinPath = (0,
|
|
72
|
-
const stats = await
|
|
141
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)();
|
|
142
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
|
|
143
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
|
|
73
144
|
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
|
74
145
|
getIsPrettierAvailable.cache = isPrettierAvailable;
|
|
75
146
|
return isPrettierAvailable;
|
|
76
147
|
}
|
|
77
|
-
getPrettier.cache = (0,
|
|
148
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
78
149
|
async function getPrettier() {
|
|
79
|
-
(0,
|
|
150
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(getIsPrettierAvailable());
|
|
80
151
|
if (getPrettier.cache !== undefined) {
|
|
81
152
|
return getPrettier.cache;
|
|
82
153
|
}
|
|
83
|
-
|
|
154
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
155
|
+
import_prettier: {
|
|
156
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
|
157
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
|
158
|
+
// So we do a sketchy eval to bypass ncc.
|
|
159
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
|
160
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
|
|
161
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .I)({ prettier })} = require("${(0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'))}")`);
|
|
162
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!(0,tsafe_is__WEBPACK_IMPORTED_MODULE_4__.is)(prettier));
|
|
163
|
+
break import_prettier;
|
|
164
|
+
}
|
|
165
|
+
prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 824, 23));
|
|
166
|
+
}
|
|
84
167
|
const configHash = await (async () => {
|
|
85
|
-
const configFilePath = await prettier.resolveConfigFile((0,
|
|
168
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..'));
|
|
86
169
|
if (configFilePath === null) {
|
|
87
170
|
return '';
|
|
88
171
|
}
|
|
89
|
-
const data = await
|
|
90
|
-
return
|
|
172
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
|
|
173
|
+
return crypto__WEBPACK_IMPORTED_MODULE_3__.createHash('sha256').update(data).digest('hex');
|
|
91
174
|
})();
|
|
92
175
|
const prettierAndConfig = {
|
|
93
176
|
prettier,
|
|
@@ -111,7 +194,7 @@ async function runPrettier(params) {
|
|
|
111
194
|
formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
|
|
112
195
|
}
|
|
113
196
|
catch (error) {
|
|
114
|
-
console.log(
|
|
197
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
|
|
115
198
|
throw error;
|
|
116
199
|
}
|
|
117
200
|
return formattedSourceCode;
|
|
@@ -130,7 +213,7 @@ async function runPrettier(params) {
|
|
|
130
213
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
131
214
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
|
|
132
215
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
133
|
-
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
216
|
+
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(685);
|
|
134
217
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(982);
|
|
135
218
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);
|
|
136
219
|
|
|
@@ -269,7 +352,7 @@ async function command(params) {
|
|
|
269
352
|
if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .getIsPrettierAvailable */ .L)())) {
|
|
270
353
|
break run_prettier;
|
|
271
354
|
}
|
|
272
|
-
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .runPrettier */ .
|
|
355
|
+
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_3__/* .runPrettier */ .JS)({
|
|
273
356
|
filePath,
|
|
274
357
|
sourceCode
|
|
275
358
|
});
|
|
@@ -952,6 +1035,60 @@ const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
|
952
1035
|
/* harmony default export */ const source = (chalk);
|
|
953
1036
|
|
|
954
1037
|
|
|
1038
|
+
/***/ }),
|
|
1039
|
+
|
|
1040
|
+
/***/ 289:
|
|
1041
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1042
|
+
|
|
1043
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1044
|
+
/* harmony export */ is: () => (/* binding */ is)
|
|
1045
|
+
/* harmony export */ });
|
|
1046
|
+
/* harmony import */ var _zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
1050
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1051
|
+
const errorMessage = [
|
|
1052
|
+
`Wrong usage of the ${is.name} function refer to`,
|
|
1053
|
+
`https://docs.tsafe.dev/${is.name.toLowerCase()}`,
|
|
1054
|
+
].join(" ");
|
|
1055
|
+
function is(_value) {
|
|
1056
|
+
const ref = {};
|
|
1057
|
+
if (_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref !== undefined) {
|
|
1058
|
+
_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref = undefined;
|
|
1059
|
+
throw new Error(errorMessage);
|
|
1060
|
+
}
|
|
1061
|
+
_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref = ref;
|
|
1062
|
+
Promise.resolve().then(() => {
|
|
1063
|
+
if (_zz_internal_assertIsRefWrapper_mjs__WEBPACK_IMPORTED_MODULE_0__/* .assertIsRefWrapper */ .Z.ref === ref) {
|
|
1064
|
+
throw new Error(errorMessage);
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
return null;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
//# sourceMappingURL=is.mjs.map
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
/***/ }),
|
|
1075
|
+
|
|
1076
|
+
/***/ 886:
|
|
1077
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1078
|
+
|
|
1079
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1080
|
+
/* harmony export */ I: () => (/* binding */ symToStr)
|
|
1081
|
+
/* harmony export */ });
|
|
1082
|
+
/** @see <https://docs.tsafe.dev/main/symtostr> */
|
|
1083
|
+
function symToStr(wrap) {
|
|
1084
|
+
// @ts-expect-error: We know better
|
|
1085
|
+
return Object.keys(wrap)[0];
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
//# sourceMappingURL=symToStr.mjs.map
|
|
1090
|
+
|
|
1091
|
+
|
|
955
1092
|
/***/ })
|
|
956
1093
|
|
|
957
1094
|
};
|
package/bin/84.index.js
CHANGED
|
@@ -257,8 +257,8 @@ function replaceAll(string, searchValue, replaceValue) {
|
|
|
257
257
|
return string.replace(regexFromString, replaceValue);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
// EXTERNAL MODULE: ./dist/bin/tools/runPrettier.js
|
|
261
|
-
var runPrettier = __webpack_require__(
|
|
260
|
+
// EXTERNAL MODULE: ./dist/bin/tools/runPrettier.js
|
|
261
|
+
var runPrettier = __webpack_require__(685);
|
|
262
262
|
;// CONCATENATED MODULE: ./dist/bin/eject-page.js
|
|
263
263
|
|
|
264
264
|
|
|
@@ -363,7 +363,7 @@ async function command(params) {
|
|
|
363
363
|
if (!(await (0,runPrettier/* getIsPrettierAvailable */.L)())) {
|
|
364
364
|
break run_prettier;
|
|
365
365
|
}
|
|
366
|
-
modifiedSourceCode_str = await (0,runPrettier/* runPrettier */.
|
|
366
|
+
modifiedSourceCode_str = await (0,runPrettier/* runPrettier */.JS)({
|
|
367
367
|
filePath: (0,external_path_.join)(destDirPath, fileRelativePath),
|
|
368
368
|
sourceCode: modifiedSourceCode_str
|
|
369
369
|
});
|
|
@@ -403,7 +403,7 @@ async function command(params) {
|
|
|
403
403
|
if (!(await (0,runPrettier/* getIsPrettierAvailable */.L)())) {
|
|
404
404
|
break run_prettier;
|
|
405
405
|
}
|
|
406
|
-
modifiedSourceCode_str = await (0,runPrettier/* runPrettier */.
|
|
406
|
+
modifiedSourceCode_str = await (0,runPrettier/* runPrettier */.JS)({
|
|
407
407
|
filePath: (0,external_path_.join)(destDirPath, fileRelativePath),
|
|
408
408
|
sourceCode: modifiedSourceCode_str
|
|
409
409
|
});
|
|
@@ -434,7 +434,7 @@ async function command(params) {
|
|
|
434
434
|
if (!(await (0,runPrettier/* getIsPrettierAvailable */.L)())) {
|
|
435
435
|
break run_prettier;
|
|
436
436
|
}
|
|
437
|
-
sourceCode = await (0,runPrettier/* runPrettier */.
|
|
437
|
+
sourceCode = await (0,runPrettier/* runPrettier */.JS)({
|
|
438
438
|
filePath: kcAppTsFilePath,
|
|
439
439
|
sourceCode
|
|
440
440
|
});
|
|
@@ -545,19 +545,14 @@ function getThisCodebaseRootDirPath() {
|
|
|
545
545
|
|
|
546
546
|
/***/ }),
|
|
547
547
|
|
|
548
|
-
/***/
|
|
548
|
+
/***/ 717:
|
|
549
549
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
550
550
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
// EXTERNAL MODULE: external "path"
|
|
559
|
-
var external_path_ = __webpack_require__(928);
|
|
560
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/nodeModulesBinDirPath.js
|
|
551
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
552
|
+
/* harmony export */ p: () => (/* binding */ getNodeModulesBinDirPath)
|
|
553
|
+
/* harmony export */ });
|
|
554
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
555
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
561
556
|
|
|
562
557
|
let cache = undefined;
|
|
563
558
|
function getNodeModulesBinDirPath() {
|
|
@@ -567,7 +562,7 @@ function getNodeModulesBinDirPath() {
|
|
|
567
562
|
const binPath = process.argv[1];
|
|
568
563
|
const segments = ['.bin'];
|
|
569
564
|
let foundNodeModules = false;
|
|
570
|
-
for (const segment of binPath.split(
|
|
565
|
+
for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
|
|
571
566
|
skip_segment: {
|
|
572
567
|
if (foundNodeModules) {
|
|
573
568
|
break skip_segment;
|
|
@@ -580,56 +575,115 @@ function getNodeModulesBinDirPath() {
|
|
|
580
575
|
}
|
|
581
576
|
segments.unshift(segment);
|
|
582
577
|
}
|
|
583
|
-
const nodeModulesBinDirPath = segments.join(
|
|
578
|
+
const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
|
|
584
579
|
cache = nodeModulesBinDirPath;
|
|
585
580
|
return nodeModulesBinDirPath;
|
|
586
581
|
}
|
|
587
582
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
var
|
|
598
|
-
|
|
583
|
+
|
|
584
|
+
/***/ }),
|
|
585
|
+
|
|
586
|
+
/***/ 86:
|
|
587
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
588
|
+
|
|
589
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
590
|
+
/* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
|
|
591
|
+
/* harmony export */ });
|
|
592
|
+
/* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(427);
|
|
593
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
|
|
594
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896);
|
|
595
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
|
596
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
|
|
597
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
|
|
598
|
+
|
|
599
599
|
|
|
600
600
|
|
|
601
601
|
|
|
602
|
+
let cache = undefined;
|
|
603
|
+
function readThisNpmPackageVersion() {
|
|
604
|
+
if (cache !== undefined) {
|
|
605
|
+
return cache;
|
|
606
|
+
}
|
|
607
|
+
const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
|
|
608
|
+
.toString('utf8'))['version'];
|
|
609
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .v)(typeof version === 'string');
|
|
610
|
+
cache = version;
|
|
611
|
+
return version;
|
|
612
|
+
}
|
|
602
613
|
|
|
603
614
|
|
|
615
|
+
/***/ }),
|
|
616
|
+
|
|
617
|
+
/***/ 685:
|
|
618
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
619
|
+
|
|
620
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
621
|
+
/* harmony export */ JS: () => (/* binding */ runPrettier),
|
|
622
|
+
/* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
|
|
623
|
+
/* harmony export */ });
|
|
624
|
+
/* unused harmony export getPrettier */
|
|
625
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(717);
|
|
626
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
|
|
627
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
628
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
|
|
629
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
|
|
630
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
|
|
631
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(966);
|
|
632
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(797);
|
|
633
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982);
|
|
634
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
635
|
+
/* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(289);
|
|
636
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(886);
|
|
637
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86);
|
|
604
638
|
|
|
605
639
|
|
|
606
|
-
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
607
649
|
async function getIsPrettierAvailable() {
|
|
608
650
|
var _a;
|
|
609
651
|
if (getIsPrettierAvailable.cache !== undefined) {
|
|
610
652
|
return getIsPrettierAvailable.cache;
|
|
611
653
|
}
|
|
612
|
-
const nodeModulesBinDirPath = getNodeModulesBinDirPath();
|
|
613
|
-
const prettierBinPath = (0,
|
|
614
|
-
const stats = await
|
|
654
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)();
|
|
655
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
|
|
656
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
|
|
615
657
|
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
|
616
658
|
getIsPrettierAvailable.cache = isPrettierAvailable;
|
|
617
659
|
return isPrettierAvailable;
|
|
618
660
|
}
|
|
619
|
-
getPrettier.cache = (0,
|
|
661
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
620
662
|
async function getPrettier() {
|
|
621
|
-
(0,
|
|
663
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(getIsPrettierAvailable());
|
|
622
664
|
if (getPrettier.cache !== undefined) {
|
|
623
665
|
return getPrettier.cache;
|
|
624
666
|
}
|
|
625
|
-
|
|
667
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(undefined);
|
|
668
|
+
import_prettier: {
|
|
669
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
|
670
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
|
671
|
+
// So we do a sketchy eval to bypass ncc.
|
|
672
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
|
673
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_7__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
|
|
674
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .I)({ prettier })} = require("${(0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'))}")`);
|
|
675
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!(0,tsafe_is__WEBPACK_IMPORTED_MODULE_4__.is)(prettier));
|
|
676
|
+
break import_prettier;
|
|
677
|
+
}
|
|
678
|
+
prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 824, 23));
|
|
679
|
+
}
|
|
626
680
|
const configHash = await (async () => {
|
|
627
|
-
const configFilePath = await prettier.resolveConfigFile((0,
|
|
681
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getNodeModulesBinDirPath */ .p)(), '..'));
|
|
628
682
|
if (configFilePath === null) {
|
|
629
683
|
return '';
|
|
630
684
|
}
|
|
631
|
-
const data = await
|
|
632
|
-
return
|
|
685
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
|
|
686
|
+
return crypto__WEBPACK_IMPORTED_MODULE_3__.createHash('sha256').update(data).digest('hex');
|
|
633
687
|
})();
|
|
634
688
|
const prettierAndConfig = {
|
|
635
689
|
prettier,
|
|
@@ -653,7 +707,7 @@ async function runPrettier(params) {
|
|
|
653
707
|
formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
|
|
654
708
|
}
|
|
655
709
|
catch (error) {
|
|
656
|
-
console.log(
|
|
710
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
|
|
657
711
|
throw error;
|
|
658
712
|
}
|
|
659
713
|
return formattedSourceCode;
|
package/bin/main.js
CHANGED
|
@@ -494,13 +494,13 @@ const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
|
|
|
494
494
|
switch (commandName) {
|
|
495
495
|
case 'add-story':
|
|
496
496
|
{
|
|
497
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
|
497
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(693), __nccwpck_require__.e(108)]).then(__nccwpck_require__.bind(__nccwpck_require__, 108));
|
|
498
498
|
command({ buildContext });
|
|
499
499
|
}
|
|
500
500
|
return;
|
|
501
501
|
case 'eject-page':
|
|
502
502
|
{
|
|
503
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
|
503
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(693), __nccwpck_require__.e(84)]).then(__nccwpck_require__.bind(__nccwpck_require__, 84));
|
|
504
504
|
command({ buildContext });
|
|
505
505
|
}
|
|
506
506
|
return;
|
|
@@ -512,7 +512,7 @@ const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
|
|
|
512
512
|
return;
|
|
513
513
|
case 'initialize-account-theme':
|
|
514
514
|
{
|
|
515
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
|
515
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(398), __nccwpck_require__.e(338)]).then(__nccwpck_require__.bind(__nccwpck_require__, 338));
|
|
516
516
|
command({ buildContext });
|
|
517
517
|
}
|
|
518
518
|
return;
|
|
@@ -30,7 +30,7 @@ export class InfoComponent extends ComponentReference {
|
|
|
30
30
|
return html;
|
|
31
31
|
}
|
|
32
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InfoComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: InfoComponent, isStandalone: true, selector: "kc
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: InfoComponent, isStandalone: true, selector: "kc-info", providers: [
|
|
34
34
|
{
|
|
35
35
|
provide: ComponentReference,
|
|
36
36
|
useExisting: forwardRef(() => InfoComponent)
|
|
@@ -39,11 +39,11 @@ export class InfoComponent extends ComponentReference {
|
|
|
39
39
|
}
|
|
40
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InfoComponent, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
|
-
args: [{ standalone: true, imports: [KcSanitizePipe], selector: 'kc
|
|
42
|
+
args: [{ standalone: true, imports: [KcSanitizePipe], selector: 'kc-info', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
43
43
|
{
|
|
44
44
|
provide: ComponentReference,
|
|
45
45
|
useExisting: forwardRef(() => InfoComponent)
|
|
46
46
|
}
|
|
47
47
|
], template: "@let skipLink = kcContext.skipLink;\n@let actionUri = kcContext.actionUri;\n@let pageRedirectUri = kcContext.pageRedirectUri;\n@let client = kcContext.client;\n\n<ng-template #headerNode>\n @let messageHeader = kcContext.messageHeader;\n @let message = kcContext.message;\n <span [innerHTML]=\"messageHeader ?? i18n.advancedMsgStr(message.summary) | kcSanitize: 'html'\"> </span>\n</ng-template>\n<div id=\"kc-info-message\">\n <p\n class=\"instruction\"\n [innerHTML]=\"infoMessage | kcSanitize: 'html'\"\n ></p>\n @if (!skipLink) {\n @if (pageRedirectUri) {\n <p>\n <a\n [href]=\"pageRedirectUri\"\n [innerHTML]=\"i18n.msgStr('backToApplication') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n @if (actionUri) {\n <p>\n <a\n [href]=\"actionUri\"\n [innerHTML]=\"i18n.msgStr('proceedWithAction') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n @if (client.baseUrl) {\n <p>\n <a\n [href]=\"client.baseUrl\"\n [innerHTML]=\"i18n.msgStr('backToApplication') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n }\n</div>\n" }]
|
|
48
48
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AgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8L2E+XG4gICAgICAgICAgICA8L3A+XG4gICAgICAgIH1cbiAgICAgICAgQGlmIChhY3Rpb25VcmkpIHtcbiAgICAgICAgICAgIDxwPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICAgIFtocmVmXT1cImFjdGlvblVyaVwiXG4gICAgICAgICAgICAgICAgICAgIFtpbm5lckhUTUxdPVwiaTE4bi5tc2dTdHIoJ3Byb2NlZWRXaXRoQWN0aW9uJykgfCBrY1Nhbml0aXplOiAnaHRtbCdcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8L2E+XG4gICAgICAgICAgICA8L3A+XG4gICAgICAgIH1cbiAgICAgICAgQGlmIChjbGllbnQuYmFzZVVybCkge1xuICAgICAgICAgICAgPHA+XG4gICAgICAgICAgICAgICAgPGFcbiAgICAgICAgICAgICAgICAgICAgW2hyZWZdPVwiY2xpZW50LmJhc2VVcmxcIlxuICAgICAgICAgICAgICAgICAgICBbaW5uZXJIVE1MXT1cImkxOG4ubXNnU3RyKCdiYWNrVG9BcHBsaWNhdGlvbicpIHwga2NTYW5pdGl6ZTogJ2h0bWwnXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgPC9wPlxuICAgICAgICB9XG4gICAgfVxuPC9kaXY+XG4iXX0=
|
|
@@ -31,7 +31,7 @@ class InfoComponent extends ComponentReference {
|
|
|
31
31
|
return html;
|
|
32
32
|
}
|
|
33
33
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InfoComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: InfoComponent, isStandalone: true, selector: "kc
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: InfoComponent, isStandalone: true, selector: "kc-info", providers: [
|
|
35
35
|
{
|
|
36
36
|
provide: ComponentReference,
|
|
37
37
|
useExisting: forwardRef(() => InfoComponent)
|
|
@@ -40,7 +40,7 @@ class InfoComponent extends ComponentReference {
|
|
|
40
40
|
}
|
|
41
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InfoComponent, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
|
-
args: [{ standalone: true, imports: [KcSanitizePipe], selector: 'kc
|
|
43
|
+
args: [{ standalone: true, imports: [KcSanitizePipe], selector: 'kc-info', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
44
44
|
{
|
|
45
45
|
provide: ComponentReference,
|
|
46
46
|
useExisting: forwardRef(() => InfoComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-pages-info.mjs","sources":["../../src/login/pages/info/info.component.ts","../../src/login/pages/info/info.component.html","../../src/login/pages/info/keycloakify-angular-login-pages-info.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n standalone: true,\n imports: [KcSanitizePipe],\n selector: 'kc
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-pages-info.mjs","sources":["../../src/login/pages/info/info.component.ts","../../src/login/pages/info/info.component.html","../../src/login/pages/info/keycloakify-angular-login-pages-info.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n standalone: true,\n imports: [KcSanitizePipe],\n selector: 'kc-info',\n templateUrl: 'info.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => InfoComponent)\n }\n ]\n})\nexport class InfoComponent extends ComponentReference {\n kcContext = inject<Extract<KcContext, { pageId: 'info.ftl' }>>(KC_LOGIN_CONTEXT);\n i18n = inject<I18n>(LOGIN_I18N);\n\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n documentTitle: string | undefined;\n bodyClassName: string | undefined;\n\n displayRequiredFields = false;\n displayInfo = false;\n displayMessage = false;\n\n headerNode = viewChild<TemplateRef<HTMLElement>>('headerNode');\n infoNode = viewChild<TemplateRef<HTMLElement>>('infoNode');\n socialProvidersNode = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');\n\n get infoMessage() {\n let html = this.kcContext.message.summary;\n if (this.kcContext.requiredActions) {\n html += '<b>';\n\n html += this.kcContext.requiredActions.map(requiredAction => this.i18n.advancedMsgStr(`requiredAction.${requiredAction}`)).join(', ');\n\n html += '</b>';\n }\n return html;\n }\n}\n","@let skipLink = kcContext.skipLink;\n@let actionUri = kcContext.actionUri;\n@let pageRedirectUri = kcContext.pageRedirectUri;\n@let client = kcContext.client;\n\n<ng-template #headerNode>\n @let messageHeader = kcContext.messageHeader;\n @let message = kcContext.message;\n <span [innerHTML]=\"messageHeader ?? i18n.advancedMsgStr(message.summary) | kcSanitize: 'html'\"> </span>\n</ng-template>\n<div id=\"kc-info-message\">\n <p\n class=\"instruction\"\n [innerHTML]=\"infoMessage | kcSanitize: 'html'\"\n ></p>\n @if (!skipLink) {\n @if (pageRedirectUri) {\n <p>\n <a\n [href]=\"pageRedirectUri\"\n [innerHTML]=\"i18n.msgStr('backToApplication') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n @if (actionUri) {\n <p>\n <a\n [href]=\"actionUri\"\n [innerHTML]=\"i18n.msgStr('proceedWithAction') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n @if (client.baseUrl) {\n <p>\n <a\n [href]=\"client.baseUrl\"\n [innerHTML]=\"i18n.msgStr('backToApplication') | kcSanitize: 'html'\"\n >\n </a>\n </p>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAwBM,MAAO,aAAc,SAAQ,kBAAkB,CAAA;AAbrD,IAAA,WAAA,GAAA;;AAcI,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAA6C,gBAAgB,CAAC;AAChF,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;AAEtB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC;QAK3E,IAAqB,CAAA,qBAAA,GAAG,KAAK;QAC7B,IAAW,CAAA,WAAA,GAAG,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A,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,qBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+3CA6CA,uCDhCc,cAAc,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAWf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,SAAS;iCACM,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,QAAA,EACf,SAAS,EAEF,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,mBAAmB;AAC9C;AACJ,qBAAA,EAAA,QAAA,EAAA,+3CAAA,EAAA;;;AEtBL;;AAEG;;;;"}
|
|
@@ -19,5 +19,5 @@ export declare class InfoComponent extends ComponentReference {
|
|
|
19
19
|
socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
20
20
|
get infoMessage(): string;
|
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<InfoComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "kc
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "kc-info", never, {}, {}, never, never, true, never>;
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getThisCodebaseRootDirPath } from './getThisCodebaseRootDirPath';
|
|
2
|
+
import { assert } from 'tsafe/assert';
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
import { join as pathJoin } from 'path';
|
|
5
|
+
|
|
6
|
+
let cache: string | undefined = undefined;
|
|
7
|
+
|
|
8
|
+
export function readThisNpmPackageVersion(): string {
|
|
9
|
+
if (cache !== undefined) {
|
|
10
|
+
return cache;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const version = JSON.parse(
|
|
14
|
+
fs
|
|
15
|
+
.readFileSync(pathJoin(getThisCodebaseRootDirPath(), 'package.json'))
|
|
16
|
+
.toString('utf8')
|
|
17
|
+
)['version'];
|
|
18
|
+
|
|
19
|
+
assert(typeof version === 'string');
|
|
20
|
+
|
|
21
|
+
cache = version;
|
|
22
|
+
|
|
23
|
+
return version;
|
|
24
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { getNodeModulesBinDirPath } from './nodeModulesBinDirPath';
|
|
2
|
-
import { join as pathJoin } from 'path';
|
|
2
|
+
import { join as pathJoin, resolve as pathResolve } from 'path';
|
|
3
3
|
import * as fsPr from 'fs/promises';
|
|
4
4
|
import { id } from 'tsafe/id';
|
|
5
5
|
import { assert } from 'tsafe/assert';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import * as crypto from 'crypto';
|
|
8
|
+
import { is } from 'tsafe/is';
|
|
9
|
+
import { symToStr } from 'tsafe/symToStr';
|
|
10
|
+
import { readThisNpmPackageVersion } from './readThisNpmPackageVersion';
|
|
8
11
|
|
|
9
12
|
getIsPrettierAvailable.cache = id<boolean | undefined>(undefined);
|
|
10
13
|
|
|
@@ -33,14 +36,32 @@ type PrettierAndConfigHash = {
|
|
|
33
36
|
|
|
34
37
|
getPrettier.cache = id<PrettierAndConfigHash | undefined>(undefined);
|
|
35
38
|
|
|
36
|
-
async function getPrettier(): Promise<PrettierAndConfigHash> {
|
|
39
|
+
export async function getPrettier(): Promise<PrettierAndConfigHash> {
|
|
37
40
|
assert(getIsPrettierAvailable());
|
|
38
41
|
|
|
39
42
|
if (getPrettier.cache !== undefined) {
|
|
40
43
|
return getPrettier.cache;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
let prettier = id<typeof import('prettier') | undefined>(undefined);
|
|
47
|
+
|
|
48
|
+
import_prettier: {
|
|
49
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
|
50
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
|
51
|
+
// So we do a sketchy eval to bypass ncc.
|
|
52
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
|
53
|
+
if (readThisNpmPackageVersion().startsWith('0.0.0')) {
|
|
54
|
+
eval(
|
|
55
|
+
`${symToStr({ prettier })} = require("${pathResolve(pathJoin(getNodeModulesBinDirPath(), '..', 'prettier'))}")`
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
assert(!is<undefined>(prettier));
|
|
59
|
+
|
|
60
|
+
break import_prettier;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
prettier = await import('prettier');
|
|
64
|
+
}
|
|
44
65
|
|
|
45
66
|
const configHash = await (async () => {
|
|
46
67
|
const configFilePath = await prettier.resolveConfigFile(
|
|
@@ -12,7 +12,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
|
12
12
|
@Component({
|
|
13
13
|
standalone: true,
|
|
14
14
|
imports: [KcSanitizePipe],
|
|
15
|
-
selector: 'kc
|
|
15
|
+
selector: 'kc-info',
|
|
16
16
|
templateUrl: 'info.component.html',
|
|
17
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
18
|
providers: [
|