@sap-ux/adp-flp-config-sub-generator 1.0.29 → 1.0.30
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.d.ts +6 -0
- package/generators/app/index.js +17 -2
- package/package.json +3 -3
|
@@ -26,6 +26,7 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
26
26
|
private tileSettingsAnswers?;
|
|
27
27
|
private provider;
|
|
28
28
|
private isCfProject;
|
|
29
|
+
private systemUI5Version;
|
|
29
30
|
/**
|
|
30
31
|
* Creates an instance of the generator.
|
|
31
32
|
*
|
|
@@ -43,6 +44,11 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
43
44
|
* @returns {void}
|
|
44
45
|
*/
|
|
45
46
|
private _promptAuthentication;
|
|
47
|
+
/**
|
|
48
|
+
* Fetches and stores the system UI5 version. Swallows errors at debug level so a
|
|
49
|
+
* flaky version endpoint does not abort an otherwise-valid flow.
|
|
50
|
+
*/
|
|
51
|
+
private _fetchSystemUI5Version;
|
|
46
52
|
/**
|
|
47
53
|
* Handles errors that occur during the fetching of the manifest.
|
|
48
54
|
*
|
package/generators/app/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Generator from 'yeoman-generator';
|
|
2
2
|
import { join, basename } from 'node:path';
|
|
3
3
|
import { isAxiosError, AdaptationProjectType } from '@sap-ux/axios-extension';
|
|
4
|
-
import { getVariant, getAdpConfig, isCFEnvironment, generateInboundConfig, flpConfigurationExists, SystemLookup, getBaseAppInbounds, getCfBaseAppInbounds, loadCfConfig, isLoggedInCf, getAppParamsFromUI5Yaml, getExistingAdpProjectType } from '@sap-ux/adp-tooling';
|
|
4
|
+
import { getVariant, getAdpConfig, isCFEnvironment, generateInboundConfig, flpConfigurationExists, SystemLookup, getBaseAppInbounds, getCfBaseAppInbounds, loadCfConfig, isLoggedInCf, getAppParamsFromUI5Yaml, getSystemUI5Version, getExistingAdpProjectType } from '@sap-ux/adp-tooling';
|
|
5
5
|
import { ToolsLogger } from '@sap-ux/logger';
|
|
6
6
|
import { EventName } from '../telemetryEvents/index.js';
|
|
7
7
|
import { getPrompts, getAdpFlpConfigPromptOptions, getAdpFlpInboundsWriterConfig, getTileSettingsQuestions, tilePromptNames, tileActions } from '@sap-ux/flp-config-inquirer';
|
|
@@ -41,6 +41,7 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
41
41
|
tileSettingsAnswers;
|
|
42
42
|
provider;
|
|
43
43
|
isCfProject = false;
|
|
44
|
+
systemUI5Version;
|
|
44
45
|
/**
|
|
45
46
|
* Creates an instance of the generator.
|
|
46
47
|
*
|
|
@@ -112,7 +113,7 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
112
113
|
}
|
|
113
114
|
try {
|
|
114
115
|
const config = getAdpFlpInboundsWriterConfig(this.answers, this.layer, this.tileSettingsAnswers, this.inbounds);
|
|
115
|
-
await generateInboundConfig(this.projectRootPath, config, this.fs);
|
|
116
|
+
await generateInboundConfig(this.projectRootPath, config, this.fs, this.systemUI5Version, this.isCfProject);
|
|
116
117
|
}
|
|
117
118
|
catch (error) {
|
|
118
119
|
this.logger.error(`Writing phase failed: ${error}`);
|
|
@@ -174,6 +175,19 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
174
175
|
}
|
|
175
176
|
]);
|
|
176
177
|
await this.prompt(prompts);
|
|
178
|
+
await this._fetchSystemUI5Version();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Fetches and stores the system UI5 version. Swallows errors at debug level so a
|
|
182
|
+
* flaky version endpoint does not abort an otherwise-valid flow.
|
|
183
|
+
*/
|
|
184
|
+
async _fetchSystemUI5Version() {
|
|
185
|
+
try {
|
|
186
|
+
this.systemUI5Version = await getSystemUI5Version(this.provider, this.toolsLogger);
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
this.toolsLogger.debug(`Could not fetch system UI5 version: ${error}`);
|
|
190
|
+
}
|
|
177
191
|
}
|
|
178
192
|
/**
|
|
179
193
|
* Handles errors that occur during the fetching of the manifest.
|
|
@@ -410,6 +424,7 @@ export default class AdpFlpConfigGenerator extends Generator {
|
|
|
410
424
|
}
|
|
411
425
|
this._handleFetchingError(error);
|
|
412
426
|
}
|
|
427
|
+
await this._fetchSystemUI5Version();
|
|
413
428
|
}
|
|
414
429
|
/**
|
|
415
430
|
* Initializes the CF-specific parts of the standalone generator.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/adp-flp-config-sub-generator",
|
|
3
3
|
"description": "Generator for adding FLP configuration to an Adaptation Project",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.30",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"@sap-devx/yeoman-ui-types": "1.25.0",
|
|
24
24
|
"i18next": "25.10.10",
|
|
25
25
|
"yeoman-generator": "5.10.0",
|
|
26
|
-
"@sap-ux/adp-tooling": "1.0.
|
|
26
|
+
"@sap-ux/adp-tooling": "1.0.30",
|
|
27
27
|
"@sap-ux/axios-extension": "2.0.7",
|
|
28
28
|
"@sap-ux/btp-utils": "2.0.5",
|
|
29
29
|
"@sap-ux/feature-toggle": "1.0.5",
|
|
30
30
|
"@sap-ux/fiori-generator-shared": "1.0.20",
|
|
31
|
-
"@sap-ux/flp-config-inquirer": "1.0.
|
|
31
|
+
"@sap-ux/flp-config-inquirer": "1.0.30",
|
|
32
32
|
"@sap-ux/inquirer-common": "1.0.21",
|
|
33
33
|
"@sap-ux/logger": "1.0.3",
|
|
34
34
|
"@sap-ux/project-access": "2.1.6",
|