@asyncapi/generator 1.15.0 → 1.15.1

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.
Files changed (2) hide show
  1. package/lib/generator.js +7 -5
  2. package/package.json +1 -1
package/lib/generator.js CHANGED
@@ -168,7 +168,7 @@ class Generator {
168
168
  */
169
169
  async generate(asyncapiDocument, parseOptions = {}) {
170
170
  this.validateAsyncAPIDocument(asyncapiDocument);
171
- this.setupOutput();
171
+ await this.setupOutput();
172
172
  this.setLogLevel();
173
173
 
174
174
  await this.installAndSetupTemplate();
@@ -200,13 +200,15 @@ class Generator {
200
200
  *
201
201
  * @example
202
202
  * const generator = new Generator();
203
- * generator.setupOutput();
204
- *
203
+ * await generator.setupOutput();
204
+ *
205
+ * @async
206
+ *
205
207
  * @throws {Error} If 'output' is set to 'string' without providing 'entrypoint'.
206
208
  */
207
- setupOutput() {
209
+ async setupOutput() {
208
210
  if (this.output === 'fs') {
209
- this.setupFSOutput();
211
+ await this.setupFSOutput();
210
212
  } else if (this.output === 'string' && this.entrypoint === undefined) {
211
213
  throw new Error('Parameter entrypoint is required when using output = "string"');
212
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyncapi/generator",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "The AsyncAPI generator. It can generate documentation, code, anything!",
5
5
  "main": "./lib/generator.js",
6
6
  "bin": {