keycloakify 11.8.32 → 11.8.33
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/main.js +10 -4
- package/package.json +1 -1
- package/src/bin/shared/buildContext.ts +14 -5
- package/vite-plugin/index.js +10 -4
package/bin/main.js
CHANGED
@@ -15540,11 +15540,17 @@ function getBuildContext(params) {
|
|
15540
15540
|
if (themeSrcDirPath !== undefined) {
|
15541
15541
|
return { themeSrcDirPath };
|
15542
15542
|
}
|
15543
|
-
|
15544
|
-
|
15545
|
-
|
15543
|
+
{
|
15544
|
+
const basenames = external_fs_.readdirSync(srcDirPath);
|
15545
|
+
for (const basename of basenames) {
|
15546
|
+
const path = (0,external_path_.join)(srcDirPath, basename);
|
15547
|
+
if (!external_fs_.statSync(path).isFile()) {
|
15548
|
+
continue;
|
15549
|
+
}
|
15550
|
+
if (external_fs_.readFileSync(path).toString("utf8").includes("./kc.gen")) {
|
15551
|
+
return { themeSrcDirPath: srcDirPath };
|
15552
|
+
}
|
15546
15553
|
}
|
15547
|
-
return { themeSrcDirPath: srcDirPath };
|
15548
15554
|
}
|
15549
15555
|
console.log(source_default().red([
|
15550
15556
|
`Can't locate your Keycloak theme source directory in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), srcDirPath)}`,
|
package/package.json
CHANGED
@@ -18,7 +18,7 @@ import {
|
|
18
18
|
import type { KeycloakVersionRange } from "./KeycloakVersionRange";
|
19
19
|
import { exclude } from "tsafe";
|
20
20
|
import { crawl } from "../tools/crawl";
|
21
|
-
import {
|
21
|
+
import { KEYCLOAK_THEME, type ThemeType } from "./constants";
|
22
22
|
import { objectEntries } from "tsafe/objectEntries";
|
23
23
|
import { id } from "tsafe/id";
|
24
24
|
import chalk from "chalk";
|
@@ -166,11 +166,20 @@ export function getBuildContext(params: {
|
|
166
166
|
return { themeSrcDirPath };
|
167
167
|
}
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
|
169
|
+
{
|
170
|
+
const basenames = fs.readdirSync(srcDirPath);
|
171
|
+
|
172
|
+
for (const basename of basenames) {
|
173
|
+
const path = pathJoin(srcDirPath, basename);
|
174
|
+
|
175
|
+
if (!fs.statSync(path).isFile()) {
|
176
|
+
continue;
|
177
|
+
}
|
178
|
+
|
179
|
+
if (fs.readFileSync(path).toString("utf8").includes("./kc.gen")) {
|
180
|
+
return { themeSrcDirPath: srcDirPath };
|
181
|
+
}
|
172
182
|
}
|
173
|
-
return { themeSrcDirPath: srcDirPath };
|
174
183
|
}
|
175
184
|
|
176
185
|
console.log(
|
package/vite-plugin/index.js
CHANGED
@@ -408,11 +408,17 @@ function getBuildContext(params) {
|
|
408
408
|
if (themeSrcDirPath !== undefined) {
|
409
409
|
return { themeSrcDirPath };
|
410
410
|
}
|
411
|
-
|
412
|
-
|
413
|
-
|
411
|
+
{
|
412
|
+
const basenames = external_fs_.readdirSync(srcDirPath);
|
413
|
+
for (const basename of basenames) {
|
414
|
+
const path = (0,external_path_.join)(srcDirPath, basename);
|
415
|
+
if (!external_fs_.statSync(path).isFile()) {
|
416
|
+
continue;
|
417
|
+
}
|
418
|
+
if (external_fs_.readFileSync(path).toString("utf8").includes("./kc.gen")) {
|
419
|
+
return { themeSrcDirPath: srcDirPath };
|
420
|
+
}
|
414
421
|
}
|
415
|
-
return { themeSrcDirPath: srcDirPath };
|
416
422
|
}
|
417
423
|
console.log(source_default().red([
|
418
424
|
`Can't locate your Keycloak theme source directory in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), srcDirPath)}`,
|