Skip to content

Commit 7d40740

Browse files
committed
feat: add core HTTP client with plugin system and built-in plugins
Introduce a new package `@tdanks2000/api-core` that provides a shared HTTP client runtime for the api-wrappers organization. This foundational library includes: - A plugin-based architecture with lifecycle hooks (setup, beforeRequest, afterResponse, onError, dispose) - Built-in plugins for caching, retry logic, logging, and timeouts - GraphQL support with automatic error handling - Transport abstraction with a default fetch-based implementation - Comprehensive TypeScript types and error classes (ApiError, RateLimitError, TimeoutError) - Test suite covering all major components - Documentation including migration guide and plugin authoring guide The implementation enables consistent HTTP behavior across all API wrapper packages while maintaining backward compatibility with existing wrapper interfaces.
0 parents  commit 7d40740

45 files changed

Lines changed: 3735 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store
35+
36+
**/.ai

0 commit comments

Comments
 (0)