diff --git a/changelog.md b/changelog.md index 27ac053e75..c8c2957409 100644 --- a/changelog.md +++ b/changelog.md @@ -38,6 +38,7 @@ - [#3661](https://github.com/ignite/cli/pull/3661) Change `pkg/cosmosanalysis` to find Cosmos SDK runtime app registered modules - [#3716](https://github.com/ignite/cli/pull/3716) Fix invalid plugin hook check - [#3725](https://github.com/ignite/cli/pull/3725) Fix flaky TS client generation issues on linux +- [#3726](https://github.com/ignite/cli/pull/3726) Update TS client dependencies. Bump vue/react template versions - [#3728](https://github.com/ignite/cli/pull/3728) Fix wrong parser for proto package names - [#3729](https://github.com/ignite/cli/pull/3729) Fix broken generator due to caching /tmp include folders diff --git a/go.mod b/go.mod index 14bd50e4d4..8492f9534f 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/iancoleman/strcase v0.2.0 github.com/ignite/ignite-files/nodetime v0.0.2 github.com/ignite/ignite-files/protoc v0.0.1 - github.com/ignite/web v0.4.3 + github.com/ignite/web v0.5.1 github.com/imdario/mergo v0.3.15 github.com/jpillora/chisel v1.8.1 github.com/lib/pq v1.10.9 diff --git a/go.sum b/go.sum index ba6420ea47..893dbdfea9 100644 --- a/go.sum +++ b/go.sum @@ -769,8 +769,8 @@ github.com/ignite/ignite-files/nodetime v0.0.2 h1:9Aj0OEa7FWI22J/Zdq7M2JvsjgFLng github.com/ignite/ignite-files/nodetime v0.0.2/go.mod h1:GKDsXdeazHyhSBPdVLp7mNIo/m9LmZ6/h8RmQ0/CoaM= github.com/ignite/ignite-files/protoc v0.0.1 h1:wXxU1dzruUgSVl1diAuAOA+xv0NQKXJFsDWht2+tAP8= github.com/ignite/ignite-files/protoc v0.0.1/go.mod h1:cVCHJbEHPIeKHMPk3ZoPS0Xw4XQfUc76BAMAPU9Fwjg= -github.com/ignite/web v0.4.3 h1:LHucUEXttzCf5JmxO5/xLKVx1Qz1o124HqF4Nii5uWQ= -github.com/ignite/web v0.4.3/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY= +github.com/ignite/web v0.5.1 h1:xGOt8wJG7WIrNO30e8Zbm669VFyo6sje/vWnusLPp6k= +github.com/ignite/web v0.5.1/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= diff --git a/ignite/pkg/cosmosgen/templates/module/module.ts.tpl b/ignite/pkg/cosmosgen/templates/module/module.ts.tpl index ed30d21601..4797df2b06 100644 --- a/ignite/pkg/cosmosgen/templates/module/module.ts.tpl +++ b/ignite/pkg/cosmosgen/templates/module/module.ts.tpl @@ -1,7 +1,6 @@ // Generated by Ignite ignite.com/cli -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate"; +import { SigningStargateClient, DeliverTxResponse, StdFee } from "@cosmjs/stargate"; import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing"; import { msgTypes } from './registry'; import { IgniteClient } from "../client" @@ -60,7 +59,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry}); let msg = this.{{ camelCase .Name }}({ value: {{ .Name }}.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { diff --git a/ignite/pkg/cosmosgen/templates/root/client.ts.tpl b/ignite/pkg/cosmosgen/templates/root/client.ts.tpl index fe54755d5a..a7b30495b6 100644 --- a/ignite/pkg/cosmosgen/templates/root/client.ts.tpl +++ b/ignite/pkg/cosmosgen/templates/root/client.ts.tpl @@ -5,8 +5,7 @@ import { EncodeObject, Registry, } from "@cosmjs/proto-signing"; -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; +import { SigningStargateClient, StdFee } from "@cosmjs/stargate"; import { Env } from "./env"; import { UnionToIntersection, Return, Constructor } from "./helpers"; import { Module } from "./modules"; @@ -42,7 +41,7 @@ export class IgniteClient extends EventEmitter { async signAndBroadcast(msgs: EncodeObject[], fee: StdFee, memo: string) { if (this.signer) { const { address } = (await this.signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry), prefix: this.env.prefix }); + const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry) }); return await signingClient.signAndBroadcast(address, msgs, fee ? fee : defaultFee, memo) } else { throw new Error(" Signer is not present."); diff --git a/ignite/pkg/cosmosgen/templates/root/package.json.tpl b/ignite/pkg/cosmosgen/templates/root/package.json.tpl index fbf415d830..8cd8cdea6b 100644 --- a/ignite/pkg/cosmosgen/templates/root/package.json.tpl +++ b/ignite/pkg/cosmosgen/templates/root/package.json.tpl @@ -10,23 +10,25 @@ "url": "http://www.apache.org/licenses/LICENSE-2.0" } ], - "main": "index.ts", + "main": "lib/index.js", "publishConfig": { "access": "public" }, - "dependencies": { - "@cosmjs/launchpad": "0.27.0", - "@cosmjs/proto-signing": "0.27.0", - "@cosmjs/stargate": "0.27.0", + "scripts": { + "build": "NODE_OPTIONS='--max-old-space-size=16384' tsc", + "postinstall": "npm run build" + }, + "dependencies": { + "@cosmjs/proto-signing": "0.31.1", + "@cosmjs/stargate": "0.31.1", "@keplr-wallet/types": "^0.11.3", "axios": "0.21.4", "buffer": "^6.0.3", "events": "^3.3.0" }, "peerDependencies": { - "@cosmjs/launchpad": "0.27.0", - "@cosmjs/proto-signing": "0.27.0", - "@cosmjs/stargate": "0.27.0" + "@cosmjs/proto-signing": "0.31.1", + "@cosmjs/stargate": "0.31.1" }, "devDependencies": { "@types/events": "^3.0.0", diff --git a/ignite/pkg/cosmosgen/templates/root/tsconfig.json.tpl b/ignite/pkg/cosmosgen/templates/root/tsconfig.json.tpl index 5e4ca71186..9f65e2249e 100644 --- a/ignite/pkg/cosmosgen/templates/root/tsconfig.json.tpl +++ b/ignite/pkg/cosmosgen/templates/root/tsconfig.json.tpl @@ -4,6 +4,7 @@ "module": "ES2020", "moduleResolution": "node", "outDir": "./lib", + "declaration": true, "allowSyntheticDefaultImports": true, "esModuleInterop": false, "strict": false,