{"id":29692412,"url":"https://github.com/jenslys/arcesso","last_synced_at":"2026-05-06T18:35:28.272Z","repository":{"id":305000984,"uuid":"1021510925","full_name":"jenslys/arcesso","owner":"jenslys","description":"A modern, zero-dependency TypeScript HTTP client (13KB) with Standard Schema validation, built on native fetch. Works everywhere: browsers, Node.js, Bun, Deno, serverless.","archived":false,"fork":false,"pushed_at":"2025-07-17T16:13:18.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-17T18:59:04.526Z","etag":null,"topics":["bun","fetch","standard-schema","typescript","valibot","zod"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenslys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T14:02:19.000Z","updated_at":"2025-07-17T16:13:23.000Z","dependencies_parsed_at":"2025-07-17T21:57:27.195Z","dependency_job_id":"643b9cec-5ba2-4569-8e20-c967737a81f4","html_url":"https://github.com/jenslys/arcesso","commit_stats":null,"previous_names":["jenslys/arcesso"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jenslys/arcesso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenslys%2Farcesso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenslys%2Farcesso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenslys%2Farcesso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenslys%2Farcesso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenslys","download_url":"https://codeload.github.com/jenslys/arcesso/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenslys%2Farcesso/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268431637,"owners_count":24249413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","fetch","standard-schema","typescript","valibot","zod"],"created_at":"2025-07-23T08:01:02.183Z","updated_at":"2026-05-06T18:35:23.248Z","avatar_url":"https://github.com/jenslys.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arcesso\n\nA modern, lightweight TypeScript HTTP client that's **zero dependencies** (13KB), **universal** (works in browsers and servers), and built on **native fetch**. Features Standard Schema validation, retry logic, timeout support, and comprehensive error handling.\n\n[![npm version](https://badge.fury.io/js/arcesso.svg)](https://badge.fury.io/js/arcesso)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n\u003e **arcesso** _(v.)_ - from Latin, meaning \"to summon\" or \"to fetch\": the act of calling forth or retrieving something, just like how this library elegantly fetches data from APIs.\n\n## Why Arcesso?\n\n- **Tiny \u0026 Fast**: Only 13KB bundled, zero dependencies, built on native fetch\n- **Universal**: Works in browsers, Node.js, Bun, Deno, Edge functions, and serverless\n- **Type-Safe**: Full TypeScript support with Standard Schema validation (Zod, Valibot)\n- **Production-Ready**: Comprehensive error handling, retries, timeouts, and auth helpers\n\n## Installation\n\n```bash\nnpm install arcesso\nnpm install zod # or valibot, arktype, etc.\n```\n\n## Quick Start\n\n```typescript\nimport { get, post } from \"arcesso\";\nimport { z } from \"zod\";\n\nconst UserSchema = z.object({\n  id: z.number(),\n  name: z.string(),\n  email: z.string().email(),\n});\n\nconst ErrorSchema = z.object({\n  error: z.string(),\n  code: z.number(),\n});\n\n// GET with auth and query params\nconst user = await get(\"/api/users/1\", {\n  auth: { bearer: \"token123\" },\n  query: { include: \"profile\" },\n  schemas: {\n    success: UserSchema,\n    error: ErrorSchema,\n  },\n});\n\n// POST with request body validation\nconst newUser = await post(\"/api/users\", {\n  name: \"John\",\n  email: \"john@example.com\",\n}, {\n  auth: { bearer: \"token123\" },\n  schemas: {\n    input: z.object({\n      name: z.string().min(1),\n      email: z.string().email(),\n    }),\n    success: UserSchema,\n    error: ErrorSchema,\n  },\n});\n```\n\n## Features\n\n### Authentication\nBuilt-in support for common auth methods:\n\n```typescript\n// Bearer token\nawait get(\"/api/users\", { auth: { bearer: \"jwt-token\" } });\n\n// API key\nawait get(\"/api/users\", { auth: { apiKey: \"api-key\" } });\n\n// Basic auth\nawait get(\"/api/users\", { \n  auth: { basic: { username: \"user\", password: \"pass\" } } \n});\n```\n\n### Query Parameters\nAutomatic query string building:\n\n```typescript\nawait get(\"/api/users\", {\n  query: { page: 1, limit: 10, active: true, filter: null }, // null values filtered out\n});\n// → GET /api/users?page=1\u0026limit=10\u0026active=true\n```\n\n### Schema Validation Pipeline\nValidate requests and responses:\n\n```typescript\nawait post(\"/api/users\", userData, {\n  schemas: {\n    input: CreateUserSchema,    // Validates request body\n    success: UserSchema,        // Validates successful response\n    error: ErrorSchema,         // Validates error response\n  },\n});\n```\n\n### Error Handling\nType-safe error handling with callbacks:\n\n```typescript\nconst user = await get(\"/api/users/1\", {\n  schemas: { success: UserSchema, error: ErrorSchema },\n  onHttpError: (errorData) =\u003e {\n    // errorData is typed from ErrorSchema\n    console.error(`API Error: ${errorData.error} (${errorData.code})`);\n    return null;\n  },\n  onTimeout: (error) =\u003e {\n    console.error(\"Request timed out\");\n    return null;\n  },\n});\n```\n\n### Retry Logic\nConfigurable retry with exponential backoff:\n\n```typescript\nawait get(\"/api/data\", {\n  retry: {\n    attempts: 3,\n    backoff: \"exponential\",\n    initialDelay: 1000,\n    maxDelay: 10000,\n  },\n});\n```\n\n### Global Configuration\nSet defaults for all requests:\n\n```typescript\nimport { configure } from \"arcesso\";\n\nconfigure({\n  baseUrl: \"https://api.example.com\",\n  headers: { Authorization: \"Bearer token\" },\n  timeout: 5000,\n  retry: { attempts: 3, backoff: \"exponential\" },\n});\n```\n\n## API Reference\n\n### HTTP Methods\n\n```typescript\n// All methods support the same options\nget(url, options?)\npost(url, body, options?)\nput(url, body, options?)\npatch(url, body, options?)\ndelete(url, options?)\n```\n\n### Request Options\n\n```typescript\ninterface ArcessoRequestOptions {\n  schemas?: {\n    input?: StandardSchemaV1;    // Validates request body\n    success?: StandardSchemaV1;  // Validates successful response\n    error?: StandardSchemaV1;    // Validates error response\n  };\n  auth?: {\n    bearer?: string;\n    apiKey?: string;\n    basic?: { username: string; password: string };\n  };\n  query?: Record\u003cstring, string | number | boolean | null | undefined\u003e;\n  headers?: Record\u003cstring, string\u003e;\n  timeout?: number;\n  retry?: RetryOptions;\n  // Error callbacks\n  onSuccess?: CallbackOption;\n  onError?: CallbackOption;\n  onHttpError?: CallbackOption;\n  onTimeout?: CallbackOption;\n  onValidationError?: CallbackOption;\n  onNetworkError?: CallbackOption;\n}\n```\n\n### Error Types\n\n- `ValidationError` - Schema validation failures\n- `NetworkError` - Network connectivity issues\n- `HttpError` - HTTP 4xx/5xx responses\n- `TimeoutError` - Request timeouts\n- `RetryExhaustedError` - All retry attempts failed\n\n## Validation Library Support\n\nArcesso implements the **[Standard Schema](https://github.com/standard-schema/standard-schema) specification** locally with **zero dependencies**. Works with any validation library that supports Standard Schema:\n\n| Library     | Status          |\n| ----------- | --------------- |\n| **Zod**     | ✅ Full support |\n| **Valibot** | ✅ Full support |\n| **ArkType** | ✅ Full support |\n| **Yup**     | ✅ If Standard Schema support is added |\n| **Joi**     | ✅ If Standard Schema support is added |\n| **Superstruct** | ✅ If Standard Schema support is added |\n| **io-ts**   | ✅ If Standard Schema support is added |\n| **Any other** | ✅ If Standard Schema compatible |\n\n```typescript\n// With Zod\nimport { z } from \"zod\";\nconst UserSchema = z.object({ name: z.string() });\n\n// With Valibot\nimport * as v from \"valibot\";\nconst UserSchema = v.object({ name: v.string() });\n\n// Both work identically\nconst user = await get(\"/api/users/1\", { schemas: { success: UserSchema } });\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenslys%2Farcesso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenslys%2Farcesso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenslys%2Farcesso/lists"}