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

move utils/blueprint to generator/base/internal #21000

Merged
merged 1 commit into from
Feb 1, 2023
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
2 changes: 1 addition & 1 deletion cli/environment-builder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { fileURLToPath } from 'url';

import { CLI_NAME, logger } from './utils.mjs';
import { packageNameToNamespace } from '../generators/base/support/index.mjs';
import { parseBlueprintInfo, loadBlueprintsFromConfiguration, mergeBlueprints } from '../utils/blueprint.mjs';
import { parseBlueprintInfo, loadBlueprintsFromConfiguration, mergeBlueprints } from '../generators/base/internal/index.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand Down
2 changes: 1 addition & 1 deletion generators/base/generator-base-blueprint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import semver from 'semver';
import { packageJson } from '../../lib/index.mjs';
import { packageNameToNamespace } from './support/index.mjs';
import JHipsterBaseGenerator from './generator-base.mjs';
import { mergeBlueprints, parseBluePrints, loadBlueprintsFromConfiguration, normalizeBlueprintName } from '../../utils/blueprint.mjs';
import { mergeBlueprints, parseBluePrints, loadBlueprintsFromConfiguration, normalizeBlueprintName } from './internal/index.mjs';
import { PRIORITY_NAMES } from './priorities.mjs';

/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'yeoman-assert';
import { mergeBlueprints, normalizeBlueprintName, parseBluePrints, removeBlueprintDuplicates } from '../utils/blueprint.mjs';
import { mergeBlueprints, normalizeBlueprintName, parseBluePrints, removeBlueprintDuplicates } from './blueprint.mjs';

describe('utils - blueprint', () => {
describe('generator - base - internal - blueprint', () => {
describe('::parseBluePrints', () => {
it('does nothing if an array', () => {
const expected = [{ name: 'generator-jhipster-foo', version: 'latest' }];
Expand Down
19 changes: 19 additions & 0 deletions generators/base/internal/index.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2013-2023 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './blueprint.mjs';
2 changes: 1 addition & 1 deletion generators/upgrade/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import BaseGenerator from '../base/index.mjs';
import { upgradeFilesTask as upgradeLanguagesFilesTask } from '../languages/index.mjs';
import { SERVER_MAIN_RES_DIR } from '../generator-constants.mjs';
import statistics from '../statistics.mjs';
import { parseBluePrints } from '../../utils/blueprint.mjs';
import { parseBluePrints } from '../base/internal/index.mjs';
import { packageJson } from '../../lib/index.mjs';

/* Constants used throughout */
Expand Down