Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tidy-parts-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@asyncapi/cli': minor
---

Added --compile flag to generate:fromTemplate command
8 changes: 7 additions & 1 deletion src/apps/cli/commands/generate/fromTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Args } from '@oclif/core';
import { Args, Flags } from '@oclif/core';
import { BaseGeneratorCommand } from '@cli/internal/base/BaseGeneratorCommand';
import { load, Specification } from '@models/SpecificationFile';
import { ValidationError } from '@errors/validation-error';
Expand All @@ -19,6 +19,11 @@ export default class Template extends BaseGeneratorCommand {
static readonly flags = {
...fromTemplateFlags(),
...BaseGeneratorCommand.flags,
compile: Flags.boolean({
description: 'Disable compilation for faster generation.',
default: true,
allowNo: true,
}),
};

static args = {
Expand Down Expand Up @@ -53,6 +58,7 @@ export default class Template extends BaseGeneratorCommand {
);

const options = await this.buildGeneratorOptions(flags, parsedFlags);
(options as any).compile = flags.compile;

// Apply proxy configuration using base class method
asyncapi = this.applyProxyConfiguration(asyncapi, proxyHost, proxyPort);
Expand Down