{"_id":"@adityadev13/solvix","_rev":"5-947afca3fc29d28b2946b2c59a10fcb2","name":"@adityadev13/solvix","dist-tags":{"beta":"1.0.0-beta.2","latest":"1.0.0"},"versions":{"1.0.0-beta.1":{"name":"@adityadev13/solvix","version":"1.0.0-beta.1","keywords":["http","fetch","request","client","typescript","node","browser","bun","deno","edge","universal","network","axios-alternative"],"author":{"name":"Aditya Prakash"},"license":"MIT","_id":"@adityadev13/solvix@1.0.0-beta.1","maintainers":[{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"}],"homepage":"https://solvix-client.github.io/solvix-docs/","bugs":{"url":"https://github.com/Solvix-Client/solvix/issues"},"dist":{"shasum":"84d5c0f05d881d8ad5cb2777ce8f6db9e8c7cf8b","tarball":"https://registry.npmjs.org/@adityadev13/solvix/-/solvix-1.0.0-beta.1.tgz","fileCount":9,"integrity":"sha512-HxgT6/CEkdL3r7lzNdgJ2kYTkTyNicEODrnkm63QGxfUgj8Y0JiOrdAwOczgRKnM9+EdX4zNuu9tbqfDbpIsLA==","signatures":[{"sig":"MEUCIQCu+x2oPidkXGtdSwQQ3FS7RD9YFXbrdFR67d5kwtIq3gIgWNAq5oF7KF3b33kA4QjrW7uNMigIMA/8iKnR6hazAa0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334371},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"6d9342286feb3f1954871af20e74ba9f0eea55aa","scripts":{"dev":"tsup --watch","lint":"eslint .","size":"gzip -c dist/index.js | wc -c","test":"vitest","bench":"tsx bench/tokenRefreshStampede.bench.ts","build":"tsup","clean":"rm -rf dist","format":"prettier --write .","release":"changeset publish","changeset":"changeset","typecheck":"tsc --noEmit","release:beta":"npm version prerelease --preid=beta","release:major":"npm version major","release:minor":"npm version minor","release:patch":"npm version patch","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run typecheck"},"_npmUser":{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"},"repository":{"url":"git+https://github.com/Solvix-Client/solvix.git","type":"git"},"_npmVersion":"11.6.2","description":"Solvix — A universal, high-performance HTTP engine for modern JavaScript runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.1","axios":"^1.13.5","jsdom":"^28.1.0","eslint":"^10.0.0","vitest":"^4.0.18","prettier":"^3.8.1","happy-dom":"^20.6.3","tinybench":"^6.0.0","typescript":"^5.9.3","@types/node":"^25.3.0","@changesets/cli":"^2.29.8","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.56.0","@typescript-eslint/eslint-plugin":"^8.56.0"},"_npmOperationalInternal":{"tmp":"tmp/solvix_1.0.0-beta.1_1776676702422_0.09095746339966637","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package moved to @solvix-client/client — npm install \n  @solvix-client/client"},"1.0.0-beta.2":{"name":"@adityadev13/solvix","version":"1.0.0-beta.2","keywords":["http","fetch","request","client","typescript","node","browser","bun","deno","edge","universal","network","axios-alternative"],"author":{"name":"Aditya Prakash"},"license":"MIT","_id":"@adityadev13/solvix@1.0.0-beta.2","maintainers":[{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"}],"homepage":"https://solvix-client.github.io/solvix-docs/","bugs":{"url":"https://github.com/Solvix-Client/solvix/issues"},"dist":{"shasum":"63c9b324dccbfe9eacde6b0918c723f0669fa717","tarball":"https://registry.npmjs.org/@adityadev13/solvix/-/solvix-1.0.0-beta.2.tgz","fileCount":9,"integrity":"sha512-l9w0d8rauHFEX1msc8uwqzG8qW+efhhXTxPVAXfJs2ZDtmPq2TRJI67q6oz8FBsr8KjyI4iuOqvmlDp0rokb8Q==","signatures":[{"sig":"MEUCIQCHuT119z53Yz+fV5fSs/M0oX+FEujJqHcUvO9sfmtJGAIgbgzW0gTYKsybaneLuBaaSPaYJkTEKwri3eJj2kXTd7U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334414},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"22ce470a2653b355dff6e677872b49d6bd3e4637","scripts":{"dev":"tsup --watch","lint":"eslint .","size":"gzip -c dist/index.js | wc -c","test":"vitest","bench":"tsx bench/tokenRefreshStampede.bench.ts","build":"tsup","clean":"rm -rf dist","format":"prettier --write .","release":"changeset publish","changeset":"changeset","typecheck":"tsc --noEmit","release:beta":"npm version prerelease --preid=beta","release:major":"npm version major","release:minor":"npm version minor","release:patch":"npm version patch","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run typecheck"},"_npmUser":{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"},"repository":{"url":"git+https://github.com/Solvix-Client/solvix.git","type":"git"},"_npmVersion":"11.6.2","description":"Solvix — A universal, high-performance HTTP engine for modern JavaScript runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.1","axios":"^1.13.5","jsdom":"^28.1.0","eslint":"^10.0.0","vitest":"^4.0.18","prettier":"^3.8.1","happy-dom":"^20.6.3","tinybench":"^6.0.0","typescript":"^5.9.3","@types/node":"^25.3.0","@changesets/cli":"^2.29.8","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.56.0","@typescript-eslint/eslint-plugin":"^8.56.0"},"_npmOperationalInternal":{"tmp":"tmp/solvix_1.0.0-beta.2_1776679813239_0.9828620637704928","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package moved to @solvix-client/client — npm install \n  @solvix-client/client"},"1.0.0":{"name":"@adityadev13/solvix","version":"1.0.0","keywords":["http","fetch","request","client","typescript","node","browser","bun","deno","edge","universal","network","axios-alternative"],"author":{"name":"Aditya Prakash"},"license":"MIT","_id":"@adityadev13/solvix@1.0.0","maintainers":[{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"}],"homepage":"https://solvix-client.github.io/solvix-docs/","bugs":{"url":"https://github.com/Solvix-Client/solvix/issues"},"dist":{"shasum":"81dc710b58a55d6342381a5f33855a65b3602c6d","tarball":"https://registry.npmjs.org/@adityadev13/solvix/-/solvix-1.0.0.tgz","fileCount":11,"integrity":"sha512-nmkFZtOpOarAWJwd13jq4KjDpSjIorsYLvB/Dm8/R4jKKPWWV3kyZ1OEh9h+Oq/wFKADZsnA/pHs2FRbVi4AWA==","signatures":[{"sig":"MEUCIQC4hyLTjvGF4ec2Es2SSRAIQ4iT1+AFbq/mPkkathp7VQIgdBWoRKVRB3Bnlu/w57VtH5vPZ3Oz3Hkn9VDGYpci9GM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":504076},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1478070ece2858516cbc50a79fa87731c638acc1","scripts":{"dev":"tsup --watch","lint":"eslint .","size":"gzip -c dist/index.js | wc -c","test":"vitest","bench":"tsx bench/basic.bench.ts","build":"tsup","clean":"rm -rf dist","format":"prettier --write .","release":"changeset publish","bench:all":"tsx bench/basic.bench.ts && tsx bench/concurrency.bench.ts && tsx --expose-gc bench/memory.bench.ts && tsx bench/dedupe.bench.ts && tsx bench/retry-storm.bench.ts && tsx bench/tokenRefreshStampede.bench.ts","changeset":"changeset","typecheck":"tsc --noEmit","release:beta":"npm version prerelease --preid=beta","bench:network":"tsx bench/real-network.bench.ts","release:major":"npm version major","release:minor":"npm version minor","release:patch":"npm version patch","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run typecheck"},"_npmUser":{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"},"repository":{"url":"git+https://github.com/Solvix-Client/solvix.git","type":"git"},"_npmVersion":"11.12.1","description":"Solvix — A universal, high-performance HTTP engine for modern JavaScript runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.1","axios":"^1.13.5","jsdom":"^28.1.0","eslint":"^10.0.0","vitest":"^4.0.18","prettier":"^3.8.1","happy-dom":"^20.6.3","tinybench":"^6.0.0","typescript":"^5.9.3","@types/node":"^25.3.0","@changesets/cli":"^2.29.8","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.56.0","@typescript-eslint/eslint-plugin":"^8.56.0"},"_npmOperationalInternal":{"tmp":"tmp/solvix_1.0.0_1782235338119_0.6939424846466558","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package moved to @solvix-client/client — npm install \n  @solvix-client/client"}},"time":{"created":"2026-04-20T09:18:22.322Z","modified":"2026-09-26T16:29:58.902Z","1.0.0-beta.1":"2026-04-20T09:18:22.565Z","1.0.0-beta.2":"2026-04-20T10:10:13.381Z","1.0.0":"2026-06-23T17:22:18.300Z"},"bugs":{"url":"https://github.com/Solvix-Client/solvix/issues"},"author":{"name":"Aditya Prakash"},"license":"MIT","homepage":"https://solvix-client.github.io/solvix-docs/","keywords":["http","fetch","request","client","typescript","node","browser","bun","deno","edge","universal","network","axios-alternative"],"repository":{"url":"git+https://github.com/Solvix-Client/solvix.git","type":"git"},"description":"Solvix — A universal, high-performance HTTP engine for modern JavaScript runtimes.","maintainers":[{"name":"adityadev13","email":"Prakashaditya13011999@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"assets/solvix-png.png\" width=\"120\" alt=\"Solvix Logo\" />\n</p>\n\n<h1 align=\"center\">Solvix</h1>\n\n<p align=\"center\">\n  Enterprise-Grade HTTP Orchestration Engine for Modern JavaScript\n</p>\n\n<p align=\"center\">\n  Resilience • Security • Observability • Control\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/npm/v/@adityadev13/solvix?style=flat&color=2563EB\" alt=\"npm version\" />\n  <img src=\"https://img.shields.io/npm/l/@adityadev13/solvix?style=flat&color=14B8A6\" alt=\"license\" />\n  <img src=\"https://img.shields.io/npm/types/@adityadev13/solvix?style=flat&color=9333EA\" alt=\"typescript support\" />\n  <img src=\"https://img.shields.io/badge/node-%3E%3D18.0.0-0EA5E9?style=flat\" alt=\"node version\" />\n  <img src=\"https://img.shields.io/badge/security-enterprise--grade-DC2626?style=flat\" alt=\"security\" />\n  <img src=\"https://img.shields.io/badge/Bundle-33KB%20ESM-16A34A?style=flat\" alt=\"bundle size\" />\n  <img src=\"https://img.shields.io/badge/Tests-171%20passing-9333EA?style=flat\" alt=\"tests\" />\n</p>\n\n---\n\n**Solvix is an HTTP orchestration engine** — not just a client. It transforms simple API requests into secure, observable, resilient, and fully controlled execution pipelines.\n\nUnlike traditional HTTP clients (Axios, Got, SuperAgent) that leave resilience, security, and observability to the developer, Solvix bakes ~50 features into a single 33 KB package.\n\n---\n\n## Why Solvix?\n\n| Feature | Solvix | Axios | Got |\n|---------|--------|-------|-----|\n| Security (CRLF protection, size guards, method allowlisting, HTTPS enforcement, header sanitization) | ✅ **12 features** | ❌ Cookie/XSS only | ❌ Basic |\n| Circuit Breaker | ✅ Built-in | ❌ | ❌ |\n| Rate Limiter (token bucket + adaptive from headers) | ✅ Built-in | ❌ | ❌ |\n| Request Deduplication | ✅ Built-in | ❌ | ❌ |\n| Priority Queue with concurrency control | ✅ Built-in | ❌ | ❌ |\n| SSE / JSON Lines streaming | ✅ Built-in | ❌ | ❌ |\n| W3C Distributed Tracing | ✅ Built-in | ❌ | ❌ |\n| Health Checks | ✅ Built-in | ❌ | ❌ |\n| Correlation IDs | ✅ Built-in | ❌ | ❌ |\n| Structured Logging | ✅ Built-in | ❌ | ❌ |\n| Metrics (counters + histograms) | ✅ Built-in | ❌ | ❌ |\n| Request Timeline & Profiling | ✅ Built-in | ❌ | ❌ |\n| Snapshot Debugging | ✅ Built-in | ❌ | ❌ |\n| Shadow Mode (dual API testing) | ✅ Built-in | ❌ | ❌ |\n| Offline Queue | ✅ Built-in | ❌ | ❌ |\n| Token Refresh (stampede-safe) | ✅ Built-in | ❌ | ❌ |\n| CSRF Protection | ✅ Built-in | ❌ | ❌ |\n| Cookie Jar | ✅ Built-in | ❌ | ❌ |\n| ETag / Conditional Requests | ✅ Built-in | ❌ | ❌ |\n| Fallback URLs | ✅ Built-in | ❌ | ❌ |\n| Upload/Download Progress | ✅ Built-in | ✅ | ✅ |\n| Custom Middleware | ✅ `client.use()` | ✅ Interceptors | ❌ |\n| SSL/TLS Customization | ✅ (via undici) | ✅ | ✅ |\n| HTTP Proxy | ✅ (via undici) | ✅ | ✅ |\n| **Bundle Size** | **33 KB** | ~52 KB | ~42 KB |\n\n---\n\n## Quick Start\n\n```bash\nnpm install @adityadev13/solvix\n```\n\n```ts\nimport { createClient } from \"@adityadev13/solvix\";\n\nconst api = createClient({ baseURL: \"https://api.example.com\" });\n\nconst res = await api.get(\"/users\");\nconsole.log(res.data);        // parsed JSON\nconsole.log(res.status);      // 200\nconsole.log(res.meta);        // timing, timeline, profiling\n```\n\n---\n\n## Core Features\n\n### 🛡️ Security\n\n```ts\nconst api = createClient({\n  security: {\n    enforceHTTPS: true,\n    allowedDomains: [\"api.example.com\"],\n    allowedMethods: [\"GET\", \"POST\"],\n    maxBodySize: 1_000_000,\n    maxResponseSize: 10_000_000,\n  },\n  csrf: { enabled: true },               // Auto-inject CSRF token from cookie\n  tls: { rejectUnauthorized: false },     // Self-signed certs (Node.js)\n  proxy: { host: \"gateway.corp.com\", port: 8080 }, // Corporate proxy\n});\n```\n\n- CRLF injection protection (always on)\n- Forbidden header stripping (`Host`, `Connection`, `Content-Length`)\n- Insecure header stripping (`Authorization`, `Cookie`, `X-Api-Key`)\n- Snapshot redaction (passwords masked in debug output)\n- Domain whitelisting, method allowlisting, size guards\n\n### ⚡ Resilience\n\n```ts\nconst api = createClient({\n  retry: { retries: 3, factor: 2, jitter: true },\n  circuitBreaker: { failureThreshold: 5, rollingWindow: 10000 },\n  rateLimit: { capacity: 10, refillRate: 5, interval: 1000 },\n  dedupe: true,                           // 1000 identical calls → 1 network request\n  fallbackURLs: [\"https://backup.example.com\"],\n  maxConcurrency: 50,\n});\n```\n\n- Retry with exponential backoff, jitter, and adaptive timing\n- Circuit breaker per-host with half-open probes\n- Token bucket rate limiter with server-side header sync\n- Priority queue with concurrency control and drop strategies\n- Automatic deduplication via SHA-256 fingerprinting\n\n### 🔍 Observability\n\n```ts\nconst api = createClient({\n  timeline: { enabled: true },\n  profiling: { enabled: true },\n  correlation: { enabled: true },\n  tracing: { enabled: true },\n  logger: console,\n  metrics: { enabled: true },\n  healthCheck: { enabled: true, endpoint: \"/health\" },\n});\n\n// Events — subscribe globally\nimport { SolvixBus } from \"@adityadev13/solvix\";\nSolvixBus.on(\"request:complete\", (e) => {\n  console.log(`${e.context.url} → ${e.context.response?.status}`);\n});\n\n// Metrics — aggregate counters\nconst m = api.metrics();\nconsole.log(m.totalRequests, m.successCount, m.failureCount, m.durationHistogram);\n\n// Health — check backend status\nconsole.log(api.healthCheck?.isHealthy());\n```\n\n- 15-stage request timeline with microsecond precision\n- Profile metrics: queue wait, rate limit wait, network, parse, total time\n- W3C `traceparent` header for distributed tracing\n- Correlation IDs (`X-Request-ID`) in every log line\n- Duration histogram with configurable buckets\n- Periodic health endpoint pinging with status change callbacks\n\n### 📦 Data Handling\n\n```ts\n// Streaming (SSE / JSON Lines)\nfor await (const event of api.get(\"/events\", { sse: true })) {\n  console.log(event.data);\n}\n\n// Upload progress\nconst api = createClient({\n  hooks: {\n    onUploadProgress: ({ loaded, total }) => console.log(`${loaded}/${total}`),\n    onDownloadProgress: ({ percent }) => updateProgressBar(percent ?? 0),\n  },\n});\n\n// Custom response validation\nconst api = createClient({\n  validateResponse: (data) => {\n    if (!data.id) throw new Error(\"Missing id\");\n    return data as MyType;\n  },\n});\n\n// Custom params format\nconst api = createClient({\n  paramsSerializer: (params) =>\n    `https://api.example.com/search?${Object.entries(params).map(([k, v]) => `${k}[]=${v}`).join(\"&\")}`,\n});\n```\n\n- Body types: json, form, multipart, text, blob, arrayBuffer, raw\n- Response types: json, text, blob, arrayBuffer, formData, stream, raw\n- Transform pipeline: `transformRequest` → `buildRequestBody` → transport → `parseResponse` → `transformResponse` → `validateResponse`\n- SSE parsing, JSON Lines (NDJSON), raw stream iteration\n- Upload/download progress via ReadableStream counting\n\n### 🔄 Middleware\n\n```ts\nconst api = createClient({ baseURL: \"https://api.example.com\" });\n\napi.use(async (ctx, next) => {\n  const start = Date.now();\n  await next();\n  console.log(`${ctx.url} took ${Date.now() - start}ms`);\n});\n```\n\nCustom middleware runs in the request pipeline before the transport layer. Compose multiple middleware in order (onion model).\n\n---\n\n## Architecture\n\nEvery request flows through a controlled pipeline:\n\n```\nSecurity Checks → Query Params → Fingerprinting → Dedup/Cache Check\n→ Dependency Wait → Priority Queue → Rate Limiter → Circuit Breaker\n→ Retry Loop (sanitize → build body → middleware stack → parse)\n→ Validation → Caching → Events → Logging → Response\n```\n\nAll stages are opt-in. Nothing runs unless configured.\n\n---\n\n## Documentation\n\nFor full documentation, API reference, and advanced guides:\n\n- **Detailed Docs** — [solvix-client.github.io/solvix-docs](https://solvix-client.github.io/solvix-docs/)\n- **API Reference** — Full JSDoc available in-editor via TypeScript declarations\n- **Benchmarks** — Run `npm run bench:all` locally to see performance on your hardware\n\n---\n\n## Supported Runtimes\n\n- Node.js 18+\n- Modern browsers (Chrome, Firefox, Safari, Edge)\n- Deno, Bun\n- Edge runtimes (Cloudflare Workers, Vercel Edge)\n\n---\n\n## Installation\n\n```bash\nnpm install @adityadev13/solvix\npnpm add @adityadev13/solvix\nyarn add @adityadev13/solvix\nbun add @adityadev13/solvix\n```\n\n---\n\n## License\n\nMIT\n\n---\n\n## Contributing\n\nWe welcome feature proposals, bug reports, security reviews, and performance improvements.\n\nSolvix transforms API communication into a reliable, observable, secure, and orchestrated execution system. It is not just a client — it is infrastructure.\n","readmeFilename":"README.md"}