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

feat(cf-gen): adds new sub generator to @sap-ux/cf-deploy-config-sub-generator #2844

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
9 changes: 9 additions & 0 deletions .changeset/lovely-planets-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@sap-ux/cf-deploy-config-sub-generator': minor
'@sap-ux/cf-deploy-config-inquirer': minor
'@sap-ux/abap-deploy-config-sub-generator': patch
'@sap-ux/deploy-config-generator-shared': patch
'@sap-ux/flp-config-sub-generator': patch
---

adds new cf generator
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"configNotFound": "No existing deployment configuration file found",
"indexExists": "'webapp/index.html' already exists and won't be overwritten",
"initFailed": "Initializing failed, unable to process project configuration. {{- error}}",
"initTelemetry": "Initializing telemetry",
"initTelemetry": "Initializing telemetry in ABAP deployment configuration generator",
"appRootPath": "App loaded from {{- appRootPath}}"
}
}
2 changes: 2 additions & 0 deletions packages/cf-deploy-config-inquirer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,7 @@ export {
getAppRouterPrompts,
type CfAppRouterDeployConfigPromptOptions,
RouterModuleType,
type CfDeployConfigQuestions,
type CfDeployConfigAnswers,
type CfAppRouterDeployConfigAnswers
};
4 changes: 2 additions & 2 deletions packages/cf-deploy-config-inquirer/src/prompts/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function getDestinationNamePrompt(
*
* @returns {ConfirmQuestion<CfDeployConfigAnswers>} Returns a confirmation question object for configuring the application router.
*/
function getAddManagedRouterPrompt(): CfDeployConfigQuestions {
function getAddManagedAppRouterPrompt(): CfDeployConfigQuestions {
return {
type: 'confirm',
name: promptNames.addManagedAppRouter,
Expand Down Expand Up @@ -134,7 +134,7 @@ export async function getQuestions(

if (addManagedAppRouter) {
log?.info(t('info.addManagedAppRouter'));
questions.push(getAddManagedRouterPrompt());
questions.push(getAddManagedAppRouterPrompt());
}

if (addOverwriteQuestion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"emptyDestinationNameError": "You must provide a destination name in order to continue.",
"destinationNameError": "The destination name must only contain letters, digits, dashes and underscores.",
"destinationNameLengthError": "Destination name cannot contain more than 200 characters",
"folderDoesNotExistError": "Folder path does not exist: {{filePath}}",
"folderDoesNotExistError": "Folder path does not exist: {{- filePath}}",
"noMtaIdError": "MTA ID cannot be empty",
"invalidMtaIdError": "The ID can only contain letters, numbers, dashes, periods and underscores (but no spaces).",
"mtaIdAlreadyExistError": "A folder with same name already exist at {{- mtaPath}}",
Expand Down
6 changes: 3 additions & 3 deletions packages/cf-deploy-config-inquirer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export interface CfDeployConfigAnswers {
/** The selected Cloud Foundry destination. */
destinationName?: string;
/** Indicates whether the user opted to include a managed application router. */
addManagedRouter?: boolean;
addManagedAppRouter?: boolean;
/** Indicates whether the user opted to overwrite the destination. */
overwrite?: boolean;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ export interface CfSystemChoice {
/** Value associated with the system choice. */
value: string;
/** Flag indicating if the system choice is an SCP destination. */
scp: boolean;
scp?: boolean;
/** URL associated with the system choice. */
url: string;
url?: string;
}
2 changes: 1 addition & 1 deletion packages/cf-deploy-config-inquirer/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('index', () => {
it('should prompt with inquirer adapter', async () => {
const answers: CfDeployConfigAnswers = {
destinationName: 'testDestination',
addManagedRouter: true,
addManagedAppRouter: true,
overwrite: true
};

Expand Down
2 changes: 1 addition & 1 deletion packages/cf-deploy-config-inquirer/test/prompts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('Prompt Generation Tests', () => {
});
});

describe('getAddManagedRouterPrompt', () => {
describe('getaddManagedAppRouterPrompt', () => {
beforeEach(() => {
promptOptions = {
...promptOptions,
Expand Down
9 changes: 8 additions & 1 deletion packages/cf-deploy-config-sub-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue"
},
"license": "Apache-2.0",
"main": "generators/app-router/index.js",
"main": "generators/app/index.js",
"scripts": {
"build": "tsc --build",
"clean": "rimraf --glob generators test/test-output coverage *.tsbuildinfo",
Expand All @@ -31,11 +31,16 @@
],
"dependencies": {
"@sap-devx/yeoman-ui-types": "1.14.4",
"@sap-ux/btp-utils": "workspace:*",
"@sap-ux/cf-deploy-config-writer": "workspace:*",
"@sap-ux/cf-deploy-config-inquirer": "workspace:*",
"@sap-ux/deploy-config-generator-shared": "workspace:*",
"@sap-ux/feature-toggle": "workspace:*",
"@sap-ux/fiori-generator-shared": "workspace:*",
"@sap-ux/i18n": "workspace:*",
"@sap-ux/inquirer-common": "workspace:*",
"@sap-ux/project-access": "workspace:*",
"@sap-ux/ui5-config": "workspace:*",
"hasbin": "1.2.3",
"i18next": "23.5.1",
"yeoman-generator": "5.10.0"
Expand All @@ -45,6 +50,8 @@
"@types/hasbin": "1.2.2",
"@types/inquirer": "8.2.6",
"@types/js-yaml": "4.0.9",
"@types/mem-fs": "1.1.2",
"@types/mem-fs-editor": "7.0.1",
"@types/yeoman-generator": "5.2.11",
"@types/yeoman-environment": "2.10.11",
"@types/yeoman-test": "4.0.6",
Expand Down
Loading
Loading