()
| 1444 | } |
| 1445 | |
| 1446 | export function clearRegisteredPluginHooks(): void { |
| 1447 | if (!STATE.registeredHooks) { |
| 1448 | return |
| 1449 | } |
| 1450 | |
| 1451 | const filtered: Partial<Record<HookEvent, RegisteredHookMatcher[]>> = {} |
| 1452 | for (const [event, matchers] of Object.entries(STATE.registeredHooks)) { |
| 1453 | // Keep only callback hooks (those without pluginRoot) |
| 1454 | const callbackHooks = matchers.filter(m => !('pluginRoot' in m)) |
| 1455 | if (callbackHooks.length > 0) { |
| 1456 | filtered[event as HookEvent] = callbackHooks |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | STATE.registeredHooks = Object.keys(filtered).length > 0 ? filtered : null |
| 1461 | } |
| 1462 | |
| 1463 | export function resetSdkInitState(): void { |
| 1464 | STATE.initJsonSchema = null |
no test coverage detected