starpc 0.41.2 → 0.42.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/README.md +7 -2
- package/go.mod +2 -4
- package/go.sum +2 -2
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# starpc
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/starpc)
|
|
4
|
+
[](https://github.com/aperturerobotics/starpc/actions)
|
|
3
5
|
[![GoDoc Widget]][GoDoc] [![Go Report Card Widget]][Go Report Card]
|
|
4
6
|
|
|
5
7
|
> Streaming Protobuf RPC with bidirectional streaming over any multiplexed transport.
|
|
@@ -46,17 +48,20 @@ git clone -b starpc https://github.com/aperturerobotics/protobuf-project
|
|
|
46
48
|
cd protobuf-project
|
|
47
49
|
|
|
48
50
|
# Install dependencies
|
|
51
|
+
npm install
|
|
49
52
|
yarn install
|
|
53
|
+
pnpm install
|
|
54
|
+
bun install
|
|
50
55
|
|
|
51
56
|
# Generate TypeScript and Go code
|
|
52
|
-
|
|
57
|
+
bun run gen
|
|
53
58
|
```
|
|
54
59
|
|
|
55
60
|
## Quick Start
|
|
56
61
|
|
|
57
62
|
1. Start with the [protobuf-project] template repository (starpc branch)
|
|
58
63
|
2. Add your .proto files to the project
|
|
59
|
-
3. Run `
|
|
64
|
+
3. Run `bun run gen` to generate TypeScript and Go code
|
|
60
65
|
4. Implement your services using the examples below
|
|
61
66
|
|
|
62
67
|
[protobuf-project]: https://github.com/aperturerobotics/protobuf-project/tree/starpc
|
package/go.mod
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
module github.com/aperturerobotics/starpc
|
|
2
2
|
|
|
3
|
-
go 1.
|
|
4
|
-
|
|
5
|
-
toolchain go1.24.6
|
|
3
|
+
go 1.25
|
|
6
4
|
|
|
7
5
|
replace (
|
|
8
6
|
// This fork uses go-protobuf-lite and adds post-quantum crypto support.
|
|
@@ -14,7 +12,7 @@ replace (
|
|
|
14
12
|
|
|
15
13
|
require (
|
|
16
14
|
github.com/aperturerobotics/protobuf-go-lite v0.11.0 // latest
|
|
17
|
-
github.com/aperturerobotics/util v1.
|
|
15
|
+
github.com/aperturerobotics/util v1.32.0 // latest
|
|
18
16
|
)
|
|
19
17
|
|
|
20
18
|
require (
|
package/go.sum
CHANGED
|
@@ -4,8 +4,8 @@ github.com/aperturerobotics/json-iterator-lite v1.0.1-0.20240713111131-be6bf89c3
|
|
|
4
4
|
github.com/aperturerobotics/json-iterator-lite v1.0.1-0.20240713111131-be6bf89c3008/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
|
|
5
5
|
github.com/aperturerobotics/protobuf-go-lite v0.11.0 h1:IAaZISqrEpodqECYxk0yKWgROEbZtMhs7bErP+Zma9o=
|
|
6
6
|
github.com/aperturerobotics/protobuf-go-lite v0.11.0/go.mod h1:c4kGy7Dkfz6B1m0t4QBIMQoNeQ7m+nYj3Qxxnlwhygo=
|
|
7
|
-
github.com/aperturerobotics/util v1.
|
|
8
|
-
github.com/aperturerobotics/util v1.
|
|
7
|
+
github.com/aperturerobotics/util v1.32.0 h1:6gIx5zt1/cOpyH5Wq+im3yNLnRncsfw9PupHNQsy8c0=
|
|
8
|
+
github.com/aperturerobotics/util v1.32.0/go.mod h1:Aufy+WeKncuhc1L2yEg+QxRhb8uVnGBprPyTubaDxLw=
|
|
9
9
|
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
|
|
10
10
|
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
|
11
11
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Streaming protobuf RPC service protocol over any two-way channel.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -63,26 +63,26 @@
|
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"clean": "rimraf ./dist",
|
|
66
|
-
"build": "
|
|
67
|
-
"check": "
|
|
68
|
-
"typecheck": "
|
|
66
|
+
"build": "bun run clean && tsc --project tsconfig.build.json --outDir ./dist/",
|
|
67
|
+
"check": "bun run typecheck",
|
|
68
|
+
"typecheck": "tsgo --noEmit",
|
|
69
69
|
"deps": "depcheck --ignores 'bufferutil,utf-8-validate,rimraf,starpc,@aptre/protobuf-es-lite,tsx'",
|
|
70
|
-
"codegen": "
|
|
71
|
-
"ci": "
|
|
72
|
-
"format": "
|
|
70
|
+
"codegen": "bun run gen",
|
|
71
|
+
"ci": "bun run build && bun run lint:js && bun run lint:go",
|
|
72
|
+
"format": "bun run format:go && bun run format:js && bun run format:config",
|
|
73
73
|
"format:config": "prettier --write tsconfig.json package.json",
|
|
74
74
|
"format:go": "make format",
|
|
75
75
|
"format:js": "prettier --write './{srpc,echo,e2e,integration,rpcstream,cmd}/**/(*.ts|*.tsx|*.html|*.css)'",
|
|
76
|
-
"gen": "rimraf ./tools/bin && cd ./tools && go mod tidy && cd ../ && go mod tidy && make genproto &&
|
|
77
|
-
"test": "
|
|
76
|
+
"gen": "rimraf ./tools/bin && cd ./tools && go mod tidy && cd ../ && go mod tidy && make genproto && bun run format",
|
|
77
|
+
"test": "bun run test:js && bun run test:go",
|
|
78
78
|
"test:go": "make test",
|
|
79
|
-
"build:e2e": "
|
|
79
|
+
"build:e2e": "bun run build && cd e2e && esbuild e2e.ts --sourcemap --outfile=e2e.cjs --bundle --platform=node",
|
|
80
80
|
"test:js": "vitest run",
|
|
81
81
|
"test:js:watch": "vitest",
|
|
82
|
-
"debug:js": "
|
|
82
|
+
"debug:js": "bun run build:e2e && cd e2e && node --inspect --inspect-brk ./e2e.cjs",
|
|
83
83
|
"test:integration": "make integration",
|
|
84
|
-
"integration": "
|
|
85
|
-
"lint": "
|
|
84
|
+
"integration": "bun run test:integration",
|
|
85
|
+
"lint": "bun run lint:go && bun run lint:js",
|
|
86
86
|
"lint:go": "make lint",
|
|
87
87
|
"lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.cjs --ignore-pattern *.js --ignore-pattern *.d.ts ./",
|
|
88
88
|
"prepare": "husky",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"release:minor": "npm run release:version:minor && npm run release:commit",
|
|
92
92
|
"release:version": "npm version patch -m \"release: v%s\" --no-git-tag-version",
|
|
93
93
|
"release:version:minor": "npm version minor -m \"release: v%s\" --no-git-tag-version",
|
|
94
|
-
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$
|
|
95
|
-
"release:publish": "git push && git push --tags
|
|
94
|
+
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\")",
|
|
95
|
+
"release:publish": "git push && git push --tags"
|
|
96
96
|
},
|
|
97
97
|
"preferUnplugged": true,
|
|
98
98
|
"lint-staged": {
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"rimraf": "^6.1.2",
|
|
114
114
|
"tsx": "^4.20.4",
|
|
115
115
|
"typescript": "^5.8.2",
|
|
116
|
+
"@typescript/native-preview": "^7.0.0-dev.20251226.1",
|
|
116
117
|
"vitest": "^4.0.14"
|
|
117
118
|
},
|
|
118
119
|
"dependencies": {
|