Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protoc and query-es plugins #1252

Merged
merged 4 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/connectrpc/query-es/v1.4.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/v1.4.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.7
FROM node:20.13.1-alpine3.19 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/nodejs20-debian12:latest@sha256:36b2247bda45163fff0cfef127806d8c7661648ceb27b1c255eb987df3388551 AS node

FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 AS base

FROM scratch
COPY --link --from=base / /
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated plugins to squash layers.

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/v1.4.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: v1.4.1
source_url: https://github.com/connectrpc/connect-query-es
integration_guide_url: https://connectrpc.com/docs/web/query/getting-started
description: Generates client stubs for calling Connect services with TanStack Query.
deps:
- plugin: buf.build/bufbuild/es:v1.9.0
output_languages:
- javascript
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: connectquery.js
deps:
- package: '@connectrpc/connect-query'
version: ^1.4.1
- package: '@bufbuild/protobuf'
version: ^v1.9.0
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-query-es/blob/v1.4.1/LICENSE
Loading