@fncts/http 0.0.12 → 0.0.13
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/LICENSE +26 -0
- package/_cjs/Body/api.cjs +62 -65
- package/_cjs/Body/api.cjs.map +1 -1
- package/_cjs/Body/definition.cjs +66 -69
- package/_cjs/Body/definition.cjs.map +1 -1
- package/_cjs/Body.cjs +20 -28
- package/_cjs/BodyError.cjs +33 -36
- package/_cjs/BodyError.cjs.map +1 -1
- package/_cjs/Headers.cjs +70 -73
- package/_cjs/Headers.cjs.map +1 -1
- package/_cjs/HttpApp.cjs +102 -94
- package/_cjs/HttpApp.cjs.map +1 -1
- package/_cjs/IncomingMessage/api.cjs +24 -23
- package/_cjs/IncomingMessage/api.cjs.map +1 -1
- package/_cjs/IncomingMessage/definition.cjs +12 -13
- package/_cjs/IncomingMessage/definition.cjs.map +1 -1
- package/_cjs/IncomingMessage.cjs +8 -28
- package/_cjs/Method.cjs +6 -7
- package/_cjs/Method.cjs.map +1 -1
- package/_cjs/Middleware.cjs +11 -12
- package/_cjs/Middleware.cjs.map +1 -1
- package/_cjs/QueryParams.cjs +0 -2
- package/_cjs/RequestError.cjs +17 -18
- package/_cjs/RequestError.cjs.map +1 -1
- package/_cjs/ResponseError.cjs +26 -27
- package/_cjs/ResponseError.cjs.map +1 -1
- package/_cjs/Route/api.cjs +87 -74
- package/_cjs/Route/api.cjs.map +1 -1
- package/_cjs/Route/definition.cjs +28 -26
- package/_cjs/Route/definition.cjs.map +1 -1
- package/_cjs/Route/internal.cjs +33 -34
- package/_cjs/Route/internal.cjs.map +1 -1
- package/_cjs/Route.cjs +23 -28
- package/_cjs/RouteNotFound.cjs +16 -17
- package/_cjs/RouteNotFound.cjs.map +1 -1
- package/_cjs/Router/api.cjs +127 -119
- package/_cjs/Router/api.cjs.map +1 -1
- package/_cjs/Router/definition.cjs +14 -14
- package/_cjs/Router/definition.cjs.map +1 -1
- package/_cjs/Router/internal.cjs +75 -82
- package/_cjs/Router/internal.cjs.map +1 -1
- package/_cjs/Router.cjs +24 -28
- package/_cjs/Server.cjs +38 -34
- package/_cjs/Server.cjs.map +1 -1
- package/_cjs/ServerError.cjs +18 -18
- package/_cjs/ServerError.cjs.map +1 -1
- package/_cjs/ServerRequest/api.cjs +9 -10
- package/_cjs/ServerRequest/api.cjs.map +1 -1
- package/_cjs/ServerRequest/definition.cjs +20 -19
- package/_cjs/ServerRequest/definition.cjs.map +1 -1
- package/_cjs/ServerRequest/internal.cjs +77 -80
- package/_cjs/ServerRequest/internal.cjs.map +1 -1
- package/_cjs/ServerRequest.cjs +7 -28
- package/_cjs/ServerResponse/api.cjs +108 -116
- package/_cjs/ServerResponse/api.cjs.map +1 -1
- package/_cjs/ServerResponse/definition.cjs +36 -41
- package/_cjs/ServerResponse/definition.cjs.map +1 -1
- package/_cjs/ServerResponse.cjs +18 -28
- package/_cjs/Socket.cjs +213 -192
- package/_cjs/Socket.cjs.map +1 -1
- package/_cjs/UrlParams.cjs +23 -27
- package/_cjs/UrlParams.cjs.map +1 -1
- package/_cjs/chunk.cjs +28 -0
- package/_cjs/global.cjs +0 -2
- package/_mjs/Body/api.mjs +54 -56
- package/_mjs/Body/api.mjs.map +1 -1
- package/_mjs/Body/definition.mjs +61 -59
- package/_mjs/Body/definition.mjs.map +1 -1
- package/_mjs/Body.mjs +3 -4
- package/_mjs/BodyError.mjs +30 -28
- package/_mjs/BodyError.mjs.map +1 -1
- package/_mjs/Headers.mjs +61 -63
- package/_mjs/Headers.mjs.map +1 -1
- package/_mjs/HttpApp.mjs +74 -79
- package/_mjs/HttpApp.mjs.map +1 -1
- package/_mjs/IncomingMessage/api.mjs +21 -17
- package/_mjs/IncomingMessage/api.mjs.map +1 -1
- package/_mjs/IncomingMessage/definition.mjs +11 -7
- package/_mjs/IncomingMessage/definition.mjs.map +1 -1
- package/_mjs/IncomingMessage.mjs +3 -4
- package/_mjs/Method.mjs +6 -2
- package/_mjs/Method.mjs.map +1 -1
- package/_mjs/Middleware.mjs +10 -6
- package/_mjs/Middleware.mjs.map +1 -1
- package/_mjs/QueryParams.mjs +0 -2
- package/_mjs/RequestError.mjs +16 -12
- package/_mjs/RequestError.mjs.map +1 -1
- package/_mjs/ResponseError.mjs +25 -21
- package/_mjs/ResponseError.mjs.map +1 -1
- package/_mjs/Route/api.mjs +68 -64
- package/_mjs/Route/api.mjs.map +1 -1
- package/_mjs/Route/definition.mjs +21 -17
- package/_mjs/Route/definition.mjs.map +1 -1
- package/_mjs/Route/internal.mjs +30 -26
- package/_mjs/Route/internal.mjs.map +1 -1
- package/_mjs/Route.mjs +3 -4
- package/_mjs/RouteNotFound.mjs +15 -11
- package/_mjs/RouteNotFound.mjs.map +1 -1
- package/_mjs/Router/api.mjs +105 -107
- package/_mjs/Router/api.mjs.map +1 -1
- package/_mjs/Router/definition.mjs +11 -7
- package/_mjs/Router/definition.mjs.map +1 -1
- package/_mjs/Router/internal.mjs +55 -66
- package/_mjs/Router/internal.mjs.map +1 -1
- package/_mjs/Router.mjs +3 -4
- package/_mjs/Server.mjs +28 -24
- package/_mjs/Server.mjs.map +1 -1
- package/_mjs/ServerError.mjs +14 -10
- package/_mjs/ServerError.mjs.map +1 -1
- package/_mjs/ServerRequest/api.mjs +8 -4
- package/_mjs/ServerRequest/api.mjs.map +1 -1
- package/_mjs/ServerRequest/definition.mjs +15 -11
- package/_mjs/ServerRequest/definition.mjs.map +1 -1
- package/_mjs/ServerRequest/internal.mjs +65 -70
- package/_mjs/ServerRequest/internal.mjs.map +1 -1
- package/_mjs/ServerRequest.mjs +3 -4
- package/_mjs/ServerResponse/api.mjs +97 -106
- package/_mjs/ServerResponse/api.mjs.map +1 -1
- package/_mjs/ServerResponse/definition.mjs +30 -32
- package/_mjs/ServerResponse/definition.mjs.map +1 -1
- package/_mjs/ServerResponse.mjs +3 -4
- package/_mjs/Socket.mjs +152 -156
- package/_mjs/Socket.mjs.map +1 -1
- package/_mjs/UrlParams.mjs +22 -20
- package/_mjs/UrlParams.mjs.map +1 -1
- package/_mjs/global.mjs +0 -2
- package/package.json +10 -6
- package/_cjs/Body.cjs.map +0 -1
- package/_cjs/IncomingMessage.cjs.map +0 -1
- package/_cjs/QueryParams.cjs.map +0 -1
- package/_cjs/Route.cjs.map +0 -1
- package/_cjs/Router.cjs.map +0 -1
- package/_cjs/ServerRequest.cjs.map +0 -1
- package/_cjs/ServerResponse.cjs.map +0 -1
- package/_cjs/global.cjs.map +0 -1
- package/_mjs/Body.mjs.map +0 -1
- package/_mjs/IncomingMessage.mjs.map +0 -1
- package/_mjs/QueryParams.mjs.map +0 -1
- package/_mjs/Route.mjs.map +0 -1
- package/_mjs/Router.mjs.map +0 -1
- package/_mjs/ServerRequest.mjs.map +0 -1
- package/_mjs/ServerResponse.mjs.map +0 -1
- package/_mjs/global.mjs.map +0 -1
package/_mjs/ServerError.mjs
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { Runtime } from "@fncts/base/data/FiberId";
|
|
2
2
|
import { globalValue } from "@fncts/base/data/Global";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
3
|
+
//#region build/esm/ServerError.js
|
|
4
|
+
const clientAbortFiberId = globalValue("fncts.http.ServerError.clientAbortFiberId", () => new Runtime(-499, 0));
|
|
5
|
+
const ServeErrorTypeId = Symbol.for("fncts.http.ServeError");
|
|
6
|
+
var ServeError = class extends Error {
|
|
7
|
+
error;
|
|
8
|
+
[ServeErrorTypeId] = ServeErrorTypeId;
|
|
9
|
+
constructor(error) {
|
|
10
|
+
super();
|
|
11
|
+
this.error = error;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ServeError, ServeErrorTypeId, clientAbortFiberId };
|
|
16
|
+
|
|
13
17
|
//# sourceMappingURL=ServerError.mjs.map
|
package/_mjs/ServerError.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerError.mjs","names":["
|
|
1
|
+
{"version":3,"file":"ServerError.mjs","names":[],"sources":["../esm/ServerError.js"],"sourcesContent":["import { Runtime } from \"@fncts/base/data/FiberId\";\nimport { globalValue } from \"@fncts/base/data/Global\";\nexport const clientAbortFiberId = globalValue(\"fncts.http.ServerError.clientAbortFiberId\", () => new Runtime(-499, 0));\nexport const ServeErrorTypeId = Symbol.for(\"fncts.http.ServeError\");\nexport class ServeError extends Error {\n error;\n [ServeErrorTypeId] = ServeErrorTypeId;\n constructor(error) {\n super();\n this.error = error;\n }\n}\n//# sourceMappingURL=ServerError.js.map"],"mappings":";;;AAEA,MAAa,qBAAqB,YAAY,mDAAmD,IAAI,QAAQ,MAAM,EAAE,CAAC;AACtH,MAAa,mBAAmB,OAAO,IAAI,wBAAwB;AACnE,IAAa,aAAb,cAAgC,MAAM;CAClC;CACA,CAAC,oBAAoB;CACrB,YAAY,OAAO;AACf,SAAO;AACP,OAAK,QAAQ"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { ServerRequestImpl } from "./internal.mjs";
|
|
2
|
+
//#region build/esm/ServerRequest/api.js
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
* @tsplus static fncts.http.ServerRequestOps fromWeb
|
|
5
|
+
*/
|
|
6
|
+
function fromWeb(request) {
|
|
7
|
+
return new ServerRequestImpl(request, request.url);
|
|
7
8
|
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { fromWeb };
|
|
11
|
+
|
|
8
12
|
//# sourceMappingURL=api.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","names":[
|
|
1
|
+
{"version":3,"file":"api.mjs","names":[],"sources":["../../esm/ServerRequest/api.js"],"sourcesContent":["import { ServerRequestImpl } from \"./internal.js\";\n/**\n * @tsplus static fncts.http.ServerRequestOps fromWeb\n */\nexport function fromWeb(request) {\n return new ServerRequestImpl(request, request.url);\n}\n//# sourceMappingURL=api.js.map"],"mappings":";;;;;AAIA,SAAgB,QAAQ,SAAS;AAC7B,QAAO,IAAI,kBAAkB,SAAS,QAAQ,IAAI"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "@fncts/base/data/Tag/constructors";
|
|
2
1
|
import { IncomingMessage } from "../IncomingMessage/definition.mjs";
|
|
3
|
-
|
|
2
|
+
import * as tsplus_module_1 from "@fncts/base/data/Tag/constructors";
|
|
3
|
+
//#region build/esm/ServerRequest/definition.js
|
|
4
|
+
const ServerRequestTypeId = Symbol.for("fncts.http.ServerRequest");
|
|
4
5
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
* @tsplus type fncts.http.ServerRequest
|
|
7
|
+
* @tsplus companion fncts.http.ServerRequestOps
|
|
8
|
+
*/
|
|
9
|
+
var ServerRequest = class extends IncomingMessage {
|
|
10
|
+
[ServerRequestTypeId] = ServerRequestTypeId;
|
|
11
|
+
};
|
|
11
12
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* @tsplus static fncts.http.ServerRequestOps Tag
|
|
14
|
+
*/
|
|
15
|
+
const ServerRequestTag = tsplus_module_1.makeTag();
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ServerRequest, ServerRequestTag, ServerRequestTypeId };
|
|
18
|
+
|
|
15
19
|
//# sourceMappingURL=definition.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.mjs","names":[
|
|
1
|
+
{"version":3,"file":"definition.mjs","names":[],"sources":["../../esm/ServerRequest/definition.js"],"sourcesContent":["import * as tsplus_module_1 from \"@fncts/base/data/Tag/constructors\";\nimport { IncomingMessage } from \"../IncomingMessage/definition.js\";\nexport const ServerRequestTypeId = Symbol.for(\"fncts.http.ServerRequest\");\n/**\n * @tsplus type fncts.http.ServerRequest\n * @tsplus companion fncts.http.ServerRequestOps\n */\nexport class ServerRequest extends IncomingMessage {\n [ServerRequestTypeId] = ServerRequestTypeId;\n}\n/**\n * @tsplus static fncts.http.ServerRequestOps Tag\n */\nexport const ServerRequestTag = tsplus_module_1.makeTag();\n//# sourceMappingURL=definition.js.map"],"mappings":";;;AAEA,MAAa,sBAAsB,OAAO,IAAI,2BAA2B;;;;;AAKzE,IAAa,gBAAb,cAAmC,gBAAgB;CAC/C,CAAC,uBAAuB;;;;;AAK5B,MAAa,mBAAmB,gBAAgB,SAAS"}
|
|
@@ -1,75 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
import { RequestError } from "../RequestError.mjs";
|
|
2
|
+
import { ServerRequest } from "./definition.mjs";
|
|
3
|
+
import * as tsplus_module_6 from "@fncts/base/data/Exit/api";
|
|
4
|
+
import * as tsplus_module_3 from "@fncts/io/IO/api";
|
|
2
5
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/constructors";
|
|
3
6
|
import * as tsplus_module_2 from "@fncts/http/Headers";
|
|
4
|
-
import * as tsplus_module_3 from "@fncts/io/IO/api";
|
|
5
|
-
import * as tsplus_module_4 from "@fncts/io/IO/api/memoize";
|
|
6
|
-
import * as tsplus_module_5 from "@fncts/io/IO/runtime";
|
|
7
|
-
import * as tsplus_module_6 from "@fncts/base/data/Exit/api";
|
|
8
7
|
import * as tsplus_module_7 from "@fncts/http/UrlParams";
|
|
9
8
|
import * as tsplus_module_8 from "@fncts/io/Stream/api";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
get upgrade() {
|
|
72
|
-
return tsplus_module_3.failNow(new RequestError(this, "Decode", "Not an upgradeable ServerRequest"), fileName_1 + ":105:22");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
9
|
+
import * as tsplus_module_4 from "@fncts/io/IO/api/memoize";
|
|
10
|
+
import * as tsplus_module_5 from "@fncts/io/IO/runtime";
|
|
11
|
+
//#region build/esm/ServerRequest/internal.js
|
|
12
|
+
const fileName_1 = "(@fncts/http) src/ServerRequest/internal.ts";
|
|
13
|
+
var ServerRequestImpl = class ServerRequestImpl extends ServerRequest {
|
|
14
|
+
source;
|
|
15
|
+
url;
|
|
16
|
+
headersOverride;
|
|
17
|
+
remoteAddressOverride;
|
|
18
|
+
constructor(source, url, headersOverride, remoteAddressOverride) {
|
|
19
|
+
super();
|
|
20
|
+
this.source = source;
|
|
21
|
+
this.url = url;
|
|
22
|
+
this.headersOverride = headersOverride;
|
|
23
|
+
this.remoteAddressOverride = remoteAddressOverride;
|
|
24
|
+
}
|
|
25
|
+
get method() {
|
|
26
|
+
return this.source.method.toUpperCase();
|
|
27
|
+
}
|
|
28
|
+
get originalUrl() {
|
|
29
|
+
return this.source.url;
|
|
30
|
+
}
|
|
31
|
+
get remoteAddress() {
|
|
32
|
+
return tsplus_module_1.fromNullable(this.remoteAddressOverride);
|
|
33
|
+
}
|
|
34
|
+
get headers() {
|
|
35
|
+
this.headersOverride ??= tsplus_module_2.fromHeaders(this.source.headers);
|
|
36
|
+
return this.headersOverride;
|
|
37
|
+
}
|
|
38
|
+
textIO;
|
|
39
|
+
get text() {
|
|
40
|
+
if (this.textIO) return this.textIO;
|
|
41
|
+
this.textIO = tsplus_module_6.getOrThrow(tsplus_module_5.unsafeRun(tsplus_module_4.memoize(tsplus_module_3.fromPromiseCatch(() => this.source.text(), (error) => new RequestError(this, "Decode", error), fileName_1 + ":43:38"), fileName_1 + ":46:6")));
|
|
42
|
+
return this.textIO;
|
|
43
|
+
}
|
|
44
|
+
get json() {
|
|
45
|
+
return tsplus_module_3.flatMap((text) => tsplus_module_3.tryCatch(() => JSON.parse(text), (error) => new RequestError(this, "Decode", error), fileName_1 + ":53:18"), fileName_1 + ":52:29")(this.text);
|
|
46
|
+
}
|
|
47
|
+
get urlParamsBody() {
|
|
48
|
+
return tsplus_module_3.flatMap((text) => tsplus_module_3.tryCatch(() => tsplus_module_7.make(new URLSearchParams(text)), (error) => new RequestError(this, "Decode", error), fileName_1 + ":62:18"), fileName_1 + ":61:29")(this.text);
|
|
49
|
+
}
|
|
50
|
+
arrayBufferIO;
|
|
51
|
+
get arrayBuffer() {
|
|
52
|
+
if (this.arrayBufferIO) return this.arrayBufferIO;
|
|
53
|
+
this.arrayBufferIO = tsplus_module_6.getOrThrow(tsplus_module_5.unsafeRun(tsplus_module_4.memoize(tsplus_module_3.map((buffer) => new Uint8Array(buffer), fileName_1 + ":78:10")(tsplus_module_3.fromPromiseCatch(() => this.source.arrayBuffer(), (error) => new RequestError(this, "Decode", error), fileName_1 + ":75:45")), fileName_1 + ":78:46")));
|
|
54
|
+
return this.arrayBufferIO;
|
|
55
|
+
}
|
|
56
|
+
get stream() {
|
|
57
|
+
if (this.source.body) return tsplus_module_8.fromReadableStream(() => this.source.body, (error) => new RequestError(this, "Decode", error));
|
|
58
|
+
else return tsplus_module_8.failNow(new RequestError(this, "Decode", "cannot create stream from empty body"), fileName_1 + ":87:28");
|
|
59
|
+
}
|
|
60
|
+
modify(options) {
|
|
61
|
+
return new ServerRequestImpl(this.source, options.url ?? this.url, options.headers ?? this.headers, options.remoteAddress ?? this.remoteAddressOverride);
|
|
62
|
+
}
|
|
63
|
+
get upgrade() {
|
|
64
|
+
return tsplus_module_3.failNow(new RequestError(this, "Decode", "Not an upgradeable ServerRequest"), fileName_1 + ":105:22");
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { ServerRequestImpl };
|
|
69
|
+
|
|
75
70
|
//# sourceMappingURL=internal.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.mjs","names":[
|
|
1
|
+
{"version":3,"file":"internal.mjs","names":[],"sources":["../../esm/ServerRequest/internal.js"],"sourcesContent":["const fileName_1 = \"(@fncts/http) src/ServerRequest/internal.ts\";\nimport * as tsplus_module_1 from \"@fncts/base/data/Maybe/constructors\";\nimport * as tsplus_module_2 from \"@fncts/http/Headers\";\nimport * as tsplus_module_3 from \"@fncts/io/IO/api\";\nimport * as tsplus_module_4 from \"@fncts/io/IO/api/memoize\";\nimport * as tsplus_module_5 from \"@fncts/io/IO/runtime\";\nimport * as tsplus_module_6 from \"@fncts/base/data/Exit/api\";\nimport * as tsplus_module_7 from \"@fncts/http/UrlParams\";\nimport * as tsplus_module_8 from \"@fncts/io/Stream/api\";\nimport { RequestError } from \"../RequestError.js\";\nimport { UrlParams } from \"../UrlParams.js\";\nimport { ServerRequest } from \"./definition.js\";\nexport class ServerRequestImpl extends ServerRequest {\n source;\n url;\n headersOverride;\n remoteAddressOverride;\n constructor(source, url, headersOverride, remoteAddressOverride) {\n super();\n this.source = source;\n this.url = url;\n this.headersOverride = headersOverride;\n this.remoteAddressOverride = remoteAddressOverride;\n }\n get method() {\n return this.source.method.toUpperCase();\n }\n get originalUrl() {\n return this.source.url;\n }\n get remoteAddress() {\n return tsplus_module_1.fromNullable(this.remoteAddressOverride);\n }\n get headers() {\n // eslint-disable-next-line @0x706b/align-assignments/align-assignments\n this.headersOverride ??= tsplus_module_2.fromHeaders(this.source.headers);\n return this.headersOverride;\n }\n textIO;\n get text() {\n if (this.textIO) {\n return this.textIO;\n }\n this.textIO = tsplus_module_6.getOrThrow(tsplus_module_5.unsafeRun(tsplus_module_4.memoize(tsplus_module_3.fromPromiseCatch(() => this.source.text(), (error) => new RequestError(this, \"Decode\", error), fileName_1 + \":43:38\"), fileName_1 + \":46:6\")));\n return this.textIO;\n }\n get json() {\n return tsplus_module_3.flatMap((text) => tsplus_module_3.tryCatch(() => JSON.parse(text), (error) => new RequestError(this, \"Decode\", error), fileName_1 + \":53:18\"), fileName_1 + \":52:29\")(this.text);\n }\n get urlParamsBody() {\n return tsplus_module_3.flatMap((text) => tsplus_module_3.tryCatch(() => tsplus_module_7.make(new URLSearchParams(text)), (error) => new RequestError(this, \"Decode\", error), fileName_1 + \":62:18\"), fileName_1 + \":61:29\")(this.text);\n }\n arrayBufferIO;\n get arrayBuffer() {\n if (this.arrayBufferIO) {\n return this.arrayBufferIO;\n }\n this.arrayBufferIO = tsplus_module_6.getOrThrow(tsplus_module_5.unsafeRun(tsplus_module_4.memoize(tsplus_module_3.map((buffer) => new Uint8Array(buffer), fileName_1 + \":78:10\")(tsplus_module_3.fromPromiseCatch(() => this.source.arrayBuffer(), (error) => new RequestError(this, \"Decode\", error), fileName_1 + \":75:45\")), fileName_1 + \":78:46\")));\n return this.arrayBufferIO;\n }\n get stream() {\n if (this.source.body) {\n return tsplus_module_8.fromReadableStream(() => this.source.body, (error) => new RequestError(this, \"Decode\", error));\n }\n else {\n return tsplus_module_8.failNow(new RequestError(this, \"Decode\", \"cannot create stream from empty body\"), fileName_1 + \":87:28\");\n }\n }\n modify(options) {\n return new ServerRequestImpl(this.source, options.url ?? this.url, options.headers ?? this.headers, options.remoteAddress ?? this.remoteAddressOverride);\n }\n get upgrade() {\n return tsplus_module_3.failNow(new RequestError(this, \"Decode\", \"Not an upgradeable ServerRequest\"), fileName_1 + \":105:22\");\n }\n}\n//# sourceMappingURL=internal.js.map"],"mappings":";;;;;;;;;;;AAAA,MAAM,aAAa;AAYnB,IAAa,oBAAb,MAAa,0BAA0B,cAAc;CACjD;CACA;CACA;CACA;CACA,YAAY,QAAQ,KAAK,iBAAiB,uBAAuB;AAC7D,SAAO;AACP,OAAK,SAAS;AACd,OAAK,MAAM;AACX,OAAK,kBAAkB;AACvB,OAAK,wBAAwB;;CAEjC,IAAI,SAAS;AACT,SAAO,KAAK,OAAO,OAAO,aAAa;;CAE3C,IAAI,cAAc;AACd,SAAO,KAAK,OAAO;;CAEvB,IAAI,gBAAgB;AAChB,SAAO,gBAAgB,aAAa,KAAK,sBAAsB;;CAEnE,IAAI,UAAU;AAEV,OAAK,oBAAoB,gBAAgB,YAAY,KAAK,OAAO,QAAQ;AACzE,SAAO,KAAK;;CAEhB;CACA,IAAI,OAAO;AACP,MAAI,KAAK,OACL,QAAO,KAAK;AAEhB,OAAK,SAAS,gBAAgB,WAAW,gBAAgB,UAAU,gBAAgB,QAAQ,gBAAgB,uBAAuB,KAAK,OAAO,MAAM,GAAG,UAAU,IAAI,aAAa,MAAM,UAAU,MAAM,EAAE,aAAa,SAAS,EAAE,aAAa,QAAQ,CAAC,CAAC;AACzP,SAAO,KAAK;;CAEhB,IAAI,OAAO;AACP,SAAO,gBAAgB,SAAS,SAAS,gBAAgB,eAAe,KAAK,MAAM,KAAK,GAAG,UAAU,IAAI,aAAa,MAAM,UAAU,MAAM,EAAE,aAAa,SAAS,EAAE,aAAa,SAAS,CAAC,KAAK,KAAK;;CAE3M,IAAI,gBAAgB;AAChB,SAAO,gBAAgB,SAAS,SAAS,gBAAgB,eAAe,gBAAgB,KAAK,IAAI,gBAAgB,KAAK,CAAC,GAAG,UAAU,IAAI,aAAa,MAAM,UAAU,MAAM,EAAE,aAAa,SAAS,EAAE,aAAa,SAAS,CAAC,KAAK,KAAK;;CAE1O;CACA,IAAI,cAAc;AACd,MAAI,KAAK,cACL,QAAO,KAAK;AAEhB,OAAK,gBAAgB,gBAAgB,WAAW,gBAAgB,UAAU,gBAAgB,QAAQ,gBAAgB,KAAK,WAAW,IAAI,WAAW,OAAO,EAAE,aAAa,SAAS,CAAC,gBAAgB,uBAAuB,KAAK,OAAO,aAAa,GAAG,UAAU,IAAI,aAAa,MAAM,UAAU,MAAM,EAAE,aAAa,SAAS,CAAC,EAAE,aAAa,SAAS,CAAC,CAAC;AACxV,SAAO,KAAK;;CAEhB,IAAI,SAAS;AACT,MAAI,KAAK,OAAO,KACZ,QAAO,gBAAgB,yBAAyB,KAAK,OAAO,OAAO,UAAU,IAAI,aAAa,MAAM,UAAU,MAAM,CAAC;MAGrH,QAAO,gBAAgB,QAAQ,IAAI,aAAa,MAAM,UAAU,uCAAuC,EAAE,aAAa,SAAS;;CAGvI,OAAO,SAAS;AACZ,SAAO,IAAI,kBAAkB,KAAK,QAAQ,QAAQ,OAAO,KAAK,KAAK,QAAQ,WAAW,KAAK,SAAS,QAAQ,iBAAiB,KAAK,sBAAsB;;CAE5J,IAAI,UAAU;AACV,SAAO,gBAAgB,QAAQ,IAAI,aAAa,MAAM,UAAU,mCAAmC,EAAE,aAAa,UAAU"}
|
package/_mjs/ServerRequest.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
//# sourceMappingURL=ServerRequest.mjs.map
|
|
1
|
+
import { ServerRequest, ServerRequestTag, ServerRequestTypeId } from "./ServerRequest/definition.mjs";
|
|
2
|
+
import { fromWeb } from "./ServerRequest/api.mjs";
|
|
3
|
+
export { ServerRequest, ServerRequestTag, ServerRequestTypeId, fromWeb };
|
|
@@ -1,138 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
import { ServerResponse } from "./definition.mjs";
|
|
2
|
+
import * as tsplus_module_3 from "@fncts/io/IO/api";
|
|
2
3
|
import * as tsplus_module_1 from "@fncts/http/Headers";
|
|
3
4
|
import * as tsplus_module_2 from "@fncts/http/Body/api";
|
|
4
|
-
import * as tsplus_module_3 from "@fncts/io/IO/api";
|
|
5
5
|
import * as tsplus_module_4 from "@fncts/http/UrlParams";
|
|
6
6
|
import * as tsplus_module_5 from "@fncts/http/Body/definition";
|
|
7
7
|
import * as tsplus_module_6 from "@fncts/io/Stream/api";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
//#region build/esm/ServerResponse/api.js
|
|
9
|
+
const fileName_1 = "(@fncts/http) src/ServerResponse/api.ts";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* @tsplus static fncts.http.ServerResponseOps empty
|
|
12
|
+
*/
|
|
13
|
+
function empty(options) {
|
|
14
|
+
return new ServerResponse(options?.status ?? 204, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.empty);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
* @tsplus static fncts.http.ServerResponseOps uint8Array
|
|
18
|
+
*/
|
|
19
|
+
function uint8Array(body, options) {
|
|
20
|
+
return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.uint8Array(body, getContentType(options)));
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* @tsplus static fncts.http.ServerResponseOps text
|
|
24
|
+
*/
|
|
25
|
+
function text(body, options) {
|
|
26
|
+
return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.text(body, getContentType(options)));
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
* @tsplus static fncts.http.ServerResponseOps json
|
|
30
|
+
*/
|
|
31
|
+
function json(body, options) {
|
|
32
|
+
return tsplus_module_3.map((body) => new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, body), fileName_1 + ":44:29")(tsplus_module_2.json(body));
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
* @tsplus static fncts.http.ServerResponseOps schemaJson
|
|
36
|
+
*/
|
|
37
|
+
function schemaJson(schema) {
|
|
38
|
+
const encode = tsplus_module_2.jsonSchema(schema);
|
|
39
|
+
return (body, options) => tsplus_module_3.map((body) => new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, body), fileName_1 + ":55:21")(encode(body));
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
* @tsplus static fncts.http.ServerResponseOps urlParams
|
|
43
|
+
*/
|
|
44
|
+
function urlParams(body, options) {
|
|
45
|
+
return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.text(tsplus_module_4.toString(tsplus_module_4.make(body)), "application/x-www-form-urlencoded"));
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
* @tsplus static fncts.http.ServerResponseOps stream
|
|
49
|
+
*/
|
|
50
|
+
function stream(body, options) {
|
|
51
|
+
return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.stream(body, {
|
|
52
|
+
contentType: getContentType(options),
|
|
53
|
+
contentLength: options?.contentLength
|
|
54
|
+
}));
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
* @tsplus pipeable fncts.http.ServerResponse setHeader
|
|
58
|
+
*/
|
|
59
|
+
function setHeader(key, value) {
|
|
60
|
+
return (self) => new ServerResponse(self.status, self.statusText, self.headers.set(key, value), self.body);
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
* @tsplus pipeable fncts.http.ServerResponse setHeaders
|
|
64
|
+
*/
|
|
65
|
+
function setHeaders(headers) {
|
|
66
|
+
return (self) => new ServerResponse(self.status, self.statusText, self.headers.setAll(headers), self.body);
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
* @tsplus pipeable fncts.http.ServerResponse setStatus
|
|
70
|
+
*/
|
|
71
|
+
function setStatus(status, statusText) {
|
|
72
|
+
return (self) => new ServerResponse(status, statusText, self.headers, self.body);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return new ServerResponse(self.status, self.statusText, headers, body);
|
|
85
|
-
};
|
|
75
|
+
* @tsplus pipeable fncts.http.ServerResponse setBody
|
|
76
|
+
*/
|
|
77
|
+
function setBody(body) {
|
|
78
|
+
return (self) => {
|
|
79
|
+
let headers = self.headers;
|
|
80
|
+
tsplus_module_5.concrete(body);
|
|
81
|
+
if (body._tag === 0) headers = self.headers.remove("content-type").remove("content-length");
|
|
82
|
+
return new ServerResponse(self.status, self.statusText, headers, body);
|
|
83
|
+
};
|
|
86
84
|
}
|
|
87
85
|
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
status: self.status,
|
|
123
|
-
statusText: self.statusText,
|
|
124
|
-
headers: self.headers.toHeadersInit()
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
};
|
|
86
|
+
* @tsplus pipeable fncts.http.ServerResponse toWeb
|
|
87
|
+
*/
|
|
88
|
+
function toWeb(withoutBody = false) {
|
|
89
|
+
return (self) => {
|
|
90
|
+
if (withoutBody) return new Response(void 0, {
|
|
91
|
+
status: self.status,
|
|
92
|
+
statusText: self.statusText,
|
|
93
|
+
headers: self.headers.toHeadersInit()
|
|
94
|
+
});
|
|
95
|
+
tsplus_module_5.concrete(self.body);
|
|
96
|
+
switch (self.body._tag) {
|
|
97
|
+
case 0: return new Response(void 0, {
|
|
98
|
+
status: self.status,
|
|
99
|
+
statusText: self.statusText,
|
|
100
|
+
headers: self.headers.toHeadersInit()
|
|
101
|
+
});
|
|
102
|
+
case 2:
|
|
103
|
+
case 1: return new Response(self.body.body, {
|
|
104
|
+
status: self.status,
|
|
105
|
+
statusText: self.statusText,
|
|
106
|
+
headers: self.headers.toHeadersInit()
|
|
107
|
+
});
|
|
108
|
+
case 3: return new Response(self.body.formData, {
|
|
109
|
+
status: self.status,
|
|
110
|
+
statusText: self.statusText,
|
|
111
|
+
headers: self.headers.toHeadersInit()
|
|
112
|
+
});
|
|
113
|
+
case 4: return new Response(tsplus_module_6.toReadableStream(self.body.stream, fileName_1 + ":160:45"), {
|
|
114
|
+
status: self.status,
|
|
115
|
+
statusText: self.statusText,
|
|
116
|
+
headers: self.headers.toHeadersInit()
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
128
120
|
}
|
|
129
121
|
function getContentType(options) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return options.headers.unsafeGet("content-type");
|
|
134
|
-
} else {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
122
|
+
if (options?.contentType) return options.contentType;
|
|
123
|
+
else if (options?.headers) return options.headers.unsafeGet("content-type");
|
|
124
|
+
else return;
|
|
137
125
|
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { empty, json, schemaJson, setBody, setHeader, setHeaders, setStatus, stream, text, toWeb, uint8Array, urlParams };
|
|
128
|
+
|
|
138
129
|
//# sourceMappingURL=api.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","names":["
|
|
1
|
+
{"version":3,"file":"api.mjs","names":[],"sources":["../../esm/ServerResponse/api.js"],"sourcesContent":["const fileName_1 = \"(@fncts/http) src/ServerResponse/api.ts\";\nimport * as tsplus_module_1 from \"@fncts/http/Headers\";\nimport * as tsplus_module_2 from \"@fncts/http/Body/api\";\nimport * as tsplus_module_3 from \"@fncts/io/IO/api\";\nimport * as tsplus_module_4 from \"@fncts/http/UrlParams\";\nimport * as tsplus_module_5 from \"@fncts/http/Body/definition\";\nimport * as tsplus_module_6 from \"@fncts/io/Stream/api\";\nimport { UrlParams } from \"../UrlParams.js\";\nimport { ServerResponse } from \"./definition.js\";\n/**\n * @tsplus static fncts.http.ServerResponseOps empty\n */\nexport function empty(options) {\n return new ServerResponse(options?.status ?? 204, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.empty);\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps uint8Array\n */\nexport function uint8Array(body, options) {\n return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.uint8Array(body, getContentType(options)));\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps text\n */\nexport function text(body, options) {\n return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.text(body, getContentType(options)));\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps json\n */\nexport function json(body, options) {\n return tsplus_module_3.map((body) => new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, body), fileName_1 + \":44:29\")(tsplus_module_2.json(body));\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps schemaJson\n */\nexport function schemaJson(schema) {\n const encode = tsplus_module_2.jsonSchema(schema);\n return (body, options) => tsplus_module_3.map((body) => new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, body), fileName_1 + \":55:21\")(encode(body));\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps urlParams\n */\nexport function urlParams(body, options) {\n return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.text(tsplus_module_4.toString(tsplus_module_4.make(body)), \"application/x-www-form-urlencoded\"));\n}\n/**\n * @tsplus static fncts.http.ServerResponseOps stream\n */\nexport function stream(body, options) {\n return new ServerResponse(options?.status ?? 200, options?.statusText, options?.headers ?? tsplus_module_1.empty, tsplus_module_2.stream(body, {\n contentType: getContentType(options),\n contentLength: options?.contentLength,\n }));\n}\n/**\n * @tsplus pipeable fncts.http.ServerResponse setHeader\n */\nexport function setHeader(key, value) {\n return (self) => new ServerResponse(self.status, self.statusText, self.headers.set(key, value), self.body);\n}\n/**\n * @tsplus pipeable fncts.http.ServerResponse setHeaders\n */\nexport function setHeaders(headers) {\n return (self) => new ServerResponse(self.status, self.statusText, self.headers.setAll(headers), self.body);\n}\n/**\n * @tsplus pipeable fncts.http.ServerResponse setStatus\n */\nexport function setStatus(status, statusText) {\n return (self) => new ServerResponse(status, statusText, self.headers, self.body);\n}\n/**\n * @tsplus pipeable fncts.http.ServerResponse setBody\n */\nexport function setBody(body) {\n return (self) => {\n let headers = self.headers;\n tsplus_module_5.concrete(body);\n if (body._tag === 0 /* BodyTag.Empty */) {\n headers = self.headers.remove(\"content-type\").remove(\"content-length\");\n }\n return new ServerResponse(self.status, self.statusText, headers, body);\n };\n}\n/**\n * @tsplus pipeable fncts.http.ServerResponse toWeb\n */\nexport function toWeb(withoutBody = false) {\n return (self) => {\n if (withoutBody) {\n return new Response(undefined, {\n status: self.status,\n statusText: self.statusText,\n headers: self.headers.toHeadersInit(),\n });\n }\n tsplus_module_5.concrete(self.body);\n switch (self.body._tag) {\n case 0 /* BodyTag.Empty */:\n return new Response(undefined, {\n status: self.status,\n statusText: self.statusText,\n headers: self.headers.toHeadersInit(),\n });\n case 2 /* BodyTag.Uint8Array */:\n case 1 /* BodyTag.Raw */:\n return new Response(self.body.body, {\n status: self.status,\n statusText: self.statusText,\n headers: self.headers.toHeadersInit(),\n });\n case 3 /* BodyTag.FormData */:\n return new Response(self.body.formData, {\n status: self.status,\n statusText: self.statusText,\n headers: self.headers.toHeadersInit(),\n });\n case 4 /* BodyTag.Stream */:\n return new Response(tsplus_module_6.toReadableStream(self.body.stream, fileName_1 + \":160:45\"), {\n status: self.status,\n statusText: self.statusText,\n headers: self.headers.toHeadersInit(),\n });\n }\n };\n}\nfunction getContentType(options) {\n if (options?.contentType) {\n return options.contentType;\n }\n else if (options?.headers) {\n return options.headers.unsafeGet(\"content-type\");\n }\n else {\n return;\n }\n}\n//# sourceMappingURL=api.js.map"],"mappings":"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"}
|