Skip to content

Commit

Permalink
fix(cli): catch exception when no module presented (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 committed Jan 1, 2023
1 parent 608bb26 commit fbaffb8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/cli/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ export async function buildProcessor(onlyGen: boolean) {
async function buildProcessorForTarget(onlyGen: boolean) {
await codeGenEthersProcessor(path.join('abis', 'evm'))

// eslint-disable-next-line @typescript-eslint/no-var-requires
const solanaModule = require('@sentio/sdk-solana/lib/codegen/codegen')
solanaModule.codeGenSolanaProcessor(path.join('abis', 'solana'))

// eslint-disable-next-line @typescript-eslint/no-var-requires
const aptosModuole = require('@sentio/sdk-aptos/lib/codegen/codegen')
aptosModuole.codeGenAptosProcessor(path.join('abis', 'aptos'))
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const solanaModule = require('@sentio/sdk-solana/lib/codegen/codegen')
solanaModule.codeGenSolanaProcessor(path.join('abis', 'solana'))
} catch (e) {}

try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const aptosModuole = require('@sentio/sdk-aptos/lib/codegen/codegen')
aptosModuole.codeGenAptosProcessor(path.join('abis', 'aptos'))
} catch (e) {}

if (onlyGen) {
return
Expand Down

0 comments on commit fbaffb8

Please sign in to comment.