(hookName: string)
| 401 | } |
| 402 | |
| 403 | const usePluginsCtx = (hookName: string): ExecutorPluginsContextValue => { |
| 404 | const ctx = useContext(ExecutorPluginsContext); |
| 405 | if (!ctx) { |
| 406 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React hook invariant |
| 407 | throw new Error(`${hookName} must be called inside an <ExecutorPluginsProvider>.`); |
| 408 | } |
| 409 | return ctx; |
| 410 | }; |
| 411 | |
| 412 | /** Full list of loaded `ClientPluginSpec` values. */ |
| 413 | export const useClientPlugins = (): readonly ClientPluginSpec[] => |
no outgoing calls
no test coverage detected