Skip to content

Commit

Permalink
fix: improvements to protobuf-es-lite
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Apr 29, 2024
1 parent d34a57a commit 00236d1
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 150 deletions.
32 changes: 32 additions & 0 deletions example/example.pb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/template/example/example.proto (package example, syntax proto3)
/* eslint-disable */

import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
import { createMessageType, Message } from "@aptre/protobuf-es-lite";

export const protobufPackage = "example";

/**
* EchoMsg is the message body for Echo.
*
* @generated from message example.EchoMsg
*/
export type EchoMsg = Message<{
/**
* @generated from field: string body = 1;
*/
body?: string;

}>;

export const EchoMsg: MessageType<EchoMsg> = createMessageType(
{
typeName: "example.EchoMsg",
fields: [
{ no: 1, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
] as readonly PartialFieldInfo[],
packedByDefault: true,
},
);

32 changes: 0 additions & 32 deletions example/example_pb.ts

This file was deleted.

2 changes: 1 addition & 1 deletion example/example_srpc.pb.go

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

5 changes: 2 additions & 3 deletions example/example_srpc.pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// @generated from file github.com/aperturerobotics/template/example/example.proto (package example, syntax proto3)
/* eslint-disable */

import { EchoMsg } from './example_pb.js'
import { MethodKind } from '@bufbuild/protobuf'
import { Message } from '@aptre/protobuf-es-lite'
import { EchoMsg } from './example.pb.js'
import { Message, MethodKind } from '@aptre/protobuf-es-lite'
import {
buildDecodeMessageTransform,
buildEncodeMessageTransform,
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ module github.com/aperturerobotics/template
go 1.22

require (
github.com/aperturerobotics/common v0.14.5 // latest
github.com/aperturerobotics/common v0.14.7-0.20240429195033-5fbd0311ba9d // latest
github.com/aperturerobotics/protobuf-go-lite v0.6.0 // latest
github.com/aperturerobotics/starpc v0.31.11 // latest
github.com/aperturerobotics/starpc v0.31.12 // latest
)

require github.com/pkg/errors v0.9.1 // indirect

require (
github.com/aperturerobotics/json-iterator-lite v1.0.0 // indirect
github.com/aperturerobotics/util v1.21.0 // indirect
github.com/aperturerobotics/util v1.21.3 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
github.com/aperturerobotics/common v0.14.5 h1:AWqFH56z9c7TvFiMQdS04OYk2BX4egzQHzFA6SP0GN8=
github.com/aperturerobotics/common v0.14.5/go.mod h1:MkCLl9iUXglujvO9wAbrZ9bm72mesXaAq288HGnzshA=
github.com/aperturerobotics/common v0.14.7-0.20240429195033-5fbd0311ba9d h1:6+HXnQdqXDpbl0037LrK2VWLz1mPEcuHIWGu54Ve+nE=
github.com/aperturerobotics/common v0.14.7-0.20240429195033-5fbd0311ba9d/go.mod h1:MkCLl9iUXglujvO9wAbrZ9bm72mesXaAq288HGnzshA=
github.com/aperturerobotics/json-iterator-lite v1.0.0 h1:cihbrYWoK/S2RYXhJLpDZd+GUjVvFJN+D3w1VOqqHRI=
github.com/aperturerobotics/json-iterator-lite v1.0.0/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
github.com/aperturerobotics/protobuf-go-lite v0.6.0 h1:EE168e2oov6wmDv8AdSAlz2G1nHbf0HlYG917CgJ+ug=
github.com/aperturerobotics/protobuf-go-lite v0.6.0/go.mod h1:6Bp+C+fI1uh0NmIKpxlxyHMkKtCP9Kb3PHkhOzxG4B8=
github.com/aperturerobotics/starpc v0.31.11 h1:iBMI66ur4J4GBB4IrsNAYehxbeEZHrkfVoCzxgyUhpw=
github.com/aperturerobotics/starpc v0.31.11/go.mod h1:roNNOXrqxQmmj8gnBDzXNFJN/cvORApXNHRfaPApHAo=
github.com/aperturerobotics/util v1.21.0 h1:T0jGm1BJya9OjYTUubJThlCeFdMYkXVe3tCB6Aw3u6k=
github.com/aperturerobotics/util v1.21.0/go.mod h1:recS+Q4YvyWXlJUSSkixLkf+AHxGcjNKHwebDbN0WiI=
github.com/aperturerobotics/starpc v0.31.12 h1:Kpa5/NdTxKPMtIaJkW9ZevX0nOj4yi02wqpgC2JKArc=
github.com/aperturerobotics/starpc v0.31.12/go.mod h1:EhZN09QG2fwCtpmZhVAqpl0I+2Mvu8vEBVR7lbIs5mc=
github.com/aperturerobotics/util v1.21.3 h1:Leg1xpgA6u7rGORjfndlInJkkGoJ2bqQxudym5tsIwY=
github.com/aperturerobotics/util v1.21.3/go.mod h1:pqLfG1F49Z+b9GVavx7RTAyTfkhaj4BZrEvTSuCg8xo=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"repository": {
"url": "git+ssh://[email protected]/aperturerobotics/template.git"
},
"type": "module",
"scripts": {
"build": "tsc --project tsconfig.json --noEmit false --module ES6 --target es2022 --outDir ./dist/",
"build": "tsc --project tsconfig.json --noEmit false --outDir ./dist/",
"check": "npm run typecheck",
"typecheck": "tsc --noEmit",
"deps": "depcheck --ignore-patterns=.eslintrc.js,package.json --ignores depcheck,prettier,typescript,starpc,@aptre/protobuf-es-lite,@aperturerobotics/ts-common,@go/github.com",
Expand All @@ -41,14 +42,13 @@
"precommit": "npm run format"
},
"devDependencies": {
"@aptre/common": "^0.14.5",
"@aptre/common": "^0.14.6",
"depcheck": "^1.4.7",
"prettier": "^3.2.5",
"typescript": "^5.1.6"
},
"dependencies": {
"@aptre/protobuf-es-lite": "^0.2.7",
"@bufbuild/protobuf": "^1.9.0",
"starpc": "^0.31.11"
"@aptre/protobuf-es-lite": "^0.2.14",
"starpc": "^0.31.12"
}
}
Loading

0 comments on commit 00236d1

Please sign in to comment.