@sap-ux/adp-tooling 0.19.11 → 1.0.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 +1 -1
- package/dist/abap/client.js +8 -13
- package/dist/abap/config.js +5 -8
- package/dist/abap/index.d.ts +3 -3
- package/dist/abap/index.js +3 -19
- package/dist/abap/provider.js +5 -8
- package/dist/base/abap/manifest-service.d.ts +1 -1
- package/dist/base/abap/manifest-service.js +9 -18
- package/dist/base/cf.js +8 -11
- package/dist/base/change-utils.d.ts +1 -1
- package/dist/base/change-utils.js +49 -62
- package/dist/base/constants/index.js +12 -15
- package/dist/base/credentials.d.ts +2 -2
- package/dist/base/credentials.js +6 -9
- package/dist/base/helper.d.ts +1 -1
- package/dist/base/helper.js +40 -57
- package/dist/base/project-builder.js +3 -6
- package/dist/base/prompt.d.ts +1 -1
- package/dist/base/prompt.js +19 -25
- package/dist/btp/api.d.ts +1 -1
- package/dist/btp/api.js +10 -18
- package/dist/btp/index.d.ts +1 -1
- package/dist/btp/index.js +1 -17
- package/dist/cf/app/discovery.d.ts +1 -1
- package/dist/cf/app/discovery.js +11 -18
- package/dist/cf/app/html5-repo.d.ts +1 -1
- package/dist/cf/app/html5-repo.js +24 -32
- package/dist/cf/app/index.d.ts +2 -2
- package/dist/cf/app/index.js +2 -18
- package/dist/cf/core/auth.d.ts +1 -1
- package/dist/cf/core/auth.js +4 -8
- package/dist/cf/core/config.d.ts +1 -1
- package/dist/cf/core/config.js +9 -15
- package/dist/cf/core/index.d.ts +2 -2
- package/dist/cf/core/index.js +2 -18
- package/dist/cf/deploy.d.ts +1 -1
- package/dist/cf/deploy.js +33 -44
- package/dist/cf/index.d.ts +6 -6
- package/dist/cf/index.js +6 -22
- package/dist/cf/project/index.d.ts +3 -3
- package/dist/cf/project/index.js +3 -19
- package/dist/cf/project/mta.d.ts +1 -1
- package/dist/cf/project/mta.js +23 -66
- package/dist/cf/project/yaml-loader.d.ts +1 -1
- package/dist/cf/project/yaml-loader.js +8 -16
- package/dist/cf/project/yaml.d.ts +2 -2
- package/dist/cf/project/yaml.js +28 -72
- package/dist/cf/services/api.d.ts +1 -1
- package/dist/cf/services/api.js +46 -93
- package/dist/cf/services/cli.d.ts +1 -1
- package/dist/cf/services/cli.js +31 -42
- package/dist/cf/services/destinations.js +12 -48
- package/dist/cf/services/index.d.ts +5 -5
- package/dist/cf/services/index.js +5 -21
- package/dist/cf/services/manifest.d.ts +1 -1
- package/dist/cf/services/manifest.js +9 -13
- package/dist/cf/services/ssh.js +14 -22
- package/dist/cf/utils/index.d.ts +1 -1
- package/dist/cf/utils/index.js +1 -17
- package/dist/cf/utils/validation.d.ts +1 -1
- package/dist/cf/utils/validation.js +12 -18
- package/dist/common/flp-parameters.d.ts +1 -1
- package/dist/common/flp-parameters.js +1 -4
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +1 -17
- package/dist/i18n.js +8 -16
- package/dist/index.d.ts +23 -23
- package/dist/index.js +23 -46
- package/dist/preview/adp-preview.d.ts +1 -1
- package/dist/preview/adp-preview.js +41 -39
- package/dist/preview/change-handler.d.ts +1 -1
- package/dist/preview/change-handler.js +51 -59
- package/dist/preview/descriptor-change-handler.d.ts +1 -1
- package/dist/preview/descriptor-change-handler.js +18 -21
- package/dist/preview/ovp-routes-handler.js +11 -13
- package/dist/preview/routes-handler.js +36 -71
- package/dist/preview/utils.d.ts +1 -1
- package/dist/preview/utils.js +5 -8
- package/dist/prompts/add-annotations-to-odata/index.d.ts +1 -1
- package/dist/prompts/add-annotations-to-odata/index.js +24 -26
- package/dist/prompts/add-component-usages/index.d.ts +1 -1
- package/dist/prompts/add-component-usages/index.js +41 -43
- package/dist/prompts/add-new-model/index.d.ts +1 -1
- package/dist/prompts/add-new-model/index.js +75 -80
- package/dist/prompts/change-data-source/index.d.ts +1 -1
- package/dist/prompts/change-data-source/index.js +19 -22
- package/dist/prompts/change-inbound/index.d.ts +1 -1
- package/dist/prompts/change-inbound/index.js +11 -14
- package/dist/prompts/index.d.ts +5 -5
- package/dist/prompts/index.js +5 -15
- package/dist/source/applications.d.ts +2 -2
- package/dist/source/applications.js +7 -11
- package/dist/source/index.d.ts +3 -3
- package/dist/source/index.js +3 -19
- package/dist/source/manifest.d.ts +1 -1
- package/dist/source/manifest.js +15 -25
- package/dist/source/systems.d.ts +1 -1
- package/dist/source/systems.js +20 -27
- package/dist/types.d.ts +1 -1
- package/dist/types.js +64 -17
- package/dist/ui5/fetch.d.ts +1 -1
- package/dist/ui5/fetch.js +8 -12
- package/dist/ui5/format.d.ts +1 -1
- package/dist/ui5/format.js +17 -29
- package/dist/ui5/index.d.ts +4 -4
- package/dist/ui5/index.js +4 -20
- package/dist/ui5/network.d.ts +1 -1
- package/dist/ui5/network.js +1 -4
- package/dist/ui5/validator.js +14 -20
- package/dist/ui5/version-info.d.ts +1 -1
- package/dist/ui5/version-info.js +25 -36
- package/dist/writer/cf.d.ts +1 -1
- package/dist/writer/cf.js +35 -43
- package/dist/writer/changes/writer-factory.d.ts +2 -2
- package/dist/writer/changes/writer-factory.js +10 -13
- package/dist/writer/changes/writers/annotations-writer.d.ts +1 -1
- package/dist/writer/changes/writers/annotations-writer.js +11 -46
- package/dist/writer/changes/writers/component-usages-writer.d.ts +1 -1
- package/dist/writer/changes/writers/component-usages-writer.js +9 -12
- package/dist/writer/changes/writers/data-source-writer.d.ts +1 -1
- package/dist/writer/changes/writers/data-source-writer.js +7 -10
- package/dist/writer/changes/writers/inbound-writer.d.ts +1 -1
- package/dist/writer/changes/writers/inbound-writer.js +10 -13
- package/dist/writer/changes/writers/index.d.ts +5 -5
- package/dist/writer/changes/writers/index.js +5 -21
- package/dist/writer/changes/writers/new-model-writer.d.ts +1 -1
- package/dist/writer/changes/writers/new-model-writer.js +16 -20
- package/dist/writer/editors.d.ts +1 -1
- package/dist/writer/editors.js +6 -9
- package/dist/writer/i18n/index.d.ts +1 -1
- package/dist/writer/i18n/index.js +13 -17
- package/dist/writer/i18n/key-user-translations.js +9 -14
- package/dist/writer/inbound-navigation.d.ts +1 -1
- package/dist/writer/inbound-navigation.js +18 -27
- package/dist/writer/index.d.ts +1 -1
- package/dist/writer/index.js +36 -37
- package/dist/writer/manifest/descriptor-content.d.ts +2 -2
- package/dist/writer/manifest/descriptor-content.js +9 -15
- package/dist/writer/manifest/index.d.ts +1 -1
- package/dist/writer/manifest/index.js +1 -17
- package/dist/writer/options.d.ts +1 -1
- package/dist/writer/options.js +16 -27
- package/dist/writer/project-utils.d.ts +1 -1
- package/dist/writer/project-utils.js +49 -57
- package/dist/writer/writer-config.d.ts +2 -2
- package/dist/writer/writer-config.js +25 -30
- package/package.json +19 -17
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const ui5_1 = require("../ui5");
|
|
9
|
-
const abap_1 = require("../abap");
|
|
10
|
-
const types_1 = require("../types");
|
|
11
|
-
const i18n_1 = require("../i18n");
|
|
12
|
-
const source_1 = require("../source");
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { AdaptationProjectType } from '@sap-ux/axios-extension';
|
|
3
|
+
import { getFormattedVersion, getLatestVersion, getMinUI5VersionForManifest, getOfficialBaseUI5VersionUrl, getVersionToBeUsed, shouldSetMinUI5Version } from '../ui5/index.js';
|
|
4
|
+
import { getProviderConfig } from '../abap/index.js';
|
|
5
|
+
import { AppRouterType, FlexLayer } from '../types.js';
|
|
6
|
+
import { t } from '../i18n.js';
|
|
7
|
+
import { getSupportedProject } from '../source/index.js';
|
|
13
8
|
/**
|
|
14
9
|
* Generates the configuration object for the Adaptation Project.
|
|
15
10
|
*
|
|
@@ -23,16 +18,16 @@ const source_1 = require("../source");
|
|
|
23
18
|
* @param {ToolsLogger} options.logger - The logger for debugging and error logging.
|
|
24
19
|
* @returns {Promise<AdpWriterConfig>} A promise that resolves to the generated ADP writer configuration.
|
|
25
20
|
*/
|
|
26
|
-
async function getConfig(options) {
|
|
21
|
+
export async function getConfig(options) {
|
|
27
22
|
const { configAnswers, attributeAnswers, layer, logger, packageJson, provider, publicVersions, systemVersion, manifest, projectType, toolsId, keyUserChanges } = options;
|
|
28
23
|
const ato = await provider.getAtoInfo();
|
|
29
24
|
const operationsType = ato.operationsType ?? 'P';
|
|
30
|
-
const target = await
|
|
25
|
+
const target = await getProviderConfig(configAnswers.system, logger);
|
|
31
26
|
const isCloudSystem = await provider.isAbapCloud();
|
|
32
|
-
const isCustomerBase = layer ===
|
|
27
|
+
const isCustomerBase = layer === FlexLayer.CUSTOMER_BASE;
|
|
33
28
|
const ui5Version = isCloudSystem
|
|
34
|
-
?
|
|
35
|
-
:
|
|
29
|
+
? getLatestVersion(publicVersions)
|
|
30
|
+
: getVersionToBeUsed(attributeAnswers.ui5Version, isCustomerBase, publicVersions);
|
|
36
31
|
const { namespace, title, enableTypeScript } = attributeAnswers;
|
|
37
32
|
const { application: { id, bspName }, fioriId, ach } = configAnswers;
|
|
38
33
|
const app = {
|
|
@@ -44,8 +39,8 @@ async function getConfig(options) {
|
|
|
44
39
|
ach,
|
|
45
40
|
fioriId
|
|
46
41
|
};
|
|
47
|
-
const supportedProject = await
|
|
48
|
-
if (projectType ===
|
|
42
|
+
const supportedProject = await getSupportedProject(provider);
|
|
43
|
+
if (projectType === AdaptationProjectType.CLOUD_READY) {
|
|
49
44
|
const lrep = provider.getLayeredRepository();
|
|
50
45
|
const { activeLanguages: languages } = await lrep.getSystemInfo();
|
|
51
46
|
Object.assign(app, {
|
|
@@ -85,12 +80,12 @@ async function getConfig(options) {
|
|
|
85
80
|
* @param {string | undefined} systemVersion - The SAPUI5 version detected on the target system.
|
|
86
81
|
* @returns {AdpWriterConfig['ui5']} An object containing the required UI5 configuration for the writer config.
|
|
87
82
|
*/
|
|
88
|
-
function getUi5Config(ui5Version, publicVersions, systemVersion) {
|
|
83
|
+
export function getUi5Config(ui5Version, publicVersions, systemVersion) {
|
|
89
84
|
return {
|
|
90
|
-
minVersion:
|
|
91
|
-
version:
|
|
92
|
-
frameworkUrl:
|
|
93
|
-
shouldSetMinVersion:
|
|
85
|
+
minVersion: getMinUI5VersionForManifest(publicVersions, systemVersion),
|
|
86
|
+
version: getFormattedVersion(ui5Version),
|
|
87
|
+
frameworkUrl: getOfficialBaseUI5VersionUrl(ui5Version),
|
|
88
|
+
shouldSetMinVersion: shouldSetMinUI5Version(systemVersion)
|
|
94
89
|
};
|
|
95
90
|
}
|
|
96
91
|
/**
|
|
@@ -99,12 +94,12 @@ function getUi5Config(ui5Version, publicVersions, systemVersion) {
|
|
|
99
94
|
* @param {CreateCfConfigParams} params - The configuration parameters containing batch objects.
|
|
100
95
|
* @returns {CfAdpWriterConfig} The CF configuration.
|
|
101
96
|
*/
|
|
102
|
-
function getCfConfig(params) {
|
|
97
|
+
export function getCfConfig(params) {
|
|
103
98
|
const baseApp = params.cfServicesAnswers.baseApp;
|
|
104
99
|
if (!baseApp) {
|
|
105
|
-
throw new Error(
|
|
100
|
+
throw new Error(t('errors.baseAppRequired'));
|
|
106
101
|
}
|
|
107
|
-
const ui5Version =
|
|
102
|
+
const ui5Version = getLatestVersion(params.publicVersions);
|
|
108
103
|
return {
|
|
109
104
|
app: {
|
|
110
105
|
id: baseApp.appId,
|
|
@@ -119,7 +114,7 @@ function getCfConfig(params) {
|
|
|
119
114
|
org: params.cfConfig.org,
|
|
120
115
|
space: params.cfConfig.space,
|
|
121
116
|
html5RepoRuntimeGuid: params.html5RepoRuntimeGuid,
|
|
122
|
-
approuter: params.cfServicesAnswers.approuter ??
|
|
117
|
+
approuter: params.cfServicesAnswers.approuter ?? AppRouterType.MANAGED,
|
|
123
118
|
businessService: params.cfServicesAnswers.businessService ?? '',
|
|
124
119
|
businessSolutionName: params.cfServicesAnswers.businessSolutionName,
|
|
125
120
|
serviceInstanceGuid: params.serviceInstanceGuid,
|
|
@@ -131,7 +126,7 @@ function getCfConfig(params) {
|
|
|
131
126
|
project: {
|
|
132
127
|
name: params.attributeAnswers.projectName,
|
|
133
128
|
path: params.projectPath,
|
|
134
|
-
folder:
|
|
129
|
+
folder: join(params.projectPath, params.attributeAnswers.projectName)
|
|
135
130
|
},
|
|
136
131
|
customConfig: {
|
|
137
132
|
adp: {
|
|
@@ -146,7 +141,7 @@ function getCfConfig(params) {
|
|
|
146
141
|
version: ui5Version
|
|
147
142
|
},
|
|
148
143
|
options: {
|
|
149
|
-
addStandaloneApprouter: params.cfServicesAnswers.approuter ===
|
|
144
|
+
addStandaloneApprouter: params.cfServicesAnswers.approuter === AppRouterType.STANDALONE
|
|
150
145
|
}
|
|
151
146
|
};
|
|
152
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/adp-tooling",
|
|
3
3
|
"description": "Tooling for UI5 adaptation projects",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"repository": {
|
|
5
6
|
"type": "git",
|
|
6
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
"bugs": {
|
|
10
11
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
12
|
},
|
|
12
|
-
"version": "0.
|
|
13
|
+
"version": "1.0.0",
|
|
13
14
|
"license": "Apache-2.0",
|
|
14
15
|
"author": "@SAP/ux-tools-team",
|
|
15
16
|
"main": "dist/index.js",
|
|
@@ -36,21 +37,22 @@
|
|
|
36
37
|
"prompts": "2.4.2",
|
|
37
38
|
"sanitize-filename": "1.6.4",
|
|
38
39
|
"uuid": "11.1.1",
|
|
39
|
-
"@sap-ux/axios-extension": "
|
|
40
|
-
"@sap-ux/btp-utils": "
|
|
41
|
-
"@sap-ux/i18n": "0.
|
|
42
|
-
"@sap-ux/inquirer-common": "0.
|
|
43
|
-
"@sap-ux/logger": "0.
|
|
44
|
-
"@sap-ux/nodejs-utils": "0.
|
|
45
|
-
"@sap-ux/odata-service-writer": "0.
|
|
46
|
-
"@sap-ux/project-access": "
|
|
47
|
-
"@sap-ux/project-input-validator": "0.
|
|
48
|
-
"@sap-ux/store": "
|
|
49
|
-
"@sap-ux/system-access": "0.
|
|
50
|
-
"@sap-ux/ui5-config": "0.
|
|
51
|
-
"@sap-ux/ui5-info": "0.
|
|
40
|
+
"@sap-ux/axios-extension": "2.0.0",
|
|
41
|
+
"@sap-ux/btp-utils": "2.0.0",
|
|
42
|
+
"@sap-ux/i18n": "1.0.0",
|
|
43
|
+
"@sap-ux/inquirer-common": "1.0.0",
|
|
44
|
+
"@sap-ux/logger": "1.0.0",
|
|
45
|
+
"@sap-ux/nodejs-utils": "1.0.0",
|
|
46
|
+
"@sap-ux/odata-service-writer": "1.0.0",
|
|
47
|
+
"@sap-ux/project-access": "2.0.0",
|
|
48
|
+
"@sap-ux/project-input-validator": "1.0.0",
|
|
49
|
+
"@sap-ux/store": "2.0.0",
|
|
50
|
+
"@sap-ux/system-access": "1.0.0",
|
|
51
|
+
"@sap-ux/ui5-config": "1.0.0",
|
|
52
|
+
"@sap-ux/ui5-info": "1.0.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@jest/globals": "30.3.0",
|
|
54
56
|
"@types/adm-zip": "0.5.8",
|
|
55
57
|
"@types/ejs": "3.1.5",
|
|
56
58
|
"@types/express": "4.17.21",
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
"nock": "14.0.11",
|
|
69
71
|
"rimraf": "6.1.3",
|
|
70
72
|
"supertest": "7.2.2",
|
|
71
|
-
"@sap-ux/store": "
|
|
73
|
+
"@sap-ux/store": "2.0.0"
|
|
72
74
|
},
|
|
73
75
|
"engines": {
|
|
74
76
|
"node": ">=22.x"
|
|
@@ -80,8 +82,8 @@
|
|
|
80
82
|
"format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
|
|
81
83
|
"lint": "eslint",
|
|
82
84
|
"lint:fix": "eslint --fix",
|
|
83
|
-
"test": "cross-env FIORI_TOOLS_DISABLE_SECURE_STORE=true jest --ci --forceExit --detectOpenHandles --colors --testPathPatterns=test/unit",
|
|
84
|
-
"test-u": "cross-env FIORI_TOOLS_DISABLE_SECURE_STORE=true jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
85
|
+
"test": "cross-env FIORI_TOOLS_DISABLE_SECURE_STORE=true NODE_OPTIONS='--experimental-vm-modules' jest --ci --forceExit --detectOpenHandles --colors --testPathPatterns=test/unit",
|
|
86
|
+
"test-u": "cross-env NODE_OPTIONS='--experimental-vm-modules' FIORI_TOOLS_DISABLE_SECURE_STORE=true jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
85
87
|
"link": "pnpm link --global",
|
|
86
88
|
"unlink": "pnpm unlink --global"
|
|
87
89
|
}
|