diff --git a/plugins/community/nipunn1313-mypy-grpc/v4.0.0/.dockerignore b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/community/nipunn1313-mypy-grpc/v4.0.0/Dockerfile b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/Dockerfile new file mode 100644 index 000000000..ee5babf35 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.19 +FROM python:3.11.14-bookworm AS build +WORKDIR /app +RUN python -mvenv /app +ADD /requirements.txt requirements.txt +RUN . ./bin/activate \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall --yes pip setuptools \ + && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ + && rm -f bin/protoc-gen-mypy \ + && ln -sf /usr/bin/python /app/bin/python + +FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ] diff --git a/plugins/community/nipunn1313-mypy-grpc/v4.0.0/buf.plugin.yaml b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/buf.plugin.yaml new file mode 100644 index 000000000..e5f12d368 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/buf.plugin.yaml @@ -0,0 +1,26 @@ +version: v1 +name: buf.build/community/nipunn1313-mypy-grpc +plugin_version: v4.0.0 +source_url: https://github.com/nipunn1313/mypy-protobuf +description: Generate mypy stub files for grpcio generated code. +spdx_license_id: Apache-2.0 +license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE +output_languages: + - python +registry: + python: + package_type: "stub-only" + # https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20 + requires_python: ">=3.8" + deps: + # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf + # > Earlier releases might work, but aren't tested. + - "types-protobuf >= 5.28" + - "protobuf >= 5.28.2" + # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#to-run-typecheckers-on-code-generated-with-grpc-plugin---youll-additionally-need + # > Earlier releases might work, but aren't tested + - "grpcio >= 1.66.2" + # https://pypi.org/project/grpcio-tools/ + - "grpcio-tools >= 1.66.2" + # https://pypi.org/project/grpc-stubs/ + - "grpc-stubs >= 1.53.0.5" diff --git a/plugins/community/nipunn1313-mypy-grpc/v4.0.0/requirements.txt b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/requirements.txt new file mode 100644 index 000000000..f2a8751b9 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v4.0.0/requirements.txt @@ -0,0 +1,3 @@ +mypy-protobuf==4.0.0 +protobuf==6.33.1 +types-protobuf==6.32.1.20251105 diff --git a/plugins/community/nipunn1313-mypy/v4.0.0/.dockerignore b/plugins/community/nipunn1313-mypy/v4.0.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v4.0.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/community/nipunn1313-mypy/v4.0.0/Dockerfile b/plugins/community/nipunn1313-mypy/v4.0.0/Dockerfile new file mode 100644 index 000000000..fbbcec760 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v4.0.0/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.19 +FROM python:3.11.14-bookworm AS build +WORKDIR /app +RUN python -mvenv /app +ADD /requirements.txt requirements.txt +RUN . ./bin/activate \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall --yes pip setuptools \ + && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ + && rm -f bin/protoc-gen-mypy_grpc \ + && ln -sf /usr/bin/python /app/bin/python + +FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ] diff --git a/plugins/community/nipunn1313-mypy/v4.0.0/buf.plugin.yaml b/plugins/community/nipunn1313-mypy/v4.0.0/buf.plugin.yaml new file mode 100644 index 000000000..43871a6d2 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v4.0.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/community/nipunn1313-mypy +plugin_version: v4.0.0 +source_url: https://github.com/nipunn1313/mypy-protobuf +description: Generate mypy stub files from Protobuf definitions. +spdx_license_id: Apache-2.0 +license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE +output_languages: + - python +registry: + python: + package_type: "stub-only" + # https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20 + requires_python: ">=3.8" + deps: + # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf + # > Earlier releases might work, but aren't tested. + - "types-protobuf >= 5.28" + - "protobuf >= 5.28.2" diff --git a/plugins/community/nipunn1313-mypy/v4.0.0/requirements.txt b/plugins/community/nipunn1313-mypy/v4.0.0/requirements.txt new file mode 100644 index 000000000..f2a8751b9 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v4.0.0/requirements.txt @@ -0,0 +1,3 @@ +mypy-protobuf==4.0.0 +protobuf==6.33.1 +types-protobuf==6.32.1.20251105 diff --git a/plugins/connectrpc/python/v0.7.0/.dockerignore b/plugins/connectrpc/python/v0.7.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/connectrpc/python/v0.7.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/connectrpc/python/v0.7.0/Dockerfile b/plugins/connectrpc/python/v0.7.0/Dockerfile new file mode 100644 index 000000000..1efe8a524 --- /dev/null +++ b/plugins/connectrpc/python/v0.7.0/Dockerfile @@ -0,0 +1,16 @@ +# syntax=docker/dockerfile:1.19 +FROM python:3.11.14-bookworm AS build +WORKDIR /app +RUN python -mvenv /app +RUN . ./bin/activate \ + && pip install --no-cache-dir protoc-gen-connect-python==0.7.0 \ + && pip uninstall --yes pip setuptools \ + && rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1 + +FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-connect-python" ] diff --git a/plugins/connectrpc/python/v0.7.0/buf.plugin.yaml b/plugins/connectrpc/python/v0.7.0/buf.plugin.yaml new file mode 100644 index 000000000..c40552a15 --- /dev/null +++ b/plugins/connectrpc/python/v0.7.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/connectrpc/python +plugin_version: v0.7.0 +source_url: https://github.com/connectrpc/connect-python +description: Generates client and server stubs for Connect Python. Compatible with the Connect RPC protocol. +spdx_license_id: Apache-2.0 +license_url: https://github.com/connectrpc/connect-python/blob/v0.7.0/LICENSE +deps: + - plugin: buf.build/protocolbuffers/python:v33.2 +output_languages: + - python +registry: + python: + package_type: "runtime" + # https://github.com/connectrpc/connect-python/blob/v0.7.0/protoc-gen-connect-python/pyproject.toml#L11 + requires_python: ">=3.10" + deps: + # https://pypi.org/project/connect-python/ + - "connect-python >= 0.7.0" diff --git a/plugins/grpc/java/v1.78.0/.dockerignore b/plugins/grpc/java/v1.78.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/grpc/java/v1.78.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/grpc/java/v1.78.0/Dockerfile b/plugins/grpc/java/v1.78.0/Dockerfile new file mode 100644 index 000000000..6897a5c91 --- /dev/null +++ b/plugins/grpc/java/v1.78.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.19 +FROM debian:bookworm-20251208 AS build + +ARG TARGETARCH + +WORKDIR /build +RUN apt-get update \ + && apt-get install -y curl +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "arm64" ]; then\ + arch="aarch_64"; \ + elif [ "${arch}" = "amd64" ]; then\ + arch="x86_64"; \ + fi; \ + echo "${arch}"; \ + curl -fsSL -o protoc-gen-grpc-java https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.78.0/protoc-gen-grpc-java-1.78.0-linux-${arch}.exe + +FROM gcr.io/distroless/cc-debian12:latest@sha256:0c8eac8ea42a167255d03c3ba6dfad2989c15427ed93d16c53ef9706ea4691df AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java . +USER nobody +ENTRYPOINT [ "/protoc-gen-grpc-java" ] diff --git a/plugins/grpc/java/v1.78.0/buf.plugin.yaml b/plugins/grpc/java/v1.78.0/buf.plugin.yaml new file mode 100644 index 000000000..ad6143524 --- /dev/null +++ b/plugins/grpc/java/v1.78.0/buf.plugin.yaml @@ -0,0 +1,30 @@ +version: v1 +name: buf.build/grpc/java +plugin_version: v1.78.0 +source_url: https://github.com/grpc/grpc-java +integration_guide_url: https://grpc.io/docs/languages/java/quickstart +description: Generates Java client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/protocolbuffers/java:v33.1 +output_languages: + - java +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc-java/blob/v1.78.0/LICENSE +registry: + maven: + deps: + - io.grpc:grpc-core:1.78.0 + - io.grpc:grpc-protobuf:1.78.0 + - io.grpc:grpc-stub:1.78.0 + # Add direct dependency on newer protobuf as gRPC is still on 3.25.8 + - com.google.protobuf:protobuf-java:4.33.1 + additional_runtimes: + - name: lite + deps: + - io.grpc:grpc-core:1.78.0 + - io.grpc:grpc-protobuf-lite:1.78.0 + - io.grpc:grpc-stub:1.78.0 + # Add direct dependency on newer protobuf as gRPC is still on 3.25.8 + - com.google.protobuf:protobuf-javalite:4.33.1 + - build.buf:protobuf-javalite:4.33.1 + opts: [lite] diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/eliza/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/eliza/plugin.sum new file mode 100644 index 000000000..658a1f486 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:ahYFqpPHMnachoqX6Yk0SotLzlj0yapI2Xp/XZRXXsU= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/petapis/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/petapis/plugin.sum new file mode 100644 index 000000000..c52d1665c --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v4.0.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:FkCBHJVO5OXtB/8jIL2NzJMn+moZxY7X79PzvZl0gCo= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/eliza/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/eliza/plugin.sum new file mode 100644 index 000000000..6da1e6be7 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:Slb+7dRN645afl1eNA52uH+HrOqAM9Wn4uLs/veutrs= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/petapis/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/petapis/plugin.sum new file mode 100644 index 000000000..5ee173b38 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy/v4.0.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:0CMKf6WEsDHPG1YXmzGYc4vTeiwNZmHLyH7TgQ0x9bU= diff --git a/tests/testdata/buf.build/connectrpc/python/v0.7.0/eliza/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.7.0/eliza/plugin.sum new file mode 100644 index 000000000..24697993c --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.7.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:fLPygPdFF1wtq9lx5AmwmpvZesff1KvivY4hzaINgb4= diff --git a/tests/testdata/buf.build/connectrpc/python/v0.7.0/petapis/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.7.0/petapis/plugin.sum new file mode 100644 index 000000000..c2cdb510b --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.7.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:y7oRa12IUFf3recjy0BCv23EQ+I5g/s4/3nLp0EZ6Vc= diff --git a/tests/testdata/buf.build/grpc/java/v1.78.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/java/v1.78.0/eliza/plugin.sum new file mode 100644 index 000000000..6b03336c8 --- /dev/null +++ b/tests/testdata/buf.build/grpc/java/v1.78.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:abVqnZfKuwUcrLQyb+Lu2QqyVxyEnfIosZqrc8Lv/f0= diff --git a/tests/testdata/buf.build/grpc/java/v1.78.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/java/v1.78.0/petapis/plugin.sum new file mode 100644 index 000000000..a771e8f16 --- /dev/null +++ b/tests/testdata/buf.build/grpc/java/v1.78.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:LtrVq0lTE5qfsjeZj2BqKoPibzJpnzDsSY/jO/SrmoY=