keycloakify 11.15.1 → 11.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/511.index.js CHANGED
@@ -411,8 +411,10 @@ function replaceImportsInJsCode_vite(params) {
411
411
  .map(basenameOfAssetsFile => `${staticDir}${basenameOfAssetsFile}`)
412
412
  .forEach(relativePathOfAssetFile => {
413
413
  var _a;
414
- fixedJsCode = replaceAll(fixedJsCode, `"${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
415
- fixedJsCode = replaceAll(fixedJsCode, `"${(_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/"}${relativePathOfAssetFile}"`, `(window.kcContext["x-keycloakify"].resourcesPath + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
414
+ for (const quoteSymbol of ['"', "'", "`"]) {
415
+ fixedJsCode = replaceAll(fixedJsCode, `${quoteSymbol}${relativePathOfAssetFile}${quoteSymbol}`, `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
416
+ fixedJsCode = replaceAll(fixedJsCode, `${quoteSymbol}${(_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/"}${relativePathOfAssetFile}${quoteSymbol}`, `(window.kcContext["x-keycloakify"].resourcesPath + "/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/${relativePathOfAssetFile}")`);
417
+ }
416
418
  });
417
419
  }
418
420
  return { fixedJsCode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "11.15.1",
3
+ "version": "11.15.2",
4
4
  "description": "Framework to create custom Keycloak UIs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,7 +1,7 @@
1
- import { WELL_KNOWN_DIRECTORY_BASE_NAME } from "../../../shared/constants";
1
+ import * as nodePath from "path";
2
2
  import { assert } from "tsafe/assert";
3
3
  import type { BuildContext } from "../../../shared/buildContext";
4
- import * as nodePath from "path";
4
+ import { WELL_KNOWN_DIRECTORY_BASE_NAME } from "../../../shared/constants";
5
5
  import { replaceAll } from "../../../tools/String.prototype.replaceAll";
6
6
 
7
7
  export type BuildContextLike = {
@@ -82,17 +82,19 @@ export function replaceImportsInJsCode_vite(params: {
82
82
  basenameOfAssetsFiles
83
83
  .map(basenameOfAssetsFile => `${staticDir}${basenameOfAssetsFile}`)
84
84
  .forEach(relativePathOfAssetFile => {
85
- fixedJsCode = replaceAll(
86
- fixedJsCode,
87
- `"${relativePathOfAssetFile}"`,
88
- `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/${relativePathOfAssetFile}")`
89
- );
85
+ for (const quoteSymbol of ['"', "'", "`"]) {
86
+ fixedJsCode = replaceAll(
87
+ fixedJsCode,
88
+ `${quoteSymbol}${relativePathOfAssetFile}${quoteSymbol}`,
89
+ `(window.kcContext["x-keycloakify"].resourcesPath.substring(1) + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/${relativePathOfAssetFile}")`
90
+ );
90
91
 
91
- fixedJsCode = replaceAll(
92
- fixedJsCode,
93
- `"${buildContext.urlPathname ?? "/"}${relativePathOfAssetFile}"`,
94
- `(window.kcContext["x-keycloakify"].resourcesPath + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/${relativePathOfAssetFile}")`
95
- );
92
+ fixedJsCode = replaceAll(
93
+ fixedJsCode,
94
+ `${quoteSymbol}${buildContext.urlPathname ?? "/"}${relativePathOfAssetFile}${quoteSymbol}`,
95
+ `(window.kcContext["x-keycloakify"].resourcesPath + "/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/${relativePathOfAssetFile}")`
96
+ );
97
+ }
96
98
  });
97
99
  }
98
100