2.0.5 • Published 1 year ago
tunnelhop-common v2.0.5
TunnelHop Types
This repo contains shared types between TunnelHop projects compiled into multiple languages.
How to use this repo in other repos
In order to leverage this repo in other repos you must install the package via NPM
.
https://www.npmjs.com/package/tunnelhop-common
Install with the following:
npm i tunnelhop-common
from here, you should be able to leverage types from the common
package.
Cutting a release
make cut-release
will cut apatch release
You can follow semantic version rules stated from semver.
Development for this repo
Auto Generate Code
See installation section below
make generate
Installation
Schema changes and additions must be manually generated and committed to the repository.
- Install Node/NPM
- Install Go
go-jsonschema
$ brew tap omissis/go-jsonschema
$ brew install go-jsonschema
json2ts
$ npm i -g json-schema-to-typescript
Generate code
Typescript
$ json2ts server.json Server.ts
Go
$ go-jsonschema -p common schemas/<SCHEMA_FILE>.json --resolve-extension json > common