Skip to content

Commit

Permalink
Upgrade mercari/grpc-federation and connect-query plugins (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
app-token-plugins[bot] authored Dec 16, 2024
1 parent 4ab74f0 commit 56a8d4d
Show file tree
Hide file tree
Showing 13 changed files with 626 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
16 changes: 16 additions & 0 deletions plugins/community/mercari-grpc-federation/v1.7.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.12
FROM --platform=$BUILDPLATFORM golang:1.23.4-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 plugins/community/mercari-grpc-federation/v1.7.1/buf.plugin.yaml
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.7.1
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.7.1/LICENSE
3 changes: 3 additions & 0 deletions plugins/connectrpc/query-es/v2.0.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!package*.json
21 changes: 21 additions & 0 deletions plugins/connectrpc/query-es/v2.0.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.12
FROM node:22.12.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-query --bundle --external:typescript --platform=node --outfile=protoc-gen-connect-query.js

FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:b2811d7945a1f3ef91cf8a2ead779171b438eb0011f3bdee0c8cc60cb90b2c0c AS node

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 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-query.js /app/protoc-gen-connect-query.js
COPY --link --from=build /app/node_modules/typescript /app/node_modules/typescript
USER nobody
ENTRYPOINT ["/nodejs/bin/node"]
CMD [ "/app/protoc-gen-connect-query.js" ]
22 changes: 22 additions & 0 deletions plugins/connectrpc/query-es/v2.0.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: v1
name: buf.build/connectrpc/query-es
plugin_version: v2.0.1
source_url: https://github.com/connectrpc/connect-query-es
integration_guide_url: https://connectrpc.com/docs/web/query/getting-started
description: Generates stubs for calling Connect RPCs with TanStack Query.
deps:
- plugin: buf.build/bufbuild/es:v2.2.3
output_languages:
- javascript
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: connectquery.js
deps:
- package: '@connectrpc/connect-query'
version: ^2.0.1
- package: '@bufbuild/protobuf'
version: ^2.2.3
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-query-es/blob/v2.0.1/LICENSE
Loading

0 comments on commit 56a8d4d

Please sign in to comment.