diff --git a/plugins/community/stephenh-ts-proto/v2.11.2/.dockerignore b/plugins/community/stephenh-ts-proto/v2.11.2/.dockerignore new file mode 100644 index 000000000..771bbbaa9 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.11.2/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!package*.json diff --git a/plugins/community/stephenh-ts-proto/v2.11.2/Dockerfile b/plugins/community/stephenh-ts-proto/v2.11.2/Dockerfile new file mode 100644 index 000000000..2e0e7b36d --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.11.2/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.19 +FROM node:24.13.0-bookworm AS build +WORKDIR /app +COPY --link package*.json . +RUN npm ci +RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/ts-proto/protoc-gen-ts_proto \ + && rm -f /app/node_modules/dprint-node/*darwin*.node /app/node_modules/dprint-node/*win32*.node + +FROM gcr.io/distroless/nodejs24-debian12:latest@sha256:b35a10df56aa17825e81e836ff70fe3c27002809dd94e6bfd655ed05bac52230 AS node + +FROM gcr.io/distroless/cc-debian12:latest@sha256:72344f7f909a8bf003c67f55687e6d51a441b49661af8f660aa7b285f00e57df AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT ["/nodejs/bin/node"] +CMD [ "/app/node_modules/.bin/protoc-gen-ts_proto" ] diff --git a/plugins/community/stephenh-ts-proto/v2.11.2/buf.plugin.yaml b/plugins/community/stephenh-ts-proto/v2.11.2/buf.plugin.yaml new file mode 100644 index 000000000..d7b2024d5 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.11.2/buf.plugin.yaml @@ -0,0 +1,10 @@ +version: v1 +name: buf.build/community/stephenh-ts-proto +plugin_version: v2.11.2 +source_url: https://github.com/stephenh/ts-proto +integration_guide_url: https://github.com/stephenh/ts-proto#quickstart +description: An idiomatic protobuf generator for TypeScript. +output_languages: + - typescript +spdx_license_id: Apache-2.0 +license_url: https://github.com/stephenh/ts-proto/blob/v2.11.2/LICENSE diff --git a/plugins/community/stephenh-ts-proto/v2.11.2/package-lock.json b/plugins/community/stephenh-ts-proto/v2.11.2/package-lock.json new file mode 100644 index 000000000..a45f5e8eb --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.11.2/package-lock.json @@ -0,0 +1,87 @@ +{ + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "dependencies": { + "ts-proto": "2.11.2" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz", + "integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "license": "MIT", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/ts-poet": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.12.0.tgz", + "integrity": "sha512-xo+iRNMWqyvXpFTaOAvLPA5QAWO6TZrSUs5s4Odaya3epqofBu/fMLHEWl8jPmjhA0s9sgj9sNvF1BmaQlmQkA==", + "license": "Apache-2.0", + "dependencies": { + "dprint-node": "^1.0.8" + } + }, + "node_modules/ts-proto": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-2.11.2.tgz", + "integrity": "sha512-+bPq2zDwNtJHtuyu2fGYgvTDxS7cBcY4u4moO1LyFA+my144Mfj9/sbNyGXKMtBK7DNXVGf76puwGa6hPzJw/g==", + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.10.2", + "case-anything": "^2.1.13", + "ts-poet": "^6.12.0", + "ts-proto-descriptors": "2.1.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-2.1.0.tgz", + "integrity": "sha512-S5EZYEQ6L9KLFfjSRpZWDIXDV/W7tAj8uW7pLsihIxyr62EAVSiKuVPwE8iWnr849Bqa53enex1jhDUcpgquzA==", + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0" + } + } + } +} diff --git a/plugins/community/stephenh-ts-proto/v2.11.2/package.json b/plugins/community/stephenh-ts-proto/v2.11.2/package.json new file mode 100644 index 000000000..7594e1e28 --- /dev/null +++ b/plugins/community/stephenh-ts-proto/v2.11.2/package.json @@ -0,0 +1,7 @@ +{ + "name": "plugins-stephenh-ts-proto", + "version": "1.0.0", + "dependencies": { + "ts-proto": "2.11.2" + } +} diff --git a/plugins/community/sudorandom-connect-openapi/v0.25.0/.dockerignore b/plugins/community/sudorandom-connect-openapi/v0.25.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/community/sudorandom-connect-openapi/v0.25.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/community/sudorandom-connect-openapi/v0.25.0/Dockerfile b/plugins/community/sudorandom-connect-openapi/v0.25.0/Dockerfile new file mode 100644 index 000000000..a3ef7d421 --- /dev/null +++ b/plugins/community/sudorandom-connect-openapi/v0.25.0/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.19 +FROM --platform=$BUILDPLATFORM golang:1.25.6-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +RUN --mount=type=cache,target=/go/pkg/mod \ + go install -ldflags "-s -w" -tags remote_plugin -trimpath github.com/sudorandom/protoc-gen-connect-openapi@v0.25.0 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-connect-openapi /go/bin/protoc-gen-connect-openapi || true + +FROM scratch +COPY --from=build --link /etc/passwd /etc/passwd +COPY --from=build --link --chown=root:root /go/bin/protoc-gen-connect-openapi . +USER nobody +ENTRYPOINT [ "/protoc-gen-connect-openapi" ] diff --git a/plugins/community/sudorandom-connect-openapi/v0.25.0/buf.plugin.yaml b/plugins/community/sudorandom-connect-openapi/v0.25.0/buf.plugin.yaml new file mode 100644 index 000000000..138b30b98 --- /dev/null +++ b/plugins/community/sudorandom-connect-openapi/v0.25.0/buf.plugin.yaml @@ -0,0 +1,7 @@ +version: v1 +name: buf.build/community/sudorandom-connect-openapi +plugin_version: v0.25.0 +source_url: https://github.com/sudorandom/protoc-gen-connect-openapi +description: Plugin for generating OpenAPIv3 from Protobufs matching the Connect RPC interface. +spdx_license_id: MIT +license_url: https://github.com/sudorandom/protoc-gen-connect-openapi/blob/v0.25.0/LICENSE diff --git a/plugins/grpc/go/v1.6.1/.dockerignore b/plugins/grpc/go/v1.6.1/.dockerignore new file mode 100644 index 000000000..7feaa9bd3 --- /dev/null +++ b/plugins/grpc/go/v1.6.1/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!separate-package.patch diff --git a/plugins/grpc/go/v1.6.1/Dockerfile b/plugins/grpc/go/v1.6.1/Dockerfile new file mode 100644 index 000000000..8e6e665e7 --- /dev/null +++ b/plugins/grpc/go/v1.6.1/Dockerfile @@ -0,0 +1,20 @@ +# syntax=docker/dockerfile:1.19 +FROM --platform=$BUILDPLATFORM golang:1.25.6-bookworm AS build + +ARG TARGETOS TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH + +WORKDIR /tmp +RUN git clone --depth 1 --branch cmd/protoc-gen-go-grpc/v1.6.1 https://github.com/grpc/grpc-go.git +WORKDIR /tmp/grpc-go +COPY separate-package.patch /tmp/grpc-go +RUN git apply separate-package.patch +WORKDIR /tmp/grpc-go/cmd/protoc-gen-go-grpc +RUN --mount=type=cache,target=/go/pkg/mod \ + go build -o protoc-gen-go-grpc -ldflags "-s -w" -trimpath + +FROM scratch +COPY --from=build --link /etc/passwd /etc/passwd +COPY --from=build --link --chown=root:root /tmp/grpc-go/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc . +USER nobody +ENTRYPOINT [ "/protoc-gen-go-grpc" ] diff --git a/plugins/grpc/go/v1.6.1/buf.plugin.yaml b/plugins/grpc/go/v1.6.1/buf.plugin.yaml new file mode 100644 index 000000000..b438113b9 --- /dev/null +++ b/plugins/grpc/go/v1.6.1/buf.plugin.yaml @@ -0,0 +1,22 @@ +version: v1 +name: buf.build/grpc/go +plugin_version: v1.6.1 +source_url: https://github.com/grpc/grpc-go +integration_guide_url: https://grpc.io/docs/languages/go/quickstart +description: Generates Go client and server stubs for the gRPC framework. +output_languages: + - go +deps: + - plugin: buf.build/protocolbuffers/go:v1.36.11 +registry: + go: + min_version: "1.24" + deps: + - module: google.golang.org/grpc + version: v1.78.0 + opts: + - paths=source_relative + - require_unimplemented_servers=false + - separate_package=true +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc-go/blob/v1.6.1/LICENSE diff --git a/plugins/grpc/go/v1.6.1/separate-package.patch b/plugins/grpc/go/v1.6.1/separate-package.patch new file mode 100644 index 000000000..1d32aa2aa --- /dev/null +++ b/plugins/grpc/go/v1.6.1/separate-package.patch @@ -0,0 +1,62 @@ +diff --git a/cmd/protoc-gen-go-grpc/grpc.go b/cmd/protoc-gen-go-grpc/grpc.go +index abc21602..7d9dd638 100644 +--- a/cmd/protoc-gen-go-grpc/grpc.go ++++ b/cmd/protoc-gen-go-grpc/grpc.go +@@ -20,6 +20,7 @@ package main + + import ( + "fmt" ++ "path" + "strconv" + "strings" + +@@ -136,8 +137,27 @@ func generateFile(gen *protogen.Plugin, file *protogen.File) *protogen.Generated + if len(file.Services) == 0 { + return nil + } +- filename := file.GeneratedFilenamePrefix + "_grpc.pb.go" +- g := gen.NewGeneratedFile(filename, file.GoImportPath) ++ var g *protogen.GeneratedFile ++ if !*separatePackage { ++ filename := file.GeneratedFilenamePrefix + "_grpc.pb.go" ++ g = gen.NewGeneratedFile(filename, file.GoImportPath) ++ } else { ++ file.GoPackageName += "grpc" ++ dir := path.Dir(file.GeneratedFilenamePrefix) ++ base := path.Base(file.GeneratedFilenamePrefix) ++ file.GeneratedFilenamePrefix = path.Join( ++ dir, ++ string(file.GoPackageName), ++ base, ++ ) ++ g = gen.NewGeneratedFile( ++ file.GeneratedFilenamePrefix+"_grpc.pb.go", ++ protogen.GoImportPath(path.Join( ++ string(file.GoImportPath), ++ string(file.GoPackageName), ++ )), ++ ) ++ } + // Attach all comments associated with the syntax field. + genLeadingComments(g, file.Desc.SourceLocations().ByPath(protoreflect.SourcePath{fileDescriptorProtoSyntaxFieldNumber})) + g.P("// Code generated by protoc-gen-go-grpc. DO NOT EDIT.") +diff --git a/cmd/protoc-gen-go-grpc/main.go b/cmd/protoc-gen-go-grpc/main.go +index 183ba697..d0e1be60 100644 +--- a/cmd/protoc-gen-go-grpc/main.go ++++ b/cmd/protoc-gen-go-grpc/main.go +@@ -46,6 +46,7 @@ const version = "1.5.1" + + var requireUnimplemented *bool + var useGenericStreams *bool ++var separatePackage *bool + + func main() { + showVersion := flag.Bool("version", false, "print the version and exit") +@@ -57,6 +58,7 @@ func main() { + + var flags flag.FlagSet + requireUnimplemented = flags.Bool("require_unimplemented_servers", true, "set to false to match legacy behavior") ++ separatePackage = flags.Bool("separate_package", false, "set to true to write generated files to a separate grpc package") + useGenericStreams = flags.Bool("use_generic_streams_experimental", true, "set to true to use generic types for streaming client and server objects; this flag is EXPERIMENTAL and may be changed or removed in a future release") + + protogen.Options{ diff --git a/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/eliza/plugin.sum b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/eliza/plugin.sum new file mode 100644 index 000000000..8f922d664 --- /dev/null +++ b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/eliza/plugin.sum @@ -0,0 +1 @@ +h1:Z0aXs/8ZO+Y+QV9gaH8mQIUEROA+k70gn/O8WWqLlt4= diff --git a/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/petapis/plugin.sum b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/petapis/plugin.sum new file mode 100644 index 000000000..664331a23 --- /dev/null +++ b/tests/testdata/buf.build/community/stephenh-ts-proto/v2.11.2/petapis/plugin.sum @@ -0,0 +1 @@ +h1:LdcEcGX6qsyH/fvZ9k/Zu+gcalk4Y1r+69ZUNd+QU8o= diff --git a/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/eliza/plugin.sum b/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/eliza/plugin.sum new file mode 100644 index 000000000..b2078df64 --- /dev/null +++ b/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:bfGIUhYwyjEaVR7OEPgI7au+mx+AM7kC8eo+1ET+VTM= diff --git a/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/petapis/plugin.sum b/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/petapis/plugin.sum new file mode 100644 index 000000000..00e6d40b1 --- /dev/null +++ b/tests/testdata/buf.build/community/sudorandom-connect-openapi/v0.25.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:tXvqQAI2yeM8+7VlRR4LY5WOPVz6elhwUNQjC7wJpeM= diff --git a/tests/testdata/buf.build/grpc/go/v1.6.1/eliza/plugin.sum b/tests/testdata/buf.build/grpc/go/v1.6.1/eliza/plugin.sum new file mode 100644 index 000000000..2c38ac2f1 --- /dev/null +++ b/tests/testdata/buf.build/grpc/go/v1.6.1/eliza/plugin.sum @@ -0,0 +1 @@ +h1:AIxYa2nGzzQeMmwDHgYvmEzp/Opzw2EM+m51jiFVBWY= diff --git a/tests/testdata/buf.build/grpc/go/v1.6.1/petapis/plugin.sum b/tests/testdata/buf.build/grpc/go/v1.6.1/petapis/plugin.sum new file mode 100644 index 000000000..0785ad3e3 --- /dev/null +++ b/tests/testdata/buf.build/grpc/go/v1.6.1/petapis/plugin.sum @@ -0,0 +1 @@ +h1:patjPRnmkG4+EZY3hSwmL2MibWRCWlEOUXzYqC1rP8k=