Skip to content

Commit

Permalink
Remove rpc/js as it is now in TypeScript SDK (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels authored Oct 8, 2024
1 parent 598a0ed commit 9fe6e1e
Show file tree
Hide file tree
Showing 69 changed files with 15 additions and 20,641 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ jobs:
with:
version: "21.x"

- name: Install protoc-gen-js and plugins
run: npm install -g protoc-gen-js protoc-gen-grpc-web

- name: Set main env vars
if: github.event_name != 'pull_request_target'
run: |
Expand Down Expand Up @@ -88,17 +85,6 @@ jobs:
exit 1
fi
- name: Test js library
run: CI=true make test-web

- if: failure()
name: Upload js test report
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: rpc/examples/echo/playwright-report
retention-days: 30

- name: Test go library
env:
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
Expand Down
31 changes: 5 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ setup-cert:
setup-priv-key:
cd etc && bash ./setup_priv_key.sh

build: build-web build-go
build: build-go

build-go: buf-go
go build ./...

build-web: buf-web
export NODE_OPTIONS=--openssl-legacy-provider && node --version 2>/dev/null || unset NODE_OPTIONS;\
cd rpc/js && npm install && npm run build && \
cd ../examples/echo/frontend && npm install && npm run build && \
cd ../../fileupload/frontend && npm install && npm run build

tool-install:
GOBIN=`pwd`/$(TOOL_BIN) go install google.golang.org/protobuf/cmd/protoc-gen-go \
github.com/bufbuild/buf/cmd/buf \
Expand All @@ -34,22 +28,13 @@ tool-install:
github.com/axw/gocov/gocov \
gotest.tools/gotestsum

buf: buf-go buf-web
buf: buf-go

buf-go: tool-install
PATH=$(PATH_WITH_TOOLS) buf lint
PATH=$(PATH_WITH_TOOLS) buf generate

buf-web: tool-install
npm install
PATH=$(PATH_WITH_TOOLS) buf lint
PATH=$(PATH_WITH_TOOLS) buf generate --template ./etc/buf.web.gen.yaml
PATH=$(PATH_WITH_TOOLS) buf generate --template ./etc/buf.web.gen.yaml buf.build/googleapis/googleapis

lint: tool-install lint-go lint-web

lint-web:
cd rpc/js && npm install && npm run lint && npm run format
lint: tool-install lint-go

lint-go: tool-install
PATH=$(PATH_WITH_TOOLS) buf lint
Expand All @@ -59,18 +44,12 @@ lint-go: tool-install
cover: tool-install
PATH=$(PATH_WITH_TOOLS) ./etc/test.bash cover

test: test-go test-web
test: test-go

test-go: tool-install
PATH=$(PATH_WITH_TOOLS) ./etc/test.bash

test-web:
$(MAKE) -C rpc/examples/echo test-run-server

# examples

example-echo/%: build-web
example-echo/%:
$(MAKE) -C rpc/examples/echo $*

example-fileupload/%: build-web
$(MAKE) -C rpc/examples/fileupload $*
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This is a set of go utilities you can use via importing `go.viam.com/utils`.

This library includes examples that demonstrate grpc functionality for a variety of contexts - see links for more information:
* [echo](https://github.com/viamrobotics/goutils/blob/main/rpc/examples/echo/README.md)
* [fileupload](https://github.com/viamrobotics/goutils/blob/main/rpc/examples/fileupload/README.md)

As a convenience, you can run the `make` recipes for these examples from the root of this repository via:
```
Expand All @@ -24,15 +23,6 @@ For example, try running a simple echo server with:
make example-echo/run-server
```

### Automated Web Browser Tests

You can web browser tests locally with the following commands:

```
make build-web # one time step
make test-web
```

## Windows Support

Windows 10 22H2 and up.
Expand Down
5 changes: 0 additions & 5 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ deps:
- buf.build/googleapis/googleapis:62f35d8aed1149c291d606d958a7ce32
build:
excludes:
- node_modules
- rpc/examples/echo/frontend/node_modules
- rpc/examples/echo/node-client/node_modules
- rpc/examples/fileupload/frontend/node_modules
- rpc/js/node_modules
- vendor
breaking:
use:
Expand Down
8 changes: 0 additions & 8 deletions etc/buf.web.gen.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion etc/setup_cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ if [[ -f "localhost/cert.pem" && -f "localhost/key.pem" ]]; then
exit 0;
fi
go install github.com/jsha/minica@latest
minica --domains "localhost,local,*.place.local,echo-server,echo-server-external,fileupload-server,fileupload-server-external"
minica --domains "localhost,local,*.place.local,echo-server,echo-server-external"
#TODO(GOUT-14): support linux
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain minica.pem
62 changes: 0 additions & 62 deletions package-lock.json

This file was deleted.

8 changes: 0 additions & 8 deletions package.json

This file was deleted.

Loading

0 comments on commit 9fe6e1e

Please sign in to comment.