From 0c8fa65599b8c333093e529acf1178723b8568ca Mon Sep 17 00:00:00 2001 From: OsirisAnubis Date: Wed, 6 Nov 2024 16:56:43 +0300 Subject: [PATCH 1/3] fix: export proto from grpc reflection --- packages/nestjs-grpc-reflection/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nestjs-grpc-reflection/package.json b/packages/nestjs-grpc-reflection/package.json index 38017a03..4c602242 100644 --- a/packages/nestjs-grpc-reflection/package.json +++ b/packages/nestjs-grpc-reflection/package.json @@ -4,7 +4,11 @@ "license": "BSD-3-Clause", "type": "module", "exports": { - ".": "./src/index.ts" + ".": "./src/index.ts", + "./proto": { + "import": "./proto/index.js", + "require": "./proto/index.js" + } }, "main": "src/index.ts", "files": [ From 118a2f616d5c5081db11cf6f174fbde4b33e9038 Mon Sep 17 00:00:00 2001 From: OsirisAnubis Date: Wed, 6 Nov 2024 17:04:15 +0300 Subject: [PATCH 2/3] style: typecheck --- packages/nestjs-proto-types/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nestjs-proto-types/src/index.ts b/packages/nestjs-proto-types/src/index.ts index 717c58da..f97af0f3 100644 --- a/packages/nestjs-proto-types/src/index.ts +++ b/packages/nestjs-proto-types/src/index.ts @@ -10,5 +10,6 @@ * @module * @typedef {string} ProtoFile - Represents the imported `.proto` file as a string */ -// @ts-expect-error +// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error +// @ts-ignore declare module '*.proto' From adfdf68882641960cae054319aebae4e38982d4a Mon Sep 17 00:00:00 2001 From: OsirisAnubis Date: Wed, 6 Nov 2024 17:20:27 +0300 Subject: [PATCH 3/3] chore: add exports types --- packages/nestjs-grpc-reflection/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nestjs-grpc-reflection/package.json b/packages/nestjs-grpc-reflection/package.json index 4c602242..583b54f4 100644 --- a/packages/nestjs-grpc-reflection/package.json +++ b/packages/nestjs-grpc-reflection/package.json @@ -7,7 +7,8 @@ ".": "./src/index.ts", "./proto": { "import": "./proto/index.js", - "require": "./proto/index.js" + "require": "./proto/index.js", + "types": "./proto/index.d.ts" } }, "main": "src/index.ts",