Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinmichaelchen/some-protos-ts
TypeScript protobuf code auto-generated with Github Actions
https://github.com/kevinmichaelchen/some-protos-ts
Last synced: about 1 month ago
JSON representation
TypeScript protobuf code auto-generated with Github Actions
- Host: GitHub
- URL: https://github.com/kevinmichaelchen/some-protos-ts
- Owner: kevinmichaelchen
- Created: 2022-03-30T18:40:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-05T17:02:57.000Z (over 2 years ago)
- Last Synced: 2024-08-09T23:47:10.028Z (5 months ago)
- Language: TypeScript
- Size: 518 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# some-protos-ts
[![CI](https://github.com/kevinmichaelchen/some-protos-ts/actions/workflows/blank.yml/badge.svg)](https://github.com/kevinmichaelchen/some-protos-ts/actions/workflows/blank.yml)
A repo containing TypeScript code compiled from protobufs contained in
[some-protos](https://github.com/kevinmichaelchen/some-protos).This build is powered by the [ts-proto](https://github.com/stephenh/ts-proto)
library.## Using this code with nice-grpc
To see this code being used in a sample Typescript app with [**nice-grpc**](https://github.com/deeplay-io/nice-grpc),
check out [**some-protos-ts-example**](https://github.com/kevinmichaelchen/some-protos-ts-example).## Tuning the TypeScript Transpiler
There are lots of [build options](https://github.com/stephenh/ts-proto#supported-options)
worth considering:
* `context=true` — allows for a Go-style `ctx` parameter for logging and tracing
* `forceLong=long` — all 64-bit numbers will be parsed with the [long](https://www.npmjs.com/package/long) library
* and more## Semantic-Release
Git-tagging, version management, and artifact/package publishing is handled by [semantic-release](https://github.com/semantic-release/semantic-release).Inspired by this [demo repo](https://github.com/bmvantunes/youtube-2021-may-automatic-publish-npm-semantic-release-and-github-actions).
## Secrets
I don't think I really needed any environment-specific secrets, so all of these could probably by _repository secrets_ rather than _environment secrets_.
* `NPM_TOKEN` was an [automation token](https://github.blog/changelog/2020-10-02-npm-automation-tokens/) created in NPM
* `ACCESS_TOKEN` was a Github personal access token created with `repo` scope — this allowed the build to commit and push back auto-generated protobuf changes.
* `GITHUB_TOKEN` is used, but not something we generated since it's [automatically provided](https://docs.github.com/en/actions/security-guides/automatic-token-authentication).