@digipair/skill-web-chatbot 0.18.9 → 0.19.0

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.cjs2.js CHANGED
@@ -52658,14 +52658,14 @@ function indent(str, spaces) {
52658
52658
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
52659
52659
  // match is required
52660
52660
  if (!match) {
52661
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
52661
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
52662
52662
  v: nextMatch1
52663
52663
  };
52664
52664
  }
52665
52665
  var token = match.token, offset = match.offset;
52666
52666
  i1 += offset;
52667
52667
  if (token === " ") {
52668
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
52668
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52669
52669
  }
52670
52670
  tokens1 = _to_consumable_array$9(tokens1).concat([
52671
52671
  token
@@ -52684,7 +52684,7 @@ function indent(str, spaces) {
52684
52684
  if (contextKeys.some(function(el) {
52685
52685
  return el.startsWith(name);
52686
52686
  })) {
52687
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
52687
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52688
52688
  }
52689
52689
  if (dateTimeIdentifiers.some(function(el) {
52690
52690
  return el === name;
@@ -52703,9 +52703,9 @@ function indent(str, spaces) {
52703
52703
  if (dateTimeIdentifiers.some(function(el) {
52704
52704
  return el.startsWith(name);
52705
52705
  })) {
52706
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
52706
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52707
52707
  }
52708
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
52708
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
52709
52709
  v: nextMatch1
52710
52710
  };
52711
52711
  };
@@ -56527,7 +56527,7 @@ const applyTemplate = (value, context)=>{
56527
56527
  return result;
56528
56528
  };
56529
56529
  const executePins = async (settingsOrigin, context = {})=>{
56530
- var _settings_conditions;
56530
+ var _settings_conditions, _settings_conditions1;
56531
56531
  const settings = await preparePinsSettings(settingsOrigin, context);
56532
56532
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
56533
56533
  const results = [];
@@ -56552,11 +56552,22 @@ const executePins = async (settingsOrigin, context = {})=>{
56552
56552
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
56553
56553
  continue;
56554
56554
  }
56555
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
56555
+ let itemResult = null;
56556
+ try {
56557
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
56558
+ } catch (error) {
56559
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
56560
+ continue;
56561
+ }
56562
+ throw error;
56563
+ }
56556
56564
  results.push(itemResult);
56557
56565
  }
56558
56566
  return results;
56559
56567
  }
56568
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
56569
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
56570
+ }
56560
56571
  const version = context.config.VERSIONS[settings.library] || 'latest';
56561
56572
  const library = _config$1.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(isRemoteVersion.test(version) ? `${version}` : `${_config$1.BASE_URL}/${settings.library}@${version}/index.esm.js`));
56562
56573
  const pins = library == null ? void 0 : library[settings.element];
@@ -56570,23 +56581,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
56570
56581
  const steps = [];
56571
56582
  // parcourir tous les pins
56572
56583
  for(let i = 0; i < pinsSettingsList.length; i++){
56573
- var _settings_conditions;
56574
56584
  const settings = pinsSettingsList[i];
56575
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
56576
- const preparedSettings = await preparePinsSettings(settings, context);
56577
- if (!preparedSettings.conditions.if) {
56585
+ try {
56586
+ previous = await executePins(settings, _extends({}, context, {
56587
+ previous,
56588
+ steps,
56589
+ parent: {
56590
+ previous: context.previous,
56591
+ steps: context.steps,
56592
+ parent: context.parent
56593
+ }
56594
+ }));
56595
+ } catch (error) {
56596
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
56578
56597
  continue;
56579
56598
  }
56599
+ throw error;
56580
56600
  }
56581
- previous = await executePins(settings, _extends({}, context, {
56582
- previous,
56583
- steps,
56584
- parent: {
56585
- previous: context.previous,
56586
- steps: context.steps,
56587
- parent: context.parent
56588
- }
56589
- }));
56590
56601
  steps[i] = {
56591
56602
  name: settings.name,
56592
56603
  result: previous
package/index.esm2.js CHANGED
@@ -52638,14 +52638,14 @@ function indent(str, spaces) {
52638
52638
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
52639
52639
  // match is required
52640
52640
  if (!match) {
52641
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
52641
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
52642
52642
  v: nextMatch1
52643
52643
  };
52644
52644
  }
52645
52645
  var token = match.token, offset = match.offset;
52646
52646
  i1 += offset;
52647
52647
  if (token === " ") {
52648
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52648
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
52649
52649
  }
52650
52650
  tokens1 = _to_consumable_array$9(tokens1).concat([
52651
52651
  token
@@ -52664,7 +52664,7 @@ function indent(str, spaces) {
52664
52664
  if (contextKeys.some(function(el) {
52665
52665
  return el.startsWith(name);
52666
52666
  })) {
52667
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52667
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
52668
52668
  }
52669
52669
  if (dateTimeIdentifiers.some(function(el) {
52670
52670
  return el === name;
@@ -52683,9 +52683,9 @@ function indent(str, spaces) {
52683
52683
  if (dateTimeIdentifiers.some(function(el) {
52684
52684
  return el.startsWith(name);
52685
52685
  })) {
52686
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
52686
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
52687
52687
  }
52688
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
52688
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
52689
52689
  v: nextMatch1
52690
52690
  };
52691
52691
  };
@@ -56507,7 +56507,7 @@ const applyTemplate = (value, context)=>{
56507
56507
  return result;
56508
56508
  };
56509
56509
  const executePins = async (settingsOrigin, context = {})=>{
56510
- var _settings_conditions;
56510
+ var _settings_conditions, _settings_conditions1;
56511
56511
  const settings = await preparePinsSettings(settingsOrigin, context);
56512
56512
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
56513
56513
  const results = [];
@@ -56532,11 +56532,22 @@ const executePins = async (settingsOrigin, context = {})=>{
56532
56532
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
56533
56533
  continue;
56534
56534
  }
56535
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
56535
+ let itemResult = null;
56536
+ try {
56537
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
56538
+ } catch (error) {
56539
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
56540
+ continue;
56541
+ }
56542
+ throw error;
56543
+ }
56536
56544
  results.push(itemResult);
56537
56545
  }
56538
56546
  return results;
56539
56547
  }
56548
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
56549
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
56550
+ }
56540
56551
  const version = context.config.VERSIONS[settings.library] || 'latest';
56541
56552
  const library = _config$1.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(isRemoteVersion.test(version) ? `${version}` : `${_config$1.BASE_URL}/${settings.library}@${version}/index.esm.js`));
56542
56553
  const pins = library == null ? void 0 : library[settings.element];
@@ -56550,23 +56561,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
56550
56561
  const steps = [];
56551
56562
  // parcourir tous les pins
56552
56563
  for(let i = 0; i < pinsSettingsList.length; i++){
56553
- var _settings_conditions;
56554
56564
  const settings = pinsSettingsList[i];
56555
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
56556
- const preparedSettings = await preparePinsSettings(settings, context);
56557
- if (!preparedSettings.conditions.if) {
56565
+ try {
56566
+ previous = await executePins(settings, _extends({}, context, {
56567
+ previous,
56568
+ steps,
56569
+ parent: {
56570
+ previous: context.previous,
56571
+ steps: context.steps,
56572
+ parent: context.parent
56573
+ }
56574
+ }));
56575
+ } catch (error) {
56576
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
56558
56577
  continue;
56559
56578
  }
56579
+ throw error;
56560
56580
  }
56561
- previous = await executePins(settings, _extends({}, context, {
56562
- previous,
56563
- steps,
56564
- parent: {
56565
- previous: context.previous,
56566
- steps: context.steps,
56567
- parent: context.parent
56568
- }
56569
- }));
56570
56581
  steps[i] = {
56571
56582
  name: settings.name,
56572
56583
  result: previous
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-chatbot",
3
- "version": "0.18.9",
3
+ "version": "0.19.0",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",