@digipair/skill-service 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 +31 -20
  2. package/index.esm.js +26 -15
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
23510
23510
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23511
23511
  // match is required
23512
23512
  if (!match) {
23513
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23513
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23514
23514
  v: nextMatch1
23515
23515
  };
23516
23516
  }
23517
23517
  var token = match.token, offset = match.offset;
23518
23518
  i1 += offset;
23519
23519
  if (token === " ") {
23520
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23520
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23521
23521
  }
23522
23522
  tokens1 = _to_consumable_array$1(tokens1).concat([
23523
23523
  token
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
23536
23536
  if (contextKeys.some(function(el) {
23537
23537
  return el.startsWith(name);
23538
23538
  })) {
23539
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23539
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23540
23540
  }
23541
23541
  if (dateTimeIdentifiers.some(function(el) {
23542
23542
  return el === name;
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
23555
23555
  if (dateTimeIdentifiers.some(function(el) {
23556
23556
  return el.startsWith(name);
23557
23557
  })) {
23558
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23558
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23559
23559
  }
23560
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23560
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23561
23561
  v: nextMatch1
23562
23562
  };
23563
23563
  };
@@ -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
@@ -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-service",
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"