Skip to content

Commit

Permalink
Add connectrpc/query-es v2.0.0 (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman authored and smaye81 committed Nov 26, 2024
1 parent 10ad6cd commit c3d99d8
Show file tree
Hide file tree
Showing 8 changed files with 596 additions and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/connectrpc/query-es/v1.4.2/buf.plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: buf.build/connectrpc/query-es
plugin_version: v1.4.2
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. This plugin is for Connect-ES v1. For Connect-ES v2, you'll only need the bufbuild/es plugin.
description: Generates client stubs for calling Connect services with TanStack Query.
deps:
- plugin: buf.build/bufbuild/es:v1.10.0
output_languages:
Expand All @@ -20,4 +20,3 @@ registry:
version: ^v1.10.0
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-query-es/blob/v1.4.2/LICENSE
deprecated: true
3 changes: 3 additions & 0 deletions plugins/connectrpc/query-es/v2.0.0/.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.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.10
FROM node:22.11.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:c218f62198d07fc67e36fff5639985f29b1bdcf04a601c1d23c0ab1121f55f0b AS node

FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 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.0/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.0
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.2
output_languages:
- javascript
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: connectquery.js
deps:
- package: '@connectrpc/connect-query'
version: ^2.0.0
- package: '@bufbuild/protobuf'
version: ^2.2.2
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-query-es/blob/v2.0.0/LICENSE
Loading

0 comments on commit c3d99d8

Please sign in to comment.