@alwatr/nanotron-api-server 9.3.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 📦 @alwatr/nanotron-api-server v9.
|
|
1
|
+
/* 📦 @alwatr/nanotron-api-server v9.4.0 */
|
|
2
2
|
import{createServer as N}from"node:http";import{createLogger as x}from"@alwatr/logger";import{createLogger as _}from"@alwatr/logger";import{createLogger as Z}from"@alwatr/logger";var m={GET:"GET",HEAD:"HEAD",POST:"POST",PUT:"PUT",DELETE:"DELETE",CONNECT:"CONNECT",OPTIONS:"OPTIONS",TRACE:"TRACE",PATCH:"PATCH"},U={Info_100_Continue:100,Info_101_Switching_Protocols:101,Info_102_Processing:102,Info_103_Early_Hints:103,Success_200_OK:200,Success_201_Created:201,Success_202_Accepted:202,Success_203_Non_Authoritative_Information:203,Success_204_No_Content:204,Success_205_Reset_Content:205,Success_206_Partial_Content:206,Success_207_Multi_Status:207,Success_208_Already_Reported:208,Success_226_IM_Used:226,Redirect_300_Multiple_Choices:300,Redirect_301_Moved_Permanently:301,Redirect_302_Found:302,Redirect_303_See_Other:303,Redirect_304_Not_Modified:304,Redirect_305_Use_Proxy:305,Redirect_306_Switch_Proxy:306,Redirect_307_Temporary_Redirect:307,Redirect_308_Permanent_Redirect:308,Error_Client_400_Bad_Request:400,Error_Client_401_Unauthorized:401,Error_Client_402_Payment_Required:402,Error_Client_403_Forbidden:403,Error_Client_404_Not_Found:404,Error_Client_405_Method_Not_Allowed:405,Error_Client_406_Not_Acceptable:406,Error_Client_407_Proxy_Authentication_Required:407,Error_Client_408_Request_Timeout:408,Error_Client_409_Conflict:409,Error_Client_410_Gone:410,Error_Client_411_Length_Required:411,Error_Client_412_Precondition_Failed:412,Error_Client_413_Payload_Too_Large:413,Error_Client_414_URI_Too_Long:414,Error_Client_415_Unsupported_Media_Type:415,Error_Client_416_Range_Not_Satisfiable:416,Error_Client_417_Expectation_Failed:417,Error_Client_421_Misdirected_Request:421,Error_Client_422_Unprocessable_Entity:422,Error_Client_423_Locked:423,Error_Client_424_Failed_Dependency:424,Error_Client_425_Too_Early:425,Error_Client_426_Upgrade_Required:426,Error_Client_428_Precondition_Required:428,Error_Client_429_Too_Many_Requests:429,Error_Client_431_Request_Header_Fields_Too_Large:431,Error_Client_451_Unavailable_For_Legal_Reasons:451,Error_Server_500_Internal_Server_Error:500,Error_Server_501_Not_Implemented:501,Error_Server_502_Bad_Gateway:502,Error_Server_503_Service_Unavailable:503,Error_Server_504_Gateway_Timeout:504,Error_Server_505_HTTP_Version_Not_Supported:505,Error_Server_506_Variant_Also_Negotiates:506,Error_Server_507_Insufficient_Storage:507,Error_Server_508_Loop_Detected:508,Error_Server_510_Not_Extended:510,Error_Server_511_Network_Authentication_Required:511},F={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};class V{clientRequest;raw_;headers;logger_;hasBeenSent_=!1;get hasBeenSent(){return this.hasBeenSent_}constructor(f,$){this.clientRequest=f,this.raw_=$,this.logger_=Z(`nt-server-response(${this.clientRequest.remoteAddress})`),this.logger_.logMethodArgs?.("new",this.clientRequest.url.debugId),this.headers={server:"Alwatr Nanotron","content-type":"text/plain charset=UTF-8"};let I=this.clientRequest.routeOption?.crossOrigin;if(I?.enable===!0)this.headers["access-control-allow-origin"]=I.origin,this.headers["access-control-allow-methods"]=I.methods,this.headers["access-control-allow-headers"]=I.headers,this.headers["access-control-max-age"]=I.maxAge}get statusCode(){return this.raw_.statusCode}set statusCode(f){this.raw_.statusCode=f}applyHeaders_(){this.logger_.logMethodArgs?.("applyHeaders_",this.headers);for(let f in this.headers)this.raw_.setHeader(f,this.headers[f])}replyErrorResponse(f){this.logger_.logMethod?.("replyErrorResponse"),this.clientRequest.terminatedHandlers=!0,this.headers["content-type"]="application/json";let $="";if(f.meta!==void 0){let b=typeof f.meta;if(b==="string"||b==="number"||b==="boolean"||f.meta===null)$=`,"meta":"${f.meta}"`;else if(b==="object")$=`,"meta":${JSON.stringify(f.meta)}`}let I=`{"ok":false,"errorCode":"${f.errorCode}","errorMessage":"${f.errorMessage}"${$}}`;this.reply(I)}replyError(f){this.logger_.logMethodArgs?.("replyError",{error:f}),this.clientRequest.terminatedHandlers=!0;let $=this.statusCode;if($<U.Error_Client_400_Bad_Request)this.statusCode=$=500;if(f instanceof Error)this.replyErrorResponse({ok:!1,errorCode:f.name==="Error"?"error_"+$:(f.name+"").toLowerCase(),errorMessage:f.message});else if(typeof f==="string")this.replyErrorResponse({ok:!1,errorCode:"error_"+$,errorMessage:f});else if(typeof f==="object"&&f!==null)this.replyJson(f);else this.replyErrorResponse({ok:!1,errorCode:"error_"+$,errorMessage:F[$]})}replyJson(f){this.logger_.logMethodArgs?.("replyJson",{responseJson:f});let $;try{$=JSON.stringify(f)}catch(I){this.logger_.error("replyJson","reply_json_stringify_failed",I,this.clientRequest.url.debugId),this.statusCode=U.Error_Server_500_Internal_Server_Error,this.replyErrorResponse({ok:!1,errorCode:"reply_json_stringify_failed",errorMessage:"Failed to stringify response JSON."});return}this.headers["content-type"]="application/json",this.reply($)}reply(f){if(this.logger_.logMethodArgs?.("reply",this.clientRequest.url.debugId),this.raw_.writableFinished&&this.hasBeenSent_===!1)this.logger_.accident("reply","server_response_writable_finished_directly"),this.hasBeenSent_=!0;if(this.hasBeenSent_){this.logger_.accident("reply","reply_already_sent",{url:this.clientRequest.url.debugId,replySent:this.hasBeenSent_,writableFinished:this.raw_.writableFinished});return}this.hasBeenSent_=!0;try{if(typeof f==="string")f=Buffer.from(f);this.headers["content-length"]=f.byteLength,this.applyHeaders_(),this.raw_.end(f,"binary")}catch($){this.logger_.error("reply","server_response_error",$,this.clientRequest.url.debugId),this.hasBeenSent_=!1}}}class W{url;serverResponse;routeOption;terminatedHandlers;sharedMeta={};raw_;logger_;remoteAddress;get headers(){return this.raw_.headers}queryParams__;get queryParams(){if(this.queryParams__===void 0){this.queryParams__={};for(let[f,$]of this.url.searchParams.entries())this.queryParams__[f]=$}return this.queryParams__}constructor(f,$,I,b){this.raw_=$,this.url=f,this.routeOption=b,this.remoteAddress=this.getRemoteAddress__(),this.logger_=_(`nt-client-request(${this.remoteAddress})`),this.logger_.logMethodArgs?.("new",f.debugId),this.serverResponse=new V(this,I)}getBodyRaw(){return new Promise((f,$)=>{let I=this.url.method;if(!(I==="POST"||I==="PUT"||I==="PATCH"))return this.serverResponse.headers.connection="close",this.serverResponse.statusCode=U.Error_Client_405_Method_Not_Allowed,$(Error("body_not_allowed"));let b=+this.raw_.headers["content-length"];if(Number.isNaN(b)||b===0)return this.serverResponse.headers.connection="close",this.serverResponse.statusCode=U.Error_Client_411_Length_Required,$(Error("body_length_required"));if(b>this.routeOption.bodyLimit)return this.serverResponse.headers.connection="close",this.serverResponse.statusCode=U.Error_Client_413_Payload_Too_Large,$(Error("body_too_large"));let P=[],G=0,Q=(B)=>{if(G+=B.length,P.push(B),G>this.routeOption.bodyLimit)return this.raw_.removeListener("data",Q),this.raw_.removeListener("end",z),this.raw_.removeListener("error",z),P.length=0,this.serverResponse.headers.connection="close",this.serverResponse.statusCode=U.Error_Client_413_Payload_Too_Large,$(Error("body_too_large"))},z=(B)=>{if(this.raw_.removeListener("data",Q),this.raw_.removeListener("end",z),this.raw_.removeListener("error",z),B!==void 0)return P.length=0,this.serverResponse.statusCode=U.Error_Client_400_Bad_Request,$(B);if(G!==b)return P.length=0,this.serverResponse.statusCode=U.Error_Client_413_Payload_Too_Large,$(Error("body_too_large"));let Y=Buffer.concat(P);f(Y)};this.raw_.on("data",Q),this.raw_.on("end",z),this.raw_.on("error",z),this.raw_.resume()})}getRemoteAddress__(){return this.raw_.headers["x-forwarded-for"]?.split(",").pop()?.trim()||this.raw_.socket.remoteAddress||null}}import{URL as M}from"node:url";class K extends M{static versionPattern_=new RegExp("^/v[0-9]+/");method;debugId;constructor(f,$){let I=f.url??"";if($!=="/"&&I.indexOf($)===0)I=I.slice($.length-1);I=I.replace(K.versionPattern_,"/");super(I,"http://hostname/");this.method=(f.method??"GET").toUpperCase(),this.debugId=`[${this.method}]${this.pathname}`}}class X{static defaultConfig_={host:"0.0.0.0",port:80,requestTimeout:1e4,headersTimeout:130000,keepAliveTimeout:120000,healthRoute:!0,crossOrigin:{enable:!1,origin:"*",methods:"*",headers:"*",maxAge:86400},prefix:"/api/",bodyLimit:1048576};config_;logger_;httpServer;routeHandlerList__;constructor(f){if(this.config_={...X.defaultConfig_,...f},this.logger_=x("nt-api-server"+(this.config_.port!==80?":"+this.config_.port:"")),this.logger_.logMethodArgs?.("new",{config:this.config_}),this.handleClientRequest_=this.handleClientRequest_.bind(this),this.handleServerError_=this.handleServerError_.bind(this),this.handleClientError_=this.handleClientError_.bind(this),this.routeHandlerList__={exact:{},startsWith:{}},this.httpServer=N({keepAlive:!0,keepAliveInitialDelay:0,noDelay:!0},this.handleClientRequest_),this.httpServer.requestTimeout=this.config_.requestTimeout,this.httpServer.keepAliveTimeout=this.config_.keepAliveTimeout,this.httpServer.headersTimeout=this.config_.headersTimeout,this.httpServer.listen(this.config_.port,this.config_.host,()=>{this.logger_.logOther?.(`listening on ${this.config_.host}:${this.config_.port}`)}),this.httpServer.on("error",this.handleServerError_),this.httpServer.on("clientError",this.handleClientError_),this.defineCorsRoute_(),this.config_.healthRoute)this.defineHealthRoute_()}close(){this.logger_.logMethod?.("close"),this.httpServer.close()}getRouteOption_(f){if(this.logger_.logMethod?.("getRouteOption_"),Object.hasOwn(this.routeHandlerList__.exact,f.method)&&Object.hasOwn(this.routeHandlerList__.exact[f.method],f.pathname))return this.routeHandlerList__.exact[f.method][f.pathname];if(Object.hasOwn(this.routeHandlerList__.startsWith,f.method)){let $=this.routeHandlerList__.startsWith[f.method];for(let I in $)if(f.pathname.indexOf(I)===0)return $[I]}return this.logger_.incident?.("getRouteOption_","route_not_found",{method:f.method,url:f.pathname}),null}setRouteOption_(f){this.logger_.logMethodArgs?.("setRouteOption_",f);let $=this.routeHandlerList__[f.matchType];if($[f.method]??={},Object.hasOwn($[f.method],f.url))throw this.logger_.error("defineRoute","route_already_exists",f),Error("route_already_exists");$[f.method][f.url]=f}defineRoute(f){let $={matchType:"exact",preHandlers:[],postHandlers:[],bodyLimit:this.config_.bodyLimit,crossOrigin:this.config_.crossOrigin,...f};this.logger_.logMethodArgs?.("defineRoute",$),this.setRouteOption_($)}handleServerError_(f){if(f.code==="EADDRINUSE")this.logger_.error("handleServerError_","address_in_use",f);else this.logger_.error("handleServerError_","http_server_error",f)}handleClientError_(f,$){this.logger_.accident("handleClientError_","http_server_client_error",{errCode:f.code,errMessage:f.message});let I=f.code?.toLowerCase()??`error_${U.Error_Client_400_Bad_Request}`,b=f.message??F[U.Error_Client_400_Bad_Request],P=`{"ok":false,"errorCode":"${I}","errorMessage":"${b}"}`,G=[`HTTP/1.1 ${U.Error_Client_400_Bad_Request} ${F[U.Error_Client_400_Bad_Request]}`,"content-type: application/json",`content-length: ${Buffer.byteLength(P)}`,`\r
|
|
3
3
|
`].join(`\r
|
|
4
4
|
`);$.end(G+P)}async handleClientRequest_(f,$){if(this.logger_.logMethod?.("handleClientRequest_"),f.url===void 0){this.logger_.accident("handleClientRequest_","http_server_url_undefined");return}let I=new K(f,this.config_.prefix),b=this.getRouteOption_(I),P=new W(I,f,$,b);if(b===null){P.serverResponse.statusCode=U.Error_Client_404_Not_Found,P.serverResponse.replyError();return}try{for(let G of b.preHandlers)if(await G.call(P,P,P.serverResponse,P.sharedMeta),P.terminatedHandlers===!0)return;await b.handler.call(P,P,P.serverResponse,P.sharedMeta);for(let G of b.postHandlers){if(P.terminatedHandlers===!0)return;await G.call(P,P,P.serverResponse,P.sharedMeta)}}catch(G){if(this.logger_.error("handleClientRequest_","route_handler_error",G,I.debugId),P.serverResponse.statusCode<U.Error_Client_400_Bad_Request)P.serverResponse.statusCode=U.Error_Server_500_Internal_Server_Error;P.serverResponse.replyError(G)}}defineHealthRoute_(){this.logger_.logMethod?.("defineHealthRoute_"),this.defineRoute({method:"GET",url:"/health",handler:function(){let f=this.serverResponse.raw_;f.statusCode=U.Success_200_OK,f.setHeader("server","Alwatr Nanotron"),f.setHeader("content-type","application/json"),f.end('{"ok":true}')}})}defineCorsRoute_(){this.logger_.logMethod?.("defineCorsRoute_");let f=this.config_.crossOrigin;if(f?.enable!==!0)return;this.defineRoute({method:"OPTIONS",matchType:"startsWith",url:"/",handler:function(){let $=this.serverResponse.raw_;$.writeHead(U.Success_204_No_Content,{"access-control-allow-origin":f.origin,"access-control-allow-methods":f.methods,"access-control-allow-headers":f.headers,"access-control-max-age":f.maxAge+"","content-length":0}),$.end()}})}}export{X as NanotronApiServer,F as HttpStatusMessages,U as HttpStatusCodes,m as HttpMethods};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=04FB39CF12B3982564756E2164756E21
|
|
7
7
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"import {URL} from 'node:url';\n\nimport type {HttpMethod, NativeClientRequest} from './type.js';\n\nexport class NanotronUrl extends URL {\n protected static versionPattern_ = new RegExp('^/v[0-9]+/');\n\n public readonly method: HttpMethod;\n public readonly debugId: string;\n\n constructor(clientRequest: NativeClientRequest, prefix: `/${string}/` | '/') {\n let url = clientRequest.url ?? '';\n if (prefix !== '/' && url.indexOf(prefix) === 0) {\n url = url.slice(prefix.length - 1); // include `/`\n }\n url = url.replace(NanotronUrl.versionPattern_, '/');\n\n super(url, 'http://hostname/');\n\n this.method = (clientRequest.method ?? 'GET').toUpperCase() as HttpMethod;\n\n this.debugId = `[${this.method}]${this.pathname}`;\n }\n}\n"
|
|
10
10
|
],
|
|
11
11
|
"mappings": ";AAAA,uBAAQ,kBAER,uBAAQ,uBCFR,uBAAQ,uBCAR,uBAAQ,uBCGD,IAAM,EAAc,CAIzB,IAAK,MAKL,KAAM,OAKN,KAAM,OAKN,IAAK,MAKL,OAAQ,SAKR,QAAS,UAKT,QAAS,UAKT,MAAO,QAKP,MAAO,OACT,EAKa,EAAkB,CAI7B,kBAAmB,IAKnB,6BAA8B,IAK9B,oBAAqB,IAKrB,qBAAsB,IAKtB,eAAgB,IAKhB,oBAAqB,IAKrB,qBAAsB,IAMtB,0CAA2C,IAK3C,uBAAwB,IAMxB,0BAA2B,IAK3B,4BAA6B,IAM7B,yBAA0B,IAM1B,6BAA8B,IAM9B,oBAAqB,IAKrB,8BAA+B,IAK/B,+BAAgC,IAKhC,mBAAoB,IAKpB,uBAAwB,IAMxB,0BAA2B,IAK3B,uBAAwB,IAKxB,0BAA2B,IAM3B,gCAAiC,IAMjC,gCAAiC,IAKjC,6BAA8B,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AAY,QAC5C,+BAAgC,EAAY,QAC5C,yBAA0B,EAAY,OAAS,GAC/C,iBAAkB,CACpB,CAAC,EACD,EAAI,IAAI,EAEZ,CAAC,EAEL",
|
|
12
|
-
"debugId": "
|
|
12
|
+
"debugId": "04FB39CF12B3982564756E2164756E21",
|
|
13
13
|
"names": []
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/nanotron-api-server",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Nanotron: Your Lightweight, High-Performance Micro/Nano Service Framework. Nanotron is designed for building blazingly fast and efficient microservices and APIs. Its minimalist approach and focus on performance make it ideal for resource-constrained environments and scenarios where every millisecond counts.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@alwatr/logger": "9.
|
|
24
|
+
"@alwatr/logger": "9.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@alwatr/nano-build": "9.3.0",
|
|
28
|
-
"@alwatr/standard": "9.
|
|
28
|
+
"@alwatr/standard": "9.4.0",
|
|
29
29
|
"@alwatr/type-helper": "9.1.1",
|
|
30
30
|
"@types/node": "^24.12.2",
|
|
31
31
|
"typescript": "^6.0.2"
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"server",
|
|
65
65
|
"typescript"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "662f1047fc2a1b53a00902028d6cebfd04b52dd5"
|
|
68
68
|
}
|