{"_id":"@cuboapp/http-server","_rev":"14-4962e4d959c24df2528553fb407213a1","name":"@cuboapp/http-server","dist-tags":{"latest":"1.0.13"},"versions":{"1.0.0":{"name":"@cuboapp/http-server","version":"1.0.0","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.0","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"bcecc8f7eec3264a0dd653c998920f458ce1117d","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.0.tgz","fileCount":9,"integrity":"sha512-QZ9ZAWb0Vy8RbQOQHfQzzaIs/D36ZD7RwU0Ux7w7sOuMQuECAzuygx2WoaYRbgbXPK2ZMb5Ku35z/FQI+Q1zVA==","signatures":[{"sig":"MEUCIQCpjyDevsmqjf4UL80fPRlQorwlX7Vv8vDz033E07YzgAIgHE3qVp8j9nEg71WzK1EJMmYEo2DoO9uOjFw+Moz/rQI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7297},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"../utils"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.0_1761417578233_0.25170660796740396","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cuboapp/http-server","version":"1.0.1","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.1","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"b056b005ba237a6d4c695f3edb28481b76906572","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.1.tgz","fileCount":9,"integrity":"sha512-TzifhSKUc5eatPawCwY17uZMR7LypOqSd2KhGWhbuB8CmkA2I+/DP7J2CMdDJYE2wvVoPmHcCgQgd9gS8tmhqQ==","signatures":[{"sig":"MEUCIAXCVPWPe+1LWtaX6bqq50D8I6ukpJeH2dngsWUg42shAiEAjJ3eNIaBpUi1oM+kvmDw52BxjnFNfMXIAuSolzlxMYU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7294},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.1_1761459523649_0.043302214144946394","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@cuboapp/http-server","version":"1.0.2","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.2","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"f4ac467d60c93eb973d149bdfd6be7ebec9e4708","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.2.tgz","fileCount":9,"integrity":"sha512-OHH2QBLZK+vwSTtEfwPKlzzf6TbI2cxmiIx7juv+gXaCMRo0ea/4ZVm+Grn6l+rasNSa0gEm/q0YmCS3p0qFZA==","signatures":[{"sig":"MEUCIQDy0sHs9SYrQlkZZlG+Vgv8QhNX7eLC5k77N2RpSV/19QIgSHTC/HZX2GRnorhFEOErhgKPCj3gusvp0mNlvwqpDYQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9595},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.2_1763299812117_0.2909185497969782","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@cuboapp/http-server","version":"1.0.3","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.3","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"44035fbf8aeede9682cb9f85d4fe6e4516b4eeb7","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.3.tgz","fileCount":9,"integrity":"sha512-ISVcJTbrDl0q7waZpLWYD0tna/AOMaNxPrhY8PXOgNd2W9JQpakEW3bJi0dNn4w6nFI7yaftxa1wODOo4jLaHQ==","signatures":[{"sig":"MEUCIAZuKOFAhcDXMc/SCQBg0hBaLjS3Q/SAAUxKft4ij+hSAiEAhRPimG+WLJkilPXyBy2dZ4ymubNfuDu5SqBz5uPBv0U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9573},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.3_1763331405292_0.5912084372671136","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@cuboapp/http-server","version":"1.0.4","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.4","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"c9f52b3a21956816677112a7f0588ad8496e5052","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.4.tgz","fileCount":21,"integrity":"sha512-7oMeZ+YesS4qAZSSjHF859ufrAIcTqOPqIG3TO9n+Z+4RRfneskwH7b2Eyz1zezg8fde/OGqfNknsVTNRgEuBg==","signatures":[{"sig":"MEYCIQCJFJRXuDvnt2OaJR4tnY0AKNE48kSlVgVQzSTDzs2ghgIhALDUMhXr06pu/DYHeqcRdWGvPcL0ZYjBA0xe8ohv2Ivh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10759},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.4_1764508489561_0.6280665861843149","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@cuboapp/http-server","version":"1.0.5","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.5","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"efde777b3bb060b6cfb2271d57f62a776ad4b19a","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.5.tgz","fileCount":21,"integrity":"sha512-SfXw+ubrmjEEq4Ys35mFhd+xjJa1BXMBzWq5cIi0/KmpK/p51AFgfwmxb9HVDjJtRu2/bJjOKo56BtWYSrQ3RA==","signatures":[{"sig":"MEUCIQDjFCcLBSPEjlpATOlapoyvi3gRWrQIHhoZeLBQZ4IiQAIgHE7bKUpS5Fhje1HbjZ75W52n6wPGiK0XSjThqVrcMBI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10788},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.5_1764857759564_0.1569482587770421","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@cuboapp/http-server","version":"1.0.6","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.6","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"cb7885588db601da350c85615b8f1e956e71573b","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.6.tgz","fileCount":21,"integrity":"sha512-mm8UgYOxgx9jFqZ29utG2vcmBE6LkExf42aDiu2Q5z3f1pncwt1WZdsgL6EJfPupmnY7ySXR9pEvZVipRwzJKg==","signatures":[{"sig":"MEUCIE6bCFgHY0W+ouSUxtMGmK+klgg81LHYd5v7977Ird0aAiEA8YKGUR6J2di8mYZdzgNMo0BKv3DKABZf0jDSIJ/mxs4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10933},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.18.3","@cuboapp/utils":"1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.6_1765362174993_0.8779160943760058","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@cuboapp/http-server","version":"1.0.7","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.7","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"67286f971dd3c6651535aa3cd52d157ba5de2dfa","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.7.tgz","fileCount":22,"integrity":"sha512-Wtmpaj0Y9eDr21mR5/nvnyulLqGedRZRZNGDzrc2syex8ciA65TPQAJJ67sCjqx55fe8sH8Ac+Q0ijVnP7OtIg==","signatures":[{"sig":"MEQCIA0cao4Q5vcBlPCLHZF4sg4LcEJXClZgo1Wo50r95VQVAiACBLbidYHmwwQO/yISaXucWrMruhAiyd6IUHDzeQfoGg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213476},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.19.0","@cuboapp/utils":"1.0.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.7_1768827710277_0.9825128347487109","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@cuboapp/http-server","version":"1.0.8","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.8","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"bf8dac6399a09ed205b9732c18082f62bbeef2fb","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.8.tgz","fileCount":22,"integrity":"sha512-13ZCBk2WCM2iH6hi9VDWSXHiyLYtljCauwvCoZQ2F9XybiqinGAz/vNCNFo9XeJFMsckKyk0HpKGOLivuRwwMQ==","signatures":[{"sig":"MEQCIF1XGfQ1ZExJ6QvhQQHKoMdd4eNSPxNczpAchxPTDYSMAiBG8AbNwgLTSiSMbcsNVBBj1wJqO5pDfD40+aHEC0mRBQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213533},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.19.0","@cuboapp/utils":"1.0.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.8_1769772073953_0.963653395740192","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@cuboapp/http-server","version":"1.0.9","author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.9","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"a7748202c9e0b42801d822b107839422520a90f8","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.9.tgz","fileCount":22,"integrity":"sha512-FOYRyGkSoz9k+2rfxMtMDVwZFVMGc9rwIfw97sC/gBCgFjbO5dU4AF7sKEhoVKgHnZX5V0NdlWvjokGOz9Q4WA==","signatures":[{"sig":"MEUCIQD/WpDSCgfaVykY9y+tsA6oPJFzSA6FmB5Zsjt5SQWflgIgCMgxw6FRMs5H5TYaEWNrkV7DWYvh757h5AnKO/4K62M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213534},"main":"src/index.ts","type":"module","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git@cuboapp.gitlab.yandexcloud.net:cubo/http-server.git","type":"git"},"description":"Http server","directories":{},"dependencies":{"ws":"^8.19.0","@cuboapp/utils":"1.0.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^5.9.3","@types/node":"^24.9.1"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.9_1771311851252_0.44919588650982","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"@cuboapp/http-server","version":"1.0.10","keywords":["http","server","router","routing","rest","api","typescript","esm"],"author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.10","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"70b1b6108a5cdb512af9b0307276eaf8b5bcbb38","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.10.tgz","fileCount":43,"integrity":"sha512-iMfT83TVa1odNWhOxlajmqcUuW8lz5M8FuWTRzC5tEpQBfoUBy7stX3d67BI6LZMq9i1BCJYexqJCuWVF3drHw==","signatures":[{"sig":"MEUCIQDgNwKg1ZEss5oPtVZSldAOZcDuT+GzweJ/NRecIqRmLQIgLi5ZikIY48v+k1ca+IqWwClAbZsL0MLELWBWtoQ0N34=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46338},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"b4446f088a41df0e4589cf5125ad8a246f6bfe58","scripts":{"build":"npm run clean && tsc -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git+https://cuboapp.gitlab.yandexcloud.net/cubo/http-server.git","type":"git"},"_npmVersion":"11.11.0","description":"Minimal, type-safe HTTP server with routing, params, body parsing and auth for Node.js","directories":{},"sideEffects":false,"_nodeVersion":"22.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.10_1782019156337_0.828359908232289","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"@cuboapp/http-server","version":"1.0.11","keywords":["http","server","router","routing","rest","api","typescript","esm"],"author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.11","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"6bae3b7c55500fb4c933d03a29ae95bc118a459f","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.11.tgz","fileCount":43,"integrity":"sha512-E1ZdoMzAH925Gc4YYPIfWaZgCr37pf0/98eCYmmkE+tXAlIvF3RTwgV3b//dDcBicixQtwAOek342Cq36gJWhA==","signatures":[{"sig":"MEQCIEjQ0NXfogqMKyuHQf2WAPnMdcrcR2labLnGbiaqyZGBAiA8eA3WyHMM3oXs8fe1k7YvhrBWOHB32dz28pvCdUQSWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46222},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"c6d9a357ad4932e8fe5228fb7dac0813c46ef01e","scripts":{"build":"npm run clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git+https://cuboapp.gitlab.yandexcloud.net/cubo/http-server.git","type":"git"},"_npmVersion":"11.11.0","description":"Minimal, type-safe HTTP server with routing, params, body parsing and auth for Node.js","directories":{},"sideEffects":false,"_nodeVersion":"22.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.8.17","typescript":"^6.0.3","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.11_1782019683047_0.07601789851080754","host":"s3://npm-registry-packages-npm-production"}},"1.0.12":{"name":"@cuboapp/http-server","version":"1.0.12","keywords":["http","server","router","routing","rest","api","typescript","esm"],"author":{"name":"CuboSoft"},"license":"MIT","_id":"@cuboapp/http-server@1.0.12","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"dist":{"shasum":"ef4ee73f8faaa0ba57a00c513257f1e9bc37f5ff","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.12.tgz","fileCount":43,"integrity":"sha512-tzJhql/L+j09iwpE2JLLlYnxrpdoQWLCcvz30NAirhgRz6lzEE1+jIfzYg2Ff3WKxVbtt/rqv+q+Gpw8zKooxQ==","signatures":[{"sig":"MEQCIFldHm3R0EsUkGHsFTSND+89Sh5fDEUrVHRranlYMgKAAiAzLXj4PxKxLs0yqCejatoR7rRuTUYd8uq9WQSG2U9aXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47841},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"6d115c7c6f6cd0e9fcd5c5817cd10e9e9d9ae4bb","scripts":{"build":"npm run clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"repository":{"url":"git+https://cuboapp.gitlab.yandexcloud.net/cubo/http-server.git","type":"git"},"_npmVersion":"11.11.0","description":"Minimal, type-safe HTTP server with routing, params, body parsing and auth for Node.js","directories":{},"sideEffects":false,"_nodeVersion":"22.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.8.17","typescript":"^6.0.3","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-server_1.0.12_1784216979661_0.1670364263234314","host":"s3://npm-registry-packages-npm-production"}},"1.0.13":{"_id":"@cuboapp/http-server@1.0.13","dist":{"shasum":"dfc20205a4d807066dea8529b7ebd24534e7b778","tarball":"https://registry.npmjs.org/@cuboapp/http-server/-/http-server-1.0.13.tgz","fileCount":43,"integrity":"sha512-Is25NdC/1N4n8nZgnU/YlTUhLsYByRm896LHqjQstmkaRe4qmlLbe9JoRh7ni2DGfVuvvVprD19MbvgQ9VLG9g==","signatures":[{"sig":"MEQCIGD4JpYQWyiKA14oA8j3plNlKfIgHS7jzItrfBUABSl8AiBhjxk0hV+p/fM7E0hlmVpVAuKTCfkDah19M4WPimMz7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDw3m7+OOKnkrxNnEjf310JCqIeVWeOZl86P1OC8KAeaQIgU/iiOMZCOakIosdgg1iPbZSUh/5WiYcLyDSMaCHHqkc="}],"unpackedSize":48925},"main":"./dist/index.js","name":"@cuboapp/http-server","type":"module","types":"./dist/index.d.ts","author":{"name":"CuboSoft"},"module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"04c4542d1e76c67f63124177450b6b930825f668","license":"MIT","scripts":{"build":"npm run clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"version":"1.0.13","_npmUser":{"name":"acrobatius","email":"y@shelomentsev.pro"},"keywords":["http","server","router","routing","rest","api","typescript","esm"],"repository":{"url":"git+https://cuboapp.gitlab.yandexcloud.net/cubo/http-server.git","type":"git"},"_npmVersion":"11.11.0","description":"Minimal, type-safe HTTP server with routing, params, body parsing and auth for Node.js","directories":{},"maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"sideEffects":false,"_nodeVersion":"22.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.8.17","typescript":"^6.0.3","@types/node":"^26.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/http-server_1.0.13_1791187768428_0.08798298149067407"}}},"time":{"created":"2025-10-25T18:39:38.095Z","modified":"2026-10-05T08:09:29.011Z","1.0.0":"2025-10-25T18:39:38.440Z","1.0.1":"2025-10-26T06:18:43.832Z","1.0.2":"2025-11-16T13:30:12.336Z","1.0.3":"2025-11-16T22:16:45.493Z","1.0.4":"2025-11-30T13:14:49.785Z","1.0.5":"2025-12-04T14:15:59.699Z","1.0.6":"2025-12-10T10:22:55.136Z","1.0.7":"2026-01-19T13:01:50.435Z","1.0.8":"2026-01-30T11:21:14.113Z","1.0.9":"2026-02-17T07:04:11.405Z","1.0.10":"2026-06-21T05:19:16.470Z","1.0.11":"2026-06-21T05:28:03.177Z","1.0.12":"2026-07-16T15:49:39.866Z","1.0.13":"2026-10-05T08:09:28.511Z"},"author":{"name":"CuboSoft"},"license":"MIT","keywords":["http","server","router","routing","rest","api","typescript","esm"],"repository":{"url":"git+https://cuboapp.gitlab.yandexcloud.net/cubo/http-server.git","type":"git"},"description":"Minimal, type-safe HTTP server with routing, params, body parsing and auth for Node.js","maintainers":[{"name":"acrobatius","email":"y@shelomentsev.pro"}],"readme":"# @cuboapp/http-server\n\nA minimal, type-safe HTTP server for Node.js built on the native `node:http` module. It adds pattern-based routing with named (and optional) parameters, automatic body parsing, query parsing, CORS, and a pluggable authorization hook — with full TypeScript inference for request/response shapes.\n\n- **Zero runtime dependencies** — only Node's built-ins.\n- **ESM**, ships type declarations.\n- **Type-safe routes** — describe `Body`/`Params`/`Query` per route and get inference in the handler.\n\n## Install\n\n```bash\nnpm install @cuboapp/http-server\n```\n\nRequires Node.js >= 18.\n\n## Quick start\n\n```ts\nimport { createHttpServer } from '@cuboapp/http-server'\n\nconst server = createHttpServer({ host: '0.0.0.0', port: 3000, debug: true })\n\nawait server.registerRoute('GET', '/health', async () => ({ ok: true }))\n\nawait server.registerRoute('GET', '/users/:id', async ({ params }) => {\n  return { id: params.id }\n})\n\nawait server.registerRoute('POST', '/users', async ({ body }) => {\n  return { code: 201, created: body }\n})\n\nawait server.start()\n// Http server started: http://0.0.0.0:3000\n```\n\n## Routing\n\nRegister routes with `registerRoute(method, path, handler, opts?)`. Supported methods: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS`.\n\n### Parameters\n\nUse `:name` for a required parameter and `:name?` for an optional one:\n\n```ts\nawait server.registerRoute('GET', '/posts/:id', async ({ params }) => params.id)\nawait server.registerRoute('GET', '/posts/:id?', async ({ params }) => params.id ?? 'all')\n```\n\nA missing required parameter responds with `400`.\n\n### Query\n\nQuery string values are parsed into `ctx.query`:\n\n```ts\n// GET /search?q=hello\nawait server.registerRoute('GET', '/search', async ({ query }) => ({ q: query.q }))\n```\n\n### Typed routes\n\nPass a DTO describing the route to get full inference for `body`, `params`, and `query`:\n\n```ts\ntype CreateUser = {\n  Body: { name: string; email: string }\n  Params: { id: string }\n  Query: { invite?: string }\n}\n\nawait server.registerRoute<CreateUser>('POST', '/users/:id', async ({ body, params, query }) => {\n  // body.name, params.id, query.invite are all typed\n  return { code: 201, id: params.id, name: body.name }\n})\n```\n\n## Request body\n\nFor `POST`, `PUT`, and `PATCH` the body is read and parsed automatically into `ctx.body`:\n\n- `application/x-www-form-urlencoded` → parsed object\n- anything else → parsed as JSON, falling back to the raw string if parsing fails\n\nReading the body times out after 2 seconds and responds with `408`. To read the stream yourself (e.g. for uploads or streaming), set `manualBody` and use `ctx.request` directly:\n\n```ts\nawait server.registerRoute('POST', '/upload', async ({ request }) => {\n  // consume `request` as a raw stream yourself\n  return { ok: true }\n}, { manualBody: true })\n```\n\n## Responses\n\nThe value a handler returns determines the HTTP response:\n\n| Return value | Status | Body |\n| --- | --- | --- |\n| `string` / `number` / `boolean` | `200` | the value as text |\n| `null` / `undefined` | `200` | empty |\n| array | `200` | JSON |\n| object | `code ?? 200` | JSON of the remaining fields |\n\nFor an object response, the reserved keys `code`, `message`, and `headers` are interpreted and **removed** from the JSON body; everything else is serialized:\n\n```ts\nasync () => ({\n  code: 201,                          // -> HTTP status\n  headers: { contentType: 'application/json; charset=utf-8' },\n  id: 1,                              // -> body: { \"id\": 1, \"name\": \"Ada\" }\n  name: 'Ada'\n})\n```\n\n### Writing the response manually\n\nTo take full control of the response (custom streaming, redirects, etc.), write to `ctx.response` and return `{ raw: true }`. The server will not touch the response afterwards:\n\n```ts\nawait server.registerRoute('GET', '/stream', async ({ response }) => {\n  response.writeHead(200, { 'Content-Type': 'text/plain' })\n  response.end('streamed')\n  return { raw: true }\n})\n```\n\n### Errors\n\nThrow an object with `code` and `message` to send an error response:\n\n```ts\nawait server.registerRoute('GET', '/secret', async () => {\n  throw { code: 403, message: 'Forbidden' }\n})\n```\n\nUnmatched routes respond with `404`. CORS preflight (`OPTIONS`) requests are answered automatically with `204` and permissive CORS headers.\n\n## Authorization\n\nProvide an auth handler and opt routes in (or default all routes in). The handler receives the server and request, and can attach data to `request.auth` or throw to reject:\n\n```ts\ntype Ctx = { auth: { userId: string } }\n\nconst server = createHttpServer<Ctx>({\n  host: '0.0.0.0',\n  port: 3000,\n  auth: {\n    default: false, // set true to require auth on every route unless overridden\n    handler: async ({ request }) => {\n      const token = request.headers['authorization']\n      if (!token) throw { code: 401, message: 'Unauthorized' }\n      request.auth = { userId: 'resolved-from-token' }\n    }\n  }\n})\n\n// opt a single route into auth\nawait server.registerRoute('GET', '/me', async ({ auth }) => ({ userId: auth.userId }), { authorize: true })\n```\n\n## API\n\n### `createHttpServer<C>(options)`\n\nCreates a server instance.\n\n| Option | Type | Description |\n| --- | --- | --- |\n| `host` | `string` | Host to bind. |\n| `port` | `number` | Port to listen on. |\n| `debug` | `boolean` | Log startup and request errors. |\n| `auth.default` | `boolean` | Require auth on all routes by default. |\n| `auth.handler` | `(ctx) => void \\| Promise<void>` | Authorization hook. |\n\n### `HttpServer` methods\n\n- `registerRoute(method, path, handler, opts?)` — register a route. `opts` accepts `{ authorize?, manualBody? }`.\n- `start()` — initialize and begin listening.\n- `stop()` — close the server.\n- `init()` — build the underlying `http.Server` without listening.\n- `getInstance()` — the underlying `node:http` `Server` (available after `init()`/`start()`).\n\n### `httpRoute(method, path, handler, opts?)`\n\nA small helper to declare a route descriptor separately from a server instance, useful for collecting routes across modules:\n\n```ts\nimport { httpRoute } from '@cuboapp/http-server'\n\nexport const getHealth = httpRoute('GET', '/health', async () => ({ ok: true }))\n\n// later, against a server:\nawait server.registerRoute(getHealth.method, getHealth.path, getHealth.handler, getHealth.opts)\n```\n\n## License\n\nMIT © CuboSoft\n","readmeFilename":"README.md"}