@cosmwasm/ts-codegen 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -146,6 +146,7 @@ The `client` plugin will generate TS client classes for your contracts. This opt
146
146
  | option | description |
147
147
  | ----------------------------- | --------------------------------------------------- |
148
148
  | `client.enabled` | generate TS client classes for your contracts |
149
+ | `client.execExtendsQuery` | execute should extend query message clients |
149
150
 
150
151
  #### Client via CLI
151
152
 
@@ -79,8 +79,8 @@ var _default = /*#__PURE__*/function () {
79
79
  if (children.length > 0) {
80
80
  Client = (0, _case.pascal)("".concat(name, "Client"));
81
81
  Instance = (0, _case.pascal)("".concat(name, "Interface"));
82
- body.push(w.createExecuteInterface(context, Instance, ReadOnlyInstance, ExecuteMsg));
83
- body.push(w.createExecuteClass(context, Client, Instance, QueryClient, ExecuteMsg));
82
+ body.push(w.createExecuteInterface(context, Instance, context.options.client.execExtendsQuery ? ReadOnlyInstance : null, ExecuteMsg));
83
+ body.push(w.createExecuteClass(context, Client, Instance, context.options.client.execExtendsQuery ? QueryClient : null, ExecuteMsg));
84
84
  }
85
85
  }
86
86
 
@@ -43,8 +43,8 @@ export default (async (name, contractInfo, outPath, tsClientOptions) => {
43
43
  if (children.length > 0) {
44
44
  Client = pascal(`${name}Client`);
45
45
  Instance = pascal(`${name}Interface`);
46
- body.push(w.createExecuteInterface(context, Instance, ReadOnlyInstance, ExecuteMsg));
47
- body.push(w.createExecuteClass(context, Client, Instance, QueryClient, ExecuteMsg));
46
+ body.push(w.createExecuteInterface(context, Instance, context.options.client.execExtendsQuery ? ReadOnlyInstance : null, ExecuteMsg));
47
+ body.push(w.createExecuteClass(context, Client, Instance, context.options.client.execExtendsQuery ? QueryClient : null, ExecuteMsg));
48
48
  }
49
49
  }
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmwasm/ts-codegen",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "@cosmwasm/ts-codegen converts your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/cosmwasm/ts-codegen",
@@ -96,7 +96,7 @@
96
96
  "parse-package-name": "1.0.0",
97
97
  "rimraf": "3.0.2",
98
98
  "shelljs": "0.8.5",
99
- "wasm-ast-types": "^0.12.0"
99
+ "wasm-ast-types": "^0.13.0"
100
100
  },
101
- "gitHead": "59dcc054d241c6bf43d5a617b31c3cd5c4ecff6e"
101
+ "gitHead": "e46828bd476d30465a35a8021e611938abf89846"
102
102
  }
@@ -66,16 +66,17 @@ export default async (
66
66
  w.createExecuteInterface(
67
67
  context,
68
68
  Instance,
69
- ReadOnlyInstance,
69
+ context.options.client.execExtendsQuery ? ReadOnlyInstance : null,
70
70
  ExecuteMsg
71
71
  )
72
72
  );
73
+
73
74
  body.push(
74
75
  w.createExecuteClass(
75
76
  context,
76
77
  Client,
77
78
  Instance,
78
- QueryClient,
79
+ context.options.client.execExtendsQuery ? QueryClient : null,
79
80
  ExecuteMsg
80
81
  )
81
82
  );