Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mains #1470

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

mains #1470

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/grpc-web.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions net/grpc/gateway/examples/echo/ts-example/Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'

tasks:

build:
cmds:
- rm -fr dist/ && task genpb-ts && npx tsc && esbuild dist/client.js --outfile=dist/main.js --bundle --minify --sourcemap

start-web:
cmds:
- python3 -m http.server 8081

start-servers:
cmds:
- cd $(git rev-parse --show-toplevel) && docker-compose pull prereqs node-server envoy
- cd $(git rev-parse --show-toplevel) && docker-compose up node-server envoy

genpb-cdts:
cmds:
- >
protoc -I=./ */**.proto \
--js_out=import_style=commonjs:. \
--grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
genpb-ts:
cmds:
- >
protoc -I=./ */**.proto \
--js_out=import_style=commonjs:. \
--grpc-web_out=import_style=typescript,mode=grpcwebtext:.
6 changes: 3 additions & 3 deletions net/grpc/gateway/examples/echo/ts-example/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import * as $ from 'jquery';

// Uncomment either one of the following:
// Option 1: import_style=commonjs+dts
import {EchoServiceClient} from './echo_grpc_web_pb';
// import {EchoServiceClient} from './echo_grpc_web_pb';

// Option 2: import_style=typescript
// import {EchoServiceClient} from './EchoServiceClientPb';
import {EchoServiceClient} from './protos/EchoServiceClientPb';

import {EchoRequest, EchoResponse, ServerStreamingEchoRequest, ServerStreamingEchoResponse} from './echo_pb';
import {EchoRequest, EchoResponse, ServerStreamingEchoRequest, ServerStreamingEchoResponse} from './protos/echo_pb';

class EchoApp {
static readonly INTERVAL = 500; // ms
Expand Down
Loading