Compare commits

...

2 commits

Author SHA1 Message Date
8adfa91831 fixed minor issue in tsconfig 2025-12-01 18:19:02 -05:00
9fe6e5d2a3 add manual and website to gitingore 2025-12-01 18:17:33 -05:00
5 changed files with 161 additions and 123 deletions

3
.gitignore vendored
View file

@ -63,3 +63,6 @@ website/
# Optional eslint cache
.eslintcache
website/
manual/

View file

@ -1,90 +1,90 @@
{
"name": "@catalystlabs/typedfetch",
"version": "0.2.0",
"description": "Type-safe HTTP client that doesn't suck - Fetch for humans who have stuff to build",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"typedfetch": "./dist/cli.js"
},
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"build": "bun run build:clean && bun run build:esm && bun run build:cjs && bun run build:cli && bun run build:types",
"build:clean": "rm -rf dist && mkdir dist",
"build:esm": "bun build src/index.ts --outdir dist --target browser --format esm",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --target=node16 --format=cjs --platform=node",
"build:cli": "bun build src/cli.ts --outfile dist/cli.js --target node --format esm",
"build:types": "tsc --emitDeclarationOnly --outDir dist",
"typecheck": "tsc --noEmit",
"test": "bun x vitest run",
"sync-version": "node scripts/sync-version.js",
"prepublishOnly": "bun run build && bun run typecheck"
},
"keywords": [
"http",
"fetch",
"client",
"typescript",
"type-safe",
"api",
"rest",
"xhr",
"request",
"response",
"cache",
"retry",
"resilience",
"proxy",
"interceptor",
"transform"
],
"author": "TypedFetch Contributors",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://git.catalystlab.cc/caseycollier/TypeFetched.git"
},
"bugs": {
"url": "https://git.catalystlab.cc/caseycollier/TypeFetched/issues"
},
"homepage": "https://typedfetch.dev",
"devDependencies": {
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"esbuild": "^0.19.0",
"eslint": "^8.0.0",
"gzip-size-cli": "^5.1.0",
"typescript": "^5.8.3",
"vitest": "^1.0.0"
},
"peerDependencies": {
"typescript": ">=4.7.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"engines": {
"node": ">=16.0.0"
},
"sideEffects": false,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/typedfetch"
}
"name": "@catalystlabs/typedfetch",
"version": "0.3.1",
"description": "Type-safe HTTP client that doesn't suck - Fetch for humans who have stuff to build",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"typedfetch": "./dist/cli.js"
},
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"build": "bun run build:clean && bun run build:esm && bun run build:cjs && bun run build:cli && bun run build:types",
"build:clean": "rm -rf dist && mkdir dist",
"build:esm": "bun build src/index.ts --outdir dist --target browser --format esm",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --target=node16 --format=cjs --platform=node",
"build:cli": "bun build src/cli.ts --outfile dist/cli.js --target node --format esm",
"build:types": "tsc --emitDeclarationOnly --outDir dist",
"typecheck": "tsc --noEmit",
"test": "bun x vitest run",
"sync-version": "node scripts/sync-version.js",
"prepublishOnly": "bun run build && bun run typecheck"
},
"keywords": [
"http",
"fetch",
"client",
"typescript",
"type-safe",
"api",
"rest",
"xhr",
"request",
"response",
"cache",
"retry",
"resilience",
"proxy",
"interceptor",
"transform"
],
"author": "TypedFetch Contributors",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://git.catalystlab.cc/caseycollier/TypeFetched.git"
},
"bugs": {
"url": "https://git.catalystlab.cc/caseycollier/TypeFetched/issues"
},
"homepage": "https://typedfetch.dev",
"devDependencies": {
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"esbuild": "^0.19.0",
"eslint": "^8.0.0",
"gzip-size-cli": "^5.1.0",
"typescript": "^5.8.3",
"vitest": "^1.0.0"
},
"peerDependencies": {
"typescript": ">=4.7.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"engines": {
"node": ">=16.0.0"
},
"sideEffects": false,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/typedfetch"
}
}

