@digipair/skill-keycloak 0.10.4 → 0.10.7

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
@@ -23522,14 +23522,14 @@ function indent(str, spaces) {
23522
23522
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23523
23523
  // match is required
23524
23524
  if (!match) {
23525
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23525
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23526
23526
  v: nextMatch1
23527
23527
  };
23528
23528
  }
23529
23529
  var token = match.token, offset = match.offset;
23530
23530
  i1 += offset;
23531
23531
  if (token === " ") {
23532
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23532
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23533
23533
  }
23534
23534
  tokens1 = _to_consumable_array$3(tokens1).concat([
23535
23535
  token
@@ -23548,7 +23548,7 @@ function indent(str, spaces) {
23548
23548
  if (contextKeys.some(function(el) {
23549
23549
  return el.startsWith(name);
23550
23550
  })) {
23551
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23551
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23552
23552
  }
23553
23553
  if (dateTimeIdentifiers.some(function(el) {
23554
23554
  return el === name;
@@ -23567,9 +23567,9 @@ function indent(str, spaces) {
23567
23567
  if (dateTimeIdentifiers.some(function(el) {
23568
23568
  return el.startsWith(name);
23569
23569
  })) {
23570
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23570
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23571
23571
  }
23572
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23572
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23573
23573
  v: nextMatch1
23574
23574
  };
23575
23575
  };
@@ -27381,9 +27381,7 @@ const applyTemplate = (value, context)=>{
27381
27381
  }
27382
27382
  return result;
27383
27383
  };
27384
- const executePins = async (settingsOrigin, context = {}, options = {
27385
- libraries: {}
27386
- })=>{
27384
+ const executePins = async (settingsOrigin, context = {})=>{
27387
27385
  var _settings_conditions;
27388
27386
  const settings = await preparePinsSettings(settingsOrigin, context);
27389
27387
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
@@ -27409,12 +27407,12 @@ const executePins = async (settingsOrigin, context = {}, options = {
27409
27407
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27410
27408
  continue;
27411
27409
  }
27412
- const itemResult = await executePins(itemSettingsOrigin, itemContext, options);
27410
+ const itemResult = await executePins(itemSettingsOrigin, itemContext);
27413
27411
  results.push(itemResult);
27414
27412
  }
27415
27413
  return results;
27416
27414
  }
27417
- const version = options.libraries[settings.library] || 'latest';
27415
+ const version = context.config.VERSIONS[settings.library] || 'latest';
27418
27416
  const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(`${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
27419
27417
  const pins = library == null ? void 0 : library[settings.element];
27420
27418
  if (!pins) {
@@ -27422,9 +27420,7 @@ const executePins = async (settingsOrigin, context = {}, options = {
27422
27420
  }
27423
27421
  return await pins(settings.properties, settings.pins, context);
27424
27422
  };
27425
- const executePinsList = async (pinsSettingsList, context, options = {
27426
- libraries: {}
27427
- })=>{
27423
+ const executePinsList = async (pinsSettingsList, context)=>{
27428
27424
  let previous = {};
27429
27425
  const steps = [];
27430
27426
  // parcourir tous les pins
@@ -27445,7 +27441,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
27445
27441
  steps: context.steps,
27446
27442
  parent: context.parent
27447
27443
  }
27448
- }), options);
27444
+ }));
27449
27445
  steps[i] = {
27450
27446
  name: settings.name,
27451
27447
  result: previous
@@ -33972,6 +33968,9 @@ let KeycloakService = class KeycloakService {
33972
33968
  ${JSON.stringify(clientId)});
33973
33969
 
33974
33970
  const context = {
33971
+ config: {
33972
+ VERSIONS: ${JSON.stringify(context.config.VERSIONS || {})},
33973
+ },
33975
33974
  variables: ${JSON.stringify(context.variables || {})},
33976
33975
  request: ${JSON.stringify(context.request || {})},
33977
33976
  keycloak: { isLogged: keycloakService.isLogged },
@@ -33986,13 +33985,10 @@ let KeycloakService = class KeycloakService {
33986
33985
  // Pins initialization
33987
33986
  await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
33988
33987
 
33989
- const options = {
33990
- libraries: {},
33991
- };
33992
33988
  const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
33993
33989
  for (let i = 0; i < pinsList.length; i++) {
33994
33990
  const item = pinsList[i];
33995
- await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
33991
+ await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} });
33996
33992
  }
33997
33993
 
33998
33994
  setTimeout(async () => {
package/index.esm.js CHANGED
@@ -27352,9 +27352,7 @@ const applyTemplate = (value, context)=>{
27352
27352
  }
27353
27353
  return result;
27354
27354
  };
27355
- const executePins = async (settingsOrigin, context = {}, options = {
27356
- libraries: {}
27357
- })=>{
27355
+ const executePins = async (settingsOrigin, context = {})=>{
27358
27356
  var _settings_conditions;
27359
27357
  const settings = await preparePinsSettings(settingsOrigin, context);
27360
27358
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
@@ -27380,12 +27378,12 @@ const executePins = async (settingsOrigin, context = {}, options = {
27380
27378
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27381
27379
  continue;
27382
27380
  }
27383
- const itemResult = await executePins(itemSettingsOrigin, itemContext, options);
27381
+ const itemResult = await executePins(itemSettingsOrigin, itemContext);
27384
27382
  results.push(itemResult);
27385
27383
  }
27386
27384
  return results;
27387
27385
  }
27388
- const version = options.libraries[settings.library] || 'latest';
27386
+ const version = context.config.VERSIONS[settings.library] || 'latest';
27389
27387
  const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(`${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
27390
27388
  const pins = library == null ? void 0 : library[settings.element];
27391
27389
  if (!pins) {
@@ -27393,9 +27391,7 @@ const executePins = async (settingsOrigin, context = {}, options = {
27393
27391
  }
27394
27392
  return await pins(settings.properties, settings.pins, context);
27395
27393
  };
27396
- const executePinsList = async (pinsSettingsList, context, options = {
27397
- libraries: {}
27398
- })=>{
27394
+ const executePinsList = async (pinsSettingsList, context)=>{
27399
27395
  let previous = {};
27400
27396
  const steps = [];
27401
27397
  // parcourir tous les pins
@@ -27416,7 +27412,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
27416
27412
  steps: context.steps,
27417
27413
  parent: context.parent
27418
27414
  }
27419
- }), options);
27415
+ }));
27420
27416
  steps[i] = {
27421
27417
  name: settings.name,
27422
27418
  result: previous
@@ -33943,6 +33939,9 @@ let KeycloakService = class KeycloakService {
33943
33939
  ${JSON.stringify(clientId)});
33944
33940
 
33945
33941
  const context = {
33942
+ config: {
33943
+ VERSIONS: ${JSON.stringify(context.config.VERSIONS || {})},
33944
+ },
33946
33945
  variables: ${JSON.stringify(context.variables || {})},
33947
33946
  request: ${JSON.stringify(context.request || {})},
33948
33947
  keycloak: { isLogged: keycloakService.isLogged },
@@ -33957,13 +33956,10 @@ let KeycloakService = class KeycloakService {
33957
33956
  // Pins initialization
33958
33957
  await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
33959
33958
 
33960
- const options = {
33961
- libraries: {},
33962
- };
33963
33959
  const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
33964
33960
  for (let i = 0; i < pinsList.length; i++) {
33965
33961
  const item = pinsList[i];
33966
- await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
33962
+ await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} });
33967
33963
  }
33968
33964
 
33969
33965
  setTimeout(async () => {
@@ -4,15 +4,7 @@ export declare const config: {
4
4
  set: (key: CONFIG_KEY, value: any) => void;
5
5
  };
6
6
  export declare const applyTemplate: (value: any, context: any) => any;
7
- export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, options?: {
8
- libraries: {
9
- [key: string]: string;
10
- };
11
- }) => Promise<any>;
12
- export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, options?: {
13
- libraries: {
14
- [key: string]: string;
15
- };
16
- }) => Promise<Element | void>;
7
+ export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
+ export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any) => Promise<Element | void>;
17
9
  export declare const preparePinsSettings: (settings: PinsSettings, context: any) => Promise<PinsSettings>;
18
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-keycloak",
3
- "version": "0.10.4",
3
+ "version": "0.10.7",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"