@digipair/skill-web-notification 0.18.9 → 0.18.10

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.
Files changed (3) hide show
  1. package/index.cjs.js +26 -15
  2. package/index.esm.js +31 -20
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -27374,7 +27374,7 @@ const applyTemplate = (value, context)=>{
27374
27374
  return result;
27375
27375
  };
27376
27376
  const executePins = async (settingsOrigin, context = {})=>{
27377
- var _settings_conditions;
27377
+ var _settings_conditions, _settings_conditions1;
27378
27378
  const settings = await preparePinsSettings(settingsOrigin, context);
27379
27379
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27380
27380
  const results = [];
@@ -27399,11 +27399,22 @@ const executePins = async (settingsOrigin, context = {})=>{
27399
27399
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27400
27400
  continue;
27401
27401
  }
27402
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
27402
+ let itemResult = null;
27403
+ try {
27404
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
27405
+ } catch (error) {
27406
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27407
+ continue;
27408
+ }
27409
+ throw error;
27410
+ }
27403
27411
  results.push(itemResult);
27404
27412
  }
27405
27413
  return results;
27406
27414
  }
27415
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
27416
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
27417
+ }
27407
27418
  const version = context.config.VERSIONS[settings.library] || 'latest';
27408
27419
  const library = _config.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.BASE_URL}/${settings.library}@${version}/index.esm.js`));
27409
27420
  const pins = library == null ? void 0 : library[settings.element];
@@ -27417,23 +27428,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
27417
27428
  const steps = [];
27418
27429
  // parcourir tous les pins
27419
27430
  for(let i = 0; i < pinsSettingsList.length; i++){
27420
- var _settings_conditions;
27421
27431
  const settings = pinsSettingsList[i];
27422
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
27423
- const preparedSettings = await preparePinsSettings(settings, context);
27424
- if (!preparedSettings.conditions.if) {
27432
+ try {
27433
+ previous = await executePins(settings, _extends({}, context, {
27434
+ previous,
27435
+ steps,
27436
+ parent: {
27437
+ previous: context.previous,
27438
+ steps: context.steps,
27439
+ parent: context.parent
27440
+ }
27441
+ }));
27442
+ } catch (error) {
27443
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27425
27444
  continue;
27426
27445
  }
27446
+ throw error;
27427
27447
  }
27428
- previous = await executePins(settings, _extends({}, context, {
27429
- previous,
27430
- steps,
27431
- parent: {
27432
- previous: context.previous,
27433
- steps: context.steps,
27434
- parent: context.parent
27435
- }
27436
- }));
27437
27448
  steps[i] = {
27438
27449
  name: settings.name,
27439
27450
  result: previous
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23491
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23498
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23517
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23536
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23537
23537
  }
23538
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23538
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -27352,7 +27352,7 @@ const applyTemplate = (value, context)=>{
27352
27352
  return result;
27353
27353
  };
27354
27354
  const executePins = async (settingsOrigin, context = {})=>{
27355
- var _settings_conditions;
27355
+ var _settings_conditions, _settings_conditions1;
27356
27356
  const settings = await preparePinsSettings(settingsOrigin, context);
27357
27357
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27358
27358
  const results = [];
@@ -27377,11 +27377,22 @@ const executePins = async (settingsOrigin, context = {})=>{
27377
27377
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27378
27378
  continue;
27379
27379
  }
27380
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
27380
+ let itemResult = null;
27381
+ try {
27382
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
27383
+ } catch (error) {
27384
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27385
+ continue;
27386
+ }
27387
+ throw error;
27388
+ }
27381
27389
  results.push(itemResult);
27382
27390
  }
27383
27391
  return results;
27384
27392
  }
27393
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
27394
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
27395
+ }
27385
27396
  const version = context.config.VERSIONS[settings.library] || 'latest';
27386
27397
  const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(isRemoteVersion.test(version) ? `${version}` : `${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
27387
27398
  const pins = library == null ? void 0 : library[settings.element];
@@ -27395,23 +27406,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
27395
27406
  const steps = [];
27396
27407
  // parcourir tous les pins
27397
27408
  for(let i = 0; i < pinsSettingsList.length; i++){
27398
- var _settings_conditions;
27399
27409
  const settings = pinsSettingsList[i];
27400
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
27401
- const preparedSettings = await preparePinsSettings(settings, context);
27402
- if (!preparedSettings.conditions.if) {
27410
+ try {
27411
+ previous = await executePins(settings, _extends({}, context, {
27412
+ previous,
27413
+ steps,
27414
+ parent: {
27415
+ previous: context.previous,
27416
+ steps: context.steps,
27417
+ parent: context.parent
27418
+ }
27419
+ }));
27420
+ } catch (error) {
27421
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27403
27422
  continue;
27404
27423
  }
27424
+ throw error;
27405
27425
  }
27406
- previous = await executePins(settings, _extends({}, context, {
27407
- previous,
27408
- steps,
27409
- parent: {
27410
- previous: context.previous,
27411
- steps: context.steps,
27412
- parent: context.parent
27413
- }
27414
- }));
27415
27426
  steps[i] = {
27416
27427
  name: settings.name,
27417
27428
  result: previous
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-notification",
3
- "version": "0.18.9",
3
+ "version": "0.18.10",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"