@cosmwasm/ts-codegen 0.11.1 → 0.13.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.
@@ -17,7 +17,7 @@ var _index = _interopRequireDefault(require("../index"));
|
|
17
17
|
|
18
18
|
var _default = /*#__PURE__*/function () {
|
19
19
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(argv) {
|
20
|
-
var questions, _yield$prompt, schema, out, name, plugin, bundle, questions2, _yield$prompt2, optionalClient, version, questions3, _yield$prompt3, mutations, questions4, _yield$prompt4, bundleFile, bundleScope, options;
|
20
|
+
var questions, _yield$prompt, schema, out, name, plugin, bundle, questions2, _yield$prompt2, optionalClient, version, queryKeys, questions3, _yield$prompt3, mutations, questions4, _yield$prompt4, bundleFile, bundleScope, options;
|
21
21
|
|
22
22
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
23
23
|
while (1) {
|
@@ -82,6 +82,11 @@ var _default = /*#__PURE__*/function () {
|
|
82
82
|
message: 'which react-query version?',
|
83
83
|
"default": 'v3',
|
84
84
|
choices: ['v3', 'v4']
|
85
|
+
}, {
|
86
|
+
type: 'confirm',
|
87
|
+
name: 'queryKeys',
|
88
|
+
message: 'queryKeys?',
|
89
|
+
"default": false
|
85
90
|
}]);
|
86
91
|
}
|
87
92
|
|
@@ -93,6 +98,7 @@ var _default = /*#__PURE__*/function () {
|
|
93
98
|
_yield$prompt2 = _context.sent;
|
94
99
|
optionalClient = _yield$prompt2.optionalClient;
|
95
100
|
version = _yield$prompt2.version;
|
101
|
+
queryKeys = _yield$prompt2.queryKeys;
|
96
102
|
questions3 = [];
|
97
103
|
|
98
104
|
if (version === 'v4') {
|
@@ -106,10 +112,10 @@ var _default = /*#__PURE__*/function () {
|
|
106
112
|
}
|
107
113
|
|
108
114
|
;
|
109
|
-
_context.next =
|
115
|
+
_context.next = 25;
|
110
116
|
return (0, _prompt.prompt)(questions3, argv);
|
111
117
|
|
112
|
-
case
|
118
|
+
case 25:
|
113
119
|
_yield$prompt3 = _context.sent;
|
114
120
|
mutations = _yield$prompt3.mutations;
|
115
121
|
///////// END REACT QUERY
|
@@ -131,10 +137,10 @@ var _default = /*#__PURE__*/function () {
|
|
131
137
|
}
|
132
138
|
|
133
139
|
;
|
134
|
-
_context.next =
|
140
|
+
_context.next = 32;
|
135
141
|
return (0, _prompt.prompt)(questions4, argv);
|
136
142
|
|
137
|
-
case
|
143
|
+
case 32:
|
138
144
|
_yield$prompt4 = _context.sent;
|
139
145
|
bundleFile = _yield$prompt4.bundleFile;
|
140
146
|
bundleScope = _yield$prompt4.bundleScope;
|
@@ -149,6 +155,7 @@ var _default = /*#__PURE__*/function () {
|
|
149
155
|
reactQuery: {
|
150
156
|
enabled: plugin.includes('react-query'),
|
151
157
|
optionalClient: optionalClient,
|
158
|
+
queryKeys: queryKeys,
|
152
159
|
version: version,
|
153
160
|
mutations: mutations
|
154
161
|
},
|
@@ -164,7 +171,7 @@ var _default = /*#__PURE__*/function () {
|
|
164
171
|
bundleFile: bundleFile
|
165
172
|
}
|
166
173
|
};
|
167
|
-
_context.next =
|
174
|
+
_context.next = 38;
|
168
175
|
return (0, _index["default"])({
|
169
176
|
contracts: [{
|
170
177
|
name: name,
|
@@ -174,7 +181,7 @@ var _default = /*#__PURE__*/function () {
|
|
174
181
|
options: options
|
175
182
|
});
|
176
183
|
|
177
|
-
case
|
184
|
+
case 38:
|
178
185
|
case "end":
|
179
186
|
return _context.stop();
|
180
187
|
}
|
package/main/utils/schemas.js
CHANGED
@@ -19,7 +19,7 @@ var _fs = require("fs");
|
|
19
19
|
|
20
20
|
var _cleanse = require("./cleanse");
|
21
21
|
|
22
|
-
var _jsonSchemaToTypescript = require("json-schema-to-typescript");
|
22
|
+
var _jsonSchemaToTypescript = require("@pyramation/json-schema-to-typescript");
|
23
23
|
|
24
24
|
var _parse = require("./parse");
|
25
25
|
|
@@ -57,13 +57,19 @@ export default (async argv => {
|
|
57
57
|
message: 'which react-query version?',
|
58
58
|
default: 'v3',
|
59
59
|
choices: ['v3', 'v4']
|
60
|
+
}, {
|
61
|
+
type: 'confirm',
|
62
|
+
name: 'queryKeys',
|
63
|
+
message: 'queryKeys?',
|
64
|
+
default: false
|
60
65
|
}]);
|
61
66
|
}
|
62
67
|
|
63
68
|
;
|
64
69
|
const {
|
65
70
|
optionalClient,
|
66
|
-
version
|
71
|
+
version,
|
72
|
+
queryKeys
|
67
73
|
} = await prompt(questions2, argv);
|
68
74
|
const questions3 = [];
|
69
75
|
|
@@ -115,6 +121,7 @@ export default (async argv => {
|
|
115
121
|
reactQuery: {
|
116
122
|
enabled: plugin.includes('react-query'),
|
117
123
|
optionalClient,
|
124
|
+
queryKeys,
|
118
125
|
version,
|
119
126
|
mutations
|
120
127
|
},
|
package/module/utils/schemas.js
CHANGED
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
7
7
|
import { sync as glob } from 'glob';
|
8
8
|
import { readFileSync } from 'fs';
|
9
9
|
import { cleanse } from './cleanse';
|
10
|
-
import { compile } from 'json-schema-to-typescript';
|
10
|
+
import { compile } from '@pyramation/json-schema-to-typescript';
|
11
11
|
import { parser } from './parse';
|
12
12
|
;
|
13
13
|
export const readSchemas = async ({
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cosmwasm/ts-codegen",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.13.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",
|
@@ -80,20 +80,21 @@
|
|
80
80
|
"@babel/runtime": "^7.18.9",
|
81
81
|
"@babel/traverse": "7.18.11",
|
82
82
|
"@babel/types": "7.18.10",
|
83
|
+
"@pyramation/json-schema-to-typescript": " 11.0.4",
|
83
84
|
"case": "1.6.3",
|
84
85
|
"dargs": "7.0.0",
|
86
|
+
"deepmerge": "4.2.2",
|
85
87
|
"dotty": "0.1.2",
|
86
88
|
"fuzzy": "0.1.3",
|
87
89
|
"glob": "8.0.3",
|
88
90
|
"inquirerer": "0.1.3",
|
89
|
-
"json-schema-to-typescript": "11.0.1",
|
90
91
|
"long": "^5.2.0",
|
91
92
|
"minimist": "1.2.6",
|
92
93
|
"mkdirp": "1.0.4",
|
93
94
|
"parse-package-name": "1.0.0",
|
94
95
|
"rimraf": "3.0.2",
|
95
96
|
"shelljs": "0.8.5",
|
96
|
-
"wasm-ast-types": "^0.
|
97
|
+
"wasm-ast-types": "^0.9.0"
|
97
98
|
},
|
98
|
-
"gitHead": "
|
99
|
+
"gitHead": "3b7ca02c9283c346a365d8426d3034af355afcac"
|
99
100
|
}
|