{"_id":"@jongleberry/api-server","_rev":"9-d5c189bcc764cf91c5c10acf1a6db9f2","name":"@jongleberry/api-server","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"@jongleberry/api-server","version":"1.0.0","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.0.0","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jongleberry/api-server","bugs":{"url":"https://github.com/jongleberry/api-server/issues"},"dist":{"shasum":"265a450f20a1386ac59246794319b2e779cb0863","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.0.0.tgz","fileCount":33,"integrity":"sha512-jzIa+NB8PAujBgy3t9iEKYmw914HOEUjtHPPgGsghkbtZeBVJ4Dk2M+k7Ii2SUediEBHxdEOUzgb2GEngxksOg==","signatures":[{"sig":"MEQCICPZx6ioB2+E5cpiNwLKaaFjbe/YWjkmn+eYcb5/H1YCAiBfLG5oTlsaNzxdKB0t5mXq7FMKa96ZAMzJsm/E4tStnQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44527},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"5d3ec2394767712288f282f7437dd6329e0e54e1","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"repository":{"url":"git+https://github.com/jongleberry/api-server.git","type":"git"},"_npmVersion":"11.13.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"26.1.0","dependencies":{"bytes":"^3.1.2","cookie":"^1.1.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.50.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^6.0.3","@types/node":"^25.8.0","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.0.0_1778967807610_0.5597363999002201","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@jongleberry/api-server","version":"1.0.3","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.0.3","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"14fdea1e24b26653bfe8c0884ce3431e49a376d8","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.0.3.tgz","fileCount":33,"integrity":"sha512-LrTtQIJ3duHJcwdwI6TqEZzpXTetmiPwkh9agWcTBcWaN3/wsUCePO7s7S6ZePkvItQxcxIEPMRDRuJAL9Dl+Q==","signatures":[{"sig":"MEUCIQCpHF8iuCEHAtD5GIFIFcDX4OjuX+p4vCbl5N64/qyAGwIgERxIgJUesshYHGVP2Bre/yI9e4peeiE0zOZ5J8rO6ss=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46497},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"90b9afdc3f3a00e80085109935e66cfaaa99dbc3","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.12.1","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.15.0","dependencies":{"bytes":"^3.1.2","cookie":"^1.1.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.50.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^6.0.3","@types/node":"^25.8.0","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.0.3_1778970887859_0.05799517043284763","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@jongleberry/api-server","version":"1.0.4","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.0.4","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"e8a5d9b5fa9c847debf475a8e6f4be2bfb781e46","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.0.4.tgz","fileCount":33,"integrity":"sha512-vdBUNVGLm4+68JrUYXswUzanuQhydLKd/aUKpwq8sRc8wDirJ2Zw9RRDpxr1Q0z/DiRafqJRQqHg7LMAt0JTEQ==","signatures":[{"sig":"MEQCIB1IdBsOp2gdc5PLOLfB0nq1ijPwKIFHJYYYFgcDl3zPAiBQNbvRsld9+BALD944hD99Exxc4Igu1JJVN2iMKZYqRA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47406},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"09a38e4458e8ffb828772bf49751336188822b86","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.12.1","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.15.0","dependencies":{"bytes":"^3.1.2","cookie":"^1.1.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.50.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^6.0.3","@types/node":"^25.8.0","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.0.4_1779153682220_0.17056412378869368","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@jongleberry/api-server","version":"1.1.0","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.1.0","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"b26b02a2dd853f4d79c9bc3352a6110db0da453a","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.1.0.tgz","fileCount":33,"integrity":"sha512-sSXCThHWdPYGD6Oh2vFkM72vjF1kN5FtnD7YA6EgwFk8O4abrqvlXzCvIsqlsS0tdfCXXjEe3IGoGF50X0uLXA==","signatures":[{"sig":"MEUCIQCqNdp1uJMuvN79xyc4nNIVNriPfDtaxpeCdGpx6vebgAIgMbwU1O6mZ6VUzihxvSsMvbZmXAjG5SqdD+Meowpv6OU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51244},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"1e58fd68c36e77297e6f8a2e977e19d124552cef","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.13.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.16.0","dependencies":{"bytes":"^3.1.2","cookie":"^1.1.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.51.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^6.0.3","@types/node":"^25.8.0","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.1.0_1781068559865_0.6187914674553805","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@jongleberry/api-server","version":"1.2.0","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.2.0","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"9862f57e409beaf77a57913c2276f6dc1aca7b17","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.2.0.tgz","fileCount":37,"integrity":"sha512-t+WgipcWbcAZEmxocSdrzJw3fCx/s0/wLSIvPtrzHXHgImBFfYzGU//IKzYlLKh4pPIMySRbTfl5TJTwAnd4sA==","signatures":[{"sig":"MEUCIBxuDs+DYDLIOCznBt5gyD2XDKgVP2T9Sob55AriDj2hAiEA3fhA0DZ4l2ILPiGooqZt63pxvcOiUq8R1+HJ1AP/2JE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57230},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"17a57bbce30f6f070c3d7e32a75912a2b9ac2be6","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.16.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.18.0","dependencies":{"bytes":"^3.1.2","cookie":"^2.0.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.56.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^6.0.3","@types/node":"^26.0.1","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.2.0_1784097654406_0.07112983148902408","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@jongleberry/api-server","version":"1.2.1","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.2.1","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"31f3e79052216e810e8bb021daf890cd40b7890c","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.2.1.tgz","fileCount":39,"integrity":"sha512-sNvmfZPUxuM7d+vcZs8R6FwhSsngeB9JUXn6mio3yKGXUVZMuqDXDqIX3ajwnzYJA2yHq4k3XcNdmEvU7l1ciw==","signatures":[{"sig":"MEUCIGfOrGZy5Sq8ie9KnlA4q0nwuLKvaguu7a1IG8fjKzfjAiEA6pycf30nmzx/rHU1Gusjj9iimOl7H8KJsp9OAaP0HuM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58070},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"401309bfce90a4f741acb0452bfc33a4b48eba38","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.16.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.18.0","dependencies":{"bytes":"^3.1.2","cookie":"^2.0.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.59.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^7.0.2","@types/node":"^26.0.1","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.2.1_1785046499150_0.5028020445384622","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@jongleberry/api-server","version":"1.2.2","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@1.2.2","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"9497924f6dd210d1a2db09134ad0534cbcce1c76","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-1.2.2.tgz","fileCount":39,"integrity":"sha512-qhgQsgSww1jfelJ1rz0aYi/xktlrxasSPsP27DPOAQU+sEsZVWRY5Kdgeqsd9jbN4oHmIyitRWN62gAUMwH8EQ==","signatures":[{"sig":"MEQCIHpQu4O+aSjXtFEB/q2FvpmG3ijVwiyLdccMj92iMD0wAiAeFG3tCAxKquFXxdMCmOGZLn0JiXakCDsZ8AyK2Yg8tg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58070},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"00c8555e897843f57ebfb93852d50bfa1eec16d4","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.16.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.18.0","dependencies":{"bytes":"^3.1.2","cookie":"^2.0.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.59.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^7.0.2","@types/node":"^26.0.1","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_1.2.2_1785046566064_0.18927692864439183","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@jongleberry/api-server","version":"2.0.0","keywords":["http","server","node","api","express","koa","router"],"author":{"name":"Jonathan Ong"},"license":"MIT","_id":"@jongleberry/api-server@2.0.0","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/jonathanong/api-server","bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"dist":{"shasum":"f6d0364d12e3ff913523f5bf0148bc6de0267e4b","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-2.0.0.tgz","fileCount":43,"integrity":"sha512-hLqrH2V5Vo4hAj1JYRxVYXDaoiglemIXJDlNrfX9cwxdYcdD2IHp9KC9P63ALeBtzaPnDVmDcLoZP/nmUoYonA==","signatures":[{"sig":"MEQCICuN5zFsxhlbzUxHAMoACs97uO0861Gie2l0E31NE1qQAiArgwiuYotugj3AJnkvSicrIwItVx+iz5vs0KFIoINHeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":67060},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"}},"gitHead":"b557b5786b3a89ec5ee6612b61bba1759e64f129","scripts":{"lint":"oxlint src/ runtime-tests/","test":"vitest run","build":"node scripts/build.mjs","format":"oxfmt src/ runtime-tests/ docs/ README.md","prepare":"node scripts/install-husky.mjs","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:runtimes":"npm run test:deno && npm run test:bun","prepublishOnly":"npm run typecheck && npm test && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"repository":{"url":"git+https://github.com/jonathanong/api-server.git","type":"git"},"_npmVersion":"11.17.0","description":"A Node.js HTTP server library","directories":{},"_nodeVersion":"24.19.0","dependencies":{"bytes":"^3.1.2","cookie":"^2.0.1","type-is":"^2.1.0","negotiator":"^1.0.0","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","compressible":"^2.0.18","json-stream-stringify":"^3.1.7"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","oxfmt":"^0.63.0","oxlint":"^1.65.0","vitest":"^4.1.6","supertest":"^7.2.2","typescript":"^7.0.2","@types/node":"^26.0.1","@types/bytes":"^3.1.5","@types/type-is":"^1.6.7","@types/supertest":"^7.2.0","@types/negotiator":"^0.6.4","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/compressible":"^2.0.3","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/api-server_2.0.0_1787511674358_0.9840991020477503","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@jongleberry/api-server","version":"2.1.0","description":"A Node.js HTTP server library","license":"MIT","author":{"name":"Jonathan Ong"},"type":"module","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./trusted-client-ip":{"types":"./dist/trusted-client-ip.d.mts","import":"./dist/trusted-client-ip.mjs"},"./http-retry":{"types":"./dist/http-retry.d.mts","import":"./dist/http-retry.mjs"},"./sha256":{"types":"./dist/sha256.d.mts","import":"./dist/sha256.mjs"}},"engines":{"node":">=24.0.0"},"dependencies":{"bytes":"^3.1.2","compressible":"^2.0.18","cookie":"^2.0.1","find-my-way":"^9.6.0","http-assert":"^1.5.0","http-errors":"^2.0.1","json-stream-stringify":"^3.1.7","negotiator":"^1.0.0","type-is":"^2.1.0"},"devDependencies":{"@types/bytes":"^3.1.5","@types/compressible":"^2.0.3","@types/http-assert":"^1.5.6","@types/http-errors":"^2.0.5","@types/negotiator":"^0.6.4","@types/node":"^26.0.1","@types/supertest":"^7.2.0","@types/type-is":"^1.6.7","@vitest/coverage-v8":"^4.1.6","husky":"^9.1.7","oxfmt":"^0.63.0","oxlint":"^1.65.0","supertest":"^7.2.2","typescript":"^7.0.2","vitest":"^4.1.6"},"scripts":{"build":"node scripts/build.mjs","prepare":"node scripts/install-husky.mjs","prepublishOnly":"npm run typecheck && npm test && npm run build","typecheck":"tsc --noEmit","lint":"oxlint src/ runtime-tests/","format":"oxfmt src/ runtime-tests/ docs/ README.md","format:check":"oxfmt --check src/ runtime-tests/ docs/ README.md","test":"vitest run","test:coverage":"vitest run --coverage && node scripts/strip-lcov-branches.mjs","test:deno":"deno test --allow-net=127.0.0.1,localhost runtime-tests/trusted-client-ip.deno.test.mts","test:bun":"bun test runtime-tests/trusted-client-ip.bun.test.mts","test:runtimes":"npm run test:deno && npm run test:bun","test:watch":"vitest"},"keywords":["http","server","node","api","express","koa","router"],"repository":{"type":"git","url":"git+https://github.com/jonathanong/api-server.git"},"bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"homepage":"https://github.com/jonathanong/api-server","gitHead":"79883de16261340f75ffba0f56be006b6b7f035b","_id":"@jongleberry/api-server@2.1.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-L3lddxsqp6doNDowrsEweK1hJBQhfzhXxNmE4V1ofMCxCEwOVC+MSC+xRfKvsdhhW6+XpsgQVxufoEW9WB32ZA==","shasum":"2c49cf14a755c55a2617d40daac2c6a65212c3a9","tarball":"https://registry.npmjs.org/@jongleberry/api-server/-/api-server-2.1.0.tgz","fileCount":47,"unpackedSize":73272,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@jongleberry%2fapi-server@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1einrR2ZV2k/wTHNA6/Bn2eMmvHw3SUmLHgV99ZrCFAIgEcRhf+04r1MYtW37pvSBiyTNdiAqA4Qh3FrQ1LDqHm4="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b404e7c9-48c5-45fd-a035-1feb28afa537"}},"directories":{},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-server_2.1.0_1787987601693_0.42091138899005687"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-16T21:43:27.541Z","modified":"2026-08-29T07:13:22.182Z","1.0.0":"2026-05-16T21:43:27.774Z","1.0.3":"2026-05-16T22:34:48.014Z","1.0.4":"2026-05-19T01:21:22.365Z","1.1.0":"2026-06-10T05:16:00.004Z","1.2.0":"2026-07-15T06:40:54.548Z","1.2.1":"2026-07-26T06:14:59.285Z","1.2.2":"2026-07-26T06:16:06.217Z","2.0.0":"2026-08-23T19:01:14.502Z","2.1.0":"2026-08-29T07:13:21.836Z"},"bugs":{"url":"https://github.com/jonathanong/api-server/issues"},"author":{"name":"Jonathan Ong"},"license":"MIT","homepage":"https://github.com/jonathanong/api-server","keywords":["http","server","node","api","express","koa","router"],"repository":{"type":"git","url":"git+https://github.com/jonathanong/api-server.git"},"description":"A Node.js HTTP server library","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"readme":"# @jongleberry/api-server\n\nA lightweight Node.js HTTP server library built on a trie router with automatic compression, ETag caching, streaming, and a dev-friendly request logger.\n\n## Install\n\n```sh\nnpm install @jongleberry/api-server\n```\n\nRequires Node.js ≥ 24.\n\n## Quick start\n\n```ts\nimport http from \"node:http\";\nimport { Application } from \"@jongleberry/api-server\";\n\nconst app = new Application();\n\napp.route(\"/hello\").get((ctx) => {\n  ctx.json({ hello: \"world\" });\n});\n\napp.route(\"/users/:id\").get((ctx) => {\n  ctx.json({ id: ctx.params.id });\n});\n\nhttp.createServer(app.callback()).listen(3000);\n```\n\nOr use the factory shorthand:\n\n```ts\nimport { createApp } from \"@jongleberry/api-server\";\n\nconst app = createApp();\napp.route(\"/\").get((ctx) => ctx.json({ ok: true }));\n```\n\n## Features\n\n- **Trie router** — `find-my-way` under the hood; zero regex overhead on the hot path\n- **Buffered responses** — `ctx.json()`, `ctx.response.text()`, `.html()`, `.xml()`, `.buffer()`\n- **Streaming** — `ctx.pipeline(readable, ...transforms)` and `streamJsonObject()` with back-pressure and error propagation\n- **Automatic ETag** — SHA-256 ETag on every buffered 2xx; `If-None-Match` → 304\n- **Compression** — `br` / `gzip` / `deflate` negotiation; 1 KB threshold; `SYNC_FLUSH` for streams\n- **Server-Timing** — response latency as a `Server-Timing` header (buffered) or trailer (streaming)\n- **Abort signals** — `ctx.signal` / `ctx.abortController` wired to client disconnect\n- **Request body limits** — `ctx.request.buffer()` and `.json()` use a safe 1 MB default, with per-call overrides\n- **Mutation media-type safety** — body-bearing POST/PUT/PATCH/DELETE requests default to JSON, with route-level exceptions\n- **AsyncLocalStorage** — per-request store via `app.setAsyncLocalStorage(als)`\n- **Cookies** — `ctx.cookies.get()` / `.set()` with full `Set-Cookie` options\n- **Cache-Control** — `ctx.cacheControl(visibility, maxAge)` helper\n- **Trusted client IP** — proxy headers are opt-in via `trustProxy`; standalone helpers support Node, Deno, and Bun\n- **HTTP retry primitives** — strict Retry-After parsing, code-based network classification, and pure backoff calculation\n- **SHA-256** — standalone Node digest bytes shared by ETag generation\n- **Dev logger** — concurrent-request bar, color-coded status codes, timing thresholds; silent in `NODE_ENV=production` and `NODE_ENV=test`\n- **Error safety net** — error handlers that throw or return without a response still guarantee the client receives a response\n\n## Requirements\n\n- Node.js ≥ 24.0.0\n- ESM (`\"type\": \"module\"` or `.mjs` imports)\n\n## Documentation\n\nSee [docs/](docs/README.md) for full API reference:\n\n| Topic                                              | Description                                              |\n| -------------------------------------------------- | -------------------------------------------------------- |\n| [Getting started](docs/getting-started.md)         | Install, hello world, mounting on http.createServer      |\n| [Routing](docs/routing.md)                         | Route registration, params, notFoundHandler              |\n| [Context](docs/context.md)                         | Full `ctx` API surface                                   |\n| [Request](docs/request.md)                         | Body parsing, size limits, content-type detection        |\n| [Response](docs/response.md)                       | Buffered and streaming responses                         |\n| [ETag and caching](docs/etag-and-caching.md)       | Automatic ETags, 304s, Cache-Control                     |\n| [Compression](docs/compression.md)                 | br/gzip/deflate negotiation                              |\n| [Server-Timing](docs/server-timing.md)             | Response latency headers and trailers                    |\n| [Cookies](docs/cookies.md)                         | Reading and writing cookies                              |\n| [Error handling](docs/error-handling.md)           | errorHandler, notFoundHandler, http-errors               |\n| [Async local storage](docs/async-local-storage.md) | Per-request store                                        |\n| [Abort signals](docs/abort-signals.md)             | Client-disconnect propagation                            |\n| [Logger](docs/logger.md)                           | Dev logger configuration                                 |\n| [Trusted client IP](docs/trusted-client-ip.md)     | Node, Deno, and Bun client IP helpers                    |\n| [HTTP retry](docs/http-retry.md)                   | Strict header, Retry-After, network, and backoff helpers |\n| [SHA-256](docs/sha256.md)                          | Node digest helper and ETag reuse                        |\n| [Extending context](docs/extending-context.md)     | Adding methods to ctx                                    |\n| [Testing](docs/testing.md)                         | Testing patterns with vitest and supertest               |\n\n## Design\n\n- No middleware stack. Routes are registered directly on the application; request processing runs top-to-bottom in a single async function per request.\n- No magic. `ctx.req` and `ctx.res` are the raw Node.js `IncomingMessage` and `ServerResponse` objects.\n- Body is pull-based. `ctx.request.buffer()` and `ctx.request.json()` are explicit calls; the body is never automatically parsed and defaults to a 1 MB limit.\n- Responses are explicit. You choose buffered or streaming; the library doesn't buffer a stream or stream a buffer behind your back.\n\n## License\n\nMIT © Jonathan Ong 2026\n","readmeFilename":"README.md"}