Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create types packages for "Stats" and "Visualizer" services #968

Merged
merged 6 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/npm-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
type: choice
options:
- blockscout-ens
- stats
- visualizer
required: true
workflow_call:
inputs:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,13 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: stats

publish_types_package:
name: Publish types package
uses: './.github/workflows/npm-publisher.yml'
needs: docker
if: needs.docker.outputs.tag-value != ''
secrets: inherit
with:
version: ${{ needs.docker.outputs.tag-value }}
project_name: stats
10 changes: 10 additions & 0 deletions .github/workflows/visualizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: visualizer

publish_types_package:
name: Publish types package
uses: './.github/workflows/npm-publisher.yml'
needs: docker
if: needs.docker.outputs.tag-value != ''
secrets: inherit
with:
version: ${{ needs.docker.outputs.tag-value }}
project_name: visualizer
2 changes: 1 addition & 1 deletion blockscout-ens/types/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/node-modules
/node_modules
/dist
rimrakhimov marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions stats/types/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
1 change: 1 addition & 0 deletions stats/types/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
206 changes: 206 additions & 0 deletions stats/types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions stats/types/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@blockscout/stats-types",
"version": "0.0.1",
"description": "TypeScript definitions for Stats microservice",
"main": "./dist/stats-proto/proto/stats.js",
"types": "./dist/stats-proto/proto/stats.d.ts",
"scripts": {
"build": "npm run compile:proto && npm run compile:ts",
"compile:proto": "mkdir -p ./dist && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=snakeToCamel=false --ts_proto_opt=stringEnums=true --ts_proto_opt=onlyTypes=true --ts_proto_opt=emitImportedFiles=false --proto_path=../ --proto_path=../../proto/ --ts_proto_out=./dist ../stats-proto/proto/stats.proto",
"compile:ts": "tsc --declaration ./dist/stats-proto/proto/stats.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/blockscout/blockscout-rs.git",
"directory": "stats/types"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/blockscout/blockscout-rs/issues"
},
"homepage": "https://github.com/blockscout/blockscout-rs#readme",
"devDependencies": {
"ts-proto": "1.176.2",
"typescript": "5.4.5"
}
}
2 changes: 2 additions & 0 deletions visualizer/types/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
1 change: 1 addition & 0 deletions visualizer/types/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
Loading
Loading