-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a61dfe
commit 413a0a5
Showing
7 changed files
with
566 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!package*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# syntax=docker/dockerfile:1.10 | ||
FROM node:20.17.0-bookworm AS build | ||
WORKDIR /app | ||
COPY --link package*.json . | ||
RUN npm ci \ | ||
&& find node_modules/typescript ! -name 'typescript.js' ! -name 'package.json' -type f -exec rm -f {} + \ | ||
&& find node_modules/typescript -depth -type d -empty -delete \ | ||
&& ./node_modules/.bin/esbuild ./node_modules/.bin/protoc-gen-connect-es --bundle --external:typescript --platform=node --outfile=protoc-gen-connect-es.js | ||
|
||
FROM gcr.io/distroless/nodejs20-debian12:latest@sha256:bdbbd3d1bb68ab13bcb075a8f38973acf2129892ac3daafbe96e0b6c66681296 AS node | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b6e1e913f633495eeb80a41e03de1a41aa863e9b19902309b180ffdc4b99db2c AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=node --chmod=0755 /nodejs/bin/node /nodejs/bin/node | ||
COPY --link --from=build --chmod=0755 /app/protoc-gen-connect-es.js /app/protoc-gen-connect-es.js | ||
COPY --link --from=build /app/node_modules/typescript /app/node_modules/typescript | ||
USER nobody | ||
ENTRYPOINT ["/nodejs/bin/node"] | ||
CMD [ "/app/protoc-gen-connect-es.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1 | ||
name: buf.build/connectrpc/es | ||
plugin_version: v1.5.0 | ||
source_url: https://github.com/connectrpc/connect-es | ||
integration_guide_url: https://connectrpc.com/docs/web/getting-started | ||
description: Generates code that is compatible with browsers and Node.js for working with Connect, gRPC, and gRPC-Web. | ||
deps: | ||
- plugin: buf.build/bufbuild/es:v1.10.0 | ||
output_languages: | ||
- javascript | ||
- typescript | ||
registry: | ||
npm: | ||
import_style: module | ||
rewrite_import_path_suffix: connect.js | ||
deps: | ||
- package: '@connectrpc/connect' | ||
version: ^1.5.0 | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/connectrpc/connect-es/blob/v1.5.0/LICENSE |
Oops, something went wrong.