@digipair/skill-factory 0.70.4 → 0.71.3

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
@@ -21,7 +21,7 @@ let FactoryService = class FactoryService {
21
21
  }
22
22
  async execute(params, _pinsSettingsList, _context) {
23
23
  const { execute, context = _context } = params;
24
- const result = await engine.executePinsList(execute, context);
24
+ const result = await engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
25
25
  return result;
26
26
  }
27
27
  async keepAlive(_params, _pinsSettingsList, _context) {
@@ -29,15 +29,15 @@ let FactoryService = class FactoryService {
29
29
  }
30
30
  async task(params, _pinsSettingsList, context) {
31
31
  const { execute } = params;
32
- return await engine.executePinsList(execute, context);
32
+ return await engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
33
33
  }
34
34
  async action(params, _pinsSettingsList, context) {
35
35
  const { execute } = params;
36
- return await engine.executePinsList(execute, context);
36
+ return await engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
37
37
  }
38
38
  async trigger(params, _pinsSettingsList, context) {
39
39
  const { execute } = params;
40
- return await engine.executePinsList(execute, context);
40
+ return await engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
41
41
  }
42
42
  };
43
43
  let instance;
package/index.esm.js CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
23899
23899
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23900
23900
  // match is required
23901
23901
  if (!match) {
23902
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23902
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23903
23903
  v: nextMatch1
23904
23904
  };
23905
23905
  }
23906
23906
  var token = match.token, offset = match.offset;
23907
23907
  i1 += offset;
23908
23908
  if (token === " ") {
23909
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23909
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23910
23910
  }
23911
23911
  tokens1 = _to_consumable_array$1(tokens1).concat([
23912
23912
  token
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
23925
23925
  if (contextKeys.some(function(el) {
23926
23926
  return el.startsWith(name);
23927
23927
  })) {
23928
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23928
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23929
23929
  }
23930
23930
  if (dateTimeIdentifiers.some(function(el) {
23931
23931
  return el === name;
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
23944
23944
  if (dateTimeIdentifiers.some(function(el) {
23945
23945
  return el.startsWith(name);
23946
23946
  })) {
23947
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23947
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23948
23948
  }
23949
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23949
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23950
23950
  v: nextMatch1
23951
23951
  };
23952
23952
  };
@@ -27835,7 +27835,8 @@ var _globalInstance___DIGIPAIR_CONFIG__;
27835
27835
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
27836
27836
  LIBRARIES: {},
27837
27837
  BASE_URL: 'https://cdn.jsdelivr.net/npm',
27838
- ALIAS: []
27838
+ ALIAS: [],
27839
+ LOGGER: (level, path, message, context, data)=>{}
27839
27840
  };
27840
27841
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
27841
27842
  const isPinsSettings = (value)=>{
@@ -27876,6 +27877,7 @@ const applyTemplate = (value, context)=>{
27876
27877
  };
27877
27878
  const executePins = async (settingsOrigin, context = {})=>{
27878
27879
  var _settings_conditions, _settings_conditions1;
27880
+ _config.LOGGER('INFO', context.__PATH__, 'execute:start', context);
27879
27881
  let settings = preparePinsSettings(settingsOrigin, context);
27880
27882
  const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27881
27883
  const config = context.config || {};
@@ -27933,9 +27935,11 @@ const executePins = async (settingsOrigin, context = {})=>{
27933
27935
  if (!pins) {
27934
27936
  throw new Error(`Element ${settings.element} not found in library ${settings.library}`);
27935
27937
  }
27936
- return await pins(settings.properties, settings.pins, context);
27938
+ const result = await pins(settings.properties, settings.pins, context);
27939
+ _config.LOGGER('INFO', context.__PATH__, 'execute:end', context, result);
27940
+ return result;
27937
27941
  };
27938
- const executePinsList = async (pinsSettingsList, context)=>{
27942
+ const executePinsList = async (pinsSettingsList, context, path = 'root')=>{
27939
27943
  let previous = {};
27940
27944
  for(let i = 0; i < pinsSettingsList.length; i++){
27941
27945
  const settings = pinsSettingsList[i];
@@ -27945,7 +27949,8 @@ const executePinsList = async (pinsSettingsList, context)=>{
27945
27949
  parent: {
27946
27950
  previous: context.previous,
27947
27951
  parent: context.parent
27948
- }
27952
+ },
27953
+ __PATH__: `${path}[${i}]`
27949
27954
  }));
27950
27955
  } catch (error) {
27951
27956
  if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
@@ -27992,7 +27997,7 @@ let FactoryService = class FactoryService {
27992
27997
  }
27993
27998
  async execute(params, _pinsSettingsList, _context) {
27994
27999
  const { execute, context = _context } = params;
27995
- const result = await executePinsList(execute, context);
28000
+ const result = await executePinsList(execute, context, `${context.__PATH__}.execute`);
27996
28001
  return result;
27997
28002
  }
27998
28003
  async keepAlive(_params, _pinsSettingsList, _context) {
@@ -28000,15 +28005,15 @@ let FactoryService = class FactoryService {
28000
28005
  }
28001
28006
  async task(params, _pinsSettingsList, context) {
28002
28007
  const { execute } = params;
28003
- return await executePinsList(execute, context);
28008
+ return await executePinsList(execute, context, `${context.__PATH__}.execute`);
28004
28009
  }
28005
28010
  async action(params, _pinsSettingsList, context) {
28006
28011
  const { execute } = params;
28007
- return await executePinsList(execute, context);
28012
+ return await executePinsList(execute, context, `${context.__PATH__}.execute`);
28008
28013
  }
28009
28014
  async trigger(params, _pinsSettingsList, context) {
28010
28015
  const { execute } = params;
28011
- return await executePinsList(execute, context);
28016
+ return await executePinsList(execute, context, `${context.__PATH__}.execute`);
28012
28017
  }
28013
28018
  };
28014
28019
  let instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-factory",
3
- "version": "0.70.4",
3
+ "version": "0.71.3",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"