View file

@ -4,6 +4,7 @@
"module": "ESNext",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,

View file

@ -16,6 +16,7 @@
"@mantine/spotlight": "^8.0.0",
"@tabler/icons-react": "^3.26.0",
"@vercel/analytics": "^1.5.0",
"@vercel/speed-insights": "^1.2.0",
"framer-motion": "^11.15.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@ -30,4 +31,4 @@
"typescript": "^5.8.3",
"vite": "^6.0.7"
}
}
}

View file

@ -1,4 +1,4 @@
import { MantineProvider } from '@mantine/core';
import { MantineProvider, Loader, Stack, Text } from '@mantine/core';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { CodeHighlightAdapterProvider } from '@mantine/code-highlight';
import { lazy, Suspense } from 'react';
@ -7,6 +7,7 @@ import { shikiAdapter } from './utils/shikiAdapter';
import { theme } from './theme';
import { LandingPage } from './pages/LandingPage';
import { DocsLayout } from './layouts/DocsLayout';
import { ErrorBoundary } from './components/ErrorBoundary';
// Lazy load documentation pages for better performance
const GettingStarted = lazy(() => import('./pages/docs/GettingStarted'));
@ -26,6 +27,16 @@ import '@mantine/spotlight/styles.css';
import './styles/global.css';
import './styles/fonts.css';
// Loading component for Suspense fallbacks
function LoadingFallback() {
return (
<Stack align="center" justify="center" gap="sm" p="xl" style={{ minHeight: '200px' }}>
<Loader size="md" />
<Text size="sm" c="dimmed">Loading page...</Text>
</Stack>
);
}
export function App() {
return (
<MantineProvider theme={theme} defaultColorScheme="dark">
@ -35,59 +46,81 @@ export function App() {
<Route path="/" element={<LandingPage />} />
<Route path="/docs" element={<DocsLayout />}>
<Route index element={
<Suspense fallback={<div>Loading...</div>}>
<GettingStarted />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<GettingStarted />
</Suspense>
</ErrorBoundary>
} />
<Route path="installation" element={
<Suspense fallback={<div>Loading...</div>}>
<Installation />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<Installation />
</Suspense>
</ErrorBoundary>
} />
<Route path="basic-usage" element={
<Suspense fallback={<div>Loading...</div>}>
<BasicUsage />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<BasicUsage />
</Suspense>
</ErrorBoundary>
} />
<Route path="configuration" element={
<Suspense fallback={<div>Loading...</div>}>
<Configuration />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<Configuration />
</Suspense>
</ErrorBoundary>
} />
<Route path="error-handling" element={
<Suspense fallback={<div>Loading...</div>}>
<ErrorHandling />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<ErrorHandling />
</Suspense>
</ErrorBoundary>
} />
<Route path="type-inference" element={
<Suspense fallback={<div>Loading...</div>}>
<TypeInference />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<TypeInference />
</Suspense>
</ErrorBoundary>
} />
<Route path="caching" element={
<Suspense fallback={<div>Loading...</div>}>
<Caching />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<Caching />
</Suspense>
</ErrorBoundary>
} />
<Route path="interceptors" element={
<Suspense fallback={<div>Loading...</div>}>
<Interceptors />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<Interceptors />
</Suspense>
</ErrorBoundary>
} />
<Route path="ai-ml-use-cases" element={
<Suspense fallback={<div>Loading...</div>}>
<AIMLUseCases />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<AIMLUseCases />
</Suspense>
</ErrorBoundary>
} />
<Route path="axios-comparison" element={
<Suspense fallback={<div>Loading...</div>}>
<AxiosComparison />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<AxiosComparison />
</Suspense>
</ErrorBoundary>
} />
<Route path="api-reference" element={
<Suspense fallback={<div>Loading...</div>}>
<APIReference />
</Suspense>
<ErrorBoundary>
<Suspense fallback={<LoadingFallback />}>
<APIReference />
</Suspense>
</ErrorBoundary>
} />
</Route>
</Routes>