@ui5/task-adaptation 1.4.2 → 1.4.3
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 +12 -1
- package/REUSE.toml +10 -0
- package/dist/annotations/dataSource/dataSource.js +0 -1
- package/dist/baseAppManager.js +2 -2
- package/dist/bundle.d.ts +2 -3
- package/dist/bundle.js +3816 -3488
- package/dist/model/configuration.d.ts +2 -2
- package/dist/model/types.d.ts +1 -1
- package/dist/processors/cfProcessor.js +1 -1
- package/dist/processors/processor.js +1 -1
- package/dist/repositories/html5RepoManager.js +3 -2
- package/dist/util/cfUtil.d.ts +1 -0
- package/dist/util/cfUtil.js +27 -23
- package/dist/util/commonUtil.d.ts +1 -1
- package/dist/util/commonUtil.js +1 -1
- package/dist/util/requestUtil.d.ts +2 -1
- package/eslint.config.js +22 -3
- package/package.json +15 -15
- package/scripts/rollup/bundle.d.ts +2 -3
- package/scripts/rollup/bundleDefinition.js +2 -2
- package/scripts/rollup/overrides/sap/ui/fl/Utils.js +13 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +13 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +11 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +68 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +11 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +11 -0
- package/scripts/rollup/overrides/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -0
- package/scripts/rollup/overrides/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +13 -0
- package/scripts/rollup/overrides/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +14 -0
- package/scripts/rollup/project/ui5.yaml +1 -1
- package/scripts/rollup/overrides/sap/ui/fl/Change.js +0 -74
package/dist/model/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export default class CFProcessor {
|
|
|
19
19
|
updateCloudPlatform(renamedBaseAppManifest) {
|
|
20
20
|
const sapCloudService = renamedBaseAppManifest["sap.cloud"]?.service;
|
|
21
21
|
const sapPlatformCf = renamedBaseAppManifest["sap.platform.cf"];
|
|
22
|
-
if (sapPlatformCf && sapCloudService) {
|
|
22
|
+
if (sapPlatformCf?.oAuthScopes && sapCloudService) {
|
|
23
23
|
sapPlatformCf.oAuthScopes = sapPlatformCf.oAuthScopes.map((scope) => scope.replace(`$XSAPPNAME.`, `$XSAPPNAME('${sapCloudService}').`));
|
|
24
24
|
}
|
|
25
25
|
if (this.configuration.sapCloudService) {
|
|
@@ -13,7 +13,7 @@ export default class HTML5RepoManager {
|
|
|
13
13
|
return this.requestMetadata(configuration, baseUri, token);
|
|
14
14
|
}
|
|
15
15
|
static async getHtml5RepoInfo(configuration) {
|
|
16
|
-
const spaceGuid = await CFUtil.getSpaceGuid(configuration?.
|
|
16
|
+
const spaceGuid = await CFUtil.getSpaceGuid(configuration?.space);
|
|
17
17
|
const credentials = await this.getHTML5Credentials(spaceGuid);
|
|
18
18
|
const token = await this.getToken(credentials);
|
|
19
19
|
return {
|
|
@@ -33,7 +33,8 @@ export default class HTML5RepoManager {
|
|
|
33
33
|
const createParams = {
|
|
34
34
|
spaceGuid,
|
|
35
35
|
planName: PLAN_NAME,
|
|
36
|
-
serviceName:
|
|
36
|
+
serviceName: "html5-apps-repo",
|
|
37
|
+
serviceInstanceName: SERVIСE_INSTANCE_NAME,
|
|
37
38
|
tags: ["html5-apps-repo-rt"]
|
|
38
39
|
};
|
|
39
40
|
const serviceKeys = await CFUtil.getServiceInstanceKeys(getParams, createParams);
|
package/dist/util/cfUtil.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default class CFUtil {
|
|
|
14
14
|
private static getServiceKeys;
|
|
15
15
|
private static createServiceKey;
|
|
16
16
|
private static getServiceInstance;
|
|
17
|
+
static processErrors(json: any): void;
|
|
17
18
|
static requestCfApi(url: string): Promise<IResource[]>;
|
|
18
19
|
static getOAuthToken(): Promise<string>;
|
|
19
20
|
private static cfExecute;
|
package/dist/util/cfUtil.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cfCreateService, cfGetInstanceCredentials
|
|
1
|
+
import { cfCreateService, cfGetInstanceCredentials } from "@sap/cf-tools/out/src/cf-local.js";
|
|
2
|
+
import { getSpaceGuidThrowIfUndefined } from "@sap/cf-tools/out/src/utils.js";
|
|
2
3
|
import { Cli } from "@sap/cf-tools/out/src/cli.js";
|
|
3
4
|
import { eFilters } from "@sap/cf-tools/out/src/types.js";
|
|
4
5
|
import { getLogger } from "@ui5/logger";
|
|
@@ -34,16 +35,20 @@ export default class CFUtil {
|
|
|
34
35
|
}
|
|
35
36
|
static async createService(params) {
|
|
36
37
|
log.verbose(`Creating a service instance with parameters: ${JSON.stringify(params)}`);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const serviceOfferings = await this.requestCfApi(`/v3/service_offerings?names=${params.serviceName}`);
|
|
39
|
+
if (serviceOfferings.length === 0) {
|
|
40
|
+
throw new Error(`Cannot find a service offering by name '${params.serviceName}'`);
|
|
41
|
+
}
|
|
42
|
+
const plans = await this.requestCfApi(`/v3/service_plans?service_offering_guids=${serviceOfferings[0].guid}`);
|
|
43
|
+
const plan = plans.find(plan => plan.name === params.planName);
|
|
44
|
+
if (!plan) {
|
|
45
|
+
throw new Error(`Cannot find a plan by name '${params.planName}' for service '${params.serviceName}'`);
|
|
41
46
|
}
|
|
42
47
|
try {
|
|
43
|
-
await cfCreateService(
|
|
48
|
+
await cfCreateService(plan.guid, params.serviceInstanceName, params.parameters, params.tags);
|
|
44
49
|
}
|
|
45
50
|
catch (error) {
|
|
46
|
-
throw new Error(`Cannot create a service instance '${params.
|
|
51
|
+
throw new Error(`Cannot create a service instance '${params.serviceInstanceName}' in space '${params.spaceGuid}': ${error.message}`);
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
static async getOrCreateServiceKeys(serviceInstance) {
|
|
@@ -73,7 +78,7 @@ export default class CFUtil {
|
|
|
73
78
|
return this.cfExecute(["create-service-key", serviceInstanceName, serviceKeyName]);
|
|
74
79
|
}
|
|
75
80
|
catch (error) {
|
|
76
|
-
throw new Error(`Couldn't create a service key for instance
|
|
81
|
+
throw new Error(`Couldn't create a service key for instance ${serviceInstanceName}: ${error.message}`);
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
84
|
static async getServiceInstance(params) {
|
|
@@ -92,9 +97,19 @@ export default class CFUtil {
|
|
|
92
97
|
guid: service.guid
|
|
93
98
|
}));
|
|
94
99
|
}
|
|
100
|
+
static processErrors(json) {
|
|
101
|
+
if (json?.errors?.length > 0) {
|
|
102
|
+
const message = JSON.stringify(json.errors);
|
|
103
|
+
if (json?.errors?.some((e) => e.title === "CF-NotAuthenticated" || e.code === 10002)) {
|
|
104
|
+
throw new Error(`Authentication error. Use 'cf login' to authenticate in Cloud Foundry: ${message}`);
|
|
105
|
+
}
|
|
106
|
+
throw new Error(`Failed sending request to Cloud Foundry: ${message}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
95
109
|
static async requestCfApi(url) {
|
|
96
110
|
const response = await this.cfExecute(["curl", url]);
|
|
97
111
|
const json = this.parseJson(response);
|
|
112
|
+
this.processErrors(json);
|
|
98
113
|
const resources = json?.resources;
|
|
99
114
|
const totalPages = json?.pagination?.total_pages;
|
|
100
115
|
if (totalPages > 1) {
|
|
@@ -105,7 +120,7 @@ export default class CFUtil {
|
|
|
105
120
|
return this.parseJson(response)?.resources || [];
|
|
106
121
|
})).then(resources => [].concat(...resources)));
|
|
107
122
|
}
|
|
108
|
-
return resources;
|
|
123
|
+
return resources ?? [];
|
|
109
124
|
}
|
|
110
125
|
static getOAuthToken() {
|
|
111
126
|
return this.cfExecute(["oauth-token"]);
|
|
@@ -152,20 +167,9 @@ export default class CFUtil {
|
|
|
152
167
|
* @memberof CFUtil
|
|
153
168
|
*/
|
|
154
169
|
static async getSpaceGuid(spaceGuid) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const resources = await this.requestCfApi(`/v3/spaces?names=${spaceName}`);
|
|
159
|
-
for (const resource of resources) {
|
|
160
|
-
spaceGuid = resource.guid;
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (spaceGuid == null) {
|
|
166
|
-
throw new Error("Please login to Cloud Foundry with 'cf login' and try again");
|
|
167
|
-
}
|
|
168
|
-
return spaceGuid;
|
|
170
|
+
return spaceGuid ?? getSpaceGuidThrowIfUndefined().catch((e) => {
|
|
171
|
+
throw new Error("Please specify space and org guids in ui5.yaml or login to Cloud Foundry with 'cf login' and try again: " + e.message);
|
|
172
|
+
});
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
//# sourceMappingURL=cfUtil.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IConfiguration } from "../model/types.js";
|
|
2
2
|
import Language from "../model/language.js";
|
|
3
3
|
export declare function dotToUnderscore(value: string): string;
|
|
4
|
-
export declare function validateObject<T extends
|
|
4
|
+
export declare function validateObject<T extends object>(options: T, properties: Array<keyof T>, message: string): void;
|
|
5
5
|
export declare function escapeRegex(update: string): string;
|
|
6
6
|
export declare function renameResources(files: Map<string, string>, search: string, replacement: string): Map<string, string>;
|
|
7
7
|
export declare function insertInArray<T>(array: T[], index: number, insert: T): void;
|
package/dist/util/commonUtil.js
CHANGED
|
@@ -102,7 +102,7 @@ export function logBuilderVersion() {
|
|
|
102
102
|
const packageJsonVersion = JSON.parse(packageJson).version;
|
|
103
103
|
log.info(`Running app-variant-bundler-build with version ${packageJsonVersion}`);
|
|
104
104
|
}
|
|
105
|
-
catch (
|
|
105
|
+
catch (_error) {
|
|
106
106
|
// do nothing
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
1
2
|
export default class RequestUtil {
|
|
2
3
|
static head(url: string): Promise<any>;
|
|
3
4
|
static get(url: string, options?: any): Promise<any>;
|
|
4
|
-
static request(url: string, method:
|
|
5
|
+
static request(url: string, method: (url: string, config?: AxiosRequestConfig) => any, options?: any): Promise<any>;
|
|
5
6
|
private static handleError;
|
|
6
7
|
}
|
package/eslint.config.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
1
|
import * as eslintimport from "eslint-plugin-import";
|
|
4
2
|
|
|
5
3
|
import eslint from "@eslint/js";
|
|
@@ -11,7 +9,11 @@ export default tseslint.config(
|
|
|
11
9
|
{
|
|
12
10
|
languageOptions: {
|
|
13
11
|
parserOptions: {
|
|
14
|
-
project:
|
|
12
|
+
project: [
|
|
13
|
+
"./tsconfig.json",
|
|
14
|
+
"./test/tsconfig.json",
|
|
15
|
+
"./scripts/tsconfig.json"
|
|
16
|
+
],
|
|
15
17
|
tsconfigRootDir: import.meta.dirname,
|
|
16
18
|
},
|
|
17
19
|
},
|
|
@@ -46,7 +48,24 @@ export default tseslint.config(
|
|
|
46
48
|
{
|
|
47
49
|
"js": "always"
|
|
48
50
|
}
|
|
51
|
+
],
|
|
52
|
+
"@typescript-eslint/no-unused-vars": [
|
|
53
|
+
"warn", // or "error"
|
|
54
|
+
{
|
|
55
|
+
"argsIgnorePattern": "^_",
|
|
56
|
+
"varsIgnorePattern": "^_",
|
|
57
|
+
"caughtErrorsIgnorePattern": "^_"
|
|
58
|
+
}
|
|
49
59
|
]
|
|
50
60
|
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
files: ["test/**/*.spec.ts"],
|
|
64
|
+
rules: {
|
|
65
|
+
"@typescript-eslint/no-unused-expressions": "off"
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
ignores: ["test/resources/**"]
|
|
51
70
|
}
|
|
52
71
|
);
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/task-adaptation",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "npm run lint && npm run build && npm run coverage",
|
|
8
|
-
"lint": "
|
|
8
|
+
"lint": "eslint ./src ./test",
|
|
9
9
|
"dev": "UI5_LOG_LVL=error mocha --no-timeouts --no-warnings --import=tsx --loader=esmock 'test/**/*.spec.ts'",
|
|
10
|
-
"
|
|
11
|
-
"coverage": "npx c8 npm run dev",
|
|
10
|
+
"coverage": "c8 npm run dev",
|
|
12
11
|
"preversion": "npm test",
|
|
13
12
|
"version": "git-chglog --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
|
|
14
13
|
"prepublishOnly": "git push --follow-tags",
|
|
@@ -34,14 +33,14 @@
|
|
|
34
33
|
"license": "Apache-2.0",
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@sap-ux/axios-extension": "^1.16.6",
|
|
37
|
-
"@sap-ux/btp-utils": "^0.
|
|
36
|
+
"@sap-ux/btp-utils": "^1.0.2",
|
|
38
37
|
"@sap-ux/store": "^0.9.1",
|
|
39
38
|
"@sap-ux/system-access": "^0.5.11",
|
|
40
39
|
"@sap/cf-tools": "^3.2.0",
|
|
41
40
|
"@ui5/fs": "^4.0.1",
|
|
42
41
|
"@ui5/logger": "^4.0.1",
|
|
43
42
|
"adm-zip": "^0.5.5",
|
|
44
|
-
"axios": "^1.
|
|
43
|
+
"axios": "^1.8.3",
|
|
45
44
|
"crc": "^4.3.2",
|
|
46
45
|
"dotenv": "^16.0.3",
|
|
47
46
|
"jsdom": "^23.0.1",
|
|
@@ -51,8 +50,7 @@
|
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@buxlabs/amd-to-es6": "^0.16.3",
|
|
54
|
-
"@
|
|
55
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
53
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
56
54
|
"@types/adm-zip": "^0.4.34",
|
|
57
55
|
"@types/chai": "^4.2.21",
|
|
58
56
|
"@types/chai-as-promised": "^7.1.4",
|
|
@@ -65,27 +63,29 @@
|
|
|
65
63
|
"@ui5/project": "^4.0.3",
|
|
66
64
|
"amdextract": "^3.0.0",
|
|
67
65
|
"builtin-modules": "^3.2.0",
|
|
68
|
-
"c8": "^
|
|
66
|
+
"c8": "^10.1.3",
|
|
69
67
|
"chai": "^4.3.4",
|
|
70
68
|
"chai-as-promised": "^7.1.1",
|
|
71
69
|
"chalk": "^4.1.2",
|
|
72
|
-
"eslint": "^
|
|
73
|
-
"eslint-plugin-import": "^2.
|
|
70
|
+
"eslint": "^9.22.0",
|
|
71
|
+
"eslint-plugin-import": "^2.31.0",
|
|
74
72
|
"esmock": "^2.6.3",
|
|
75
73
|
"glob": "^10.3.10",
|
|
76
74
|
"js-yaml": "^4.1.0",
|
|
77
75
|
"lodash": "^4.17.21",
|
|
78
76
|
"minimatch": "^9.0.3",
|
|
79
|
-
"mocha": "^
|
|
77
|
+
"mocha": "^11.1.0",
|
|
80
78
|
"mock-require": "^3.0.3",
|
|
81
|
-
"
|
|
82
|
-
"rollup": "^4.9.6",
|
|
79
|
+
"rollup": "^4.24.0",
|
|
83
80
|
"semver": "^7.3.5",
|
|
84
81
|
"sinon": "^18.0.1",
|
|
85
82
|
"source-map-support": "^0.5.19",
|
|
86
83
|
"tsx": "^4.7.1",
|
|
87
84
|
"typescript": "^5.4.2",
|
|
88
|
-
"typescript-eslint": "^
|
|
85
|
+
"typescript-eslint": "^8.26.1"
|
|
86
|
+
},
|
|
87
|
+
"optionalDependencies": {
|
|
88
|
+
"@rollup/rollup-linux-x64-gnu": "4.39.0"
|
|
89
89
|
},
|
|
90
90
|
"c8": {
|
|
91
91
|
"src": "./src",
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export declare const RegistrationBuild: () => void;
|
|
2
2
|
|
|
3
3
|
export declare class Applier {
|
|
4
|
-
static applyChanges(manifest: any, changes:
|
|
4
|
+
static applyChanges(manifest: any, changes: AppDescriptorChange[], strategy: any): Promise<void>;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class AppDescriptorChange {
|
|
8
8
|
constructor(change: any);
|
|
9
9
|
getLayer(): string;
|
|
10
|
-
_oDefinition: any;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export declare class V2MetadataConverter {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//Flex
|
|
2
|
+
import AppDescriptorChange from "sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange";
|
|
2
3
|
import Applier from "sap/ui/fl/apply/_internal/changes/descriptor/Applier";
|
|
3
4
|
import ApplyUtil from "sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil";
|
|
4
|
-
import Change from "sap/ui/fl/Change";
|
|
5
5
|
import RegistrationBuild from "sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild";
|
|
6
6
|
//OData
|
|
7
7
|
import URI from "sap/ui/thirdparty/URI";
|
|
@@ -10,9 +10,9 @@ import V4MetadataConverter from "sap/ui/model/odata/v4/lib/_V4MetadataConverter"
|
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
//Flex
|
|
13
|
+
AppDescriptorChange,
|
|
13
14
|
Applier,
|
|
14
15
|
ApplyUtil,
|
|
15
|
-
Change,
|
|
16
16
|
RegistrationBuild,
|
|
17
17
|
//OData
|
|
18
18
|
URI,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
return {
|
|
11
|
+
getChangeFromChangesMap: function () { }
|
|
12
|
+
};
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
return {
|
|
11
|
+
hasChangeApplyFinishedCustomData: function () { }
|
|
12
|
+
};
|
|
13
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Flexibility change class. Stores change content and related information.
|
|
14
|
+
*
|
|
15
|
+
* @param {object} oFile - File content and admin data
|
|
16
|
+
*
|
|
17
|
+
* @class sap.ui.fl.Change
|
|
18
|
+
* @private
|
|
19
|
+
* @ui5-restricted
|
|
20
|
+
* @experimental Since 1.25.0
|
|
21
|
+
*/
|
|
22
|
+
var AppDescriptorChange = function (content) {
|
|
23
|
+
this.content = content;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns the change type.
|
|
28
|
+
*
|
|
29
|
+
* @returns {String} Change type of the file, for example <code>LabelChange</code>
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
AppDescriptorChange.prototype.getChangeType = function () {
|
|
33
|
+
return this.content?.flexObjectMetadata?.changeType || this.content?.changeType;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets the layer type for the change.
|
|
38
|
+
* @returns {string} Layer of the change file
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
AppDescriptorChange.prototype.getLayer = function () {
|
|
43
|
+
return this.content.layer;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns the content section of the change.
|
|
48
|
+
* @returns {string} Content of the change file. The content structure can be any JSON.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
AppDescriptorChange.prototype.getContent = function () {
|
|
53
|
+
return this.content.content;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns all texts.
|
|
58
|
+
*
|
|
59
|
+
* @returns {object} All texts
|
|
60
|
+
*
|
|
61
|
+
* @function
|
|
62
|
+
*/
|
|
63
|
+
AppDescriptorChange.prototype.getTexts = function () {
|
|
64
|
+
return this.content.texts;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return AppDescriptorChange;
|
|
68
|
+
}, true);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
return {
|
|
11
|
+
getChangeInformationProvider: function () { }
|
|
12
|
+
};
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
return {
|
|
11
|
+
waitForChangeHandlerRegistration: function () { }
|
|
12
|
+
};
|
|
13
|
+
});
|
package/scripts/rollup/overrides/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function (
|
|
9
|
+
) {
|
|
10
|
+
return {
|
|
11
|
+
getAnnotationChangeHandler: function () { },
|
|
12
|
+
getChangeHandler: function () { }
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
|
|
9
|
-
], function (
|
|
10
|
-
|
|
11
|
-
) {
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Flexibility change class. Stores change content and related information.
|
|
16
|
-
*
|
|
17
|
-
* @param {object} oFile - File content and admin data
|
|
18
|
-
*
|
|
19
|
-
* @class sap.ui.fl.Change
|
|
20
|
-
* @private
|
|
21
|
-
* @ui5-restricted
|
|
22
|
-
* @experimental Since 1.25.0
|
|
23
|
-
*/
|
|
24
|
-
var Change = function (oFile) {
|
|
25
|
-
this._oDefinition = oFile;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Returns the change type.
|
|
30
|
-
*
|
|
31
|
-
* @returns {String} Change type of the file, for example <code>LabelChange</code>
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
Change.prototype.getChangeType = function () {
|
|
35
|
-
if (this._oDefinition) {
|
|
36
|
-
return this._oDefinition.flexObjectMetadata
|
|
37
|
-
? this._oDefinition.flexObjectMetadata.changeType
|
|
38
|
-
: this._oDefinition.changeType
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Gets the layer type for the change.
|
|
44
|
-
* @returns {string} Layer of the change file
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
Change.prototype.getLayer = function () {
|
|
49
|
-
return this._oDefinition.layer;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Returns the content section of the change.
|
|
54
|
-
* @returns {string} Content of the change file. The content structure can be any JSON.
|
|
55
|
-
*
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
Change.prototype.getContent = function () {
|
|
59
|
-
return this._oDefinition.content;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Returns all texts.
|
|
64
|
-
*
|
|
65
|
-
* @returns {object} All texts
|
|
66
|
-
*
|
|
67
|
-
* @function
|
|
68
|
-
*/
|
|
69
|
-
Change.prototype.getTexts = function () {
|
|
70
|
-
return this._oDefinition.texts;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
return Change;
|
|
74
|
-
}, true);
|