@sap-ux/fiori-app-sub-generator 0.7.32 → 0.7.34
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/fiori-app-generator/transforms.js +6 -6
- package/generators/fiori-app-generator/writing.js +1 -1
- package/generators/translations/fioriAppSubGenerator.i18n.json +2 -3
- package/generators/types/constants.d.ts +2 -3
- package/generators/utils/common.d.ts +5 -6
- package/generators/utils/common.js +12 -10
- package/generators/utils/telemetry.js +4 -3
- package/package.json +15 -15
|
@@ -181,15 +181,15 @@ async function transformState({ project, service, floorplan, entityRelatedConfig
|
|
|
181
181
|
}
|
|
182
182
|
if (service.destinationAuthType === btp_utils_1.Authentication.SAML_ASSERTION ||
|
|
183
183
|
service.connectedSystem?.destination?.Authentication === btp_utils_1.Authentication.SAML_ASSERTION ||
|
|
184
|
-
store_1.AuthenticationType.ReentranceTicket === service.connectedSystem?.backendSystem?.authenticationType
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// If 'cloud'
|
|
184
|
+
store_1.AuthenticationType.ReentranceTicket === service.connectedSystem?.backendSystem?.authenticationType ||
|
|
185
|
+
// Apps generated with stored service keys (legacy) will use re-entrance tickets for connectivity
|
|
186
|
+
// New stored systems will only use re-entrance
|
|
187
|
+
service.connectedSystem?.backendSystem?.serviceKeys ||
|
|
188
|
+
// If 'cloud' this will enable preview on VSCode (using re-entrance) for app portability
|
|
189
189
|
((0, fiori_generator_shared_1.getHostEnvironment)() === fiori_generator_shared_1.hostEnvironment.bas &&
|
|
190
190
|
service.connectedSystem?.destination &&
|
|
191
191
|
(0, btp_utils_1.isAbapEnvironmentOnBtp)(service.connectedSystem?.destination))) {
|
|
192
|
-
appConfig.service.previewSettings = {
|
|
192
|
+
appConfig.service.previewSettings = { authenticationType: store_1.AuthenticationType.ReentranceTicket };
|
|
193
193
|
}
|
|
194
194
|
else if (service.apiHubConfig) {
|
|
195
195
|
appConfig.service.previewSettings = { apiHub: true };
|
|
@@ -26,7 +26,7 @@ async function writeAppGenInfoFiles({ project, service, floorplan, entityRelated
|
|
|
26
26
|
const templateLabel = (0, utils_1.t)(`floorplans.label.${floorplan}`, {
|
|
27
27
|
odataVersion: service.version
|
|
28
28
|
});
|
|
29
|
-
const datasourceLabel = (0, utils_1.getReadMeDataSourceLabel)(service.source, (0, utils_1.
|
|
29
|
+
const datasourceLabel = (0, utils_1.getReadMeDataSourceLabel)(service.source, (0, utils_1.isAbapCloud)(service.connectedSystem), service.apiHubConfig?.apiHubType);
|
|
30
30
|
// Assign any custom overriding properties that may be provided via headless, adaptors
|
|
31
31
|
const appGenInfoCustom = Object.assign({
|
|
32
32
|
generatorName,
|
|
@@ -30,9 +30,8 @@
|
|
|
30
30
|
"filterEntityType": "Filter Entity Type",
|
|
31
31
|
"navigationEntity": "Navigation Entity",
|
|
32
32
|
"sapSystemType": {
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"onPrem": "ABAP On-Premise"
|
|
33
|
+
"onPrem": "ABAP On-Premise",
|
|
34
|
+
"abapCloud": "ABAP Cloud"
|
|
36
35
|
},
|
|
37
36
|
"datasourceType": {
|
|
38
37
|
"sapSystem": "SAP System",
|
|
@@ -2,9 +2,8 @@ import type { FioriStep } from './yeomanUiStepConfig';
|
|
|
2
2
|
export declare const LEGACY_CAP_TYPE_NODE = "capNode";
|
|
3
3
|
export declare const LEGACY_CAP_TYPE_JAVA = "capJava";
|
|
4
4
|
export declare const enum SapSystemSourceType {
|
|
5
|
-
|
|
6
|
-
ON_PREM = "onPrem"
|
|
7
|
-
S4HC = "s4hc"
|
|
5
|
+
ABAP_CLOUD = "abapCloud",
|
|
6
|
+
ON_PREM = "onPrem"
|
|
8
7
|
}
|
|
9
8
|
export declare const PLATFORMS: {
|
|
10
9
|
VSCODE: {
|
|
@@ -76,22 +76,21 @@ export declare function getCdsUi5PluginInfo(capProjectPath: string, fs: Editor,
|
|
|
76
76
|
*/
|
|
77
77
|
export declare function getCdsAnnotations(capService: CapService, projectName: string): Promise<CdsAnnotationsInfo | undefined>;
|
|
78
78
|
/**
|
|
79
|
-
* Determine if the specified connected system is
|
|
80
|
-
* If a backend system uses service keys, or a destination is an ABAP environment on BTP, then it is considered to be hosted on BTP.
|
|
79
|
+
* Determine if the specified connected system is ABAP cloud.
|
|
81
80
|
*
|
|
82
81
|
* @param connectedSystem - The connected system object.
|
|
83
|
-
* @returns {boolean} `true` if the connected system is
|
|
82
|
+
* @returns {boolean} `true` if the connected system is ABAP cloud, otherwise `false`.
|
|
84
83
|
*/
|
|
85
|
-
export declare function
|
|
84
|
+
export declare function isAbapCloud(connectedSystem?: ConnectedSystem): boolean;
|
|
86
85
|
/**
|
|
87
86
|
* Retrieves the data source label.
|
|
88
87
|
*
|
|
89
88
|
* @param {DatasourceType} source - The data source type (`DatasourceType.sapSystem` or `DatasourceType.businessHub`).
|
|
90
|
-
* @param
|
|
89
|
+
* @param abapCloud - Indicates if the SAP system is an ABAP Cloud system (BTP or S4HC).
|
|
91
90
|
* @param {ApiHubType} apiHubType - The API hub type for business hubs.
|
|
92
91
|
* @returns {string} The formatted data source label.
|
|
93
92
|
*/
|
|
94
|
-
export declare function getReadMeDataSourceLabel(source: DatasourceType,
|
|
93
|
+
export declare function getReadMeDataSourceLabel(source: DatasourceType, abapCloud?: boolean, apiHubType?: ApiHubType): string;
|
|
95
94
|
/**
|
|
96
95
|
* Generates the launch text for the application based on the CAP service information and project details.
|
|
97
96
|
*
|
|
@@ -8,7 +8,7 @@ exports.getMinSupportedUI5Version = getMinSupportedUI5Version;
|
|
|
8
8
|
exports.generateToolsId = generateToolsId;
|
|
9
9
|
exports.getCdsUi5PluginInfo = getCdsUi5PluginInfo;
|
|
10
10
|
exports.getCdsAnnotations = getCdsAnnotations;
|
|
11
|
-
exports.
|
|
11
|
+
exports.isAbapCloud = isAbapCloud;
|
|
12
12
|
exports.getReadMeDataSourceLabel = getReadMeDataSourceLabel;
|
|
13
13
|
exports.getLaunchText = getLaunchText;
|
|
14
14
|
exports.generateLaunchConfig = generateLaunchConfig;
|
|
@@ -30,6 +30,7 @@ const types_1 = require("../types");
|
|
|
30
30
|
const constants_1 = require("../types/constants");
|
|
31
31
|
const external_1 = require("../types/external");
|
|
32
32
|
const i18n_1 = require("./i18n");
|
|
33
|
+
const store_1 = require("@sap-ux/store");
|
|
33
34
|
/**
|
|
34
35
|
* Parse the specified edmx string for validitiy and return the ODataVersion of the specified edmx string.
|
|
35
36
|
*
|
|
@@ -148,29 +149,30 @@ async function getCdsAnnotations(capService, projectName) {
|
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
/**
|
|
151
|
-
* Determine if the specified connected system is
|
|
152
|
-
* If a backend system uses service keys, or a destination is an ABAP environment on BTP, then it is considered to be hosted on BTP.
|
|
152
|
+
* Determine if the specified connected system is ABAP cloud.
|
|
153
153
|
*
|
|
154
154
|
* @param connectedSystem - The connected system object.
|
|
155
|
-
* @returns {boolean} `true` if the connected system is
|
|
155
|
+
* @returns {boolean} `true` if the connected system is ABAP cloud, otherwise `false`.
|
|
156
156
|
*/
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
function isAbapCloud(connectedSystem) {
|
|
158
|
+
if (connectedSystem?.backendSystem) {
|
|
159
|
+
return (0, store_1.getBackendSystemType)(connectedSystem.backendSystem) === 'AbapCloud';
|
|
160
|
+
}
|
|
161
|
+
return connectedSystem?.destination ? (0, btp_utils_1.isAbapEnvironmentOnBtp)(connectedSystem.destination) : false;
|
|
160
162
|
}
|
|
161
163
|
/**
|
|
162
164
|
* Retrieves the data source label.
|
|
163
165
|
*
|
|
164
166
|
* @param {DatasourceType} source - The data source type (`DatasourceType.sapSystem` or `DatasourceType.businessHub`).
|
|
165
|
-
* @param
|
|
167
|
+
* @param abapCloud - Indicates if the SAP system is an ABAP Cloud system (BTP or S4HC).
|
|
166
168
|
* @param {ApiHubType} apiHubType - The API hub type for business hubs.
|
|
167
169
|
* @returns {string} The formatted data source label.
|
|
168
170
|
*/
|
|
169
|
-
function getReadMeDataSourceLabel(source,
|
|
171
|
+
function getReadMeDataSourceLabel(source, abapCloud = false, apiHubType) {
|
|
170
172
|
let dataSourceLabel;
|
|
171
173
|
if (source === odata_service_inquirer_1.DatasourceType.sapSystem) {
|
|
172
174
|
const labelDatasourceType = (0, i18n_1.t)(`readme.label.datasourceType.${odata_service_inquirer_1.DatasourceType.sapSystem}`);
|
|
173
|
-
const labelSystemType = (0, i18n_1.t)(`readme.label.sapSystemType.${
|
|
175
|
+
const labelSystemType = (0, i18n_1.t)(`readme.label.sapSystemType.${abapCloud ? "abapCloud" /* SapSystemSourceType.ABAP_CLOUD */ : "onPrem" /* SapSystemSourceType.ON_PREM */}`);
|
|
174
176
|
dataSourceLabel = `${labelDatasourceType} (${labelSystemType})`;
|
|
175
177
|
}
|
|
176
178
|
else if (source === odata_service_inquirer_1.DatasourceType.businessHub && apiHubType === "API_HUB_ENTERPRISE" /* ApiHubType.apiHubEnterprise */) {
|
|
@@ -11,14 +11,15 @@ const common_1 = require("./common");
|
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
13
|
function getTelemetrySapSystemType(connectedSystem) {
|
|
14
|
-
if ((0, common_1.
|
|
15
|
-
return 'SCP';
|
|
14
|
+
if ((0, common_1.isAbapCloud)(connectedSystem)) {
|
|
15
|
+
return 'SCP'; // Legacy term, leaving as is to support telem conmtinuity
|
|
16
16
|
}
|
|
17
17
|
if ((connectedSystem?.destination && (0, btp_utils_1.isOnPremiseDestination)(connectedSystem.destination)) ||
|
|
18
18
|
(connectedSystem?.backendSystem && !connectedSystem.backendSystem.serviceKeys)) {
|
|
19
19
|
return 'ABAP';
|
|
20
20
|
}
|
|
21
|
-
//
|
|
21
|
+
// This wont ever be the case now as all reentrance ticket based connections are to Abap Cloud regardless of how the system was discovered
|
|
22
|
+
// This can probably be removed
|
|
22
23
|
if (connectedSystem?.serviceProvider) {
|
|
23
24
|
return 'CF';
|
|
24
25
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-app-sub-generator",
|
|
3
3
|
"description": "A yeoman (sub) generator that can generate Fiori applications. Not for standalone use.",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"mem-fs-editor": "9.4.0",
|
|
30
30
|
"uuid": "11.0.5",
|
|
31
31
|
"yeoman-generator": "5.10.0",
|
|
32
|
-
"@sap-ux/annotation-generator": "0.3.
|
|
33
|
-
"@sap-ux/axios-extension": "1.
|
|
32
|
+
"@sap-ux/annotation-generator": "0.3.68",
|
|
33
|
+
"@sap-ux/axios-extension": "1.23.0",
|
|
34
34
|
"@sap-ux/btp-utils": "1.1.4",
|
|
35
|
-
"@sap-ux/cap-config-writer": "0.12.
|
|
36
|
-
"@sap-ux/feature-toggle": "0.3.
|
|
37
|
-
"@sap-ux/fiori-elements-writer": "2.7.
|
|
38
|
-
"@sap-ux/fiori-freestyle-writer": "2.4.
|
|
39
|
-
"@sap-ux/fiori-generator-shared": "0.13.
|
|
35
|
+
"@sap-ux/cap-config-writer": "0.12.14",
|
|
36
|
+
"@sap-ux/feature-toggle": "0.3.2",
|
|
37
|
+
"@sap-ux/fiori-elements-writer": "2.7.21",
|
|
38
|
+
"@sap-ux/fiori-freestyle-writer": "2.4.51",
|
|
39
|
+
"@sap-ux/fiori-generator-shared": "0.13.23",
|
|
40
40
|
"@sap-ux/fiori-tools-settings": "0.2.1",
|
|
41
41
|
"@sap-ux/launch-config": "0.10.29",
|
|
42
|
-
"@sap-ux/odata-service-inquirer": "2.8.
|
|
42
|
+
"@sap-ux/odata-service-inquirer": "2.8.13",
|
|
43
43
|
"@sap-ux/odata-service-writer": "0.27.25",
|
|
44
44
|
"@sap-ux/project-access": "1.32.4",
|
|
45
|
-
"@sap-ux/store": "1.
|
|
46
|
-
"@sap-ux/telemetry": "0.6.
|
|
47
|
-
"@sap-ux/ui5-application-inquirer": "0.15.
|
|
45
|
+
"@sap-ux/store": "1.2.0",
|
|
46
|
+
"@sap-ux/telemetry": "0.6.29",
|
|
47
|
+
"@sap-ux/ui5-application-inquirer": "0.15.19",
|
|
48
48
|
"@sap-ux/ui5-info": "0.13.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"mock-spawn": "0.2.6",
|
|
63
63
|
"rimraf": "5.0.5",
|
|
64
64
|
"yeoman-test": "6.3.0",
|
|
65
|
-
"@sap-ux/deploy-config-sub-generator": "0.4.
|
|
66
|
-
"@sap-ux/flp-config-sub-generator": "0.3.
|
|
67
|
-
"@sap-ux/inquirer-common": "0.7.
|
|
65
|
+
"@sap-ux/deploy-config-sub-generator": "0.4.24",
|
|
66
|
+
"@sap-ux/flp-config-sub-generator": "0.3.38",
|
|
67
|
+
"@sap-ux/inquirer-common": "0.7.51",
|
|
68
68
|
"@sap-ux/jest-file-matchers": "0.2.5",
|
|
69
69
|
"@sap-ux/logger": "0.7.0"
|
|
70
70
|
},
|