@digipair/skill-sse 0.70.4 → 0.71.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
@@ -1252,7 +1252,7 @@ let SSEService = class SSEService {
1252
1252
  this.sessions.set(name, session);
1253
1253
  session.on('disconnected', ()=>{
1254
1254
  this.sessions.delete(name);
1255
- engine.executePinsList(disconnected, _extends({}, context));
1255
+ engine.executePinsList(disconnected, _extends({}, context), `${context.__PATH__}.disconnected`);
1256
1256
  });
1257
1257
  }
1258
1258
  return session;
package/index.esm.js CHANGED
@@ -25127,14 +25127,14 @@ function indent(str, spaces) {
25127
25127
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
25128
25128
  // match is required
25129
25129
  if (!match) {
25130
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
25130
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
25131
25131
  v: nextMatch1
25132
25132
  };
25133
25133
  }
25134
25134
  var token = match.token, offset = match.offset;
25135
25135
  i1 += offset;
25136
25136
  if (token === " ") {
25137
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
25137
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
25138
25138
  }
25139
25139
  tokens1 = _to_consumable_array$1(tokens1).concat([
25140
25140
  token
@@ -25153,7 +25153,7 @@ function indent(str, spaces) {
25153
25153
  if (contextKeys.some(function(el) {
25154
25154
  return el.startsWith(name);
25155
25155
  })) {
25156
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
25156
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
25157
25157
  }
25158
25158
  if (dateTimeIdentifiers.some(function(el) {
25159
25159
  return el === name;
@@ -25172,9 +25172,9 @@ function indent(str, spaces) {
25172
25172
  if (dateTimeIdentifiers.some(function(el) {
25173
25173
  return el.startsWith(name);
25174
25174
  })) {
25175
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
25175
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
25176
25176
  }
25177
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
25177
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
25178
25178
  v: nextMatch1
25179
25179
  };
25180
25180
  };
@@ -29063,7 +29063,8 @@ var _globalInstance___DIGIPAIR_CONFIG__;
29063
29063
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
29064
29064
  LIBRARIES: {},
29065
29065
  BASE_URL: 'https://cdn.jsdelivr.net/npm',
29066
- ALIAS: []
29066
+ ALIAS: [],
29067
+ LOGGER: (level, path, message, context, data)=>{}
29067
29068
  };
29068
29069
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
29069
29070
  const isPinsSettings = (value)=>{
@@ -29104,6 +29105,7 @@ const applyTemplate = (value, context)=>{
29104
29105
  };
29105
29106
  const executePins = async (settingsOrigin, context = {})=>{
29106
29107
  var _settings_conditions, _settings_conditions1;
29108
+ _config.LOGGER('INFO', context.__PATH__, 'execute:start', context);
29107
29109
  let settings = preparePinsSettings(settingsOrigin, context);
29108
29110
  const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
29109
29111
  const config = context.config || {};
@@ -29151,6 +29153,7 @@ const executePins = async (settingsOrigin, context = {})=>{
29151
29153
  }
29152
29154
  results.push(itemResult);
29153
29155
  }
29156
+ _config.LOGGER('INFO', context.__PATH__, 'execute:end', context, results);
29154
29157
  return results;
29155
29158
  }
29156
29159
  if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
@@ -29163,7 +29166,7 @@ const executePins = async (settingsOrigin, context = {})=>{
29163
29166
  }
29164
29167
  return await pins(settings.properties, settings.pins, context);
29165
29168
  };
29166
- const executePinsList = async (pinsSettingsList, context)=>{
29169
+ const executePinsList = async (pinsSettingsList, context, path = 'root')=>{
29167
29170
  let previous = {};
29168
29171
  for(let i = 0; i < pinsSettingsList.length; i++){
29169
29172
  const settings = pinsSettingsList[i];
@@ -29173,7 +29176,8 @@ const executePinsList = async (pinsSettingsList, context)=>{
29173
29176
  parent: {
29174
29177
  previous: context.previous,
29175
29178
  parent: context.parent
29176
- }
29179
+ },
29180
+ __PATH__: `${path}[${i}]`
29177
29181
  }));
29178
29182
  } catch (error) {
29179
29183
  if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
@@ -29213,7 +29217,7 @@ let SSEService = class SSEService {
29213
29217
  this.sessions.set(name, session);
29214
29218
  session.on('disconnected', ()=>{
29215
29219
  this.sessions.delete(name);
29216
- executePinsList(disconnected, _extends({}, context));
29220
+ executePinsList(disconnected, _extends({}, context), `${context.__PATH__}.disconnected`);
29217
29221
  });
29218
29222
  }
29219
29223
  return session;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-sse",
3
- "version": "0.70.4",
3
+ "version": "0.71.2",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"