@venok/http 2.2.0-next.2 → 2.2.0-next.4

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.
@@ -42,7 +42,7 @@ class HttpContextCreator extends VenokContextCreator {
42
42
  guards: true,
43
43
  filters: false,
44
44
  callback: undefined
45
- }, contextType = "native") {
45
+ }, contextType = "http") {
46
46
  const moduleKey = this.getContextModuleKey(instance.constructor);
47
47
  const { getParamsMetadata } = super.getMetadata(instance, methodName, metadataKey, paramsFactory, contextType);
48
48
  const { fnHandleResponse, httpStatusCode, responseHeaders, hasCustomHeaders } = this.getExternalMetadata(getParamsMetadata, instance, callback, methodName, moduleKey);
@@ -55,7 +55,7 @@ class HttpContextCreator extends VenokContextCreator {
55
55
  };
56
56
  const result = super.create(instance, callback, methodName, metadataKey, paramsFactory, contextId, inquirerId, { ...options, callback: doneCallback }, contextType);
57
57
  const exceptionFilter = this.filtersContextCreator.create(instance, callback, moduleKey, contextId, inquirerId);
58
- return this.venokProxy.createProxy(result, exceptionFilter);
58
+ return this.venokProxy.createProxy(result, exceptionFilter, contextType);
59
59
  }
60
60
  getExternalMetadata(getParamsMetadata, instance, callback, methodName, moduleKey) {
61
61
  const paramsMetadata = getParamsMetadata(moduleKey);
@@ -44,6 +44,9 @@ class HttpStarterModule {
44
44
  this.container = container;
45
45
  this.httpConfig = httpConfig;
46
46
  }
47
+ async onApplicationShutdown() {
48
+ await this.adapter.close();
49
+ }
47
50
  async onApplicationBootstrap() {
48
51
  const routes = this.adapter[VENOK_ADAPTER_BUILD]();
49
52
  this.adapter[VENOK_APPLY_ROUTES_TO_INSTANCE](routes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venok/http",
3
- "version": "2.2.0-next.2",
3
+ "version": "2.2.0-next.4",
4
4
  "description": "",
5
5
  "author": "shiz-ceo",
6
6
  "homepage": "",