@sap-ux/adp-tooling 0.13.41 → 0.13.43
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/dist/base/constants/index.d.ts +3 -0
- package/dist/base/constants/index.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/source/manifest.d.ts +14 -0
- package/dist/source/manifest.js +20 -0
- package/dist/types.d.ts +5 -0
- package/dist/ui5/format.js +1 -1
- package/dist/ui5/version-info.d.ts +19 -0
- package/dist/ui5/version-info.js +34 -1
- package/dist/writer/descriptor-content.d.ts +20 -1
- package/dist/writer/descriptor-content.js +55 -0
- package/dist/writer/i18n/index.d.ts +10 -0
- package/dist/writer/i18n/index.js +18 -0
- package/dist/writer/writer-config.d.ts +4 -0
- package/dist/writer/writer-config.js +21 -11
- package/package.json +5 -5
|
@@ -6,6 +6,9 @@ export declare const CURRENT_SYSTEM_VERSION = "(system version)";
|
|
|
6
6
|
export declare const LATEST_VERSION = "(latest)";
|
|
7
7
|
export declare const SNAPSHOT_VERSION = "snapshot";
|
|
8
8
|
export declare const SNAPSHOT_UNTESTED_VERSION = "snapshot-untested";
|
|
9
|
+
export declare const RESOURCE_BUNDLE_TEXT = "\n\n# This is the resource bundle for ";
|
|
10
|
+
export declare const TRANSLATION_UUID_TEXT = "\n#__ldi.translation.uuid=";
|
|
11
|
+
export declare const BASE_I18N_DESCRIPTION = "#Make sure you provide a unique prefix to the newly added keys in this file, to avoid overriding of SAP Fiori application keys.";
|
|
9
12
|
export declare const S4HANA_APPS_PARAMS: {
|
|
10
13
|
'sap.app/type': string;
|
|
11
14
|
'sap.fiori/cloudDevAdaptationStatus': string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ABAP_VARIANT_APPS_PARAMS = exports.ABAP_APPS_PARAMS = exports.S4HANA_APPS_PARAMS = exports.SNAPSHOT_UNTESTED_VERSION = exports.SNAPSHOT_VERSION = exports.LATEST_VERSION = exports.CURRENT_SYSTEM_VERSION = exports.SNAPSHOT_CDN_URL = exports.UI5_VERSIONS_NEO_CDN_URL = exports.UI5_VERSIONS_CDN_URL = exports.UI5_CDN_URL = void 0;
|
|
3
|
+
exports.ABAP_VARIANT_APPS_PARAMS = exports.ABAP_APPS_PARAMS = exports.S4HANA_APPS_PARAMS = exports.BASE_I18N_DESCRIPTION = exports.TRANSLATION_UUID_TEXT = exports.RESOURCE_BUNDLE_TEXT = exports.SNAPSHOT_UNTESTED_VERSION = exports.SNAPSHOT_VERSION = exports.LATEST_VERSION = exports.CURRENT_SYSTEM_VERSION = exports.SNAPSHOT_CDN_URL = exports.UI5_VERSIONS_NEO_CDN_URL = exports.UI5_VERSIONS_CDN_URL = exports.UI5_CDN_URL = void 0;
|
|
4
4
|
exports.UI5_CDN_URL = 'https://ui5.sap.com';
|
|
5
5
|
exports.UI5_VERSIONS_CDN_URL = 'https://sapui5.hana.ondemand.com/version.json';
|
|
6
6
|
exports.UI5_VERSIONS_NEO_CDN_URL = 'https://ui5.sap.com/neo-app.json';
|
|
@@ -9,6 +9,9 @@ exports.CURRENT_SYSTEM_VERSION = '(system version)';
|
|
|
9
9
|
exports.LATEST_VERSION = '(latest)';
|
|
10
10
|
exports.SNAPSHOT_VERSION = 'snapshot';
|
|
11
11
|
exports.SNAPSHOT_UNTESTED_VERSION = 'snapshot-untested';
|
|
12
|
+
exports.RESOURCE_BUNDLE_TEXT = '\n\n# This is the resource bundle for ';
|
|
13
|
+
exports.TRANSLATION_UUID_TEXT = '\n#__ldi.translation.uuid=';
|
|
14
|
+
exports.BASE_I18N_DESCRIPTION = '#Make sure you provide a unique prefix to the newly added keys in this file, to avoid overriding of SAP Fiori application keys.';
|
|
12
15
|
exports.S4HANA_APPS_PARAMS = {
|
|
13
16
|
'sap.app/type': 'application',
|
|
14
17
|
'sap.fiori/cloudDevAdaptationStatus': 'released',
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './abap';
|
|
|
10
10
|
export * from './source';
|
|
11
11
|
export * from './preview/adp-preview';
|
|
12
12
|
export * from './writer/writer-config';
|
|
13
|
+
export * from './writer/descriptor-content';
|
|
13
14
|
export * from './ui5';
|
|
14
15
|
export { getCustomConfig } from './writer/project-utils';
|
|
15
16
|
export { generate, migrate } from './writer';
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./abap"), exports);
|
|
|
27
27
|
__exportStar(require("./source"), exports);
|
|
28
28
|
__exportStar(require("./preview/adp-preview"), exports);
|
|
29
29
|
__exportStar(require("./writer/writer-config"), exports);
|
|
30
|
+
__exportStar(require("./writer/descriptor-content"), exports);
|
|
30
31
|
__exportStar(require("./ui5"), exports);
|
|
31
32
|
var project_utils_1 = require("./writer/project-utils");
|
|
32
33
|
Object.defineProperty(exports, "getCustomConfig", { enumerable: true, get: function () { return project_utils_1.getCustomConfig; } });
|
|
@@ -8,6 +8,20 @@ import type { AbapServiceProvider } from '@sap-ux/axios-extension';
|
|
|
8
8
|
* @returns {boolean} True if the application uses SAP Fiori Elements version 4 libraries.
|
|
9
9
|
*/
|
|
10
10
|
export declare function isV4Application(manifest?: Manifest): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the default Fiori ID from the application's manifest.
|
|
13
|
+
*
|
|
14
|
+
* @param {Manifest | undefined} manifest - The manager responsible for fetching and handling the application manifest.
|
|
15
|
+
* @returns {Promise<string>} The Fiori registration IDs as a string if available, otherwise an empty string.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getFioriId(manifest: Manifest | undefined): string;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the default Application Component Hierarchy (ACH) from the application's manifest.
|
|
20
|
+
*
|
|
21
|
+
* @param {Manifest | undefined} manifest - The manager responsible for fetching and handling the application manifest.
|
|
22
|
+
* @returns {Promise<string>} The ACH code as a string if available, otherwise an empty string.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getAch(manifest: Manifest | undefined): string;
|
|
11
25
|
/**
|
|
12
26
|
* Checks if views are loaded synchronously or asynchronously in the UI5 settings of the manifest.
|
|
13
27
|
* Sets the isAppSync property based on the loading method.
|
package/dist/source/manifest.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SourceManifest = void 0;
|
|
4
4
|
exports.isV4Application = isV4Application;
|
|
5
|
+
exports.getFioriId = getFioriId;
|
|
6
|
+
exports.getAch = getAch;
|
|
5
7
|
exports.isSyncLoadedView = isSyncLoadedView;
|
|
6
8
|
const i18n_1 = require("../i18n");
|
|
7
9
|
/**
|
|
@@ -13,6 +15,24 @@ const i18n_1 = require("../i18n");
|
|
|
13
15
|
function isV4Application(manifest) {
|
|
14
16
|
return !!manifest?.['sap.ui5']?.dependencies?.libs?.['sap.fe.templates'];
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the default Fiori ID from the application's manifest.
|
|
20
|
+
*
|
|
21
|
+
* @param {Manifest | undefined} manifest - The manager responsible for fetching and handling the application manifest.
|
|
22
|
+
* @returns {Promise<string>} The Fiori registration IDs as a string if available, otherwise an empty string.
|
|
23
|
+
*/
|
|
24
|
+
function getFioriId(manifest) {
|
|
25
|
+
return manifest?.['sap.fiori']?.registrationIds?.toString() ?? '';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the default Application Component Hierarchy (ACH) from the application's manifest.
|
|
29
|
+
*
|
|
30
|
+
* @param {Manifest | undefined} manifest - The manager responsible for fetching and handling the application manifest.
|
|
31
|
+
* @returns {Promise<string>} The ACH code as a string if available, otherwise an empty string.
|
|
32
|
+
*/
|
|
33
|
+
function getAch(manifest) {
|
|
34
|
+
return manifest?.['sap.app']?.ach?.toString() ?? '';
|
|
35
|
+
}
|
|
16
36
|
/**
|
|
17
37
|
* Checks if views are loaded synchronously or asynchronously in the UI5 settings of the manifest.
|
|
18
38
|
* Sets the isAppSync property based on the loading method.
|
package/dist/types.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface OnpremApp {
|
|
|
40
40
|
/** Reference associated with the ID of the base application. */
|
|
41
41
|
reference: string;
|
|
42
42
|
layer?: UI5FlexLayer;
|
|
43
|
+
fioriId?: string;
|
|
44
|
+
ach?: string;
|
|
43
45
|
title?: string;
|
|
44
46
|
/** Optional: Application variant change content. */
|
|
45
47
|
content?: Content[];
|
|
@@ -91,6 +93,9 @@ export interface ConfigAnswers {
|
|
|
91
93
|
username: string;
|
|
92
94
|
password: string;
|
|
93
95
|
application: SourceApplication;
|
|
96
|
+
fioriId?: string;
|
|
97
|
+
ach?: string;
|
|
98
|
+
shouldCreateExtProject?: boolean;
|
|
94
99
|
}
|
|
95
100
|
export interface AttributesAnswers {
|
|
96
101
|
projectName: string;
|
package/dist/ui5/format.js
CHANGED
|
@@ -91,7 +91,7 @@ function removeTimestampFromVersion(version) {
|
|
|
91
91
|
*/
|
|
92
92
|
function addSnapshot(version, latestVersion) {
|
|
93
93
|
const versionParts = version.split('.');
|
|
94
|
-
return versionParts[
|
|
94
|
+
return versionParts[2] && removeTimestampFromVersion(version) != latestVersion ? '-snapshot' : '';
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Function that parse the UI5 version. Returns NaN for snapshot or snapshot-untested. eturns x.xx for snapshot-x.xx.xx.
|
|
@@ -11,6 +11,25 @@ export interface VersionLabels {
|
|
|
11
11
|
* @returns {string} The latest version string.
|
|
12
12
|
*/
|
|
13
13
|
export declare function getLatestVersion(publicVersions: UI5Version): string;
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves the minimum SAP UI5 version to be specified in the application manifest.
|
|
16
|
+
* If the system version does not contain 'snapshot', the system version itself is used;
|
|
17
|
+
* otherwise, the latest stable version is used as the minimum version.
|
|
18
|
+
*
|
|
19
|
+
* @param {UI5Version} publicVersions - The public UI5 version data.
|
|
20
|
+
* @param {string} [systemVersion] - The version on the system.
|
|
21
|
+
* @returns {string} The SAP UI5 version string to be set in the manifest, which can be either
|
|
22
|
+
* the current system version or the latest stable version, depending on the presence of 'snapshot'.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getMinUI5VersionForManifest(publicVersions: UI5Version, systemVersion?: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether the minimum SAP UI5 version should be set for the application manifest.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [systemVersion] - The version on the system.
|
|
29
|
+
* @returns {boolean} True if the minimum UI5 version should be set (i.e., the detected version is
|
|
30
|
+
* available and the minor version is 90 or higher); otherwise, false.
|
|
31
|
+
*/
|
|
32
|
+
export declare function shouldSetMinUI5Version(systemVersion?: string): boolean;
|
|
14
33
|
/**
|
|
15
34
|
* Determines the appropriate UI5 version to use based on the given version string and the customer base flag.
|
|
16
35
|
*
|
package/dist/ui5/version-info.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLatestVersion = getLatestVersion;
|
|
4
|
+
exports.getMinUI5VersionForManifest = getMinUI5VersionForManifest;
|
|
5
|
+
exports.shouldSetMinUI5Version = shouldSetMinUI5Version;
|
|
4
6
|
exports.getVersionToBeUsed = getVersionToBeUsed;
|
|
5
7
|
exports.getVersionLabels = getVersionLabels;
|
|
6
8
|
exports.checkSystemVersionPattern = checkSystemVersionPattern;
|
|
@@ -19,6 +21,37 @@ const constants_1 = require("../base/constants");
|
|
|
19
21
|
function getLatestVersion(publicVersions) {
|
|
20
22
|
return publicVersions?.latest?.version;
|
|
21
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the minimum SAP UI5 version to be specified in the application manifest.
|
|
26
|
+
* If the system version does not contain 'snapshot', the system version itself is used;
|
|
27
|
+
* otherwise, the latest stable version is used as the minimum version.
|
|
28
|
+
*
|
|
29
|
+
* @param {UI5Version} publicVersions - The public UI5 version data.
|
|
30
|
+
* @param {string} [systemVersion] - The version on the system.
|
|
31
|
+
* @returns {string} The SAP UI5 version string to be set in the manifest, which can be either
|
|
32
|
+
* the current system version or the latest stable version, depending on the presence of 'snapshot'.
|
|
33
|
+
*/
|
|
34
|
+
function getMinUI5VersionForManifest(publicVersions, systemVersion) {
|
|
35
|
+
if (!systemVersion || systemVersion?.includes('snapshot')) {
|
|
36
|
+
return getLatestVersion(publicVersions);
|
|
37
|
+
}
|
|
38
|
+
return systemVersion;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Determines whether the minimum SAP UI5 version should be set for the application manifest.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} [systemVersion] - The version on the system.
|
|
44
|
+
* @returns {boolean} True if the minimum UI5 version should be set (i.e., the detected version is
|
|
45
|
+
* available and the minor version is 90 or higher); otherwise, false.
|
|
46
|
+
*/
|
|
47
|
+
function shouldSetMinUI5Version(systemVersion) {
|
|
48
|
+
if (!systemVersion) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
const versionParts = systemVersion.split('.');
|
|
52
|
+
const minorVersion = versionParts.length > 1 ? parseInt(versionParts[1], 10) : NaN;
|
|
53
|
+
return !isNaN(minorVersion) && minorVersion >= 90;
|
|
54
|
+
}
|
|
22
55
|
/**
|
|
23
56
|
* Determines the appropriate UI5 version to use based on the given version string and the customer base flag.
|
|
24
57
|
*
|
|
@@ -63,7 +96,7 @@ function getVersionLabels(version, publicVersions) {
|
|
|
63
96
|
*/
|
|
64
97
|
function checkSystemVersionPattern(version) {
|
|
65
98
|
const pattern = /^[1-9]\.\d{1,3}\.\d{1,2}\.*/;
|
|
66
|
-
return version && pattern.test(version) ? version : undefined;
|
|
99
|
+
return version && pattern.test(version) ? (0, format_1.removeTimestampFromVersion)(version) : undefined;
|
|
67
100
|
}
|
|
68
101
|
/**
|
|
69
102
|
* Retrieves and filters internal UI5 versions.
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { FlexLayer, type Content, type UI5Version } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Returns a model enhancement change configuration.
|
|
4
4
|
*
|
|
5
5
|
* @returns {Content} The model change configuration.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getNewModelEnhanceWithChange(): Content;
|
|
8
|
+
/**
|
|
9
|
+
* Adds support data entries for Fiori registration IDs and application component hierarchy (ACH) to a content array.
|
|
10
|
+
*
|
|
11
|
+
* @param {Content[]} content - The array to which support data entries will be added.
|
|
12
|
+
* @param {string} [fioriId] - The Fiori ID to set in the registration.
|
|
13
|
+
* @param {string} [ach] - The application component hierarchy code, which will be converted to uppercase.
|
|
14
|
+
*/
|
|
15
|
+
export declare function fillSupportData(content: Content[], fioriId?: string, ach?: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Generates an array of content objects for a `manifest.appdescr_variant` file based on the application configuration.
|
|
18
|
+
*
|
|
19
|
+
* @param {FlexLayer} layer - The deployment layer of the application (e.g., CUSTOMER_BASE or VENDOR).
|
|
20
|
+
* @param {string | undefined} systemVersion - The minimum required SAPUI5 version for the application.
|
|
21
|
+
* @param {UI5Version} publicVersions - Publicly available SAPUI5 versions.
|
|
22
|
+
* @param {string} [fioriId] - Optional Fiori ID to be added to support information.
|
|
23
|
+
* @param {string} [ach] - Optional ACH ID used for support analytics.
|
|
24
|
+
* @returns {Content[]} An array of content objects describing descriptor variant changes to be applied to the manifest.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getManifestContent(layer: FlexLayer, systemVersion: string | undefined, publicVersions: UI5Version, fioriId?: string, ach?: string): Content[];
|
|
8
27
|
//# sourceMappingURL=descriptor-content.d.ts.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNewModelEnhanceWithChange = getNewModelEnhanceWithChange;
|
|
4
|
+
exports.fillSupportData = fillSupportData;
|
|
5
|
+
exports.getManifestContent = getManifestContent;
|
|
6
|
+
const ui5_1 = require("../ui5");
|
|
4
7
|
/**
|
|
5
8
|
* Returns a model enhancement change configuration.
|
|
6
9
|
*
|
|
@@ -17,4 +20,56 @@ function getNewModelEnhanceWithChange() {
|
|
|
17
20
|
}
|
|
18
21
|
};
|
|
19
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Adds support data entries for Fiori registration IDs and application component hierarchy (ACH) to a content array.
|
|
25
|
+
*
|
|
26
|
+
* @param {Content[]} content - The array to which support data entries will be added.
|
|
27
|
+
* @param {string} [fioriId] - The Fiori ID to set in the registration.
|
|
28
|
+
* @param {string} [ach] - The application component hierarchy code, which will be converted to uppercase.
|
|
29
|
+
*/
|
|
30
|
+
function fillSupportData(content, fioriId, ach) {
|
|
31
|
+
if (fioriId) {
|
|
32
|
+
content.push({
|
|
33
|
+
changeType: 'appdescr_fiori_setRegistrationIds',
|
|
34
|
+
content: {
|
|
35
|
+
registrationIds: [fioriId]
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (ach) {
|
|
40
|
+
content.push({
|
|
41
|
+
changeType: 'appdescr_app_setAch',
|
|
42
|
+
content: {
|
|
43
|
+
ach: ach?.toUpperCase()
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Generates an array of content objects for a `manifest.appdescr_variant` file based on the application configuration.
|
|
50
|
+
*
|
|
51
|
+
* @param {FlexLayer} layer - The deployment layer of the application (e.g., CUSTOMER_BASE or VENDOR).
|
|
52
|
+
* @param {string | undefined} systemVersion - The minimum required SAPUI5 version for the application.
|
|
53
|
+
* @param {UI5Version} publicVersions - Publicly available SAPUI5 versions.
|
|
54
|
+
* @param {string} [fioriId] - Optional Fiori ID to be added to support information.
|
|
55
|
+
* @param {string} [ach] - Optional ACH ID used for support analytics.
|
|
56
|
+
* @returns {Content[]} An array of content objects describing descriptor variant changes to be applied to the manifest.
|
|
57
|
+
*/
|
|
58
|
+
function getManifestContent(layer, systemVersion, publicVersions, fioriId, ach) {
|
|
59
|
+
const isCustomerBase = layer === "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */;
|
|
60
|
+
const content = [];
|
|
61
|
+
if (!isCustomerBase) {
|
|
62
|
+
fillSupportData(content, fioriId, ach);
|
|
63
|
+
}
|
|
64
|
+
if ((0, ui5_1.shouldSetMinUI5Version)(systemVersion)) {
|
|
65
|
+
content.push({
|
|
66
|
+
changeType: 'appdescr_ui5_setMinUI5Version',
|
|
67
|
+
content: {
|
|
68
|
+
minUI5Version: (0, ui5_1.getMinUI5VersionForManifest)(publicVersions, systemVersion)
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
content.push(getNewModelEnhanceWithChange());
|
|
73
|
+
return content;
|
|
74
|
+
}
|
|
20
75
|
//# sourceMappingURL=descriptor-content.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlexLayer } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Generates an internationalization description string for a specific layer within an application.
|
|
4
|
+
*
|
|
5
|
+
* @param {FlexLayer} layer - The UI5 Flex layer.
|
|
6
|
+
* @param {string} [appTitle] - The title of the application used in generating the i18n description.
|
|
7
|
+
* @returns {string} The internationalization description string.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getI18nDescription(layer: FlexLayer, appTitle?: string): string;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getI18nDescription = getI18nDescription;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const __1 = require("../..");
|
|
6
|
+
/**
|
|
7
|
+
* Generates an internationalization description string for a specific layer within an application.
|
|
8
|
+
*
|
|
9
|
+
* @param {FlexLayer} layer - The UI5 Flex layer.
|
|
10
|
+
* @param {string} [appTitle] - The title of the application used in generating the i18n description.
|
|
11
|
+
* @returns {string} The internationalization description string.
|
|
12
|
+
*/
|
|
13
|
+
function getI18nDescription(layer, appTitle) {
|
|
14
|
+
return layer === "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */
|
|
15
|
+
? __1.BASE_I18N_DESCRIPTION
|
|
16
|
+
: __1.BASE_I18N_DESCRIPTION + __1.RESOURCE_BUNDLE_TEXT + appTitle + __1.TRANSLATION_UUID_TEXT + (0, uuid_1.v4)();
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getConfig = getConfig;
|
|
4
4
|
const abap_1 = require("../abap");
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
5
6
|
const project_utils_1 = require("./project-utils");
|
|
6
7
|
const descriptor_content_1 = require("./descriptor-content");
|
|
7
8
|
const ui5_1 = require("../ui5");
|
|
@@ -19,7 +20,7 @@ const ui5_1 = require("../ui5");
|
|
|
19
20
|
* @returns {Promise<AdpWriterConfig>} A promise that resolves to the generated ADP writer configuration.
|
|
20
21
|
*/
|
|
21
22
|
async function getConfig(options) {
|
|
22
|
-
const { configAnswers, attributeAnswers, layer, logger, packageJson, provider, publicVersions } = options;
|
|
23
|
+
const { configAnswers, attributeAnswers, layer, logger, packageJson, provider, publicVersions, systemVersion } = options;
|
|
23
24
|
const ato = await provider.getAtoInfo();
|
|
24
25
|
const operationsType = ato.operationsType ?? 'P';
|
|
25
26
|
const target = await (0, abap_1.getProviderConfig)(configAnswers.system, logger);
|
|
@@ -30,18 +31,27 @@ async function getConfig(options) {
|
|
|
30
31
|
? (0, ui5_1.getLatestVersion)(publicVersions)
|
|
31
32
|
: (0, ui5_1.getVersionToBeUsed)(attributeAnswers.ui5Version, isCustomerBase, publicVersions);
|
|
32
33
|
const { namespace, title, enableTypeScript } = attributeAnswers;
|
|
33
|
-
const { application: { id, bspName } } = configAnswers;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const { application: { id, bspName }, fioriId, ach } = configAnswers;
|
|
35
|
+
const app = {
|
|
36
|
+
id: namespace,
|
|
37
|
+
reference: id,
|
|
38
|
+
layer,
|
|
39
|
+
title,
|
|
40
|
+
content: (0, descriptor_content_1.getManifestContent)(layer, systemVersion, publicVersions, fioriId, ach),
|
|
41
|
+
i18nDescription: (0, i18n_1.getI18nDescription)(layer, title)
|
|
42
|
+
};
|
|
43
|
+
if (isCloudProject) {
|
|
44
|
+
const lrep = provider.getLayeredRepository();
|
|
45
|
+
const { activeLanguages: languages } = await lrep.getSystemInfo();
|
|
46
|
+
Object.assign(app, {
|
|
40
47
|
bspName,
|
|
41
|
-
|
|
42
|
-
}
|
|
48
|
+
languages
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
app,
|
|
43
53
|
ui5: {
|
|
44
|
-
minVersion: ui5Version?.split(' ')[0],
|
|
54
|
+
minVersion: ui5Version?.split(' ')?.[0],
|
|
45
55
|
version: (0, ui5_1.getFormattedVersion)(ui5Version),
|
|
46
56
|
frameworkUrl: (0, ui5_1.getOfficialBaseUI5VersionUrl)(ui5Version)
|
|
47
57
|
},
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.13.
|
|
12
|
+
"version": "0.13.43",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"uuid": "10.0.0",
|
|
35
35
|
"@sap-ux/axios-extension": "1.20.2",
|
|
36
36
|
"@sap-ux/btp-utils": "1.0.3",
|
|
37
|
-
"@sap-ux/inquirer-common": "0.6.
|
|
37
|
+
"@sap-ux/inquirer-common": "0.6.42",
|
|
38
38
|
"@sap-ux/logger": "0.6.0",
|
|
39
|
-
"@sap-ux/project-access": "1.29.
|
|
40
|
-
"@sap-ux/project-input-validator": "0.5.
|
|
39
|
+
"@sap-ux/project-access": "1.29.22",
|
|
40
|
+
"@sap-ux/project-input-validator": "0.5.6",
|
|
41
41
|
"@sap-ux/system-access": "0.5.38",
|
|
42
42
|
"@sap-ux/ui5-config": "0.27.2",
|
|
43
|
-
"@sap-ux/odata-service-writer": "0.26.
|
|
43
|
+
"@sap-ux/odata-service-writer": "0.26.18",
|
|
44
44
|
"@sap-ux/nodejs-utils": "0.1.9",
|
|
45
45
|
"@sap-ux/i18n": "0.2.3",
|
|
46
46
|
"@sap-ux/store": "1.0.0"
|