@sap-ux/abap-deploy-config-inquirer 0.0.1
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/LICENSE +201 -0
- package/README.md +93 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/error-handler.d.ts +13 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +33 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/i18n.d.ts +14 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +34 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-helper.d.ts +20 -0
- package/dist/logger-helper.d.ts.map +1 -0
- package/dist/logger-helper.js +27 -0
- package/dist/logger-helper.js.map +1 -0
- package/dist/prompts/conditions.d.ts +117 -0
- package/dist/prompts/conditions.d.ts.map +1 -0
- package/dist/prompts/conditions.js +299 -0
- package/dist/prompts/conditions.js.map +1 -0
- package/dist/prompts/defaults.d.ts +45 -0
- package/dist/prompts/defaults.d.ts.map +1 -0
- package/dist/prompts/defaults.js +91 -0
- package/dist/prompts/defaults.js.map +1 -0
- package/dist/prompts/helpers.d.ts +54 -0
- package/dist/prompts/helpers.d.ts.map +1 -0
- package/dist/prompts/helpers.js +234 -0
- package/dist/prompts/helpers.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +30 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/prompt-state.d.ts +38 -0
- package/dist/prompts/prompt-state.d.ts.map +1 -0
- package/dist/prompts/prompt-state.js +59 -0
- package/dist/prompts/prompt-state.js.map +1 -0
- package/dist/prompts/questions/abap-target.d.ts +10 -0
- package/dist/prompts/questions/abap-target.d.ts.map +1 -0
- package/dist/prompts/questions/abap-target.js +219 -0
- package/dist/prompts/questions/abap-target.js.map +1 -0
- package/dist/prompts/questions/auth.d.ts +10 -0
- package/dist/prompts/questions/auth.d.ts.map +1 -0
- package/dist/prompts/questions/auth.js +55 -0
- package/dist/prompts/questions/auth.js.map +1 -0
- package/dist/prompts/questions/config/app.d.ts +10 -0
- package/dist/prompts/questions/config/app.d.ts.map +1 -0
- package/dist/prompts/questions/config/app.js +68 -0
- package/dist/prompts/questions/config/app.js.map +1 -0
- package/dist/prompts/questions/config/index.d.ts +4 -0
- package/dist/prompts/questions/config/index.d.ts.map +1 -0
- package/dist/prompts/questions/config/index.js +20 -0
- package/dist/prompts/questions/config/index.js.map +1 -0
- package/dist/prompts/questions/config/package.d.ts +10 -0
- package/dist/prompts/questions/config/package.d.ts.map +1 -0
- package/dist/prompts/questions/config/package.js +91 -0
- package/dist/prompts/questions/config/package.js.map +1 -0
- package/dist/prompts/questions/config/transport.d.ts +10 -0
- package/dist/prompts/questions/config/transport.d.ts.map +1 -0
- package/dist/prompts/questions/config/transport.js +91 -0
- package/dist/prompts/questions/config/transport.js.map +1 -0
- package/dist/prompts/questions/confirm.d.ts +10 -0
- package/dist/prompts/questions/confirm.d.ts.map +1 -0
- package/dist/prompts/questions/confirm.js +55 -0
- package/dist/prompts/questions/confirm.js.map +1 -0
- package/dist/prompts/questions/index.d.ts +5 -0
- package/dist/prompts/questions/index.d.ts.map +1 -0
- package/dist/prompts/questions/index.js +21 -0
- package/dist/prompts/questions/index.js.map +1 -0
- package/dist/prompts/validators.d.ts +138 -0
- package/dist/prompts/validators.d.ts.map +1 -0
- package/dist/prompts/validators.js +459 -0
- package/dist/prompts/validators.js.map +1 -0
- package/dist/service-provider-utils/abap-service-provider.d.ts +19 -0
- package/dist/service-provider-utils/abap-service-provider.d.ts.map +1 -0
- package/dist/service-provider-utils/abap-service-provider.js +89 -0
- package/dist/service-provider-utils/abap-service-provider.js.map +1 -0
- package/dist/service-provider-utils/create-transport.d.ts +12 -0
- package/dist/service-provider-utils/create-transport.d.ts.map +1 -0
- package/dist/service-provider-utils/create-transport.js +35 -0
- package/dist/service-provider-utils/create-transport.js.map +1 -0
- package/dist/service-provider-utils/index.d.ts +6 -0
- package/dist/service-provider-utils/index.d.ts.map +1 -0
- package/dist/service-provider-utils/index.js +22 -0
- package/dist/service-provider-utils/index.js.map +1 -0
- package/dist/service-provider-utils/list-packages.d.ts +11 -0
- package/dist/service-provider-utils/list-packages.d.ts.map +1 -0
- package/dist/service-provider-utils/list-packages.js +37 -0
- package/dist/service-provider-utils/list-packages.js.map +1 -0
- package/dist/service-provider-utils/transport-config.d.ts +18 -0
- package/dist/service-provider-utils/transport-config.d.ts.map +1 -0
- package/dist/service-provider-utils/transport-config.js +211 -0
- package/dist/service-provider-utils/transport-config.js.map +1 -0
- package/dist/service-provider-utils/transport-list.d.ts +16 -0
- package/dist/service-provider-utils/transport-list.d.ts.map +1 -0
- package/dist/service-provider-utils/transport-list.js +56 -0
- package/dist/service-provider-utils/transport-list.js.map +1 -0
- package/dist/translations/abap-deploy-config-inquirer.i18n.json +146 -0
- package/dist/types.d.ts +165 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +46 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +90 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +233 -0
- package/dist/utils.js.map +1 -0
- package/dist/validator-utils.d.ts +75 -0
- package/dist/validator-utils.d.ts.map +1 -0
- package/dist/validator-utils.js +172 -0
- package/dist/validator-utils.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPackageChoices = exports.updatePromptStateUrl = exports.getTransportChoices = exports.getPackageInputChoices = exports.getClientChoicePromptChoices = exports.getAbapSystemChoices = void 0;
|
|
7
|
+
const i18n_1 = require("../i18n");
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const prompt_state_1 = require("./prompt-state");
|
|
11
|
+
const logger_helper_1 = __importDefault(require("../logger-helper"));
|
|
12
|
+
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
13
|
+
const types_1 = require("../types");
|
|
14
|
+
const store_1 = require("@sap-ux/store");
|
|
15
|
+
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
16
|
+
/**
|
|
17
|
+
* Returns a list of destination choices.
|
|
18
|
+
*
|
|
19
|
+
* @param destinations destinations retrieved from BTP
|
|
20
|
+
* @returns choices for destinations
|
|
21
|
+
*/
|
|
22
|
+
function getDestinationChoices(destinations = {}) {
|
|
23
|
+
const systemChoices = Object.values(destinations)
|
|
24
|
+
.sort((a, b) => a.Name.localeCompare(b.Name, undefined, { numeric: true, caseFirst: 'lower' }))
|
|
25
|
+
.map((destination) => {
|
|
26
|
+
return {
|
|
27
|
+
name: `${(0, btp_utils_1.getDisplayName)(destination)} - ${destination.Host}`,
|
|
28
|
+
value: destination.Name,
|
|
29
|
+
scp: (0, btp_utils_1.isAbapEnvironmentOnBtp)(destination),
|
|
30
|
+
url: destination.Host
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return systemChoices;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the display name for the backend system.
|
|
37
|
+
*
|
|
38
|
+
* @param options options for display name
|
|
39
|
+
* @param options.backendSystem backend system
|
|
40
|
+
* @param options.includeUserName include user name in the display name
|
|
41
|
+
* @returns backend display name
|
|
42
|
+
*/
|
|
43
|
+
function getBackendDisplayName({ backendSystem, includeUserName = true }) {
|
|
44
|
+
const userDisplayName = includeUserName && backendSystem.userDisplayName ? `${backendSystem.userDisplayName}` : '';
|
|
45
|
+
const systemDisplayName = (0, fiori_generator_shared_1.getSystemDisplayName)(backendSystem.name, userDisplayName, !!backendSystem.serviceKeys, backendSystem.authenticationType === store_1.AuthenticationType.ReentranceTicket);
|
|
46
|
+
return systemDisplayName;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns a list of backend system choices.
|
|
50
|
+
*
|
|
51
|
+
* @param backendTarget backend target
|
|
52
|
+
* @param backendSystems backend systems retrieved from store
|
|
53
|
+
* @returns choices for backend systems
|
|
54
|
+
*/
|
|
55
|
+
async function getBackendTargetChoices(backendTarget, backendSystems = []) {
|
|
56
|
+
let target;
|
|
57
|
+
let targetExists = false;
|
|
58
|
+
const choices = [
|
|
59
|
+
{
|
|
60
|
+
name: (0, i18n_1.t)('choices.targetSystemUrl'),
|
|
61
|
+
value: "Url" /* TargetSystemType.Url */
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
if (backendTarget?.abapTarget) {
|
|
65
|
+
target = backendTarget.abapTarget ?? {};
|
|
66
|
+
}
|
|
67
|
+
const systemChoices = Object.values(backendSystems)
|
|
68
|
+
.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, caseFirst: 'lower' }))
|
|
69
|
+
.map((system) => {
|
|
70
|
+
if (!targetExists) {
|
|
71
|
+
targetExists = system.url === target?.url && (system.client ?? '') === (target?.client ?? '');
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
name: targetExists
|
|
75
|
+
? `${getBackendDisplayName({ backendSystem: system })} (Source system)`
|
|
76
|
+
: getBackendDisplayName({ backendSystem: system }) ?? '',
|
|
77
|
+
value: system.url,
|
|
78
|
+
isDefault: targetExists,
|
|
79
|
+
scp: !!system.serviceKeys,
|
|
80
|
+
isS4HC: system.authenticationType === store_1.AuthenticationType.ReentranceTicket,
|
|
81
|
+
client: system.client
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
choices.push(...systemChoices);
|
|
85
|
+
if (!targetExists && target?.url && backendTarget?.systemName) {
|
|
86
|
+
const systemName = backendTarget.systemName;
|
|
87
|
+
const user = await backendTarget.serviceProvider?.user();
|
|
88
|
+
// add the target system to the list if it does not exist in the store yet
|
|
89
|
+
choices.splice(1, 0, {
|
|
90
|
+
name: `${(0, fiori_generator_shared_1.getSystemDisplayName)(systemName, user, target.scp, target.authenticationType === store_1.AuthenticationType.ReentranceTicket)} (Source system)`,
|
|
91
|
+
value: target.url,
|
|
92
|
+
isDefault: true,
|
|
93
|
+
scp: target.scp,
|
|
94
|
+
isS4HC: target.authenticationType === store_1.AuthenticationType.ReentranceTicket,
|
|
95
|
+
client: target.client
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return choices;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns a list of the aba system choices comprising of either destinations or backend systems.
|
|
102
|
+
*
|
|
103
|
+
* @param destinations - destinations retrieved from BTP
|
|
104
|
+
* @param backendTarget - backend target used previously (may not be saved in store)
|
|
105
|
+
* @param backendSystems - backend systems retrieved from store
|
|
106
|
+
* @returns choices for ABAP systems
|
|
107
|
+
*/
|
|
108
|
+
async function getAbapSystemChoices(destinations, backendTarget, backendSystems) {
|
|
109
|
+
let choices = [];
|
|
110
|
+
try {
|
|
111
|
+
if (destinations) {
|
|
112
|
+
choices = getDestinationChoices(destinations);
|
|
113
|
+
}
|
|
114
|
+
else if (backendSystems) {
|
|
115
|
+
choices = await getBackendTargetChoices(backendTarget, backendSystems);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
logger_helper_1.default.logger.error('errors.abapSystemChoices');
|
|
120
|
+
}
|
|
121
|
+
return choices;
|
|
122
|
+
}
|
|
123
|
+
exports.getAbapSystemChoices = getAbapSystemChoices;
|
|
124
|
+
/**
|
|
125
|
+
* Returns a list of the client choice prompt options.
|
|
126
|
+
*
|
|
127
|
+
* @param client - client from backend target
|
|
128
|
+
* @returns list of client choice options
|
|
129
|
+
*/
|
|
130
|
+
function getClientChoicePromptChoices(client) {
|
|
131
|
+
return [
|
|
132
|
+
{
|
|
133
|
+
name: (0, i18n_1.t)('choices.clientChoice.existing', { client }),
|
|
134
|
+
value: "base" /* ClientChoiceValue.Base */
|
|
135
|
+
},
|
|
136
|
+
{ name: (0, i18n_1.t)('choices.clientChoice.new'), value: "new" /* ClientChoiceValue.New */ },
|
|
137
|
+
{ name: (0, i18n_1.t)('choices.clientChoice.blank'), value: "blank" /* ClientChoiceValue.Blank */ }
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
exports.getClientChoicePromptChoices = getClientChoicePromptChoices;
|
|
141
|
+
/**
|
|
142
|
+
* Returns a list of package input choices.
|
|
143
|
+
*
|
|
144
|
+
* @returns list of package input choices
|
|
145
|
+
*/
|
|
146
|
+
function getPackageInputChoices() {
|
|
147
|
+
const manualChoice = {
|
|
148
|
+
name: (0, i18n_1.t)('choices.transport.enterManually'),
|
|
149
|
+
value: types_1.PackageInputChoices.EnterManualChoice
|
|
150
|
+
};
|
|
151
|
+
const listExistingChoice = {
|
|
152
|
+
name: (0, i18n_1.t)('choices.common.listExisting'),
|
|
153
|
+
value: types_1.PackageInputChoices.ListExistingChoice
|
|
154
|
+
};
|
|
155
|
+
return [manualChoice, listExistingChoice];
|
|
156
|
+
}
|
|
157
|
+
exports.getPackageInputChoices = getPackageInputChoices;
|
|
158
|
+
/**
|
|
159
|
+
* Returns a list of transport choices.
|
|
160
|
+
*
|
|
161
|
+
* @returns list of transport choices
|
|
162
|
+
*/
|
|
163
|
+
function getTransportChoices() {
|
|
164
|
+
const manualChoice = {
|
|
165
|
+
name: (0, i18n_1.t)('choices.transport.enterManually'),
|
|
166
|
+
value: types_1.TransportChoices.EnterManualChoice
|
|
167
|
+
};
|
|
168
|
+
const listExistingChoice = {
|
|
169
|
+
name: (0, i18n_1.t)('choices.common.listExisting'),
|
|
170
|
+
value: types_1.TransportChoices.ListExistingChoice
|
|
171
|
+
};
|
|
172
|
+
const createDuringDeployChoice = {
|
|
173
|
+
name: (0, i18n_1.t)('choices.transport.createDuringDeploy'),
|
|
174
|
+
value: types_1.TransportChoices.CreateDuringDeployChoice
|
|
175
|
+
};
|
|
176
|
+
const createNewChoice = { name: (0, i18n_1.t)('choices.transport.createNew'), value: types_1.TransportChoices.CreateNewChoice };
|
|
177
|
+
return [manualChoice, listExistingChoice, createDuringDeployChoice, createNewChoice];
|
|
178
|
+
}
|
|
179
|
+
exports.getTransportChoices = getTransportChoices;
|
|
180
|
+
/**
|
|
181
|
+
* Ensures the URL in the state is update accordingly.
|
|
182
|
+
*
|
|
183
|
+
* @param previousAnswers - previous answers
|
|
184
|
+
* @param destinations - destinations retrieved from BTP
|
|
185
|
+
* @param backendTarget - backend target from abap deploy config prompt options
|
|
186
|
+
*/
|
|
187
|
+
function updatePromptStateUrl(previousAnswers, destinations, backendTarget) {
|
|
188
|
+
let destinationUrl;
|
|
189
|
+
if (previousAnswers.destination && destinations) {
|
|
190
|
+
destinationUrl = destinations[previousAnswers.destination]?.Host;
|
|
191
|
+
}
|
|
192
|
+
const targetSystemChoice = previousAnswers?.targetSystem && previousAnswers.targetSystem !== "Url" /* TargetSystemType.Url */
|
|
193
|
+
? previousAnswers.targetSystem
|
|
194
|
+
: undefined;
|
|
195
|
+
prompt_state_1.PromptState.abapDeployConfig.url = destinationUrl ?? targetSystemChoice ?? backendTarget?.abapTarget.url ?? '';
|
|
196
|
+
}
|
|
197
|
+
exports.updatePromptStateUrl = updatePromptStateUrl;
|
|
198
|
+
/**
|
|
199
|
+
* Queries the packages based on the input provided.
|
|
200
|
+
*
|
|
201
|
+
* @param isCli - is running in CLI
|
|
202
|
+
* @param input - package input
|
|
203
|
+
* @param previousAnswers - previous answers
|
|
204
|
+
* @param backendTarget - backend target from abap deploy config prompt options
|
|
205
|
+
* @returns results of query and message based on number of results
|
|
206
|
+
*/
|
|
207
|
+
async function getPackageChoices(isCli, input, previousAnswers, backendTarget) {
|
|
208
|
+
let packages;
|
|
209
|
+
let morePackageResultsMsg = '';
|
|
210
|
+
// For YUI we need to ensure input is provided so the prompt is not re-rendered with no input
|
|
211
|
+
if (isCli || input) {
|
|
212
|
+
packages = await (0, utils_1.queryPackages)(input, {
|
|
213
|
+
url: prompt_state_1.PromptState.abapDeployConfig.url,
|
|
214
|
+
client: prompt_state_1.PromptState.abapDeployConfig.client,
|
|
215
|
+
destination: prompt_state_1.PromptState.abapDeployConfig.destination
|
|
216
|
+
}, backendTarget);
|
|
217
|
+
morePackageResultsMsg =
|
|
218
|
+
packages && packages.length === constants_1.ABAP_PACKAGE_SEARCH_MAX_RESULTS
|
|
219
|
+
? (0, i18n_1.t)('prompts.config.package.packageAutocomplete.sourceMessage', { numResults: packages.length })
|
|
220
|
+
: morePackageResultsMsg;
|
|
221
|
+
if (previousAnswers.packageAutocomplete) {
|
|
222
|
+
const index = packages.indexOf(previousAnswers.packageAutocomplete);
|
|
223
|
+
if (index !== -1) {
|
|
224
|
+
packages.splice(0, 0, packages.splice(index, 1)[0]); // move previous answer to top of choices list
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
packages: packages ?? [],
|
|
230
|
+
morePackageResultsMsg
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
exports.getPackageChoices = getPackageChoices;
|
|
234
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/prompts/helpers.ts"],"names":[],"mappings":";;;;;;AACA,kCAA4B;AAC5B,4CAA+D;AAC/D,oCAAyC;AACzC,iDAA6C;AAC7C,qEAA4C;AAC5C,iDAA8F;AAC9F,oCAQkB;AAClB,yCAAuE;AAEvE,2EAAsE;AAGtE;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,eAA6B,EAAE;IAC1D,MAAM,aAAa,GAAuB,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;SAChE,IAAI,CAAC,CAAC,CAAC,EAAE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,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;YACpE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;gBACf,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,8CAA8C;YACvG,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO;QACH,QAAQ,EAAE,QAAQ,IAAI,EAAE;QACxB,qBAAqB;KACxB,CAAC;AACN,CAAC;AApCD,8CAoCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AbapDeployConfigQuestion, AbapDeployConfigPromptOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Get the abap deployment config questions.
|
|
4
|
+
*
|
|
5
|
+
* @param options - abap deploy config prompt options
|
|
6
|
+
* @returns the abap deployment config questions
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAbapDeployConfigQuestions(options?: AbapDeployConfigPromptOptions): Promise<AbapDeployConfigQuestion[]>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAExF;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAC9C,OAAO,CAAC,EAAE,6BAA6B,GACxC,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAoBrC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAbapDeployConfigQuestions = void 0;
|
|
4
|
+
const questions_1 = require("./questions");
|
|
5
|
+
/**
|
|
6
|
+
* Get the abap deployment config questions.
|
|
7
|
+
*
|
|
8
|
+
* @param options - abap deploy config prompt options
|
|
9
|
+
* @returns the abap deployment config questions
|
|
10
|
+
*/
|
|
11
|
+
async function getAbapDeployConfigQuestions(options) {
|
|
12
|
+
options = options ?? {};
|
|
13
|
+
const targetPrompts = await (0, questions_1.getAbapTargetPrompts)(options);
|
|
14
|
+
const authPrompts = (0, questions_1.getAuthPrompts)(options);
|
|
15
|
+
const appConfigPrompts = (0, questions_1.getAppConfigPrompts)(options);
|
|
16
|
+
const packagePrompts = (0, questions_1.getPackagePrompts)(options);
|
|
17
|
+
const transportRequestPrompts = (0, questions_1.getTransportRequestPrompts)(options);
|
|
18
|
+
const confirmPrompts = (0, questions_1.getConfirmPrompts)(options);
|
|
19
|
+
const questions = [
|
|
20
|
+
...targetPrompts,
|
|
21
|
+
...authPrompts,
|
|
22
|
+
...appConfigPrompts,
|
|
23
|
+
...packagePrompts,
|
|
24
|
+
...transportRequestPrompts,
|
|
25
|
+
...confirmPrompts
|
|
26
|
+
];
|
|
27
|
+
return questions;
|
|
28
|
+
}
|
|
29
|
+
exports.getAbapDeployConfigQuestions = getAbapDeployConfigQuestions;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":";;;AAAA,2CAOqB;AAGrB;;;;;GAKG;AACI,KAAK,UAAU,4BAA4B,CAC9C,OAAuC;IAEvC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IAExB,MAAM,aAAa,GAAG,MAAM,IAAA,gCAAoB,EAAC,OAAO,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,gBAAgB,GAAG,IAAA,+BAAmB,EAAC,OAAO,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,uBAAuB,GAAG,IAAA,sCAA0B,EAAC,OAAO,CAAC,CAAC;IACpE,MAAM,cAAc,GAAG,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;IAElD,MAAM,SAAS,GAAG;QACd,GAAG,aAAa;QAChB,GAAG,WAAW;QACd,GAAG,gBAAgB;QACnB,GAAG,cAAc;QACjB,GAAG,uBAAuB;QAC1B,GAAG,cAAc;KACpB,CAAC;IAEF,OAAO,SAAuC,CAAC;AACnD,CAAC;AAtBD,oEAsBC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AbapDeployConfigAnswersInternal, TransportAnswers } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Much of the values returned by the config inquirer prompting are derived from prompt answers and are not direct answer values.
|
|
4
|
+
* Since inquirer does not provide a way to return values that are not direct answers from prompts, this class will maintain the derived values
|
|
5
|
+
* across prompts statically for the lifespan of the prompting session.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PromptState {
|
|
8
|
+
private static _abapDeployConfig;
|
|
9
|
+
private static _transportAnswers;
|
|
10
|
+
static isYUI: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the current state of the abap deploy config answers.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Partial<AbapDeployConfigAnswersInternal>} abap deploy config answers
|
|
15
|
+
*/
|
|
16
|
+
static get abapDeployConfig(): Partial<AbapDeployConfigAnswersInternal>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the current state of the transport answers.
|
|
19
|
+
*
|
|
20
|
+
* @returns {TransportAnswers} transport answers
|
|
21
|
+
*/
|
|
22
|
+
static get transportAnswers(): TransportAnswers;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the current state of the abap deploy config answers.
|
|
25
|
+
*
|
|
26
|
+
* @param {Partial<AbapDeployConfigAnswersInternal>} value - abap deploy config
|
|
27
|
+
*/
|
|
28
|
+
static set abapDeployConfig(value: Partial<AbapDeployConfigAnswersInternal>);
|
|
29
|
+
/**
|
|
30
|
+
* Sets the current state of the transport answers.
|
|
31
|
+
*
|
|
32
|
+
* @param {TransportAnswers} value - transport answers
|
|
33
|
+
*/
|
|
34
|
+
static set transportAnswers(value: TransportAnswers);
|
|
35
|
+
static resetAbapDeployConfig(): void;
|
|
36
|
+
static resetTransportAnswers(): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=prompt-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-state.d.ts","sourceRoot":"","sources":["../../src/prompts/prompt-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF;;;;GAIG;AACH,qBAAa,WAAW;IACpB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgD;IAChF,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAE9B;IAEF,OAAc,KAAK,UAAS;IAE5B;;;;OAIG;IACH,WAAkB,gBAAgB,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAE7E;IAED;;;;OAIG;IACH,WAAkB,gBAAgB,IAAI,gBAAgB,CAErD;IAED;;;;OAIG;IACH,WAAkB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,+BAA+B,CAAC,EAEjF;IAED;;;;OAIG;IACH,WAAkB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,EAEzD;IAED,MAAM,CAAC,qBAAqB,IAAI,IAAI;IAMpC,MAAM,CAAC,qBAAqB,IAAI,IAAI;CAKvC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromptState = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Much of the values returned by the config inquirer prompting are derived from prompt answers and are not direct answer values.
|
|
6
|
+
* Since inquirer does not provide a way to return values that are not direct answers from prompts, this class will maintain the derived values
|
|
7
|
+
* across prompts statically for the lifespan of the prompting session.
|
|
8
|
+
*/
|
|
9
|
+
class PromptState {
|
|
10
|
+
static _abapDeployConfig = {};
|
|
11
|
+
static _transportAnswers = {
|
|
12
|
+
transportRequired: true // assumed to be required unless the package is local
|
|
13
|
+
};
|
|
14
|
+
static isYUI = false;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the current state of the abap deploy config answers.
|
|
17
|
+
*
|
|
18
|
+
* @returns {Partial<AbapDeployConfigAnswersInternal>} abap deploy config answers
|
|
19
|
+
*/
|
|
20
|
+
static get abapDeployConfig() {
|
|
21
|
+
return this._abapDeployConfig;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the current state of the transport answers.
|
|
25
|
+
*
|
|
26
|
+
* @returns {TransportAnswers} transport answers
|
|
27
|
+
*/
|
|
28
|
+
static get transportAnswers() {
|
|
29
|
+
return this._transportAnswers;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Sets the current state of the abap deploy config answers.
|
|
33
|
+
*
|
|
34
|
+
* @param {Partial<AbapDeployConfigAnswersInternal>} value - abap deploy config
|
|
35
|
+
*/
|
|
36
|
+
static set abapDeployConfig(value) {
|
|
37
|
+
this._abapDeployConfig = value;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Sets the current state of the transport answers.
|
|
41
|
+
*
|
|
42
|
+
* @param {TransportAnswers} value - transport answers
|
|
43
|
+
*/
|
|
44
|
+
static set transportAnswers(value) {
|
|
45
|
+
this._transportAnswers = value;
|
|
46
|
+
}
|
|
47
|
+
static resetAbapDeployConfig() {
|
|
48
|
+
Object.keys(PromptState._abapDeployConfig).forEach((key) => {
|
|
49
|
+
PromptState._abapDeployConfig[key] = undefined;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
static resetTransportAnswers() {
|
|
53
|
+
Object.keys(PromptState._transportAnswers).forEach((key) => {
|
|
54
|
+
PromptState._transportAnswers[key] = undefined;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.PromptState = PromptState;
|
|
59
|
+
//# sourceMappingURL=prompt-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-state.js","sourceRoot":"","sources":["../../src/prompts/prompt-state.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,MAAa,WAAW;IACZ,MAAM,CAAC,iBAAiB,GAA6C,EAAE,CAAC;IACxE,MAAM,CAAC,iBAAiB,GAAqB;QACjD,iBAAiB,EAAE,IAAI,CAAC,qDAAqD;KAChF,CAAC;IAEK,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAE5B;;;;OAIG;IACI,MAAM,KAAK,gBAAgB;QAC9B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,MAAM,KAAK,gBAAgB;QAC9B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,MAAM,KAAK,gBAAgB,CAAC,KAA+C;QAC9E,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACI,MAAM,KAAK,gBAAgB,CAAC,KAAuB;QACtD,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,qBAAqB;QACxB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACvD,WAAW,CAAC,iBAAiB,CAAC,GAA4C,CAAC,GAAG,SAAS,CAAC;QAC5F,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,qBAAqB;QACxB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACvD,WAAW,CAAC,iBAAiB,CAAC,GAA6B,CAAC,GAAG,SAAS,CAAC;QAC7E,CAAC,CAAC,CAAC;IACP,CAAC;;AAtDL,kCAuDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AbapDeployConfigAnswersInternal, type AbapDeployConfigPromptOptions } from '../../types';
|
|
2
|
+
import type { Question } from 'inquirer';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the abap target prompts.
|
|
5
|
+
*
|
|
6
|
+
* @param options - abap deploy config prompt options
|
|
7
|
+
* @returns list of questions for abap target prompting
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAbapTargetPrompts(options: AbapDeployConfigPromptOptions): Promise<Question<AbapDeployConfigAnswersInternal>[]>;
|
|
10
|
+
//# sourceMappingURL=abap-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abap-target.d.ts","sourceRoot":"","sources":["../../../src/prompts/questions/abap-target.ts"],"names":[],"mappings":"AAkBA,OAAO,EAGH,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAGrC,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAuNzC;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAWtD"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAbapTargetPrompts = void 0;
|
|
4
|
+
const conditions_1 = require("../conditions");
|
|
5
|
+
const validators_1 = require("../validators");
|
|
6
|
+
const i18n_1 = require("../../i18n");
|
|
7
|
+
const helpers_1 = require("../helpers");
|
|
8
|
+
const defaults_1 = require("../defaults");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const prompt_state_1 = require("../prompt-state");
|
|
11
|
+
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
12
|
+
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
13
|
+
const types_1 = require("../../types");
|
|
14
|
+
/**
|
|
15
|
+
* Returns the destination prompt.
|
|
16
|
+
*
|
|
17
|
+
* @param choices - abap system choices
|
|
18
|
+
* @param destinations - list of destinations
|
|
19
|
+
* @param backendTarget - backend target
|
|
20
|
+
* @returns list question for destination
|
|
21
|
+
*/
|
|
22
|
+
function getDestinationPrompt(choices, destinations, backendTarget) {
|
|
23
|
+
const prompts = [
|
|
24
|
+
{
|
|
25
|
+
when: () => (0, btp_utils_1.isAppStudio)(),
|
|
26
|
+
type: 'list',
|
|
27
|
+
name: types_1.abapDeployConfigInternalPromptNames.destination,
|
|
28
|
+
message: (0, i18n_1.t)('prompts.target.destination.message'),
|
|
29
|
+
guiOptions: {
|
|
30
|
+
breadcrumb: true
|
|
31
|
+
},
|
|
32
|
+
default: () => backendTarget?.abapTarget?.destination,
|
|
33
|
+
filter: (input) => input?.trim(),
|
|
34
|
+
choices: () => choices,
|
|
35
|
+
validate: (destination) => (0, validators_1.validateDestinationQuestion)(destination, destinations),
|
|
36
|
+
additionalMessages: (destination) => {
|
|
37
|
+
let additionalMessage;
|
|
38
|
+
if (destinations && destination && (0, btp_utils_1.isOnPremiseDestination)(destinations[destination])) {
|
|
39
|
+
additionalMessage = {
|
|
40
|
+
message: (0, i18n_1.t)('warnings.virtualHost'),
|
|
41
|
+
severity: yeoman_ui_types_1.Severity.warning
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return additionalMessage;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
if ((0, btp_utils_1.isAppStudio)() && !prompt_state_1.PromptState.isYUI) {
|
|
49
|
+
prompts.push({
|
|
50
|
+
when: (answers) => {
|
|
51
|
+
const destination = answers[types_1.abapDeployConfigInternalPromptNames.destination];
|
|
52
|
+
if (destination) {
|
|
53
|
+
(0, validators_1.updateDestinationPromptState)(destination, destinations);
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
},
|
|
57
|
+
name: types_1.abapDeployConfigInternalPromptNames.destinationCliSetter
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return prompts;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns the target system prompt.
|
|
64
|
+
*
|
|
65
|
+
* @param choices - abap system choices
|
|
66
|
+
* @returns list question for target system
|
|
67
|
+
*/
|
|
68
|
+
function getTargetSystemPrompt(choices) {
|
|
69
|
+
const prompts = [
|
|
70
|
+
{
|
|
71
|
+
when: () => !(0, btp_utils_1.isAppStudio)(),
|
|
72
|
+
type: 'list',
|
|
73
|
+
name: types_1.abapDeployConfigInternalPromptNames.targetSystem,
|
|
74
|
+
message: (0, i18n_1.t)('prompts.target.targetSystem.message'),
|
|
75
|
+
guiOptions: {
|
|
76
|
+
breadcrumb: (0, i18n_1.t)('prompts.target.targetSystem.breadcrumb')
|
|
77
|
+
},
|
|
78
|
+
choices: () => choices,
|
|
79
|
+
default: () => (0, defaults_1.defaultTargetSystem)(choices),
|
|
80
|
+
validate: (target) => (0, validators_1.validateTargetSystem)(target, choices)
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
if (!(0, btp_utils_1.isAppStudio)() && !prompt_state_1.PromptState.isYUI) {
|
|
84
|
+
prompts.push({
|
|
85
|
+
when: (answers) => {
|
|
86
|
+
const target = answers[types_1.abapDeployConfigInternalPromptNames.targetSystem];
|
|
87
|
+
if (target) {
|
|
88
|
+
(0, validators_1.validateTargetSystemUrlCli)(target, choices);
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
},
|
|
92
|
+
name: types_1.abapDeployConfigInternalPromptNames.targetSystemCliSetter
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return prompts;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns the url prompt.
|
|
99
|
+
*
|
|
100
|
+
* @param destinations - list of destinations
|
|
101
|
+
* @param backendTarget - backend target
|
|
102
|
+
* @returns input question for url
|
|
103
|
+
*/
|
|
104
|
+
function getUrlPrompt(destinations, backendTarget) {
|
|
105
|
+
return {
|
|
106
|
+
when: (previousAnswers) => {
|
|
107
|
+
const isValid = (0, conditions_1.showUrlQuestion)(previousAnswers.targetSystem);
|
|
108
|
+
(0, helpers_1.updatePromptStateUrl)(previousAnswers, destinations, backendTarget);
|
|
109
|
+
return isValid;
|
|
110
|
+
},
|
|
111
|
+
type: 'input',
|
|
112
|
+
name: types_1.abapDeployConfigInternalPromptNames.url,
|
|
113
|
+
message: (0, i18n_1.t)('prompts.target.url.message'),
|
|
114
|
+
guiOptions: {
|
|
115
|
+
mandatory: true,
|
|
116
|
+
breadcrumb: true
|
|
117
|
+
},
|
|
118
|
+
default: ({ targetSystem }) => (0, defaults_1.defaultUrl)(targetSystem),
|
|
119
|
+
filter: (input) => input?.trim(),
|
|
120
|
+
validate: (url) => (0, validators_1.validateUrl)(url)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns the scp prompt.
|
|
125
|
+
*
|
|
126
|
+
* @param backendTarget - backend target
|
|
127
|
+
* @returns confirm question for scp
|
|
128
|
+
*/
|
|
129
|
+
function getScpPrompt(backendTarget) {
|
|
130
|
+
return {
|
|
131
|
+
when: (previousAnswers) => (0, conditions_1.showScpQuestion)(previousAnswers),
|
|
132
|
+
type: 'confirm',
|
|
133
|
+
name: types_1.abapDeployConfigInternalPromptNames.scp,
|
|
134
|
+
message: (0, i18n_1.t)('prompts.target.scp.message'),
|
|
135
|
+
guiOptions: {
|
|
136
|
+
breadcrumb: (0, i18n_1.t)('prompts.target.scp.breadcrumb')
|
|
137
|
+
},
|
|
138
|
+
default: () => backendTarget?.abapTarget?.scp,
|
|
139
|
+
validate: (scp) => (0, validators_1.validateScpQuestion)(scp)
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns the client choice prompt.
|
|
144
|
+
*
|
|
145
|
+
* @param backendTarget - backend target
|
|
146
|
+
* @returns list question for client choice
|
|
147
|
+
*/
|
|
148
|
+
function getClientChoicePrompt(backendTarget) {
|
|
149
|
+
const prompts = [
|
|
150
|
+
{
|
|
151
|
+
when: () => (0, conditions_1.showClientChoiceQuestion)(backendTarget?.abapTarget?.client, prompt_state_1.PromptState.abapDeployConfig?.isS4HC),
|
|
152
|
+
type: 'list',
|
|
153
|
+
name: types_1.abapDeployConfigInternalPromptNames.clientChoice,
|
|
154
|
+
message: (0, i18n_1.t)('prompts.target.clientChoice.message'),
|
|
155
|
+
guiOptions: {
|
|
156
|
+
applyDefaultWhenDirty: true
|
|
157
|
+
},
|
|
158
|
+
choices: () => (0, helpers_1.getClientChoicePromptChoices)(backendTarget?.abapTarget?.client),
|
|
159
|
+
default: () => backendTarget?.abapTarget.client ? "base" /* ClientChoiceValue.Base */ : "blank" /* ClientChoiceValue.Blank */,
|
|
160
|
+
validate: (input) => (0, validators_1.validateClientChoiceQuestion)(input, backendTarget?.abapTarget?.client)
|
|
161
|
+
}
|
|
162
|
+
];
|
|
163
|
+
if (!prompt_state_1.PromptState.isYUI) {
|
|
164
|
+
prompts.push({
|
|
165
|
+
when: async (answers) => {
|
|
166
|
+
const clientChoice = answers[types_1.abapDeployConfigInternalPromptNames.clientChoice];
|
|
167
|
+
if (clientChoice) {
|
|
168
|
+
(0, validators_1.validateClientChoiceQuestion)(clientChoice, backendTarget?.abapTarget?.client);
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
171
|
+
},
|
|
172
|
+
name: types_1.abapDeployConfigInternalPromptNames.clientChoiceCliSetter
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return prompts;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Returns the client prompt.
|
|
179
|
+
*
|
|
180
|
+
* @param backendTarget - backend target
|
|
181
|
+
* @returns input question for client
|
|
182
|
+
*/
|
|
183
|
+
function getClientPrompt(backendTarget) {
|
|
184
|
+
return {
|
|
185
|
+
when: (previousAnswers) => {
|
|
186
|
+
return (0, conditions_1.showClientQuestion)(previousAnswers.clientChoice, backendTarget?.abapTarget?.client, prompt_state_1.PromptState.abapDeployConfig?.isS4HC);
|
|
187
|
+
},
|
|
188
|
+
type: 'input',
|
|
189
|
+
name: types_1.abapDeployConfigInternalPromptNames.client,
|
|
190
|
+
message: (0, i18n_1.t)('prompts.target.client.message'),
|
|
191
|
+
guiOptions: {
|
|
192
|
+
mandatory: true,
|
|
193
|
+
breadcrumb: (0, i18n_1.t)('prompts.target.client.breadcrumb')
|
|
194
|
+
},
|
|
195
|
+
default: () => backendTarget?.abapTarget?.client,
|
|
196
|
+
filter: (input) => input?.trim(),
|
|
197
|
+
validate: (client) => (0, validators_1.validateClient)(client)
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Returns the abap target prompts.
|
|
202
|
+
*
|
|
203
|
+
* @param options - abap deploy config prompt options
|
|
204
|
+
* @returns list of questions for abap target prompting
|
|
205
|
+
*/
|
|
206
|
+
async function getAbapTargetPrompts(options) {
|
|
207
|
+
const { destinations, backendSystems } = await (0, utils_1.getAbapSystems)();
|
|
208
|
+
const abapSystemChoices = await (0, helpers_1.getAbapSystemChoices)(destinations, options?.backendTarget, backendSystems);
|
|
209
|
+
return [
|
|
210
|
+
...getDestinationPrompt(abapSystemChoices, destinations, options.backendTarget),
|
|
211
|
+
...getTargetSystemPrompt(abapSystemChoices),
|
|
212
|
+
getUrlPrompt(destinations, options.backendTarget),
|
|
213
|
+
getScpPrompt(options.backendTarget),
|
|
214
|
+
...getClientChoicePrompt(options.backendTarget),
|
|
215
|
+
getClientPrompt(options.backendTarget)
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
exports.getAbapTargetPrompts = getAbapTargetPrompts;
|
|
219
|
+
//# sourceMappingURL=abap-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abap-target.js","sourceRoot":"","sources":["../../../src/prompts/questions/abap-target.ts"],"names":[],"mappings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AO,CAAC,aAAa,CAAC;QACjD,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC;QACnC,GAAG,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC;QAC/C,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC;KACzC,CAAC;AACN,CAAC;AAbD,oDAaC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AbapDeployConfigAnswersInternal, type AbapDeployConfigPromptOptions } from '../../types';
|
|
2
|
+
import type { Question } from 'inquirer';
|
|
3
|
+
/**
|
|
4
|
+
* Get the authentication prompts.
|
|
5
|
+
*
|
|
6
|
+
* @param options - abap deploy config prompt options
|
|
7
|
+
* @returns list of questions for auth prompting
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAuthPrompts(options: AbapDeployConfigPromptOptions): Question<AbapDeployConfigAnswersInternal>[];
|
|
10
|
+
//# sourceMappingURL=auth.d.ts.map
|