Skip to content

Commit 34183b7

Browse files
Update connectrpc/query-es (#2013)
1 parent 50244f6 commit 34183b7

7 files changed

Lines changed: 651 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!package*.json
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# syntax=docker/dockerfile:1.17
2+
FROM node:22.19.0-bookworm AS build
3+
WORKDIR /app
4+
COPY --link package*.json .
5+
RUN npm ci \
6+
&& find node_modules/typescript ! -name 'typescript.js' ! -name 'package.json' -type f -exec rm -f {} + \
7+
&& find node_modules/typescript -depth -type d -empty -delete \
8+
&& ./node_modules/.bin/esbuild ./node_modules/.bin/protoc-gen-connect-query --bundle --external:typescript --platform=node --outfile=protoc-gen-connect-query.js
9+
10+
FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:3732180ba4a39101bd95b7105ef0c47526c197d6c29c6d48f7059a647a4064a5 AS node
11+
12+
FROM gcr.io/distroless/cc-debian12:latest@sha256:620d8b11ae800f0dbd7995f89ddc5344ad603269ea98770588b1b07a4a0a6872 AS base
13+
14+
FROM scratch
15+
COPY --link --from=base / /
16+
COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node
17+
COPY --link --from=build --chmod=0755 /app/protoc-gen-connect-query.js /app/protoc-gen-connect-query.js
18+
COPY --link --from=build /app/node_modules/typescript /app/node_modules/typescript
19+
USER nobody
20+
ENTRYPOINT ["/nodejs/bin/node"]
21+
CMD [ "/app/protoc-gen-connect-query.js" ]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: v1
2+
name: buf.build/connectrpc/query-es
3+
plugin_version: v2.2.0
4+
source_url: https://github.com/connectrpc/connect-query-es
5+
integration_guide_url: https://connectrpc.com/docs/web/query/getting-started
6+
description: Generates stubs for calling Connect RPCs with TanStack Query.
7+
deps:
8+
- plugin: buf.build/bufbuild/es:v2.7.0
9+
output_languages:
10+
- javascript
11+
- typescript
12+
registry:
13+
opts:
14+
- import_extension=js
15+
npm:
16+
import_style: module
17+
rewrite_import_path_suffix: connectquery.js
18+
deps:
19+
- package: '@connectrpc/connect-query'
20+
version: ^2.2.0
21+
- package: '@bufbuild/protobuf'
22+
version: ^2.7.0
23+
spdx_license_id: Apache-2.0
24+
license_url: https://github.com/connectrpc/connect-query-es/blob/v2.2.0/LICENSE

0 commit comments

Comments
 (0)