keycloakify 11.9.3 → 11.9.5
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/375.index.js
CHANGED
package/bin/712.index.js
CHANGED
@@ -1240,7 +1240,12 @@ async function generateResources(params) {
|
|
1240
1240
|
});
|
1241
1241
|
}
|
1242
1242
|
generate_theme_properties: {
|
1243
|
+
const getEnvironmentVariableLines = (environmentVariables) => environmentVariables.map(({ name, default: defaultValue }) => `${name}=\${env.${name}:${(0,escapeStringForPropertiesFile/* escapeStringForPropertiesFile */.y)(defaultValue)}}`);
|
1243
1244
|
if (isNative) {
|
1245
|
+
external_fs_default().writeFileSync((0,external_path_.join)(themeTypeDirPath, "theme.properties"), Buffer.from([
|
1246
|
+
external_fs_default().readFileSync((0,external_path_.join)(themeTypeDirPath, "theme.properties")),
|
1247
|
+
...getEnvironmentVariableLines(buildContext.environmentVariables)
|
1248
|
+
].join("\n\n"), "utf8"));
|
1244
1249
|
break generate_theme_properties;
|
1245
1250
|
}
|
1246
1251
|
(0,assert/* assert */.h)(themeType !== "email");
|
@@ -1267,10 +1272,10 @@ async function generateResources(params) {
|
|
1267
1272
|
? ["deprecatedMode=false"]
|
1268
1273
|
: []),
|
1269
1274
|
...((_a = buildContext.extraThemeProperties) !== null && _a !== void 0 ? _a : []),
|
1270
|
-
...[
|
1275
|
+
...getEnvironmentVariableLines([
|
1271
1276
|
...buildContext.environmentVariables,
|
1272
1277
|
{ name: constants/* KEYCLOAKIFY_SPA_DEV_SERVER_PORT */.Sz, default: "" }
|
1273
|
-
]
|
1278
|
+
]),
|
1274
1279
|
...(languageTags === undefined
|
1275
1280
|
? []
|
1276
1281
|
: [`locales=${languageTags.join(",")}`])
|
@@ -1324,6 +1329,7 @@ async function generateResources(params) {
|
|
1324
1329
|
}
|
1325
1330
|
return { modifiedSourceCode: sourceCode };
|
1326
1331
|
}
|
1332
|
+
//TODO: Env var
|
1327
1333
|
});
|
1328
1334
|
}
|
1329
1335
|
run_writeMessagePropertiesFiles: {
|
package/package.json
CHANGED
@@ -655,7 +655,29 @@ export async function generateResources(params: {
|
|
655
655
|
}
|
656
656
|
|
657
657
|
generate_theme_properties: {
|
658
|
+
const getEnvironmentVariableLines = (
|
659
|
+
environmentVariables: { name: string; default: string }[]
|
660
|
+
) =>
|
661
|
+
environmentVariables.map(
|
662
|
+
({ name, default: defaultValue }) =>
|
663
|
+
`${name}=\${env.${name}:${escapeStringForPropertiesFile(defaultValue)}}`
|
664
|
+
);
|
665
|
+
|
658
666
|
if (isNative) {
|
667
|
+
fs.writeFileSync(
|
668
|
+
pathJoin(themeTypeDirPath, "theme.properties"),
|
669
|
+
Buffer.from(
|
670
|
+
[
|
671
|
+
fs.readFileSync(
|
672
|
+
pathJoin(themeTypeDirPath, "theme.properties")
|
673
|
+
),
|
674
|
+
...getEnvironmentVariableLines(
|
675
|
+
buildContext.environmentVariables
|
676
|
+
)
|
677
|
+
].join("\n\n"),
|
678
|
+
"utf8"
|
679
|
+
)
|
680
|
+
);
|
659
681
|
break generate_theme_properties;
|
660
682
|
}
|
661
683
|
|
@@ -687,13 +709,10 @@ export async function generateResources(params: {
|
|
687
709
|
? ["deprecatedMode=false"]
|
688
710
|
: []),
|
689
711
|
...(buildContext.extraThemeProperties ?? []),
|
690
|
-
...[
|
712
|
+
...getEnvironmentVariableLines([
|
691
713
|
...buildContext.environmentVariables,
|
692
714
|
{ name: KEYCLOAKIFY_SPA_DEV_SERVER_PORT, default: "" }
|
693
|
-
]
|
694
|
-
({ name, default: defaultValue }) =>
|
695
|
-
`${name}=\${env.${name}:${escapeStringForPropertiesFile(defaultValue)}}`
|
696
|
-
),
|
715
|
+
]),
|
697
716
|
...(languageTags === undefined
|
698
717
|
? []
|
699
718
|
: [`locales=${languageTags.join(",")}`])
|
@@ -772,6 +791,8 @@ export async function generateResources(params: {
|
|
772
791
|
|
773
792
|
return { modifiedSourceCode: sourceCode };
|
774
793
|
}
|
794
|
+
|
795
|
+
//TODO: Env var
|
775
796
|
});
|
776
797
|
}
|
777
798
|
run_writeMessagePropertiesFiles: {
|