@sap-ux/cf-deploy-config-sub-generator 0.1.11 → 0.1.12
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.
package/generators/app/index.js
CHANGED
|
@@ -19,7 +19,6 @@ const project_access_1 = require("@sap-ux/project-access");
|
|
|
19
19
|
const telemetryEvents_1 = require("../telemetryEvents");
|
|
20
20
|
const questions_1 = require("./questions");
|
|
21
21
|
Object.defineProperty(exports, "getCFQuestions", { enumerable: true, get: function () { return questions_1.getCFQuestions; } });
|
|
22
|
-
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
23
22
|
/**
|
|
24
23
|
* Cloud Foundry deployment configuration generator.
|
|
25
24
|
*/
|
|
@@ -85,9 +84,6 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
85
84
|
if (!this.launchDeployConfigAsSubGenerator) {
|
|
86
85
|
await this._init();
|
|
87
86
|
}
|
|
88
|
-
else {
|
|
89
|
-
await this._processProjectConfigs();
|
|
90
|
-
}
|
|
91
87
|
}
|
|
92
88
|
async _init() {
|
|
93
89
|
// mta executable is required as mta-lib is used
|
|
@@ -147,13 +143,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
147
143
|
const isCAPMissingMTA = this.isCap && this.projectRoot && !this.mtaPath;
|
|
148
144
|
if (isCAPMissingMTA) {
|
|
149
145
|
deploy_config_generator_shared_1.DeploymentGenerator.logger?.debug((0, utils_1.t)('cfGen.debug.capMissingMTA'));
|
|
150
|
-
|
|
151
|
-
let questions = (await (0, questions_1.getCFApprouterQuestionsForCap)({
|
|
152
|
-
projectRoot: this.projectRoot ?? process.cwd()
|
|
153
|
-
}));
|
|
154
|
-
questions = (0, inquirer_common_1.withCondition)(questions, (answers) => answers.addCapMtaContinue === true);
|
|
155
|
-
questions.unshift(...(0, deploy_config_generator_shared_1.getConfirmMtaContinuePrompt)());
|
|
156
|
-
this.appRouterAnswers = (await this.prompt(questions));
|
|
146
|
+
this.appRouterAnswers = (await this.prompt(await (0, questions_1.getCAPMTAQuestions)({ projectRoot: this.projectRoot ?? process.cwd() })));
|
|
157
147
|
if (this.appRouterAnswers.addCapMtaContinue !== true) {
|
|
158
148
|
this.abort = true;
|
|
159
149
|
return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CfDeployConfigQuestions } from '@sap-ux/cf-deploy-config-inquirer';
|
|
2
2
|
import type { ApiHubConfig } from '@sap-ux/cf-deploy-config-writer';
|
|
3
|
+
import type { Question } from 'inquirer';
|
|
3
4
|
/**
|
|
4
5
|
* Fetches the Cloud Foundry deployment configuration questions.
|
|
5
6
|
*
|
|
@@ -21,13 +22,13 @@ export declare function getCFQuestions({ projectRoot, isAbapDirectServiceBinding
|
|
|
21
22
|
apiHubConfig?: ApiHubConfig;
|
|
22
23
|
}): Promise<CfDeployConfigQuestions[]>;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* Generate CF Approuter questions for CAP project with an existing HTML5 app and missing MTA configuration.
|
|
25
26
|
*
|
|
26
27
|
* @param options - the options required for retrieving the prompts.
|
|
27
28
|
* @param options.projectRoot - the root path of the project.
|
|
28
|
-
* @returns the cf approuter config questions
|
|
29
|
+
* @returns the cf approuter config questions, restricting prompts being shown to the user
|
|
29
30
|
*/
|
|
30
|
-
export declare function
|
|
31
|
+
export declare function getCAPMTAQuestions({ projectRoot }: {
|
|
31
32
|
projectRoot: string;
|
|
32
|
-
}): Promise<
|
|
33
|
+
}): Promise<Question[]>;
|
|
33
34
|
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getCAPMTAQuestions = exports.getCFQuestions = void 0;
|
|
4
4
|
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
5
5
|
const deploy_config_generator_shared_1 = require("@sap-ux/deploy-config-generator-shared");
|
|
6
6
|
const project_access_1 = require("@sap-ux/project-access");
|
|
@@ -8,6 +8,7 @@ const cf_deploy_config_inquirer_1 = require("@sap-ux/cf-deploy-config-inquirer")
|
|
|
8
8
|
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
9
9
|
const utils_1 = require("./utils");
|
|
10
10
|
const utils_2 = require("../utils");
|
|
11
|
+
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
11
12
|
/**
|
|
12
13
|
* Fetches the Cloud Foundry deployment configuration questions.
|
|
13
14
|
*
|
|
@@ -65,5 +66,21 @@ async function getCFApprouterQuestionsForCap({ projectRoot }) {
|
|
|
65
66
|
};
|
|
66
67
|
return (0, cf_deploy_config_inquirer_1.getAppRouterPrompts)(appRouterPromptOptions);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Generate CF Approuter questions for CAP project with an existing HTML5 app and missing MTA configuration.
|
|
71
|
+
*
|
|
72
|
+
* @param options - the options required for retrieving the prompts.
|
|
73
|
+
* @param options.projectRoot - the root path of the project.
|
|
74
|
+
* @returns the cf approuter config questions, restricting prompts being shown to the user
|
|
75
|
+
*/
|
|
76
|
+
async function getCAPMTAQuestions({ projectRoot }) {
|
|
77
|
+
// If launched as root generator, add a prompt to allow user decide if they want to add an MTA config
|
|
78
|
+
let questions = (await getCFApprouterQuestionsForCap({
|
|
79
|
+
projectRoot
|
|
80
|
+
}));
|
|
81
|
+
questions = (0, inquirer_common_1.withCondition)(questions, (answers) => answers.addCapMtaContinue === true);
|
|
82
|
+
questions.unshift(...(0, deploy_config_generator_shared_1.getConfirmMtaContinuePrompt)());
|
|
83
|
+
return questions;
|
|
84
|
+
}
|
|
85
|
+
exports.getCAPMTAQuestions = getCAPMTAQuestions;
|
|
69
86
|
//# sourceMappingURL=questions.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/cf-deploy-config-sub-generator",
|
|
3
3
|
"description": "Generators for configuring Cloud Foundry deployment configuration",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"yeoman-generator": "5.10.0",
|
|
26
26
|
"@sap-ux/btp-utils": "1.0.1",
|
|
27
27
|
"@sap-ux/cf-deploy-config-writer": "0.1.12",
|
|
28
|
-
"@sap-ux/cf-deploy-config-inquirer": "0.2.8",
|
|
29
28
|
"@sap-ux/deploy-config-generator-shared": "0.0.27",
|
|
29
|
+
"@sap-ux/cf-deploy-config-inquirer": "0.2.8",
|
|
30
30
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
31
31
|
"@sap-ux/fiori-generator-shared": "0.9.0",
|
|
32
32
|
"@sap-ux/i18n": "0.2.1",
|
|
33
|
-
"@sap-ux/inquirer-common": "0.6.19",
|
|
34
33
|
"@sap-ux/project-access": "1.29.8",
|
|
35
|
-
"@sap-ux/ui5-config": "0.26.2"
|
|
34
|
+
"@sap-ux/ui5-config": "0.26.2",
|
|
35
|
+
"@sap-ux/inquirer-common": "0.6.19"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@jest/types": "29.6.3",
|