Skip to content

Commit b747f71

Browse files
Update bufbuild/es, grpc-gateway, and openapiv2 plugins (#1567)
1 parent d4a9276 commit b747f71

File tree

19 files changed

+1436
-0
lines changed

19 files changed

+1436
-0
lines changed
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!package*.json

plugins/bufbuild/es/v2.2.2/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# syntax=docker/dockerfile:1.10
2+
FROM node:22.11.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-es --bundle --external:typescript --platform=node --outfile=protoc-gen-es.js
9+
10+
FROM gcr.io/distroless/nodejs22-debian12:latest@sha256:f71f4b7976f952df9c72b4d2ce82e09f0f57d398a25c0c3ebd63557e973f1ee7 AS node
11+
12+
FROM gcr.io/distroless/cc-debian12:latest@sha256:6f05aba4de16e89f8d879bf2a1364de3e41aba04f1dcbba8c75494f6134b4b13 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-es.js /app/protoc-gen-es.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-es.js" ]
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: v1
2+
name: buf.build/bufbuild/es
3+
plugin_version: v2.2.2
4+
source_url: https://github.com/bufbuild/protobuf-es
5+
integration_guide_url: https://github.com/bufbuild/protobuf-es#quickstart
6+
description: Base types for TypeScript/JavaScript for use in web browsers and Node.js. Generates message and enum types.
7+
output_languages:
8+
- javascript
9+
- typescript
10+
registry:
11+
opts:
12+
- import_extension=js
13+
npm:
14+
import_style: module
15+
rewrite_import_path_suffix: pb.js
16+
deps:
17+
- package: '@bufbuild/protobuf'
18+
version: ^2.2.2
19+
spdx_license_id: Apache-2.0
20+
license_url: https://github.com/bufbuild/protobuf-es/blob/v2.2.2/LICENSE

0 commit comments

Comments
 (0)