diff --git a/.github/workflows/npm-publisher.yml b/.github/workflows/npm-publisher.yml index f68ca33f6..1239ea3f8 100644 --- a/.github/workflows/npm-publisher.yml +++ b/.github/workflows/npm-publisher.yml @@ -12,6 +12,8 @@ on: type: choice options: - blockscout-ens + - stats + - visualizer required: true workflow_call: inputs: diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index 22d398486..ed1d155bb 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -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 diff --git a/.github/workflows/visualizer.yml b/.github/workflows/visualizer.yml index 6aa439166..ea7eef424 100644 --- a/.github/workflows/visualizer.yml +++ b/.github/workflows/visualizer.yml @@ -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 diff --git a/.gitignore b/.gitignore index 40695c56d..fa196a96c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ config.toml ## Cargo.lock for libs libs/Cargo.lock +## NPM dependencies +**/node_modules/** + ## Secrets **.decrypted~** **.dec** diff --git a/blockscout-ens/.gitignore b/blockscout-ens/.gitignore index 9b8944604..665da4550 100644 --- a/blockscout-ens/.gitignore +++ b/blockscout-ens/.gitignore @@ -1,3 +1,2 @@ -node_modules .env .env.* diff --git a/blockscout-ens/graph-node/.gitignore b/blockscout-ens/graph-node/.gitignore index f887138ac..fe57fdc86 100644 --- a/blockscout-ens/graph-node/.gitignore +++ b/blockscout-ens/graph-node/.gitignore @@ -1,4 +1,3 @@ data -node_modules *.ipynb .venv diff --git a/blockscout-ens/graph-node/subgraph-writer/templater/{{cookiecutter.short_name}}-subgraph/.gitignore b/blockscout-ens/graph-node/subgraph-writer/templater/{{cookiecutter.short_name}}-subgraph/.gitignore index 71c83702f..25d5792db 100644 --- a/blockscout-ens/graph-node/subgraph-writer/templater/{{cookiecutter.short_name}}-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraph-writer/templater/{{cookiecutter.short_name}}-subgraph/.gitignore @@ -42,7 +42,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/bns-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/bns-subgraph/.gitignore index 3dfb0f6c1..ad074e42e 100644 --- a/blockscout-ens/graph-node/subgraphs/bns-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/bns-subgraph/.gitignore @@ -41,7 +41,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore index 1d5993e7d..dc5f424e8 100644 --- a/blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore @@ -41,7 +41,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/genome-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/genome-subgraph/.gitignore index 50637d036..53d1b9f43 100644 --- a/blockscout-ens/graph-node/subgraphs/genome-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/genome-subgraph/.gitignore @@ -43,7 +43,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/lightlink-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/lightlink-subgraph/.gitignore index 71c83702f..25d5792db 100644 --- a/blockscout-ens/graph-node/subgraphs/lightlink-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/lightlink-subgraph/.gitignore @@ -42,7 +42,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/mode-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/mode-subgraph/.gitignore index 71c83702f..25d5792db 100644 --- a/blockscout-ens/graph-node/subgraphs/mode-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/mode-subgraph/.gitignore @@ -42,7 +42,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/rns-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/rns-subgraph/.gitignore index 50637d036..53d1b9f43 100644 --- a/blockscout-ens/graph-node/subgraphs/rns-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/rns-subgraph/.gitignore @@ -43,7 +43,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/graph-node/subgraphs/zns-subgraph/.gitignore b/blockscout-ens/graph-node/subgraphs/zns-subgraph/.gitignore index 50637d036..53d1b9f43 100644 --- a/blockscout-ens/graph-node/subgraphs/zns-subgraph/.gitignore +++ b/blockscout-ens/graph-node/subgraphs/zns-subgraph/.gitignore @@ -43,7 +43,6 @@ bower_components build/Release # Dependency directories -node_modules/ jspm_packages/ dist/ diff --git a/blockscout-ens/types/.gitignore b/blockscout-ens/types/.gitignore index cc1c56d5d..3e2212924 100644 --- a/blockscout-ens/types/.gitignore +++ b/blockscout-ens/types/.gitignore @@ -1,2 +1 @@ -/node-modules /dist \ No newline at end of file diff --git a/libs/blockscout-client/.gitignore b/libs/blockscout-client/.gitignore index b512c09d4..e69de29bb 100644 --- a/libs/blockscout-client/.gitignore +++ b/libs/blockscout-client/.gitignore @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/multichain-search/frontend/.gitignore b/multichain-search/frontend/.gitignore index 165d64dcd..ccb5b492a 100644 --- a/multichain-search/frontend/.gitignore +++ b/multichain-search/frontend/.gitignore @@ -1,7 +1,6 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. .env # dependencies -*node_modules* /.pnp .pnp.js diff --git a/smart-guessr/.gitignore b/smart-guessr/.gitignore index 87e56100f..2ff397c7a 100644 --- a/smart-guessr/.gitignore +++ b/smart-guessr/.gitignore @@ -1,7 +1,6 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies -/node_modules /.pnp .pnp.js diff --git a/stats/types/.gitignore b/stats/types/.gitignore new file mode 100644 index 000000000..3e2212924 --- /dev/null +++ b/stats/types/.gitignore @@ -0,0 +1 @@ +/dist \ No newline at end of file diff --git a/stats/types/.npmignore b/stats/types/.npmignore new file mode 100644 index 000000000..30bc16279 --- /dev/null +++ b/stats/types/.npmignore @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git a/stats/types/package-lock.json b/stats/types/package-lock.json new file mode 100644 index 000000000..50a022603 --- /dev/null +++ b/stats/types/package-lock.json @@ -0,0 +1,206 @@ +{ + "name": "@blockscout/stats-types", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@blockscout/stats-types", + "version": "0.0.1", + "license": "MIT", + "devDependencies": { + "ts-proto": "1.176.2", + "typescript": "5.4.5" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "dev": true, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "dev": true + }, + "node_modules/protobufjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", + "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ts-poet": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.9.0.tgz", + "integrity": "sha512-roe6W6MeZmCjRmppyfOURklO5tQFQ6Sg7swURKkwYJvV7dbGCrK28um5+51iW3twdPRKtwarqFAVMU6G1mvnuQ==", + "dev": true, + "dependencies": { + "dprint-node": "^1.0.8" + } + }, + "node_modules/ts-proto": { + "version": "1.176.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.176.2.tgz", + "integrity": "sha512-lISYoJeutvl79MEJhAafdXbad9L48FjSuy+pg3YlAtX7ZY8LBfu4Wh00ac7DWC9GREzS0SfXeCqWbS2Rb4wEGQ==", + "dev": true, + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "1.16.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.16.0.tgz", + "integrity": "sha512-3yKuzMLpltdpcyQji1PJZRfoo4OJjNieKTYkQY8pF7xGKsYz/RHe3aEe4KiRxcinoBmnEhmuI+yJTxLb922ULA==", + "dev": true, + "dependencies": { + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + } + } +} diff --git a/stats/types/package.json b/stats/types/package.json new file mode 100644 index 000000000..6cd77bfa2 --- /dev/null +++ b/stats/types/package.json @@ -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" + } +} diff --git a/visualizer/.gitignore b/visualizer/.gitignore index 8f5056541..645b76e66 100644 --- a/visualizer/.gitignore +++ b/visualizer/.gitignore @@ -16,6 +16,5 @@ Session.vim ## Build /target -**/node_modules/** config.toml output diff --git a/visualizer/types/.gitignore b/visualizer/types/.gitignore new file mode 100644 index 000000000..3e2212924 --- /dev/null +++ b/visualizer/types/.gitignore @@ -0,0 +1 @@ +/dist \ No newline at end of file diff --git a/visualizer/types/.npmignore b/visualizer/types/.npmignore new file mode 100644 index 000000000..30bc16279 --- /dev/null +++ b/visualizer/types/.npmignore @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git a/visualizer/types/package-lock.json b/visualizer/types/package-lock.json new file mode 100644 index 000000000..56b6a0310 --- /dev/null +++ b/visualizer/types/package-lock.json @@ -0,0 +1,206 @@ +{ + "name": "@blockscout/visualizer-types", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@blockscout/visualizer-types", + "version": "0.0.1", + "license": "MIT", + "devDependencies": { + "ts-proto": "1.176.2", + "typescript": "5.4.5" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "dev": true, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "dev": true + }, + "node_modules/protobufjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", + "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ts-poet": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.9.0.tgz", + "integrity": "sha512-roe6W6MeZmCjRmppyfOURklO5tQFQ6Sg7swURKkwYJvV7dbGCrK28um5+51iW3twdPRKtwarqFAVMU6G1mvnuQ==", + "dev": true, + "dependencies": { + "dprint-node": "^1.0.8" + } + }, + "node_modules/ts-proto": { + "version": "1.176.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.176.2.tgz", + "integrity": "sha512-lISYoJeutvl79MEJhAafdXbad9L48FjSuy+pg3YlAtX7ZY8LBfu4Wh00ac7DWC9GREzS0SfXeCqWbS2Rb4wEGQ==", + "dev": true, + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "1.16.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.16.0.tgz", + "integrity": "sha512-3yKuzMLpltdpcyQji1PJZRfoo4OJjNieKTYkQY8pF7xGKsYz/RHe3aEe4KiRxcinoBmnEhmuI+yJTxLb922ULA==", + "dev": true, + "dependencies": { + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + } + } +} diff --git a/visualizer/types/package.json b/visualizer/types/package.json new file mode 100644 index 000000000..d1b13948c --- /dev/null +++ b/visualizer/types/package.json @@ -0,0 +1,26 @@ +{ + "name": "@blockscout/visualizer-types", + "version": "0.0.1", + "description": "TypeScript definitions for Visualizer microservice", + "main": "./dist/visualizer-proto/proto/visualizer.js", + "types": "./dist/visualizer-proto/proto/visualizer.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 ../visualizer-proto/proto/visualizer.proto", + "compile:ts": "tsc --declaration ./dist/visualizer-proto/proto/visualizer.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/blockscout/blockscout-rs.git", + "directory": "visualizer/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" + } +}