Skip to content

Commit

Permalink
ci: create types packages for "Stats" and "Visualizer" services (#968)
Browse files Browse the repository at this point in the history
* make stats type package

* make stats type package

* remove node_modules from `.gitidnore` files of subprojects

---------

Co-authored-by: Rim Rakhimov <[email protected]>
  • Loading branch information
tom2drum and rimrakhimov authored Jul 5, 2024
1 parent 748f55a commit cde3965
Show file tree
Hide file tree
Showing 27 changed files with 493 additions and 15 deletions.
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ config.toml
## Cargo.lock for libs
libs/Cargo.lock

## NPM dependencies
**/node_modules/**

## Secrets
**.decrypted~**
**.dec**
1 change: 0 additions & 1 deletion blockscout-ens/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
.env
.env.*
1 change: 0 additions & 1 deletion blockscout-ens/graph-node/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
data
node_modules
*.ipynb
.venv
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ bower_components
build/Release

# Dependency directories
node_modules/
jspm_packages/
dist/

Expand Down
1 change: 0 additions & 1 deletion blockscout-ens/types/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/node-modules
/dist
1 change: 0 additions & 1 deletion libs/blockscout-client/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
node_modules
1 change: 0 additions & 1 deletion multichain-search/frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.env
# dependencies
*node_modules*
/.pnp
.pnp.js

Expand Down
1 change: 0 additions & 1 deletion smart-guessr/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

Expand Down
1 change: 1 addition & 0 deletions stats/types/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/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"
}
}
1 change: 0 additions & 1 deletion visualizer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ Session.vim

## Build
/target
**/node_modules/**
config.toml
output
1 change: 1 addition & 0 deletions visualizer/types/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/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

0 comments on commit cde3965

Please sign in to comment.