Files
klz-cables.com/.pnpm-store/v10/files/09/ee3a9cf1b3b3fbe770617bafeaf2b945164dd93159c2b8eb2f6540093c95f3b2e039b5d4dd5021767a8bf56acd378b2b14fca18bf027bac04f6ba422da1c34
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

50 lines
1.3 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('./debug-build.js');
const debugLogger = require('./utils/debug-logger.js');
const is = require('./utils/is.js');
const syncpromise = require('./utils/syncpromise.js');
/**
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).
*/
function notifyEventProcessors(
processors,
event,
hint,
index = 0,
) {
try {
const result = _notifyEventProcessors(event, hint, processors, index);
return is.isThenable(result) ? result : syncpromise.resolvedSyncPromise(result);
} catch (error) {
return syncpromise.rejectedSyncPromise(error);
}
}
function _notifyEventProcessors(
event,
hint,
processors,
index,
) {
const processor = processors[index];
if (!event || !processor) {
return event;
}
const result = processor({ ...event }, hint);
debugBuild.DEBUG_BUILD && result === null && debugLogger.debug.log(`Event processor "${processor.id || '?'}" dropped event`);
if (is.isThenable(result)) {
return result.then(final => _notifyEventProcessors(final, hint, processors, index + 1));
}
return _notifyEventProcessors(result, hint, processors, index + 1);
}
exports.notifyEventProcessors = notifyEventProcessors;
//# sourceMappingURL=eventProcessors.js.map