@dooboostore/simple-boot-http-server 1.0.22 → 1.0.24

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.
Files changed (181) hide show
  1. package/README.MD +27 -3
  2. package/dist/cjs/SimpleBootHttpServer.js +93 -36
  3. package/dist/cjs/SimpleBootHttpServer.js.map +3 -3
  4. package/dist/cjs/codes/HttpHeaders.js +14 -3
  5. package/dist/cjs/codes/HttpHeaders.js.map +2 -2
  6. package/dist/cjs/codes/HttpStatus.js +1 -0
  7. package/dist/cjs/codes/HttpStatus.js.map +2 -2
  8. package/dist/cjs/codes/Mimes.js +2 -0
  9. package/dist/cjs/codes/Mimes.js.map +2 -2
  10. package/dist/cjs/decorators/MethodMapping.js +8 -6
  11. package/dist/cjs/decorators/MethodMapping.js.map +3 -3
  12. package/dist/cjs/endpoints/WebSocketEndPoint.js +16 -0
  13. package/dist/cjs/endpoints/WebSocketEndPoint.js.map +7 -0
  14. package/dist/cjs/filters/CacheFilter.js +75 -35
  15. package/dist/cjs/filters/CacheFilter.js.map +3 -3
  16. package/dist/cjs/filters/IntentSchemeFilter.js +98 -0
  17. package/dist/cjs/filters/IntentSchemeFilter.js.map +7 -0
  18. package/dist/cjs/filters/ResourceFilter.js +4 -1
  19. package/dist/cjs/filters/ResourceFilter.js.map +2 -2
  20. package/dist/cjs/filters/TopicProtocolFilter.js +343 -0
  21. package/dist/cjs/filters/TopicProtocolFilter.js.map +7 -0
  22. package/dist/cjs/filters/index.js +2 -0
  23. package/dist/cjs/filters/index.js.map +2 -2
  24. package/dist/cjs/index.js +28 -0
  25. package/dist/cjs/index.js.map +2 -2
  26. package/dist/cjs/models/RequestResponse.js +56 -89
  27. package/dist/cjs/models/RequestResponse.js.map +3 -3
  28. package/dist/cjs/models/datas/body/ReqPathData.js +29 -0
  29. package/dist/cjs/models/datas/body/ReqPathData.js.map +7 -0
  30. package/dist/cjs/models/datas/search/ReqSearchParamsObj.js +29 -0
  31. package/dist/cjs/models/datas/search/ReqSearchParamsObj.js.map +7 -0
  32. package/dist/cjs/option/HttpServerOption.js +25 -5
  33. package/dist/cjs/option/HttpServerOption.js.map +2 -2
  34. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js +141 -0
  35. package/dist/cjs/proxy/SymbolIntentApiServiceProxy.js.map +7 -0
  36. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js +35 -0
  37. package/dist/cjs/proxy/SymbolIntentApiServiceProxyBase.js.map +7 -0
  38. package/dist/cjs/proxy/TopicProtocolApiServiceProxy.js +324 -0
  39. package/dist/cjs/proxy/TopicProtocolApiServiceProxy.js.map +7 -0
  40. package/dist/cjs/proxy/index.js +26 -0
  41. package/dist/cjs/proxy/index.js.map +7 -0
  42. package/dist/cjs/resolvers/ResourceResolver.js +2 -2
  43. package/dist/cjs/resolvers/ResourceResolver.js.map +2 -2
  44. package/dist/cjs/session/SessionManager.js +2 -2
  45. package/dist/cjs/session/SessionManager.js.map +2 -2
  46. package/dist/cjs/websocket/WebSocketClient.js +554 -0
  47. package/dist/cjs/websocket/WebSocketClient.js.map +7 -0
  48. package/dist/cjs/websocket/WebSocketManager.js +652 -0
  49. package/dist/cjs/websocket/WebSocketManager.js.map +7 -0
  50. package/dist/cjs/websocket/index.js +24 -0
  51. package/dist/cjs/websocket/index.js.map +7 -0
  52. package/dist/esm/SimpleBootHttpServer.js +76 -19
  53. package/dist/esm/SimpleBootHttpServer.js.map +2 -2
  54. package/dist/esm/codes/HttpHeaders.js +12 -2
  55. package/dist/esm/codes/HttpHeaders.js.map +2 -2
  56. package/dist/esm/codes/HttpStatus.js +1 -0
  57. package/dist/esm/codes/HttpStatus.js.map +2 -2
  58. package/dist/esm/codes/Mimes.js +2 -0
  59. package/dist/esm/codes/Mimes.js.map +2 -2
  60. package/dist/esm/decorators/MethodMapping.js +3 -1
  61. package/dist/esm/decorators/MethodMapping.js.map +2 -2
  62. package/dist/esm/endpoints/WebSocketEndPoint.js +1 -0
  63. package/dist/esm/endpoints/WebSocketEndPoint.js.map +7 -0
  64. package/dist/esm/filters/CacheFilter.js +67 -27
  65. package/dist/esm/filters/CacheFilter.js.map +2 -2
  66. package/dist/esm/filters/IntentSchemeFilter.js +75 -0
  67. package/dist/esm/filters/IntentSchemeFilter.js.map +7 -0
  68. package/dist/esm/filters/ResourceFilter.js +4 -1
  69. package/dist/esm/filters/ResourceFilter.js.map +2 -2
  70. package/dist/esm/filters/TopicProtocolFilter.js +310 -0
  71. package/dist/esm/filters/TopicProtocolFilter.js.map +7 -0
  72. package/dist/esm/filters/index.js +1 -0
  73. package/dist/esm/filters/index.js.map +2 -2
  74. package/dist/esm/index.js +12 -0
  75. package/dist/esm/index.js.map +2 -2
  76. package/dist/esm/models/RequestResponse.js +52 -85
  77. package/dist/esm/models/RequestResponse.js.map +2 -2
  78. package/dist/esm/models/datas/body/ReqPathData.js +6 -0
  79. package/dist/esm/models/datas/body/ReqPathData.js.map +7 -0
  80. package/dist/esm/models/datas/search/ReqSearchParamsObj.js +6 -0
  81. package/dist/esm/models/datas/search/ReqSearchParamsObj.js.map +7 -0
  82. package/dist/esm/option/HttpServerOption.js +24 -4
  83. package/dist/esm/option/HttpServerOption.js.map +2 -2
  84. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js +118 -0
  85. package/dist/esm/proxy/SymbolIntentApiServiceProxy.js.map +7 -0
  86. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js +12 -0
  87. package/dist/esm/proxy/SymbolIntentApiServiceProxyBase.js.map +7 -0
  88. package/dist/esm/proxy/TopicProtocolApiServiceProxy.js +301 -0
  89. package/dist/esm/proxy/TopicProtocolApiServiceProxy.js.map +7 -0
  90. package/dist/esm/proxy/index.js +4 -0
  91. package/dist/esm/proxy/index.js.map +7 -0
  92. package/dist/esm/resolvers/ResourceResolver.js +1 -1
  93. package/dist/esm/resolvers/ResourceResolver.js.map +1 -1
  94. package/dist/esm/session/SessionManager.js +1 -1
  95. package/dist/esm/session/SessionManager.js.map +1 -1
  96. package/dist/esm/websocket/WebSocketClient.js +529 -0
  97. package/dist/esm/websocket/WebSocketClient.js.map +7 -0
  98. package/dist/esm/websocket/WebSocketManager.js +622 -0
  99. package/dist/esm/websocket/WebSocketManager.js.map +7 -0
  100. package/dist/esm/websocket/index.js +3 -0
  101. package/dist/esm/websocket/index.js.map +7 -0
  102. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +13563 -5071
  103. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.map +4 -4
  104. package/dist/types/SimpleBootHttpServer.d.ts +5 -3
  105. package/dist/types/SimpleBootHttpServer.d.ts.map +1 -1
  106. package/dist/types/codes/HttpHeaders.d.ts +3 -0
  107. package/dist/types/codes/HttpHeaders.d.ts.map +1 -1
  108. package/dist/types/codes/HttpStatus.d.ts +13 -1
  109. package/dist/types/codes/HttpStatus.d.ts.map +1 -1
  110. package/dist/types/codes/Mimes.d.ts +3 -1
  111. package/dist/types/codes/Mimes.d.ts.map +1 -1
  112. package/dist/types/decorators/MethodMapping.d.ts +4 -2
  113. package/dist/types/decorators/MethodMapping.d.ts.map +1 -1
  114. package/dist/types/endpoints/WebSocketEndPoint.d.ts +17 -0
  115. package/dist/types/endpoints/WebSocketEndPoint.d.ts.map +1 -0
  116. package/dist/types/filters/CacheFilter.d.ts +6 -0
  117. package/dist/types/filters/CacheFilter.d.ts.map +1 -1
  118. package/dist/types/filters/IntentSchemeFilter.d.ts +20 -0
  119. package/dist/types/filters/IntentSchemeFilter.d.ts.map +1 -0
  120. package/dist/types/filters/ResourceFilter.d.ts.map +1 -1
  121. package/dist/types/filters/TopicProtocolFilter.d.ts +34 -0
  122. package/dist/types/filters/TopicProtocolFilter.d.ts.map +1 -0
  123. package/dist/types/filters/index.d.ts +1 -0
  124. package/dist/types/filters/index.d.ts.map +1 -1
  125. package/dist/types/index.d.ts +12 -0
  126. package/dist/types/index.d.ts.map +1 -1
  127. package/dist/types/models/RequestResponse.d.ts +10 -6
  128. package/dist/types/models/RequestResponse.d.ts.map +1 -1
  129. package/dist/types/models/datas/body/ReqPathData.d.ts +4 -0
  130. package/dist/types/models/datas/body/ReqPathData.d.ts.map +1 -0
  131. package/dist/types/models/datas/search/ReqSearchParamsObj.d.ts +4 -0
  132. package/dist/types/models/datas/search/ReqSearchParamsObj.d.ts.map +1 -0
  133. package/dist/types/option/HttpServerOption.d.ts +30 -20
  134. package/dist/types/option/HttpServerOption.d.ts.map +1 -1
  135. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts +18 -0
  136. package/dist/types/proxy/SymbolIntentApiServiceProxy.d.ts.map +1 -0
  137. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts +5 -0
  138. package/dist/types/proxy/SymbolIntentApiServiceProxyBase.d.ts.map +1 -0
  139. package/dist/types/proxy/TopicProtocolApiServiceProxy.d.ts +28 -0
  140. package/dist/types/proxy/TopicProtocolApiServiceProxy.d.ts.map +1 -0
  141. package/dist/types/proxy/index.d.ts +4 -0
  142. package/dist/types/proxy/index.d.ts.map +1 -0
  143. package/dist/types/session/SessionManager.d.ts +2 -17
  144. package/dist/types/session/SessionManager.d.ts.map +1 -1
  145. package/dist/types/websocket/WebSocketClient.d.ts +88 -0
  146. package/dist/types/websocket/WebSocketClient.d.ts.map +1 -0
  147. package/dist/types/websocket/WebSocketManager.d.ts +163 -0
  148. package/dist/types/websocket/WebSocketManager.d.ts.map +1 -0
  149. package/dist/types/websocket/index.d.ts +3 -0
  150. package/dist/types/websocket/index.d.ts.map +1 -0
  151. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js +13638 -5146
  152. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +4 -4
  153. package/dist/umd-bundle/websocket-client.umd.js +11194 -0
  154. package/dist/umd-bundle/websocket-client.umd.js.map +7 -0
  155. package/package.json +24 -15
  156. package/src/SimpleBootHttpServer.ts +367 -296
  157. package/src/codes/HttpHeaders.ts +13 -2
  158. package/src/codes/HttpStatus.ts +19 -1
  159. package/src/codes/Mimes.ts +27 -25
  160. package/src/decorators/MethodMapping.ts +6 -3
  161. package/src/endpoints/WebSocketEndPoint.ts +12 -0
  162. package/src/filters/CacheFilter.ts +112 -67
  163. package/src/filters/IntentSchemeFilter.ts +69 -0
  164. package/src/filters/ResourceFilter.ts +7 -1
  165. package/src/filters/TopicProtocolFilter.ts +349 -0
  166. package/src/filters/index.ts +1 -0
  167. package/src/index.ts +12 -12
  168. package/src/models/RequestResponse.ts +113 -240
  169. package/src/models/datas/body/ReqPathData.ts +3 -0
  170. package/src/models/datas/search/ReqSearchParamsObj.ts +3 -0
  171. package/src/option/HttpServerOption.ts +73 -23
  172. package/src/proxy/SymbolIntentApiServiceProxy.ts +120 -0
  173. package/src/proxy/SymbolIntentApiServiceProxyBase.ts +16 -0
  174. package/src/proxy/TopicProtocolApiServiceProxy.ts +328 -0
  175. package/src/proxy/index.ts +3 -0
  176. package/src/resolvers/ResourceResolver.ts +1 -1
  177. package/src/session/SessionManager.ts +3 -3
  178. package/src/websocket/WebSocketClient.ts +637 -0
  179. package/src/websocket/WebSocketManager.ts +713 -0
  180. package/src/websocket/index.ts +2 -0
  181. package/tsconfig.json +3 -1
