@digipair/skill-web 0.8.15 → 0.8.16

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
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
23510
23510
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23511
23511
  // match is required
23512
23512
  if (!match) {
23513
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23513
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23514
23514
  v: nextMatch1
23515
23515
  };
23516
23516
  }
23517
23517
  var token = match.token, offset = match.offset;
23518
23518
  i1 += offset;
23519
23519
  if (token === " ") {
23520
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23520
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23521
23521
  }
23522
23522
  tokens1 = _to_consumable_array$1(tokens1).concat([
23523
23523
  token
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
23536
23536
  if (contextKeys.some(function(el) {
23537
23537
  return el.startsWith(name);
23538
23538
  })) {
23539
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23539
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23540
23540
  }
23541
23541
  if (dateTimeIdentifiers.some(function(el) {
23542
23542
  return el === name;
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
23555
23555
  if (dateTimeIdentifiers.some(function(el) {
23556
23556
  return el.startsWith(name);
23557
23557
  })) {
23558
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23558
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23559
23559
  }
23560
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23560
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23561
23561
  v: nextMatch1
23562
23562
  };
23563
23563
  };
@@ -27502,6 +27502,19 @@ let WebService = class WebService {
27502
27502
  const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
27503
27503
  return preparedPinsSettings;
27504
27504
  }
27505
+ mergeConttext(context, newContext) {
27506
+ const output = _extends({}, context);
27507
+ for(const key in newContext){
27508
+ if (Object.prototype.hasOwnProperty.call(newContext, key)) {
27509
+ if (typeof newContext[key] === 'object' && newContext[key] !== null && !Array.isArray(newContext[key]) && Object.prototype.hasOwnProperty.call(context, key)) {
27510
+ output[key] = _extends({}, context[key], newContext[key]);
27511
+ } else if (typeof newContext[key] !== 'undefined') {
27512
+ output[key] = newContext[key];
27513
+ }
27514
+ }
27515
+ }
27516
+ return output;
27517
+ }
27505
27518
  async page(params, _pinsSettingsList, context) {
27506
27519
  var _context_request_body;
27507
27520
  const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
@@ -27510,7 +27523,7 @@ let WebService = class WebService {
27510
27523
  if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
27511
27524
  const param = context.request.body.params.path.split('[')[0];
27512
27525
  const pinsSettingsList = this.findFactoryPinsSettings(context.request.body.params.path, params[param]);
27513
- return await executePinsList(pinsSettingsList, _extends({}, context, context.request.body.context));
27526
+ return await executePinsList(pinsSettingsList, this.mergeConttext(context.request.body.context, context));
27514
27527
  }
27515
27528
  await executePinsList(factoryInitialize, context);
27516
27529
  const html = `
package/index.esm.js CHANGED
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
23488
23488
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23489
23489
  // match is required
23490
23490
  if (!match) {
23491
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23491
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23492
23492
  v: nextMatch1
23493
23493
  };
23494
23494
  }
23495
23495
  var token = match.token, offset = match.offset;
23496
23496
  i1 += offset;
23497
23497
  if (token === " ") {
23498
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23498
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23499
23499
  }
23500
23500
  tokens1 = _to_consumable_array$1(tokens1).concat([
23501
23501
  token
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
23514
23514
  if (contextKeys.some(function(el) {
23515
23515
  return el.startsWith(name);
23516
23516
  })) {
23517
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23517
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23518
23518
  }
23519
23519
  if (dateTimeIdentifiers.some(function(el) {
23520
23520
  return el === name;
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
23533
23533
  if (dateTimeIdentifiers.some(function(el) {
23534
23534
  return el.startsWith(name);
23535
23535
  })) {
23536
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23536
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23537
23537
  }
23538
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23538
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -27480,6 +27480,19 @@ let WebService = class WebService {
27480
27480
  const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
27481
27481
  return preparedPinsSettings;
27482
27482
  }
27483
+ mergeConttext(context, newContext) {
27484
+ const output = _extends({}, context);
27485
+ for(const key in newContext){
27486
+ if (Object.prototype.hasOwnProperty.call(newContext, key)) {
27487
+ if (typeof newContext[key] === 'object' && newContext[key] !== null && !Array.isArray(newContext[key]) && Object.prototype.hasOwnProperty.call(context, key)) {
27488
+ output[key] = _extends({}, context[key], newContext[key]);
27489
+ } else if (typeof newContext[key] !== 'undefined') {
27490
+ output[key] = newContext[key];
27491
+ }
27492
+ }
27493
+ }
27494
+ return output;
27495
+ }
27483
27496
  async page(params, _pinsSettingsList, context) {
27484
27497
  var _context_request_body;
27485
27498
  const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
@@ -27488,7 +27501,7 @@ let WebService = class WebService {
27488
27501
  if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
27489
27502
  const param = context.request.body.params.path.split('[')[0];
27490
27503
  const pinsSettingsList = this.findFactoryPinsSettings(context.request.body.params.path, params[param]);
27491
- return await executePinsList(pinsSettingsList, _extends({}, context, context.request.body.context));
27504
+ return await executePinsList(pinsSettingsList, this.mergeConttext(context.request.body.context, context));
27492
27505
  }
27493
27506
  await executePinsList(factoryInitialize, context);
27494
27507
  const html = `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"