@aptre/common 0.12.6 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +3 -3
- package/dist/example/example_pb.d.ts +5 -12
- package/dist/example/example_pb.js +9 -41
- package/dist/example/other/other_pb.d.ts +4 -11
- package/dist/example/other/other_pb.js +9 -35
- package/go.mod +2 -9
- package/go.mod.tools +5 -2
- package/go.sum +4 -14
- package/go.sum.tools +4 -4
- package/package.json +5 -5
package/Makefile
CHANGED
|
@@ -90,10 +90,10 @@ genproto: protodeps
|
|
|
90
90
|
--plugin=./node_modules/.bin/protoc-gen-es-starpc \
|
|
91
91
|
--go-lite_out=$${OUT} \
|
|
92
92
|
--go-lite_opt=features=$(GO_LITE_OPT_FEATURES) \
|
|
93
|
+
--es-lite_out=$${OUT} \
|
|
94
|
+
--es-lite_opt target=ts \
|
|
95
|
+
--es-lite_opt ts_nocheck=false \
|
|
93
96
|
--go-starpc_out=$${OUT} \
|
|
94
|
-
--es_out=$${OUT} \
|
|
95
|
-
--es_opt target=ts \
|
|
96
|
-
--es_opt ts_nocheck=false \
|
|
97
97
|
--es-starpc_out=$${OUT} \
|
|
98
98
|
--es-starpc_opt target=ts \
|
|
99
99
|
--es-starpc_opt ts_nocheck=false \
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Message, proto3 } from '@bufbuild/protobuf';
|
|
1
|
+
import { Message, MessageType } from '@aptre/protobuf-es-lite';
|
|
3
2
|
import { OtherMsg } from './other/other_pb.js';
|
|
3
|
+
export declare const protobufPackage = "example";
|
|
4
4
|
/**
|
|
5
5
|
* ExampleMsg is an example message.
|
|
6
6
|
*
|
|
7
7
|
* @generated from message example.ExampleMsg
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export interface ExampleMsg extends Message<ExampleMsg> {
|
|
10
10
|
/**
|
|
11
11
|
* ExampleField is an example field.
|
|
12
12
|
*
|
|
@@ -18,13 +18,6 @@ export declare class ExampleMsg extends Message<ExampleMsg> {
|
|
|
18
18
|
*
|
|
19
19
|
* @generated from field: example.other.OtherMsg other_msg = 2;
|
|
20
20
|
*/
|
|
21
|
-
otherMsg
|
|
22
|
-
constructor(data?: PartialMessage<ExampleMsg>);
|
|
23
|
-
static readonly runtime: typeof proto3;
|
|
24
|
-
static readonly typeName = "example.ExampleMsg";
|
|
25
|
-
static readonly fields: FieldList;
|
|
26
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExampleMsg;
|
|
27
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExampleMsg;
|
|
28
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExampleMsg;
|
|
29
|
-
static equals(a: ExampleMsg | PlainMessage<ExampleMsg> | undefined, b: ExampleMsg | PlainMessage<ExampleMsg> | undefined): boolean;
|
|
21
|
+
otherMsg: OtherMsg;
|
|
30
22
|
}
|
|
23
|
+
export declare const ExampleMsg: MessageType<ExampleMsg>;
|
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
// @generated by protoc-gen-es
|
|
1
|
+
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
|
|
2
2
|
// @generated from file github.com/aperturerobotics/common/example/example.proto (package example, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
import {
|
|
4
|
+
import { createMessageType, } from '@aptre/protobuf-es-lite';
|
|
5
5
|
import { OtherMsg } from './other/other_pb.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export class ExampleMsg extends Message {
|
|
12
|
-
/**
|
|
13
|
-
* ExampleField is an example field.
|
|
14
|
-
*
|
|
15
|
-
* @generated from field: string example_field = 1;
|
|
16
|
-
*/
|
|
17
|
-
exampleField = '';
|
|
18
|
-
/**
|
|
19
|
-
* OtherMsg is an example of an imported message field.
|
|
20
|
-
*
|
|
21
|
-
* @generated from field: example.other.OtherMsg other_msg = 2;
|
|
22
|
-
*/
|
|
23
|
-
otherMsg;
|
|
24
|
-
constructor(data) {
|
|
25
|
-
super();
|
|
26
|
-
proto3.util.initPartial(data, this);
|
|
27
|
-
}
|
|
28
|
-
static runtime = proto3;
|
|
29
|
-
static typeName = 'example.ExampleMsg';
|
|
30
|
-
static fields = proto3.util.newFieldList(() => [
|
|
6
|
+
export const protobufPackage = 'example';
|
|
7
|
+
export const ExampleMsg = createMessageType({
|
|
8
|
+
typeName: 'example.ExampleMsg',
|
|
9
|
+
fields: [
|
|
31
10
|
{
|
|
32
11
|
no: 1,
|
|
33
12
|
name: 'example_field',
|
|
@@ -35,17 +14,6 @@ export class ExampleMsg extends Message {
|
|
|
35
14
|
T: 9 /* ScalarType.STRING */,
|
|
36
15
|
},
|
|
37
16
|
{ no: 2, name: 'other_msg', kind: 'message', T: OtherMsg },
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
static fromJson(jsonValue, options) {
|
|
43
|
-
return new ExampleMsg().fromJson(jsonValue, options);
|
|
44
|
-
}
|
|
45
|
-
static fromJsonString(jsonString, options) {
|
|
46
|
-
return new ExampleMsg().fromJsonString(jsonString, options);
|
|
47
|
-
}
|
|
48
|
-
static equals(a, b) {
|
|
49
|
-
return proto3.util.equals(ExampleMsg, a, b);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
17
|
+
],
|
|
18
|
+
packedByDefault: true,
|
|
19
|
+
});
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Message, MessageType } from '@aptre/protobuf-es-lite';
|
|
2
|
+
export declare const protobufPackage = "example.other";
|
|
3
3
|
/**
|
|
4
4
|
* OtherMsg is a different message from ExampleMsg.
|
|
5
5
|
*
|
|
6
6
|
* @generated from message example.other.OtherMsg
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export interface OtherMsg extends Message<OtherMsg> {
|
|
9
9
|
/**
|
|
10
10
|
* FooField is an example field.
|
|
11
11
|
*
|
|
12
12
|
* @generated from field: uint32 foo_field = 1;
|
|
13
13
|
*/
|
|
14
14
|
fooField: number;
|
|
15
|
-
constructor(data?: PartialMessage<OtherMsg>);
|
|
16
|
-
static readonly runtime: typeof proto3;
|
|
17
|
-
static readonly typeName = "example.other.OtherMsg";
|
|
18
|
-
static readonly fields: FieldList;
|
|
19
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OtherMsg;
|
|
20
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OtherMsg;
|
|
21
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OtherMsg;
|
|
22
|
-
static equals(a: OtherMsg | PlainMessage<OtherMsg> | undefined, b: OtherMsg | PlainMessage<OtherMsg> | undefined): boolean;
|
|
23
15
|
}
|
|
16
|
+
export declare const OtherMsg: MessageType<OtherMsg>;
|
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
// @generated by protoc-gen-es
|
|
1
|
+
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
|
|
2
2
|
// @generated from file github.com/aperturerobotics/common/example/other/other.proto (package example.other, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
export class OtherMsg extends Message {
|
|
11
|
-
/**
|
|
12
|
-
* FooField is an example field.
|
|
13
|
-
*
|
|
14
|
-
* @generated from field: uint32 foo_field = 1;
|
|
15
|
-
*/
|
|
16
|
-
fooField = 0;
|
|
17
|
-
constructor(data) {
|
|
18
|
-
super();
|
|
19
|
-
proto3.util.initPartial(data, this);
|
|
20
|
-
}
|
|
21
|
-
static runtime = proto3;
|
|
22
|
-
static typeName = 'example.other.OtherMsg';
|
|
23
|
-
static fields = proto3.util.newFieldList(() => [
|
|
4
|
+
import { createMessageType, } from '@aptre/protobuf-es-lite';
|
|
5
|
+
export const protobufPackage = 'example.other';
|
|
6
|
+
export const OtherMsg = createMessageType({
|
|
7
|
+
typeName: 'example.other.OtherMsg',
|
|
8
|
+
fields: [
|
|
24
9
|
{ no: 1, name: 'foo_field', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
static fromJson(jsonValue, options) {
|
|
30
|
-
return new OtherMsg().fromJson(jsonValue, options);
|
|
31
|
-
}
|
|
32
|
-
static fromJsonString(jsonString, options) {
|
|
33
|
-
return new OtherMsg().fromJsonString(jsonString, options);
|
|
34
|
-
}
|
|
35
|
-
static equals(a, b) {
|
|
36
|
-
return proto3.util.equals(OtherMsg, a, b);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
10
|
+
],
|
|
11
|
+
packedByDefault: true,
|
|
12
|
+
});
|
package/go.mod
CHANGED
|
@@ -4,13 +4,6 @@ go 1.22
|
|
|
4
4
|
|
|
5
5
|
toolchain go1.22.2
|
|
6
6
|
|
|
7
|
-
require
|
|
8
|
-
github.com/aperturerobotics/protobuf-go-lite v0.5.0 // latest
|
|
9
|
-
github.com/pkg/errors v0.9.1
|
|
10
|
-
)
|
|
7
|
+
require github.com/aperturerobotics/protobuf-go-lite v0.6.0 // latest
|
|
11
8
|
|
|
12
|
-
require
|
|
13
|
-
github.com/json-iterator/go v1.1.12 // indirect
|
|
14
|
-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
|
|
15
|
-
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
16
|
-
)
|
|
9
|
+
require github.com/aperturerobotics/json-iterator-lite v1.0.0 // indirect
|
package/go.mod.tools
CHANGED
|
@@ -10,8 +10,11 @@ replace (
|
|
|
10
10
|
|
|
11
11
|
require (
|
|
12
12
|
github.com/aperturerobotics/goprotowrap v0.3.1 // latest
|
|
13
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
14
|
-
github.com/aperturerobotics/starpc v0.31.
|
|
13
|
+
github.com/aperturerobotics/protobuf-go-lite v0.6.0 // latest
|
|
14
|
+
github.com/aperturerobotics/starpc v0.31.6 // latest
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
require (
|
|
15
18
|
github.com/golangci/golangci-lint v1.57.2 // latest
|
|
16
19
|
github.com/goreleaser/goreleaser v1.25.1 // latest
|
|
17
20
|
github.com/psampaz/go-mod-outdated v0.9.0 // latest
|
package/go.sum
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
github.com/aperturerobotics/
|
|
2
|
-
github.com/aperturerobotics/
|
|
3
|
-
github.com/
|
|
1
|
+
github.com/aperturerobotics/json-iterator-lite v1.0.0 h1:cihbrYWoK/S2RYXhJLpDZd+GUjVvFJN+D3w1VOqqHRI=
|
|
2
|
+
github.com/aperturerobotics/json-iterator-lite v1.0.0/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
|
|
3
|
+
github.com/aperturerobotics/protobuf-go-lite v0.6.0 h1:EE168e2oov6wmDv8AdSAlz2G1nHbf0HlYG917CgJ+ug=
|
|
4
|
+
github.com/aperturerobotics/protobuf-go-lite v0.6.0/go.mod h1:6Bp+C+fI1uh0NmIKpxlxyHMkKtCP9Kb3PHkhOzxG4B8=
|
|
4
5
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
5
6
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
6
7
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
|
7
8
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
|
8
|
-
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
9
|
-
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
|
10
|
-
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
|
11
|
-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
|
12
|
-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
13
|
-
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
|
14
|
-
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
|
15
|
-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|
16
|
-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
17
9
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
18
10
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
19
|
-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
20
|
-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
21
11
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
|
22
12
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
|
23
13
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
package/go.sum.tools
CHANGED
|
@@ -164,10 +164,10 @@ github.com/aperturerobotics/goprotowrap v0.3.1 h1:nFCWZ4QNQEzpsgCN1mVWLDVTF/Jm0h
|
|
|
164
164
|
github.com/aperturerobotics/goprotowrap v0.3.1/go.mod h1:5tRlYsb4VF0ySzx2/My3u9PtzTWNu5o2bqYHj0TRw+U=
|
|
165
165
|
github.com/aperturerobotics/protobuf-go v1.33.1-0.20240411062030-e36f75e0a3b8 h1:Juij9Gj5jVOJjqiu3EGHWnX9nH6fkBeGGu/3U8i5qss=
|
|
166
166
|
github.com/aperturerobotics/protobuf-go v1.33.1-0.20240411062030-e36f75e0a3b8/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
|
167
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
168
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
169
|
-
github.com/aperturerobotics/starpc v0.31.
|
|
170
|
-
github.com/aperturerobotics/starpc v0.31.
|
|
167
|
+
github.com/aperturerobotics/protobuf-go-lite v0.6.0 h1:EE168e2oov6wmDv8AdSAlz2G1nHbf0HlYG917CgJ+ug=
|
|
168
|
+
github.com/aperturerobotics/protobuf-go-lite v0.6.0/go.mod h1:6Bp+C+fI1uh0NmIKpxlxyHMkKtCP9Kb3PHkhOzxG4B8=
|
|
169
|
+
github.com/aperturerobotics/starpc v0.31.6 h1:zcgk/2w/lovbYqzw3F6vhvFnpBiA/yrbLKveuj764jg=
|
|
170
|
+
github.com/aperturerobotics/starpc v0.31.6/go.mod h1:lGcxghKLFAfwNNH8Es+bVv6nV95XHmIM1tokNt2FMiY=
|
|
171
171
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
|
172
172
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
|
173
173
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptre/common",
|
|
3
3
|
"description": "Common project configuration files and dependencies.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Aperture Robotics LLC.",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"clean": "rimraf ./dist",
|
|
37
37
|
"check": "npm run typecheck",
|
|
38
38
|
"typecheck": "tsc --noEmit",
|
|
39
|
-
"deps": "depcheck --ignores bufferutil,esbuild,starpc,rimraf
|
|
39
|
+
"deps": "depcheck --ignores bufferutil,esbuild,starpc,rimraf,pre-commit",
|
|
40
40
|
"codegen": "npm run gen",
|
|
41
41
|
"ci": "npm run build && npm run lint:js && npm run lint:go",
|
|
42
42
|
"format": "npm run format:go && npm run format:js && npm run format:config",
|
|
@@ -52,11 +52,10 @@
|
|
|
52
52
|
"lint": "npm run lint:go && npm run lint:js",
|
|
53
53
|
"lint:go": "make lint",
|
|
54
54
|
"lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.js ./",
|
|
55
|
-
"prepare": "go mod vendor",
|
|
55
|
+
"prepare": "go mod vendor && bash embed.bash",
|
|
56
56
|
"precommit": "npm run gen"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@bufbuild/protoc-gen-es": "^1.8.0",
|
|
60
59
|
"depcheck": "^1.4.6",
|
|
61
60
|
"pre-commit": "^1.2.2",
|
|
62
61
|
"prettier": "^3.0.3",
|
|
@@ -64,6 +63,7 @@
|
|
|
64
63
|
"typescript": "^5.4.5"
|
|
65
64
|
},
|
|
66
65
|
"dependencies": {
|
|
66
|
+
"@aptre/protobuf-es-lite": "^0.1.2",
|
|
67
67
|
"@bufbuild/protobuf": "^1.8.0",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
69
69
|
"@typescript-eslint/parser": "^7.7.0",
|
|
@@ -71,6 +71,6 @@
|
|
|
71
71
|
"eslint-config-prettier": "^9.0.0",
|
|
72
72
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
73
73
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
74
|
-
"starpc": "^0.31.
|
|
74
|
+
"starpc": "^0.31.6"
|
|
75
75
|
}
|
|
76
76
|
}
|