@rsdk/builtin-contract 5.8.0-next.0 → 5.8.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/google/protobuf/struct.d.ts +4 -4
- package/dist/google/protobuf/struct.js +9 -5
- package/dist/google/protobuf/struct.js.map +1 -1
- package/dist/grpc/error/v1/error.d.ts +1 -1
- package/dist/grpc/error/v1/error.js +2 -0
- package/dist/grpc/error/v1/error.js.map +1 -1
- package/dist/grpc/health/v1/health.d.ts +7 -8
- package/dist/grpc/health/v1/health.js +2 -0
- package/dist/grpc/health/v1/health.js.map +1 -1
- package/dist/grpc/metrics/v1/metrics.d.ts +5 -6
- package/dist/grpc/metrics/v1/metrics.js +2 -0
- package/dist/grpc/metrics/v1/metrics.js.map +1 -1
- package/dist/grpc/reflection/v1/reflection.d.ts +11 -12
- package/dist/grpc/reflection/v1/reflection.js +4 -21
- package/dist/grpc/reflection/v1/reflection.js.map +1 -1
- package/dist/grpc/reflection/v1alpha/reflection.d.ts +11 -12
- package/dist/grpc/reflection/v1alpha/reflection.js +4 -21
- package/dist/grpc/reflection/v1alpha/reflection.js.map +1 -1
- package/dist/grpc.error.v1.d.ts +23 -5
- package/dist/grpc.error.v1.js +2 -2
- package/dist/grpc.health.v1.d.ts +41 -10
- package/dist/grpc.health.v1.js +43 -13
- package/dist/grpc.health.v1.js.map +1 -1
- package/dist/grpc.metrics.v1.d.ts +38 -8
- package/dist/grpc.metrics.v1.js +42 -13
- package/dist/grpc.metrics.v1.js.map +1 -1
- package/dist/grpc.reflection.v1.d.ts +46 -16
- package/dist/grpc.reflection.v1.js +50 -21
- package/dist/grpc.reflection.v1.js.map +1 -1
- package/dist/grpc.reflection.v1alpha.d.ts +48 -18
- package/dist/grpc.reflection.v1alpha.js +51 -22
- package/dist/grpc.reflection.v1alpha.js.map +1 -1
- package/dist/index.google.js +2 -1
- package/dist/index.google.js.map +1 -1
- package/dist/index.google.protobuf.js +2 -1
- package/dist/index.google.protobuf.js.map +1 -1
- package/dist/index.grpc.error.js +2 -1
- package/dist/index.grpc.error.js.map +1 -1
- package/dist/index.grpc.health.js +2 -1
- package/dist/index.grpc.health.js.map +1 -1
- package/dist/index.grpc.js +2 -1
- package/dist/index.grpc.js.map +1 -1
- package/dist/index.grpc.metrics.js +2 -1
- package/dist/index.grpc.metrics.js.map +1 -1
- package/dist/index.grpc.reflection.js +2 -1
- package/dist/index.grpc.reflection.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/ppm.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc.health.v1.js","sourceRoot":"","sources":["../.generated/grpc.health.v1.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"grpc.health.v1.js","sourceRoot":"","sources":["../.generated/grpc.health.v1.ts"],"names":[],"mappings":";;;AA8FE,8CAUC;AAcD,8CAUC;AAaD,gDAGC;AA/HD,wEAAwE;AACxE,gEAAgE;AAC9D,oDAAoF;AACpF,oDAA6D;AA6HpD,mGA7HA,2BAAkB,OA6HA;AA5H3B,oDAA8D;AA6HrD,oGA7HA,4BAAmB,OA6HA;AA5H5B,oDAA2E;AA6HlE,iHA7HA,yCAAgC,OA6HA;AA5H3C,6CAA0C;AAE1C,oCAAoC;AACpC,8EAA8E;AAC9E,kBAAe;IACb,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;QACX,SAAS,EAAE,EAAE,MAAM,EAAN,sBAAM,EAAE;QACrB,SAAS,EAAE,EAAE,gBAAgB,EAAhB,yBAAgB,EAAE;KAChC;IACD,UAAU,EAAE,uBAAU;CACvB,CAAC;AACF,qDAAqD;AACrD,SAAS,KAAK,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,WAAmB;IAC5F,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CACtD,WAAW,CAAC,SAAS,EACrB,MAAM,CACP,CAAC;IAEF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AAC,CAAC;QAC5F,YAAY,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,2BAAkB,EAAE,4BAAmB,CAAC,CAAC;IAChG,CAAC,CACF,CAAC;AACJ,CAAC;AAQD;;;;;EAKE;AACF,SAAgB,iBAAiB;IAC/B,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IACnF,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;IAC3F,OAAO,eAAe,CACpB,UAAU,EAAE,EACZ,UAAU,WAAqB;QAC3B,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAClD,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC,CACF,CAAC;AACJ,CAAC;AAOD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAsB,OAA8B,EAAE,kBAAsF;IAC5K,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,YAAY,CAAC,yBAAgB,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -34,7 +34,7 @@ declare const _default: {
|
|
|
34
34
|
encode(_: GetRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
35
35
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): GetRequest;
|
|
36
36
|
fromJSON(_: any): GetRequest;
|
|
37
|
-
toJSON(_: GetRequest):
|
|
37
|
+
toJSON<I = unknown>(_: GetRequest): I;
|
|
38
38
|
create(base?: {}): GetRequest;
|
|
39
39
|
fromPartial(_: {}): GetRequest;
|
|
40
40
|
};
|
|
@@ -44,7 +44,7 @@ declare const _default: {
|
|
|
44
44
|
encode(message: GetResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
45
45
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): GetResponse;
|
|
46
46
|
fromJSON(object: any): GetResponse;
|
|
47
|
-
toJSON(message: GetResponse):
|
|
47
|
+
toJSON<I = unknown>(message: GetResponse): I;
|
|
48
48
|
create(base?: {
|
|
49
49
|
readonly metrics?: string;
|
|
50
50
|
}): GetResponse;
|
|
@@ -62,13 +62,25 @@ declare const _default: {
|
|
|
62
62
|
descriptor: Buffer;
|
|
63
63
|
};
|
|
64
64
|
export default _default;
|
|
65
|
+
export interface IMetricsController {
|
|
66
|
+
get(request: GetRequest, metadata?: Metadata): GetResponse | Promise<GetResponse> | Observable<GetResponse>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Decorates MetricsNatsController methods with
|
|
70
|
+
* @ConsumeRequest() decorator (which is @MessagePattern under the hood).
|
|
71
|
+
* Hence, you don't need any individual method decorating any more.
|
|
72
|
+
*/
|
|
73
|
+
export declare function MetricsNatsMethods(): any;
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated use IMetricsController instead
|
|
76
|
+
*/
|
|
65
77
|
export interface MetricsGrpcController {
|
|
66
78
|
get(request: GetRequest, metadata?: Metadata): GetResponse | Promise<GetResponse> | Observable<GetResponse>;
|
|
67
79
|
}
|
|
68
80
|
/**
|
|
69
81
|
* Decorates MetricsGrpcController methods with
|
|
70
82
|
* @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
|
|
71
|
-
* under the hood).
|
|
83
|
+
* under the hood). Hence, you don't need any individual method decorating
|
|
72
84
|
* any more.
|
|
73
85
|
*/
|
|
74
86
|
export declare function MetricsGrpcMethods(): any;
|
|
@@ -85,12 +97,30 @@ export declare function createMetricsClient<CallOptionsExt = {}>(channel: Channe
|
|
|
85
97
|
export { GetRequest };
|
|
86
98
|
export { GetResponse };
|
|
87
99
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
88
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
89
|
-
$case: string;
|
|
100
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
101
|
+
readonly $case: string;
|
|
102
|
+
value: unknown;
|
|
90
103
|
} ? {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
$case: T["$case"];
|
|
104
|
+
readonly $case: T["$case"];
|
|
105
|
+
value?: DeepPartial<T["value"]>;
|
|
94
106
|
} : T extends {} ? {
|
|
95
107
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
96
108
|
} : Partial<T>;
|
|
109
|
+
export type DeepNonNullable<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonNullable<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonNullable<U>> : T extends {
|
|
110
|
+
readonly $case: string;
|
|
111
|
+
value: unknown;
|
|
112
|
+
} ? {
|
|
113
|
+
readonly $case: T["$case"];
|
|
114
|
+
value: DeepNonNullable<T["value"]>;
|
|
115
|
+
} : T extends {} ? {
|
|
116
|
+
[K in keyof T]: DeepNonNullable<NonNullable<T[K]>>;
|
|
117
|
+
} : NonNullable<T>;
|
|
118
|
+
export type DeepNonUndefined<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonUndefined<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonUndefined<U>> : T extends {
|
|
119
|
+
readonly $case: string;
|
|
120
|
+
value: unknown;
|
|
121
|
+
} ? {
|
|
122
|
+
readonly $case: T["$case"];
|
|
123
|
+
value: DeepNonUndefined<T["value"]>;
|
|
124
|
+
} : T extends {} ? {
|
|
125
|
+
[K in keyof T]: DeepNonUndefined<Exclude<T[K], undefined>>;
|
|
126
|
+
} : Exclude<T, undefined>;
|
package/dist/grpc.metrics.v1.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetResponse = exports.GetRequest = void 0;
|
|
4
|
+
exports.MetricsNatsMethods = MetricsNatsMethods;
|
|
4
5
|
exports.MetricsGrpcMethods = MetricsGrpcMethods;
|
|
5
6
|
exports.createMetricsClient = createMetricsClient;
|
|
6
7
|
// *Service is definition from grpc-js (used for Nest.js gRPC transport)
|
|
@@ -24,26 +25,54 @@ exports.default = {
|
|
|
24
25
|
// Just helper function to ease decorators generation
|
|
25
26
|
function apply(decorator, constructor, method, serviceName) {
|
|
26
27
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
-
|
|
28
|
+
if (descriptor) {
|
|
29
|
+
decorator(serviceName, method)(constructor.prototype[method], method, descriptor);
|
|
30
|
+
/**
|
|
31
|
+
* NOTE: In @nestjs/microservices starting from version 10.4.9,
|
|
32
|
+
* the @GrpcStreamMethod decorator replaces the function in the descriptor
|
|
33
|
+
* (see: https://github.com/nestjs/nest/blob/v10.4.9/packages/microservices/decorators/message-pattern.decorator.ts#L151).
|
|
34
|
+
*
|
|
35
|
+
* This fix explicitly redefines the method with the modified descriptor
|
|
36
|
+
* to ensure the new wrapper function is preserved
|
|
37
|
+
* and the request does not hang.
|
|
38
|
+
*/
|
|
39
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function applyRequest(decorator, constructor, method, request, response) {
|
|
43
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
44
|
+
decorator(request, response)(constructor.prototype[method], method, descriptor);
|
|
45
|
+
}
|
|
46
|
+
function requireProjectDependency(requireId) {
|
|
47
|
+
try {
|
|
48
|
+
// if install from npm registry
|
|
49
|
+
return require(requireId);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// if install as local package over `file:../`
|
|
53
|
+
// https://classic.yarnpkg.com/lang/en/docs/pnp/troubleshooting/#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies
|
|
54
|
+
return require(require.resolve(requireId, { paths: [process.cwd()] }));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Decorates MetricsNatsController methods with
|
|
59
|
+
* @ConsumeRequest() decorator (which is @MessagePattern under the hood).
|
|
60
|
+
* Hence, you don't need any individual method decorating any more.
|
|
61
|
+
*/
|
|
62
|
+
function MetricsNatsMethods() {
|
|
63
|
+
const { Controller, applyDecorators } = requireProjectDependency('@nestjs/common');
|
|
64
|
+
const { ConsumeRequest } = requireProjectDependency('@rsdk/nats.transport');
|
|
65
|
+
return applyDecorators(Controller(), function (constructor) {
|
|
66
|
+
applyRequest(ConsumeRequest, constructor, 'get', metrics_2.GetRequest, metrics_3.GetResponse);
|
|
67
|
+
});
|
|
28
68
|
}
|
|
29
69
|
/**
|
|
30
70
|
* Decorates MetricsGrpcController methods with
|
|
31
71
|
* @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
|
|
32
|
-
* under the hood).
|
|
72
|
+
* under the hood). Hence, you don't need any individual method decorating
|
|
33
73
|
* any more.
|
|
34
74
|
*/
|
|
35
75
|
function MetricsGrpcMethods() {
|
|
36
|
-
const requireProjectDependency = (requireId) => {
|
|
37
|
-
try {
|
|
38
|
-
// if install from npm registry
|
|
39
|
-
return require(requireId);
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
// if install as local package over `file:../`
|
|
43
|
-
// https://classic.yarnpkg.com/lang/en/docs/pnp/troubleshooting/#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies
|
|
44
|
-
return require(require.resolve(requireId, { paths: [process.cwd()] }));
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
76
|
const { Controller, applyDecorators } = requireProjectDependency('@nestjs/common');
|
|
48
77
|
const { GrpcMethod, GrpcStreamMethod } = requireProjectDependency('@nestjs/microservices');
|
|
49
78
|
return applyDecorators(Controller(), function (constructor) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc.metrics.v1.js","sourceRoot":"","sources":["../.generated/grpc.metrics.v1.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"grpc.metrics.v1.js","sourceRoot":"","sources":["../.generated/grpc.metrics.v1.ts"],"names":[],"mappings":";;;AA4FE,gDASC;AAaD,gDASC;AAYD,kDAGC;AAzHD,wEAAwE;AACxE,gEAAgE;AAC9D,uDAAyF;AACzF,uDAAuD;AAuH9C,2FAvHA,oBAAU,OAuHA;AAtHnB,uDAAwD;AAuH/C,4FAvHA,qBAAW,OAuHA;AAtHtB,6CAA0C;AAE1C,oCAAoC;AACpC,8EAA8E;AAC9E,kBAAe;IACb,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;QACX,SAAS,EAAE,EAAE,OAAO,EAAP,wBAAO,EAAE;QACtB,SAAS,EAAE,EAAE,iBAAiB,EAAjB,2BAAiB,EAAE;KACjC;IACD,UAAU,EAAE,uBAAU;CACvB,CAAC;AACF,qDAAqD;AACrD,SAAS,KAAK,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,WAAmB;IAC5F,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CACtD,WAAW,CAAC,SAAS,EACrB,MAAM,CACP,CAAC;IAEF,IAAI,UAAU,EAAE,CAAC;QACf,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAC7B,MAAM,EACN,UAAU,CACX,CAAC;QAEF;;;;;;;;WAQG;QACH,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,OAA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,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CACF,CAAC;AACJ,CAAC;AAMD;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAsB,OAA8B,EAAE,kBAAuF;IAC9K,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,YAAY,CAAC,2BAAiB,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -4,14 +4,14 @@ import type { CallOptions, DefaultCallOptions } from 'nice-grpc';
|
|
|
4
4
|
import type { NormalizedServiceDefinition } from 'nice-grpc/lib/service-definitions';
|
|
5
5
|
import type { Observable } from 'rxjs';
|
|
6
6
|
import { ServerReflectionDefinition } from './grpc/reflection/v1/reflection';
|
|
7
|
-
import {
|
|
7
|
+
import { ErrorResponse } from './grpc/reflection/v1/reflection';
|
|
8
|
+
import { ExtensionNumberResponse } from './grpc/reflection/v1/reflection';
|
|
8
9
|
import { ExtensionRequest } from './grpc/reflection/v1/reflection';
|
|
9
|
-
import { ServerReflectionResponse } from './grpc/reflection/v1/reflection';
|
|
10
10
|
import { FileDescriptorResponse } from './grpc/reflection/v1/reflection';
|
|
11
|
-
import { ExtensionNumberResponse } from './grpc/reflection/v1/reflection';
|
|
12
11
|
import { ListServiceResponse } from './grpc/reflection/v1/reflection';
|
|
12
|
+
import { ServerReflectionRequest } from './grpc/reflection/v1/reflection';
|
|
13
|
+
import { ServerReflectionResponse } from './grpc/reflection/v1/reflection';
|
|
13
14
|
import { ServiceResponse } from './grpc/reflection/v1/reflection';
|
|
14
|
-
import { ErrorResponse } from './grpc/reflection/v1/reflection';
|
|
15
15
|
declare const _default: {
|
|
16
16
|
name: string;
|
|
17
17
|
definitions: {
|
|
@@ -40,7 +40,7 @@ declare const _default: {
|
|
|
40
40
|
encode(message: ServerReflectionRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
41
41
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): ServerReflectionRequest;
|
|
42
42
|
fromJSON(object: any): ServerReflectionRequest;
|
|
43
|
-
toJSON(message: ServerReflectionRequest):
|
|
43
|
+
toJSON<I = unknown>(message: ServerReflectionRequest): I;
|
|
44
44
|
create(base?: {
|
|
45
45
|
readonly host?: string;
|
|
46
46
|
readonly messageRequest?: ({
|
|
@@ -102,7 +102,7 @@ declare const _default: {
|
|
|
102
102
|
encode(message: ServerReflectionResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
103
103
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): ServerReflectionResponse;
|
|
104
104
|
fromJSON(object: any): ServerReflectionResponse;
|
|
105
|
-
toJSON(message: ServerReflectionResponse):
|
|
105
|
+
toJSON<I = unknown>(message: ServerReflectionResponse): I;
|
|
106
106
|
create(base?: {
|
|
107
107
|
readonly validHost?: string;
|
|
108
108
|
readonly originalRequest?: {
|
|
@@ -232,13 +232,25 @@ declare const _default: {
|
|
|
232
232
|
descriptor: Buffer;
|
|
233
233
|
};
|
|
234
234
|
export default _default;
|
|
235
|
+
export interface IServerReflectionController {
|
|
236
|
+
serverReflectionInfo(request: Observable<ServerReflectionRequest>, metadata?: Metadata): Observable<ServerReflectionResponse>;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Decorates ServerReflectionNatsController methods with
|
|
240
|
+
* @ConsumeRequest() decorator (which is @MessagePattern under the hood).
|
|
241
|
+
* Hence, you don't need any individual method decorating any more.
|
|
242
|
+
*/
|
|
243
|
+
export declare function ServerReflectionNatsMethods(): any;
|
|
244
|
+
/**
|
|
245
|
+
* @deprecated use IServerReflectionController instead
|
|
246
|
+
*/
|
|
235
247
|
export interface ServerReflectionGrpcController {
|
|
236
248
|
serverReflectionInfo(request: Observable<ServerReflectionRequest>, metadata?: Metadata): Observable<ServerReflectionResponse>;
|
|
237
249
|
}
|
|
238
250
|
/**
|
|
239
251
|
* Decorates ServerReflectionGrpcController methods with
|
|
240
252
|
* @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
|
|
241
|
-
* under the hood).
|
|
253
|
+
* under the hood). Hence, you don't need any individual method decorating
|
|
242
254
|
* any more.
|
|
243
255
|
*/
|
|
244
256
|
export declare function ServerReflectionGrpcMethods(): any;
|
|
@@ -252,21 +264,39 @@ export interface ServerReflectionClient<CallOptionsExt = {}> {
|
|
|
252
264
|
* @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
|
|
253
265
|
*/
|
|
254
266
|
export declare function createServerReflectionClient<CallOptionsExt = {}>(channel: ChannelImplementation, defaultCallOptions?: DefaultCallOptions<NormalizedServiceDefinition<ServerReflectionDefinition>>): ServerReflectionClient<CallOptionsExt>;
|
|
255
|
-
export {
|
|
267
|
+
export { ErrorResponse };
|
|
268
|
+
export { ExtensionNumberResponse };
|
|
256
269
|
export { ExtensionRequest };
|
|
257
|
-
export { ServerReflectionResponse };
|
|
258
270
|
export { FileDescriptorResponse };
|
|
259
|
-
export { ExtensionNumberResponse };
|
|
260
271
|
export { ListServiceResponse };
|
|
272
|
+
export { ServerReflectionRequest };
|
|
273
|
+
export { ServerReflectionResponse };
|
|
261
274
|
export { ServiceResponse };
|
|
262
|
-
export { ErrorResponse };
|
|
263
275
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
264
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
265
|
-
$case: string;
|
|
276
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
277
|
+
readonly $case: string;
|
|
278
|
+
value: unknown;
|
|
266
279
|
} ? {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
$case: T["$case"];
|
|
280
|
+
readonly $case: T["$case"];
|
|
281
|
+
value?: DeepPartial<T["value"]>;
|
|
270
282
|
} : T extends {} ? {
|
|
271
283
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
272
284
|
} : Partial<T>;
|
|
285
|
+
export type DeepNonNullable<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonNullable<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonNullable<U>> : T extends {
|
|
286
|
+
readonly $case: string;
|
|
287
|
+
value: unknown;
|
|
288
|
+
} ? {
|
|
289
|
+
readonly $case: T["$case"];
|
|
290
|
+
value: DeepNonNullable<T["value"]>;
|
|
291
|
+
} : T extends {} ? {
|
|
292
|
+
[K in keyof T]: DeepNonNullable<NonNullable<T[K]>>;
|
|
293
|
+
} : NonNullable<T>;
|
|
294
|
+
export type DeepNonUndefined<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonUndefined<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonUndefined<U>> : T extends {
|
|
295
|
+
readonly $case: string;
|
|
296
|
+
value: unknown;
|
|
297
|
+
} ? {
|
|
298
|
+
readonly $case: T["$case"];
|
|
299
|
+
value: DeepNonUndefined<T["value"]>;
|
|
300
|
+
} : T extends {} ? {
|
|
301
|
+
[K in keyof T]: DeepNonUndefined<Exclude<T[K], undefined>>;
|
|
302
|
+
} : Exclude<T, undefined>;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ServiceResponse = exports.ServerReflectionResponse = exports.ServerReflectionRequest = exports.ListServiceResponse = exports.FileDescriptorResponse = exports.ExtensionRequest = exports.ExtensionNumberResponse = exports.ErrorResponse = void 0;
|
|
4
|
+
exports.ServerReflectionNatsMethods = ServerReflectionNatsMethods;
|
|
4
5
|
exports.ServerReflectionGrpcMethods = ServerReflectionGrpcMethods;
|
|
5
6
|
exports.createServerReflectionClient = createServerReflectionClient;
|
|
6
7
|
// *Service is definition from grpc-js (used for Nest.js gRPC transport)
|
|
7
8
|
// *Definition is generic definition (used for NiceGrpc clients)
|
|
8
9
|
const reflection_1 = require("./grpc/reflection/v1/reflection");
|
|
9
10
|
const reflection_2 = require("./grpc/reflection/v1/reflection");
|
|
10
|
-
Object.defineProperty(exports, "
|
|
11
|
+
Object.defineProperty(exports, "ErrorResponse", { enumerable: true, get: function () { return reflection_2.ErrorResponse; } });
|
|
11
12
|
const reflection_3 = require("./grpc/reflection/v1/reflection");
|
|
12
|
-
Object.defineProperty(exports, "
|
|
13
|
+
Object.defineProperty(exports, "ExtensionNumberResponse", { enumerable: true, get: function () { return reflection_3.ExtensionNumberResponse; } });
|
|
13
14
|
const reflection_4 = require("./grpc/reflection/v1/reflection");
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "ExtensionRequest", { enumerable: true, get: function () { return reflection_4.ExtensionRequest; } });
|
|
15
16
|
const reflection_5 = require("./grpc/reflection/v1/reflection");
|
|
16
17
|
Object.defineProperty(exports, "FileDescriptorResponse", { enumerable: true, get: function () { return reflection_5.FileDescriptorResponse; } });
|
|
17
18
|
const reflection_6 = require("./grpc/reflection/v1/reflection");
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "ListServiceResponse", { enumerable: true, get: function () { return reflection_6.ListServiceResponse; } });
|
|
19
20
|
const reflection_7 = require("./grpc/reflection/v1/reflection");
|
|
20
|
-
Object.defineProperty(exports, "
|
|
21
|
+
Object.defineProperty(exports, "ServerReflectionRequest", { enumerable: true, get: function () { return reflection_7.ServerReflectionRequest; } });
|
|
21
22
|
const reflection_8 = require("./grpc/reflection/v1/reflection");
|
|
22
|
-
Object.defineProperty(exports, "
|
|
23
|
+
Object.defineProperty(exports, "ServerReflectionResponse", { enumerable: true, get: function () { return reflection_8.ServerReflectionResponse; } });
|
|
23
24
|
const reflection_9 = require("./grpc/reflection/v1/reflection");
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
+
Object.defineProperty(exports, "ServiceResponse", { enumerable: true, get: function () { return reflection_9.ServiceResponse; } });
|
|
25
26
|
const descriptor_1 = require("./descriptor");
|
|
26
27
|
// Actual 'Package' meta information
|
|
27
28
|
// TODO type it with Package interface from @platform/grpc when it is deployed
|
|
@@ -36,26 +37,54 @@ exports.default = {
|
|
|
36
37
|
// Just helper function to ease decorators generation
|
|
37
38
|
function apply(decorator, constructor, method, serviceName) {
|
|
38
39
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
39
|
-
|
|
40
|
+
if (descriptor) {
|
|
41
|
+
decorator(serviceName, method)(constructor.prototype[method], method, descriptor);
|
|
42
|
+
/**
|
|
43
|
+
* NOTE: In @nestjs/microservices starting from version 10.4.9,
|
|
44
|
+
* the @GrpcStreamMethod decorator replaces the function in the descriptor
|
|
45
|
+
* (see: https://github.com/nestjs/nest/blob/v10.4.9/packages/microservices/decorators/message-pattern.decorator.ts#L151).
|
|
46
|
+
*
|
|
47
|
+
* This fix explicitly redefines the method with the modified descriptor
|
|
48
|
+
* to ensure the new wrapper function is preserved
|
|
49
|
+
* and the request does not hang.
|
|
50
|
+
*/
|
|
51
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function applyRequest(decorator, constructor, method, request, response) {
|
|
55
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
56
|
+
decorator(request, response)(constructor.prototype[method], method, descriptor);
|
|
57
|
+
}
|
|
58
|
+
function requireProjectDependency(requireId) {
|
|
59
|
+
try {
|
|
60
|
+
// if install from npm registry
|
|
61
|
+
return require(requireId);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// if install as local package over `file:../`
|
|
65
|
+
// https://classic.yarnpkg.com/lang/en/docs/pnp/troubleshooting/#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies
|
|
66
|
+
return require(require.resolve(requireId, { paths: [process.cwd()] }));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Decorates ServerReflectionNatsController methods with
|
|
71
|
+
* @ConsumeRequest() decorator (which is @MessagePattern under the hood).
|
|
72
|
+
* Hence, you don't need any individual method decorating any more.
|
|
73
|
+
*/
|
|
74
|
+
function ServerReflectionNatsMethods() {
|
|
75
|
+
const { Controller, applyDecorators } = requireProjectDependency('@nestjs/common');
|
|
76
|
+
const { ConsumeRequest } = requireProjectDependency('@rsdk/nats.transport');
|
|
77
|
+
return applyDecorators(Controller(), function (constructor) {
|
|
78
|
+
applyRequest(ConsumeRequest, constructor, 'serverReflectionInfo', reflection_7.ServerReflectionRequest, reflection_8.ServerReflectionResponse);
|
|
79
|
+
});
|
|
40
80
|
}
|
|
41
81
|
/**
|
|
42
82
|
* Decorates ServerReflectionGrpcController methods with
|
|
43
83
|
* @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
|
|
44
|
-
* under the hood).
|
|
84
|
+
* under the hood). Hence, you don't need any individual method decorating
|
|
45
85
|
* any more.
|
|
46
86
|
*/
|
|
47
87
|
function ServerReflectionGrpcMethods() {
|
|
48
|
-
const requireProjectDependency = (requireId) => {
|
|
49
|
-
try {
|
|
50
|
-
// if install from npm registry
|
|
51
|
-
return require(requireId);
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
// if install as local package over `file:../`
|
|
55
|
-
// https://classic.yarnpkg.com/lang/en/docs/pnp/troubleshooting/#toc-is-trying-to-require-without-it-being-listed-in-its-dependencies
|
|
56
|
-
return require(require.resolve(requireId, { paths: [process.cwd()] }));
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
88
|
const { Controller, applyDecorators } = requireProjectDependency('@nestjs/common');
|
|
60
89
|
const { GrpcMethod, GrpcStreamMethod } = requireProjectDependency('@nestjs/microservices');
|
|
61
90
|
return applyDecorators(Controller(), function (constructor) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc.reflection.v1.js","sourceRoot":"","sources":["../.generated/grpc.reflection.v1.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"grpc.reflection.v1.js","sourceRoot":"","sources":["../.generated/grpc.reflection.v1.ts"],"names":[],"mappings":";;;AAkGE,kEASC;AAaD,kEASC;AAYD,oEAGC;AA/HD,wEAAwE;AACxE,gEAAgE;AAC9D,gEAA0H;AAC1H,gEAAgE;AA6HvD,8FA7HA,0BAAa,OA6HA;AA5HtB,gEAA0E;AA6HjE,wGA7HA,oCAAuB,OA6HA;AA5HhC,gEAAmE;AA6H1D,iGA7HA,6BAAgB,OA6HA;AA5HzB,gEAAyE;AA6HhE,uGA7HA,mCAAsB,OA6HA;AA5H/B,gEAAsE;AA6H7D,oGA7HA,gCAAmB,OA6HA;AA5H5B,gEAA0E;AA6HjE,wGA7HA,oCAAuB,OA6HA;AA5HhC,gEAA2E;AA6HlE,yGA7HA,qCAAwB,OA6HA;AA5HjC,gEAAkE;AA6HzD,gGA7HA,4BAAe,OA6HA;AA5H1B,6CAA0C;AAE1C,oCAAoC;AACpC,8EAA8E;AAC9E,kBAAe;IACb,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;QACX,SAAS,EAAE,EAAE,gBAAgB,EAAhB,oCAAgB,EAAE;QAC/B,SAAS,EAAE,EAAE,0BAA0B,EAA1B,uCAA0B,EAAE;KAC1C;IACD,UAAU,EAAE,uBAAU;CACvB,CAAC;AACF,qDAAqD;AACrD,SAAS,KAAK,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,WAAmB;IAC5F,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CACtD,WAAW,CAAC,SAAS,EACrB,MAAM,CACP,CAAC;IAEF,IAAI,UAAU,EAAE,CAAC;QACf,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,WAAW,CAAC,SAA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,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IACnF,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;IAC3F,OAAO,eAAe,CACpB,UAAU,EAAE,EACZ,UAAU,WAAqB;QAC3B,KAAK,CAAC,gBAAgB,EAAE,WAAW,EAAE,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;IACrF,CAAC,CACF,CAAC;AACJ,CAAC;AAMD;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAsB,OAA8B,EAAE,kBAAgG;IAChM,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,YAAY,CAAC,uCAA0B,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -4,14 +4,14 @@ import type { CallOptions, DefaultCallOptions } from 'nice-grpc';
|
|
|
4
4
|
import type { NormalizedServiceDefinition } from 'nice-grpc/lib/service-definitions';
|
|
5
5
|
import type { Observable } from 'rxjs';
|
|
6
6
|
import { ServerReflectionDefinition } from './grpc/reflection/v1alpha/reflection';
|
|
7
|
-
import {
|
|
8
|
-
import { FileDescriptorResponse } from './grpc/reflection/v1alpha/reflection';
|
|
7
|
+
import { ErrorResponse } from './grpc/reflection/v1alpha/reflection';
|
|
9
8
|
import { ExtensionNumberResponse } from './grpc/reflection/v1alpha/reflection';
|
|
9
|
+
import { ExtensionRequest } from './grpc/reflection/v1alpha/reflection';
|
|
10
|
+
import { FileDescriptorResponse } from './grpc/reflection/v1alpha/reflection';
|
|
10
11
|
import { ListServiceResponse } from './grpc/reflection/v1alpha/reflection';
|
|
11
|
-
import { ServiceResponse } from './grpc/reflection/v1alpha/reflection';
|
|
12
|
-
import { ErrorResponse } from './grpc/reflection/v1alpha/reflection';
|
|
13
12
|
import { ServerReflectionRequest } from './grpc/reflection/v1alpha/reflection';
|
|
14
|
-
import {
|
|
13
|
+
import { ServerReflectionResponse } from './grpc/reflection/v1alpha/reflection';
|
|
14
|
+
import { ServiceResponse } from './grpc/reflection/v1alpha/reflection';
|
|
15
15
|
declare const _default: {
|
|
16
16
|
name: string;
|
|
17
17
|
definitions: {
|
|
@@ -40,7 +40,7 @@ declare const _default: {
|
|
|
40
40
|
encode(message: ServerReflectionRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
41
41
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): ServerReflectionRequest;
|
|
42
42
|
fromJSON(object: any): ServerReflectionRequest;
|
|
43
|
-
toJSON(message: ServerReflectionRequest):
|
|
43
|
+
toJSON<I = unknown>(message: ServerReflectionRequest): I;
|
|
44
44
|
create(base?: {
|
|
45
45
|
readonly host?: string;
|
|
46
46
|
readonly messageRequest?: ({
|
|
@@ -102,7 +102,7 @@ declare const _default: {
|
|
|
102
102
|
encode(message: ServerReflectionResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
|
|
103
103
|
decode(input: import("protobufjs").Reader | Uint8Array, length?: number): ServerReflectionResponse;
|
|
104
104
|
fromJSON(object: any): ServerReflectionResponse;
|
|
105
|
-
toJSON(message: ServerReflectionResponse):
|
|
105
|
+
toJSON<I = unknown>(message: ServerReflectionResponse): I;
|
|
106
106
|
create(base?: {
|
|
107
107
|
readonly validHost?: string;
|
|
108
108
|
readonly originalRequest?: {
|
|
@@ -232,13 +232,25 @@ declare const _default: {
|
|
|
232
232
|
descriptor: Buffer;
|
|
233
233
|
};
|
|
234
234
|
export default _default;
|
|
235
|
+
export interface IServerReflectionController {
|
|
236
|
+
serverReflectionInfo(request: Observable<ServerReflectionRequest>, metadata?: Metadata): Observable<ServerReflectionResponse>;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Decorates ServerReflectionNatsController methods with
|
|
240
|
+
* @ConsumeRequest() decorator (which is @MessagePattern under the hood).
|
|
241
|
+
* Hence, you don't need any individual method decorating any more.
|
|
242
|
+
*/
|
|
243
|
+
export declare function ServerReflectionNatsMethods(): any;
|
|
244
|
+
/**
|
|
245
|
+
* @deprecated use IServerReflectionController instead
|
|
246
|
+
*/
|
|
235
247
|
export interface ServerReflectionGrpcController {
|
|
236
248
|
serverReflectionInfo(request: Observable<ServerReflectionRequest>, metadata?: Metadata): Observable<ServerReflectionResponse>;
|
|
237
249
|
}
|
|
238
250
|
/**
|
|
239
251
|
* Decorates ServerReflectionGrpcController methods with
|
|
240
252
|
* @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
|
|
241
|
-
* under the hood).
|
|
253
|
+
* under the hood). Hence, you don't need any individual method decorating
|
|
242
254
|
* any more.
|
|
243
255
|
*/
|
|
244
256
|
export declare function ServerReflectionGrpcMethods(): any;
|
|
@@ -252,21 +264,39 @@ export interface ServerReflectionClient<CallOptionsExt = {}> {
|
|
|
252
264
|
* @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
|
|
253
265
|
*/
|
|
254
266
|
export declare function createServerReflectionClient<CallOptionsExt = {}>(channel: ChannelImplementation, defaultCallOptions?: DefaultCallOptions<NormalizedServiceDefinition<ServerReflectionDefinition>>): ServerReflectionClient<CallOptionsExt>;
|
|
255
|
-
export {
|
|
256
|
-
export { FileDescriptorResponse };
|
|
267
|
+
export { ErrorResponse };
|
|
257
268
|
export { ExtensionNumberResponse };
|
|
269
|
+
export { ExtensionRequest };
|
|
270
|
+
export { FileDescriptorResponse };
|
|
258
271
|
export { ListServiceResponse };
|
|
259
|
-
export { ServiceResponse };
|
|
260
|
-
export { ErrorResponse };
|
|
261
272
|
export { ServerReflectionRequest };
|
|
262
|
-
export {
|
|
273
|
+
export { ServerReflectionResponse };
|
|
274
|
+
export { ServiceResponse };
|
|
263
275
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
264
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
265
|
-
$case: string;
|
|
276
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
277
|
+
readonly $case: string;
|
|
278
|
+
value: unknown;
|
|
266
279
|
} ? {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
$case: T["$case"];
|
|
280
|
+
readonly $case: T["$case"];
|
|
281
|
+
value?: DeepPartial<T["value"]>;
|
|
270
282
|
} : T extends {} ? {
|
|
271
283
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
272
284
|
} : Partial<T>;
|
|
285
|
+
export type DeepNonNullable<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonNullable<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonNullable<U>> : T extends {
|
|
286
|
+
readonly $case: string;
|
|
287
|
+
value: unknown;
|
|
288
|
+
} ? {
|
|
289
|
+
readonly $case: T["$case"];
|
|
290
|
+
value: DeepNonNullable<T["value"]>;
|
|
291
|
+
} : T extends {} ? {
|
|
292
|
+
[K in keyof T]: DeepNonNullable<NonNullable<T[K]>>;
|
|
293
|
+
} : NonNullable<T>;
|
|
294
|
+
export type DeepNonUndefined<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepNonUndefined<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepNonUndefined<U>> : T extends {
|
|
295
|
+
readonly $case: string;
|
|
296
|
+
value: unknown;
|
|
297
|
+
} ? {
|
|
298
|
+
readonly $case: T["$case"];
|
|
299
|
+
value: DeepNonUndefined<T["value"]>;
|
|
300
|
+
} : T extends {} ? {
|
|
301
|
+
[K in keyof T]: DeepNonUndefined<Exclude<T[K], undefined>>;
|
|
302
|
+
} : Exclude<T, undefined>;
|