Skip to content

Commit

Permalink
Merge pull request #592 from cosmology-tech/esm-comp
Browse files Browse the repository at this point in the history
fixed restoring ext for import() funcs
  • Loading branch information
Zetazzz authored Mar 21, 2024
2 parents 8d975f2 + afefae9 commit 5e773b9
Show file tree
Hide file tree
Showing 27 changed files with 677 additions and 620 deletions.
54 changes: 27 additions & 27 deletions __fixtures__/v-next/outputv4/akash/rpc.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,83 @@ export const createRPCQueryClient = async ({
return {
akash: {
audit: {
v1beta2: (await import("./audit/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta2: (await import("./audit/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
},
cert: {
v1beta2: (await import("./cert/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta2: (await import("./cert/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
},
deployment: {
v1beta2: (await import("./deployment/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta2: (await import("./deployment/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
},
escrow: {
v1beta1: (await import("./escrow/v1beta1/query.rpc.Query")).createRpcQueryExtension(client),
v1beta2: (await import("./escrow/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./escrow/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client),
v1beta2: (await import("./escrow/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
},
market: {
v1beta2: (await import("./market/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta2: (await import("./market/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
},
provider: {
v1beta2: (await import("./provider/v1beta2/query.rpc.Query")).createRpcQueryExtension(client)
v1beta2: (await import("./provider/v1beta2/query.rpc.Query.js")).createRpcQueryExtension(client)
}
},
cosmos: {
app: {
v1alpha1: (await import("../cosmos/app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client)
v1alpha1: (await import("../cosmos/app/v1alpha1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
auth: {
v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
authz: {
v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/authz/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
bank: {
v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
base: {
reflection: {
v1beta1: (await import("../cosmos/base/reflection/v1beta1/reflection.rpc.ReflectionService")).createRpcQueryExtension(client),
v2alpha1: (await import("../cosmos/base/reflection/v2alpha1/reflection.rpc.ReflectionService")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/base/reflection/v1beta1/reflection.rpc.ReflectionService.js")).createRpcQueryExtension(client),
v2alpha1: (await import("../cosmos/base/reflection/v2alpha1/reflection.rpc.ReflectionService.js")).createRpcQueryExtension(client)
},
tendermint: {
v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service.js")).createRpcQueryExtension(client)
}
},
distribution: {
v1beta1: (await import("../cosmos/distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/distribution/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
evidence: {
v1beta1: (await import("../cosmos/evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/evidence/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
feegrant: {
v1beta1: (await import("../cosmos/feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/feegrant/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
gov: {
v1: (await import("../cosmos/gov/v1/query.rpc.Query")).createRpcQueryExtension(client),
v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1: (await import("../cosmos/gov/v1/query.rpc.Query.js")).createRpcQueryExtension(client),
v1beta1: (await import("../cosmos/gov/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
group: {
v1: (await import("../cosmos/group/v1/query.rpc.Query")).createRpcQueryExtension(client)
v1: (await import("../cosmos/group/v1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
mint: {
v1beta1: (await import("../cosmos/mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/mint/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
nft: {
v1beta1: (await import("../cosmos/nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/nft/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
params: {
v1beta1: (await import("../cosmos/params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/params/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
slashing: {
v1beta1: (await import("../cosmos/slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/slashing/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
staking: {
v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/staking/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
tx: {
v1beta1: (await import("../cosmos/tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/tx/v1beta1/service.rpc.Service.js")).createRpcQueryExtension(client)
},
upgrade: {
v1beta1: (await import("../cosmos/upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("../cosmos/upgrade/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
}
}
};
Expand Down
42 changes: 21 additions & 21 deletions __fixtures__/v-next/outputv4/akash/rpc.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,63 @@ export const createRPCMsgClient = async ({
}) => ({
akash: {
audit: {
v1beta1: new (await import("./audit/v1beta1/audit.rpc.msg")).MsgClientImpl(rpc),
v1beta2: new (await import("./audit/v1beta2/audit.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./audit/v1beta1/audit.rpc.msg.js")).MsgClientImpl(rpc),
v1beta2: new (await import("./audit/v1beta2/audit.rpc.msg.js")).MsgClientImpl(rpc)
},
cert: {
v1beta2: new (await import("./cert/v1beta2/cert.rpc.msg")).MsgClientImpl(rpc)
v1beta2: new (await import("./cert/v1beta2/cert.rpc.msg.js")).MsgClientImpl(rpc)
},
deployment: {
v1beta2: new (await import("./deployment/v1beta2/service.rpc.msg")).MsgClientImpl(rpc)
v1beta2: new (await import("./deployment/v1beta2/service.rpc.msg.js")).MsgClientImpl(rpc)
},
market: {
v1beta2: new (await import("./market/v1beta2/service.rpc.msg")).MsgClientImpl(rpc)
v1beta2: new (await import("./market/v1beta2/service.rpc.msg.js")).MsgClientImpl(rpc)
},
provider: {
v1beta1: new (await import("./provider/v1beta1/provider.rpc.msg")).MsgClientImpl(rpc),
v1beta2: new (await import("./provider/v1beta2/provider.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./provider/v1beta1/provider.rpc.msg.js")).MsgClientImpl(rpc),
v1beta2: new (await import("./provider/v1beta2/provider.rpc.msg.js")).MsgClientImpl(rpc)
}
},
cosmos: {
authz: {
v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/authz/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
bank: {
v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/bank/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
crisis: {
v1beta1: new (await import("../cosmos/crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/crisis/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
distribution: {
v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/distribution/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
evidence: {
v1beta1: new (await import("../cosmos/evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/evidence/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
feegrant: {
v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/feegrant/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
gov: {
v1: new (await import("../cosmos/gov/v1/tx.rpc.msg")).MsgClientImpl(rpc),
v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1: new (await import("../cosmos/gov/v1/tx.rpc.msg.js")).MsgClientImpl(rpc),
v1beta1: new (await import("../cosmos/gov/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
group: {
v1: new (await import("../cosmos/group/v1/tx.rpc.msg")).MsgClientImpl(rpc)
v1: new (await import("../cosmos/group/v1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
nft: {
v1beta1: new (await import("../cosmos/nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/nft/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
slashing: {
v1beta1: new (await import("../cosmos/slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/slashing/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
staking: {
v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/staking/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
upgrade: {
v1beta1: new (await import("../cosmos/upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/upgrade/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
vesting: {
v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("../cosmos/vesting/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export const createCosmicRPCQueryClient = async ({
return {
cosmos: {
bank: {
v1beta1: (await import("./bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./bank/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
gov: {
v1beta1: (await import("./gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./gov/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/v-next/outputv4/cosmos/cosmos-rpc-client.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export const createCosmicRPCTxClient = async ({
}) => ({
cosmos: {
bank: {
v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
gov: {
v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
}
}
});
40 changes: 20 additions & 20 deletions __fixtures__/v-next/outputv4/cosmos/rpc.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,62 @@ export const createRPCQueryClient = async ({
return {
cosmos: {
app: {
v1alpha1: (await import("./app/v1alpha1/query.rpc.Query")).createRpcQueryExtension(client)
v1alpha1: (await import("./app/v1alpha1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
auth: {
v1beta1: (await import("./auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./auth/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
authz: {
v1beta1: (await import("./authz/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./authz/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
bank: {
v1beta1: (await import("./bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./bank/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
base: {
reflection: {
v1beta1: (await import("./base/reflection/v1beta1/reflection.rpc.ReflectionService")).createRpcQueryExtension(client),
v2alpha1: (await import("./base/reflection/v2alpha1/reflection.rpc.ReflectionService")).createRpcQueryExtension(client)
v1beta1: (await import("./base/reflection/v1beta1/reflection.rpc.ReflectionService.js")).createRpcQueryExtension(client),
v2alpha1: (await import("./base/reflection/v2alpha1/reflection.rpc.ReflectionService.js")).createRpcQueryExtension(client)
},
tendermint: {
v1beta1: (await import("./base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client)
v1beta1: (await import("./base/tendermint/v1beta1/query.rpc.Service.js")).createRpcQueryExtension(client)
}
},
distribution: {
v1beta1: (await import("./distribution/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./distribution/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
evidence: {
v1beta1: (await import("./evidence/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./evidence/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
feegrant: {
v1beta1: (await import("./feegrant/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./feegrant/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
gov: {
v1: (await import("./gov/v1/query.rpc.Query")).createRpcQueryExtension(client),
v1beta1: (await import("./gov/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1: (await import("./gov/v1/query.rpc.Query.js")).createRpcQueryExtension(client),
v1beta1: (await import("./gov/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
group: {
v1: (await import("./group/v1/query.rpc.Query")).createRpcQueryExtension(client)
v1: (await import("./group/v1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
mint: {
v1beta1: (await import("./mint/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./mint/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
nft: {
v1beta1: (await import("./nft/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./nft/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
params: {
v1beta1: (await import("./params/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./params/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
slashing: {
v1beta1: (await import("./slashing/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./slashing/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
staking: {
v1beta1: (await import("./staking/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./staking/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
},
tx: {
v1beta1: (await import("./tx/v1beta1/service.rpc.Service")).createRpcQueryExtension(client)
v1beta1: (await import("./tx/v1beta1/service.rpc.Service.js")).createRpcQueryExtension(client)
},
upgrade: {
v1beta1: (await import("./upgrade/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
v1beta1: (await import("./upgrade/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client)
}
}
};
Expand Down
28 changes: 14 additions & 14 deletions __fixtures__/v-next/outputv4/cosmos/rpc.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@ export const createRPCMsgClient = async ({
}) => ({
cosmos: {
authz: {
v1beta1: new (await import("./authz/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./authz/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
bank: {
v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./bank/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
crisis: {
v1beta1: new (await import("./crisis/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./crisis/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
distribution: {
v1beta1: new (await import("./distribution/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./distribution/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
evidence: {
v1beta1: new (await import("./evidence/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./evidence/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
feegrant: {
v1beta1: new (await import("./feegrant/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./feegrant/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
gov: {
v1: new (await import("./gov/v1/tx.rpc.msg")).MsgClientImpl(rpc),
v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1: new (await import("./gov/v1/tx.rpc.msg.js")).MsgClientImpl(rpc),
v1beta1: new (await import("./gov/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
group: {
v1: new (await import("./group/v1/tx.rpc.msg")).MsgClientImpl(rpc)
v1: new (await import("./group/v1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
nft: {
v1beta1: new (await import("./nft/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./nft/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
slashing: {
v1beta1: new (await import("./slashing/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./slashing/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
staking: {
v1beta1: new (await import("./staking/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./staking/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
upgrade: {
v1beta1: new (await import("./upgrade/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./upgrade/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
},
vesting: {
v1beta1: new (await import("./vesting/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
v1beta1: new (await import("./vesting/v1beta1/tx.rpc.msg.js")).MsgClientImpl(rpc)
}
}
});
Loading

0 comments on commit 5e773b9

Please sign in to comment.