@heliosjs/http 1.0.1
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/README.md +540 -0
- package/dist/Application.d.ts +32 -0
- package/dist/Application.js +269 -0
- package/dist/Application.js.map +1 -0
- package/dist/constants.d.ts +25 -0
- package/dist/constants.js +34 -0
- package/dist/constants.js.map +1 -0
- package/dist/decorators.d.ts +43 -0
- package/dist/decorators.js +81 -0
- package/dist/decorators.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/socket/decorators.d.ts +77 -0
- package/dist/socket/decorators.js +112 -0
- package/dist/socket/decorators.js.map +1 -0
- package/dist/socket/index.d.ts +1 -0
- package/dist/socket/index.js +18 -0
- package/dist/socket/index.js.map +1 -0
- package/dist/sse/decorators.d.ts +52 -0
- package/dist/sse/decorators.js +76 -0
- package/dist/sse/decorators.js.map +1 -0
- package/dist/sse/index.d.ts +1 -0
- package/dist/sse/index.js +18 -0
- package/dist/sse/index.js.map +1 -0
- package/dist/types/core/common.d.ts +44 -0
- package/dist/types/core/common.js +15 -0
- package/dist/types/core/common.js.map +1 -0
- package/dist/types/core/controller.d.ts +78 -0
- package/dist/types/core/controller.js +3 -0
- package/dist/types/core/controller.js.map +1 -0
- package/dist/types/core/cors.d.ts +10 -0
- package/dist/types/core/cors.js +3 -0
- package/dist/types/core/cors.js.map +1 -0
- package/dist/types/core/error.d.ts +72 -0
- package/dist/types/core/error.js +19 -0
- package/dist/types/core/error.js.map +1 -0
- package/dist/types/core/index.d.ts +9 -0
- package/dist/types/core/index.js +26 -0
- package/dist/types/core/index.js.map +1 -0
- package/dist/types/core/multipart.d.ts +8 -0
- package/dist/types/core/multipart.js +3 -0
- package/dist/types/core/multipart.js.map +1 -0
- package/dist/types/core/request.d.ts +65 -0
- package/dist/types/core/request.js +3 -0
- package/dist/types/core/request.js.map +1 -0
- package/dist/types/core/response.d.ts +49 -0
- package/dist/types/core/response.js +3 -0
- package/dist/types/core/response.js.map +1 -0
- package/dist/types/core/sanitize.d.ts +8 -0
- package/dist/types/core/sanitize.js +3 -0
- package/dist/types/core/sanitize.js.map +1 -0
- package/dist/types/core/sse.d.ts +37 -0
- package/dist/types/core/sse.js +3 -0
- package/dist/types/core/sse.js.map +1 -0
- package/dist/types/http/http.d.ts +111 -0
- package/dist/types/http/http.js +3 -0
- package/dist/types/http/http.js.map +1 -0
- package/dist/types/http/index.d.ts +3 -0
- package/dist/types/http/index.js +20 -0
- package/dist/types/http/index.js.map +1 -0
- package/dist/types/http/plugin.d.ts +18 -0
- package/dist/types/http/plugin.js +3 -0
- package/dist/types/http/plugin.js.map +1 -0
- package/dist/types/http/static.d.ts +24 -0
- package/dist/types/http/static.js +3 -0
- package/dist/types/http/static.js.map +1 -0
- package/dist/types/ws/index.d.ts +50 -0
- package/dist/types/ws/index.js +3 -0
- package/dist/types/ws/index.js.map +1 -0
- package/dist/utils/core/controller.d.ts +25 -0
- package/dist/utils/core/controller.js +219 -0
- package/dist/utils/core/controller.js.map +1 -0
- package/dist/utils/core/cors.d.ts +8 -0
- package/dist/utils/core/cors.js +128 -0
- package/dist/utils/core/cors.js.map +1 -0
- package/dist/utils/core/endpoint.d.ts +3 -0
- package/dist/utils/core/endpoint.js +28 -0
- package/dist/utils/core/endpoint.js.map +1 -0
- package/dist/utils/core/error/apperror.d.ts +31 -0
- package/dist/utils/core/error/apperror.js +131 -0
- package/dist/utils/core/error/apperror.js.map +1 -0
- package/dist/utils/core/error/authorizations.d.ts +7 -0
- package/dist/utils/core/error/authorizations.js +17 -0
- package/dist/utils/core/error/authorizations.js.map +1 -0
- package/dist/utils/core/error/base.d.ts +20 -0
- package/dist/utils/core/error/base.js +52 -0
- package/dist/utils/core/error/base.js.map +1 -0
- package/dist/utils/core/error/dependencyFailed.d.ts +7 -0
- package/dist/utils/core/error/dependencyFailed.js +17 -0
- package/dist/utils/core/error/dependencyFailed.js.map +1 -0
- package/dist/utils/core/error/duplicateEntry.d.ts +7 -0
- package/dist/utils/core/error/duplicateEntry.js +17 -0
- package/dist/utils/core/error/duplicateEntry.js.map +1 -0
- package/dist/utils/core/error/forbidden.d.ts +7 -0
- package/dist/utils/core/error/forbidden.js +17 -0
- package/dist/utils/core/error/forbidden.js.map +1 -0
- package/dist/utils/core/error/helpers.d.ts +8 -0
- package/dist/utils/core/error/helpers.js +144 -0
- package/dist/utils/core/error/helpers.js.map +1 -0
- package/dist/utils/core/error/index.d.ts +12 -0
- package/dist/utils/core/error/index.js +29 -0
- package/dist/utils/core/error/index.js.map +1 -0
- package/dist/utils/core/error/invalidState.d.ts +7 -0
- package/dist/utils/core/error/invalidState.js +17 -0
- package/dist/utils/core/error/invalidState.js.map +1 -0
- package/dist/utils/core/error/notfound.d.ts +7 -0
- package/dist/utils/core/error/notfound.js +18 -0
- package/dist/utils/core/error/notfound.js.map +1 -0
- package/dist/utils/core/error/rateLimit.d.ts +7 -0
- package/dist/utils/core/error/rateLimit.js +17 -0
- package/dist/utils/core/error/rateLimit.js.map +1 -0
- package/dist/utils/core/error/serviceUnavailable.d.ts +7 -0
- package/dist/utils/core/error/serviceUnavailable.js +17 -0
- package/dist/utils/core/error/serviceUnavailable.js.map +1 -0
- package/dist/utils/core/error/validation.d.ts +10 -0
- package/dist/utils/core/error/validation.js +20 -0
- package/dist/utils/core/error/validation.js.map +1 -0
- package/dist/utils/core/headers.d.ts +2 -0
- package/dist/utils/core/headers.js +10 -0
- package/dist/utils/core/headers.js.map +1 -0
- package/dist/utils/core/helper.d.ts +6 -0
- package/dist/utils/core/helper.js +66 -0
- package/dist/utils/core/helper.js.map +1 -0
- package/dist/utils/core/index.d.ts +10 -0
- package/dist/utils/core/index.js +27 -0
- package/dist/utils/core/index.js.map +1 -0
- package/dist/utils/core/multipart.d.ts +9 -0
- package/dist/utils/core/multipart.js +207 -0
- package/dist/utils/core/multipart.js.map +1 -0
- package/dist/utils/core/request.d.ts +100 -0
- package/dist/utils/core/request.js +218 -0
- package/dist/utils/core/request.js.map +1 -0
- package/dist/utils/core/response.d.ts +48 -0
- package/dist/utils/core/response.js +269 -0
- package/dist/utils/core/response.js.map +1 -0
- package/dist/utils/core/routeWalker.d.ts +2 -0
- package/dist/utils/core/routeWalker.js +115 -0
- package/dist/utils/core/routeWalker.js.map +1 -0
- package/dist/utils/core/sanitize.d.ts +30 -0
- package/dist/utils/core/sanitize.js +134 -0
- package/dist/utils/core/sanitize.js.map +1 -0
- package/dist/utils/http/index.d.ts +5 -0
- package/dist/utils/http/index.js +22 -0
- package/dist/utils/http/index.js.map +1 -0
- package/dist/utils/http/plugin.d.ts +9 -0
- package/dist/utils/http/plugin.js +43 -0
- package/dist/utils/http/plugin.js.map +1 -0
- package/dist/utils/http/request.factory.d.ts +8 -0
- package/dist/utils/http/request.factory.js +55 -0
- package/dist/utils/http/request.factory.js.map +1 -0
- package/dist/utils/http/response.factory.d.ts +9 -0
- package/dist/utils/http/response.factory.js +14 -0
- package/dist/utils/http/response.factory.js.map +1 -0
- package/dist/utils/http/server.d.ts +18 -0
- package/dist/utils/http/server.js +58 -0
- package/dist/utils/http/server.js.map +1 -0
- package/dist/utils/http/static.d.ts +3 -0
- package/dist/utils/http/static.js +151 -0
- package/dist/utils/http/static.js.map +1 -0
- package/dist/utils/shared/index.d.ts +2 -0
- package/dist/utils/shared/index.js +19 -0
- package/dist/utils/shared/index.js.map +1 -0
- package/dist/utils/shared/parsers.d.ts +11 -0
- package/dist/utils/shared/parsers.js +133 -0
- package/dist/utils/shared/parsers.js.map +1 -0
- package/dist/utils/shared/validate.d.ts +1 -0
- package/dist/utils/shared/validate.js +41 -0
- package/dist/utils/shared/validate.js.map +1 -0
- package/dist/utils/socket/index.d.ts +3 -0
- package/dist/utils/socket/index.js +20 -0
- package/dist/utils/socket/index.js.map +1 -0
- package/dist/utils/socket/server.d.ts +33 -0
- package/dist/utils/socket/server.js +218 -0
- package/dist/utils/socket/server.js.map +1 -0
- package/dist/utils/socket/service.d.ts +20 -0
- package/dist/utils/socket/service.js +42 -0
- package/dist/utils/socket/service.js.map +1 -0
- package/dist/utils/socket/socket.d.ts +16 -0
- package/dist/utils/socket/socket.js +33 -0
- package/dist/utils/socket/socket.js.map +1 -0
- package/dist/utils/sse/index.d.ts +2 -0
- package/dist/utils/sse/index.js +19 -0
- package/dist/utils/sse/index.js.map +1 -0
- package/dist/utils/sse/server.d.ts +14 -0
- package/dist/utils/sse/server.js +85 -0
- package/dist/utils/sse/server.js.map +1 -0
- package/dist/utils/sse/service.d.ts +17 -0
- package/dist/utils/sse/service.js +40 -0
- package/dist/utils/sse/service.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnWS = OnWS;
|
|
4
|
+
exports.OnConnection = OnConnection;
|
|
5
|
+
exports.OnMessage = OnMessage;
|
|
6
|
+
exports.OnClose = OnClose;
|
|
7
|
+
exports.OnError = OnError;
|
|
8
|
+
exports.Subscribe = Subscribe;
|
|
9
|
+
exports.InjectWS = InjectWS;
|
|
10
|
+
const constants_1 = require("../constants");
|
|
11
|
+
const core_1 = require("../utils/core");
|
|
12
|
+
/**
|
|
13
|
+
* Method decorator to handle WebSocket events.
|
|
14
|
+
*
|
|
15
|
+
* @param {WebSocketHandlerType} type - Type of WebSocket event (connection, message, close, error).
|
|
16
|
+
* @param {string} [topic] - Optional topic for message filtering.
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* ```ts
|
|
20
|
+
* @OnWS('message', 'chat')
|
|
21
|
+
* onMessage(msg) {}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
function OnWS(type, topic) {
|
|
25
|
+
return function (target, propertyKey, descriptor) {
|
|
26
|
+
const handlers = Reflect.getMetadata(constants_1.WS_HANDLER, target.constructor) || [];
|
|
27
|
+
handlers.push({ type, topic, method: propertyKey });
|
|
28
|
+
Reflect.defineMetadata(constants_1.WS_HANDLER, handlers, target.constructor);
|
|
29
|
+
return descriptor;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Shortcut decorator for WebSocket connection event handler.
|
|
34
|
+
*
|
|
35
|
+
* Usage:
|
|
36
|
+
* ```ts
|
|
37
|
+
* @OnConnection()
|
|
38
|
+
* onConnect() {}
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function OnConnection() {
|
|
42
|
+
return OnWS('connection');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Shortcut decorator for WebSocket message event handler.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} [topic] - Optional topic for message filtering.
|
|
48
|
+
*
|
|
49
|
+
* Usage:
|
|
50
|
+
* ```ts
|
|
51
|
+
* @OnMessage('chat')
|
|
52
|
+
* onChatMessage(msg) {}
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
function OnMessage(topic) {
|
|
56
|
+
return OnWS('message', topic);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Shortcut decorator for WebSocket close event handler.
|
|
60
|
+
*
|
|
61
|
+
* Usage:
|
|
62
|
+
* ```ts
|
|
63
|
+
* @OnClose()
|
|
64
|
+
* onClose() {}
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
function OnClose() {
|
|
68
|
+
return OnWS('close');
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Shortcut decorator for WebSocket error event handler.
|
|
72
|
+
*
|
|
73
|
+
* Usage:
|
|
74
|
+
* ```ts
|
|
75
|
+
* @OnError()
|
|
76
|
+
* onError() {}
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
function OnError() {
|
|
80
|
+
return OnWS('error');
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Method decorator to subscribe to a WebSocket topic.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} topic - Topic name to subscribe.
|
|
86
|
+
*
|
|
87
|
+
* Usage:
|
|
88
|
+
* ```ts
|
|
89
|
+
* @Subscribe('news')
|
|
90
|
+
* onNews(data) {}
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
function Subscribe(topic) {
|
|
94
|
+
return function (target, propertyKey, descriptor) {
|
|
95
|
+
const topics = Reflect.getMetadata(constants_1.WS_TOPIC_KEY, target.constructor) || [];
|
|
96
|
+
topics.push({ topic, method: propertyKey });
|
|
97
|
+
Reflect.defineMetadata(constants_1.WS_TOPIC_KEY, topics, target.constructor);
|
|
98
|
+
return descriptor;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Parameter decorator to inject WebSocket service instance.
|
|
103
|
+
*
|
|
104
|
+
* Usage:
|
|
105
|
+
* ```ts
|
|
106
|
+
* someMethod(@InjectWS() ws) {}
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
function InjectWS() {
|
|
110
|
+
return (0, core_1.createParamDecorator)('ws');
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/socket/decorators.ts"],"names":[],"mappings":";;AAgBA,oBAOC;AAWD,oCAEC;AAaD,8BAEC;AAWD,0BAEC;AAWD,0BAEC;AAaD,8BASC;AAUD,4BAEC;AA/GD,4CAAwD;AAExD,wCAAqD;AAErD;;;;;;;;;;;GAWG;AACH,SAAgB,IAAI,CAAC,IAA0B,EAAE,KAAc;IAC7D,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,sBAAU,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,cAAc,CAAC,sBAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACjE,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,YAAY;IAC1B,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,SAAS,CAAC,KAAa;IACrC,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAC/E,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,wBAAY,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC3E,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QAE5C,OAAO,CAAC,cAAc,CAAC,wBAAY,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAEjE,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,QAAQ;IACtB,OAAO,IAAA,2BAAoB,EAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './decorators';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./decorators"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/socket/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type SSEHandlerType = 'connection' | 'close' | 'error';
|
|
2
|
+
/**
|
|
3
|
+
* Method decorator to handle specific SSE events.
|
|
4
|
+
*
|
|
5
|
+
* @param {SSEHandlerType} type - The type of SSE event to handle ('connection', 'close', 'error').
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* @OnSSE('connection')
|
|
10
|
+
* onConnect() {}
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function OnSSE(type: SSEHandlerType): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
14
|
+
/**
|
|
15
|
+
* Method decorator to handle SSE connection events.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```ts
|
|
19
|
+
* @OnSSEConnection()
|
|
20
|
+
* onConnect() {}
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function OnSSEConnection(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
24
|
+
/**
|
|
25
|
+
* Method decorator to handle SSE close events.
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* ```ts
|
|
29
|
+
* @OnSSEClose()
|
|
30
|
+
* onClose() {}
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function OnSSEClose(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
34
|
+
/**
|
|
35
|
+
* Method decorator to handle SSE error events.
|
|
36
|
+
*
|
|
37
|
+
* Usage:
|
|
38
|
+
* ```ts
|
|
39
|
+
* @OnSSEError()
|
|
40
|
+
* onError() {}
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function OnSSEError(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
44
|
+
/**
|
|
45
|
+
* Parameter decorator to inject the SSE instance.
|
|
46
|
+
*
|
|
47
|
+
* Usage:
|
|
48
|
+
* ```ts
|
|
49
|
+
* someMethod(@InjectSSE() sse) {}
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function InjectSSE(): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnSSE = OnSSE;
|
|
4
|
+
exports.OnSSEConnection = OnSSEConnection;
|
|
5
|
+
exports.OnSSEClose = OnSSEClose;
|
|
6
|
+
exports.OnSSEError = OnSSEError;
|
|
7
|
+
exports.InjectSSE = InjectSSE;
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const core_1 = require("../utils/core");
|
|
10
|
+
/**
|
|
11
|
+
* Method decorator to handle specific SSE events.
|
|
12
|
+
*
|
|
13
|
+
* @param {SSEHandlerType} type - The type of SSE event to handle ('connection', 'close', 'error').
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* ```ts
|
|
17
|
+
* @OnSSE('connection')
|
|
18
|
+
* onConnect() {}
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function OnSSE(type) {
|
|
22
|
+
return function (target, propertyKey, descriptor) {
|
|
23
|
+
const handlers = Reflect.getMetadata(constants_1.SSE_METADATA_KEY, target.constructor) || [];
|
|
24
|
+
handlers.push({ type, method: propertyKey });
|
|
25
|
+
Reflect.defineMetadata(constants_1.SSE_METADATA_KEY, handlers, target.constructor);
|
|
26
|
+
return descriptor;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Method decorator to handle SSE connection events.
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* ```ts
|
|
34
|
+
* @OnSSEConnection()
|
|
35
|
+
* onConnect() {}
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
function OnSSEConnection() {
|
|
39
|
+
return OnSSE('connection');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Method decorator to handle SSE close events.
|
|
43
|
+
*
|
|
44
|
+
* Usage:
|
|
45
|
+
* ```ts
|
|
46
|
+
* @OnSSEClose()
|
|
47
|
+
* onClose() {}
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
function OnSSEClose() {
|
|
51
|
+
return OnSSE('close');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Method decorator to handle SSE error events.
|
|
55
|
+
*
|
|
56
|
+
* Usage:
|
|
57
|
+
* ```ts
|
|
58
|
+
* @OnSSEError()
|
|
59
|
+
* onError() {}
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
function OnSSEError() {
|
|
63
|
+
return OnSSE('error');
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Parameter decorator to inject the SSE instance.
|
|
67
|
+
*
|
|
68
|
+
* Usage:
|
|
69
|
+
* ```ts
|
|
70
|
+
* someMethod(@InjectSSE() sse) {}
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
function InjectSSE() {
|
|
74
|
+
return (0, core_1.createParamDecorator)('sse');
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/sse/decorators.ts"],"names":[],"mappings":";;AAgBA,sBAOC;AAWD,0CAEC;AAWD,gCAEC;AAWD,gCAEC;AAUD,8BAEC;AA1ED,4CAAgD;AAChD,wCAAqD;AAIrD;;;;;;;;;;GAUG;AACH,SAAgB,KAAK,CAAC,IAAoB;IACxC,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,4BAAgB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACjF,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QAC7C,OAAO,CAAC,cAAc,CAAC,4BAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACvE,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,eAAe;IAC7B,OAAO,KAAK,CAAC,YAAY,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,UAAU;IACxB,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,UAAU;IACxB,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS;IACvB,OAAO,IAAA,2BAAoB,EAAC,KAAK,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './decorators';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./decorators"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sse/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ServerResponse } from 'http';
|
|
2
|
+
import { AppError } from './error';
|
|
3
|
+
import { IRequest } from './request';
|
|
4
|
+
import { IResponse } from './response';
|
|
5
|
+
export type Router = (req: IRequest, res?: ServerResponse) => Promise<{
|
|
6
|
+
status: number;
|
|
7
|
+
data: any;
|
|
8
|
+
message?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export interface IController {
|
|
11
|
+
handleRequest: Router;
|
|
12
|
+
}
|
|
13
|
+
export type MiddlewareCB = (request: IRequest, response: IResponse, next: (args?: any) => any) => void | Promise<IRequest> | IRequest | Promise<void> | void;
|
|
14
|
+
export type InterceptorCB = (data: any, req?: IRequest, res?: IResponse) => Promise<unknown> | unknown;
|
|
15
|
+
export type ErrorCB = (error: AppError, req?: IRequest, res?: IResponse) => any;
|
|
16
|
+
export type ParamDecoratorType = 'body' | 'params' | 'query' | 'request' | 'headers' | 'cookies' | 'response' | 'multipart' | 'event' | 'context' | 'sse' | 'ws';
|
|
17
|
+
export interface ParamMetadata {
|
|
18
|
+
index: number;
|
|
19
|
+
type: ParamDecoratorType;
|
|
20
|
+
dto?: any;
|
|
21
|
+
name?: string;
|
|
22
|
+
}
|
|
23
|
+
export type ResponseWithStatus = {
|
|
24
|
+
status: number;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
export declare enum HTTP_METHODS {
|
|
28
|
+
ANY = "ANY",
|
|
29
|
+
GET = "GET",
|
|
30
|
+
POST = "POST",
|
|
31
|
+
PATCH = "PATCH",
|
|
32
|
+
DELETE = "DELETE",
|
|
33
|
+
PUT = "PUT",
|
|
34
|
+
OPTIONS = "OPTIONS",
|
|
35
|
+
HEAD = "HEAD"
|
|
36
|
+
}
|
|
37
|
+
export type Meta = {
|
|
38
|
+
requestUrl: URL;
|
|
39
|
+
method: string;
|
|
40
|
+
requestId: string;
|
|
41
|
+
sourceIp: string;
|
|
42
|
+
userAgent: string;
|
|
43
|
+
startTime: number;
|
|
44
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HTTP_METHODS = void 0;
|
|
4
|
+
var HTTP_METHODS;
|
|
5
|
+
(function (HTTP_METHODS) {
|
|
6
|
+
HTTP_METHODS["ANY"] = "ANY";
|
|
7
|
+
HTTP_METHODS["GET"] = "GET";
|
|
8
|
+
HTTP_METHODS["POST"] = "POST";
|
|
9
|
+
HTTP_METHODS["PATCH"] = "PATCH";
|
|
10
|
+
HTTP_METHODS["DELETE"] = "DELETE";
|
|
11
|
+
HTTP_METHODS["PUT"] = "PUT";
|
|
12
|
+
HTTP_METHODS["OPTIONS"] = "OPTIONS";
|
|
13
|
+
HTTP_METHODS["HEAD"] = "HEAD";
|
|
14
|
+
})(HTTP_METHODS || (exports.HTTP_METHODS = HTTP_METHODS = {}));
|
|
15
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/types/core/common.ts"],"names":[],"mappings":";;;AAsDA,IAAY,YASX;AATD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IACX,mCAAmB,CAAA;IACnB,6BAAa,CAAA;AACf,CAAC,EATW,YAAY,4BAAZ,YAAY,QASvB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ServerResponse } from 'http';
|
|
2
|
+
import { ErrorCB, HTTP_METHODS, InterceptorCB, MiddlewareCB } from './common';
|
|
3
|
+
import { CORSConfig } from './cors';
|
|
4
|
+
import { IRequest } from './request';
|
|
5
|
+
import { SanitizerConfig } from './sanitize';
|
|
6
|
+
export type ControllerClass = {
|
|
7
|
+
new (...args: any[]): any;
|
|
8
|
+
};
|
|
9
|
+
export type ControllerMethods = Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
httpMethod: HTTP_METHODS;
|
|
12
|
+
pattern: string;
|
|
13
|
+
middlewares?: MiddlewareCB[];
|
|
14
|
+
}>;
|
|
15
|
+
export type ControllerType = {
|
|
16
|
+
handleRequest?(request: IRequest, response: ServerResponse): Promise<any>;
|
|
17
|
+
ws?: WsControllerHandlers;
|
|
18
|
+
sse?: SeeControllerHandlers;
|
|
19
|
+
new (...args: any[]): any;
|
|
20
|
+
};
|
|
21
|
+
export type ControllerInstance = InstanceType<ControllerType>;
|
|
22
|
+
export type ControllerMetadata = {
|
|
23
|
+
routePrefix: string;
|
|
24
|
+
middlewares: MiddlewareCB[];
|
|
25
|
+
interceptor?: InterceptorCB;
|
|
26
|
+
subControllers: ControllerInstance[];
|
|
27
|
+
errorHandler?: ErrorCB;
|
|
28
|
+
cors?: CORSConfig;
|
|
29
|
+
sanitizers: SanitizerConfig[];
|
|
30
|
+
};
|
|
31
|
+
export interface ControllerConfig {
|
|
32
|
+
prefix: string;
|
|
33
|
+
middlewares?: Array<MiddlewareCB>;
|
|
34
|
+
controllers?: ControllerInstance[];
|
|
35
|
+
interceptor?: InterceptorCB;
|
|
36
|
+
}
|
|
37
|
+
export type RouteContext = {
|
|
38
|
+
controllerInstance: any;
|
|
39
|
+
controllerMeta: ControllerMetadata;
|
|
40
|
+
path: string;
|
|
41
|
+
method: string;
|
|
42
|
+
middlewareChain: MiddlewareCB[];
|
|
43
|
+
interceptorChain: InterceptorCB[];
|
|
44
|
+
corsChain: CORSConfig[];
|
|
45
|
+
errorHandlerChain: ErrorCB[];
|
|
46
|
+
subPath: string;
|
|
47
|
+
sanitizersChain: SanitizerConfig[];
|
|
48
|
+
};
|
|
49
|
+
export type SSE_HANDLER_META = {
|
|
50
|
+
type: string;
|
|
51
|
+
method: string;
|
|
52
|
+
};
|
|
53
|
+
export type HandlerMeta = {
|
|
54
|
+
type: 'connection';
|
|
55
|
+
topic: undefined;
|
|
56
|
+
method: 'onconnect';
|
|
57
|
+
fn: (...args: any[]) => any;
|
|
58
|
+
};
|
|
59
|
+
export type WsHandlerMeta = HandlerMeta & {
|
|
60
|
+
topic?: string;
|
|
61
|
+
};
|
|
62
|
+
export type WsControllerHandlers = {
|
|
63
|
+
handlers: {
|
|
64
|
+
connection: WsHandlerMeta[];
|
|
65
|
+
message: WsHandlerMeta[];
|
|
66
|
+
close: WsHandlerMeta[];
|
|
67
|
+
error: WsHandlerMeta[];
|
|
68
|
+
};
|
|
69
|
+
topics: HandlerMeta[];
|
|
70
|
+
};
|
|
71
|
+
export type SeeControllerHandlers = {
|
|
72
|
+
handlers: {
|
|
73
|
+
connection: HandlerMeta[];
|
|
74
|
+
close: HandlerMeta[];
|
|
75
|
+
error: HandlerMeta[];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export type NextFunction = (error?: unknown) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/types/core/controller.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CORSConfig {
|
|
2
|
+
origin?: string | string[] | ((origin: string) => boolean);
|
|
3
|
+
methods?: string[];
|
|
4
|
+
allowedHeaders?: string[];
|
|
5
|
+
exposedHeaders?: string[];
|
|
6
|
+
credentials?: boolean;
|
|
7
|
+
maxAge?: number;
|
|
8
|
+
preflightContinue?: boolean;
|
|
9
|
+
optionsSuccessStatus?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cors.js","sourceRoot":"","sources":["../../../src/types/core/cors.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IRequest } from './request';
|
|
2
|
+
import { IResponse } from './response';
|
|
3
|
+
export declare enum ErrorCode {
|
|
4
|
+
BAD_REQUEST = "BAD_REQUEST",
|
|
5
|
+
UNAUTHORIZED = "UNAUTHORIZED",
|
|
6
|
+
FORBIDDEN = "FORBIDDEN",
|
|
7
|
+
NOT_FOUND = "NOT_FOUND",
|
|
8
|
+
VALIDATION_FAILED = "VALIDATION_FAILED",
|
|
9
|
+
RATE_LIMIT_EXCEEDED = "RATE_LIMIT_EXCEEDED",
|
|
10
|
+
INTERNAL_ERROR = "INTERNAL_ERROR",
|
|
11
|
+
SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE",
|
|
12
|
+
DATABASE_ERROR = "DATABASE_ERROR",
|
|
13
|
+
DUPLICATE_ENTRY = "DUPLICATE_ENTRY",
|
|
14
|
+
INVALID_STATE = "INVALID_STATE",
|
|
15
|
+
DEPENDENCY_FAILED = "DEPENDENCY_FAILED"
|
|
16
|
+
}
|
|
17
|
+
export interface ErrorDetails {
|
|
18
|
+
field?: string;
|
|
19
|
+
value?: any;
|
|
20
|
+
constraint?: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface AppError extends Error {
|
|
24
|
+
code: ErrorCode;
|
|
25
|
+
status: number;
|
|
26
|
+
details?: ErrorDetails[];
|
|
27
|
+
timestamp: Date;
|
|
28
|
+
requestId?: string;
|
|
29
|
+
path?: string;
|
|
30
|
+
method?: string;
|
|
31
|
+
toResponse(): ErrorResponse;
|
|
32
|
+
}
|
|
33
|
+
export interface IValidationError extends AppError {
|
|
34
|
+
code: ErrorCode.VALIDATION_FAILED;
|
|
35
|
+
details?: ErrorDetails[];
|
|
36
|
+
}
|
|
37
|
+
export interface ErrorResponse {
|
|
38
|
+
success: false;
|
|
39
|
+
error: {
|
|
40
|
+
code: ErrorCode;
|
|
41
|
+
status: number;
|
|
42
|
+
message: string;
|
|
43
|
+
details?: ErrorDetails[];
|
|
44
|
+
timestamp: string;
|
|
45
|
+
requestId?: string;
|
|
46
|
+
path?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface ErrorHandlerConfig {
|
|
50
|
+
includeStack?: boolean;
|
|
51
|
+
logErrors?: boolean;
|
|
52
|
+
logStack?: boolean;
|
|
53
|
+
customHandlers?: Record<ErrorCode, (error: AppError) => any>;
|
|
54
|
+
}
|
|
55
|
+
export interface SerializedError {
|
|
56
|
+
type: 'Error' | 'HttpError' | 'AxiosError' | 'Unknown' | 'ValidationError';
|
|
57
|
+
message: string;
|
|
58
|
+
status?: number;
|
|
59
|
+
code?: string;
|
|
60
|
+
stack?: string;
|
|
61
|
+
data?: any;
|
|
62
|
+
original?: any;
|
|
63
|
+
errors?: any[];
|
|
64
|
+
details?: ErrorDetails[];
|
|
65
|
+
}
|
|
66
|
+
export interface ErrorHandlerConfig {
|
|
67
|
+
includeStack?: boolean;
|
|
68
|
+
logErrors?: boolean;
|
|
69
|
+
logStack?: boolean;
|
|
70
|
+
customHandlers?: Record<ErrorCode, (error: AppError) => any>;
|
|
71
|
+
}
|
|
72
|
+
export type ErorrHandler = (error: Error, req: IRequest, response: IResponse) => any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCode = void 0;
|
|
4
|
+
var ErrorCode;
|
|
5
|
+
(function (ErrorCode) {
|
|
6
|
+
ErrorCode["BAD_REQUEST"] = "BAD_REQUEST";
|
|
7
|
+
ErrorCode["UNAUTHORIZED"] = "UNAUTHORIZED";
|
|
8
|
+
ErrorCode["FORBIDDEN"] = "FORBIDDEN";
|
|
9
|
+
ErrorCode["NOT_FOUND"] = "NOT_FOUND";
|
|
10
|
+
ErrorCode["VALIDATION_FAILED"] = "VALIDATION_FAILED";
|
|
11
|
+
ErrorCode["RATE_LIMIT_EXCEEDED"] = "RATE_LIMIT_EXCEEDED";
|
|
12
|
+
ErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
13
|
+
ErrorCode["SERVICE_UNAVAILABLE"] = "SERVICE_UNAVAILABLE";
|
|
14
|
+
ErrorCode["DATABASE_ERROR"] = "DATABASE_ERROR";
|
|
15
|
+
ErrorCode["DUPLICATE_ENTRY"] = "DUPLICATE_ENTRY";
|
|
16
|
+
ErrorCode["INVALID_STATE"] = "INVALID_STATE";
|
|
17
|
+
ErrorCode["DEPENDENCY_FAILED"] = "DEPENDENCY_FAILED";
|
|
18
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
19
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/types/core/error.ts"],"names":[],"mappings":";;;AAGA,IAAY,SAaX;AAbD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;IAC7B,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,oDAAuC,CAAA;IACvC,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,oDAAuC,CAAA;AACzC,CAAC,EAbW,SAAS,yBAAT,SAAS,QAapB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./controller"), exports);
|
|
19
|
+
__exportStar(require("./cors"), exports);
|
|
20
|
+
__exportStar(require("./error"), exports);
|
|
21
|
+
__exportStar(require("./multipart"), exports);
|
|
22
|
+
__exportStar(require("./request"), exports);
|
|
23
|
+
__exportStar(require("./response"), exports);
|
|
24
|
+
__exportStar(require("./sanitize"), exports);
|
|
25
|
+
__exportStar(require("./sse"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,yCAAuB;AACvB,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,6CAA2B;AAC3B,6CAA2B;AAC3B,wCAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipart.js","sourceRoot":"","sources":["../../../src/types/core/multipart.ts"],"names":[],"mappings":""}
|