@digipair/skill-cron 0.18.9 → 0.18.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.cjs.js +31 -20
  2. package/index.esm.js +31 -20
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -23517,14 +23517,14 @@ function indent(str, spaces) {
23517
23517
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23518
23518
  // match is required
23519
23519
  if (!match) {
23520
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23520
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23521
23521
  v: nextMatch1
23522
23522
  };
23523
23523
  }
23524
23524
  var token = match.token, offset = match.offset;
23525
23525
  i1 += offset;
23526
23526
  if (token === " ") {
23527
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23527
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23528
23528
  }
23529
23529
  tokens1 = _to_consumable_array$3(tokens1).concat([
23530
23530
  token
@@ -23543,7 +23543,7 @@ function indent(str, spaces) {
23543
23543
  if (contextKeys.some(function(el) {
23544
23544
  return el.startsWith(name);
23545
23545
  })) {
23546
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23546
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23547
23547
  }
23548
23548
  if (dateTimeIdentifiers.some(function(el) {
23549
23549
  return el === name;
@@ -23562,9 +23562,9 @@ function indent(str, spaces) {
23562
23562
  if (dateTimeIdentifiers.some(function(el) {
23563
23563
  return el.startsWith(name);
23564
23564
  })) {
23565
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23565
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23566
23566
  }
23567
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23567
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23568
23568
  v: nextMatch1
23569
23569
  };
23570
23570
  };
@@ -27381,7 +27381,7 @@ const applyTemplate = (value, context)=>{
27381
27381
  return result;
27382
27382
  };
27383
27383
  const executePins = async (settingsOrigin, context = {})=>{
27384
- var _settings_conditions;
27384
+ var _settings_conditions, _settings_conditions1;
27385
27385
  const settings = await preparePinsSettings(settingsOrigin, context);
27386
27386
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27387
27387
  const results = [];
@@ -27406,11 +27406,22 @@ const executePins = async (settingsOrigin, context = {})=>{
27406
27406
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27407
27407
  continue;
27408
27408
  }
27409
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
27409
+ let itemResult = null;
27410
+ try {
27411
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
27412
+ } catch (error) {
27413
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27414
+ continue;
27415
+ }
27416
+ throw error;
27417
+ }
27410
27418
  results.push(itemResult);
27411
27419
  }
27412
27420
  return results;
27413
27421
  }
27422
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
27423
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
27424
+ }
27414
27425
  const version = context.config.VERSIONS[settings.library] || 'latest';
27415
27426
  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`));
27416
27427
  const pins = library == null ? void 0 : library[settings.element];
@@ -27424,23 +27435,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
27424
27435
  const steps = [];
27425
27436
  // parcourir tous les pins
27426
27437
  for(let i = 0; i < pinsSettingsList.length; i++){
27427
- var _settings_conditions;
27428
27438
  const settings = pinsSettingsList[i];
27429
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
27430
- const preparedSettings = await preparePinsSettings(settings, context);
27431
- if (!preparedSettings.conditions.if) {
27439
+ try {
27440
+ previous = await executePins(settings, _extends({}, context, {
27441
+ previous,
27442
+ steps,
27443
+ parent: {
27444
+ previous: context.previous,
27445
+ steps: context.steps,
27446
+ parent: context.parent
27447
+ }
27448
+ }));
27449
+ } catch (error) {
27450
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27432
27451
  continue;
27433
27452
  }
27453
+ throw error;
27434
27454
  }
27435
- previous = await executePins(settings, _extends({}, context, {
27436
- previous,
27437
- steps,
27438
- parent: {
27439
- previous: context.previous,
27440
- steps: context.steps,
27441
- parent: context.parent
27442
- }
27443
- }));
27444
27455
  steps[i] = {
27445
27456
  name: settings.name,
27446
27457
  result: previous
package/index.esm.js CHANGED
@@ -23491,14 +23491,14 @@ function indent(str, spaces) {
23491
23491
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23492
23492
  // match is required
23493
23493
  if (!match) {
23494
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23494
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23495
23495
  v: nextMatch1
23496
23496
  };
23497
23497
  }
23498
23498
  var token = match.token, offset = match.offset;
23499
23499
  i1 += offset;
23500
23500
  if (token === " ") {
23501
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23501
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23502
23502
  }
23503
23503
  tokens1 = _to_consumable_array$3(tokens1).concat([
23504
23504
  token
@@ -23517,7 +23517,7 @@ function indent(str, spaces) {
23517
23517
  if (contextKeys.some(function(el) {
23518
23518
  return el.startsWith(name);
23519
23519
  })) {
23520
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23520
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23521
23521
  }
23522
23522
  if (dateTimeIdentifiers.some(function(el) {
23523
23523
  return el === name;
@@ -23536,9 +23536,9 @@ function indent(str, spaces) {
23536
23536
  if (dateTimeIdentifiers.some(function(el) {
23537
23537
  return el.startsWith(name);
23538
23538
  })) {
23539
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23539
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23540
23540
  }
23541
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23541
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23542
23542
  v: nextMatch1
23543
23543
  };
23544
23544
  };
@@ -27355,7 +27355,7 @@ const applyTemplate = (value, context)=>{
27355
27355
  return result;
27356
27356
  };
27357
27357
  const executePins = async (settingsOrigin, context = {})=>{
27358
- var _settings_conditions;
27358
+ var _settings_conditions, _settings_conditions1;
27359
27359
  const settings = await preparePinsSettings(settingsOrigin, context);
27360
27360
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27361
27361
  const results = [];
@@ -27380,11 +27380,22 @@ const executePins = async (settingsOrigin, context = {})=>{
27380
27380
  if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
27381
27381
  continue;
27382
27382
  }
27383
- const itemResult = await executePins(itemSettingsOrigin, itemContext);
27383
+ let itemResult = null;
27384
+ try {
27385
+ itemResult = await executePins(itemSettingsOrigin, itemContext);
27386
+ } catch (error) {
27387
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27388
+ continue;
27389
+ }
27390
+ throw error;
27391
+ }
27384
27392
  results.push(itemResult);
27385
27393
  }
27386
27394
  return results;
27387
27395
  }
27396
+ if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
27397
+ throw 'DIGIPAIR_CONDITIONS_IF_FALSE';
27398
+ }
27388
27399
  const version = context.config.VERSIONS[settings.library] || 'latest';
27389
27400
  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`));
