@yolo-croket-dev/core 1.9.7-slowquery.10 → 1.9.7-slowquery.11
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GrpcParam: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GrpcParam = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
exports.GrpcParam = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
6
|
+
const metadata = ctx.switchToRpc().getContext();
|
|
7
|
+
const param = metadata.get('param');
|
|
8
|
+
if (!param || !param[0]) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return JSON.parse(param[0]);
|
|
12
|
+
});
|
package/decorators/index.d.ts
CHANGED
package/decorators/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./rpc-interceptor-scope.decorator"), exports);
|
|
18
18
|
__exportStar(require("./rpc-transform.decorator"), exports);
|
|
19
|
+
__exportStar(require("./grpc-param.decorator"), exports);
|