-
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.
[docs]: update documents and packages
- Loading branch information
Showing
21 changed files
with
5,444 additions
and
3,054 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Deploy Docs to Pages | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- docs/** | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: latest | ||
run_install: false | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.3.1 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build with VitePress | ||
run: | | ||
pnpm docs:build | ||
touch docs/.vitepress/dist/.nojekyll | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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 |
---|---|---|
|
@@ -25,3 +25,5 @@ target | |
**/*.rs.bk | ||
*.pdb | ||
Cargo.lock | ||
docs/.vitepress/cache | ||
docs/.vitepress/dist |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { defineConfig } from 'vitepress'; | ||
|
||
export default defineConfig({ | ||
title: '@grpc.ts', | ||
description: 'A wrapper of @grpc/grpc-js for a better typings.', | ||
srcDir: './src', | ||
base: '/@grpc.ts/', | ||
themeConfig: { | ||
nav: [ | ||
{ | ||
text: 'Guide', | ||
link: '/introduction/what-is-it', | ||
}, | ||
], | ||
sidebar: [ | ||
{ | ||
text: 'Introduction', | ||
items: [ | ||
{ | ||
text: 'What is AuthRails?', | ||
link: '/introduction/what-is-it', | ||
}, | ||
{ | ||
text: 'Getting Started', | ||
link: '/introduction/getting-started', | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'CLI', | ||
link: '/cli', | ||
}, | ||
{ | ||
text: 'Integration', | ||
items: [ | ||
{ | ||
text: 'NestJS', | ||
link: '/integration/nestjs', | ||
}, | ||
{ | ||
text: 'Fastify', | ||
link: '/integration/fastify', | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'API Reference', | ||
link: '/api-reference', | ||
}, | ||
{ | ||
text: 'Changelogs', | ||
link: '/changelogs', | ||
}, | ||
], | ||
outline: { | ||
level: 'deep', | ||
label: 'On this page', | ||
}, | ||
lastUpdated: { | ||
text: 'Last updated', | ||
formatOptions: { | ||
dateStyle: 'full', | ||
timeStyle: 'medium', | ||
}, | ||
}, | ||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/zgid123/grpc-ts' }, | ||
], | ||
}, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# API Reference | ||
|
||
All features of `@grpc.ts` | ||
|
||
## CLI | ||
|
||
### paths | ||
|
||
- Type: `string | string[] | undefined` | ||
- Default: `[]` | ||
- Required: `false` | ||
|
||
Path to folder contains proto files. | ||
|
||
```ts | ||
import type { IConfigProps } from '@grpc.ts/cli'; | ||
|
||
const config: IConfigProps = { | ||
paths: ['../proto/*.proto'], | ||
}; | ||
|
||
export default config; | ||
``` | ||
|
||
### external | ||
|
||
- Type: `string[] | undefined` | ||
- Default: `['google.protobuf']` | ||
- Required: `false` | ||
|
||
Third party data type. | ||
|
||
### output | ||
|
||
- Type: `string | undefined` | ||
- Default: `'protobufTypings'` | ||
- Required: `false` | ||
|
||
Path to folder where the typing files will be generated for TypeScript. | ||
|
||
```ts | ||
import type { IConfigProps } from '@grpc.ts/cli'; | ||
|
||
const config: IConfigProps = { | ||
output: './grpc-types', | ||
paths: './_protos/**/*.proto', | ||
}; | ||
|
||
export default config; | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,182 @@ | ||
# Changelogs | ||
|
||
## @grpc.ts/core | ||
|
||
### v1.1.5 | ||
|
||
- export `ServerCredentials` and `ChannelCredentials` from `@grpc/grpc-js` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.1.4...%40grpc.ts/core%401.1.5 | ||
|
||
### v1.1.4 | ||
|
||
- rework `UnaryCallback` type | ||
- do not call `callback` if `hofCallback` is called | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.1.3...%40grpc.ts/core%401.1.4 | ||
|
||
### v1.1.3 | ||
|
||
- public more info | ||
- pass `callback` to `implFunc` for `server` to respond error | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.1.2...%40grpc.ts/core%401.1.3 | ||
|
||
### v1.1.2 | ||
|
||
- fix `addUnaryHandler` for `server` to support add individual handler | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.1.1...%40grpc.ts/core%401.1.2 | ||
|
||
### v1.1.1 | ||
|
||
- export more info for usage with cli | ||
- fix `grpcTimestampToDate` logic | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.1.0...%40grpc.ts/core%401.1.1 | ||
|
||
### v1.1.0 | ||
|
||
- change `IGrpcClientProps` to `IGrpcClientWrapperProps` | ||
- change `IServerObjProps` to `IServerWrapperProps` | ||
- create some internal interfaces for other packages | ||
- export more info for other usages | ||
- keep tracking init service's method for server to fix issue for hot reloading (e.g. fastify with vite-node) | ||
- export `close` and `getPackages` method for client for other usages | ||
- create common helpers for server and client | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/core%401.0.0...%40grpc.ts/core%401.1.0 | ||
|
||
## @grpc.ts/cli | ||
|
||
### v1.1.0 | ||
|
||
- rework logic to support nested packages | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/cli%401.0.3...%40grpc.ts/cli%401.1.0 | ||
|
||
### v1.0.3 | ||
|
||
- export enum mapper to map number back to string value | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/cli%401.0.2...%40grpc.ts/cli%401.0.3 | ||
|
||
### v1.0.2 | ||
|
||
- export service name as const | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/cli%401.0.1...%40grpc.ts/cli%401.0.2 | ||
|
||
### v1.0.1 | ||
|
||
- support `google.protobuf.Empty` as `{}` in TypeScript | ||
- always import `Metadata`, `GrpcTimestamp`, `ServiceClient` from `@grpc.ts/core` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/cli%401.0.0...%40grpc.ts/cli%401.0.1 | ||
|
||
## @grpc.ts/fastify-client | ||
|
||
### v1.1.1 | ||
|
||
- export `ChannelCredentials` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-client%401.1.0...%40grpc.ts/fastify-client%401.1.1 | ||
|
||
### v1.1.0 | ||
|
||
- support array of options to init multiple clients at once | ||
- fix `onClose` hook | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-client%401.0.0...%40grpc.ts/fastify-client%401.1.0 | ||
|
||
## @grpc.ts/fastify-server | ||
|
||
### v1.1.4 | ||
|
||
- export `ServerCredentials` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-server%401.1.3...%40grpc.ts/fastify-server%401.1.4 | ||
|
||
### v1.1.3 | ||
|
||
- update core package and import `TUnaryCallback` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-server%401.1.2...%40grpc.ts/fastify-server%401.1.3 | ||
|
||
### v1.1.2 | ||
|
||
- public new info from core | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-server%401.1.1...%40grpc.ts/fastify-server%401.1.2 | ||
|
||
### v1.1.1 | ||
|
||
- fix type for usage with cli | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-server%401.1.0...%40grpc.ts/fastify-server%401.1.1 | ||
|
||
### v1.1.0 | ||
|
||
- support array of options to init multiple servers at once | ||
- fix `onClose` hook | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/fastify-server%401.0.0...%40grpc.ts/fastify-server%401.1.0 | ||
|
||
## @grpc.ts/nestjs-client | ||
|
||
### v1.0.4 | ||
|
||
- exports `grpcClientToken` for manual inject | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-client%401.0.3...%40grpc.ts/nestjs-client%401.0.4 | ||
|
||
### v1.0.3 | ||
|
||
- exports `status` from `grpc-js` for `client` side | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-client%401.0.2...%40grpc.ts/nestjs-client%401.0.3 | ||
|
||
### v1.0.2 | ||
|
||
- export `ChannelCredentials` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-client%401.0.1...%40grpc.ts/nestjs-client%401.0.2 | ||
|
||
### v1.0.1 | ||
|
||
- export more info | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-client%401.0.0...%40grpc.ts/nestjs-client%401.0.1 | ||
|
||
## @grpc.ts/nestjs-server | ||
|
||
### v1.0.5 | ||
|
||
- export `ServerCredentials` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-server%401.0.4...%40grpc.ts/nestjs-server%401.0.5 | ||
|
||
### v1.0.4 | ||
|
||
- update core package and import TUnaryCallback | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-server%401.0.3...%40grpc.ts/nestjs-server%401.0.4 | ||
|
||
### v1.0.3 | ||
|
||
- pass callback to nestjs server handler as 4th param | ||
- public new info from core package | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-server%401.0.2...%40grpc.ts/nestjs-server%401.0.3 | ||
|
||
### v1.0.2 | ||
|
||
- add `rxjs` to handle the message from `handleMessage` of `NestJS` when it is `observable` | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-server%401.0.1...%40grpc.ts/nestjs-server%401.0.2 | ||
|
||
### v1.0.1 | ||
|
||
- export more info | ||
|
||
**Full Changelog**: https://github.com/zgid123/grpc-ts/compare/%40grpc.ts/nestjs-server%401.0.0...%40grpc.ts/nestjs-server%401.0.1 |
Oops, something went wrong.