@cosmwasm/ts-codegen 0.13.0 → 0.13.3

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.
@@ -433,9 +433,10 @@ var TSBuilder = /*#__PURE__*/function () {
433
433
  ast = (0, _bundler.recursiveModuleBundle)(bundleVariables);
434
434
  code = (0, _generator["default"])(t.program([].concat(importPaths, (0, _toConsumableArray2["default"])(ast)))).code;
435
435
  (0, _mkdirp.sync)(this.outPath);
436
+ if (code.trim() === '') code = 'export {};';
436
437
  (0, _fs.writeFileSync)((0, _path.join)(this.outPath, bundleFile), _header.header + code);
437
438
 
438
- case 9:
439
+ case 10:
439
440
  case "end":
440
441
  return _context7.stop();
441
442
  }
@@ -127,7 +127,7 @@ var _default = /*#__PURE__*/function () {
127
127
  type: 'string',
128
128
  name: 'bundleFile',
129
129
  message: 'bundleFile?',
130
- "default": 'bundle.ts'
130
+ "default": 'index.ts'
131
131
  }, {
132
132
  type: 'string',
133
133
  name: 'bundleScope',
@@ -92,7 +92,7 @@ var _default = /*#__PURE__*/function () {
92
92
  type: 'checkbox',
93
93
  name: 'pkg',
94
94
  message: 'which chain contracts do you want to support?',
95
- choices: ['stargaze-claim', 'stargaze-ics721', 'stargaze-minter', 'stargaze-royalty-group', 'stargaze-sg721', 'stargaze-whitelist'].map(function (name) {
95
+ choices: ['stargaze-claim', 'stargaze-ics721', 'stargaze-minter', 'stargaze-royalty-group', 'stargaze-sg721', 'stargaze-whitelist', 'wasmswap'].map(function (name) {
96
96
  return {
97
97
  name: name,
98
98
  value: "@cosmjson/".concat(name)
@@ -170,8 +170,9 @@ export class TSBuilder {
170
170
  createFileBundle(`${this.options.bundle.scope}.${file.contract}`, file.localname, bundleFile, importPaths, bundleVariables);
171
171
  });
172
172
  const ast = recursiveModuleBundle(bundleVariables);
173
- const code = generate(t.program([...importPaths, ...ast])).code;
173
+ let code = generate(t.program([...importPaths, ...ast])).code;
174
174
  mkdirp(this.outPath);
175
+ if (code.trim() === '') code = 'export {};';
175
176
  writeFileSync(join(this.outPath, bundleFile), header + code);
176
177
  }
177
178
 
@@ -96,7 +96,7 @@ export default (async argv => {
96
96
  type: 'string',
97
97
  name: 'bundleFile',
98
98
  message: 'bundleFile?',
99
- default: 'bundle.ts'
99
+ default: 'index.ts'
100
100
  }, {
101
101
  type: 'string',
102
102
  name: 'bundleScope',
@@ -50,7 +50,7 @@ export default (async argv => {
50
50
  type: 'checkbox',
51
51
  name: 'pkg',
52
52
  message: 'which chain contracts do you want to support?',
53
- choices: ['stargaze-claim', 'stargaze-ics721', 'stargaze-minter', 'stargaze-royalty-group', 'stargaze-sg721', 'stargaze-whitelist'].map(name => {
53
+ choices: ['stargaze-claim', 'stargaze-ics721', 'stargaze-minter', 'stargaze-royalty-group', 'stargaze-sg721', 'stargaze-whitelist', 'wasmswap'].map(name => {
54
54
  return {
55
55
  name,
56
56
  value: `@cosmjson/${name}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmwasm/ts-codegen",
3
- "version": "0.13.0",
3
+ "version": "0.13.3",
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,5 +96,5 @@
96
96
  "shelljs": "0.8.5",
97
97
  "wasm-ast-types": "^0.9.0"
98
98
  },
99
- "gitHead": "3b7ca02c9283c346a365d8426d3034af355afcac"
99
+ "gitHead": "50046a43a3c9464fb8f8f84522d6433f25b1dc50"
100
100
  }