()
| 1460 | } |
| 1461 | |
| 1462 | export function clearRegisteredPluginHooks(): void { |
| 1463 | if (!STATE.registeredHooks) { |
| 1464 | return |
| 1465 | } |
| 1466 | |
| 1467 | const filtered: Partial<Record<HookEvent, RegisteredHookMatcher[]>> = {} |
| 1468 | for (const [event, matchers] of Object.entries(STATE.registeredHooks)) { |
| 1469 | // Keep only callback hooks (those without pluginRoot) |
| 1470 | const callbackHooks = matchers.filter(m => !('pluginRoot' in m)) |
| 1471 | if (callbackHooks.length > 0) { |
| 1472 | filtered[event as HookEvent] = callbackHooks |
| 1473 | } |
| 1474 | } |
| 1475 | |
| 1476 | STATE.registeredHooks = Object.keys(filtered).length > 0 ? filtered : null |
| 1477 | } |
| 1478 | |
| 1479 | export function resetSdkInitState(): void { |
| 1480 | STATE.initJsonSchema = null |
no test coverage detected