Skip to content

Commit cde3965

Browse files
ci: create types packages for "Stats" and "Visualizer" services (#968)
* make stats type package * make stats type package * remove node_modules from `.gitidnore` files of subprojects --------- Co-authored-by: Rim Rakhimov <[email protected]>
1 parent 748f55a commit cde3965

File tree

27 files changed

+493
-15
lines changed

27 files changed

+493
-15
lines changed

.github/workflows/npm-publisher.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
type: choice
1313
options:
1414
- blockscout-ens
15+
- stats
16+
- visualizer
1517
required: true
1618
workflow_call:
1719
inputs:

.github/workflows/stats.yml

+10
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,13 @@ jobs:
8484
uses: ./.github/workflows/_docker-build-push.yml
8585
with:
8686
service-name: stats
87+
88+
publish_types_package:
89+
name: Publish types package
90+
uses: './.github/workflows/npm-publisher.yml'
91+
needs: docker
92+
if: needs.docker.outputs.tag-value != ''
93+
secrets: inherit
94+
with:
95+
version: ${{ needs.docker.outputs.tag-value }}
96+
project_name: stats

.github/workflows/visualizer.yml

+10
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,13 @@ jobs:
7474
uses: ./.github/workflows/_docker-build-push.yml
7575
with:
7676
service-name: visualizer
77+
78+
publish_types_package:
79+
name: Publish types package
80+
uses: './.github/workflows/npm-publisher.yml'
81+
needs: docker
82+
if: needs.docker.outputs.tag-value != ''
83+
secrets: inherit
84+
with:
85+
version: ${{ needs.docker.outputs.tag-value }}
86+
project_name: visualizer

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ config.toml
2323
## Cargo.lock for libs
2424
libs/Cargo.lock
2525

26+
## NPM dependencies
27+
**/node_modules/**
28+
2629
## Secrets
2730
**.decrypted~**
2831
**.dec**

blockscout-ens/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
node_modules
21
.env
32
.env.*

blockscout-ens/graph-node/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
data
2-
node_modules
32
*.ipynb
43
.venv

blockscout-ens/graph-node/subgraph-writer/templater/{{cookiecutter.short_name}}-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ bower_components
4242
build/Release
4343

4444
# Dependency directories
45-
node_modules/
4645
jspm_packages/
4746
dist/
4847

blockscout-ens/graph-node/subgraphs/bns-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ bower_components
4141
build/Release
4242

4343
# Dependency directories
44-
node_modules/
4544
jspm_packages/
4645
dist/
4746

blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ bower_components
4141
build/Release
4242

4343
# Dependency directories
44-
node_modules/
4544
jspm_packages/
4645
dist/
4746

blockscout-ens/graph-node/subgraphs/genome-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ bower_components
4343
build/Release
4444

4545
# Dependency directories
46-
node_modules/
4746
jspm_packages/
4847
dist/
4948

blockscout-ens/graph-node/subgraphs/lightlink-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ bower_components
4242
build/Release
4343

4444
# Dependency directories
45-
node_modules/
4645
jspm_packages/
4746
dist/
4847

blockscout-ens/graph-node/subgraphs/mode-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ bower_components
4242
build/Release
4343

4444
# Dependency directories
45-
node_modules/
4645
jspm_packages/
4746
dist/
4847

blockscout-ens/graph-node/subgraphs/rns-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ bower_components
4343
build/Release
4444

4545
# Dependency directories
46-
node_modules/
4746
jspm_packages/
4847
dist/
4948

blockscout-ens/graph-node/subgraphs/zns-subgraph/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ bower_components
4343
build/Release
4444

4545
# Dependency directories
46-
node_modules/
4746
jspm_packages/
4847
dist/
4948

blockscout-ens/types/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/node-modules
21
/dist

libs/blockscout-client/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
node_modules

multichain-search/frontend/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22
.env
33
# dependencies
4-
*node_modules*
54
/.pnp
65
.pnp.js
76

smart-guessr/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
54
/.pnp
65
.pnp.js
76

stats/types/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

stats/types/.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

stats/types/package-lock.json

+206
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stats/types/package.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@blockscout/stats-types",
3+
"version": "0.0.1",
4+
"description": "TypeScript definitions for Stats microservice",
5+
"main": "./dist/stats-proto/proto/stats.js",
6+
"types": "./dist/stats-proto/proto/stats.d.ts",
7+
"scripts": {
8+
"build": "npm run compile:proto && npm run compile:ts",
9+
"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",
10+
"compile:ts": "tsc --declaration ./dist/stats-proto/proto/stats.ts"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/blockscout/blockscout-rs.git",
15+
"directory": "stats/types"
16+
},
17+
"license": "MIT",
18+
"bugs": {
19+
"url": "https://github.com/blockscout/blockscout-rs/issues"
20+
},
21+
"homepage": "https://github.com/blockscout/blockscout-rs#readme",
22+
"devDependencies": {
23+
"ts-proto": "1.176.2",
24+
"typescript": "5.4.5"
25+
}
26+
}

visualizer/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ Session.vim
1616

1717
## Build
1818
/target
19-
**/node_modules/**
2019
config.toml
2120
output

visualizer/types/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

visualizer/types/.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

0 commit comments

Comments
 (0)