Skip to content

Commit

Permalink
Merge pull request #44 from pyramation/telescope-upgrade
Browse files Browse the repository at this point in the history
Telescope upgrade
  • Loading branch information
webmaster128 committed Oct 26, 2022
2 parents b1c6867 + 2842408 commit 2f5736e
Show file tree
Hide file tree
Showing 130 changed files with 21,810 additions and 10,256 deletions.
2 changes: 0 additions & 2 deletions bin/protoc-gen-ts_proto_yarn_2

This file was deleted.

8,898 changes: 8,641 additions & 257 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -4,7 +4,8 @@
"description": "JS and TS types relating to Protocol Buffers used by Cosmos-SDK and other related projects",
"contributors": [
"Simon Warta <webmaster128@users.noreply.github.com>",
"Will Clark <willclarktech@users.noreply.github.com>"
"Will Clark <willclarktech@users.noreply.github.com>",
"Dan Lynch <pyramation@gmail.com>"
],
"license": "Apache-2.0",
"repository": {
Expand All @@ -29,7 +30,7 @@
],
"scripts": {
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
"codegen": "rm -rf ./src && ./scripts/codegen.sh && ./scripts/codegen-cosmos-sdk.sh && npm run format",
"codegen": "rm -rf ./src && ./scripts/codegen.js && npm run format",
"prepare-publishing": "./scripts/prepare-publishing.sh",
"build": "rm -rf ./build && tsc && npm run prepare-publishing"
},
Expand All @@ -38,10 +39,10 @@
"protobufjs": "~6.11.2"
},
"devDependencies": {
"@osmonauts/telescope": "^0.69.0",
"@types/long": "^4.0.1",
"@types/node": "^15.6.2",
"prettier": "^2.7.1",
"ts-proto": "^1.126.1",
"typescript": "~4.7"
}
}
87 changes: 0 additions & 87 deletions scripts/codegen-cosmos-sdk.sh

This file was deleted.

88 changes: 88 additions & 0 deletions scripts/codegen.js
@@ -0,0 +1,88 @@
#!/usr/bin/env node

const { join } = require('path');
const telescope = require('@osmonauts/telescope').default;

telescope({
protoDirs: [
'cosmos-sdk-0.45/proto',
'cosmos-sdk-0.45/third_party/proto',
'wasmd-0.28/proto',
'wasmd-0.28/third_party/proto',
],
outPath: join(__dirname, '/../src'),
options: {
logLevel: 0,
useSDKTypes: false,
tsDisable: {
disableAll: false
},
eslintDisable: {
disableAll: true
},
bundle: {
enabled: false
},
prototypes: {
includePackageVar: true,
excluded: {
protos: [
'cosmos/authz/v1beta1/event.proto',
'cosmos/base/reflection/v2alpha1/reflection.proto',
'cosmos/crypto/secp256r1/keys.proto',
'ibc/core/port/v1/query.proto',
'ibc/lightclients/solomachine/v2/solomachine.proto',
'tendermint/libs/bits/types.proto',
'google/api/httpbody.proto',
'tendermint/blockchain/types.proto',
'tendermint/consensus/types.proto',
'tendermint/consensus/wal.proto',
'tendermint/mempool/types.proto',
'tendermint/p2p/conn.proto',
'tendermint/p2p/pex.proto',
'tendermint/privval/types.proto',
'tendermint/rpc/grpc/types.proto',
'tendermint/state/types.proto',
'tendermint/statesync/types.proto',
'tendermint/store/types.proto',
'tendermint/types/canonical.proto',
'tendermint/types/events.proto',
]
},
methods: {
fromJSON: true,
toJSON: true
},
typingsFormat: {
useDeepPartial: false,
useExact: false,
timestamp: 'timestamp',
duration: 'duration'
}
},
lcdClients: {
enabled: false
},
rpcClients: {
enabled: true,
inline: true,
extensions: false,
camelCase: false,
enabledServices: [
'Msg',
'Query',
'Service',
'ReflectionService',
'ABCIApplication'
]
},
aminoEncoding: {
enabled: false
}
}
}).then(() => {
console.log('✨ All Done!');
}, (e) => {
console.error(e);
process.exit(1);
});
117 changes: 0 additions & 117 deletions scripts/codegen.sh

This file was deleted.

0 comments on commit 2f5736e

Please sign in to comment.