()
| 41364 | _hasRun(s) { |
| 41365 | return this.getPluginRunCount(this.getCurrentPlugin()) > (s || 0) |
| 41366 | } |
| 41367 | dispatch() { |
| 41368 | const s = this, |
| 41369 | o = this.nextPlugin() |
| 41370 | if (!o) { |
| 41371 | const s = this.nextPromisedPatch() |
| 41372 | if (s) return s.then(() => this.dispatch()).catch(() => this.dispatch()) |
| 41373 | const o = { spec: this.state, errors: this.errors } |
| 41374 | return (this.showDebug && (o.patches = this.allPatches), Promise.resolve(o)) |
| 41375 | } |
| 41376 | if ( |
| 41377 | ((s.pluginCount = s.pluginCount || new WeakMap()), |
| 41378 | s.pluginCount.set(o, (s.pluginCount.get(o) || 0) + 1), |
| 41379 | s.pluginCount[o] > 100) |
| 41380 | ) |
| 41381 | return Promise.resolve({ |
| 41382 | spec: s.state, |
| 41383 | errors: s.errors.concat(new Error("We've reached a hard limit of 100 plugin runs")), |
| 41384 | }) |
| 41385 | if (o !== this.currentPlugin && this.promisedPatches.length) { |
| 41386 | const s = this.promisedPatches.map((s) => s.value) |
| 41387 | return Promise.all(s.map((s) => s.then(specmap_noop, specmap_noop))).then(() => |
| 41388 | this.dispatch() |
| 41389 | ) |
| 41390 | } |
| 41391 | return (function executePlugin() { |
| 41392 | s.currentPlugin = o |
| 41393 | const i = s.getCurrentMutations(), |
| 41394 | a = s.mutations.length - 1 |
| 41395 | try { |
| 41396 | if (o.isGenerator) for (const a of o(i, s.getLib())) updatePatches(a) |
| 41397 | else { |
| 41398 | updatePatches(o(i, s.getLib())) |
| 41399 | } |
| 41400 | } catch (s) { |
| 41401 | ;(console.error(s), updatePatches([Object.assign(Object.create(s), { plugin: o })])) |
| 41402 | } finally { |
| 41403 | s.updatePluginHistory(o, { mutationIndex: a }) |
| 41404 | } |
| 41405 | return s.dispatch() |
| 41406 | })() |
| 41407 | function updatePatches(i) { |
| 41408 | i && ((i = Wo.fullyNormalizeArray(i)), s.updatePatches(i, o)) |
| 41409 | } |
| 41410 | } |
| 41411 | } |
| 41412 | const tu = { refs: Xl, allOf: Ql, parameters: Zl, properties: eu } |
nothing calls this directly
no test coverage detected