Skip to content

Updated download-protos script to do download with object #38

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

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 10 additions & 7 deletions boilerplates/telescope/packages/__MODULENAME__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"copy": "copyfiles -f ../../LICENSE README.md package.json dist",
"clean": "rimraf dist/**",
"prepare": "npm run build",
"download-protos": "cia protod --config ./.protod.config.json",
"download-protos": "ts-node scripts/download-protos.ts",
"codegen": "ts-node scripts/codegen.ts",
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
"build:dev": "npm run clean; npm run codegen; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
Expand All @@ -33,17 +33,20 @@
},
"devDependencies": {
"@types/node": "^22.14.1",
"copyfiles": "^2.4.1",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.8.3"
},
"dependencies": {
"@cosmjs/encoding": "0.32.3",
"@cosmjs/math": "0.32.3",
"@cosmjs/amino": "0.32.3",
"@cosmjs/proto-signing": "0.32.3",
"@cosmjs/stargate": "0.32.3",
"@interchainjs/cosmos": "1.11.5",
"@interchainjs/cosmos-types": "1.11.5",
"@interchainjs/encoding": "1.11.5",
"@interchainjs/pubkey": "1.11.5",
"@interchainjs/types": "1.11.5",
"@interchainjs/utils": "1.11.5",
"@cosmology/lcd": "^0.14.0",
"create-interchain-app": "^2.4.7"
"@cosmology/telescope": "^1.12.8"
},
"keywords": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-ignore
import downloadProtos from '@cosmology/telescope/main/commands/download'

const config = {
repos: [
{ owner: "cosmos", repo: "cosmos-sdk", branch: "release/v0.50.x" },
{ owner: "cosmos", repo: "ibc-go" },
{ owner: "injectivelabs", repo: "sdk-go" }
],
protoDirMapping: {
"gogo/protobuf/master": ".",
"googleapis/googleapis/master": ".",
"protocolbuffers/protobuf/main": "src"
},
outDir: "protos",
ssh: false,
tempRepoDir: "git-modules",
targets: [
"cosmos/**/*.proto",
"cosmwasm/**/*.proto",
"ibc/**/*.proto",
"injective/types/v1beta1/account.proto"
]
};

downloadProtos(config)
.then(() => console.log('✅ Proto download completed'))
// @ts-ignore
.catch((error) => {
console.error('❌ Proto download failed:', error);
process.exit(1);
});
Loading