@digipair/skill-basic 0.70.4 → 0.71.1

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 BasicService = class BasicService {
21
21
  if (!execute || execute.length <= 0) {
22
22
  return value;
23
23
  }
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 setVariable(params, _pinsSettingsList, context) {
@@ -30,7 +30,7 @@ let BasicService = class BasicService {
30
30
  context.variables[name] = value;
31
31
  return value;
32
32
  }
33
- const result = await engine.executePinsList(execute, context);
33
+ const result = await engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
34
34
  context.variables[name] = result;
35
35
  return result;
36
36
  }
@@ -39,7 +39,7 @@ let BasicService = class BasicService {
39
39
  const { time, execute } = params;
40
40
  const signal = (_context_protected = context.protected) == null ? void 0 : _context_protected.signal;
41
41
  const result = setInterval(()=>{
42
- engine.executePinsList(execute, context);
42
+ engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
43
43
  }, time);
44
44
  signal == null ? void 0 : signal.addEventListener('abort', ()=>clearInterval(result));
45
45
  return result;
@@ -49,7 +49,7 @@ let BasicService = class BasicService {
49
49
  const { time, execute } = params;
50
50
  const signal = (_context_protected = context.protected) == null ? void 0 : _context_protected.signal;
51
51
  const result = setTimeout(()=>{
52
- engine.executePinsList(execute, context);
52
+ engine.executePinsList(execute, context, `${context.__PATH__}.execute`);
53
53
  }, time);
54
54
  signal == null ? void 0 : signal.addEventListener('abort', ()=>clearTimeout(result));
55
55
  return result;
@@ -71,11 +71,11 @@ let BasicService = class BasicService {
71
71
  async trycatch(params, _pinsSettingsList, context) {
72
72
  const { executeTry, executeCatch = [] } = params;
73
73
  try {
74
- return await engine.executePinsList(executeTry, context);
74
+ return await engine.executePinsList(executeTry, context, `${context.__PATH__}.executeTry`);
75
75
  } catch (error) {
76
76
  return await engine.executePinsList(executeCatch, _extends({}, context, {
77
77
  error
78
- }));
78
+ }), `${context.__PATH__}.executeCatch`);
79
79
  }
80
80
  }
81
81
  };
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 || {};
@@ -27923,6 +27925,7 @@ const executePins = async (settingsOrigin, context = {})=>{
27923
27925
  }
27924
27926
  results.push(itemResult);
27925
27927
  }
27928
+ _config.LOGGER('INFO', context.__PATH__, 'execute:end', context, results);
27926
27929
  return results;
27927
27930
  }
27928
27931
  if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
@@ -27935,7 +27938,7 @@ const executePins = async (settingsOrigin, context = {})=>{
27935
27938
  }
27936
27939
  return await pins(settings.properties, settings.pins, context);
27937
27940
  };
27938
- const executePinsList = async (pinsSettingsList, context)=>{
27941
+ const executePinsList = async (pinsSettingsList, context, path = 'root')=>{
27939
27942
  let previous = {};
27940
27943
  for(let i = 0; i < pinsSettingsList.length; i++){
27941
27944
  const settings = pinsSettingsList[i];
@@ -27945,7 +27948,8 @@ const executePinsList = async (pinsSettingsList, context)=>{
27945
27948
  parent: {
27946
27949
  previous: context.previous,
27947
27950
  parent: context.parent
27948
- }
27951
+ },
27952
+ __PATH__: `${path}[${i}]`
27949
27953
  }));
27950
27954
  } catch (error) {
27951
27955
  if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
@@ -27981,7 +27985,7 @@ let BasicService = class BasicService {
27981
27985
  if (!execute || execute.length <= 0) {
27982
27986
  return value;
27983
27987
  }
27984
- const result = await executePinsList(execute, context);
27988
+ const result = await executePinsList(execute, context, `${context.__PATH__}.execute`);
27985
27989
  return result;
27986
27990
  }
27987
27991
  async setVariable(params, _pinsSettingsList, context) {
@@ -27990,7 +27994,7 @@ let BasicService = class BasicService {
27990
27994
  context.variables[name] = value;
27991
27995
  return value;
27992
27996
  }
27993
- const result = await executePinsList(execute, context);
27997
+ const result = await executePinsList(execute, context, `${context.__PATH__}.execute`);
27994
27998
  context.variables[name] = result;
27995
27999
  return result;
27996
28000
  }
@@ -27999,7 +28003,7 @@ let BasicService = class BasicService {
27999
28003
  const { time, execute } = params;
28000
28004
  const signal = (_context_protected = context.protected) == null ? void 0 : _context_protected.signal;
28001
28005
  const result = setInterval(()=>{
28002
- executePinsList(execute, context);
28006
+ executePinsList(execute, context, `${context.__PATH__}.execute`);
28003
28007
  }, time);
28004
28008
  signal == null ? void 0 : signal.addEventListener('abort', ()=>clearInterval(result));
28005
28009
  return result;
@@ -28009,7 +28013,7 @@ let BasicService = class BasicService {
28009
28013
  const { time, execute } = params;
28010
28014
  const signal = (_context_protected = context.protected) == null ? void 0 : _context_protected.signal;
28011
28015
  const result = setTimeout(()=>{
28012
- executePinsList(execute, context);
28016
+ executePinsList(execute, context, `${context.__PATH__}.execute`);
28013
28017
  }, time);
28014
28018
  signal == null ? void 0 : signal.addEventListener('abort', ()=>clearTimeout(result));
28015
28019
  return result;
@@ -28031,11 +28035,11 @@ let BasicService = class BasicService {
28031
28035
  async trycatch(params, _pinsSettingsList, context) {
28032
28036
  const { executeTry, executeCatch = [] } = params;
28033
28037
  try {
28034
- return await executePinsList(executeTry, context);
28038
+ return await executePinsList(executeTry, context, `${context.__PATH__}.executeTry`);
28035
28039
  } catch (error) {
28036
28040
  return await executePinsList(executeCatch, _extends({}, context, {
28037
28041
  error
28038
- }));
28042
+ }), `${context.__PATH__}.executeCatch`);
28039
28043
  }
28040
28044
  }
28041
28045
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-basic",
3
- "version": "0.70.4",
3
+ "version": "0.71.1",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "web"
File without changes