Skip to content

Commit

Permalink
Update knit-ts, grpc-gateway, and openapiv2 plugins (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
app-token-plugins[bot] authored Jan 30, 2024
1 parent 548d426 commit 7cc8d33
Show file tree
Hide file tree
Showing 19 changed files with 584 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.5/.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/knit-ts/v0.0.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.4
FROM node:20.11.0-alpine3.19 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-knit-ts/bin/protoc-gen-knit-ts

FROM gcr.io/distroless/nodejs20-debian12:latest@sha256:c63fbd00d837baee8160c764124f9f33a9bea2b38e0c4d6306453e43ac6bf443
COPY --link --from=build /app /app
USER nobody
ENTRYPOINT [ "/app/node_modules/.bin/protoc-gen-knit-ts" ]
14 changes: 14 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.5/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: v1
name: buf.build/bufbuild/knit-ts
plugin_version: v0.0.5
source_url: https://github.com/bufbuild/knit-ts
integration_guide_url: https://github.com/bufbuild/knit-ts#quick-example
description: Generates Knit schemas needed to use the Knit client in web browsers and Node.js.
output_languages:
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: knit.js
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/knit-ts/blob/v0.0.5/LICENSE
93 changes: 93 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.5/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/knit-ts/v0.0.5/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "plugins-bufbuild-knit-ts",
"version": "0.0.5",
"dependencies": {
"@bufbuild/protoc-gen-knit-ts": "0.0.5"
}
}
3 changes: 3 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.19.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!separate_pkg_additional_imports.patch
18 changes: 18 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.19.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1.4
FROM golang:1.21.6-bookworm AS build

WORKDIR /tmp
RUN git clone --depth 1 --branch v2.19.1 https://github.com/grpc-ecosystem/grpc-gateway.git
COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway
RUN git apply /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 \
go build -ldflags "-s -w" -trimpath

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /tmp/grpc-gateway/protoc-gen-grpc-gateway .
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
22 changes: 22 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.19.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: v1
name: buf.build/grpc-ecosystem/gateway
plugin_version: v2.19.1
source_url: https://github.com/grpc-ecosystem/grpc-gateway
integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
output_languages:
- go
registry:
go:
deps:
- module: github.com/grpc-ecosystem/grpc-gateway/v2
version: v2.19.1
opts:
- paths=source_relative
- standalone=true
- separate_package=true
deps:
- plugin: buf.build/protocolbuffers/go:v1.32.0
- plugin: buf.build/grpc/go:v1.3.0
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.19.1/LICENSE.txt
Loading

0 comments on commit 7cc8d33

Please sign in to comment.