@opra/nestjs 0.25.3 → 0.25.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.
|
@@ -87,7 +87,7 @@ let OpraApiFactory = exports.OpraApiFactory = class OpraApiFactory {
|
|
|
87
87
|
// Create api document
|
|
88
88
|
return common_2.DocumentFactory.createDocument(apiSchema);
|
|
89
89
|
}
|
|
90
|
-
_createHandler(
|
|
90
|
+
_createHandler(callback) {
|
|
91
91
|
return function (ctx) {
|
|
92
92
|
switch (ctx.protocol) {
|
|
93
93
|
case 'http':
|
|
@@ -108,11 +108,11 @@ let OpraApiFactory = exports.OpraApiFactory = class OpraApiFactory {
|
|
|
108
108
|
this.registerContextProvider(opraContext, contextId);
|
|
109
109
|
const contextInstance = await this.injector.loadPerContext(instance, moduleRef, moduleRef.providers, contextId);
|
|
110
110
|
const contextCallback = this.externalContextCreator.create(contextInstance, contextInstance[methodName], nestHandlerName, constants_js_1.PARAM_ARGS_METADATA, paramsFactory, contextId, wrapper.id, options, opraContext.protocol);
|
|
111
|
-
contextInstance[methodName] = this._createHandler(
|
|
111
|
+
contextInstance[methodName] = this._createHandler(contextCallback);
|
|
112
112
|
return contextCallback(...args);
|
|
113
113
|
}
|
|
114
114
|
: this.externalContextCreator.create(instance, instance[nestHandlerName], nestHandlerName, constants_js_1.PARAM_ARGS_METADATA, paramsFactory, undefined, undefined, options, contextType);
|
|
115
|
-
instance[methodName] = this._createHandler(
|
|
115
|
+
instance[methodName] = this._createHandler(callback);
|
|
116
116
|
return callback;
|
|
117
117
|
}
|
|
118
118
|
// noinspection JSMethodCanBeStatic
|
|
@@ -84,7 +84,7 @@ export let OpraApiFactory = class OpraApiFactory {
|
|
|
84
84
|
// Create api document
|
|
85
85
|
return DocumentFactory.createDocument(apiSchema);
|
|
86
86
|
}
|
|
87
|
-
_createHandler(
|
|
87
|
+
_createHandler(callback) {
|
|
88
88
|
return function (ctx) {
|
|
89
89
|
switch (ctx.protocol) {
|
|
90
90
|
case 'http':
|
|
@@ -105,11 +105,11 @@ export let OpraApiFactory = class OpraApiFactory {
|
|
|
105
105
|
this.registerContextProvider(opraContext, contextId);
|
|
106
106
|
const contextInstance = await this.injector.loadPerContext(instance, moduleRef, moduleRef.providers, contextId);
|
|
107
107
|
const contextCallback = this.externalContextCreator.create(contextInstance, contextInstance[methodName], nestHandlerName, PARAM_ARGS_METADATA, paramsFactory, contextId, wrapper.id, options, opraContext.protocol);
|
|
108
|
-
contextInstance[methodName] = this._createHandler(
|
|
108
|
+
contextInstance[methodName] = this._createHandler(contextCallback);
|
|
109
109
|
return contextCallback(...args);
|
|
110
110
|
}
|
|
111
111
|
: this.externalContextCreator.create(instance, instance[nestHandlerName], nestHandlerName, PARAM_ARGS_METADATA, paramsFactory, undefined, undefined, options, contextType);
|
|
112
|
-
instance[methodName] = this._createHandler(
|
|
112
|
+
instance[methodName] = this._createHandler(callback);
|
|
113
113
|
return callback;
|
|
114
114
|
}
|
|
115
115
|
// noinspection JSMethodCanBeStatic
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/nestjs",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.4",
|
|
4
4
|
"description": "Opra NestJS module",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"clean:cover": "rimraf ../../coverage/nestjs"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opra/common": "^0.25.
|
|
29
|
-
"@opra/core": "^0.25.
|
|
28
|
+
"@opra/common": "^0.25.4",
|
|
29
|
+
"@opra/core": "^0.25.4",
|
|
30
30
|
"fast-tokenizer": "^1.2.2",
|
|
31
31
|
"lodash.head": "^4.0.1",
|
|
32
32
|
"lodash.identity": "^3.0.0",
|
|
33
33
|
"reflect-metadata": "^0.1.13"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@nestjs/common": "^10.2.
|
|
36
|
+
"@nestjs/common": "^10.2.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@nestjs/platform-express": "^10.2.
|
|
40
|
-
"@nestjs/testing": "^10.2.
|
|
39
|
+
"@nestjs/platform-express": "^10.2.4",
|
|
40
|
+
"@nestjs/testing": "^10.2.4",
|
|
41
41
|
"@types/lodash": "^4.14.197",
|
|
42
42
|
"filedirname": "^2.7.0",
|
|
43
43
|
"ts-gems": "^2.4.1"
|