27390
27401
  const pins = library == null ? void 0 : library[settings.element];
@@ -27398,23 +27409,23 @@ const executePinsList = async (pinsSettingsList, context)=>{
27398
27409
  const steps = [];
27399
27410
  // parcourir tous les pins
27400
27411
  for(let i = 0; i < pinsSettingsList.length; i++){
27401
- var _settings_conditions;
27402
27412
  const settings = pinsSettingsList[i];
27403
- if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
27404
- const preparedSettings = await preparePinsSettings(settings, context);
27405
- if (!preparedSettings.conditions.if) {
27413
+ try {
27414
+ previous = await executePins(settings, _extends({}, context, {
27415
+ previous,
27416
+ steps,
27417
+ parent: {
27418
+ previous: context.previous,
27419
+ steps: context.steps,
27420
+ parent: context.parent
27421
+ }
27422
+ }));
27423
+ } catch (error) {
27424
+ if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
27406
27425
  continue;
27407
27426
  }
27427
+ throw error;
27408
27428
  }
27409
- previous = await executePins(settings, _extends({}, context, {
27410
- previous,
27411
- steps,
27412
- parent: {
27413
- previous: context.previous,
27414
- steps: context.steps,
27415
- parent: context.parent
27416
- }
27417
- }));
27418
27429
  steps[i] = {
27419
27430
  name: settings.name,
27420
27431
  result: previous
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-cron",
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"