@ui5/task-adaptation 1.5.2-rc.0 → 1.5.2
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/CHANGELOG.md +7 -4
- package/dist/baseAppManager.js +3 -0
- package/dist/index.js +1 -2
- package/dist/processors/cfProcessor.js +15 -3
- package/dist/util/cfUtil.js +1 -1
- package/package.json +129 -124
- package/scripts/test-integration-prep.sh +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task-adaptation/compare/v1.5.2
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task-adaptation/compare/v1.5.2...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v1.5.2"></a>
|
|
8
|
+
## [v1.5.2] - 2025-08-25
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
- Removed moved changes [`babdc1b`](https://github.com/SAP/ui5-task-adaptation/commit/babdc1bce8e407b2638e014cfaa4e6547bba10ac)
|
|
6
11
|
|
|
7
|
-
<a name="v1.5.2-rc.0"></a>
|
|
8
|
-
## [v1.5.2-rc.0] - 2025-08-19
|
|
9
12
|
|
|
10
13
|
<a name="v1.5.1"></a>
|
|
11
14
|
## [v1.5.1] - 2025-08-06
|
|
@@ -122,7 +125,7 @@ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-task
|
|
|
122
125
|
<a name="v1.0.0"></a>
|
|
123
126
|
## v1.0.0 - 2020-12-09
|
|
124
127
|
|
|
125
|
-
[v1.5.2
|
|
128
|
+
[v1.5.2]: https://github.com/SAP/ui5-task-adaptation/compare/v1.5.1...v1.5.2
|
|
126
129
|
[v1.5.1]: https://github.com/SAP/ui5-task-adaptation/compare/v1.4.3...v1.5.1
|
|
127
130
|
[v1.4.3]: https://github.com/SAP/ui5-task-adaptation/compare/v1.4.2...v1.4.3
|
|
128
131
|
[v1.4.2]: https://github.com/SAP/ui5-task-adaptation/compare/v1.4.0...v1.4.2
|
package/dist/baseAppManager.js
CHANGED
|
@@ -104,6 +104,9 @@ export default class BaseApp {
|
|
|
104
104
|
}
|
|
105
105
|
VALIDATION_RULES = new Map([["sap.app/id", (value) => {
|
|
106
106
|
if (!value.includes(".")) {
|
|
107
|
+
// https://help.sap.com/docs/bas/developing-sap-fiori-app-in-sap-business-application-studio/releasing-sap-fiori-application-to-be-extensible-in-adaptation-projects-on-sap-s-4hana-cloud
|
|
108
|
+
// In the manifest.json file, make sure that the attribute
|
|
109
|
+
// sap.app/id has at least 2 segments.
|
|
107
110
|
throw new Error(`The original application id '${value}' should consist of multiple segments split by dot, e.g.: original.id`);
|
|
108
111
|
}
|
|
109
112
|
}]]);
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as dotenv from "dotenv";
|
|
2
|
-
import {
|
|
2
|
+
import { logBuilderVersion } from "./util/commonUtil.js";
|
|
3
3
|
import AppVariant from "./appVariantManager.js";
|
|
4
4
|
import BaseApp from "./baseAppManager.js";
|
|
5
5
|
import I18nMerger from "./util/i18nMerger.js";
|
|
@@ -13,7 +13,6 @@ export default ({ workspace, options, taskUtil }) => {
|
|
|
13
13
|
dotenv.config();
|
|
14
14
|
async function process(workspace, taskUtil) {
|
|
15
15
|
logBuilderVersion();
|
|
16
|
-
logBetaUsage();
|
|
17
16
|
const processor = determineProcessor(options.configuration);
|
|
18
17
|
const adaptationProject = await AppVariant.fromWorkspace(workspace, options.projectNamespace);
|
|
19
18
|
const appVariantIdHierarchy = await processor.getAppVariantIdHierarchy(adaptationProject.reference);
|
|
@@ -8,6 +8,8 @@ import HTML5RepoManager from "../repositories/html5RepoManager.js";
|
|
|
8
8
|
import { cached } from "../cache/cacheHolder.js";
|
|
9
9
|
import { validateObject } from "../util/commonUtil.js";
|
|
10
10
|
import CFUtil from "../util/cfUtil.js";
|
|
11
|
+
import { getLogger } from "@ui5/logger";
|
|
12
|
+
const log = getLogger("@ui5/task-adaptation::CFProcessor");
|
|
11
13
|
export default class CFProcessor {
|
|
12
14
|
configuration;
|
|
13
15
|
constructor(configuration) {
|
|
@@ -36,6 +38,12 @@ export default class CFProcessor {
|
|
|
36
38
|
if (!xsAppJsonContent) {
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
41
|
+
// Also skip if no routes or no routes with a destination property
|
|
42
|
+
const xsAppJson = JSON.parse(xsAppJsonContent);
|
|
43
|
+
if (!Array.isArray(xsAppJson.routes) || !xsAppJson.routes.some((route) => route.destination)) {
|
|
44
|
+
log.verbose(`No routes with 'destination' found in xs-app.json for app '${this.configuration.appName}'. Skipping xs-app.json update.`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
39
47
|
const { serviceInstanceName, space } = this.configuration;
|
|
40
48
|
if (!serviceInstanceName) {
|
|
41
49
|
throw new Error(`Service instance name must be specified in ui5.yaml configuration for app '${this.configuration.appName}'`);
|
|
@@ -48,9 +56,13 @@ export default class CFProcessor {
|
|
|
48
56
|
catch (error) {
|
|
49
57
|
throw new Error(`Failed to get valid service keys for app '${this.configuration.appName}': ${error.message}`);
|
|
50
58
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
if (serviceCredentials) {
|
|
60
|
+
xsAppJson.routes = this.enhanceRoutesWithEndpointAndService(serviceCredentials, xsAppJson.routes);
|
|
61
|
+
baseAppFiles.set("xs-app.json", JSON.stringify(xsAppJson, null, 2));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
log.info(`No endpoints found for app '${this.configuration.appName}'. xs-app.json will not be updated.`);
|
|
65
|
+
}
|
|
54
66
|
}
|
|
55
67
|
enhanceRoutesWithEndpointAndService(serviceCredentials, baseRoutes) {
|
|
56
68
|
const endpoints = serviceCredentials.endpoints;
|
package/dist/util/cfUtil.js
CHANGED
|
@@ -214,7 +214,7 @@ export default class CFUtil {
|
|
|
214
214
|
return validKey.credentials;
|
|
215
215
|
}
|
|
216
216
|
const uniqueServiceKeyName = await uniqueServiceKeyNamePromise;
|
|
217
|
-
log.
|
|
217
|
+
log.verbose(`No valid service key found with proper endpoints structure. Creating new service key '${uniqueServiceKeyName}' for '${serviceInstance.name}'`);
|
|
218
218
|
await this.createServiceKey(serviceInstance.name, uniqueServiceKeyName);
|
|
219
219
|
// Get the newly created service key and validate its endpoints
|
|
220
220
|
const newValidKey = await this.getServiceKeyWithValidEndpoints(serviceInstance.guid);
|
package/package.json
CHANGED
|
@@ -1,127 +1,132 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"author": "SAP SE",
|
|
33
|
-
"license": "Apache-2.0",
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@sap-ux/axios-extension": "^1.16.6",
|
|
36
|
-
"@sap-ux/btp-utils": "^1.0.2",
|
|
37
|
-
"@sap-ux/store": "^0.9.1",
|
|
38
|
-
"@sap-ux/system-access": "^0.5.11",
|
|
39
|
-
"@sap/cf-tools": "^3.2.2",
|
|
40
|
-
"@ui5/fs": "^4.0.1",
|
|
41
|
-
"@ui5/logger": "^4.0.1",
|
|
42
|
-
"adm-zip": "^0.5.5",
|
|
43
|
-
"axios": "^1.8.3",
|
|
44
|
-
"crc": "^4.3.2",
|
|
45
|
-
"dotenv": "^16.0.3",
|
|
46
|
-
"filenamify": "^6.0.0",
|
|
47
|
-
"jsdom": "^23.0.1",
|
|
48
|
-
"temp-dir": "^2.0.0",
|
|
49
|
-
"transliteration": "^2.3.5",
|
|
50
|
-
"xml-js": "^1.6.11"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@buxlabs/amd-to-es6": "^0.16.3",
|
|
54
|
-
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
55
|
-
"@types/adm-zip": "^0.4.34",
|
|
56
|
-
"@types/chai": "^4.2.21",
|
|
57
|
-
"@types/chai-as-promised": "^7.1.4",
|
|
58
|
-
"@types/js-yaml": "^4.0.3",
|
|
59
|
-
"@types/jsdom": "^21.1.6",
|
|
60
|
-
"@types/lodash": "^4.14.196",
|
|
61
|
-
"@types/mocha": "^9.1.0",
|
|
62
|
-
"@types/semver": "^7.3.8",
|
|
63
|
-
"@types/sinon": "^10.0.16",
|
|
64
|
-
"@ui5/builder": "^4.0.3",
|
|
65
|
-
"@ui5/project": "^4.0.3",
|
|
66
|
-
"amdextract": "^3.0.0",
|
|
67
|
-
"builtin-modules": "^3.2.0",
|
|
68
|
-
"c8": "^10.1.3",
|
|
69
|
-
"chai": "^4.3.4",
|
|
70
|
-
"chai-as-promised": "^7.1.1",
|
|
71
|
-
"eslint": "^9.22.0",
|
|
72
|
-
"eslint-plugin-import": "^2.31.0",
|
|
73
|
-
"esmock": "^2.6.3",
|
|
74
|
-
"glob": "^10.3.10",
|
|
75
|
-
"js-yaml": "^4.1.0",
|
|
76
|
-
"meriyah": "^6.0.3",
|
|
77
|
-
"minimatch": "^9.0.3",
|
|
78
|
-
"mocha": "^11.1.0",
|
|
79
|
-
"mock-require": "^3.0.3",
|
|
80
|
-
"rollup": "^4.24.0",
|
|
81
|
-
"semver": "^7.3.5",
|
|
82
|
-
"sinon": "^18.0.1",
|
|
83
|
-
"source-map-support": "^0.5.19",
|
|
84
|
-
"tsx": "^4.7.1",
|
|
85
|
-
"typescript": "^5.4.2",
|
|
86
|
-
"typescript-eslint": "^8.26.1"
|
|
87
|
-
},
|
|
88
|
-
"c8": {
|
|
89
|
-
"src": "./src",
|
|
90
|
-
"all": true,
|
|
91
|
-
"reporter": [
|
|
92
|
-
"lcov",
|
|
93
|
-
"text",
|
|
94
|
-
"text-summary"
|
|
2
|
+
"name": "@ui5/task-adaptation",
|
|
3
|
+
"version": "1.5.2",
|
|
4
|
+
"description": "Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "npm run lint && npm run build && npm run coverage",
|
|
8
|
+
"lint": "eslint ./src ./test/lib",
|
|
9
|
+
"dev": "UI5_LOG_LVL=error mocha --no-timeouts --no-warnings --import=tsx --loader=esmock 'test/lib/**/*.spec.ts'",
|
|
10
|
+
"perf": "UI5_LOG_LVL=error mocha --no-timeouts --no-warnings --import=tsx --loader=esmock 'test/lib/**/*.perf.ts'",
|
|
11
|
+
"coverage": "c8 npm run dev",
|
|
12
|
+
"preversion": "npm test",
|
|
13
|
+
"version": "git-chglog --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
|
|
14
|
+
"prepublishOnly": "git push --follow-tags",
|
|
15
|
+
"release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version",
|
|
16
|
+
"rollup": "tsx scripts/rollup.ts",
|
|
17
|
+
"build": "npm run rollup && tsc -p ./",
|
|
18
|
+
"download-metadata": "tsx scripts/metadataDownloadHelper.ts"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/SAP/ui5-task-adaptation.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"adaptation",
|
|
26
|
+
"ui5",
|
|
27
|
+
"builder",
|
|
28
|
+
"tools",
|
|
29
|
+
"business",
|
|
30
|
+
"application",
|
|
31
|
+
"studio"
|
|
95
32
|
],
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
33
|
+
"author": "SAP SE",
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@sap-ux/axios-extension": "^1.16.6",
|
|
37
|
+
"@sap-ux/btp-utils": "^1.0.2",
|
|
38
|
+
"@sap-ux/store": "^0.9.1",
|
|
39
|
+
"@sap-ux/system-access": "^0.5.11",
|
|
40
|
+
"@sap/cf-tools": "^3.2.2",
|
|
41
|
+
"@ui5/fs": "^4.0.1",
|
|
42
|
+
"@ui5/logger": "^4.0.1",
|
|
43
|
+
"adm-zip": "^0.5.5",
|
|
44
|
+
"axios": "^1.8.3",
|
|
45
|
+
"crc": "^4.3.2",
|
|
46
|
+
"dotenv": "^16.0.3",
|
|
47
|
+
"filenamify": "^6.0.0",
|
|
48
|
+
"jsdom": "^23.0.1",
|
|
49
|
+
"temp-dir": "^2.0.0",
|
|
50
|
+
"transliteration": "^2.3.5",
|
|
51
|
+
"xml-js": "^1.6.11"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@buxlabs/amd-to-es6": "^0.16.3",
|
|
55
|
+
"@octokit/plugin-retry": "^8.0.1",
|
|
56
|
+
"@octokit/rest": "^22.0.0",
|
|
57
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
58
|
+
"@types/adm-zip": "^0.4.34",
|
|
59
|
+
"@types/chai": "^4.2.21",
|
|
60
|
+
"@types/chai-as-promised": "^7.1.4",
|
|
61
|
+
"@types/js-yaml": "^4.0.3",
|
|
62
|
+
"@types/jsdom": "^21.1.6",
|
|
63
|
+
"@types/lodash": "^4.14.196",
|
|
64
|
+
"@types/mocha": "^9.1.0",
|
|
65
|
+
"@types/semver": "^7.3.8",
|
|
66
|
+
"@types/sinon": "^10.0.16",
|
|
67
|
+
"@types/yargs": "^17.0.33",
|
|
68
|
+
"@ui5/builder": "^4.0.3",
|
|
69
|
+
"@ui5/project": "^4.0.3",
|
|
70
|
+
"amdextract": "^3.0.0",
|
|
71
|
+
"builtin-modules": "^3.2.0",
|
|
72
|
+
"c8": "^10.1.3",
|
|
73
|
+
"chai": "^4.3.4",
|
|
74
|
+
"chai-as-promised": "^7.1.1",
|
|
75
|
+
"eslint": "^9.22.0",
|
|
76
|
+
"eslint-plugin-import": "^2.31.0",
|
|
77
|
+
"esmock": "^2.6.3",
|
|
78
|
+
"glob": "^10.3.10",
|
|
79
|
+
"js-yaml": "^4.1.0",
|
|
80
|
+
"meriyah": "^6.0.3",
|
|
81
|
+
"minimatch": "^9.0.3",
|
|
82
|
+
"mocha": "^11.1.0",
|
|
83
|
+
"mock-require": "^3.0.3",
|
|
84
|
+
"rollup": "^4.24.0",
|
|
85
|
+
"semver": "^7.3.5",
|
|
86
|
+
"sinon": "^18.0.1",
|
|
87
|
+
"source-map-support": "^0.5.19",
|
|
88
|
+
"tsx": "^4.7.1",
|
|
89
|
+
"typescript": "^5.4.2",
|
|
90
|
+
"typescript-eslint": "^8.26.1",
|
|
91
|
+
"yargs": "^17.7.2"
|
|
92
|
+
},
|
|
93
|
+
"c8": {
|
|
94
|
+
"src": "./src",
|
|
95
|
+
"all": true,
|
|
96
|
+
"reporter": [
|
|
97
|
+
"lcov",
|
|
98
|
+
"text",
|
|
99
|
+
"text-summary"
|
|
100
|
+
],
|
|
101
|
+
"exclude": [
|
|
102
|
+
".eslintrc.js",
|
|
103
|
+
"docs/**",
|
|
104
|
+
"jsdocs/**",
|
|
105
|
+
"coverage/**",
|
|
106
|
+
"test/**",
|
|
107
|
+
"lib/processors/jsdoc/lib/**",
|
|
108
|
+
"dist/**",
|
|
109
|
+
"src/model/types.ts",
|
|
110
|
+
"src/util/requestUtil.ts",
|
|
111
|
+
"src/util/renamingHandlers/renamingHandler.ts",
|
|
112
|
+
"scripts/**/*.js",
|
|
113
|
+
"scripts/git/octokitUtil.ts",
|
|
114
|
+
"*/**/*.d.ts",
|
|
115
|
+
"src/annotations/comparator/diffCase.ts",
|
|
116
|
+
"src/annotations/transformers/transformer.ts",
|
|
117
|
+
"src/model/configuration.ts",
|
|
118
|
+
"src/model/appVariantIdHierarchyItem.ts"
|
|
119
|
+
],
|
|
120
|
+
"check-coverage": true,
|
|
121
|
+
"statements": 85,
|
|
122
|
+
"branches": 70,
|
|
123
|
+
"functions": 90,
|
|
124
|
+
"lines": 85
|
|
125
|
+
},
|
|
126
|
+
"types": "dist/index.d.ts",
|
|
127
|
+
"type": "module",
|
|
128
|
+
"optionalDependencies": {
|
|
129
|
+
"@rollup/rollup-linux-x64-gnu": "^4.28.1",
|
|
130
|
+
"@rollup/rollup-linux-x64-musl": "^4.28.1"
|
|
131
|
+
}
|
|
127
132
|
}
|