feat(fetch): plugin system + eslint/tsconfig migration

- Add fetch plugin API (definePlugin, plugins) with type-level option flow.
- Migrate to eslint flat config and composite tsconfig.
This commit is contained in:
2026-06-07 16:29:18 +07:00
parent 96f4cba4a8
commit a7e668ced8
19 changed files with 1759 additions and 233 deletions
+7
View File
@@ -2,6 +2,9 @@ import { createFetch } from './fetch';
export { createFetch } from './fetch';
export { FetchError, createFetchError } from './error';
export { composePlugins, definePlugin, runHookPhase } from './plugin';
export type { ComposedPlugins } from './plugin';
export { retryPlugin, timeoutPlugin } from './plugins';
export {
isPayloadMethod,
isJSONSerializable,
@@ -17,13 +20,17 @@ export type {
Fetch,
FetchContext,
FetchErrorOptions,
FetchExecuteMiddleware,
FetchHook,
FetchHooks,
FetchOptions,
FetchPlugin,
FetchRequest,
FetchResponse,
IFetchError,
MappedResponseType,
MergePluginContext,
MergePluginOptions,
ResponseMap,
ResponseType,
ResolvedFetchOptions,