From 92d4e3309b44bed357d2b887180c03e9f9b682e2 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 3 Apr 2025 02:52:00 +0300 Subject: [PATCH 1/3] chore(common): format files --- .github/ISSUE_TEMPLATE/bug.yaml | 2 +- .github/ISSUE_TEMPLATE/docs.yaml | 2 +- .github/ISSUE_TEMPLATE/feature.yaml | 2 +- .github/ISSUE_TEMPLATE/package.yaml | 2 +- .github/workflows/reusable-publish.yml | 6 +++--- .yarn/sdks/integrations.yml | 2 ++ package.json | 3 +++ packages/protoc-gen-abstractions/src/index.ts | 2 -- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index a0827a2..84f4380 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -58,4 +58,4 @@ body: validations: required: true -projects: ['atls/11'] \ No newline at end of file +projects: ['atls/11'] diff --git a/.github/ISSUE_TEMPLATE/docs.yaml b/.github/ISSUE_TEMPLATE/docs.yaml index 7718a36..3f4057c 100644 --- a/.github/ISSUE_TEMPLATE/docs.yaml +++ b/.github/ISSUE_TEMPLATE/docs.yaml @@ -41,4 +41,4 @@ body: validations: required: true -projects: ['atls/11'] \ No newline at end of file +projects: ['atls/11'] diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml index f3bb493..71589d1 100644 --- a/.github/ISSUE_TEMPLATE/feature.yaml +++ b/.github/ISSUE_TEMPLATE/feature.yaml @@ -44,4 +44,4 @@ body: validations: required: true -projects: ['atls/11'] \ No newline at end of file +projects: ['atls/11'] diff --git a/.github/ISSUE_TEMPLATE/package.yaml b/.github/ISSUE_TEMPLATE/package.yaml index 6d113e8..d5e48f2 100644 --- a/.github/ISSUE_TEMPLATE/package.yaml +++ b/.github/ISSUE_TEMPLATE/package.yaml @@ -33,4 +33,4 @@ body: label: Материалы placeholder: Ссылка на репу, статью -projects: ['atls/11'] \ No newline at end of file +projects: ['atls/11'] diff --git a/.github/workflows/reusable-publish.yml b/.github/workflows/reusable-publish.yml index 7b6fc04..efff0b5 100644 --- a/.github/workflows/reusable-publish.yml +++ b/.github/workflows/reusable-publish.yml @@ -4,8 +4,8 @@ on: workflow_call: inputs: node-version: - description: "Node version to run this workflow. Default: 22" - default: "22" + description: 'Node version to run this workflow. Default: 22' + default: '22' required: false type: string appId: @@ -114,4 +114,4 @@ jobs: repo: ${{ github.repository }} branch: master commit_message: ${{ steps.commit_message.outputs.commitMessage }} - file_pattern: "*.json *.md *.yaml *.yml *.lock" + file_pattern: '*.json *.md *.yaml *.yml *.lock' diff --git a/.yarn/sdks/integrations.yml b/.yarn/sdks/integrations.yml index 9301d83..aa9d0d0 100644 --- a/.yarn/sdks/integrations.yml +++ b/.yarn/sdks/integrations.yml @@ -1,3 +1,5 @@ # This file is automatically generated by @yarnpkg/sdks. # Manual changes might be lost! +integrations: + - vscode diff --git a/package.json b/package.json index 5cfc273..6b3a0a0 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "typescript": "5.5.4" }, "packageManager": "yarn@4.6.0", + "formatterIgnorePatterns": [ + "**/*/CHANGELOG.md" + ], "tools": { "schematic": { "collection": "@atls/schematics", diff --git a/packages/protoc-gen-abstractions/src/index.ts b/packages/protoc-gen-abstractions/src/index.ts index 82aaf06..ab5776f 100644 --- a/packages/protoc-gen-abstractions/src/index.ts +++ b/packages/protoc-gen-abstractions/src/index.ts @@ -1,5 +1,3 @@ -/* eslint-disable */ - import { createEcmaScriptPlugin } from '@bufbuild/protoplugin' import { generateTs } from './protoc-gen.abstractions.js' From 40ac3f798d7ddfd4b5f88d24d3eafcdcba4b4fdd Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 3 Apr 2025 02:53:37 +0300 Subject: [PATCH 2/3] feat(protobuf-rpc): regenerate --- .pnp.cjs | 273 ++++++++++++-- packages/protobuf-rpc/buf.gen.yaml | 4 +- packages/protobuf-rpc/buf.yaml | 5 +- packages/protobuf-rpc/package.json | 10 +- .../atls/rpc/v1alpha1/localized-message_pb.ts | 75 ++-- .../atls/rpc/v1alpha1/logical-error_pb.ts | 75 ++-- .../atls/rpc/v1alpha1/validation-error_pb.ts | 143 +++++--- .../protobuf-rpc/src/logical-error.utils.ts | 12 +- .../src/validation-error.utils.ts | 10 +- .../atls/rpc/v1alpha1/localized-message.proto | 0 .../atls/rpc/v1alpha1/logical-error.proto | 0 .../atls/rpc/v1alpha1/validation-error.proto | 0 yarn.lock | 335 ++++++++++++++++-- 13 files changed, 736 insertions(+), 206 deletions(-) rename packages/protobuf-rpc/{proto => }/tech/atls/rpc/v1alpha1/localized-message.proto (100%) rename packages/protobuf-rpc/{proto => }/tech/atls/rpc/v1alpha1/logical-error.proto (100%) rename packages/protobuf-rpc/{proto => }/tech/atls/rpc/v1alpha1/validation-error.proto (100%) diff --git a/.pnp.cjs b/.pnp.cjs index 5ca4a47..f3bca79 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -145,10 +145,10 @@ const RAW_RUNTIME_STATE = "packageLocation": "./packages/protobuf-rpc/",\ "packageDependencies": [\ ["@atls/protobuf-rpc", "workspace:packages/protobuf-rpc"],\ - ["@bufbuild/buf", "npm:1.50.0"],\ + ["@bufbuild/buf", "npm:1.51.0"],\ ["@bufbuild/protobuf", "npm:1.10.0"],\ ["@bufbuild/protoc-gen-es", "virtual:6fe78b1f2117bb1dd13cdce7751d51a5e7426d6f22e0fcde2f2e5c3149f668682131600c7e57a974aae21573476eceed6d8153b2aa8ab09dd7b6f8b78b56b6ec#npm:1.10.0"],\ - ["esbuild", "npm:0.25.0"]\ + ["esbuild", "npm:0.25.2"]\ ],\ "linkType": "SOFT"\ }]\ @@ -410,80 +410,80 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@bufbuild/buf", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-npm-1.50.0-ee73ba4046/node_modules/@bufbuild/buf/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-npm-1.51.0-eb2734a464/node_modules/@bufbuild/buf/",\ "packageDependencies": [\ - ["@bufbuild/buf", "npm:1.50.0"],\ - ["@bufbuild/buf-darwin-arm64", "npm:1.50.0"],\ - ["@bufbuild/buf-darwin-x64", "npm:1.50.0"],\ - ["@bufbuild/buf-linux-aarch64", "npm:1.50.0"],\ - ["@bufbuild/buf-linux-armv7", "npm:1.50.0"],\ - ["@bufbuild/buf-linux-x64", "npm:1.50.0"],\ - ["@bufbuild/buf-win32-arm64", "npm:1.50.0"],\ - ["@bufbuild/buf-win32-x64", "npm:1.50.0"]\ + ["@bufbuild/buf", "npm:1.51.0"],\ + ["@bufbuild/buf-darwin-arm64", "npm:1.51.0"],\ + ["@bufbuild/buf-darwin-x64", "npm:1.51.0"],\ + ["@bufbuild/buf-linux-aarch64", "npm:1.51.0"],\ + ["@bufbuild/buf-linux-armv7", "npm:1.51.0"],\ + ["@bufbuild/buf-linux-x64", "npm:1.51.0"],\ + ["@bufbuild/buf-win32-arm64", "npm:1.51.0"],\ + ["@bufbuild/buf-win32-x64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-darwin-arm64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-darwin-arm64-npm-1.50.0-93ae461d6a/node_modules/@bufbuild/buf-darwin-arm64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-darwin-arm64-npm-1.51.0-1842e49a31/node_modules/@bufbuild/buf-darwin-arm64/",\ "packageDependencies": [\ - ["@bufbuild/buf-darwin-arm64", "npm:1.50.0"]\ + ["@bufbuild/buf-darwin-arm64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-darwin-x64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-darwin-x64-npm-1.50.0-4d52614f3d/node_modules/@bufbuild/buf-darwin-x64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-darwin-x64-npm-1.51.0-64061dc139/node_modules/@bufbuild/buf-darwin-x64/",\ "packageDependencies": [\ - ["@bufbuild/buf-darwin-x64", "npm:1.50.0"]\ + ["@bufbuild/buf-darwin-x64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-linux-aarch64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-aarch64-npm-1.50.0-e7c9c26f95/node_modules/@bufbuild/buf-linux-aarch64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-aarch64-npm-1.51.0-30e092c82d/node_modules/@bufbuild/buf-linux-aarch64/",\ "packageDependencies": [\ - ["@bufbuild/buf-linux-aarch64", "npm:1.50.0"]\ + ["@bufbuild/buf-linux-aarch64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-linux-armv7", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-armv7-npm-1.50.0-df55e7350c/node_modules/@bufbuild/buf-linux-armv7/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-armv7-npm-1.51.0-1fc239c8f3/node_modules/@bufbuild/buf-linux-armv7/",\ "packageDependencies": [\ - ["@bufbuild/buf-linux-armv7", "npm:1.50.0"]\ + ["@bufbuild/buf-linux-armv7", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-linux-x64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-x64-npm-1.50.0-05c5c0676d/node_modules/@bufbuild/buf-linux-x64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-linux-x64-npm-1.51.0-ebeaa359ac/node_modules/@bufbuild/buf-linux-x64/",\ "packageDependencies": [\ - ["@bufbuild/buf-linux-x64", "npm:1.50.0"]\ + ["@bufbuild/buf-linux-x64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-win32-arm64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-win32-arm64-npm-1.50.0-e35c6597a1/node_modules/@bufbuild/buf-win32-arm64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-win32-arm64-npm-1.51.0-1b9299bbf1/node_modules/@bufbuild/buf-win32-arm64/",\ "packageDependencies": [\ - ["@bufbuild/buf-win32-arm64", "npm:1.50.0"]\ + ["@bufbuild/buf-win32-arm64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@bufbuild/buf-win32-x64", [\ - ["npm:1.50.0", {\ - "packageLocation": "./.yarn/unplugged/@bufbuild-buf-win32-x64-npm-1.50.0-c1e6d5ceaa/node_modules/@bufbuild/buf-win32-x64/",\ + ["npm:1.51.0", {\ + "packageLocation": "./.yarn/unplugged/@bufbuild-buf-win32-x64-npm-1.51.0-5f129734d7/node_modules/@bufbuild/buf-win32-x64/",\ "packageDependencies": [\ - ["@bufbuild/buf-win32-x64", "npm:1.50.0"]\ + ["@bufbuild/buf-win32-x64", "npm:1.51.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -549,6 +549,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/aix-ppc64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-aix-ppc64-npm-0.25.2-d153dee00a/node_modules/@esbuild/aix-ppc64/",\ + "packageDependencies": [\ + ["@esbuild/aix-ppc64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/android-arm", [\ @@ -558,6 +565,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/android-arm", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-android-arm-npm-0.25.2-8a0fb31cf3/node_modules/@esbuild/android-arm/",\ + "packageDependencies": [\ + ["@esbuild/android-arm", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/android-arm64", [\ @@ -567,6 +581,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/android-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-android-arm64-npm-0.25.2-2ee5801450/node_modules/@esbuild/android-arm64/",\ + "packageDependencies": [\ + ["@esbuild/android-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/android-x64", [\ @@ -576,6 +597,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/android-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-android-x64-npm-0.25.2-a36f236ae6/node_modules/@esbuild/android-x64/",\ + "packageDependencies": [\ + ["@esbuild/android-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/darwin-arm64", [\ @@ -585,6 +613,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/darwin-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-darwin-arm64-npm-0.25.2-db3ebc4e25/node_modules/@esbuild/darwin-arm64/",\ + "packageDependencies": [\ + ["@esbuild/darwin-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/darwin-x64", [\ @@ -594,6 +629,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/darwin-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-darwin-x64-npm-0.25.2-773ae600e1/node_modules/@esbuild/darwin-x64/",\ + "packageDependencies": [\ + ["@esbuild/darwin-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/freebsd-arm64", [\ @@ -603,6 +645,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/freebsd-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-freebsd-arm64-npm-0.25.2-63abdf60f0/node_modules/@esbuild/freebsd-arm64/",\ + "packageDependencies": [\ + ["@esbuild/freebsd-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/freebsd-x64", [\ @@ -612,6 +661,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/freebsd-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-freebsd-x64-npm-0.25.2-8e48afe772/node_modules/@esbuild/freebsd-x64/",\ + "packageDependencies": [\ + ["@esbuild/freebsd-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-arm", [\ @@ -621,6 +677,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-arm", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-arm-npm-0.25.2-d6b5564deb/node_modules/@esbuild/linux-arm/",\ + "packageDependencies": [\ + ["@esbuild/linux-arm", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-arm64", [\ @@ -630,6 +693,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-arm64-npm-0.25.2-6839dd4fa3/node_modules/@esbuild/linux-arm64/",\ + "packageDependencies": [\ + ["@esbuild/linux-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-ia32", [\ @@ -639,6 +709,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-ia32", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-ia32-npm-0.25.2-aafe2f8457/node_modules/@esbuild/linux-ia32/",\ + "packageDependencies": [\ + ["@esbuild/linux-ia32", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-loong64", [\ @@ -648,6 +725,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-loong64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-loong64-npm-0.25.2-4e5140f3cb/node_modules/@esbuild/linux-loong64/",\ + "packageDependencies": [\ + ["@esbuild/linux-loong64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-mips64el", [\ @@ -657,6 +741,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-mips64el", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-mips64el-npm-0.25.2-8ce6c5e5ce/node_modules/@esbuild/linux-mips64el/",\ + "packageDependencies": [\ + ["@esbuild/linux-mips64el", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-ppc64", [\ @@ -666,6 +757,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-ppc64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-ppc64-npm-0.25.2-9000e68a74/node_modules/@esbuild/linux-ppc64/",\ + "packageDependencies": [\ + ["@esbuild/linux-ppc64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-riscv64", [\ @@ -675,6 +773,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-riscv64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-riscv64-npm-0.25.2-32a12e2b8a/node_modules/@esbuild/linux-riscv64/",\ + "packageDependencies": [\ + ["@esbuild/linux-riscv64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-s390x", [\ @@ -684,6 +789,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-s390x", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-s390x-npm-0.25.2-8315809f87/node_modules/@esbuild/linux-s390x/",\ + "packageDependencies": [\ + ["@esbuild/linux-s390x", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/linux-x64", [\ @@ -693,6 +805,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/linux-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-linux-x64-npm-0.25.2-7713427dc3/node_modules/@esbuild/linux-x64/",\ + "packageDependencies": [\ + ["@esbuild/linux-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/netbsd-arm64", [\ @@ -702,6 +821,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/netbsd-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-netbsd-arm64-npm-0.25.2-c749c16372/node_modules/@esbuild/netbsd-arm64/",\ + "packageDependencies": [\ + ["@esbuild/netbsd-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/netbsd-x64", [\ @@ -711,6 +837,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/netbsd-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-netbsd-x64-npm-0.25.2-a2662e096b/node_modules/@esbuild/netbsd-x64/",\ + "packageDependencies": [\ + ["@esbuild/netbsd-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/openbsd-arm64", [\ @@ -720,6 +853,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/openbsd-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-openbsd-arm64-npm-0.25.2-c7ef8fb039/node_modules/@esbuild/openbsd-arm64/",\ + "packageDependencies": [\ + ["@esbuild/openbsd-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/openbsd-x64", [\ @@ -729,6 +869,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/openbsd-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-openbsd-x64-npm-0.25.2-cb2f9f77b0/node_modules/@esbuild/openbsd-x64/",\ + "packageDependencies": [\ + ["@esbuild/openbsd-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/sunos-x64", [\ @@ -738,6 +885,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/sunos-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-sunos-x64-npm-0.25.2-d9dd668e48/node_modules/@esbuild/sunos-x64/",\ + "packageDependencies": [\ + ["@esbuild/sunos-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/win32-arm64", [\ @@ -747,6 +901,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/win32-arm64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-win32-arm64-npm-0.25.2-39f04871ed/node_modules/@esbuild/win32-arm64/",\ + "packageDependencies": [\ + ["@esbuild/win32-arm64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/win32-ia32", [\ @@ -756,6 +917,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/win32-ia32", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-win32-ia32-npm-0.25.2-0b3b7dc698/node_modules/@esbuild/win32-ia32/",\ + "packageDependencies": [\ + ["@esbuild/win32-ia32", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@esbuild/win32-x64", [\ @@ -765,6 +933,13 @@ const RAW_RUNTIME_STATE = ["@esbuild/win32-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/@esbuild-win32-x64-npm-0.25.2-bdc4b96867/node_modules/@esbuild/win32-x64/",\ + "packageDependencies": [\ + ["@esbuild/win32-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@eslint-community/eslint-utils", [\ @@ -2769,6 +2944,38 @@ const RAW_RUNTIME_STATE = ["@esbuild/win32-x64", "npm:0.25.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.25.2", {\ + "packageLocation": "./.yarn/unplugged/esbuild-npm-0.25.2-1486e883dd/node_modules/esbuild/",\ + "packageDependencies": [\ + ["esbuild", "npm:0.25.2"],\ + ["@esbuild/aix-ppc64", "npm:0.25.2"],\ + ["@esbuild/android-arm", "npm:0.25.2"],\ + ["@esbuild/android-arm64", "npm:0.25.2"],\ + ["@esbuild/android-x64", "npm:0.25.2"],\ + ["@esbuild/darwin-arm64", "npm:0.25.2"],\ + ["@esbuild/darwin-x64", "npm:0.25.2"],\ + ["@esbuild/freebsd-arm64", "npm:0.25.2"],\ + ["@esbuild/freebsd-x64", "npm:0.25.2"],\ + ["@esbuild/linux-arm", "npm:0.25.2"],\ + ["@esbuild/linux-arm64", "npm:0.25.2"],\ + ["@esbuild/linux-ia32", "npm:0.25.2"],\ + ["@esbuild/linux-loong64", "npm:0.25.2"],\ + ["@esbuild/linux-mips64el", "npm:0.25.2"],\ + ["@esbuild/linux-ppc64", "npm:0.25.2"],\ + ["@esbuild/linux-riscv64", "npm:0.25.2"],\ + ["@esbuild/linux-s390x", "npm:0.25.2"],\ + ["@esbuild/linux-x64", "npm:0.25.2"],\ + ["@esbuild/netbsd-arm64", "npm:0.25.2"],\ + ["@esbuild/netbsd-x64", "npm:0.25.2"],\ + ["@esbuild/openbsd-arm64", "npm:0.25.2"],\ + ["@esbuild/openbsd-x64", "npm:0.25.2"],\ + ["@esbuild/sunos-x64", "npm:0.25.2"],\ + ["@esbuild/win32-arm64", "npm:0.25.2"],\ + ["@esbuild/win32-ia32", "npm:0.25.2"],\ + ["@esbuild/win32-x64", "npm:0.25.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["escalade", [\ diff --git a/packages/protobuf-rpc/buf.gen.yaml b/packages/protobuf-rpc/buf.gen.yaml index a726fa2..89ba6c4 100644 --- a/packages/protobuf-rpc/buf.gen.yaml +++ b/packages/protobuf-rpc/buf.gen.yaml @@ -1,6 +1,6 @@ -version: v1 +version: v2 plugins: - - name: es + - local: protoc-gen-es opt: target=ts out: src/gen diff --git a/packages/protobuf-rpc/buf.yaml b/packages/protobuf-rpc/buf.yaml index d7e4353..581ad73 100644 --- a/packages/protobuf-rpc/buf.yaml +++ b/packages/protobuf-rpc/buf.yaml @@ -1,7 +1,10 @@ -version: v1 +version: v2 lint: use: - DEFAULT except: - FILE_LOWER_SNAKE_CASE + - ENUM_ZERO_VALUE_SUFFIX + ignore: + - grpc diff --git a/packages/protobuf-rpc/package.json b/packages/protobuf-rpc/package.json index ba76328..c5e72fe 100644 --- a/packages/protobuf-rpc/package.json +++ b/packages/protobuf-rpc/package.json @@ -17,14 +17,14 @@ "build:cjs": "yarn esbuild dist/**/*.js --outdir=dist/cjs --format=cjs", "prepack": "yarn run build && yarn run build:cjs", "postpack": "rm -rf dist", - "proto:generate": "buf generate proto", + "proto:generate": "buf generate", "proto:lint": "buf lint proto" }, "devDependencies": { - "@bufbuild/buf": "^1.26.1", - "@bufbuild/protobuf": "^1.3.1", - "@bufbuild/protoc-gen-es": "^1.3.1", - "esbuild": "0.25.0" + "@bufbuild/buf": "1.51.0", + "@bufbuild/protobuf": "1.10.0", + "@bufbuild/protoc-gen-es": "1.10.0", + "esbuild": "0.25.2" }, "peerDependencies": { "@bufbuild/protobuf": "*" diff --git a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/localized-message_pb.ts b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/localized-message_pb.ts index 51057b7..48aac72 100644 --- a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/localized-message_pb.ts +++ b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/localized-message_pb.ts @@ -1,47 +1,60 @@ -// @generated by protoc-gen-es v2.2.3 with parameter "target=ts" +// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" // @generated from file tech/atls/rpc/v1alpha1/localized-message.proto (package tech.atls.rpc.v1alpha1, syntax proto3) /* eslint-disable */ +// @ts-nocheck -import type { Message } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import type { GenFile } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import type { GenMessage } from '@bufbuild/protobuf/codegenv1' +import type { BinaryReadOptions } from '@bufbuild/protobuf' +import type { FieldList } from '@bufbuild/protobuf' +import type { JsonReadOptions } from '@bufbuild/protobuf' +import type { JsonValue } from '@bufbuild/protobuf' +import type { PartialMessage } from '@bufbuild/protobuf' +import type { PlainMessage } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import { fileDesc } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import { messageDesc } from '@bufbuild/protobuf/codegenv1' - -/** - * Describes the file tech/atls/rpc/v1alpha1/localized-message.proto. - */ -export const file_tech_atls_rpc_v1alpha1_localized_message: GenFile = - /*@__PURE__*/ - fileDesc( - 'Ci50ZWNoL2F0bHMvcnBjL3YxYWxwaGExL2xvY2FsaXplZC1tZXNzYWdlLnByb3RvEhZ0ZWNoLmF0bHMucnBjLnYxYWxwaGExIjMKEExvY2FsaXplZE1lc3NhZ2USDgoGbG9jYWxlGAEgASgJEg8KB21lc3NhZ2UYAiABKAliBnByb3RvMw' - ) +import { Message } from '@bufbuild/protobuf' +import { proto3 } from '@bufbuild/protobuf' /** * @generated from message tech.atls.rpc.v1alpha1.LocalizedMessage */ -// @ts-expect-error error in types -export type LocalizedMessage = Message<'tech.atls.rpc.v1alpha1.LocalizedMessage'> & { +export class LocalizedMessage extends Message { /** * @generated from field: string locale = 1; */ - locale: string + locale = '' /** * @generated from field: string message = 2; */ - message: string -} + message = '' -/** - * Describes the message tech.atls.rpc.v1alpha1.LocalizedMessage. - * Use `create(LocalizedMessageSchema)` to create a new message. - */ -export const LocalizedMessageSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_tech_atls_rpc_v1alpha1_localized_message, 0) + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'tech.atls.rpc.v1alpha1.LocalizedMessage' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'locale', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'message', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalizedMessage { + return new LocalizedMessage().fromBinary(bytes, options) + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalizedMessage { + return new LocalizedMessage().fromJson(jsonValue, options) + } + + static fromJsonString(jsonString: string, options?: Partial): LocalizedMessage { + return new LocalizedMessage().fromJsonString(jsonString, options) + } + + static equals( + a: LocalizedMessage | PlainMessage | undefined, + b: LocalizedMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(LocalizedMessage, a, b) + } +} diff --git a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/logical-error_pb.ts b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/logical-error_pb.ts index 109e7d1..2498b9b 100644 --- a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/logical-error_pb.ts +++ b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/logical-error_pb.ts @@ -1,47 +1,60 @@ -// @generated by protoc-gen-es v2.2.3 with parameter "target=ts" +// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" // @generated from file tech/atls/rpc/v1alpha1/logical-error.proto (package tech.atls.rpc.v1alpha1, syntax proto3) /* eslint-disable */ +// @ts-nocheck -import type { Message } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import type { GenFile } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import type { GenMessage } from '@bufbuild/protobuf/codegenv1' +import type { BinaryReadOptions } from '@bufbuild/protobuf' +import type { FieldList } from '@bufbuild/protobuf' +import type { JsonReadOptions } from '@bufbuild/protobuf' +import type { JsonValue } from '@bufbuild/protobuf' +import type { PartialMessage } from '@bufbuild/protobuf' +import type { PlainMessage } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import { fileDesc } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import { messageDesc } from '@bufbuild/protobuf/codegenv1' - -/** - * Describes the file tech/atls/rpc/v1alpha1/logical-error.proto. - */ -export const file_tech_atls_rpc_v1alpha1_logical_error: GenFile = - /*@__PURE__*/ - fileDesc( - 'Cip0ZWNoL2F0bHMvcnBjL3YxYWxwaGExL2xvZ2ljYWwtZXJyb3IucHJvdG8SFnRlY2guYXRscy5ycGMudjFhbHBoYTEiKwoMTG9naWNhbEVycm9yEgoKAmlkGAEgASgJEg8KB21lc3NhZ2UYAiABKAliBnByb3RvMw' - ) +import { Message } from '@bufbuild/protobuf' +import { proto3 } from '@bufbuild/protobuf' /** * @generated from message tech.atls.rpc.v1alpha1.LogicalError */ -// @ts-expect-error error in types -export type LogicalError = Message<'tech.atls.rpc.v1alpha1.LogicalError'> & { +export class LogicalError extends Message { /** * @generated from field: string id = 1; */ - id: string + id = '' /** * @generated from field: string message = 2; */ - message: string -} + message = '' -/** - * Describes the message tech.atls.rpc.v1alpha1.LogicalError. - * Use `create(LogicalErrorSchema)` to create a new message. - */ -export const LogicalErrorSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_tech_atls_rpc_v1alpha1_logical_error, 0) + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'tech.atls.rpc.v1alpha1.LogicalError' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'message', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) + + static fromBinary(bytes: Uint8Array, options?: Partial): LogicalError { + return new LogicalError().fromBinary(bytes, options) + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LogicalError { + return new LogicalError().fromJson(jsonValue, options) + } + + static fromJsonString(jsonString: string, options?: Partial): LogicalError { + return new LogicalError().fromJsonString(jsonString, options) + } + + static equals( + a: LogicalError | PlainMessage | undefined, + b: LogicalError | PlainMessage | undefined + ): boolean { + return proto3.util.equals(LogicalError, a, b) + } +} diff --git a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/validation-error_pb.ts b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/validation-error_pb.ts index 206e1b4..fc3add4 100644 --- a/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/validation-error_pb.ts +++ b/packages/protobuf-rpc/src/gen/tech/atls/rpc/v1alpha1/validation-error_pb.ts @@ -1,88 +1,129 @@ -// @generated by protoc-gen-es v2.2.3 with parameter "target=ts" +// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" // @generated from file tech/atls/rpc/v1alpha1/validation-error.proto (package tech.atls.rpc.v1alpha1, syntax proto3) /* eslint-disable */ +// @ts-nocheck -import type { Message } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import type { GenFile } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import type { GenMessage } from '@bufbuild/protobuf/codegenv1' +import type { BinaryReadOptions } from '@bufbuild/protobuf' +import type { FieldList } from '@bufbuild/protobuf' +import type { JsonReadOptions } from '@bufbuild/protobuf' +import type { JsonValue } from '@bufbuild/protobuf' +import type { PartialMessage } from '@bufbuild/protobuf' +import type { PlainMessage } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import type { LocalizedMessage } from './localized-message_pb' +import { Message } from '@bufbuild/protobuf' +import { proto3 } from '@bufbuild/protobuf' -// @ts-expect-error missing types -import { fileDesc } from '@bufbuild/protobuf/codegenv1' -// @ts-expect-error missing types -import { messageDesc } from '@bufbuild/protobuf/codegenv1' - -// @ts-expect-error missing types -import { file_tech_atls_rpc_v1alpha1_localized_message } from './localized-message_pb' - -/** - * Describes the file tech/atls/rpc/v1alpha1/validation-error.proto. - */ -export const file_tech_atls_rpc_v1alpha1_validation_error: GenFile = - /*@__PURE__*/ - fileDesc( - 'Ci10ZWNoL2F0bHMvcnBjL3YxYWxwaGExL3ZhbGlkYXRpb24tZXJyb3IucHJvdG8SFnRlY2guYXRscy5ycGMudjFhbHBoYTEicwoWVmFsaWRhdGlvbkVycm9yTWVzc2FnZRIKCgJpZBgBIAEoCRISCgpjb25zdHJhaW50GAIgASgJEjkKB2RldGFpbHMYAyADKAsyKC50ZWNoLmF0bHMucnBjLnYxYWxwaGExLkxvY2FsaXplZE1lc3NhZ2UicQoPVmFsaWRhdGlvbkVycm9yEgoKAmlkGAEgASgJEhAKCHByb3BlcnR5GAIgASgJEkAKCG1lc3NhZ2VzGAMgAygLMi4udGVjaC5hdGxzLnJwYy52MWFscGhhMS5WYWxpZGF0aW9uRXJyb3JNZXNzYWdlYgZwcm90bzM', - [file_tech_atls_rpc_v1alpha1_localized_message] - ) +import { LocalizedMessage } from './localized-message_pb.js' /** * @generated from message tech.atls.rpc.v1alpha1.ValidationErrorMessage */ -// @ts-expect-error error in types -export type ValidationErrorMessage = Message<'tech.atls.rpc.v1alpha1.ValidationErrorMessage'> & { +export class ValidationErrorMessage extends Message { /** * @generated from field: string id = 1; */ - id: string + id = '' /** * @generated from field: string constraint = 2; */ - constraint: string + constraint = '' /** * @generated from field: repeated tech.atls.rpc.v1alpha1.LocalizedMessage details = 3; */ - details: LocalizedMessage[] -} + details: LocalizedMessage[] = [] -/** - * Describes the message tech.atls.rpc.v1alpha1.ValidationErrorMessage. - * Use `create(ValidationErrorMessageSchema)` to create a new message. - */ -export const ValidationErrorMessageSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_tech_atls_rpc_v1alpha1_validation_error, 0) + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'tech.atls.rpc.v1alpha1.ValidationErrorMessage' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'constraint', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'details', kind: 'message', T: LocalizedMessage, repeated: true }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ValidationErrorMessage { + return new ValidationErrorMessage().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ValidationErrorMessage { + return new ValidationErrorMessage().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial + ): ValidationErrorMessage { + return new ValidationErrorMessage().fromJsonString(jsonString, options) + } + + static equals( + a: ValidationErrorMessage | PlainMessage | undefined, + b: ValidationErrorMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ValidationErrorMessage, a, b) + } +} /** * @generated from message tech.atls.rpc.v1alpha1.ValidationError */ -// @ts-expect-error error in types -export type ValidationError = Message<'tech.atls.rpc.v1alpha1.ValidationError'> & { +export class ValidationError extends Message { /** * @generated from field: string id = 1; */ - id: string + id = '' /** * @generated from field: string property = 2; */ - property: string + property = '' /** * @generated from field: repeated tech.atls.rpc.v1alpha1.ValidationErrorMessage messages = 3; */ - messages: ValidationErrorMessage[] -} + messages: ValidationErrorMessage[] = [] -/** - * Describes the message tech.atls.rpc.v1alpha1.ValidationError. - * Use `create(ValidationErrorSchema)` to create a new message. - */ -export const ValidationErrorSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_tech_atls_rpc_v1alpha1_validation_error, 1) + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'tech.atls.rpc.v1alpha1.ValidationError' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'property', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'messages', kind: 'message', T: ValidationErrorMessage, repeated: true }, + ]) + + static fromBinary(bytes: Uint8Array, options?: Partial): ValidationError { + return new ValidationError().fromBinary(bytes, options) + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ValidationError { + return new ValidationError().fromJson(jsonValue, options) + } + + static fromJsonString(jsonString: string, options?: Partial): ValidationError { + return new ValidationError().fromJsonString(jsonString, options) + } + + static equals( + a: ValidationError | PlainMessage | undefined, + b: ValidationError | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ValidationError, a, b) + } +} diff --git a/packages/protobuf-rpc/src/logical-error.utils.ts b/packages/protobuf-rpc/src/logical-error.utils.ts index 78f7780..0529126 100644 --- a/packages/protobuf-rpc/src/logical-error.utils.ts +++ b/packages/protobuf-rpc/src/logical-error.utils.ts @@ -6,14 +6,10 @@ export const findLogicalError = (error: unknown): LogicalError | undefined => { const { details } = (error || {}) as MaybeConnectError if (Array.isArray(details)) { - return ( - details - // @ts-expect-error as type - .filter((detail) => detail.type === LogicalError.typeName) - // @ts-expect-error as type - .map((detail) => LogicalError.fromBinary(detail.value)) - .at(0) - ) + return details + .filter((detail) => detail.type === LogicalError.typeName) + .map((detail) => LogicalError.fromBinary(detail.value)) + .at(0) } return undefined diff --git a/packages/protobuf-rpc/src/validation-error.utils.ts b/packages/protobuf-rpc/src/validation-error.utils.ts index e3c838d..255d2ca 100644 --- a/packages/protobuf-rpc/src/validation-error.utils.ts +++ b/packages/protobuf-rpc/src/validation-error.utils.ts @@ -6,13 +6,9 @@ export const findValidationErrorDetails = (error: unknown): Array detail.type === ValidationError.typeName) - // @ts-expect-error as type - .map((detail) => ValidationError.fromBinary(detail.value)) - ) + return details + .filter((detail) => detail.type === ValidationError.typeName) + .map((detail) => ValidationError.fromBinary(detail.value)) } return [] diff --git a/packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/localized-message.proto b/packages/protobuf-rpc/tech/atls/rpc/v1alpha1/localized-message.proto similarity index 100% rename from packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/localized-message.proto rename to packages/protobuf-rpc/tech/atls/rpc/v1alpha1/localized-message.proto diff --git a/packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/logical-error.proto b/packages/protobuf-rpc/tech/atls/rpc/v1alpha1/logical-error.proto similarity index 100% rename from packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/logical-error.proto rename to packages/protobuf-rpc/tech/atls/rpc/v1alpha1/logical-error.proto diff --git a/packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/validation-error.proto b/packages/protobuf-rpc/tech/atls/rpc/v1alpha1/validation-error.proto similarity index 100% rename from packages/protobuf-rpc/proto/tech/atls/rpc/v1alpha1/validation-error.proto rename to packages/protobuf-rpc/tech/atls/rpc/v1alpha1/validation-error.proto diff --git a/yarn.lock b/yarn.lock index b602104..3d8d12e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -83,10 +83,10 @@ __metadata: version: 0.0.0-use.local resolution: "@atls/protobuf-rpc@workspace:packages/protobuf-rpc" dependencies: - "@bufbuild/buf": "npm:^1.26.1" - "@bufbuild/protobuf": "npm:^1.3.1" - "@bufbuild/protoc-gen-es": "npm:^1.3.1" - esbuild: "npm:0.25.0" + "@bufbuild/buf": "npm:1.51.0" + "@bufbuild/protobuf": "npm:1.10.0" + "@bufbuild/protoc-gen-es": "npm:1.10.0" + esbuild: "npm:0.25.2" peerDependencies: "@bufbuild/protobuf": "*" languageName: unknown @@ -327,66 +327,66 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-darwin-arm64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-darwin-arm64@npm:1.50.0" +"@bufbuild/buf-darwin-arm64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-darwin-arm64@npm:1.51.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@bufbuild/buf-darwin-x64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-darwin-x64@npm:1.50.0" +"@bufbuild/buf-darwin-x64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-darwin-x64@npm:1.51.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@bufbuild/buf-linux-aarch64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-linux-aarch64@npm:1.50.0" +"@bufbuild/buf-linux-aarch64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-linux-aarch64@npm:1.51.0" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@bufbuild/buf-linux-armv7@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-linux-armv7@npm:1.50.0" +"@bufbuild/buf-linux-armv7@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-linux-armv7@npm:1.51.0" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@bufbuild/buf-linux-x64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-linux-x64@npm:1.50.0" +"@bufbuild/buf-linux-x64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-linux-x64@npm:1.51.0" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@bufbuild/buf-win32-arm64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-win32-arm64@npm:1.50.0" +"@bufbuild/buf-win32-arm64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-win32-arm64@npm:1.51.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@bufbuild/buf-win32-x64@npm:1.50.0": - version: 1.50.0 - resolution: "@bufbuild/buf-win32-x64@npm:1.50.0" +"@bufbuild/buf-win32-x64@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf-win32-x64@npm:1.51.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@bufbuild/buf@npm:^1.26.1": - version: 1.50.0 - resolution: "@bufbuild/buf@npm:1.50.0" +"@bufbuild/buf@npm:1.51.0": + version: 1.51.0 + resolution: "@bufbuild/buf@npm:1.51.0" dependencies: - "@bufbuild/buf-darwin-arm64": "npm:1.50.0" - "@bufbuild/buf-darwin-x64": "npm:1.50.0" - "@bufbuild/buf-linux-aarch64": "npm:1.50.0" - "@bufbuild/buf-linux-armv7": "npm:1.50.0" - "@bufbuild/buf-linux-x64": "npm:1.50.0" - "@bufbuild/buf-win32-arm64": "npm:1.50.0" - "@bufbuild/buf-win32-x64": "npm:1.50.0" + "@bufbuild/buf-darwin-arm64": "npm:1.51.0" + "@bufbuild/buf-darwin-x64": "npm:1.51.0" + "@bufbuild/buf-linux-aarch64": "npm:1.51.0" + "@bufbuild/buf-linux-armv7": "npm:1.51.0" + "@bufbuild/buf-linux-x64": "npm:1.51.0" + "@bufbuild/buf-win32-arm64": "npm:1.51.0" + "@bufbuild/buf-win32-x64": "npm:1.51.0" dependenciesMeta: "@bufbuild/buf-darwin-arm64": optional: true @@ -406,7 +406,7 @@ __metadata: buf: bin/buf protoc-gen-buf-breaking: bin/protoc-gen-buf-breaking protoc-gen-buf-lint: bin/protoc-gen-buf-lint - checksum: 10/f755f2edc71ba38315344822285c5b1643b9015623fe266c1086035844713543fd6c1f932771831bf019c3ba8b83c2e44679f27cc72f81cf785eee8de6b923e7 + checksum: 10/53cc4614dc81f9b6a27284af34925bc1a276da6a0af5716267bcfd657c93249a5bd8aece80b650896834093af52e32878cc301777e3ccda37b800b99c519a323 languageName: node linkType: hard @@ -417,7 +417,7 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protoc-gen-es@npm:^1.3.1": +"@bufbuild/protoc-gen-es@npm:1.10.0": version: 1.10.0 resolution: "@bufbuild/protoc-gen-es@npm:1.10.0" dependencies: @@ -461,6 +461,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/aix-ppc64@npm:0.25.2" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/android-arm64@npm:0.25.0" @@ -468,6 +475,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-arm64@npm:0.25.2" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/android-arm@npm:0.25.0" @@ -475,6 +489,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-arm@npm:0.25.2" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/android-x64@npm:0.25.0" @@ -482,6 +503,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-x64@npm:0.25.2" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/darwin-arm64@npm:0.25.0" @@ -489,6 +517,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/darwin-arm64@npm:0.25.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/darwin-x64@npm:0.25.0" @@ -496,6 +531,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/darwin-x64@npm:0.25.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/freebsd-arm64@npm:0.25.0" @@ -503,6 +545,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/freebsd-arm64@npm:0.25.2" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/freebsd-x64@npm:0.25.0" @@ -510,6 +559,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/freebsd-x64@npm:0.25.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-arm64@npm:0.25.0" @@ -517,6 +573,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-arm64@npm:0.25.2" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-arm@npm:0.25.0" @@ -524,6 +587,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-arm@npm:0.25.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-ia32@npm:0.25.0" @@ -531,6 +601,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-ia32@npm:0.25.2" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-loong64@npm:0.25.0" @@ -538,6 +615,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-loong64@npm:0.25.2" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-mips64el@npm:0.25.0" @@ -545,6 +629,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-mips64el@npm:0.25.2" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-ppc64@npm:0.25.0" @@ -552,6 +643,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-ppc64@npm:0.25.2" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-riscv64@npm:0.25.0" @@ -559,6 +657,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-riscv64@npm:0.25.2" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-s390x@npm:0.25.0" @@ -566,6 +671,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-s390x@npm:0.25.2" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/linux-x64@npm:0.25.0" @@ -573,6 +685,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-x64@npm:0.25.2" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@esbuild/netbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/netbsd-arm64@npm:0.25.0" @@ -580,6 +699,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/netbsd-arm64@npm:0.25.2" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/netbsd-x64@npm:0.25.0" @@ -587,6 +713,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/netbsd-x64@npm:0.25.2" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/openbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/openbsd-arm64@npm:0.25.0" @@ -594,6 +727,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/openbsd-arm64@npm:0.25.2" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/openbsd-x64@npm:0.25.0" @@ -601,6 +741,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/openbsd-x64@npm:0.25.2" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/sunos-x64@npm:0.25.0" @@ -608,6 +755,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/sunos-x64@npm:0.25.2" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/win32-arm64@npm:0.25.0" @@ -615,6 +769,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-arm64@npm:0.25.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/win32-ia32@npm:0.25.0" @@ -622,6 +783,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-ia32@npm:0.25.2" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/win32-x64@npm:0.25.0" @@ -629,6 +797,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-x64@npm:0.25.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0, @eslint-community/eslint-utils@npm:^4.4.1": version: 4.4.1 resolution: "@eslint-community/eslint-utils@npm:4.4.1" @@ -2224,6 +2399,92 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:0.25.2": + version: 0.25.2 + resolution: "esbuild@npm:0.25.2" + dependencies: + "@esbuild/aix-ppc64": "npm:0.25.2" + "@esbuild/android-arm": "npm:0.25.2" + "@esbuild/android-arm64": "npm:0.25.2" + "@esbuild/android-x64": "npm:0.25.2" + "@esbuild/darwin-arm64": "npm:0.25.2" + "@esbuild/darwin-x64": "npm:0.25.2" + "@esbuild/freebsd-arm64": "npm:0.25.2" + "@esbuild/freebsd-x64": "npm:0.25.2" + "@esbuild/linux-arm": "npm:0.25.2" + "@esbuild/linux-arm64": "npm:0.25.2" + "@esbuild/linux-ia32": "npm:0.25.2" + "@esbuild/linux-loong64": "npm:0.25.2" + "@esbuild/linux-mips64el": "npm:0.25.2" + "@esbuild/linux-ppc64": "npm:0.25.2" + "@esbuild/linux-riscv64": "npm:0.25.2" + "@esbuild/linux-s390x": "npm:0.25.2" + "@esbuild/linux-x64": "npm:0.25.2" + "@esbuild/netbsd-arm64": "npm:0.25.2" + "@esbuild/netbsd-x64": "npm:0.25.2" + "@esbuild/openbsd-arm64": "npm:0.25.2" + "@esbuild/openbsd-x64": "npm:0.25.2" + "@esbuild/sunos-x64": "npm:0.25.2" + "@esbuild/win32-arm64": "npm:0.25.2" + "@esbuild/win32-ia32": "npm:0.25.2" + "@esbuild/win32-x64": "npm:0.25.2" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/3b16423d33e0c05078b38bfe88e1b2125164a6b8dccfd06db8698766e54406f3299de8a74e3ce818f1d5a9c8bf993aa4d27a5716c39580eb80bd92d52ccf34d3 + languageName: node + linkType: hard + "escalade@npm:^3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" From 8fc679287cea4bc42198875cba3a21abb6437e29 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 3 Apr 2025 02:54:18 +0300 Subject: [PATCH 3/3] fix(protobuf-rpc): publish config --- packages/protobuf-rpc/package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/protobuf-rpc/package.json b/packages/protobuf-rpc/package.json index c5e72fe..939dae9 100644 --- a/packages/protobuf-rpc/package.json +++ b/packages/protobuf-rpc/package.json @@ -34,12 +34,13 @@ "exports": { "./package.json": "./package.json", ".": { - "import": "./dist/cjs/index.js", + "import": "./dist/index.js", "types": "./dist/index.d.ts", - "default": "./dist/cjs/index.js" + "require": "./dist/cjs/index.js", + "default": "./dist/index.js" } }, - "main": "dist/cjs/index.js", + "main": "dist/index.js", "typings": "dist/index.d.ts" } }