Skip to content

Commit e453bcc

Browse files
Update bufbuild/es (#2031)
1 parent 7e8671c commit e453bcc

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.18
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-es --bundle --external:typescript --platform=node --outfile=protoc-gen-es.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-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.9.0
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.9.0
19+
spdx_license_id: Apache-2.0
20+
license_url: https://github.com/bufbuild/protobuf-es/blob/v2.9.0/LICENSE

0 commit comments

Comments
 (0)