package/README.MD CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Build and Test](https://github.com/dooboostore-develop/packages/actions/workflows/main.yaml/badge.svg?branch=main)](https://github.com/dooboostore-develop/packages/actions/workflows/main.yaml)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
6
6
 
7
- **Full Documentation:** [https://dooboostore-develop.github.io/packages/simple-boot-http-server](https://dooboostore-develop.github.io/packages/simple-boot-http-server)
7
+ **Full Documentation:** [https://dooboostore-develop.github.io/@dooboostore/simple-boot-http-server](https://dooboostore-develop.github.io/@dooboostore/simple-boot-http-server)
8
8
 
9
9
  A lightweight and powerful HTTP web server framework for Node.js, built on `@dooboostore/simple-boot`.
10
10
 
@@ -18,6 +18,9 @@ A lightweight and powerful HTTP web server framework for Node.js, built on `@doo
18
18
  - **Integrated Exception Handling**: Leverage `@simple-boot`'s AOP capabilities to create robust global error handlers.
19
19
  - **Built-in Session Management**: Easily manage user sessions with a built-in session manager and customizable storage.
20
20
  - **HTTPS and HTTP/2 Support**: Secure your server with HTTPS and HTTP/2 configuration.
21
+ - **WebSocket Topics + Events**: Topic-based subscribe/request/response with server events.
22
+ - **WebSocket Binary File Transfer**: Send/receive files inside regular message payloads (JSON + binary framing).
23
+ - **WebSocket Auto Reconnect**: Automatic reconnect and re-subscribe with configurable retry.
21
24
 
22
25
  ## Quick Start
23
26
 
@@ -27,12 +30,33 @@ cd my-server
27
30
  npm start
28
31
  ```
29
32
 
33
+ ## Security Hardening
34
+
35
+ - Enforce TLS in production: configure HTTPS (or terminate TLS at a trusted reverse proxy) and redirect HTTP to HTTPS.
36
+ - Keep session cookies hardened: use `httpOnly`, `secure`, `sameSite`, short expiration, and explicit `domain/path` when required.
37
+ - Protect WebSocket endpoints: validate origin, authenticate at connect/subscribe time, and authorize per topic.
38
+ - Validate all inputs: apply strict validation for route params, query/body payloads, and uploaded files (type/size/path).
39
+ - Avoid sensitive data leakage: never return stack traces, internal file paths, raw SQL errors, or secrets in responses/logs.
40
+ - Configure CORS minimally: allow only required origins/methods/headers, avoid wildcard credentials.
41
+ - Add rate limiting and timeout guards: mitigate brute force and resource-exhaustion attacks.
42
+ - Rotate secrets/keys regularly and load them from environment or a secret manager (never hardcode in source).
43
+ - Keep dependencies updated and scan regularly for CVEs.
44
+
45
+ ### Minimal Production Checklist
46
+
47
+ - `HTTPS` enabled end-to-end
48
+ - Session cookie options set (`httpOnly`, `secure`, `sameSite`)
49
+ - CORS restricted to trusted origins
50
+ - Request/WS auth + authorization enforced
51
+ - Upload size/type limits configured
52
+ - Error responses sanitized
53
+
30
54
  ## Learn More
31
55
 
32
56
  The detailed API documentation, including all decorators and usage examples, is available on our documentation website.
33
57
 
34
- **[Explore the full @dooboostore/simple-boot-http-server documentation »](https://dooboostore-develop.github.io/packages/simple-boot-http-server)**
58
+ - WebSocket Guide: [document/websocket/README.md](document/websocket/README.md)
35
59
 
36
60
  ## License
37
61
 
38
- This package is licensed under the [MIT License](https://opensource.org/licenses/MIT).
62
+ This package is licensed under the [MIT License](https://opensource.org/licenses/MIT).
@@ -20,38 +20,43 @@ __export(SimpleBootHttpServer_exports, {
20
20
  SimpleBootHttpServer: () => SimpleBootHttpServer
21
21
  });
22
22
  module.exports = __toCommonJS(SimpleBootHttpServer_exports);
23
- var import_SimpleApplication = require("@dooboostore/simple-boot/SimpleApplication");
23
+ var import_simple_boot = require("@dooboostore/simple-boot");
24
24
  var import_HttpServerOption = require("./option/HttpServerOption");
25
25
  var import_http = require("http");
26
26
  var import_https = require("https");
27
+ var import_ws = require("ws");
27
28
  var import_RequestResponse = require("./models/RequestResponse");
28
29
  var import_MethodMapping = require("./decorators/MethodMapping");
29
30
  var import_HttpStatus = require("./codes/HttpStatus");
30
31
  var import_HttpHeaders = require("./codes/HttpHeaders");
31
32
  var import_Mimes = require("./codes/Mimes");
32
- var import_ExceptionDecorator = require("@dooboostore/simple-boot/decorators/exception/ExceptionDecorator");
33
- var import_Inject = require("@dooboostore/simple-boot/decorators/inject/Inject");
34
- var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
33
+ var import_simple_boot2 = require("@dooboostore/simple-boot");
34
+ var import_simple_boot3 = require("@dooboostore/simple-boot");
35
+ var import_core2 = require("@dooboostore/core");
35
36
  var import_ReqFormUrlBody = require("./models/datas/body/ReqFormUrlBody");
36
37
  var import_ReqJsonBody = require("./models/datas/body/ReqJsonBody");
37
38
  var import_ReqHeader = require("./models/datas/ReqHeader");
38
- var import_RouterModule = require("@dooboostore/simple-boot/route/RouterModule");
39
+ var import_simple_boot4 = require("@dooboostore/simple-boot");
39
40
  var import_ReqMultipartFormBody = require("./models/datas/body/ReqMultipartFormBody");
40
- var import_Validation = require("@dooboostore/simple-boot/decorators/validate/Validation");
41
- var import_ValidException = require("@dooboostore/simple-boot/errors/ValidException");
41
+ var import_simple_boot5 = require("@dooboostore/simple-boot");
42
+ var import_simple_boot6 = require("@dooboostore/simple-boot");
42
43
  var import_HttpError = require("./errors/HttpError");
43
- var import_Router = require("@dooboostore/simple-boot/decorators/route/Router");
44
+ var import_simple_boot7 = require("@dooboostore/simple-boot");
44
45
  var import_url = require("url");
45
46
  var import_HttpMethod = require("./codes/HttpMethod");
46
47
  var import_SessionManager = require("./session/SessionManager");
47
- var import_InjectSituationType = require("./inject/InjectSituationType");
48
- class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
48
+ var import_ReqSearchParamsObj = require("./models/datas/search/ReqSearchParamsObj");
49
+ var import_ReqPathData = require("./models/datas/body/ReqPathData");
50
+ class SimpleBootHttpServer extends import_simple_boot.SimpleApplication {
49
51
  constructor(option = new import_HttpServerOption.HttpServerOption()) {
50
52
  super(option);
51
53
  this.option = option;
54
+ this.webSocketClients = /* @__PURE__ */ new Map();
52
55
  this.sessionManager = new import_SessionManager.SessionManager(this.option);
53
56
  }
54
57
  run(otherInstanceSim) {
58
+ otherInstanceSim ??= /* @__PURE__ */ new Map();
59
+ otherInstanceSim.set(SimpleBootHttpServer, this);
55
60
  super.run(otherInstanceSim);
56
61
  const targets = [...this.option.closeEndPoints ?? [], ...this.option.errorEndPoints ?? [], ...this.option.requestEndPoints ?? [], ...this.option.filters ?? []];
57
62
  Promise.all(targets.map((it) => typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it).map((it) => it.onInit(this))).then((it) => {
@@ -116,7 +121,15 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
116
121
  const cookie = rr.reqCookieGet(this.option.sessionOption.key);
117
122
  if (!cookie) {
118
123
  const session = await this.sessionManager.session();
119
- rr.resSetHeader(import_HttpHeaders.HttpHeaders.SetCookie, `${this.option.sessionOption.key}=${session.uuid}; Path=/; HttpOnly`);
124
+ const cookieParts = [];
125
+ cookieParts.push(`${this.option.sessionOption.key}=${session.uuid}`);
126
+ cookieParts.push(`Path=${this.option.sessionOption.path}`);
127
+ if (this.option.sessionOption.httpOnly) cookieParts.push("HttpOnly");
128
+ if (this.option.sessionOption.secure) cookieParts.push("Secure");
129
+ if (this.option.sessionOption.sameSite != null && this.option.sessionOption.sameSite) cookieParts.push(`SameSite=${this.option.sessionOption.sameSite}`);
130
+ const maxAge = this.option.sessionOption.maxAge ?? this.sessionManager.sessionOption?.maxAge;
131
+ if (maxAge != null) cookieParts.push(`Max-Age=${maxAge}`);
132
+ rr.resSetHeader(import_HttpHeaders.HttpHeaders.SetCookie, cookieParts.join("; "));
120
133
  }
121
134
  const otherStorage = /* @__PURE__ */ new Map();
122
135
  otherStorage.set(import_RequestResponse.RequestResponse, rr);
@@ -151,7 +164,7 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
151
164
  }
152
165
  if (!rr.resIsDone()) {
153
166
  const routerModule = await super.routing(rr.reqIntent);
154
- otherStorage.set(import_RouterModule.RouterModule, routerModule);
167
+ otherStorage.set(import_simple_boot4.RouterModule, routerModule);
155
168
  const moduleInstance = routerModule?.getModuleInstance?.();
156
169
  let methods = [];
157
170
  if (routerModule && moduleInstance) {
@@ -161,7 +174,7 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
161
174
  });
162
175
  methods.push(...map ?? []);
163
176
  } else {
164
- methods.push(...(0, import_MethodMapping.getUrlMappings)(moduleInstance).filter((it) => !(0, import_Router.getRoute)(moduleInstance, it.propertyKey)) ?? []);
177
+ methods.push(...(0, import_MethodMapping.getUrlMappings)(moduleInstance).filter((it) => !(0, import_simple_boot7.getRoute)(moduleInstance, it.propertyKey)) ?? []);
165
178
  }
166
179
  if (rr.reqMethod()?.toUpperCase() === import_HttpMethod.HttpMethod.OPTIONS.toUpperCase()) {
167
180
  rr.resSetHeader(import_HttpHeaders.HttpHeaders.Allow, methods.map((it) => it.config.method).join(", "));
@@ -174,59 +187,86 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
174
187
  methods = methods.filter((it) => it.config?.req?.contentType ? !!it.config?.req?.contentType?.find((sit) => rr.reqHasContentTypeHeader(sit)) : true).filter((it) => it.config?.req?.accept ? !!it.config?.req?.accept?.find((sit) => rr.reqHasAcceptHeader(sit)) : true);
175
188
  if (methods[0]) {
176
189
  const it = methods[0];
177
- const paramTypes = import_ReflectUtils.ReflectUtils.getParameterTypes(moduleInstance, it.propertyKey);
178
- const injects = (0, import_Inject.getInject)(moduleInstance, it.propertyKey);
179
- const validIndexs = (0, import_Validation.getValidIndex)(moduleInstance, it.propertyKey);
190
+ const paramTypes = import_core2.ReflectUtils.getParameterTypes(moduleInstance, it.propertyKey);
191
+ const injects = (0, import_simple_boot3.getInject)(moduleInstance, it.propertyKey);
192
+ const validIndexs = (0, import_simple_boot5.getValidIndex)(moduleInstance, it.propertyKey);
180
193
  if (injects) {
194
+ const isPathData = injects.find((it2) => it2.config?.situationType === import_MethodMapping.UrlMappingSituationType.REQ_PATH_DATA);
181
195
  const isJson = injects.find((it2) => it2.config?.situationType === import_MethodMapping.UrlMappingSituationType.REQ_JSON_BODY);
196
+ const isSearchParamsObj = injects.find((it2) => it2.config?.situationType === import_MethodMapping.UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ);
182
197
  const isFormUrl = injects.find((it2) => it2.config?.situationType === import_MethodMapping.UrlMappingSituationType.REQ_FORM_URL_BODY);
183
- const isTransactionManager = injects.find((it2) => it2.config?.situationType === import_InjectSituationType.InjectSituationType.TransactionManager);
184
- const siturationContainers = new import_Inject.SituationTypeContainers();
198
+ const siturationContainers = new import_simple_boot3.SituationTypeContainers();
199
+ if (isPathData) {
200
+ let data2 = await routerModule.pathData;
201
+ if (isPathData.type) {
202
+ data2 = Object.assign(new isPathData.type(), data2);
203
+ }
204
+ if (validIndexs.includes(isPathData.index)) {
205
+ const inValid = (0, import_simple_boot5.execValidationInValid)(data2);
206
+ if ((inValid?.length ?? 0) > 0) {
207
+ throw new import_simple_boot6.ValidException(inValid);
208
+ }
209
+ }
210
+ siturationContainers.push(new import_simple_boot3.SituationTypeContainer({
211
+ situationType: import_MethodMapping.UrlMappingSituationType.REQ_PATH_DATA,
212
+ data: data2
213
+ }));
214
+ }
185
215
  if (isJson) {
186
216
  let data2 = await rr.reqBodyJsonData();
187
- if (isJson.type) {
217
+ if (data2 !== null && isJson.type) {
188
218
  data2 = Object.assign(new isJson.type(), data2);
189
219
  }
190
220
  if (validIndexs.includes(isJson.index)) {
191
- const inValid = (0, import_Validation.execValidationInValid)(data2);
221
+ const inValid = (0, import_simple_boot5.execValidationInValid)(data2);
192
222
  if ((inValid?.length ?? 0) > 0) {
193
- throw new import_ValidException.ValidException(inValid);
223
+ throw new import_simple_boot6.ValidException(inValid);
194
224
  }
195
225
  }
196
- siturationContainers.push(new import_Inject.SituationTypeContainer({
226
+ siturationContainers.push(new import_simple_boot3.SituationTypeContainer({
197
227
  situationType: import_MethodMapping.UrlMappingSituationType.REQ_JSON_BODY,
198
228
  data: data2
199
229
  }));
200
230
  }
231
+ if (isSearchParamsObj) {
232
+ let data2 = rr.reqUrlSearchParamsObj;
233
+ if (validIndexs.includes(isSearchParamsObj.index)) {
234
+ const inValid = (0, import_simple_boot5.execValidationInValid)(data2);
235
+ if ((inValid?.length ?? 0) > 0) {
236
+ throw new import_simple_boot6.ValidException(inValid);
237
+ }
238
+ }
239
+ siturationContainers.push(new import_simple_boot3.SituationTypeContainer({
240
+ situationType: import_MethodMapping.UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ,
241
+ data: data2
242
+ }));
243
+ }
201
244
  if (isFormUrl) {
202
245
  let data2 = await rr.reqBodyFormUrlData();
203
246
  if (isFormUrl.type) {
204
247
  data2 = Object.assign(new isFormUrl.type(), data2);
205
248
  }
206
249
  if (validIndexs.includes(isFormUrl.index)) {
207
- const inValid = (0, import_Validation.execValidationInValid)(data2);
250
+ const inValid = (0, import_simple_boot5.execValidationInValid)(data2);
208
251
  if ((inValid?.length ?? 0) > 0) {
209
- throw new import_ValidException.ValidException(inValid);
252
+ throw new import_simple_boot6.ValidException(inValid);
210
253
  }
211
254
  }
212
- siturationContainers.push(new import_Inject.SituationTypeContainer({ situationType: import_MethodMapping.UrlMappingSituationType.REQ_FORM_URL_BODY, data: data2 }));
213
- }
214
- if (isTransactionManager && isTransactionManager.type && transactionManager && transactionManager.hasTransaction(isTransactionManager.type)) {
215
- let data2 = await transactionManager.getTransaction(isTransactionManager.type);
216
- if (data2) {
217
- data2 = await data2.try(isTransactionManager.config.argument);
218
- siturationContainers.push(new import_Inject.SituationTypeContainer({ situationType: import_InjectSituationType.InjectSituationType.TransactionManager, data: data2, index: isTransactionManager.index }));
219
- }
255
+ siturationContainers.push(new import_simple_boot3.SituationTypeContainer({ situationType: import_MethodMapping.UrlMappingSituationType.REQ_FORM_URL_BODY, data: data2 }));
220
256
  }
221
257
  if (siturationContainers.length) {
222
- otherStorage.set(import_Inject.SituationTypeContainers, siturationContainers);
258
+ otherStorage.set(import_simple_boot3.SituationTypeContainers, siturationContainers);
223
259
  }
224
260
  }
225
261
  for (const paramType of paramTypes) {
226
262
  if (paramType === import_ReqFormUrlBody.ReqFormUrlBody) {
227
263
  otherStorage.set(import_ReqFormUrlBody.ReqFormUrlBody, await rr.reqBodyReqFormUrlBody());
264
+ } else if (paramType === import_ReqPathData.ReqPathData) {
265
+ otherStorage.set(import_ReqPathData.ReqPathData, routerModule.pathData);
228
266
  } else if (paramType === import_ReqJsonBody.ReqJsonBody) {
229
267
  otherStorage.set(import_ReqJsonBody.ReqJsonBody, await rr.reqBodyReqJsonBody());
268
+ } else if (paramType === import_ReqSearchParamsObj.ReqSearchParamsObj) {
269
+ otherStorage.set(import_ReqSearchParamsObj.ReqSearchParamsObj, rr.reqUrlSearchParamsObj);
230
270
  } else if (paramType === import_url.URLSearchParams) {
231
271
  otherStorage.set(import_url.URLSearchParams, rr.reqUrlSearchParams);
232
272
  } else if (paramType === import_ReqMultipartFormBody.ReqMultipartFormBody) {
@@ -268,6 +308,7 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
268
308
  }
269
309
  }
270
310
  } catch (e) {
311
+ console.error("request error:", e);
271
312
  transactionManager?.catch(e);
272
313
  rr.resStatusCode(e instanceof import_HttpError.HttpError ? e.status : import_HttpStatus.HttpStatus.InternalServerError);
273
314
  const execute = typeof this.option.globalAdvice === "function" ? this.simstanceManager.getOrNewSim(this.option.globalAdvice) : this.option.globalAdvice;
@@ -277,12 +318,12 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
277
318
  }
278
319
  if (e && typeof e === "object") {
279
320
  otherStorage.set(e.constructor, e);
280
- otherStorage.set(import_Inject.SituationTypeContainer, new import_Inject.SituationTypeContainer({
281
- situationType: import_ExceptionDecorator.ExceptionHandlerSituationType.ERROR_OBJECT,
321
+ otherStorage.set(import_simple_boot3.SituationTypeContainer, new import_simple_boot3.SituationTypeContainer({
322
+ situationType: import_simple_boot2.ExceptionHandlerSituationType.ERROR_OBJECT,
282
323
  data: e
283
324
  }));
284
325
  }
285
- const target = (0, import_ExceptionDecorator.targetExceptionHandler)(execute, e);
326
+ const target = (0, import_simple_boot2.targetExceptionHandler)(execute, e);
286
327
  if (target) {
287
328
  await this.simstanceManager.executeBindParameterSimPromise({
288
329
  target: execute,
@@ -296,6 +337,22 @@ class SimpleBootHttpServer extends import_SimpleApplication.SimpleApplication {
296
337
  rr.resEnd();
297
338
  }
298
339
  });
340
+ if (this.option.webSocketEndPoints) {
341
+ const webSocketServer = new import_ws.WebSocketServer({ server: this.server });
342
+ const execute = this.option.webSocketEndPoints.map((it) => typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it);
343
+ webSocketServer.on("connection", async (ws, request) => {
344
+ this.webSocketClients.set(ws, { request });
345
+ const wsSet = { socket: ws, request };
346
+ execute.forEach((it) => it.connect?.(wsSet));
347
+ ws.on("error", (err) => execute.forEach((it) => it.error?.(wsSet, err)));
348
+ ws.on("message", (data, isBinary) => execute.forEach((it) => it.message(wsSet, { data, isBinary })));
349
+ ws.on("ping", () => execute.forEach((it) => it.ping?.(wsSet)));
350
+ ws.on("close", () => {
351
+ this.webSocketClients.delete(ws);
352
+ execute.forEach((it) => it.close?.(wsSet));
353
+ });
354
+ });
355
+ }
299
356
  this.server.listen(this.option.listen.port, this.option.listen.hostname, this.option.listen.backlog, () => {
300
357
  this.option.listen.listeningListener?.(this, this.server);
301
358
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SimpleBootHttpServer.ts"],
4
- "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { HttpServerOption } from './option/HttpServerOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { IncomingMessage, Server as HttpServer, ServerResponse } from 'http'\nimport { Server as HttpsServer } from 'https'; // Add HTTPS support\nimport { RequestResponse } from './models/RequestResponse';\nimport { getUrlMapping, getUrlMappings, SaveMappingConfig, UrlMappingSituationType } from './decorators/MethodMapping';\nimport { HttpStatus } from './codes/HttpStatus';\nimport { HttpHeaders } from './codes/HttpHeaders';\nimport { Mimes } from './codes/Mimes';\nimport { Filter } from './filters/Filter';\nimport { ExceptionHandlerSituationType, targetExceptionHandler } from '@dooboostore/simple-boot/decorators/exception/ExceptionDecorator';\nimport { getInject, SituationTypeContainer, SituationTypeContainers } from '@dooboostore/simple-boot/decorators/inject/Inject';\nimport { EndPoint } from './endpoints/EndPoint';\nimport { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { ReqFormUrlBody } from './models/datas/body/ReqFormUrlBody';\nimport { ReqJsonBody } from './models/datas/body/ReqJsonBody';\nimport { ReqHeader } from './models/datas/ReqHeader';\nimport { RouterModule } from '@dooboostore/simple-boot/route/RouterModule';\nimport { ReqMultipartFormBody } from './models/datas/body/ReqMultipartFormBody';\nimport { execValidationInValid, getValidIndex } from '@dooboostore/simple-boot/decorators/validate/Validation';\nimport { ValidException } from '@dooboostore/simple-boot/errors/ValidException';\nimport { HttpError } from './errors/HttpError';\nimport { getRoute } from '@dooboostore/simple-boot/decorators/route/Router';\nimport { OnInit } from './lifecycle/OnInit';\nimport { URLSearchParams } from 'url';\nimport { HttpMethod } from './codes/HttpMethod';\nimport { SessionManager } from './session/SessionManager';\nimport { InjectSituationType } from './inject/InjectSituationType';\n\nexport class SimpleBootHttpServer extends SimpleApplication {\n public server?: HttpServer | HttpsServer;\n private sessionManager: SessionManager;\n constructor(public option: HttpServerOption = new HttpServerOption()) {\n super(option);\n this.sessionManager = new SessionManager(this.option);\n }\n\n\n public run(otherInstanceSim?: Map<ConstructorType<any>, any>) {\n super.run(otherInstanceSim);\n const targets = [...this.option.closeEndPoints ?? [], ...this.option.errorEndPoints ?? [], ...this.option.requestEndPoints ?? [], ...this.option.filters ?? []];\n Promise.all(targets.map(it => (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target:it as ConstructorType<any>}) : it) as OnInit).map(it => it.onInit(this))).then(it => {\n this.startServer();\n });\n return this;\n }\n\n private startServer() {\n\n // const a = this.option.serverOption as HttpsServerOption;\n // this.option.serverOption?.\n\n if (this.option.serverOption && 'key' in this.option.serverOption && 'cert' in this.option.serverOption) {\n this.server = new HttpsServer(this.option.serverOption);\n const httpServer = new HttpServer();\n httpServer.on('request', (req: IncomingMessage, res: ServerResponse) => {\n res.writeHead(301, { Location: `https://${req.headers.host}${req.url}` });\n res.end();\n });\n httpServer.listen(80, this.option.listen.hostname, () => {\n console.log('HTTP redirect server running on port 80');\n });\n } else if (this.option.serverOption) {\n this.server = new HttpServer(this.option.serverOption);\n } else {\n this.server = new HttpServer();\n }\n // const thisRef = this;\n this.server.on('request', async (req: IncomingMessage, res: ServerResponse) => {\n // console.log('request', req.url);\n const transactionManager = this.option.transactionManagerFactory ? await this.option.transactionManagerFactory() : undefined;\n res.on('close', async () => {\n if (this.option.closeEndPoints) {\n for (const it of this.option.closeEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target:it}) : it) as EndPoint;\n const endPoint = execute?.endPoint(rr, this);\n if (endPoint instanceof Promise) {\n await endPoint;\n }\n } catch (e) {\n }\n }\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n res.on('error', async () => {\n if (this.option.errorEndPoints) {\n for (const it of this.option.errorEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target:it}) : it) as EndPoint;\n const endPoint = execute?.endPoint(rr, this);\n if (endPoint instanceof Promise) {\n await endPoint;\n }\n } catch (e) {\n }\n }\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n\n const rr = new RequestResponse(req, res,{sessionManager: this.sessionManager, option: this.option});\n /*\n default setting first\n */\n rr.resSetHeader(HttpHeaders.Server, 'simple-boot-http-server');\n const cookie = rr.reqCookieGet(this.option.sessionOption.key);\n if (!cookie) {\n const session = await this.sessionManager.session();\n rr.resSetHeader(HttpHeaders.SetCookie, `${this.option.sessionOption.key}=${session.uuid}; Path=/; HttpOnly`);\n }\n\n const otherStorage = new Map<ConstructorType<any>, any>();\n otherStorage.set(RequestResponse, rr);\n otherStorage.set(IncomingMessage, req);\n otherStorage.set(ServerResponse, res);\n try {\n transactionManager?.try();\n if (this.option.requestEndPoints) {\n for (const it of this.option.requestEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim<EndPoint>({target:it}) : it) as EndPoint;\n execute?.endPoint(rr, this);\n } catch (e) {\n }\n }\n }\n\n const filter = {\n carrier: new Map<string, any>(),\n filters: [] as { filter: Filter, sw: boolean }[]\n };\n for (let i = 0; this.option.filters && i < this.option.filters.length; i++) {\n const it = this.option.filters[i];\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target:it}) : it) as Filter;\n let sw = true;\n if (execute?.proceedBefore) {\n sw = await execute.proceedBefore({rr, app: this, carrier: filter.carrier});\n filter.filters.push({filter: execute, sw});\n }\n if (!sw) {\n break;\n }\n }\n\n // body.. something..\n if (!rr.resIsDone()) {\n const routerModule = await super.routing(rr.reqIntent);\n otherStorage.set(RouterModule, routerModule);\n const moduleInstance = routerModule?.getModuleInstance?.();\n let methods: SaveMappingConfig[] = [];\n if (routerModule && moduleInstance) {\n // router \uD074\uB798\uC2A4 \uB0B4\uBD80\uC5D0\uC11C \uC120\uC5B8\uB41C Route\uC77C\uB54C\n if (routerModule.propertyKeys) {\n const map = routerModule.propertyKeys?.map((it: string | symbol) => {\n return {propertyKey: it, config: getUrlMapping(moduleInstance, it)} as SaveMappingConfig\n });\n methods.push(...(map ?? []));\n } else {\n methods.push(...(getUrlMappings(moduleInstance).filter(it => !getRoute(moduleInstance, it.propertyKey)) ?? []));\n }\n\n // options\uB85C \uC694\uCCAD\uC624\uBA74\uC740 allow\uB85C \uB123\uACE0 \uADF8\uB0E5 200\uCC98\uB9AC\uD574\uC57C\uB428.\n if (rr.reqMethod()?.toUpperCase() === HttpMethod.OPTIONS.toUpperCase()) {\n rr.resSetHeader(HttpHeaders.Allow, methods.map(it => it.config.method).join(', '));\n rr.resStatusCode(HttpStatus.Ok);\n }\n\n // method \uCC3E\uAE30\n methods = methods.filter(it => it && it.propertyKey && it.config && rr.reqMethod()?.toUpperCase() === it.config.method.toUpperCase());\n methods.sort((a, b) => {\n return ((b.config?.req?.contentType?.length ?? 0) + (b.config?.req?.accept?.length ?? 0)) - ((a.config?.req?.contentType?.length ?? 0) + (a.config?.req?.accept?.length ?? 0));\n });\n methods = methods\n .filter(it => it.config?.req?.contentType ? (!!it.config?.req?.contentType?.find(sit => rr.reqHasContentTypeHeader(sit))) : true)\n .filter(it => it.config?.req?.accept ? (!!it.config?.req?.accept?.find(sit => rr.reqHasAcceptHeader(sit))) : true);\n\n if (methods[0]) {\n const it = methods[0];\n const paramTypes = ReflectUtils.getParameterTypes(moduleInstance, it.propertyKey)\n const injects = getInject(moduleInstance, it.propertyKey);\n const validIndexs = getValidIndex(moduleInstance, it.propertyKey);\n if (injects) {\n const isJson = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_JSON_BODY);\n const isFormUrl = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_FORM_URL_BODY);\n const isTransactionManager = injects.find(it => it.config?.situationType === InjectSituationType.TransactionManager);\n const siturationContainers = new SituationTypeContainers();\n if (isJson) {\n let data = await rr.reqBodyJsonData()\n if (isJson.type) {\n data = Object.assign(new isJson.type(), data);\n }\n if (validIndexs.includes(isJson.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({\n situationType: UrlMappingSituationType.REQ_JSON_BODY,\n data\n }));\n }\n if (isFormUrl) {\n let data = await rr.reqBodyFormUrlData()\n if (isFormUrl.type) {\n data = Object.assign(new isFormUrl.type(), data);\n }\n if (validIndexs.includes(isFormUrl.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({situationType: UrlMappingSituationType.REQ_FORM_URL_BODY, data}));\n }\n\n if (isTransactionManager && isTransactionManager.type && transactionManager && transactionManager.hasTransaction(isTransactionManager.type)) {\n let data = await transactionManager.getTransaction(isTransactionManager.type);\n if (data) {\n data = await data.try(isTransactionManager.config.argument);\n siturationContainers.push(new SituationTypeContainer({situationType: InjectSituationType.TransactionManager, data, index: isTransactionManager.index}));\n }\n }\n if (siturationContainers.length) {\n otherStorage.set(SituationTypeContainers, siturationContainers);\n }\n }\n\n for (const paramType of paramTypes) {\n if (paramType === ReqFormUrlBody) {\n otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody())\n } else if (paramType === ReqJsonBody) {\n otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody())\n } else if (paramType === URLSearchParams) {\n otherStorage.set(URLSearchParams, rr.reqUrlSearchParams)\n } else if (paramType === ReqMultipartFormBody) {\n otherStorage.set(ReqMultipartFormBody, rr.reqBodyMultipartFormData())\n } else if (paramType === ReqHeader) {\n otherStorage.set(ReqHeader, rr.reqHeaderObj)\n }\n }\n\n // execute !!!\n let data = await this.simstanceManager.executeBindParameterSimPromise({\n target: moduleInstance,\n targetKey: it.propertyKey\n }, otherStorage);\n /*\n \uC5EC\uAE30\uC5D0\uC11C \uC815\uD574\uC9C4 \uD0C0\uC785 \uB9AC\uD134\uC5D0 \uB530\uB978 \uC870\uCE58\n ...\n */\n if (it.config?.resolver) {\n const execute = typeof it.config.resolver === 'function' ? this.simstanceManager.getOrNewSim({target:it.config.resolver}) : it.config.resolver;\n data = await execute?.resolve?.(data, rr);\n }\n const status = it.config?.res?.status ?? HttpStatus.Ok;\n const headers = it.config?.res?.header ?? {};\n if (it.config?.res?.contentType) {\n headers[HttpHeaders.ContentType] = it.config?.res?.contentType;\n }\n if ((it.config?.res?.contentType?.toLowerCase().indexOf(Mimes.ApplicationJson.toLowerCase()) ?? -1) > -1) {\n data = JSON.stringify(data);\n } else if (data && typeof data === 'object') {\n data = JSON.stringify(data);\n }\n rr.resSetHeaders(headers)\n rr.resSetStatusCode(status); \n rr.resWrite(data);\n }\n }\n\n if (this.option.noSuchRouteEndPointMappingThrow && methods.length <= 0 && rr.reqMethod()?.toUpperCase() !== HttpMethod.OPTIONS) {\n throw this.option.noSuchRouteEndPointMappingThrow(rr);\n }\n }\n\n // after\n for (const it of filter.filters.reverse()) {\n if (it.filter?.proceedAfter && !await it.filter.proceedAfter({rr, app:this, before: it.sw, carrier: filter.carrier})) {\n break;\n }\n }\n } catch (e) {\n transactionManager?.catch(e);\n rr.resStatusCode(e instanceof HttpError ? e.status : HttpStatus.InternalServerError)\n const execute = typeof this.option.globalAdvice === 'function' ? this.simstanceManager.getOrNewSim(this.option.globalAdvice) : this.option.globalAdvice;\n if (!execute) {\n rr.resEnd();\n // rr.resEnd().catch(e => {\n // });\n return;\n }\n if (e && typeof e === 'object') {\n otherStorage.set(e.constructor as ConstructorType<any>, e);\n otherStorage.set(SituationTypeContainer, new SituationTypeContainer({\n situationType: ExceptionHandlerSituationType.ERROR_OBJECT,\n data: e\n }));\n }\n const target = targetExceptionHandler(execute, e);\n if (target) {\n await this.simstanceManager.executeBindParameterSimPromise({\n target: execute,\n targetKey: target.propertyKey\n }, otherStorage);\n }\n } finally {\n transactionManager?.finally();\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n\n this.server.listen(this.option.listen.port, this.option.listen.hostname, this.option.listen.backlog, () => {\n this.option.listen.listeningListener?.(this, this.server);\n });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAkC;AAClC,8BAAiC;AAEjC,kBAAsE;AACtE,mBAAsC;AACtC,6BAAgC;AAChC,2BAA0F;AAC1F,wBAA2B;AAC3B,yBAA4B;AAC5B,mBAAsB;AAEtB,gCAAsE;AACtE,oBAA2E;AAE3E,0BAA6B;AAC7B,4BAA+B;AAC/B,yBAA4B;AAC5B,uBAA0B;AAC1B,0BAA6B;AAC7B,kCAAqC;AACrC,wBAAqD;AACrD,4BAA+B;AAC/B,uBAA0B;AAC1B,oBAAyB;AAEzB,iBAAgC;AAChC,wBAA2B;AAC3B,4BAA+B;AAC/B,iCAAoC;AAE7B,MAAM,6BAA6B,2CAAkB;AAAA,EAGxD,YAAmB,SAA2B,IAAI,yCAAiB,GAAG;AAClE,UAAM,MAAM;AADG;AAEf,SAAK,iBAAiB,IAAI,qCAAe,KAAK,MAAM;AAAA,EACxD;AAAA,EAGO,IAAI,kBAAmD;AAC1D,UAAM,IAAI,gBAAgB;AAC1B,UAAM,UAAU,CAAC,GAAG,KAAK,OAAO,kBAAkB,CAAC,GAAG,GAAG,KAAK,OAAO,kBAAkB,CAAC,GAAG,GAAG,KAAK,OAAO,oBAAoB,CAAC,GAAG,GAAG,KAAK,OAAO,WAAW,CAAC,CAAC;AAC9J,YAAQ,IAAI,QAAQ,IAAI,Q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uB,SAAS,CAAC;AAChD,YAAI,QAAQ;AACR,gBAAM,KAAK,iBAAiB,+BAA+B;AAAA,YACvD,QAAQ;AAAA,YACR,WAAW,OAAO;AAAA,UACtB,GAAG,YAAY;AAAA,QACnB;AAAA,MACJ,UAAE;AACE,4BAAoB,QAAQ;AAAA,MAChC;AAEA,UAAI,CAAC,GAAG,UAAU,GAAG;AACjB,WAAG,OAAO;AAAA,MACd;AAAA,IACJ,CAAC;AAED,SAAK,OAAO,OAAO,KAAK,OAAO,OAAO,MAAM,KAAK,OAAO,OAAO,UAAU,KAAK,OAAO,OAAO,SAAS,MAAM;AACvG,WAAK,OAAO,OAAO,oBAAoB,MAAM,KAAK,MAAM;AAAA,IAC5D,CAAC;AAAA,EACL;AACJ;",
6
- "names": ["HttpsServer", "HttpServer", "it", "data"]
4
+ "sourcesContent": ["import {SimpleApplication} from '@dooboostore/simple-boot';\nimport {HttpServerOption} from './option/HttpServerOption';\nimport {ConstructorType} from '@dooboostore/core';\nimport {IncomingMessage, Server as HttpServer, ServerResponse} from 'http'\nimport {Server as HttpsServer} from 'https'; // Add HTTPS support\nimport {WebSocketServer, WebSocket} from 'ws';\nimport {RequestResponse} from './models/RequestResponse';\nimport {getUrlMapping, getUrlMappings, SaveMappingConfig, UrlMappingSituationType} from './decorators/MethodMapping';\nimport {HttpStatus} from './codes/HttpStatus';\nimport {HttpHeaders} from './codes/HttpHeaders';\nimport {Mimes} from './codes/Mimes';\nimport {Filter} from './filters/Filter';\nimport {ExceptionHandlerSituationType, targetExceptionHandler} from '@dooboostore/simple-boot';\nimport {getInject, SituationTypeContainer, SituationTypeContainers} from '@dooboostore/simple-boot';\nimport {EndPoint} from './endpoints/EndPoint';\nimport {ReflectUtils} from '@dooboostore/core';\nimport {ReqFormUrlBody} from './models/datas/body/ReqFormUrlBody';\nimport {ReqJsonBody} from './models/datas/body/ReqJsonBody';\nimport {ReqHeader} from './models/datas/ReqHeader';\nimport {RouterModule} from '@dooboostore/simple-boot';\nimport {ReqMultipartFormBody} from './models/datas/body/ReqMultipartFormBody';\nimport {execValidationInValid, getValidIndex} from '@dooboostore/simple-boot';\nimport {ValidException} from '@dooboostore/simple-boot';\nimport {HttpError} from './errors/HttpError';\nimport {getRoute} from '@dooboostore/simple-boot';\nimport {OnInit} from './lifecycle/OnInit';\nimport {URLSearchParams} from 'url';\nimport {HttpMethod} from './codes/HttpMethod';\nimport {SessionManager} from './session/SessionManager';\nimport {InjectSituationType} from './inject/InjectSituationType';\nimport {ReqSearchParamsObj} from \"./models/datas/search/ReqSearchParamsObj\";\nimport {SimConfig} from '@dooboostore/simple-boot';\nimport {ReqPathData} from './models/datas/body/ReqPathData';\nimport {WebSocketEndPoint} from './endpoints/WebSocketEndPoint';\n\nexport class SimpleBootHttpServer extends SimpleApplication {\n public server?: HttpServer | HttpsServer;\n private sessionManager: SessionManager;\n private webSocketClients = new Map<WebSocket, { request: IncomingMessage }>();\n\n constructor(public option: HttpServerOption = new HttpServerOption()) {\n super(option);\n this.sessionManager = new SessionManager(this.option);\n }\n\n\n public run(otherInstanceSim?: Map<ConstructorType<any> | Function | SimConfig | Symbol, any>) {\n otherInstanceSim ??= new Map<ConstructorType<any> | Function | SimConfig | Symbol, any>();\n otherInstanceSim.set(SimpleBootHttpServer, this);\n super.run(otherInstanceSim);\n const targets = [...this.option.closeEndPoints ?? [], ...this.option.errorEndPoints ?? [], ...this.option.requestEndPoints ?? [], ...this.option.filters ?? []];\n Promise.all(targets.map(it => (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target: it as ConstructorType<any>}) : it) as OnInit).map(it => it.onInit(this))).then(it => {\n this.startServer();\n });\n return this;\n }\n\n private startServer() {\n\n // const a = this.option.serverOption as HttpsServerOption;\n // this.option.serverOption?.\n\n if (this.option.serverOption && 'key' in this.option.serverOption && 'cert' in this.option.serverOption) {\n this.server = new HttpsServer(this.option.serverOption);\n const httpServer = new HttpServer();\n httpServer.on('request', (req: IncomingMessage, res: ServerResponse) => {\n res.writeHead(301, {Location: `https://${req.headers.host}${req.url}`});\n res.end();\n });\n httpServer.listen(80, this.option.listen.hostname, () => {\n console.log('HTTP redirect server running on port 80');\n });\n } else if (this.option.serverOption) {\n this.server = new HttpServer(this.option.serverOption);\n } else {\n this.server = new HttpServer();\n }\n // const thisRef = this;\n this.server.on('request', async (req: IncomingMessage, res: ServerResponse) => {\n // console.log('request', req.url);\n const transactionManager = this.option.transactionManagerFactory ? await this.option.transactionManagerFactory() : undefined;\n res.on('close', async () => {\n if (this.option.closeEndPoints) {\n for (const it of this.option.closeEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target: it}) : it) as EndPoint;\n const endPoint = execute?.endPoint(rr, this);\n if (endPoint instanceof Promise) {\n await endPoint;\n }\n } catch (e) {\n }\n }\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n res.on('error', async () => {\n if (this.option.errorEndPoints) {\n for (const it of this.option.errorEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target: it}) : it) as EndPoint;\n const endPoint = execute?.endPoint(rr, this);\n if (endPoint instanceof Promise) {\n await endPoint;\n }\n } catch (e) {\n }\n }\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n\n const rr = new RequestResponse(req, res, {sessionManager: this.sessionManager, option: this.option});\n /*\n default setting first\n */\n rr.resSetHeader(HttpHeaders.Server, 'simple-boot-http-server');\n const cookie = rr.reqCookieGet(this.option.sessionOption.key);\n if (!cookie) {\n const session = await this.sessionManager.session();\n\n const cookieParts: string[] = [];\n cookieParts.push(`${this.option.sessionOption.key}=${session.uuid}`);\n cookieParts.push(`Path=${this.option.sessionOption.path}`);\n if (this.option.sessionOption.httpOnly) cookieParts.push('HttpOnly');\n if (this.option.sessionOption.secure) cookieParts.push('Secure');\n if (this.option.sessionOption.sameSite != null && this.option.sessionOption.sameSite) cookieParts.push(`SameSite=${this.option.sessionOption.sameSite}`);\n const maxAge = (this.option.sessionOption as any).maxAge ?? (this.sessionManager.sessionOption)?.maxAge;\n if (maxAge != null) cookieParts.push(`Max-Age=${maxAge}`);\n rr.resSetHeader(HttpHeaders.SetCookie, cookieParts.join('; '));\n }\n\n const otherStorage = new Map<ConstructorType<any>, any>();\n otherStorage.set(RequestResponse, rr);\n otherStorage.set(IncomingMessage, req);\n otherStorage.set(ServerResponse, res);\n try {\n transactionManager?.try();\n if (this.option.requestEndPoints) {\n for (const it of this.option.requestEndPoints) {\n try {\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim<EndPoint>({target: it}) : it) as EndPoint;\n execute?.endPoint(rr, this);\n } catch (e) {\n }\n }\n }\n\n const filter = {\n carrier: new Map<string, any>(),\n filters: [] as { filter: Filter, sw: boolean }[]\n };\n for (let i = 0; this.option.filters && i < this.option.filters.length; i++) {\n const it = this.option.filters[i];\n const execute = (typeof it === 'function' ? this.simstanceManager.getOrNewSim({target: it}) : it) as Filter;\n let sw = true;\n if (execute?.proceedBefore) {\n sw = await execute.proceedBefore({rr, app: this, carrier: filter.carrier});\n filter.filters.push({filter: execute, sw});\n }\n if (!sw) {\n break;\n }\n }\n\n // body.. something..\n if (!rr.resIsDone()) {\n const routerModule = await super.routing(rr.reqIntent);\n otherStorage.set(RouterModule, routerModule);\n const moduleInstance = routerModule?.getModuleInstance?.();\n let methods: SaveMappingConfig[] = [];\n if (routerModule && moduleInstance) {\n // router \uD074\uB798\uC2A4 \uB0B4\uBD80\uC5D0\uC11C \uC120\uC5B8\uB41C Route\uC77C\uB54C\n if (routerModule.propertyKeys) {\n const map = routerModule.propertyKeys?.map((it: string | symbol) => {\n return {propertyKey: it, config: getUrlMapping(moduleInstance, it)} as SaveMappingConfig\n });\n methods.push(...(map ?? []));\n } else {\n methods.push(...(getUrlMappings(moduleInstance).filter(it => !getRoute(moduleInstance, it.propertyKey)) ?? []));\n }\n\n // options\uB85C \uC694\uCCAD\uC624\uBA74\uC740 allow\uB85C \uB123\uACE0 \uADF8\uB0E5 200\uCC98\uB9AC\uD574\uC57C\uB428.\n if (rr.reqMethod()?.toUpperCase() === HttpMethod.OPTIONS.toUpperCase()) {\n rr.resSetHeader(HttpHeaders.Allow, methods.map(it => it.config.method).join(', '));\n rr.resStatusCode(HttpStatus.Ok);\n }\n\n // method \uCC3E\uAE30\n methods = methods.filter(it => it && it.propertyKey && it.config && rr.reqMethod()?.toUpperCase() === it.config.method.toUpperCase());\n methods.sort((a, b) => {\n return ((b.config?.req?.contentType?.length ?? 0) + (b.config?.req?.accept?.length ?? 0)) - ((a.config?.req?.contentType?.length ?? 0) + (a.config?.req?.accept?.length ?? 0));\n });\n methods = methods\n .filter(it => it.config?.req?.contentType ? (!!it.config?.req?.contentType?.find(sit => rr.reqHasContentTypeHeader(sit))) : true)\n .filter(it => it.config?.req?.accept ? (!!it.config?.req?.accept?.find(sit => rr.reqHasAcceptHeader(sit))) : true);\n\n if (methods[0]) {\n const it = methods[0];\n const paramTypes = ReflectUtils.getParameterTypes(moduleInstance, it.propertyKey)\n const injects = getInject(moduleInstance, it.propertyKey);\n const validIndexs = getValidIndex(moduleInstance, it.propertyKey);\n if (injects) {\n const isPathData = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_PATH_DATA);\n const isJson = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_JSON_BODY);\n const isSearchParamsObj = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ);\n const isFormUrl = injects.find(it => it.config?.situationType === UrlMappingSituationType.REQ_FORM_URL_BODY);\n // \uC6B0\uC120 \uB2E4\uC2DC \uC81C\uAC70\uD55C\uB2E4.. \uD2B8\uB79C\uC81D\uC158 \uC5B4\uB5BB\uAC8C \uD560\uC9C0 \uB2E4\uC2DC \uC0DD\uAC01\n // const isTransactionManager = injects.find(it => it.config?.situationType === InjectSituationType.TransactionManager);\n const siturationContainers = new SituationTypeContainers();\n if (isPathData) {\n let data = await routerModule.pathData\n if (isPathData.type) {\n data = Object.assign(new isPathData.type(), data);\n }\n if (validIndexs.includes(isPathData.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({\n situationType: UrlMappingSituationType.REQ_PATH_DATA,\n data\n }));\n }\n if (isJson) {\n let data = await rr.reqBodyJsonData();\n if (data !== null && isJson.type) {\n data = Object.assign(new isJson.type(), data);\n }\n if (validIndexs.includes(isJson.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({\n situationType: UrlMappingSituationType.REQ_JSON_BODY,\n data\n }));\n }\n if (isSearchParamsObj) {\n let data = rr.reqUrlSearchParamsObj\n if (validIndexs.includes(isSearchParamsObj.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({\n situationType: UrlMappingSituationType.REQ_URL_SEARCH_PARAMS_OBJ,\n data\n }));\n }\n if (isFormUrl) {\n let data = await rr.reqBodyFormUrlData()\n if (isFormUrl.type) {\n data = Object.assign(new isFormUrl.type(), data);\n }\n if (validIndexs.includes(isFormUrl.index)) {\n const inValid = execValidationInValid(data);\n if ((inValid?.length ?? 0) > 0) {\n throw new ValidException(inValid);\n }\n }\n siturationContainers.push(new SituationTypeContainer({situationType: UrlMappingSituationType.REQ_FORM_URL_BODY, data}));\n }\n // \uD2B8\uB79C\uC81D\uC158 \uC6B0\uC120 \uC81C\uAC70 \uB098\uC911\uC5D0 \uC5B4\uB5BB\uAC8C \uAD6C\uD604\uD560\uC9C0 \uC0DD\uAC01..\n // if (isTransactionManager && isTransactionManager.type && transactionManager && transactionManager.hasTransaction(isTransactionManager.type)) {\n // let data = await transactionManager.getTransaction(isTransactionManager.type);\n // if (data) {\n // data = await data.try(isTransactionManager.config.argument);\n // siturationContainers.push(new SituationTypeContainer({situationType: InjectSituationType.TransactionManager, data, index: isTransactionManager.index}));\n // }\n // }\n if (siturationContainers.length) {\n otherStorage.set(SituationTypeContainers, siturationContainers);\n }\n }\n\n for (const paramType of paramTypes) {\n if (paramType === ReqFormUrlBody) {\n otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody())\n } else if (paramType === ReqPathData) {\n otherStorage.set(ReqPathData, routerModule.pathData)\n } else if (paramType === ReqJsonBody) {\n otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody())\n } else if (paramType === ReqSearchParamsObj) {\n otherStorage.set(ReqSearchParamsObj, rr.reqUrlSearchParamsObj)\n } else if (paramType === URLSearchParams) {\n otherStorage.set(URLSearchParams, rr.reqUrlSearchParams)\n } else if (paramType === ReqMultipartFormBody) {\n otherStorage.set(ReqMultipartFormBody, rr.reqBodyMultipartFormData())\n } else if (paramType === ReqHeader) {\n otherStorage.set(ReqHeader, rr.reqHeaderObj)\n }\n }\n\n // execute !!!\n let data = await this.simstanceManager.executeBindParameterSimPromise({\n target: moduleInstance,\n targetKey: it.propertyKey\n }, otherStorage);\n /*\n \uC5EC\uAE30\uC5D0\uC11C \uC815\uD574\uC9C4 \uD0C0\uC785 \uB9AC\uD134\uC5D0 \uB530\uB978 \uC870\uCE58\n ...\n */\n if (it.config?.resolver) {\n const execute = typeof it.config.resolver === 'function' ? this.simstanceManager.getOrNewSim({target: it.config.resolver}) : it.config.resolver;\n data = await execute?.resolve?.(data, rr);\n }\n const status = it.config?.res?.status ?? HttpStatus.Ok;\n const headers = it.config?.res?.header ?? {};\n if (it.config?.res?.contentType) {\n headers[HttpHeaders.ContentType] = it.config?.res?.contentType;\n }\n if ((it.config?.res?.contentType?.toLowerCase().indexOf(Mimes.ApplicationJson.toLowerCase()) ?? -1) > -1) {\n data = JSON.stringify(data);\n } else if (data && typeof data === 'object') {\n data = JSON.stringify(data);\n }\n rr.resSetHeaders(headers)\n rr.resSetStatusCode(status);\n rr.resWrite(data);\n }\n }\n\n if (this.option.noSuchRouteEndPointMappingThrow && methods.length <= 0 && rr.reqMethod()?.toUpperCase() !== HttpMethod.OPTIONS) {\n throw this.option.noSuchRouteEndPointMappingThrow(rr);\n }\n }\n\n // after\n for (const it of filter.filters.reverse()) {\n if (it.filter?.proceedAfter && !await it.filter.proceedAfter({rr, app: this, before: it.sw, carrier: filter.carrier})) {\n break;\n }\n }\n } catch (e) {\n console.error('request error:', e);\n transactionManager?.catch(e);\n rr.resStatusCode(e instanceof HttpError ? e.status : HttpStatus.InternalServerError)\n const execute = typeof this.option.globalAdvice === 'function' ? this.simstanceManager.getOrNewSim(this.option.globalAdvice) : this.option.globalAdvice;\n if (!execute) {\n rr.resEnd();\n // rr.resEnd().catch(e => {\n // });\n return;\n }\n if (e && typeof e === 'object') {\n otherStorage.set(e.constructor as ConstructorType<any>, e);\n otherStorage.set(SituationTypeContainer, new SituationTypeContainer({\n situationType: ExceptionHandlerSituationType.ERROR_OBJECT,\n data: e\n }));\n }\n const target = targetExceptionHandler(execute, e);\n if (target) {\n await this.simstanceManager.executeBindParameterSimPromise({\n target: execute,\n targetKey: target.propertyKey\n }, otherStorage);\n }\n } finally {\n transactionManager?.finally();\n }\n\n if (!rr.resIsDone()) {\n rr.resEnd();\n }\n });\n\n if (this.option.webSocketEndPoints) {\n const webSocketServer = new WebSocketServer({server: this.server});\n const execute = this.option.webSocketEndPoints.map(it => typeof it === 'function' ? this.simstanceManager.getOrNewSim({target: it}) : it);\n webSocketServer.on('connection', async (ws, request) => {\n this.webSocketClients.set(ws, {request});\n const wsSet = {socket: ws, request};\n execute.forEach(it => it.connect?.(wsSet));\n ws.on('error', err => execute.forEach(it => it.error?.(wsSet, err)));\n ws.on('message', (data, isBinary) => execute.forEach(it => it.message(wsSet, {data, isBinary})));\n ws.on('ping', () => execute.forEach(it => it.ping?.(wsSet)));\n ws.on('close', () => {\n this.webSocketClients.delete(ws);\n execute.forEach(it => it.close?.(wsSet));\n });\n });\n }\n this.server.listen(this.option.listen.port,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7
  }
@@ -17,9 +17,11 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
  var HttpHeaders_exports = {};
19
19
  __export(HttpHeaders_exports, {
20
- HttpHeaders: () => HttpHeaders
20
+ HttpHeaders: () => HttpHeaders,
21
+ makeIntentHeaderBySymbolFor: () => makeIntentHeaderBySymbolFor
21
22
  });
22
23
  module.exports = __toCommonJS(HttpHeaders_exports);
24
+ var import_Mimes = require("./Mimes");
23
25
  const HttpHeaders = {
24
26
  ContentLength: "Content-Length",
25
27
  ContentType: "Content-Type",
@@ -60,10 +62,19 @@ const HttpHeaders = {
60
62
  IfNoneMatch: "If-None-Match",
61
63
  IfRange: "If-Range",
62
64
  Allow: "Allow",
63
- Server: "Server"
65
+ Server: "Server",
66
+ XSimpleBootSsrIntentScheme: "x-simple-boot-ssr-intent-scheme",
67
+ XSimpleBootHttpTopicProtocol: "x-simple-boot-http-topic-protocol"
68
+ };
69
+ const makeIntentHeaderBySymbolFor = (symbol) => {
70
+ return {
71
+ [HttpHeaders.Accept]: import_Mimes.Mimes.ApplicationJsonPostSimpleBootSsrIntentScheme,
72
+ [HttpHeaders.XSimpleBootSsrIntentScheme]: `Symbol.for(${symbol.description})`
73
+ };
64
74
  };
65
75
  // Annotate the CommonJS export names for ESM import in node:
66
76
  0 && (module.exports = {
67
- HttpHeaders
77
+ HttpHeaders,
78
+ makeIntentHeaderBySymbolFor
68
79
  });
69
80
  //# sourceMappingURL=HttpHeaders.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/codes/HttpHeaders.ts"],
4
- "sourcesContent": ["export const HttpHeaders = {\n ContentLength : 'Content-Length',\n ContentType : 'Content-Type',\n ContentEncoding : 'Content-Encoding',\n Accept : 'Accept',\n Authorization : 'Authorization',\n CacheControl : 'Cache-Control',\n Connection : 'Connection',\n Date : 'Date',\n Host : 'Host',\n Pragma : 'Pragma',\n Trailer : 'Trailer',\n TransferEncoding : 'Transfer-Encoding',\n Upgrade : 'Upgrade',\n Via : 'Via',\n Warning : 'Warning',\n AcceptCharset : 'Accept-Charset',\n AcceptEncoding : 'Accept-Encoding',\n AcceptLanguage : 'Accept-Language',\n AccessControlAllowOrigin : 'Access-Control-Allow-Origin',\n AccessControlAllowMethods : 'Access-Control-Allow-Methods',\n AccessControlAllowHeaders : 'Access-Control-Allow-Headers',\n AccessControlExposeHeaders : 'Access-Control-Expose-Headers',\n Expect : 'Expect',\n From : 'From',\n MaxForwards : 'Max-Forwards',\n Referer : 'Referer',\n UserAgent : 'User-Agent',\n Cookie : 'Cookie',\n SetCookie : 'Set-Cookie',\n // SetHeader : 'Set-Header',\n Cookie2 : 'Cookie2',\n SetCookie2 : 'Set-Cookie2',\n Location : 'Location',\n IfModifiedSince : 'If-Modified-Since',\n IfUnmodifiedSince : 'If-Unmodified-Since',\n IfMatch : 'If-Match',\n IfNoneMatch : 'If-None-Match',\n IfRange : 'If-Range',\n Allow : 'Allow',\n Server : 'Server'\n}\nexport type HttpHeadersType = keyof typeof HttpHeaders;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;AAAA,EACvB,eAAgB;AAAA,EAChB,aAAc;AAAA,EACd,iBAAkB;AAAA,EAClB,QAAS;AAAA,EACT,eAAgB;AAAA,EAChB,cAAe;AAAA,EACf,YAAa;AAAA,EACb,MAAO;AAAA,EACP,MAAO;AAAA,EACP,QAAS;AAAA,EACT,SAAU;AAAA,EACV,kBAAmB;AAAA,EACnB,SAAU;AAAA,EACV,KAAM;AAAA,EACN,SAAU;AAAA,EACV,eAAgB;AAAA,EAChB,gBAAiB;AAAA,EACjB,gBAAiB;AAAA,EACjB,0BAA2B;AAAA,EAC3B,2BAA4B;AAAA,EAC5B,2BAA4B;AAAA,EAC5B,4BAA6B;AAAA,EAC7B,QAAS;AAAA,EACT,MAAO;AAAA,EACP,aAAc;AAAA,EACd,SAAU;AAAA,EACV,WAAY;AAAA,EACZ,QAAS;AAAA,EACT,WAAY;AAAA;AAAA,EAEZ,SAAU;AAAA,EACV,YAAa;AAAA,EACb,UAAW;AAAA,EACX,iBAAkB;AAAA,EAClB,mBAAoB;AAAA,EACpB,SAAU;AAAA,EACV,aAAc;AAAA,EACd,SAAU;AAAA,EACV,OAAQ;AAAA,EACR,QAAS;AACb;",
4
+ "sourcesContent": ["import { Mimes } from './Mimes';\n\nexport const HttpHeaders = {\n ContentLength : 'Content-Length',\n ContentType : 'Content-Type',\n ContentEncoding : 'Content-Encoding',\n Accept : 'Accept',\n Authorization : 'Authorization',\n CacheControl : 'Cache-Control',\n Connection : 'Connection',\n Date : 'Date',\n Host : 'Host',\n Pragma : 'Pragma',\n Trailer : 'Trailer',\n TransferEncoding : 'Transfer-Encoding',\n Upgrade : 'Upgrade',\n Via : 'Via',\n Warning : 'Warning',\n AcceptCharset : 'Accept-Charset',\n AcceptEncoding : 'Accept-Encoding',\n AcceptLanguage : 'Accept-Language',\n AccessControlAllowOrigin : 'Access-Control-Allow-Origin',\n AccessControlAllowMethods : 'Access-Control-Allow-Methods',\n AccessControlAllowHeaders : 'Access-Control-Allow-Headers',\n AccessControlExposeHeaders : 'Access-Control-Expose-Headers',\n Expect : 'Expect',\n From : 'From',\n MaxForwards : 'Max-Forwards',\n Referer : 'Referer',\n UserAgent : 'User-Agent',\n Cookie : 'Cookie',\n SetCookie : 'Set-Cookie',\n // SetHeader : 'Set-Header',\n Cookie2 : 'Cookie2',\n SetCookie2 : 'Set-Cookie2',\n Location : 'Location',\n IfModifiedSince : 'If-Modified-Since',\n IfUnmodifiedSince : 'If-Unmodified-Since',\n IfMatch : 'If-Match',\n IfNoneMatch : 'If-None-Match',\n IfRange : 'If-Range',\n Allow : 'Allow',\n Server : 'Server',\n XSimpleBootSsrIntentScheme: 'x-simple-boot-ssr-intent-scheme',\n XSimpleBootHttpTopicProtocol: 'x-simple-boot-http-topic-protocol'\n}\nexport type HttpHeadersType = keyof typeof HttpHeaders;\n\nexport const makeIntentHeaderBySymbolFor = (symbol: Symbol): HeadersInit => {\n return {\n [HttpHeaders.Accept]: Mimes.ApplicationJsonPostSimpleBootSsrIntentScheme,\n [HttpHeaders.XSimpleBootSsrIntentScheme]: `Symbol.for(${symbol.description})`\n }\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAEf,MAAM,cAAc;AAAA,EACvB,eAAgB;AAAA,EAChB,aAAc;AAAA,EACd,iBAAkB;AAAA,EAClB,QAAS;AAAA,EACT,eAAgB;AAAA,EAChB,cAAe;AAAA,EACf,YAAa;AAAA,EACb,MAAO;AAAA,EACP,MAAO;AAAA,EACP,QAAS;AAAA,EACT,SAAU;AAAA,EACV,kBAAmB;AAAA,EACnB,SAAU;AAAA,EACV,KAAM;AAAA,EACN,SAAU;AAAA,EACV,eAAgB;AAAA,EAChB,gBAAiB;AAAA,EACjB,gBAAiB;AAAA,EACjB,0BAA2B;AAAA,EAC3B,2BAA4B;AAAA,EAC5B,2BAA4B;AAAA,EAC5B,4BAA6B;AAAA,EAC7B,QAAS;AAAA,EACT,MAAO;AAAA,EACP,aAAc;AAAA,EACd,SAAU;AAAA,EACV,WAAY;AAAA,EACZ,QAAS;AAAA,EACT,WAAY;AAAA;AAAA,EAEZ,SAAU;AAAA,EACV,YAAa;AAAA,EACb,UAAW;AAAA,EACX,iBAAkB;AAAA,EAClB,mBAAoB;AAAA,EACpB,SAAU;AAAA,EACV,aAAc;AAAA,EACd,SAAU;AAAA,EACV,OAAQ;AAAA,EACR,QAAS;AAAA,EACX,4BAA4B;AAAA,EAC5B,8BAA8B;AAChC;AAGO,MAAM,8BAA8B,CAAC,WAAgC;AAC1E,SAAO;AAAA,IACL,CAAC,YAAY,MAAM,GAAG,mBAAM;AAAA,IAC5B,CAAC,YAAY,0BAA0B,GAAG,cAAc,OAAO,WAAW;AAAA,EAC5E;AACF;",
6
6
  "names": []
7
7
  }
@@ -22,6 +22,7 @@ __export(HttpStatus_exports, {
22
22
  module.exports = __toCommonJS(HttpStatus_exports);
23
23
  var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
24
24
  HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
25
+ HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
25
26
  HttpStatus2[HttpStatus2["MovedPermanently"] = 301] = "MovedPermanently";
26
27
  HttpStatus2[HttpStatus2["Found"] = 302] = "Found";
27
28
  HttpStatus2[HttpStatus2["SeeOther"] = 303] = "SeeOther";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/codes/HttpStatus.ts"],
4
- "sourcesContent": ["export enum HttpStatus {\n Ok = 200,\n\n /**\n * HTTP 301 Moved Permanently \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC8FC\uC5B4\uC9C4 URL\uB85C \uC644\uC804\uD788 \uC62E\uACA8\uC84C\uB2E4\uB294 \uAC83\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB294 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uD2B8\uD558\uACE0, \uAC80\uC0C9 \uC5D4\uC9C4\uC740 \uD574\uB2F9 \uB9AC\uC18C\uC2A4\uB85C \uC5F0\uACB0\uB418\uB294 \uB9C1\uD06C\uB97C \uAC31\uC2E0\uD569\uB2C8\uB2E4.\n */\n MovedPermanently = 301,\n /**\n * https://developer.mozilla.org/ko/docs/Web/HTTP/Reference/Status/302\n * HTTP(HyperText Transfer Protocol) 302 Found \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC9C0\uC815\uB41C URL\uB85C \uC77C\uC2DC\uC801\uC73C\uB85C \uC774\uB3D9\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB294 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uC158\uB418\uC9C0\uB9CC \uAC80\uC0C9 \uC5D4\uC9C4\uC740 \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uB9C1\uD06C\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4('SEO-speak'\uC5D0\uC11C\uB294 'link-juice'\uAC00 \uC0C8 URL\uB85C \uC804\uC1A1\uB418\uC9C0 \uC54A\uB294\uB2E4\uACE0 \uD569\uB2C8\uB2E4).\n * \uBA85\uC138\uC11C\uC5D0\uC11C \uB9AC\uB514\uB809\uC158\uC774 \uC218\uD589\uB420 \uB54C \uBA54\uC11C\uB4DC(\uBC0F \uBCF8\uBB38)\uAC00 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uB3C4\uB85D \uC694\uAD6C\uD558\uB354\uB77C\uB3C4 \uBAA8\uB4E0 \uC0AC\uC6A9\uC790 \uC5D0\uC774\uC804\uD2B8\uAC00 \uC774\uB97C \uC900\uC218\uD558\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4. \uC5EC\uB7EC\uBD84\uC740 \uC5EC\uC804\uD788 \uC774\uB7EC\uD55C \uC720\uD615\uC758 \uBC84\uADF8\uAC00 \uC788\uB294 \uC18C\uD504\uD2B8\uC6E8\uC5B4\uB97C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB530\uB77C\uC11C \uB530\uB77C\uC11C 302 \uCF54\uB4DC\uB294 GET \uB610\uB294 HEAD \uBA54\uC11C\uB4DC\uC5D0 \uB300\uD55C \uC751\uB2F5\uC73C\uB85C\uB9CC \uC124\uC815\uD558\uACE0 \uC774 \uACBD\uC6B0 \uBA54\uC11C\uB4DC \uBCC0\uACBD\uC774 \uBA85\uC2DC\uC801\uC73C\uB85C \uAE08\uC9C0\uB418\uBBC0\uB85C 307 Temporary Redirect \uB97C \uB300\uC2E0 \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n * \uC0AC\uC6A9\uD558\uB358 \uBA54\uC11C\uB4DC\uB97C GET\uC73C\uB85C \uBCC0\uACBD\uD558\uB824\uB294 \uACBD\uC6B0, 303 See Other\uC744 \uB300\uC2E0 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624. PUT \uBA54\uC11C\uB4DC\uC5D0 \uB300\uD55C \uC751\uB2F5\uC744 \uC5C5\uB85C\uB4DC\uB41C \uB9AC\uC18C\uC2A4\uAC00 \uC544\uB2C8\uB77C 'You successfully updown XYZ'\uC640 \uAC19\uC740 \uD655\uC778 \uBA54\uC2DC\uC9C0\uB85C \uC8FC\uACE0 \uC2F6\uC744\uB54C \uC720\uC6A9\uD569\uB2C8\uB2E4.\n */\n Found = 302,\n /**\n * HTTP(HyperText Transfer Protocol) 303 See Other \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uB9AC\uB514\uB809\uC158\uC774 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4 \uC790\uCCB4\uC5D0 \uC5F0\uACB0\uB418\uC9C0 \uC54A\uACE0 \uB2E4\uB978 \uD398\uC774\uC9C0(\uC608: \uD655\uC778 \uD398\uC774\uC9C0, \uC2E4\uC81C \uAC1C\uCCB4 \uD45C\uC2DC(HTTP range-14 \uCC38\uC870) \uB610\uB294 \uC5C5\uB85C\uB4DC \uC9C4\uD589\uB960 \uD398\uC774\uC9C0)\uC5D0 \uC5F0\uACB0\uB428\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uC774 \uC751\uB2F5 \uCF54\uB4DC\uB294 PUT \uB610\uB294 POST\uC758 \uACB0\uACFC\uB85C \uB2E4\uC2DC \uC804\uC1A1\uB418\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4. \uC774 \uB9AC\uB514\uB809\uC158 \uD398\uC774\uC9C0\uB97C \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uBC29\uBC95\uC740 \uD56D\uC0C1 GET\uC785\uB2C8\uB2E4.\n */\n SeeOther = 303,\n /**\n * \uD074\uB77C\uC774\uC5B8\uD2B8 \uB9AC\uB514\uB809\uC158 \uC751\uB2F5 \uCF54\uB4DC 304 Not Modified \uB294 \uC694\uCCAD\uB41C \uB9AC\uC18C\uC2A4\uB97C \uC7AC\uC804\uC1A1\uD560 \uD544\uC694\uAC00 \uC5C6\uC74C\uC744 \uB098\uD0C0\uB0B8\uB2E4. \uCE90\uC2DC\uB41C \uC790\uC6D0\uC73C\uB85C\uC758 \uC554\uBB35\uC801\uC778 \uB9AC\uB514\uB809\uC158\uC774\uB2E4. \uC774 \uB294 GET \uB098 HEAD \uC694\uCCAD\uCC98\uB7FC \uC694\uCCAD \uBC29\uBC95\uC774 \uC548\uC804 \uD55C \uACBD\uC6B0 \uB610\uB294 \uC694\uCCAD\uC774 \uC870\uAC74\uBD80\uB85C If-None-Match \uB610\uB294 If-Modified-Since \uD5E4\uB354\uB97C \uC0AC\uC6A9\uD560 \uB54C \uC751\uB2F5 \uB41C\uB2E4.\n * \uC774\uC5D0 \uC0C1\uC751\uD558\uB294 200 OK \uC751\uB2F5\uC5D0\uB294 Cache-Control, Content-Location, Date, ETag, Expires, \uADF8\uB9AC\uACE0 Vary \uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC5C8\uC744 \uAC83\uC774\uB2E4.\n */\n NotModified = 304,\n /**\n * HTTP 307 Temporary Redirect \uB9AC\uB2E4\uC774\uB809\uD2B8 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC8FC\uC5B4\uC9C4 URL \uB85C \uC784\uC2DC\uB85C \uC62E\uACA8\uC84C\uB2E4\uB294 \uAC83\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4.\n * \uC6D0\uB798 \uC694\uCCAD\uD55C \uBA54\uC18C\uB4DC\uC640 Body \uB97C \uC7AC\uC0AC\uC6A9\uD558\uC5EC \uC694\uCCAD\uC744 \uB9AC\uB2E4\uC774\uB809\uD2B8 \uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C \uBA54\uC18C\uB4DC\uB97C GET\uC73C\uB85C \uBC14\uAFB8\uAE30 \uC704\uD574\uC11C 303 See Other\uB97C \uC0AC\uC6A9\uD558\uC2DC\uBA74 \uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 PUT\uC694\uCCAD\uC5D0 \uC5C5\uB85C\uB4DC\uB41C \uB9AC\uC18C\uC2A4\uAC00 \uC544\uB2CC \"You successfully uploaded XYZ\"\uC640 \uAC19\uC740 \uD655\uC778\uBA54\uC2DC\uC9C0 \uC751\uB2F5\uC744 \uC81C\uACF5 \uD558\uB294\uB370\uC5D0 \uC720\uC6A9\uD569\uB2C8\uB2E4.\n * 307\uACFC 302\uAC00 \uC720\uC77C\uD558\uAC8C \uB2E4\uB978\uC810\uC740 307\uC740 Method \uC640 Body \uB97C \uBCC0\uACBD\uD558\uC9C0 \uC54A\uACE0 \uB9AC\uB2E4\uC774\uB809\uD2B8 \uC694\uCCAD\uC744 \uD558\uB3C4\uB85D \uBCF4\uC7A5\uD569\uB2C8\uB2E4. 302\uC751\uB2F5\uC73C\uB85C \uC778\uD558\uC5EC \uC77C\uBD80 \uC624\uB798\uB41C \uD074\uB77C\uC774\uC5B8\uD2B8\uB4E4\uC740 \uBA54\uC18C\uB4DC\uB97C GET\uC73C\uB85C \uD2C0\uB9AC\uAC8C \uBCC0\uACBD\uD558\uC600\uC2B5\uB2C8\uB2E4. GET\uC774 \uC544\uB2CC \uB2E4\uB978 \uBA54\uC18C\uB4DC\uC5D0 302\uB3D9\uC791\uC740 \uC6F9\uC5D0\uC11C \uC608\uC0C1\uB418\uC9C0 \uC54A\uC9C0\uB9CC 307 \uB3D9\uC791\uC740 \uC608\uC0C1\uD560\uC218 \uC788\uC2B5\uB2C8\uB2E4. GET \uC694\uCCAD\uC5D0 \uB300\uD574\uC11C\uB294 \uB3D9\uC77C\uD558\uAC8C \uB3D9\uC791 \uD569\uB2C8\uB2E4.\n */\n TemporaryRedirect = 307,\n /**\n * \uD558\uC774\uD37C\uD14D\uC2A4\uD2B8 \uC804\uC1A1 \uD504\uB85C\uD1A0\uCF5C (HTTP) 308 Permanent Redirect \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uB41C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC9C0\uC815\uB41C URL\uB85C \uD655\uC2E4\uD788 \uC774\uB3D9\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uAC00 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uC158\uB418\uACE0 \uAC80\uC0C9\uC5D4\uC9C4\uC740 \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uB9C1\uD06C\uB97C \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4('SEO-speak'\uC5D0\uC11C\uB294 'link-juice'\uAC00 \uC0C8 URL\uB85C \uC804\uC1A1\uB429\uB2C8\uB2E4).\n * \uC694\uCCAD \uBA54\uC11C\uB4DC\uC640 \uBCF8\uBB38\uC740 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC9C0\uB9CC, 301\uC740 \uB54C\uB54C\uB85C GET \uBA54\uC11C\uB4DC\uB85C \uC798\uBABB \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n */\n PermanentRedirect = 308,\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n InternalServerError = 500,\n NotImplemented = 501,\n BadGateway = 502,\n ServiceUnavailable = 503,\n GatewayTimeout = 504,\n HttpVersionNotSupported = 505\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,aAAL,kBAAKA,gBAAL;AACH,EAAAA,wBAAA,QAAK,OAAL;AAKA,EAAAA,wBAAA,sBAAmB,OAAnB;AAOA,EAAAA,wBAAA,WAAQ,OAAR;AAIA,EAAAA,wBAAA,cAAW,OAAX;AAKA,EAAAA,wBAAA,iBAAc,OAAd;AAMA,EAAAA,wBAAA,uBAAoB,OAApB;AAKA,EAAAA,wBAAA,uBAAoB,OAApB;AACA,EAAAA,wBAAA,gBAAa,OAAb;AACA,EAAAA,wBAAA,kBAAe,OAAf;AACA,EAAAA,wBAAA,eAAY,OAAZ;AACA,EAAAA,wBAAA,cAAW,OAAX;AACA,EAAAA,wBAAA,yBAAsB,OAAtB;AACA,EAAAA,wBAAA,oBAAiB,OAAjB;AACA,EAAAA,wBAAA,gBAAa,OAAb;AACA,EAAAA,wBAAA,wBAAqB,OAArB;AACA,EAAAA,wBAAA,oBAAiB,OAAjB;AACA,EAAAA,wBAAA,6BAA0B,OAA1B;AA3CQ,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["export enum HttpStatus {\n Ok = 200,\n\n /**\n * Multiple Choices\u00A0\u21E2 \uC694\uCCAD\uC5D0 \uB300\uD574\uC11C \uB458 \uC774\uC0C1\uC758 \uAC00\uB2A5\uD55C \uC751\uB2F5\uC774 \uC788\uC74C\uC744 \uB098\uD0C0\uB0B8\uB2E4.\n * \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uB3D9\uC2DC\uC5D0 \uC5EC\uB7EC \uB9AC\uC18C\uC2A4\uB97C \uAC00\uB9AC\uD0A4\uB294 URL\uC744 \uC694\uCCAD\uD55C \uACBD\uC6B0, \uADF8 \uB9AC\uC18C\uC2A4\uC758 \uBAA9\uB85D\uACFC \uD568\uAED8 \uBC18\uD658\uB41C\uB2E4.\n * \uC5B4\uB5A4 \uC11C\uBC84\uAC00 \uD558\uB098\uC758 HTML \uBB38\uC11C\uB97C \uC601\uC5B4\uC640 \uD504\uB791\uC2A4\uC5B4 \uBAA8\uB450\uB85C \uC81C\uACF5\uD558\uB294 \uACBD\uC6B0 \uB4F1\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB2E4.\n * \uADF8\uB7EC\uB098 \uC751\uB2F5 \uC911 \uD558\uB098\uB97C \uC120\uD0DD\uD558\uB294 \uD45C\uC900\uD654\uB41C \uBC29\uBC95\uC774 \uC5C6\uAE30 \uB54C\uBB38\uC5D0, \uC774 \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC2E4\uBB34\uC5D0\uC120 \uAC70\uC758 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294\uB2E4.\n */\n MultipleChoices = 300,\n\n /**\n * \uC601\uAD6C\n * HTTP 301 Moved Permanently \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC8FC\uC5B4\uC9C4 URL\uB85C \uC644\uC804\uD788 \uC62E\uACA8\uC84C\uB2E4\uB294 \uAC83\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB294 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uD2B8\uD558\uACE0, \uAC80\uC0C9 \uC5D4\uC9C4\uC740 \uD574\uB2F9 \uB9AC\uC18C\uC2A4\uB85C \uC5F0\uACB0\uB418\uB294 \uB9C1\uD06C\uB97C \uAC31\uC2E0\uD569\uB2C8\uB2E4.\n * Moved Permanently \u21E2 \uC601\uAD6C\uC801\uC73C\uB85C \uC774\uB3D9 (\uC601\uAD6C \uB9AC\uB2E4\uC774\uB809\uC158)\n * \uC694\uCCAD\uB41C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uAC00 \uC9C0\uC815\uD55C URL\uB85C \uC774\uB3D9\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0B8\uB2E4.\n * \uD574\uB2F9 URL\uB85C \uB9AC\uB2E4\uC774\uB809\uC158 \uB418\uBA74, \uC694\uCCAD \uBA54\uC11C\uB4DC\uAC00 GET\uC73C\uB85C \uBCC0\uD558\uACE0 \uBCF8\uBB38\uC774 \uC81C\uAC70\uB420\uC218 \uC788\uB2E4.\n * \uB530\uB77C\uC11C 301 \uCF54\uB4DC\uB294\u00A0GET\u00A0\uB610\uB294\u00A0HEAD\u00A0\uBC29\uBC95\uC5D0 \uB300\uD55C \uC751\uB2F5\uC73C\uB85C\uB9CC \uC0AC\uC6A9\uD558\uACE0, \uB300\uC2E0 POST, PUT \uAC19\uC740 \uACBD\uC6B0\uB294 \uAC19\uC740 \uC601\uAD6C \uB9AC\uB514\uB809\uC158\uC778 308 Permanent Redirect \uC744 \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uB2E4.\n */\n MovedPermanently = 301,\n\n /** \uC784\uC2DC\n * https://developer.mozilla.org/ko/docs/Web/HTTP/Reference/Status/302\n * HTTP(HyperText Transfer Protocol) 302 Found \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC9C0\uC815\uB41C URL\uB85C \uC77C\uC2DC\uC801\uC73C\uB85C \uC774\uB3D9\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB294 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uC158\uB418\uC9C0\uB9CC \uAC80\uC0C9 \uC5D4\uC9C4\uC740 \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uB9C1\uD06C\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4('SEO-speak'\uC5D0\uC11C\uB294 'link-juice'\uAC00 \uC0C8 URL\uB85C \uC804\uC1A1\uB418\uC9C0 \uC54A\uB294\uB2E4\uACE0 \uD569\uB2C8\uB2E4).\n * \uBA85\uC138\uC11C\uC5D0\uC11C \uB9AC\uB514\uB809\uC158\uC774 \uC218\uD589\uB420 \uB54C \uBA54\uC11C\uB4DC(\uBC0F \uBCF8\uBB38)\uAC00 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uB3C4\uB85D \uC694\uAD6C\uD558\uB354\uB77C\uB3C4 \uBAA8\uB4E0 \uC0AC\uC6A9\uC790 \uC5D0\uC774\uC804\uD2B8\uAC00 \uC774\uB97C \uC900\uC218\uD558\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4. \uC5EC\uB7EC\uBD84\uC740 \uC5EC\uC804\uD788 \uC774\uB7EC\uD55C \uC720\uD615\uC758 \uBC84\uADF8\uAC00 \uC788\uB294 \uC18C\uD504\uD2B8\uC6E8\uC5B4\uB97C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB530\uB77C\uC11C \uB530\uB77C\uC11C 302 \uCF54\uB4DC\uB294 GET \uB610\uB294 HEAD \uBA54\uC11C\uB4DC\uC5D0 \uB300\uD55C \uC751\uB2F5\uC73C\uB85C\uB9CC \uC124\uC815\uD558\uACE0 \uC774 \uACBD\uC6B0 \uBA54\uC11C\uB4DC \uBCC0\uACBD\uC774 \uBA85\uC2DC\uC801\uC73C\uB85C \uAE08\uC9C0\uB418\uBBC0\uB85C 307 Temporary Redirect \uB97C \uB300\uC2E0 \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n * \uC0AC\uC6A9\uD558\uB358 \uBA54\uC11C\uB4DC\uB97C GET\uC73C\uB85C \uBCC0\uACBD\uD558\uB824\uB294 \uACBD\uC6B0, 303 See Other\uC744 \uB300\uC2E0 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624. PUT \uBA54\uC11C\uB4DC\uC5D0 \uB300\uD55C \uC751\uB2F5\uC744 \uC5C5\uB85C\uB4DC\uB41C \uB9AC\uC18C\uC2A4\uAC00 \uC544\uB2C8\uB77C 'You successfully updown XYZ'\uC640 \uAC19\uC740 \uD655\uC778 \uBA54\uC2DC\uC9C0\uB85C \uC8FC\uACE0 \uC2F6\uC744\uB54C \uC720\uC6A9\uD569\uB2C8\uB2E4.\n */\n Found = 302,\n\n /**\n * HTTP(HyperText Transfer Protocol) 303 See Other \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uB9AC\uB514\uB809\uC158\uC774 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4 \uC790\uCCB4\uC5D0 \uC5F0\uACB0\uB418\uC9C0 \uC54A\uACE0 \uB2E4\uB978 \uD398\uC774\uC9C0(\uC608: \uD655\uC778 \uD398\uC774\uC9C0, \uC2E4\uC81C \uAC1C\uCCB4 \uD45C\uC2DC(HTTP range-14 \uCC38\uC870) \uB610\uB294 \uC5C5\uB85C\uB4DC \uC9C4\uD589\uB960 \uD398\uC774\uC9C0)\uC5D0 \uC5F0\uACB0\uB428\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uC774 \uC751\uB2F5 \uCF54\uB4DC\uB294 PUT \uB610\uB294 POST\uC758 \uACB0\uACFC\uB85C \uB2E4\uC2DC \uC804\uC1A1\uB418\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4. \uC774 \uB9AC\uB514\uB809\uC158 \uD398\uC774\uC9C0\uB97C \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uBC29\uBC95\uC740 \uD56D\uC0C1 GET\uC785\uB2C8\uB2E4.\n */\n SeeOther = 303,\n\n /**\n * \uD074\uB77C\uC774\uC5B8\uD2B8 \uB9AC\uB514\uB809\uC158 \uC751\uB2F5 \uCF54\uB4DC 304 Not Modified \uB294 \uC694\uCCAD\uB41C \uB9AC\uC18C\uC2A4\uB97C \uC7AC\uC804\uC1A1\uD560 \uD544\uC694\uAC00 \uC5C6\uC74C\uC744 \uB098\uD0C0\uB0B8\uB2E4. \uCE90\uC2DC\uB41C \uC790\uC6D0\uC73C\uB85C\uC758 \uC554\uBB35\uC801\uC778 \uB9AC\uB514\uB809\uC158\uC774\uB2E4. \uC774 \uB294 GET \uB098 HEAD \uC694\uCCAD\uCC98\uB7FC \uC694\uCCAD \uBC29\uBC95\uC774 \uC548\uC804 \uD55C \uACBD\uC6B0 \uB610\uB294 \uC694\uCCAD\uC774 \uC870\uAC74\uBD80\uB85C If-None-Match \uB610\uB294 If-Modified-Since \uD5E4\uB354\uB97C \uC0AC\uC6A9\uD560 \uB54C \uC751\uB2F5 \uB41C\uB2E4.\n * \uC774\uC5D0 \uC0C1\uC751\uD558\uB294 200 OK \uC751\uB2F5\uC5D0\uB294 Cache-Control, Content-Location, Date, ETag, Expires, \uADF8\uB9AC\uACE0 Vary \uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC5C8\uC744 \uAC83\uC774\uB2E4.\n */\n NotModified = 304,\n\n /**\n * HTTP 307 Temporary Redirect \uB9AC\uB2E4\uC774\uB809\uD2B8 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uD55C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC8FC\uC5B4\uC9C4 URL \uB85C \uC784\uC2DC\uB85C \uC62E\uACA8\uC84C\uB2E4\uB294 \uAC83\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4.\n * \uC6D0\uB798 \uC694\uCCAD\uD55C \uBA54\uC18C\uB4DC\uC640 Body \uB97C \uC7AC\uC0AC\uC6A9\uD558\uC5EC \uC694\uCCAD\uC744 \uB9AC\uB2E4\uC774\uB809\uD2B8 \uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C \uBA54\uC18C\uB4DC\uB97C GET\uC73C\uB85C \uBC14\uAFB8\uAE30 \uC704\uD574\uC11C 303 See Other\uB97C \uC0AC\uC6A9\uD558\uC2DC\uBA74 \uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 PUT\uC694\uCCAD\uC5D0 \uC5C5\uB85C\uB4DC\uB41C \uB9AC\uC18C\uC2A4\uAC00 \uC544\uB2CC \"You successfully uploaded XYZ\"\uC640 \uAC19\uC740 \uD655\uC778\uBA54\uC2DC\uC9C0 \uC751\uB2F5\uC744 \uC81C\uACF5 \uD558\uB294\uB370\uC5D0 \uC720\uC6A9\uD569\uB2C8\uB2E4.\n * 307\uACFC 302\uAC00 \uC720\uC77C\uD558\uAC8C \uB2E4\uB978\uC810\uC740 307\uC740 Method \uC640 Body \uB97C \uBCC0\uACBD\uD558\uC9C0 \uC54A\uACE0 \uB9AC\uB2E4\uC774\uB809\uD2B8 \uC694\uCCAD\uC744 \uD558\uB3C4\uB85D \uBCF4\uC7A5\uD569\uB2C8\uB2E4. 302\uC751\uB2F5\uC73C\uB85C \uC778\uD558\uC5EC \uC77C\uBD80 \uC624\uB798\uB41C \uD074\uB77C\uC774\uC5B8\uD2B8\uB4E4\uC740 \uBA54\uC18C\uB4DC\uB97C GET\uC73C\uB85C \uD2C0\uB9AC\uAC8C \uBCC0\uACBD\uD558\uC600\uC2B5\uB2C8\uB2E4. GET\uC774 \uC544\uB2CC \uB2E4\uB978 \uBA54\uC18C\uB4DC\uC5D0 302\uB3D9\uC791\uC740 \uC6F9\uC5D0\uC11C \uC608\uC0C1\uB418\uC9C0 \uC54A\uC9C0\uB9CC 307 \uB3D9\uC791\uC740 \uC608\uC0C1\uD560\uC218 \uC788\uC2B5\uB2C8\uB2E4. GET \uC694\uCCAD\uC5D0 \uB300\uD574\uC11C\uB294 \uB3D9\uC77C\uD558\uAC8C \uB3D9\uC791 \uD569\uB2C8\uB2E4.\n */\n TemporaryRedirect = 307,\n\n /**\n * \uD558\uC774\uD37C\uD14D\uC2A4\uD2B8 \uC804\uC1A1 \uD504\uB85C\uD1A0\uCF5C (HTTP) 308 Permanent Redirect \uB9AC\uB514\uB809\uC158 \uC0C1\uD0DC \uC751\uB2F5 \uCF54\uB4DC\uB294 \uC694\uCCAD\uB41C \uB9AC\uC18C\uC2A4\uAC00 Location \uD5E4\uB354\uC5D0 \uC9C0\uC815\uB41C URL\uB85C \uD655\uC2E4\uD788 \uC774\uB3D9\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uAC00 \uC774 \uD398\uC774\uC9C0\uB85C \uB9AC\uB514\uB809\uC158\uB418\uACE0 \uAC80\uC0C9\uC5D4\uC9C4\uC740 \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uB9C1\uD06C\uB97C \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4('SEO-speak'\uC5D0\uC11C\uB294 'link-juice'\uAC00 \uC0C8 URL\uB85C \uC804\uC1A1\uB429\uB2C8\uB2E4).\n * \uC694\uCCAD \uBA54\uC11C\uB4DC\uC640 \uBCF8\uBB38\uC740 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC9C0\uB9CC, 301\uC740 \uB54C\uB54C\uB85C GET \uBA54\uC11C\uB4DC\uB85C \uC798\uBABB \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n */\n PermanentRedirect = 308,\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n InternalServerError = 500,\n NotImplemented = 501,\n BadGateway = 502,\n ServiceUnavailable = 503,\n GatewayTimeout = 504,\n HttpVersionNotSupported = 505\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,aAAL,kBAAKA,gBAAL;AACH,EAAAA,wBAAA,QAAK,OAAL;AAQA,EAAAA,wBAAA,qBAAkB,OAAlB;AAUA,EAAAA,wBAAA,sBAAmB,OAAnB;AAQA,EAAAA,wBAAA,WAAQ,OAAR;AAKA,EAAAA,wBAAA,cAAW,OAAX;AAMA,EAAAA,wBAAA,iBAAc,OAAd;AAOA,EAAAA,wBAAA,uBAAoB,OAApB;AAMA,EAAAA,wBAAA,uBAAoB,OAApB;AACA,EAAAA,wBAAA,gBAAa,OAAb;AACA,EAAAA,wBAAA,kBAAe,OAAf;AACA,EAAAA,wBAAA,eAAY,OAAZ;AACA,EAAAA,wBAAA,cAAW,OAAX;AACA,EAAAA,wBAAA,yBAAsB,OAAtB;AACA,EAAAA,wBAAA,oBAAiB,OAAjB;AACA,EAAAA,wBAAA,gBAAa,OAAb;AACA,EAAAA,wBAAA,wBAAqB,OAArB;AACA,EAAAA,wBAAA,oBAAiB,OAAjB;AACA,EAAAA,wBAAA,6BAA0B,OAA1B;AA7DQ,SAAAA;AAAA,GAAA;",
6
6
  "names": ["HttpStatus"]
7
7
  }
@@ -46,6 +46,8 @@ var Mimes = /* @__PURE__ */ ((Mimes2) => {
46
46
  Mimes2["ImageXpixmap"] = "image/x-xpixmap";
47
47
  Mimes2["ImageXxbm"] = "image/x-xbm";
48
48
  Mimes2["MultipartFormData"] = "multipart/form-data";
49
+ Mimes2["ApplicationJsonPostSimpleBootSsrIntentScheme"] = "application/json-post+simple-boot-ssr-intent-scheme";
50
+ Mimes2["Intent"] = "intent";
49
51
  return Mimes2;
50
52
  })(Mimes || {});
51
53
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/codes/Mimes.ts"],
4
- "sourcesContent": ["export enum Mimes {\n ApplicationJson = 'application/json',\n ApplicationOctetStream = 'application/octet-stream',\n ApplicationXml = 'application/xml',\n ApplicationJsonPatch = 'application/json-patch+json',\n ApplicationXWwwFormUrlencoded = 'application/x-www-form-urlencoded',\n TextPlain = 'text/plain',\n TextHtml = 'text/html',\n All = '*/*',\n TextCss = 'text/css',\n TextJavascript = 'text/javascript',\n TextXml = 'text/xml',\n TextXslt = 'text/xslt',\n TextXmlDtd = 'text/xml-dtd',\n TextPlainUtf8 = 'text/plain; charset=utf-8',\n ImagePng = 'image/png',\n ImageGif = 'image/gif',\n ImageJpeg = 'image/jpeg',\n ImageSvg = 'image/svg+xml',\n ImageBmp = 'image/bmp',\n ImageTiff = 'image/tiff',\n ImagePdf = 'application/pdf',\n ImageXBmp = 'image/x-bmp',\n ImageXpixmap = 'image/x-xpixmap',\n ImageXxbm = 'image/x-xbm',\n MultipartFormData = 'multipart/form-data',\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,QAAL,kBAAKA,WAAL;AACH,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,4BAAyB;AACzB,EAAAA,OAAA,oBAAiB;AACjB,EAAAA,OAAA,0BAAuB;AACvB,EAAAA,OAAA,mCAAgC;AAChC,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,SAAM;AACN,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,oBAAiB;AACjB,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,gBAAa;AACb,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,kBAAe;AACf,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,uBAAoB;AAzBZ,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["export enum Mimes {\n ApplicationJson = 'application/json',\n ApplicationOctetStream = 'application/octet-stream',\n ApplicationXml = 'application/xml',\n ApplicationJsonPatch = 'application/json-patch+json',\n ApplicationXWwwFormUrlencoded = 'application/x-www-form-urlencoded',\n TextPlain = 'text/plain',\n TextHtml = 'text/html',\n All = '*/*',\n TextCss = 'text/css',\n TextJavascript = 'text/javascript',\n TextXml = 'text/xml',\n TextXslt = 'text/xslt',\n TextXmlDtd = 'text/xml-dtd',\n TextPlainUtf8 = 'text/plain; charset=utf-8',\n ImagePng = 'image/png',\n ImageGif = 'image/gif',\n ImageJpeg = 'image/jpeg',\n ImageSvg = 'image/svg+xml',\n ImageBmp = 'image/bmp',\n ImageTiff = 'image/tiff',\n ImagePdf = 'application/pdf',\n ImageXBmp = 'image/x-bmp',\n ImageXpixmap = 'image/x-xpixmap',\n ImageXxbm = 'image/x-xbm',\n MultipartFormData = 'multipart/form-data',\n ApplicationJsonPostSimpleBootSsrIntentScheme = 'application/json-post+simple-boot-ssr-intent-scheme',\n Intent = 'intent'\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,QAAL,kBAAKA,WAAL;AACL,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,4BAAyB;AACzB,EAAAA,OAAA,oBAAiB;AACjB,EAAAA,OAAA,0BAAuB;AACvB,EAAAA,OAAA,mCAAgC;AAChC,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,SAAM;AACN,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,oBAAiB;AACjB,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,gBAAa;AACb,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,cAAW;AACX,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,kBAAe;AACf,EAAAA,OAAA,eAAY;AACZ,EAAAA,OAAA,uBAAoB;AACpB,EAAAA,OAAA,kDAA+C;AAC/C,EAAAA,OAAA,YAAS;AA3BC,SAAAA;AAAA,GAAA;",
6
6
  "names": ["Mimes"]
7
7
  }