Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate-blueprint: enable queueCommandTasks #27384

Merged
merged 1 commit into from
Sep 23, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,25 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import { asCommand } from 'generator-jhipster';
<%_ if (!sbs && !customGenerator) { _%>
import { command as jhipsterCommand } from 'generator-jhipster/generators/<%- subGenerator %>';

<%_ } _%>
/**
* @type {import('generator-jhipster').JHipsterCommandDefinition}
*/
const command = {
options: {

export default asCommand({
<%_ if (!sbs && !customGenerator) { _%>
options: {
...jhipsterCommand.options,
<%_ } _%>
},
<%_ } _%>
configs: {
<%_ if (!sbs && !customGenerator) { _%>
...jhipsterCommand.configs,
<%_ } _%>
},
arguments: {
<%_ if (!sbs && !customGenerator) { _%>
arguments: {
...jhipsterCommand.arguments,
<%_ } _%>
},
};

export default command;
<%_ } _%>
});
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ export async function createGenerator(env) {
<%_ } else { _%>
export default class extends <%= generatorClass %>Generator {
<%_ } _%>
<%_ if (sbs) { _%>
constructor(args, opts, features) {
super(args, opts, { ...features, sbsBlueprint: true });
}

<%_ } else if (!customGenerator) { _%>
constructor(args, opts, features) {
super(args, opts, {
...features,
queueCommandTasks: true,
<%_ if (sbs) { _%>
sbsBlueprint: true,
<%_ } else if (!customGenerator) { _%>
checkBlueprint: true,
// Dropped it once migration is done.
jhipster7Migration: true,
<%_ } _%>
});
}

<%_ if (!sbs && !customGenerator) { _%>
async beforeQueue() {
await super.beforeQueue();
}
Expand All @@ -82,10 +82,7 @@ export default class extends <%= generatorClass %>Generator {
{ application }
<%_ } _%>
) {
<%_ if (priority.name === 'initializing') { _%>
this.parseJHipsterArguments(command.arguments);
this.parseJHipsterOptions(command.options);
<%_ } else if (priority.name === 'writing') { _%>
<%_ if (priority.name === 'writing') { _%>
await this.writeFiles({
sections: {
files: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@
limitations under the License.
-%>
export { <%- application.dynamic ? 'createGenerator' : 'default' %> } from './generator.<%- js ? '' : 'm' %>js';
<%_ if (priorities.find(priority => priority.name === 'initializing')) { _%>
export { default as command } from './command.<%- js ? '' : 'm' %>js';
<%_ } _%>
Loading