Skip to content

Commit

Permalink
Add connect-query v0.1.0 plugin (#330)
Browse files Browse the repository at this point in the history
Create a plugin for bufbuild/connect-query.

Fixes #328.
  • Loading branch information
pkwarren authored Jan 26, 2023
1 parent 5ec9931 commit 9a39c82
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/bufbuild/connect-query/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source:
npm_registry:
name: "@bufbuild/protoc-gen-connect-query"
3 changes: 3 additions & 0 deletions plugins/bufbuild/connect-query/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!package*.json
11 changes: 11 additions & 0 deletions plugins/bufbuild/connect-query/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.4
FROM node:18.13.0-alpine3.17 AS build
WORKDIR /app
COPY --link package*.json .
RUN npm ci
RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/@bufbuild/protoc-gen-connect-query/bin/protoc-gen-connect-query

FROM gcr.io/distroless/nodejs18-debian11
COPY --link --from=build /app /app
USER nobody
ENTRYPOINT [ "/app/node_modules/.bin/protoc-gen-connect-query" ]
21 changes: 21 additions & 0 deletions plugins/bufbuild/connect-query/v0.1.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: v1
name: buf.build/bufbuild/connect-query
plugin_version: v0.1.0
source_url: https://github.com/bufbuild/connect-query
description: Generates client stubs for calling Connect services with TanStack Query.
deps:
- plugin: buf.build/bufbuild/es:v1.0.0
output_languages:
- javascript
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: connectquery.js
deps:
- package: '@bufbuild/connect-query'
version: ^0.1.0
- package: '@bufbuild/protobuf'
version: ^1.0.0
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/connect-query/blob/main/LICENSE
146 changes: 146 additions & 0 deletions plugins/bufbuild/connect-query/v0.1.0/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions plugins/bufbuild/connect-query/v0.1.0/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "plugins-bufbuild-connect-query",
"version": "1.0.0",
"dependencies": {
"@bufbuild/protoc-gen-connect-query": "0.1.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:38B4PIpgi0T3FvfVmQb8fxqiFiFG8JzhG4DSGuhATqA=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:n6eN1SBkxst5nQq8rwlcdXXBrlm17UiLnHi/xprHBUY=

0 comments on commit 9a39c82

Please sign in to comment.