-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from join-com/new-generator
New TS generator: Part 1
- Loading branch information
Showing
13 changed files
with
2,190 additions
and
1,467 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,32 @@ | ||
version: 2.1 | ||
|
||
docker-auth: &docker-auth | ||
auth: | ||
username: ${DOCKER_LOGIN} | ||
password: ${DOCKER_PASSWORD} | ||
|
||
commands: | ||
install_protoc: | ||
description: Install protobuf's protoc generator | ||
steps: | ||
- run: | ||
command: sudo apt install -y protobuf-compiler | ||
do_all: | ||
description: Compile & test protoc-gen-ts | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install test dependencies | ||
command: cd ./integrationTests && yarn | ||
- run: | ||
name: Compile & Run Tests | ||
command: cd ./integrationTests && yarn all | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/golang:1.16-node | ||
<<: *docker-auth | ||
steps: | ||
- install_protoc | ||
- do_all |
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,12 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.go] | ||
indent_size = 4 | ||
|
||
[*.{js,json,ts}] | ||
indent_size = 2 |
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,2 @@ | ||
dist/ | ||
node_modules/ |
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,5 @@ | ||
{ | ||
"recommendations": [ | ||
"golang.go" | ||
] | ||
} |
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,16 @@ | ||
{ | ||
"files.autoSave": "afterDelay", | ||
"editor.formatOnSave": true, | ||
"[go]": { | ||
"editor.tabSize": 4 | ||
}, | ||
"[javascript]": { | ||
"editor.tabSize": 2 | ||
}, | ||
"[typescript]": { | ||
"editor.tabSize": 2 | ||
}, | ||
"[json]": { | ||
"editor.tabSize": 2 | ||
} | ||
} |
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 @@ | ||
#!/bin/sh | ||
|
||
go build -o ./dist/protoc-gen-ts |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/join-com/protoc-gen-ts | ||
|
||
go 1.14 | ||
go 1.16 | ||
|
||
require github.com/golang/protobuf v1.3.4 | ||
require github.com/golang/protobuf v1.4.3 |
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 |
---|---|---|
@@ -1,2 +1,18 @@ | ||
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk= | ||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= | ||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= | ||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= | ||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= | ||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= | ||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= | ||
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= | ||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= | ||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= | ||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= | ||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= | ||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= | ||
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= | ||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
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
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 |
---|---|---|
@@ -1,31 +1,32 @@ | ||
{ | ||
"name": "itegrationTests", | ||
"version": "1.0.0", | ||
"description": "tests for protoc-gen-ts", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "jest --runInBand --forceExit", | ||
"proto:prettier": "prettier --write '__tests__/generated/**/*.ts'", | ||
"all": "yarn compile && yarn proto:build && yarn test", | ||
"compile": "cd .. && ./build.sh", | ||
"proto:build": "yarn proto:clean && yarn proto:generate && yarn proto:prettier", | ||
"proto:clean": "find __tests__/generated ! -name 'tslint.json' ! -name '.prettierrc' -type f -exec rm -f {} +", | ||
"proto:build": "yarn proto:clean && protoc __tests__/proto/*.proto -I __tests__/proto --ts_out=/$PWD/__tests__/generated && yarn proto:prettier" | ||
"proto:generate": "export PATH=\"${PWD}/../dist:${PATH}\" && protoc __tests__/proto/*.proto -I __tests__/proto --ts_out=/${PWD}/__tests__/generated", | ||
"proto:prettier": "prettier --write '__tests__/generated/**/*.ts'", | ||
"test": "export PATH=\"${PWD}/../dist:${PATH}\" && jest --runInBand --forceExit" | ||
}, | ||
"dependencies": { | ||
"@join-com/gcloud-logger-trace": "^0.1.6", | ||
"@join-com/grpc-ts": "2.0.0", | ||
"@join-com/grpc-ts": "^2.0.2", | ||
"grpc": "^1.24.2", | ||
"protobufjs": "^6.8.8" | ||
"protobufjs": "^6.10.2" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^25.1.3", | ||
"@types/node": "^13.7.7", | ||
"jest": "^25.1.0", | ||
"@types/jest": "^26.0.20", | ||
"@types/node": "^14.14.35", | ||
"jest": "^26.6.3", | ||
"jest-extended": "^0.11.5", | ||
"jest-watch-typeahead": "^0.4.2", | ||
"prettier": "^1.19.1", | ||
"ts-jest": "^25.2.1", | ||
"tslint": "^6.0.0", | ||
"ts-jest": "^26.5.3", | ||
"tslint": "^6.1.3", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "3.8.3" | ||
"typescript": "^4.2.3" | ||
} | ||
} |
Oops, something went wrong.