@digipair/skill-keycloak 0.8.15 → 0.8.17
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 +19 -6
- package/index.esm.js +14 -1
- package/package.json +1 -1
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
|
|
23525
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
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
|
|
23532
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "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
|
|
23551
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "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
|
|
23570
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
23571
23571
|
}
|
|
23572
|
-
return
|
|
23572
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
23573
23573
|
v: nextMatch1
|
|
23574
23574
|
};
|
|
23575
23575
|
};
|
|
@@ -33886,6 +33886,19 @@ let KeycloakService = class KeycloakService {
|
|
|
33886
33886
|
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
33887
33887
|
return preparedPinsSettings;
|
|
33888
33888
|
}
|
|
33889
|
+
mergeConttext(context, newContext) {
|
|
33890
|
+
const output = _extends({}, context);
|
|
33891
|
+
for(const key in newContext){
|
|
33892
|
+
if (Object.prototype.hasOwnProperty.call(newContext, key)) {
|
|
33893
|
+
if (typeof newContext[key] === 'object' && newContext[key] !== null && !Array.isArray(newContext[key]) && Object.prototype.hasOwnProperty.call(context, key)) {
|
|
33894
|
+
output[key] = _extends({}, context[key], newContext[key]);
|
|
33895
|
+
} else if (typeof newContext[key] !== 'undefined') {
|
|
33896
|
+
output[key] = newContext[key];
|
|
33897
|
+
}
|
|
33898
|
+
}
|
|
33899
|
+
}
|
|
33900
|
+
return output;
|
|
33901
|
+
}
|
|
33889
33902
|
async page(params, _pinsSettingsList, context) {
|
|
33890
33903
|
var _context_request_body;
|
|
33891
33904
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [] } = params;
|
|
@@ -33910,7 +33923,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33910
33923
|
if ((typeof ((_pinsSettings_properties1 = pinsSettings.properties) == null ? void 0 : _pinsSettings_properties1['secured']) === 'undefined' || ((_pinsSettings_properties2 = pinsSettings.properties) == null ? void 0 : _pinsSettings_properties2['secured'])) && !context.keycloak.decodedToken) {
|
|
33911
33924
|
throw new Error('Unauthorized');
|
|
33912
33925
|
}
|
|
33913
|
-
return await executePinsList(pinsSettingsList,
|
|
33926
|
+
return JSON.stringify(await executePinsList(pinsSettingsList, this.mergeConttext(context.request.body.context, context)));
|
|
33914
33927
|
}
|
|
33915
33928
|
await executePinsList(factoryInitialize, context);
|
|
33916
33929
|
const html = `
|
package/index.esm.js
CHANGED
|
@@ -33857,6 +33857,19 @@ let KeycloakService = class KeycloakService {
|
|
|
33857
33857
|
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
33858
33858
|
return preparedPinsSettings;
|
|
33859
33859
|
}
|
|
33860
|
+
mergeConttext(context, newContext) {
|
|
33861
|
+
const output = _extends({}, context);
|
|
33862
|
+
for(const key in newContext){
|
|
33863
|
+
if (Object.prototype.hasOwnProperty.call(newContext, key)) {
|
|
33864
|
+
if (typeof newContext[key] === 'object' && newContext[key] !== null && !Array.isArray(newContext[key]) && Object.prototype.hasOwnProperty.call(context, key)) {
|
|
33865
|
+
output[key] = _extends({}, context[key], newContext[key]);
|
|
33866
|
+
} else if (typeof newContext[key] !== 'undefined') {
|
|
33867
|
+
output[key] = newContext[key];
|
|
33868
|
+
}
|
|
33869
|
+
}
|
|
33870
|
+
}
|
|
33871
|
+
return output;
|
|
33872
|
+
}
|
|
33860
33873
|
async page(params, _pinsSettingsList, context) {
|
|
33861
33874
|
var _context_request_body;
|
|
33862
33875
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [] } = params;
|
|
@@ -33881,7 +33894,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33881
33894
|
if ((typeof ((_pinsSettings_properties1 = pinsSettings.properties) == null ? void 0 : _pinsSettings_properties1['secured']) === 'undefined' || ((_pinsSettings_properties2 = pinsSettings.properties) == null ? void 0 : _pinsSettings_properties2['secured'])) && !context.keycloak.decodedToken) {
|
|
33882
33895
|
throw new Error('Unauthorized');
|
|
33883
33896
|
}
|
|
33884
|
-
return await executePinsList(pinsSettingsList,
|
|
33897
|
+
return JSON.stringify(await executePinsList(pinsSettingsList, this.mergeConttext(context.request.body.context, context)));
|
|
33885
33898
|
}
|
|
33886
33899
|
await executePinsList(factoryInitialize, context);
|
|
33887
33900
|
const html = `
|