(hookName: string)
| 511 | } |
| 512 | |
| 513 | const usePluginsCtx = (hookName: string): ExecutorPluginsContextValue => { |
| 514 | const ctx = useContext(ExecutorPluginsContext); |
| 515 | if (!ctx) { |
| 516 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React hook invariant |
| 517 | throw new Error(`${hookName} must be called inside an <ExecutorPluginsProvider>.`); |
| 518 | } |
| 519 | return ctx; |
| 520 | }; |
| 521 | |
| 522 | /** Full list of loaded `ClientPluginSpec` values. */ |
| 523 | export const useClientPlugins = (): readonly ClientPluginSpec[] => |
no outgoing calls
no test coverage detected