TD-237: Add frontend codegen (#4)

This commit is contained in:
Rinat Arsaev 2022-03-25 14:05:49 +03:00 committed by GitHub
parent 5354c73b94
commit c9a6cae261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1754 additions and 0 deletions

21
.github/workflows/frontend-pr.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: 'Frontend: PR'
on:
pull_request:
branches: ['*']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
check:
name: Check
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- uses: valitydev/action-setup-thrift@v1.0.0
- run: npm i # protocols don't always update the package-lock.json, so installing from package.json
- name: Codegen
run: npm run codegen

24
.github/workflows/frontend-publish.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: 'Frontend: Publish'
on:
push:
branches: ['master', 'main']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
publish:
name: Publish
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- uses: valitydev/action-setup-thrift@v1.0.0
- run: npm i # protocols don't always update the package-lock.json, so installing from package.json
- name: Build
run: npm run codegen
- uses: valitydev/action-frontend/publish@v0.1
with:
npm-token: ${{ secrets.NPM_TOKEN }}

5
.gitignore vendored
View File

@ -76,3 +76,8 @@ fabric.properties
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
env.list
# frontend
node_modules
lib

1678
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "@vality/deanonimus-proto",
"version": "1.0.0",
"scripts": {
"codegen": "thrift-codegen"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valitydev/deanonimus-proto.git"
},
"license": "Apache-2.0",
"homepage": "https://github.com/valitydev/deanonimus-proto#readme",
"files": [
"lib/**/*.{js,d.ts,json}",
"**/*.thrift"
],
"main": "./lib/deanonimus.js",
"types": "./lib/deanonimus.d.ts",
"devDependencies": {
"@vality/thrift-codegen": "0.1.1-c81b4b7.0"
}
}