Skip to content

Commit 5acdf63

Browse files
Update bufbuild/es plugin (#1936)
New plugin versions found. Please review. Co-authored-by: pkwarren <[email protected]>
1 parent cd52935 commit 5acdf63

File tree

7 files changed

+647
-0
lines changed

7 files changed

+647
-0
lines changed
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.15
2+
FROM node:22.18.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:8d54996fc549a9f6d8af41e0540ecf7ee75f31189e788a738cfcbf2f58903404 AS node
11+
12+
FROM gcr.io/distroless/cc-debian12:latest@sha256:aa435f48941dbbd18b4a1f3f71992a3afddc6fb913beb411cd4c0fb174e0bfb8 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" ]
Lines changed: 20 additions & 0 deletions
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.6.3
4+
source_url: https://github.com/bufbuild/protobuf-es
5+
integration_guide_url: https://github.com/bufbuild/protobuf-es#quickstart
6+
description: Types for TypeScript/JavaScript for use in web browsers and Node.js. Generates message and enum types, but also services for use with Connect v2.
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.6.3
19+
spdx_license_id: Apache-2.0
20+
license_url: https://github.com/bufbuild/protobuf-es/blob/v2.6.3/LICENSE

0 commit comments

Comments
 (0)