TD-253: Add frontend codegen (#28)

This commit is contained in:
Rinat Arsaev 2022-04-08 16:17:29 +03:00 committed by GitHub
parent c1488ca4a9
commit 2038f1a7d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 3243 additions and 4032 deletions

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

@ -0,0 +1,22 @@
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
- run: npm ci
- name: Build
run: npm run build
- name: Codegen
run: npm run codegen

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

@ -0,0 +1,26 @@
name: 'Frontend: Publish'
on:
push:
branches: ['master', 'main', 'v0']
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
- run: npm ci
- name: Build
run: npm run build
- name: Codegen
run: npm run codegen
- uses: valitydev/action-frontend/publish@v0.1
with:
npm-token: ${{ secrets.NPM_TOKEN }}
directory: ./lib

3
.gitignore vendored
View File

@ -35,3 +35,6 @@ node_modules
# CI
.wercker
# Frontend
/lib

8
.npm-shrinkwrap.json generated
View File

@ -1,8 +0,0 @@
{
"dependencies": {
"graceful-fs": {
"version": "4.2.2"
}
}
}

View File

@ -1,16 +0,0 @@
all: build
.PHONY: install
install: node_modules
.PHONY: build
build: install
npm run build
.PHONY: start
start: install
npm start
node_modules: package.json
npm install
touch $@

10
openapitools.json Normal file
View File

@ -0,0 +1,10 @@
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "6.0.0-20220330.230127-109",
"repository": {
"downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
}
}
}

7159
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,24 @@
{
"name": "vality-wallet-openapi-spec",
"name": "@vality/swag-wallet",
"version": "0.1.0",
"dependencies": {
"bower": "1.8.14",
"connect": "3.7.0",
"cors": "2.8.5",
"gulp-connect": "5.7.0",
"gulp-util": "3.0.8",
"json-merge-patch": "1.0.2",
"npm": "8.6.0",
"portfinder": "1.0.28",
"shelljs": "0.8.5",
"swagger-repo": "1.5.1",
"swagger-ui": "4.10.3"
},
"private": true,
"scripts": {
"build": "node ./scripts/build.js",
"swagger": "swagger-repo",
"test": "swagger-repo validate --basedir api/wallet/spec/ && swagger-repo validate --basedir api/payres/spec/",
"start": "gulp serve"
"start": "gulp serve",
"codegen": "vality-openapi generate ./dist/api/wallet/swagger.json"
},
"devDependencies": {
"gulp": "github:gulpjs/gulp"
"@vality/openapi-generator-cli": "0.1.1-fbfe66e.0",
"connect": "3.7.0",
"cors": "2.8.5",
"gulp": "github:gulpjs/gulp",
"gulp-connect": "5.7.0",
"gulp-util": "3.0.8",
"json-merge-patch": "1.0.2",
"portfinder": "1.0.28",
"shelljs": "0.8.5",
"swagger-repo": "1.5.1",
"swagger-ui": "4.10.3"
}
}