@sap-ux/adp-tooling 0.16.14 → 0.17.0
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/abap/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AbapServiceProvider } from '@sap-ux/axios-extension';
|
|
2
2
|
import type { ManifestNamespace } from '@sap-ux/project-access';
|
|
3
3
|
import type { FlexUISupportedSystem } from '../types';
|
|
4
|
+
import type { ToolsLogger } from '@sap-ux/logger';
|
|
4
5
|
/**
|
|
5
6
|
* Fetches system supports Flex UI features.
|
|
6
7
|
*
|
|
@@ -10,12 +11,14 @@ import type { FlexUISupportedSystem } from '../types';
|
|
|
10
11
|
*/
|
|
11
12
|
export declare function getFlexUISupportedSystem(provider: AbapServiceProvider, isCustomerBase: boolean): Promise<FlexUISupportedSystem>;
|
|
12
13
|
/**
|
|
13
|
-
* Fetches system UI5 Version from
|
|
14
|
+
* Fetches system UI5 Version from the UI5VersionService, if the request throws
|
|
15
|
+
* fallback to the legacy api introduced in the UI5RtVersionService.
|
|
14
16
|
*
|
|
15
17
|
* @param {AbapServiceProvider} provider - Instance of the ABAP provider.
|
|
18
|
+
* @param {ToolsLogger} logger - The logger instance.
|
|
16
19
|
* @returns {string | undefined} System UI5 version.
|
|
17
20
|
*/
|
|
18
|
-
export declare function getSystemUI5Version(provider: AbapServiceProvider): Promise<string | undefined>;
|
|
21
|
+
export declare function getSystemUI5Version(provider: AbapServiceProvider, logger: ToolsLogger): Promise<string | undefined>;
|
|
19
22
|
/**
|
|
20
23
|
* Retrieves the list of tile inbounds of the application.
|
|
21
24
|
*
|
package/dist/abap/client.js
CHANGED
|
@@ -33,14 +33,23 @@ async function getFlexUISupportedSystem(provider, isCustomerBase) {
|
|
|
33
33
|
return { isOnPremise, isUIFlex };
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Fetches system UI5 Version from
|
|
36
|
+
* Fetches system UI5 Version from the UI5VersionService, if the request throws
|
|
37
|
+
* fallback to the legacy api introduced in the UI5RtVersionService.
|
|
37
38
|
*
|
|
38
39
|
* @param {AbapServiceProvider} provider - Instance of the ABAP provider.
|
|
40
|
+
* @param {ToolsLogger} logger - The logger instance.
|
|
39
41
|
* @returns {string | undefined} System UI5 version.
|
|
40
42
|
*/
|
|
41
|
-
async function getSystemUI5Version(provider) {
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
async function getSystemUI5Version(provider, logger) {
|
|
44
|
+
try {
|
|
45
|
+
const ui5VersionService = provider.getUI5VersionService();
|
|
46
|
+
return await ui5VersionService.getUI5Version();
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
logger.debug(`Could not fetch the system UI5 version: ${error.message}. Try to fetch the UI5 version with the adt api.`);
|
|
50
|
+
const ui5RtVersionService = await provider.getAdtService(axios_extension_1.UI5RtVersionService);
|
|
51
|
+
return ui5RtVersionService?.getUI5Version();
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
/**
|
|
46
55
|
* Retrieves the list of tile inbounds of the application.
|
|
@@ -71,8 +71,7 @@
|
|
|
71
71
|
"appDoesNotSupportManifest": "The selected application is not supported by SAPUI5 Adaptation Project because it does not have a `manifest.json` file. Please select a different application.",
|
|
72
72
|
"ui5VersionNotReachableError": "The URL of the SAPUI5 version you have selected is not reachable. The <URL> URL must be made accessible through the cloud connector and the destination configuration so it can be consumed within the SAPUI5 adaptation project and its SAPUI5 Adaptation Editor.",
|
|
73
73
|
"ui5VersionOutdatedError": "The SAPUI5 version you have selected is not compatible with the SAPUI5 Adaptation Editor. Please select a different version.",
|
|
74
|
-
"ui5VersionDoesNotExistGeneric": "An error occurred when validating the SAPUI5 version: {{error}}. Please select a different version."
|
|
75
|
-
"ui5VersionNotDetectedError": "The SAPUI5 version of the selected system cannot be determined. You will be able to create and edit adaptation projects using the newest version but it will not be usable on this system until the system`s SAPUI5 version is upgraded to version 1.71 or higher."
|
|
74
|
+
"ui5VersionDoesNotExistGeneric": "An error occurred when validating the SAPUI5 version: {{error}}. Please select a different version."
|
|
76
75
|
},
|
|
77
76
|
"error": {
|
|
78
77
|
"appDoesNotSupportFlexibility": "The selected application does not support flexibility because it has `flexEnabled=false`. SAPUI5 Adaptation Project only supports applications that support flexibility. Please select a different application.",
|
package/dist/ui5/format.d.ts
CHANGED
|
@@ -47,6 +47,21 @@ export declare function removeMicroPart(version: string): string;
|
|
|
47
47
|
* @returns {string} The version string without the timestamp, including only the major, minor, and micro version numbers.
|
|
48
48
|
*/
|
|
49
49
|
export declare function removeTimestampFromVersion(version: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Removes the '-snapshot' suffix from a version string's patch number.
|
|
52
|
+
* Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
|
|
53
|
+
* the patch part of any snapshot designation.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} version - The version string that may include '-snapshot' in the patch number.
|
|
56
|
+
* @returns {string} The version string with the snapshot suffix removed from the patch number.
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* removeSnapshotFromVersion('1.96.0-snapshot'); // Returns '1.96.0'
|
|
60
|
+
* removeSnapshotFromVersion('1.87.3-SNAPSHOT'); // Returns '1.87.3' (case-insensitive)
|
|
61
|
+
* removeSnapshotFromVersion('1.120.1'); // Returns '1.120.1' (no change)
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function removeSnapshotFromVersion(version: string): string;
|
|
50
65
|
/**
|
|
51
66
|
* Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
|
|
52
67
|
* The suffix is added only if the version string includes an unreleased snapshot version.
|
package/dist/ui5/format.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.buildSystemVersionLabel = buildSystemVersionLabel;
|
|
|
6
6
|
exports.removeBracketsFromVersion = removeBracketsFromVersion;
|
|
7
7
|
exports.removeMicroPart = removeMicroPart;
|
|
8
8
|
exports.removeTimestampFromVersion = removeTimestampFromVersion;
|
|
9
|
+
exports.removeSnapshotFromVersion = removeSnapshotFromVersion;
|
|
9
10
|
exports.addSnapshot = addSnapshot;
|
|
10
11
|
exports.parseUI5Version = parseUI5Version;
|
|
11
12
|
exports.isFeatureSupportedVersion = isFeatureSupportedVersion;
|
|
@@ -82,6 +83,25 @@ function removeTimestampFromVersion(version) {
|
|
|
82
83
|
const versionParts = version.split('.');
|
|
83
84
|
return `${versionParts[0]}.${versionParts[1]}.${versionParts[2]}`;
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Removes the '-snapshot' suffix from a version string's patch number.
|
|
88
|
+
* Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
|
|
89
|
+
* the patch part of any snapshot designation.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} version - The version string that may include '-snapshot' in the patch number.
|
|
92
|
+
* @returns {string} The version string with the snapshot suffix removed from the patch number.
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* removeSnapshotFromVersion('1.96.0-snapshot'); // Returns '1.96.0'
|
|
96
|
+
* removeSnapshotFromVersion('1.87.3-SNAPSHOT'); // Returns '1.87.3' (case-insensitive)
|
|
97
|
+
* removeSnapshotFromVersion('1.120.1'); // Returns '1.120.1' (no change)
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
function removeSnapshotFromVersion(version) {
|
|
101
|
+
const versionParts = version.split('.');
|
|
102
|
+
const patchNumber = versionParts[2].toLowerCase().replace('-snapshot', '');
|
|
103
|
+
return `${versionParts[0]}.${versionParts[1]}.${patchNumber}`;
|
|
104
|
+
}
|
|
85
105
|
/**
|
|
86
106
|
* Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
|
|
87
107
|
* The suffix is added only if the version string includes an unreleased snapshot version.
|
package/dist/ui5/version-info.js
CHANGED
|
@@ -96,7 +96,12 @@ function getVersionLabels(version, publicVersions) {
|
|
|
96
96
|
*/
|
|
97
97
|
function checkSystemVersionPattern(version) {
|
|
98
98
|
const pattern = /^[1-9]\.\d{1,3}\.\d{1,2}\.*/;
|
|
99
|
-
|
|
99
|
+
if (!version || !pattern.test(version)) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
let normalizedVersion = (0, format_1.removeTimestampFromVersion)(version);
|
|
103
|
+
normalizedVersion = (0, format_1.removeSnapshotFromVersion)(normalizedVersion);
|
|
104
|
+
return normalizedVersion;
|
|
100
105
|
}
|
|
101
106
|
/**
|
|
102
107
|
* Retrieves and filters internal UI5 versions.
|
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.
|
|
12
|
+
"version": "0.17.0",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prompts": "2.4.2",
|
|
37
37
|
"sanitize-filename": "1.6.3",
|
|
38
38
|
"uuid": "10.0.0",
|
|
39
|
-
"@sap-ux/axios-extension": "1.
|
|
39
|
+
"@sap-ux/axios-extension": "1.24.0",
|
|
40
40
|
"@sap-ux/btp-utils": "1.1.4",
|
|
41
41
|
"@sap-ux/i18n": "0.3.4",
|
|
42
42
|
"@sap-ux/inquirer-common": "0.8.7",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@sap-ux/project-access": "1.32.7",
|
|
47
47
|
"@sap-ux/project-input-validator": "0.6.29",
|
|
48
48
|
"@sap-ux/store": "1.2.1",
|
|
49
|
-
"@sap-ux/system-access": "0.6.
|
|
49
|
+
"@sap-ux/system-access": "0.6.23",
|
|
50
50
|
"@sap-ux/ui5-config": "0.29.8",
|
|
51
51
|
"@sap-ux/ui5-info": "0.13.0"
|
|
52
52
|
},
|