Skip to content

Commit

Permalink
Change TS compiler to ts-proto and nice-grpc for backwards compatibil…
Browse files Browse the repository at this point in the history
…ity (#2)
  • Loading branch information
binaryoverload authored Nov 24, 2024
1 parent 02373cb commit a1f8fe5
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 108 deletions.
13 changes: 8 additions & 5 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ plugins:
out: go
opt:
- paths=source_relative
- local: protoc-gen-ts
- local: protoc-gen-ts_proto
strategy: all
opt:
- eslint_disable
- output_javascript
- output_legacy_commonjs
- ts_nocheck
- outputServices=nice-grpc
- outputServices=generic-definitions
- useExactTypes=false
- esModuleInterop=true
- env=node
- forceLong=bigint
out: javascript
82 changes: 41 additions & 41 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,47 @@ lint:
- STANDARD
ignore:
# We ignore all the old files as these should remain unchanged
- protobufs\account\account_service.proto
- protobufs\account\exchange_token_for_user_data.proto
- protobufs\account\get_nex_data_rpc.proto
- protobufs\account\get_nex_password_rpc.proto
- protobufs\account\get_user_data_rpc.proto
- protobufs\account\mii.proto
- protobufs\account\pnid_permission_flags.proto
- protobufs\account\update_pnid_permissions.proto
- protobufs\api\api_service.proto
- protobufs\api\forgot_password_rpc.proto
- protobufs\api\get_user_data_rpc.proto
- protobufs\api\login_rpc.proto
- protobufs\api\mii.proto
- protobufs\api\register_rpc.proto
- protobufs\api\reset_password_rpc.proto
- protobufs\api\set_discord_connection_data_rpc.proto
- protobufs\api\set_stripe_connection_data_rpc.proto
- protobufs\api\update_user_data_rpc.proto
- protobufs\api\user_connections.proto
- protobufs\boss\boss_service.proto
- protobufs\boss\delete_file.proto
- protobufs\boss\delete_task.proto
- protobufs\boss\file.proto
- protobufs\boss\list_files.proto
- protobufs\boss\list_known_boss_apps.proto
- protobufs\boss\list_tasks.proto
- protobufs\boss\register_task.proto
- protobufs\boss\task.proto
- protobufs\boss\update_file_metadata.proto
- protobufs\boss\update_task.proto
- protobufs\boss\upload_file.proto
- protobufs\friends\accept_friend_request_rpc.proto
- protobufs\friends\deny_friend_request_rpc.proto
- protobufs\friends\friend_request.proto
- protobufs\friends\friends_service.proto
- protobufs\friends\get_user_friend_pids_rpc.proto
- protobufs\friends\get_user_friend_requests_incoming_rpc.proto
- protobufs\friends\send_user_friend_request_rpc.proto
- protobufs\friends\send_user_notification_wiiu_rpc.proto
- protobufs\miiverse\miiverse_service.proto
- protobufs\miiverse\smm_request_post_id_rpc.proto
- protobufs/account/account_service.proto
- protobufs/account/exchange_token_for_user_data.proto
- protobufs/account/get_nex_data_rpc.proto
- protobufs/account/get_nex_password_rpc.proto
- protobufs/account/get_user_data_rpc.proto
- protobufs/account/mii.proto
- protobufs/account/pnid_permission_flags.proto
- protobufs/account/update_pnid_permissions.proto
- protobufs/api/api_service.proto
- protobufs/api/forgot_password_rpc.proto
- protobufs/api/get_user_data_rpc.proto
- protobufs/api/login_rpc.proto
- protobufs/api/mii.proto
- protobufs/api/register_rpc.proto
- protobufs/api/reset_password_rpc.proto
- protobufs/api/set_discord_connection_data_rpc.proto
- protobufs/api/set_stripe_connection_data_rpc.proto
- protobufs/api/update_user_data_rpc.proto
- protobufs/api/user_connections.proto
- protobufs/boss/boss_service.proto
- protobufs/boss/delete_file.proto
- protobufs/boss/delete_task.proto
- protobufs/boss/file.proto
- protobufs/boss/list_files.proto
- protobufs/boss/list_known_boss_apps.proto
- protobufs/boss/list_tasks.proto
- protobufs/boss/register_task.proto
- protobufs/boss/task.proto
- protobufs/boss/update_file_metadata.proto
- protobufs/boss/update_task.proto
- protobufs/boss/upload_file.proto
- protobufs/friends/accept_friend_request_rpc.proto
- protobufs/friends/deny_friend_request_rpc.proto
- protobufs/friends/friend_request.proto
- protobufs/friends/friends_service.proto
- protobufs/friends/get_user_friend_pids_rpc.proto
- protobufs/friends/get_user_friend_requests_incoming_rpc.proto
- protobufs/friends/send_user_friend_request_rpc.proto
- protobufs/friends/send_user_notification_wiiu_rpc.proto
- protobufs/miiverse/miiverse_service.proto
- protobufs/miiverse/smm_request_post_id_rpc.proto
breaking:
use:
- FILE
163 changes: 107 additions & 56 deletions package-lock.json

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

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@pretendonetwork/grpc",
"version": "2.0.0",
"version": "2.0.1",
"license": "AGPL-3.0-only",
"scripts": {
"build": "npm-run-all clean generate copy:*",
"clean": "rimraf javascript go",
"generate": "buf generate",
"generate:debug": "buf generate --debug",
"generate": "buf generate && tsc",
"generate:debug": "buf generate --debug && tsc",
"copy:js": "copyfiles -f package.json README.md template/GENERATED_DO_NOT_EDIT.md javascript",
"copy:go": "copyfiles -f template/GENERATED_DO_NOT_EDIT.md template/go/* go",
"lint": "buf lint",
Expand All @@ -17,12 +17,15 @@
},
"devDependencies": {
"@bufbuild/buf": "^1.46.0",
"@protobuf-ts/plugin": "^2.9.4",
"@types/node": "^22.9.3",
"copyfiles": "^2.4.1",
"npm-run-all": "^4.1.5",
"rimraf": "^6.0.1"
"rimraf": "^6.0.1",
"ts-proto": "^2.3.0"
},
"dependencies": {
"@protobuf-ts/runtime": "^2.9.4"
"@bufbuild/protobuf": "^2.2.2",
"nice-grpc-common": "^2.0.2",
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit a1f8fe5

Please sign in to comment.