-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deprecate and Delete grpc-es * Fix lint * Fix deps * Fix CI * Update README.md
- Loading branch information
Showing
91 changed files
with
174 additions
and
1,640 deletions.
There are no files selected for viewing
Binary file removed
BIN
-19.6 MB
.yarn/cache/@bufbuild-buf-darwin-arm64-npm-1.36.0-b82e567b99-10.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-18.5 MB
.yarn/cache/@bufbuild-buf-linux-aarch64-npm-1.36.0-c3d80a5d48-10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-22.3 KB
.yarn/cache/@bufbuild-protoc-gen-es-npm-1.10.0-b0efbb5fe3-e8add92c05.zip
Binary file not shown.
Binary file removed
BIN
-86.8 KB
.yarn/cache/@bufbuild-protoplugin-npm-1.10.0-5a209f9089-829a6d6407.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-115 KB
.yarn/cache/@connectrpc-connect-node-npm-1.4.0-215ee814b5-3b0647b3f2.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-14.5 KB
.yarn/cache/@connectrpc-protoc-gen-connect-es-npm-1.4.0-c96b7fd665-41aca6dd64.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
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
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,3 +1,3 @@ | ||
import crypto from 'crypto' | ||
import crypto from 'node:crypto' | ||
|
||
export const sha256 = (str: string): Buffer => crypto.createHash('sha256').update(str).digest() |
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
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
This file was deleted.
Oops, something went wrong.
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,52 +1,4 @@ | ||
# @kanziw/grpc-es | ||
|
||
[![npm version](https://img.shields.io/npm/v/@kanziw/grpc-es)](https://www.npmjs.com/package/@kanziw/grpc-es) | ||
[![license](https://img.shields.io/npm/l/@kanziw/grpc-es)](https://www.npmjs.com/package/@kanziw/grpc-es) | ||
[![npm downloads](https://img.shields.io/npm/dt/@kanziw/grpc-es)](https://www.npmjs.com/package/@kanziw/grpc-es) | ||
|
||
## GrpcEsServer | ||
|
||
with [example.proto](./example/proto/example/v1/example.proto), | ||
|
||
```typescript | ||
import { Code, ConnectError } from '@connectrpc/connect' | ||
import { GrpcEsServer, stdoutUnaryServerInterceptor } from '@kanziw/grpc-es/server' | ||
import { ExampleService } from './gen/example/v1/example_connect' | ||
|
||
const PORT = 8080 | ||
|
||
new GrpcEsServer({ jsonOptions: { useProtoFieldName: true } }) | ||
.use(stdoutUnaryServerInterceptor()) | ||
.register(ExampleService, { | ||
echo: (req) => ({ message: `you said: ${req.message}` }), | ||
add: (req) => { | ||
switch (req.args.case) { | ||
case 'int32Args': | ||
return { | ||
result: { | ||
case: 'int32Result', | ||
value: req.args.value.first + req.args.value.second, | ||
}, | ||
} | ||
case 'int64Args': | ||
return { | ||
result: { | ||
case: 'int64Result', | ||
value: req.args.value.first + req.args.value.second, | ||
}, | ||
} | ||
default: | ||
throw new ConnectError('no args', Code.InvalidArgument) | ||
} | ||
}, | ||
}) | ||
.listenAndServe(PORT) | ||
|
||
console.log(`🏃 Grpc Server is running on port ${PORT}`) | ||
``` | ||
|
||
### Limitations | ||
|
||
This project currently supports only "UnaryCall" in gRPC calls. Other gRPC call types, such as server streaming, client streaming, and bidirectional streaming, are not supported at this time. | ||
|
||
For more information, see the [documentation](https://connectrpc.com/docs/node/getting-started). | ||
> [!CAUTION] | ||
> DEPRECATED! Use [connect-node](https://www.npmjs.com/package/@connectrpc/connect-node) directry instead. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
packages/grpc-es/example/gen/example/v1/example_connect.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.