@sap-ux/generator-adp 0.3.34 → 0.3.36
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
|
@@ -171,23 +171,17 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
171
171
|
this.baseAppInbounds = await (0, adp_tooling_1.getBaseAppInbounds)(this.configAnswers.application.id, this.prompter.provider);
|
|
172
172
|
}
|
|
173
173
|
const options = {
|
|
174
|
-
targetFolder: { default: defaultFolder },
|
|
174
|
+
targetFolder: { default: defaultFolder, hide: this.shouldCreateExtProject },
|
|
175
175
|
ui5ValidationCli: { hide: !this.isCli },
|
|
176
176
|
enableTypeScript: { hide: this.shouldCreateExtProject },
|
|
177
|
-
addFlpConfig: { hasBaseAppInbounds: !!this.baseAppInbounds }
|
|
177
|
+
addFlpConfig: { hasBaseAppInbounds: !!this.baseAppInbounds, hide: this.shouldCreateExtProject },
|
|
178
|
+
addDeployConfig: { hide: this.shouldCreateExtProject || !this.isCustomerBase }
|
|
178
179
|
};
|
|
179
180
|
const attributesQuestions = (0, attributes_1.getPrompts)(this.destinationPath(), promptConfig, options);
|
|
180
181
|
this.attributeAnswers = await this.prompt(attributesQuestions);
|
|
181
182
|
// Steps need to be updated here to be available after back navigation in Yeoman UI.
|
|
182
183
|
this._updateWizardStepsAfterNavigation();
|
|
183
184
|
this.logger.info(`Project Attributes: ${JSON.stringify(this.attributeAnswers, null, 2)}`);
|
|
184
|
-
if (this.attributeAnswers?.addFlpConfig) {
|
|
185
|
-
(0, subgenHelpers_1.addFlpGen)({
|
|
186
|
-
vscode: this.vscode,
|
|
187
|
-
projectRootPath: this._getProjectPath(),
|
|
188
|
-
inbounds: this.baseAppInbounds
|
|
189
|
-
}, this.composeWith.bind(this), this.logger, this.appWizard);
|
|
190
|
-
}
|
|
191
185
|
if (this.attributeAnswers.addDeployConfig) {
|
|
192
186
|
const client = (await this.systemLookup.getSystemByName(this.configAnswers.system))?.Client;
|
|
193
187
|
(0, subgenHelpers_1.addDeployGen)({
|
|
@@ -197,6 +191,13 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
197
191
|
client
|
|
198
192
|
}, this.composeWith.bind(this), this.logger, this.appWizard);
|
|
199
193
|
}
|
|
194
|
+
if (this.attributeAnswers?.addFlpConfig) {
|
|
195
|
+
(0, subgenHelpers_1.addFlpGen)({
|
|
196
|
+
vscode: this.vscode,
|
|
197
|
+
projectRootPath: this._getProjectPath(),
|
|
198
|
+
inbounds: this.baseAppInbounds
|
|
199
|
+
}, this.composeWith.bind(this), this.logger, this.appWizard);
|
|
200
|
+
}
|
|
200
201
|
}
|
|
201
202
|
async writing() {
|
|
202
203
|
try {
|
|
@@ -248,6 +249,9 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
async end() {
|
|
252
|
+
if (this.shouldCreateExtProject) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
251
255
|
const telemetryData = fiori_generator_shared_1.TelemetryHelper.createTelemetryData({
|
|
252
256
|
appType: 'generator-adp',
|
|
253
257
|
...this.options.telemetryData
|
|
@@ -362,7 +366,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
362
366
|
(0, steps_1.updateWizardSteps)(this.prompts, (0, steps_1.getDeployPage)(), (0, i18n_1.t)('yuiNavSteps.projectAttributesName'), this.attributeAnswers.addDeployConfig);
|
|
363
367
|
}
|
|
364
368
|
if (!flpPagesExist) {
|
|
365
|
-
(0, steps_1.updateFlpWizardSteps)(!!this.baseAppInbounds, this.prompts, this.attributeAnswers.projectName, this.attributeAnswers.addFlpConfig);
|
|
369
|
+
(0, steps_1.updateFlpWizardSteps)(!!this.baseAppInbounds, this.prompts, this.attributeAnswers.projectName, !!this.attributeAnswers.addFlpConfig);
|
|
366
370
|
}
|
|
367
371
|
}
|
|
368
372
|
}
|
|
@@ -19,9 +19,9 @@ export declare function getFlpPages(showTileSettingsPage: boolean, projectName:
|
|
|
19
19
|
* @param {boolean} hasBaseAppInbound - Indicates if the base app inbound exists.
|
|
20
20
|
* @param {YeomanUiSteps} prompts - The Yeoman UI Prompts container object.
|
|
21
21
|
* @param {string} projectName - The name of the project.
|
|
22
|
-
* @param {boolean}
|
|
22
|
+
* @param {boolean} shouldAdd - Whether to add (`true`) or remove (`false`) the steps.
|
|
23
23
|
*/
|
|
24
|
-
export declare function updateFlpWizardSteps(hasBaseAppInbound: boolean, prompts: YeomanUiSteps, projectName: string, shouldAdd
|
|
24
|
+
export declare function updateFlpWizardSteps(hasBaseAppInbound: boolean, prompts: YeomanUiSteps, projectName: string, shouldAdd: boolean): void;
|
|
25
25
|
/**
|
|
26
26
|
* Returns the deploy configuration page step.
|
|
27
27
|
*
|
|
@@ -51,9 +51,9 @@ function getFlpPages(showTileSettingsPage, projectName) {
|
|
|
51
51
|
* @param {boolean} hasBaseAppInbound - Indicates if the base app inbound exists.
|
|
52
52
|
* @param {YeomanUiSteps} prompts - The Yeoman UI Prompts container object.
|
|
53
53
|
* @param {string} projectName - The name of the project.
|
|
54
|
-
* @param {boolean}
|
|
54
|
+
* @param {boolean} shouldAdd - Whether to add (`true`) or remove (`false`) the steps.
|
|
55
55
|
*/
|
|
56
|
-
function updateFlpWizardSteps(hasBaseAppInbound, prompts, projectName, shouldAdd
|
|
56
|
+
function updateFlpWizardSteps(hasBaseAppInbound, prompts, projectName, shouldAdd) {
|
|
57
57
|
const pages = getFlpPages(hasBaseAppInbound, projectName);
|
|
58
58
|
if (pages.length === 2) {
|
|
59
59
|
updateWizardSteps(prompts, pages[0], (0, i18n_1.t)('yuiNavSteps.deployConfigName'), shouldAdd);
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/generator-adp",
|
|
3
3
|
"displayName": "SAPUI5 Adaptation Project",
|
|
4
|
+
"homepage": "https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/ada9567b767941aba8d49fdb4fdedea7.html",
|
|
4
5
|
"description": "Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.",
|
|
5
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.36",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -29,10 +30,10 @@
|
|
|
29
30
|
"i18next": "23.5.1",
|
|
30
31
|
"yeoman-generator": "5.10.0",
|
|
31
32
|
"uuid": "10.0.0",
|
|
32
|
-
"@sap-ux/
|
|
33
|
+
"@sap-ux/adp-tooling": "0.14.35",
|
|
33
34
|
"@sap-ux/axios-extension": "1.22.3",
|
|
34
|
-
"@sap-ux/adp-tooling": "0.14.34",
|
|
35
35
|
"@sap-ux/feature-toggle": "0.3.0",
|
|
36
|
+
"@sap-ux/btp-utils": "1.1.0",
|
|
36
37
|
"@sap-ux/inquirer-common": "0.7.18",
|
|
37
38
|
"@sap-ux/logger": "0.7.0",
|
|
38
39
|
"@sap-ux/project-access": "1.30.4",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"@sap-ux/system-access": "0.6.9",
|
|
41
42
|
"@sap-ux/project-input-validator": "0.6.7",
|
|
42
43
|
"@sap-ux/fiori-generator-shared": "0.12.13",
|
|
43
|
-
"@sap-ux/adp-flp-config-sub-generator": "0.1.
|
|
44
|
+
"@sap-ux/adp-flp-config-sub-generator": "0.1.35"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@jest/types": "29.6.3",
|