@digipair/skill-keycloak 0.103.1 → 0.103.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/index.cjs.js CHANGED
@@ -16639,7 +16639,7 @@ let KeycloakService = class KeycloakService {
16639
16639
  import { config, executePinsList, generateElementFromPins, applyTemplate } from '${baseUrl}/@digipair/engine@${engineVersion}/index.esm.js';
16640
16640
 
16641
16641
  const serverUrl = '${factoryUrl}';
16642
- const keycloakService = ${this.skillKeycloak};
16642
+ const keycloakService = ${this.skillKeycloak(keycloakJs)};
16643
16643
 
16644
16644
  const originalFetch = window.fetch;
16645
16645
  window.fetch = async (url, options) => {
@@ -16786,7 +16786,7 @@ let KeycloakService = class KeycloakService {
16786
16786
  return result;
16787
16787
  }
16788
16788
  constructor(){
16789
- this.skillKeycloak = `(() => {
16789
+ this.skillKeycloak = (keycloakJsUrl)=>`(() => {
16790
16790
  class KeycloakService {
16791
16791
  async authentification() {
16792
16792
  const keycloak = await this._keycloakPromise;
@@ -16800,7 +16800,9 @@ let KeycloakService = class KeycloakService {
16800
16800
 
16801
16801
  async initialize(url, realm, clientId) {
16802
16802
  this._keycloakPromise = (async () => {
16803
- const keycloak = new Keycloak({
16803
+ let KeycloakConstructor = window.Keycloak ?? (await import('${keycloakJsUrl}')).default;
16804
+
16805
+ const keycloak = new KeycloakConstructor({
16804
16806
  url,
16805
16807
  realm,
16806
16808
  clientId,
package/index.esm.js CHANGED
@@ -23907,14 +23907,14 @@ function indent(str, spaces) {
23907
23907
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23908
23908
  // match is required
23909
23909
  if (!match) {
23910
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23910
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23911
23911
  v: nextMatch1
23912
23912
  };
23913
23913
  }
23914
23914
  var token = match.token, offset = match.offset;
23915
23915
  i1 += offset;
23916
23916
  if (token === " ") {
23917
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23917
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23918
23918
  }
23919
23919
  tokens1 = _to_consumable_array$3(tokens1).concat([
23920
23920
  token
@@ -23933,7 +23933,7 @@ function indent(str, spaces) {
23933
23933
  if (contextKeys.some(function(el) {
23934
23934
  return el.startsWith(name);
23935
23935
  })) {
23936
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23936
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23937
23937
  }
23938
23938
  if (dateTimeIdentifiers.some(function(el) {
23939
23939
  return el === name;
@@ -23952,9 +23952,9 @@ function indent(str, spaces) {
23952
23952
  if (dateTimeIdentifiers.some(function(el) {
23953
23953
  return el.startsWith(name);
23954
23954
  })) {
23955
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23955
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23956
23956
  }
23957
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23957
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23958
23958
  v: nextMatch1
23959
23959
  };
23960
23960
  };
@@ -44673,7 +44673,7 @@ let KeycloakService = class KeycloakService {
44673
44673
  import { config, executePinsList, generateElementFromPins, applyTemplate } from '${baseUrl}/@digipair/engine@${engineVersion}/index.esm.js';
44674
44674
 
44675
44675
  const serverUrl = '${factoryUrl}';
44676
- const keycloakService = ${this.skillKeycloak};
44676
+ const keycloakService = ${this.skillKeycloak(keycloakJs)};
44677
44677
 
44678
44678
  const originalFetch = window.fetch;
44679
44679
  window.fetch = async (url, options) => {
@@ -44820,7 +44820,7 @@ let KeycloakService = class KeycloakService {
44820
44820
  return result;
44821
44821
  }
44822
44822
  constructor(){
44823
- this.skillKeycloak = `(() => {
44823
+ this.skillKeycloak = (keycloakJsUrl)=>`(() => {
44824
44824
  class KeycloakService {
44825
44825
  async authentification() {
44826
44826
  const keycloak = await this._keycloakPromise;
@@ -44834,7 +44834,9 @@ let KeycloakService = class KeycloakService {
44834
44834
 
44835
44835
  async initialize(url, realm, clientId) {
44836
44836
  this._keycloakPromise = (async () => {
44837
- const keycloak = new Keycloak({
44837
+ let KeycloakConstructor = window.Keycloak ?? (await import('${keycloakJsUrl}')).default;
44838
+
44839
+ const keycloak = new KeycloakConstructor({
44838
44840
  url,
44839
44841
  realm,
44840
44842
  clientId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-keycloak",
3
- "version": "0.103.1",
3
+ "version": "0.103.2",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",