-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mercari and connectrpc/es plugin (#1543)
- Loading branch information
1 parent
7ed0fae
commit 24fb3dc
Showing
13 changed files
with
597 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
plugins/community/mercari-grpc-federation/v1.6.0/.dockerignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
16 changes: 16 additions & 0 deletions
16
plugins/community/mercari-grpc-federation/v1.6.0/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# syntax=docker/dockerfile:1.10 | ||
FROM --platform=$BUILDPLATFORM golang:1.23.2-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" -trimpath github.com/mercari/grpc-federation/cmd/[email protected] \ | ||
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true | ||
|
||
FROM scratch | ||
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd | ||
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation . | ||
ENV GOROOT / | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-grpc-federation" ] |
10 changes: 10 additions & 0 deletions
10
plugins/community/mercari-grpc-federation/v1.6.0/buf.plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1 | ||
name: buf.build/community/mercari-grpc-federation | ||
plugin_version: v1.6.0 | ||
source_url: https://github.com/mercari/grpc-federation | ||
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md | ||
description: Generates a gRPC server by writing a custom option in Protocol Buffers | ||
output_languages: | ||
- go | ||
spdx_license_id: MIT | ||
license_url: https://github.com/mercari/grpc-federation/blob/v1.6.0/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!package*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# syntax=docker/dockerfile:1.10 | ||
FROM node:22.9.0-bookworm AS build | ||
WORKDIR /app | ||
COPY --link package*.json . | ||
RUN npm ci \ | ||
&& find node_modules/typescript ! -name 'typescript.js' ! -name 'package.json' -type f -exec rm -f {} + \ | ||
&& find node_modules/typescript -depth -type d -empty -delete \ | ||
&& ./node_modules/.bin/esbuild ./node_modules/.bin/protoc-gen-connect-es --bundle --external:typescript --platform=node --outfile=protoc-gen-connect-es.js | ||
|
||
FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:d7ccebdf7617f225aa511c4a0e9c3bff2a8a65b22f8032ca982193d5a52c8ee9 AS node | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:3310655aac0d85eb9d579792387af1ff3eb7a1667823478be58020ab0e0d97a8 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node | ||
COPY --link --from=build --chmod=0755 /app/protoc-gen-connect-es.js /app/protoc-gen-connect-es.js | ||
COPY --link --from=build /app/node_modules/typescript /app/node_modules/typescript | ||
USER nobody | ||
ENTRYPOINT ["/nodejs/bin/node"] | ||
CMD [ "/app/protoc-gen-connect-es.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1 | ||
name: buf.build/connectrpc/es | ||
plugin_version: v1.6.0 | ||
source_url: https://github.com/connectrpc/connect-es | ||
integration_guide_url: https://connectrpc.com/docs/web/getting-started | ||
description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. | ||
deps: | ||
- plugin: buf.build/bufbuild/es:v1.10.0 | ||
output_languages: | ||
- javascript | ||
- typescript | ||
registry: | ||
npm: | ||
import_style: module | ||
rewrite_import_path_suffix: connect.js | ||
deps: | ||
- package: '@connectrpc/connect' | ||
version: ^1.6.0 | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/connectrpc/connect-es/blob/v1.6.0/LICENSE |
Oops, something went wrong.