@sap-ux/ui-service-inquirer 0.0.41 → 0.1.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/prompts/configuration/questions.js +16 -13
- package/package.json +12 -12
|
@@ -16,16 +16,7 @@ const prompt_state_1 = require("../prompt-state");
|
|
|
16
16
|
function getConfigQuestions(logger, options) {
|
|
17
17
|
prompt_state_1.PromptState.resetServiceConfig();
|
|
18
18
|
const abapTarget = (0, prompt_helper_1.createAbapTarget)(prompt_state_1.PromptState.systemSelection.connectedSystem?.destination, prompt_state_1.PromptState.systemSelection.connectedSystem?.backendSystem);
|
|
19
|
-
const
|
|
20
|
-
packageAutocomplete: {
|
|
21
|
-
useAutocomplete: true
|
|
22
|
-
},
|
|
23
|
-
backendTarget: {
|
|
24
|
-
abapTarget: abapTarget,
|
|
25
|
-
serviceProvider: prompt_state_1.PromptState.systemSelection.connectedSystem?.serviceProvider
|
|
26
|
-
}
|
|
27
|
-
}, true, true);
|
|
28
|
-
const transportPrompts = (0, abap_deploy_config_inquirer_1.getTransportRequestPrompts)({
|
|
19
|
+
const transportOptions = {
|
|
29
20
|
backendTarget: {
|
|
30
21
|
abapTarget: abapTarget,
|
|
31
22
|
serviceProvider: prompt_state_1.PromptState.systemSelection.connectedSystem?.serviceProvider
|
|
@@ -37,10 +28,20 @@ function getConfigQuestions(logger, options) {
|
|
|
37
28
|
showCreateDuringDeploy: false
|
|
38
29
|
},
|
|
39
30
|
ui5AbapRepo: {
|
|
40
|
-
default: '
|
|
31
|
+
default: ''
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const packagePrompts = (0, abap_deploy_config_inquirer_1.getPackagePrompts)({
|
|
35
|
+
packageAutocomplete: {
|
|
36
|
+
useAutocomplete: true
|
|
37
|
+
},
|
|
38
|
+
backendTarget: {
|
|
39
|
+
abapTarget: abapTarget,
|
|
40
|
+
serviceProvider: prompt_state_1.PromptState.systemSelection.connectedSystem?.serviceProvider
|
|
41
41
|
}
|
|
42
42
|
}, true, true);
|
|
43
|
-
const
|
|
43
|
+
const transportPrompts = (0, abap_deploy_config_inquirer_1.getTransportRequestPrompts)(transportOptions, true, true);
|
|
44
|
+
const configPrompts = [getServiceNameQuestion(logger, transportOptions, options)];
|
|
44
45
|
if ((0, prompt_helper_1.defaultOrShowDraftQuestion)(options?.useDraftEnabled)) {
|
|
45
46
|
configPrompts.push(getDraftEnabledQuestion(logger));
|
|
46
47
|
}
|
|
@@ -54,10 +55,11 @@ exports.getConfigQuestions = getConfigQuestions;
|
|
|
54
55
|
* Returns the service name question.
|
|
55
56
|
*
|
|
56
57
|
* @param logger - logger instance to use for logging
|
|
58
|
+
* @param transportOptions - transport options for prompts
|
|
57
59
|
* @param options - configuration options for prompts
|
|
58
60
|
* @returns question for service name
|
|
59
61
|
*/
|
|
60
|
-
function getServiceNameQuestion(logger, options) {
|
|
62
|
+
function getServiceNameQuestion(logger, transportOptions, options) {
|
|
61
63
|
return {
|
|
62
64
|
when: async (answers) => {
|
|
63
65
|
if (!!answers.packageManual || !!answers.packageAutocomplete) {
|
|
@@ -71,6 +73,7 @@ function getServiceNameQuestion(logger, options) {
|
|
|
71
73
|
content.businessObject?.projectionBehavior?.withDraft) {
|
|
72
74
|
prompt_state_1.PromptState.serviceConfig.showDraftEnabled = true;
|
|
73
75
|
}
|
|
76
|
+
transportOptions.ui5AbapRepo.default = `${(content.general?.namespace ?? 'Z').toLowerCase()}testapp`;
|
|
74
77
|
prompt_state_1.PromptState.serviceConfig.content = JSON.stringify(content);
|
|
75
78
|
prompt_state_1.PromptState.serviceConfig.serviceName =
|
|
76
79
|
content.businessService.serviceBinding.serviceBindingName;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui-service-inquirer",
|
|
3
3
|
"description": "Generator for creating UI Service",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"@sap-devx/yeoman-ui-types": "1.16.9",
|
|
24
24
|
"i18next": "23.5.1",
|
|
25
25
|
"yeoman-generator": "5.10.0",
|
|
26
|
-
"@sap-ux/abap-deploy-config-inquirer": "1.
|
|
27
|
-
"@sap-ux/axios-extension": "1.
|
|
28
|
-
"@sap-ux/btp-utils": "1.0
|
|
29
|
-
"@sap-ux/guided-answers-helper": "0.
|
|
30
|
-
"@sap-ux/inquirer-common": "0.
|
|
31
|
-
"@sap-ux/logger": "0.
|
|
32
|
-
"@sap-ux/odata-service-inquirer": "2.
|
|
33
|
-
"@sap-ux/telemetry": "0.
|
|
26
|
+
"@sap-ux/abap-deploy-config-inquirer": "1.4.0",
|
|
27
|
+
"@sap-ux/axios-extension": "1.21.0",
|
|
28
|
+
"@sap-ux/btp-utils": "1.1.0",
|
|
29
|
+
"@sap-ux/guided-answers-helper": "0.3.0",
|
|
30
|
+
"@sap-ux/inquirer-common": "0.7.0",
|
|
31
|
+
"@sap-ux/logger": "0.7.0",
|
|
32
|
+
"@sap-ux/odata-service-inquirer": "2.4.0",
|
|
33
|
+
"@sap-ux/telemetry": "0.6.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/inquirer-autocomplete-prompt": "2.0.1",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"typescript": "5.3.3",
|
|
46
46
|
"yeoman-test": "6.3.0",
|
|
47
47
|
"@sap-ux/jest-file-matchers": "0.2.1",
|
|
48
|
-
"@sap-ux/store": "1.
|
|
49
|
-
"@sap-ux/system-access": "0.
|
|
48
|
+
"@sap-ux/store": "1.1.0",
|
|
49
|
+
"@sap-ux/system-access": "0.6.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=20.x"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsc --build",
|