@mccarthyfinch/public-api-client
v3.9.25
Published
##### Updated on 12 January 2022
Downloads
15,880
Maintainers
Keywords
Readme
Public API Client
Updated on 12 January 2022
1. code generation of a client library
Run npm i in app/packages/client/ first
The src folder is automatically generated via the in codegen-client.sh file (under app directory).
This is done by using swagger code-gen on app/packages/server/_codegen/tsoa/swagger.json. This swagger file is generated automatically by tsoa.
DO NOT manually modify the contents of src folder.
2. publish a npm library
2.1. release-it
We publish to both npm and github. This option is the main option for publishing npm libraries in the company.
npm run release # note: u need npmjs login credentials first2.1.1. Working with upstream branch
If you are executing ths script in a custom branch (not master), you may have a following error message during npm run release
ERROR No upstream configured for current branch.
Please set an upstream branch.You need to set a upstream branch (tracking a remote branch), since the master was tracked after git clone.
Track the remote branch with creating a new local branch
git checkout -b <local branch name> origin/<your remote branch name>Track the remote branch with connecting by an existing local branch
git branch -u origin/<your remote branch name>2.2. gitpkg
We are using gitpkg so that we can potentially use github as an npm dependency provider. However this does mean we can't ignore our built files (the lib folder).
This is mostly useful for stuff like alpha builds or getting around any npm link issues since you can override the package in github.
To delete a tag created by gitpkg, eg version 0.0.1
git push --delete origin @mccarthyfinch/[email protected]
To use the package from github, your dependency should look like
"@mccarthyfinch/checklist-client": "git+ssh://[email protected]/McCarthyFinch/Author.PublicApi.git#@mccarthyfinch/[email protected]",
