@sap-ux/odata-service-inquirer 0.5.59 → 0.6.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/error-handler/error-handler.d.ts +25 -3
- package/dist/error-handler/error-handler.js +154 -52
- package/dist/i18n.js +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -3
- package/dist/prompts/connectionValidator.d.ts +63 -12
- package/dist/prompts/connectionValidator.js +196 -38
- package/dist/prompts/datasources/sap-system/abap-on-btp/questions.d.ts +2 -1
- package/dist/prompts/datasources/sap-system/abap-on-btp/questions.js +3 -1
- package/dist/prompts/datasources/sap-system/abap-on-prem/questions.d.ts +9 -11
- package/dist/prompts/datasources/sap-system/abap-on-prem/questions.js +21 -55
- package/dist/prompts/datasources/sap-system/credentials/questions.d.ts +21 -0
- package/dist/prompts/datasources/sap-system/credentials/questions.js +123 -0
- package/dist/prompts/datasources/sap-system/new-system/questions.d.ts +4 -26
- package/dist/prompts/datasources/sap-system/new-system/questions.js +18 -168
- package/dist/prompts/datasources/sap-system/new-system/types.d.ts +0 -10
- package/dist/prompts/datasources/sap-system/service-selection/index.d.ts +3 -0
- package/dist/prompts/datasources/sap-system/service-selection/index.js +19 -0
- package/dist/prompts/datasources/sap-system/service-selection/questions.d.ts +15 -0
- package/dist/prompts/datasources/sap-system/service-selection/questions.js +146 -0
- package/dist/prompts/datasources/sap-system/service-selection/service-helper.d.ts +71 -0
- package/dist/prompts/datasources/sap-system/service-selection/service-helper.js +281 -0
- package/dist/prompts/datasources/sap-system/service-selection/types.d.ts +11 -0
- package/dist/prompts/datasources/sap-system/service-selection/types.js +3 -0
- package/dist/prompts/datasources/sap-system/system-selection/index.d.ts +2 -0
- package/dist/prompts/datasources/sap-system/system-selection/index.js +18 -0
- package/dist/prompts/datasources/sap-system/system-selection/prompt-helpers.d.ts +44 -0
- package/dist/prompts/datasources/sap-system/system-selection/prompt-helpers.js +190 -0
- package/dist/prompts/datasources/sap-system/system-selection/questions.d.ts +40 -0
- package/dist/prompts/datasources/sap-system/system-selection/questions.js +181 -0
- package/dist/prompts/datasources/sap-system/validators.d.ts +8 -0
- package/dist/prompts/datasources/sap-system/validators.js +17 -0
- package/dist/prompts/datasources/service-url/questions.js +2 -2
- package/dist/prompts/datasources/service-url/validators.js +5 -6
- package/dist/prompts/prompt-helpers.d.ts +1 -2
- package/dist/prompts/prompt-helpers.js +2 -11
- package/dist/prompts/prompts.js +5 -34
- package/dist/prompts/validators.d.ts +1 -1
- package/dist/prompts/validators.js +1 -1
- package/dist/translations/odata-service-inquirer.i18n.json +36 -15
- package/dist/types.d.ts +57 -10
- package/dist/types.js +7 -1
- package/dist/utils/index.d.ts +12 -3
- package/dist/utils/index.js +27 -5
- package/package.json +6 -6
- package/dist/prompts/datasources/sap-system/new-system/service-helper.d.ts +0 -43
- package/dist/prompts/datasources/sap-system/new-system/service-helper.js +0 -175
|
@@ -0,0 +1,181 @@
|
|
|
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.newSystemChoiceValue = void 0;
|
|
7
|
+
exports.getSystemSelectionQuestions = getSystemSelectionQuestions;
|
|
8
|
+
exports.getSystemConnectionQuestions = getSystemConnectionQuestions;
|
|
9
|
+
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
10
|
+
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
11
|
+
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
12
|
+
const i18n_1 = require("../../../../i18n");
|
|
13
|
+
const types_1 = require("../../../../types");
|
|
14
|
+
const utils_1 = require("../../../../utils");
|
|
15
|
+
const connectionValidator_1 = require("../../../connectionValidator");
|
|
16
|
+
const logger_helper_1 = __importDefault(require("../../../logger-helper"));
|
|
17
|
+
const questions_1 = require("../credentials/questions");
|
|
18
|
+
const questions_2 = require("../new-system/questions");
|
|
19
|
+
const questions_3 = require("../service-selection/questions");
|
|
20
|
+
const validators_1 = require("../validators");
|
|
21
|
+
const prompt_helpers_1 = require("./prompt-helpers");
|
|
22
|
+
// New system choice value is a hard to guess string to avoid conflicts with existing system names or user named systems
|
|
23
|
+
// since it will be used as a new system value in the system selection prompt.
|
|
24
|
+
exports.newSystemChoiceValue = '!@£*&937newSystem*X~qy^';
|
|
25
|
+
const systemSelectionPromptNamespace = 'systemSelection';
|
|
26
|
+
const usernamePromptName = `${systemSelectionPromptNamespace}:${questions_1.BasicCredentialsPromptNames.systemUsername}`;
|
|
27
|
+
const passwordPromptName = `${systemSelectionPromptNamespace}:${questions_1.BasicCredentialsPromptNames.systemPassword}`;
|
|
28
|
+
const systemSelectionPromptNames = {
|
|
29
|
+
systemSelectionCli: 'systemSelectionCli',
|
|
30
|
+
destinationServicePath: 'destinationServicePath'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Validates the system selection, connecting to the selected system and validating the connection.
|
|
34
|
+
*
|
|
35
|
+
* @param systemSelection
|
|
36
|
+
* @param connectionValidator
|
|
37
|
+
* @param requiredOdataVersion
|
|
38
|
+
* @returns the validation result of the selected system connection attempt
|
|
39
|
+
*/
|
|
40
|
+
async function validateSystemSelection(systemSelection, connectionValidator, requiredOdataVersion) {
|
|
41
|
+
utils_1.PromptState.reset();
|
|
42
|
+
if (systemSelection.type === 'newSystemChoice') {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
let connectValResult = false;
|
|
46
|
+
if (systemSelection.type === 'backendSystem') {
|
|
47
|
+
connectValResult = await (0, prompt_helpers_1.connectWithBackendSystem)(systemSelection.system, connectionValidator, requiredOdataVersion);
|
|
48
|
+
}
|
|
49
|
+
else if (systemSelection.type === 'destination') {
|
|
50
|
+
// Partial URL destinations will require additional service path prompt input, so we skip the connection validation here by returning true
|
|
51
|
+
// The service URL connection will need to be validated by the service path prompt
|
|
52
|
+
if ((0, btp_utils_1.isPartialUrlDestination)(systemSelection.system)) {
|
|
53
|
+
// Reset the connection state as we are deferring the connection validation to the service path prompt, any existing connection state should be cleared
|
|
54
|
+
// connectionValidator.resetConnectionState(true);
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
connectValResult = await (0, prompt_helpers_1.connectWithDestination)(systemSelection.system, connectionValidator, requiredOdataVersion);
|
|
58
|
+
}
|
|
59
|
+
return connectValResult;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Returns a list of questions for creating a new system configuration or selecting an existing stored system.
|
|
63
|
+
*
|
|
64
|
+
* @param promptOptions prompt options that may be used to customize the questions
|
|
65
|
+
* @returns a list of questions for creating a new system configuration or selecting an existing stored system
|
|
66
|
+
*/
|
|
67
|
+
async function getSystemSelectionQuestions(promptOptions) {
|
|
68
|
+
utils_1.PromptState.reset();
|
|
69
|
+
const connectValidator = new connectionValidator_1.ConnectionValidator();
|
|
70
|
+
const questions = await getSystemConnectionQuestions(connectValidator, promptOptions);
|
|
71
|
+
// Existing system (BackendSystem or Destination) selected,
|
|
72
|
+
// In future, make the service prompt optional by wrapping in condition `[promptOptions?.serviceSelection?.hide]`
|
|
73
|
+
questions.push(...(0, inquirer_common_1.withCondition)((0, questions_3.getSystemServiceQuestion)(connectValidator, systemSelectionPromptNamespace, promptOptions), (answers) => answers.systemSelection?.type !== 'newSystemChoice'));
|
|
74
|
+
// Create new system connection for storage only supported on non-App Studio environments
|
|
75
|
+
if (!(0, btp_utils_1.isAppStudio)()) {
|
|
76
|
+
questions.push(...(0, inquirer_common_1.withCondition)((0, questions_2.getNewSystemQuestions)(promptOptions), (answers) => answers.systemSelection?.type === 'newSystemChoice'));
|
|
77
|
+
}
|
|
78
|
+
return questions;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns a list of existing systems, either destinations or backend systems from persistent store, depending on the environment.
|
|
82
|
+
* Note that destinations are only available in BAS environment and must include the destination attribute `WebIDEEnabled` to be listed.
|
|
83
|
+
* Additional destination attribute filters may be provided.
|
|
84
|
+
*
|
|
85
|
+
* @param connectionValidator A reference to the active connection validator, used to validate the service selection and retrieve service details.
|
|
86
|
+
* @param promptOptions
|
|
87
|
+
* @returns a list of existing systems
|
|
88
|
+
*/
|
|
89
|
+
async function getSystemConnectionQuestions(connectionValidator, promptOptions) {
|
|
90
|
+
const requiredOdataVersion = promptOptions?.serviceSelection?.requiredOdataVersion;
|
|
91
|
+
const destinationFilters = promptOptions?.systemSelection?.destinationFilters;
|
|
92
|
+
const systemChoices = await (0, prompt_helpers_1.createSystemChoices)(destinationFilters, promptOptions?.systemSelection?.includeCloudFoundryAbapEnvChoice);
|
|
93
|
+
const questions = [
|
|
94
|
+
{
|
|
95
|
+
type: promptOptions?.systemSelection?.useAutoComplete ? 'autocomplete' : 'list',
|
|
96
|
+
name: types_1.promptNames.systemSelection,
|
|
97
|
+
message: (0, i18n_1.t)('prompts.systemSelection.message'),
|
|
98
|
+
source: (prevAnswers, input) => (0, inquirer_common_1.searchChoices)(input, systemChoices),
|
|
99
|
+
choices: systemChoices,
|
|
100
|
+
validate: async (selectedSystem) => {
|
|
101
|
+
if (!selectedSystem) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
let selectedSystemAnswer = selectedSystem;
|
|
105
|
+
// Autocomplete passes the entire choice object as the answer, so we need to extract the value
|
|
106
|
+
if (promptOptions?.systemSelection?.useAutoComplete && selectedSystem.value) {
|
|
107
|
+
selectedSystemAnswer = selectedSystem.value;
|
|
108
|
+
}
|
|
109
|
+
return (validateSystemSelection(selectedSystemAnswer, connectionValidator, requiredOdataVersion) ?? false);
|
|
110
|
+
},
|
|
111
|
+
additionalMessages: async (selectedSystem) => {
|
|
112
|
+
// Backend systems credentials may need to be updated
|
|
113
|
+
if (selectedSystem.type === 'backendSystem' &&
|
|
114
|
+
connectionValidator.systemAuthType === 'basic' &&
|
|
115
|
+
(await connectionValidator.isAuthRequired())) {
|
|
116
|
+
return {
|
|
117
|
+
message: (0, i18n_1.t)('prompts.systemSelection.authenticationFailedUpdateCredentials'),
|
|
118
|
+
severity: yeoman_ui_types_1.Severity.information
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
if ((0, btp_utils_1.isAppStudio)()) {
|
|
125
|
+
// Additional service path prompt for partial URL destinations
|
|
126
|
+
const servicePathPrompt = {
|
|
127
|
+
when: (answers) => {
|
|
128
|
+
const selectedSystem = answers?.[types_1.promptNames.systemSelection];
|
|
129
|
+
if (selectedSystem?.type === 'destination') {
|
|
130
|
+
return (0, btp_utils_1.isPartialUrlDestination)(selectedSystem.system);
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
},
|
|
134
|
+
type: 'input',
|
|
135
|
+
name: systemSelectionPromptNames.destinationServicePath,
|
|
136
|
+
message: (0, i18n_1.t)('prompts.destinationServicePath.message'),
|
|
137
|
+
guiOptions: {
|
|
138
|
+
hint: (0, i18n_1.t)('prompts.destinationServicePath.hint'),
|
|
139
|
+
mandatory: true,
|
|
140
|
+
breadcrumb: true
|
|
141
|
+
},
|
|
142
|
+
validate: async (servicePath, answers) => {
|
|
143
|
+
if (!servicePath) {
|
|
144
|
+
return (0, i18n_1.t)('prompts.destinationServicePath.invalidServicePathWarning');
|
|
145
|
+
}
|
|
146
|
+
// Validate format of the service path, note this relies on the assumption that the destination is correctly configured with a valid URL
|
|
147
|
+
const selectedDestination = answers?.[types_1.promptNames.systemSelection]?.system;
|
|
148
|
+
const valUrlResult = (0, validators_1.validateServiceUrl)(selectedDestination.Host, servicePath);
|
|
149
|
+
if (valUrlResult !== true) {
|
|
150
|
+
return valUrlResult;
|
|
151
|
+
}
|
|
152
|
+
const connectValResult = await (0, prompt_helpers_1.connectWithDestination)(selectedDestination, connectionValidator, requiredOdataVersion, servicePath);
|
|
153
|
+
return connectValResult;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
questions.push(servicePathPrompt);
|
|
157
|
+
}
|
|
158
|
+
// Only for CLI use as `list` prompt validation does not run on CLI unless autocomplete plugin is used
|
|
159
|
+
if ((0, utils_1.getHostEnvironment)() === types_1.hostEnvironment.cli && !promptOptions?.systemSelection?.useAutoComplete) {
|
|
160
|
+
questions.push({
|
|
161
|
+
when: async (answers) => {
|
|
162
|
+
const selectedSystem = answers?.[types_1.promptNames.systemSelection];
|
|
163
|
+
if (!selectedSystem) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
const connectValResult = await validateSystemSelection(selectedSystem, connectionValidator, requiredOdataVersion);
|
|
167
|
+
// An issue occurred with the selected system, there is no need to continue on the CLI, log and exit
|
|
168
|
+
// Note that for connection authentication errors, the result will be true, the user will be prompted to update their credentials in the next prompt
|
|
169
|
+
if (connectValResult !== true) {
|
|
170
|
+
logger_helper_1.default.logger.error(connectValResult.toString);
|
|
171
|
+
throw new Error(connectValResult.toString());
|
|
172
|
+
}
|
|
173
|
+
return false;
|
|
174
|
+
},
|
|
175
|
+
name: `${systemSelectionPromptNames.systemSelectionCli}`
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
questions.push(...(0, questions_1.getCredentialsPrompts)(connectionValidator, systemSelectionPromptNamespace));
|
|
179
|
+
return questions;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=questions.js.map
|
|
@@ -13,4 +13,12 @@ export declare function validateSystemName(systemName: string): Promise<boolean
|
|
|
13
13
|
* @returns the service key info if the file is valid, otherwise an error message
|
|
14
14
|
*/
|
|
15
15
|
export declare function validateServiceKey(path: string): string | ServiceInfo | boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the specified origin and service path can be used to form a valid URL.
|
|
18
|
+
*
|
|
19
|
+
* @param origin the origin of the service
|
|
20
|
+
* @param servicePath the path to the service
|
|
21
|
+
* @returns true if a URL can be created from the specified parameters, otherwise an error message
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateServiceUrl(origin: string, servicePath: string): string | boolean;
|
|
16
24
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.validateSystemName = validateSystemName;
|
|
7
7
|
exports.validateServiceKey = validateServiceKey;
|
|
8
|
+
exports.validateServiceUrl = validateServiceUrl;
|
|
8
9
|
const i18n_1 = require("../../../i18n");
|
|
9
10
|
const store_1 = require("@sap-ux/store");
|
|
10
11
|
const logger_helper_1 = __importDefault(require("../../logger-helper"));
|
|
@@ -59,4 +60,20 @@ function validateServiceKey(path) {
|
|
|
59
60
|
return error.name === 'SyntaxError' ? (0, i18n_1.t)('prompts.serviceKey.unparseableServiceKey') : error.message;
|
|
60
61
|
}
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Validates the specified origin and service path can be used to form a valid URL.
|
|
65
|
+
*
|
|
66
|
+
* @param origin the origin of the service
|
|
67
|
+
* @param servicePath the path to the service
|
|
68
|
+
* @returns true if a URL can be created from the specified parameters, otherwise an error message
|
|
69
|
+
*/
|
|
70
|
+
function validateServiceUrl(origin, servicePath) {
|
|
71
|
+
try {
|
|
72
|
+
new URL(servicePath, origin);
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
return (0, i18n_1.t)('errors.invalidUrl', { input: `${origin}${servicePath}` });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
62
79
|
//# sourceMappingURL=validators.js.map
|
|
@@ -168,15 +168,15 @@ function getPasswordPrompt(connectValidator, requiredVersion) {
|
|
|
168
168
|
applyDefaultWhenDirty: true,
|
|
169
169
|
mandatory: true
|
|
170
170
|
},
|
|
171
|
+
guiType: 'login',
|
|
171
172
|
name: types_1.promptNames.serviceUrlPassword,
|
|
172
173
|
message: (0, i18n_1.t)('prompts.servicePassword.message'),
|
|
173
|
-
guiType: 'login',
|
|
174
174
|
mask: '*',
|
|
175
175
|
validate: async (password, { username, serviceUrl, ignoreCertError, sapClient }) => {
|
|
176
176
|
if (!serviceUrl || !username || !password) {
|
|
177
177
|
return false;
|
|
178
178
|
}
|
|
179
|
-
const validAuth = await connectValidator.validateAuth(serviceUrl, username, password, {
|
|
179
|
+
const { valResult: validAuth } = await connectValidator.validateAuth(serviceUrl, username, password, {
|
|
180
180
|
ignoreCertError,
|
|
181
181
|
sapClient
|
|
182
182
|
});
|
|
@@ -12,6 +12,7 @@ const utils_1 = require("../../../utils");
|
|
|
12
12
|
const connectionValidator_1 = require("../../connectionValidator");
|
|
13
13
|
const logger_helper_1 = __importDefault(require("../../logger-helper"));
|
|
14
14
|
const prompt_helpers_1 = require("../../prompt-helpers");
|
|
15
|
+
const validators_1 = require("../../validators");
|
|
15
16
|
/**
|
|
16
17
|
* Validates that a service specified by the service url is accessible, has the required version and returns valid metadata.
|
|
17
18
|
* Retrieves annotations (from Abap backends) if available and stores them in the PromptState.
|
|
@@ -30,13 +31,11 @@ async function validateService(url, { odataService, axiosConfig }, requiredVersi
|
|
|
30
31
|
connectionValidator_1.ConnectionValidator.setGlobalRejectUnauthorized(!ignoreCertError);
|
|
31
32
|
}
|
|
32
33
|
const metadata = await odataService.metadata();
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
36
|
-
serviceVersion: serviceOdataVersion,
|
|
37
|
-
requiredVersion
|
|
38
|
-
})}`;
|
|
34
|
+
const odataVersionValResult = (0, validators_1.validateODataVersion)(metadata, requiredVersion);
|
|
35
|
+
if (odataVersionValResult.validationMsg) {
|
|
36
|
+
return odataVersionValResult.validationMsg;
|
|
39
37
|
}
|
|
38
|
+
const serviceOdataVersion = odataVersionValResult.version;
|
|
40
39
|
// Remove all occurrences of the origin from the metadata to make backend uris relative
|
|
41
40
|
utils_1.PromptState.odataService.metadata = (0, utils_1.originToRelative)(metadata);
|
|
42
41
|
utils_1.PromptState.odataService.odataVersion = serviceOdataVersion;
|
|
@@ -7,8 +7,7 @@ export declare const errorHandler: ErrorHandler;
|
|
|
7
7
|
*
|
|
8
8
|
* @param options - optionally include some of the supported datasource type choices
|
|
9
9
|
* @param options.includeNone - Include the `NONE` option in the datasource type prompt
|
|
10
|
-
* @param options.includeProjectSpecificDest - Include the `projectSpecificDestination` option in the datasource type prompt
|
|
11
10
|
* @returns The datasource type choices
|
|
12
11
|
*/
|
|
13
|
-
export declare function getDatasourceTypeChoices({ includeNone
|
|
12
|
+
export declare function getDatasourceTypeChoices({ includeNone }?: DatasourceTypePromptOptions): ListChoiceOptions[];
|
|
14
13
|
//# sourceMappingURL=prompt-helpers.d.ts.map
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.errorHandler = void 0;
|
|
4
4
|
exports.getDatasourceTypeChoices = getDatasourceTypeChoices;
|
|
5
|
-
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
6
5
|
const error_handler_1 = require("../error-handler/error-handler");
|
|
7
6
|
const i18n_1 = require("../i18n");
|
|
8
7
|
const types_1 = require("../types");
|
|
@@ -13,10 +12,9 @@ exports.errorHandler = new error_handler_1.ErrorHandler();
|
|
|
13
12
|
*
|
|
14
13
|
* @param options - optionally include some of the supported datasource type choices
|
|
15
14
|
* @param options.includeNone - Include the `NONE` option in the datasource type prompt
|
|
16
|
-
* @param options.includeProjectSpecificDest - Include the `projectSpecificDestination` option in the datasource type prompt
|
|
17
15
|
* @returns The datasource type choices
|
|
18
16
|
*/
|
|
19
|
-
function getDatasourceTypeChoices({ includeNone = false
|
|
17
|
+
function getDatasourceTypeChoices({ includeNone = false } = {}) {
|
|
20
18
|
const choices = [
|
|
21
19
|
{
|
|
22
20
|
name: (0, i18n_1.t)('prompts.datasourceType.sapSystemChoiceText'),
|
|
@@ -25,15 +23,8 @@ function getDatasourceTypeChoices({ includeNone = false, includeProjectSpecificD
|
|
|
25
23
|
{
|
|
26
24
|
name: (0, i18n_1.t)('prompts.datasourceType.odataServiceUrlChoiceText'),
|
|
27
25
|
value: types_1.DatasourceType.odataServiceUrl
|
|
28
|
-
}
|
|
29
|
-
{ name: (0, i18n_1.t)('prompts.datasourceType.businessHubChoiceText'), value: types_1.DatasourceType.businessHub }
|
|
26
|
+
}
|
|
30
27
|
];
|
|
31
|
-
if ((0, btp_utils_1.isAppStudio)() && includeProjectSpecificDest) {
|
|
32
|
-
choices.push({
|
|
33
|
-
name: (0, i18n_1.t)('prompts.datasourceType.projectSpecificDestChoiceText'),
|
|
34
|
-
value: types_1.DatasourceType.projectSpecificDestination
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
28
|
choices.push({ name: (0, i18n_1.t)('prompts.datasourceType.capProjectChoiceText'), value: types_1.DatasourceType.capProject });
|
|
38
29
|
choices.push({ name: (0, i18n_1.t)('prompts.datasourceType.metadataFileChoiceText'), value: types_1.DatasourceType.metadataFile });
|
|
39
30
|
if (includeNone) {
|
package/dist/prompts/prompts.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getQuestions = getQuestions;
|
|
7
|
-
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
8
4
|
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
9
5
|
const i18n_1 = require("../i18n");
|
|
10
6
|
const types_1 = require("../types");
|
|
11
7
|
const questions_1 = require("./datasources/cap-project/questions");
|
|
12
8
|
const metadata_file_1 = require("./datasources/metadata-file");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const logger_helper_1 = __importDefault(require("./logger-helper"));
|
|
9
|
+
const system_selection_1 = require("./datasources/sap-system/system-selection");
|
|
10
|
+
const questions_2 = require("./datasources/service-url/questions");
|
|
16
11
|
const prompt_helpers_1 = require("./prompt-helpers");
|
|
17
12
|
/**
|
|
18
13
|
* Get the prompts for the OData service inquirer.
|
|
@@ -42,29 +37,7 @@ function getDatasourceTypeQuestion(options) {
|
|
|
42
37
|
},
|
|
43
38
|
default: options?.default ?? -1,
|
|
44
39
|
message: (0, i18n_1.t)('prompts.datasourceType.message'),
|
|
45
|
-
choices
|
|
46
|
-
additionalMessages: (source) => {
|
|
47
|
-
if ([
|
|
48
|
-
types_1.DatasourceType.businessHub,
|
|
49
|
-
types_1.DatasourceType.none,
|
|
50
|
-
types_1.DatasourceType.projectSpecificDestination,
|
|
51
|
-
types_1.DatasourceType.sapSystem
|
|
52
|
-
].includes(source)) {
|
|
53
|
-
logger_helper_1.default.logger?.warn((0, i18n_1.t)('prompts.datasourceType.notYetImplementedWarningMessage', { datasourceType: source }));
|
|
54
|
-
return {
|
|
55
|
-
message: (0, i18n_1.t)('prompts.datasourceType.notYetImplementedWarningMessage', { datasourceType: source }),
|
|
56
|
-
severity: yeoman_ui_types_1.Severity.warning
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
if (source === types_1.DatasourceType.businessHub) {
|
|
60
|
-
return {
|
|
61
|
-
message: (0, i18n_1.t)('prompts.nonUIServiceTypeWarningMessage', {
|
|
62
|
-
serviceType: (0, i18n_1.t)('prompts.datasourceType.businessHubName')
|
|
63
|
-
}),
|
|
64
|
-
severity: yeoman_ui_types_1.Severity.warning
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
40
|
+
choices
|
|
68
41
|
};
|
|
69
42
|
}
|
|
70
43
|
/**
|
|
@@ -75,12 +48,10 @@ function getDatasourceTypeQuestion(options) {
|
|
|
75
48
|
*/
|
|
76
49
|
async function getDatasourceTypeConditionalQuestions(promptOptions) {
|
|
77
50
|
const conditionalQuestions = [];
|
|
51
|
+
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)((await (0, system_selection_1.getSystemSelectionQuestions)(promptOptions)), (answers) => answers.datasourceType === types_1.DatasourceType.sapSystem));
|
|
78
52
|
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)([(0, metadata_file_1.getMetadataFileQuestion)(promptOptions?.metadataFilePath)], (answers) => answers.datasourceType === types_1.DatasourceType.metadataFile));
|
|
79
53
|
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)((0, questions_1.getLocalCapProjectPrompts)(promptOptions), (answers) => answers.datasourceType === types_1.DatasourceType.capProject));
|
|
80
|
-
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)((0,
|
|
81
|
-
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)((0, questions_2.getNewSystemQuestions)(promptOptions), (answers) => answers.datasourceType === types_1.DatasourceType.sapSystem &&
|
|
82
|
-
answers.system === questions_2.newSystemChoiceValue));
|
|
83
|
-
//...further data sources to be added here
|
|
54
|
+
conditionalQuestions.push(...(0, inquirer_common_1.withCondition)((0, questions_2.getServiceUrlQuestions)(promptOptions), (answers) => answers.datasourceType === types_1.DatasourceType.odataServiceUrl));
|
|
84
55
|
return conditionalQuestions;
|
|
85
56
|
}
|
|
86
57
|
//# sourceMappingURL=prompts.js.map
|
|
@@ -4,7 +4,7 @@ import type { OdataVersion } from '@sap-ux/odata-service-writer';
|
|
|
4
4
|
*
|
|
5
5
|
* @param edmx the edmx to validate
|
|
6
6
|
* @param requiredVersion the required odata version to validate against
|
|
7
|
-
* @returns version
|
|
7
|
+
* @returns the version only if odata version of the specified edmx matches otherwises the validation error message
|
|
8
8
|
*/
|
|
9
9
|
export declare function validateODataVersion(edmx: string, requiredVersion?: OdataVersion): {
|
|
10
10
|
validationMsg?: string;
|
|
@@ -12,7 +12,7 @@ const utils_1 = require("../utils");
|
|
|
12
12
|
*
|
|
13
13
|
* @param edmx the edmx to validate
|
|
14
14
|
* @param requiredVersion the required odata version to validate against
|
|
15
|
-
* @returns version
|
|
15
|
+
* @returns the version only if odata version of the specified edmx matches otherwises the validation error message
|
|
16
16
|
*/
|
|
17
17
|
function validateODataVersion(edmx, requiredVersion) {
|
|
18
18
|
try {
|
|
@@ -81,13 +81,14 @@
|
|
|
81
81
|
"message": "Password"
|
|
82
82
|
},
|
|
83
83
|
"systemService": {
|
|
84
|
-
"message": "Service
|
|
84
|
+
"message": "Service",
|
|
85
85
|
"breadcrumb": "Service",
|
|
86
86
|
"noServicesWarning": "No services available for the selected system, see logs for further details."
|
|
87
87
|
},
|
|
88
88
|
"newSystemType": {
|
|
89
89
|
"choiceAbapOnPrem": "ABAP On Premise",
|
|
90
90
|
"choiceAbapOnBtp": "ABAP Environment on SAP Business Technology Platform",
|
|
91
|
+
"choiceCFAbapEnvServiceOnBtp": "Cloud Foundry ABAP environment on SAP Business Technology Platform",
|
|
91
92
|
"message": "System type",
|
|
92
93
|
"notYetImplementedWarningMessage": "The selected system type: {{ systemType }} is not yet implemented."
|
|
93
94
|
},
|
|
@@ -99,7 +100,9 @@
|
|
|
99
100
|
"emptySystemNameWarning": "System name cannot be empty."
|
|
100
101
|
},
|
|
101
102
|
"systemSelection": {
|
|
102
|
-
"newSystemChoiceLabel": "New system"
|
|
103
|
+
"newSystemChoiceLabel": "New system",
|
|
104
|
+
"message": "Select a system configuration",
|
|
105
|
+
"authenticationFailedUpdateCredentials": "Authentication failed. Please try updating the credentials."
|
|
103
106
|
},
|
|
104
107
|
"abapOnBTPType": {
|
|
105
108
|
"message": "ABAP environment definition source",
|
|
@@ -116,36 +119,44 @@
|
|
|
116
119
|
"cloudFoundryAbapSystem": {
|
|
117
120
|
"message": "ABAP environment",
|
|
118
121
|
"hint": "Enter the name of the Cloud Foundry service that contains the ABAP Environment instance"
|
|
122
|
+
},
|
|
123
|
+
"destinationServicePath": {
|
|
124
|
+
"message": "Service path",
|
|
125
|
+
"hint": "Enter the path to the OData service, relative to the selected destination URL",
|
|
126
|
+
"invalidServicePathWarning": "Please enter a valid service path"
|
|
119
127
|
}
|
|
120
128
|
},
|
|
121
129
|
"errors": {
|
|
130
|
+
"destination": {
|
|
131
|
+
"unavailable": "The selected destination references an instance that is not available. Please check your destination configuration and try again.",
|
|
132
|
+
"notFound": "The destination is misconfigured, HTTP Error 404 returned, the requested resource could not be found.",
|
|
133
|
+
"authError": "The selected system is returning an authentication error. System name: {{systemName}}, error: {{- error}}",
|
|
134
|
+
"notReachable": "The selected system is not reachable. System name: {{systemName}}, error: {{- error}}",
|
|
135
|
+
"misconfigured": "The destination is misconfigured. $t(errors.destination.missingPropMsg, {\"destinationProperty\": \"{{destinationProperty}}\" })",
|
|
136
|
+
"missingPropMsg": "The property: `{{destinationProperty}}` is missing.",
|
|
137
|
+
"httpConnectionError": "A connection error occurred with the selected destination. Http code: {{- code}}. See log for more details."
|
|
138
|
+
},
|
|
122
139
|
"cannotReadCapServiceMetadata": "An error occurred reading CAP service metadata: {{serviceName}}. See log for more details.",
|
|
123
140
|
"capModelAndServicesLoadError": "An error occurred loading the CAP model and services. {{- error}}",
|
|
124
141
|
"capServiceUrlPathNotDefined": "An error occurred reading CAP service metadata: {{serviceName}}. CAP service property `urlPath` is not defined but is required.",
|
|
125
|
-
"unknownError": "An error occurred
|
|
142
|
+
"unknownError": "An error occurred{{- error, addMsgWithColonFormatter}}",
|
|
126
143
|
"servicesUnavailable": "An error occurred retrieving service(s) for SAP System.",
|
|
127
144
|
"certificateError": "A certificate error has occurred: {{- error}}",
|
|
128
145
|
"urlCertValidationError": "The system URL is using {{certErrorReason}} security certificate.",
|
|
129
|
-
"authenticationFailed": "Authentication incorrect {{error}}",
|
|
146
|
+
"authenticationFailed": "Authentication incorrect. {{error}}",
|
|
130
147
|
"authenticationTimeout": "Authorization was not verified within the allowed time. Please ensure you have authenticated using the associated browser window.",
|
|
131
|
-
"invalidUrl": "
|
|
148
|
+
"invalidUrl": "Invalid URL{{-input, addMsgWithColonFormatter}}",
|
|
132
149
|
"connectionError": "A connection error occurred, please ensure the target host is available on the network: {{- error}}",
|
|
133
150
|
"timeout": "A connection timeout error occurred: {{- error}}",
|
|
134
|
-
"
|
|
151
|
+
"serverReturnedAnError": "The server returned an error. {{errorDesc}}",
|
|
152
|
+
"serverUnableToCompleteRequest": "The server was unable to complete the request",
|
|
135
153
|
"catalogServiceNotActive": "Catalog service is not active",
|
|
136
|
-
"internalServerError": "The URL you have provided cannot be accessed and is returning: '{{- error}}'. Please ensure that the URL is accessible externally.",
|
|
137
154
|
"urlNotFound": "URL not found",
|
|
138
155
|
"odataServiceUrlNotFound": "The service URL you have provided is not a valid OData Service. Fiori applications require an OData service as the data source.",
|
|
139
|
-
"badGateway": "The server returned an error: bad gateway, please check the URL and try again.",
|
|
140
|
-
"destinationUnavailable": "The selected destination references an instance that is not available. Please check your destination configuration and try again.",
|
|
141
|
-
"destinationNotFound": "The destination is mis-configured, HTTP Error 404 returned, the requested resource could not be found.",
|
|
142
|
-
"destinationMisconfigured": "The destination is mis-configured, HTML5.DynamicDestination property is missing.",
|
|
143
156
|
"noServicesAvailable": "There are no V{{version}} OData services available from the selected system and the template you have chosen supports V{{version}} OData services only",
|
|
144
157
|
"redirectError": "A redirect response was received from the server",
|
|
145
158
|
"abapEnvsUnavailable": "ABAP environments unavailable",
|
|
146
159
|
"noSuchHostError": "No such host is known",
|
|
147
|
-
"odataServiceVersionMismatch": "The template you have chosen supports V{{requiredVersion}} OData services only. The provided version is V{{serviceVersion}}.",
|
|
148
|
-
"destinationAuthError": "The selected system is returning an authentication error. Please verify the destination configuration",
|
|
149
160
|
"systemOrServiceUrlNotFound": "Please verify the url: {{- url}}, target system configuration and network connectivity",
|
|
150
161
|
"urlRedirect": "The service URL is redirecting",
|
|
151
162
|
"certValidationRequired": "Certificate validation is required to continue.",
|
|
@@ -157,7 +168,14 @@
|
|
|
157
168
|
"noAbapEnvsInCFSpace": "No ABAP environments in CF space found.",
|
|
158
169
|
"abapEnvsCFDiscoveryFailed": "Discovering ABAP Environments failed. Please ensure you are logged into Cloud Foundry (see https://docs.cloudfoundry.org/cf-cli/getting-started.html#login).",
|
|
159
170
|
"abapServiceAuthenticationFailed": "ABAP environment authentication using UAA failed.",
|
|
160
|
-
"serviceCatalogRequest": "An error occurred requesting services from: {{- catalogRequestUri }} and entity set: {{entitySet}}. {{error}}"
|
|
171
|
+
"serviceCatalogRequest": "An error occurred requesting services from: {{- catalogRequestUri }} and entity set: {{entitySet}}. {{error}}",
|
|
172
|
+
"storedSystemConnectionError": "An error occurred while validating the stored system connection info. System name: {{-systemName}}, error: {{- error}}",
|
|
173
|
+
"noCatalogOrServiceAvailable": "No active system or OData service endpoint connection available to retrieve service(s).",
|
|
174
|
+
"systemConnectionValidationFailed": "A connection to the selected system could not be established.",
|
|
175
|
+
"allCatalogServiceRequestsFailed": "All catalog service requests failed for the selected system. OData version(s): V{{version}}.",
|
|
176
|
+
"internalServerError": "Internal server error{{-errorMsg, addMsgWithColonFormatter}}",
|
|
177
|
+
"badGateway": "Bad gateway{{- errorMsg, addMsgWithColonFormatter}}",
|
|
178
|
+
"badRequest": "Bad request{{- errorMsg, addMsgWithColonFormatter}}"
|
|
161
179
|
},
|
|
162
180
|
"texts": {
|
|
163
181
|
"anExpiredCert": "an expired",
|
|
@@ -166,7 +184,10 @@
|
|
|
166
184
|
"anUntrustedRootCert": "an untrusted root",
|
|
167
185
|
"suggestedSystemNameClient": ", client {{client}}",
|
|
168
186
|
"seeLogForDetails": "See log for more details.",
|
|
169
|
-
"forUserName": "(for user [{{username}}])"
|
|
187
|
+
"forUserName": "(for user [{{username}}])",
|
|
188
|
+
"systemTypeBTP": "BTP",
|
|
189
|
+
"systemTypeS4HC": "S4HC",
|
|
190
|
+
"httpStatus": "http status {{httpStatus}}"
|
|
170
191
|
},
|
|
171
192
|
"guidedAnswers": {
|
|
172
193
|
"validationErrorHelpText": "Need help with this error?"
|
package/dist/types.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { IValidationLink } from '@sap-devx/yeoman-ui-types';
|
|
2
2
|
import type { Annotations, ServiceProvider } from '@sap-ux/axios-extension';
|
|
3
|
+
import type { Destination } from '@sap-ux/btp-utils';
|
|
3
4
|
import type { CommonPromptOptions, YUIQuestion } from '@sap-ux/inquirer-common';
|
|
4
5
|
import type { OdataVersion } from '@sap-ux/odata-service-writer';
|
|
5
6
|
import type { CdsVersionInfo } from '@sap-ux/project-access';
|
|
6
|
-
import type { ListChoiceOptions } from 'inquirer';
|
|
7
7
|
import type { BackendSystem } from '@sap-ux/store';
|
|
8
|
+
import type { ListChoiceOptions } from 'inquirer';
|
|
8
9
|
/**
|
|
9
10
|
* This file contains types that are exported by the module and are needed for consumers using the APIs `prompt` and `getPrompts`.
|
|
10
11
|
*/
|
|
11
12
|
export declare enum DatasourceType {
|
|
12
13
|
sapSystem = "sapSystem",
|
|
13
|
-
businessHub = "businessHub",
|
|
14
14
|
capProject = "capProject",
|
|
15
15
|
odataServiceUrl = "odataServiceUrl",
|
|
16
16
|
none = "none",
|
|
17
17
|
metadataFile = "metadataFile",
|
|
18
|
-
projectSpecificDestination = "projectSpecificDestination"
|
|
18
|
+
projectSpecificDestination = "projectSpecificDestination",
|
|
19
|
+
businessHub = "businessHub"
|
|
19
20
|
}
|
|
20
21
|
export declare const SapSystemTypes: {
|
|
21
22
|
readonly abapOnPrem: "abapOnPrem";
|
|
@@ -74,8 +75,15 @@ export interface OdataServiceAnswers {
|
|
|
74
75
|
serviceProvider: ServiceProvider;
|
|
75
76
|
/**
|
|
76
77
|
* The persistable backend system representation of the connected service provider
|
|
78
|
+
* `newOrUpdated` is set to true if the system was newly created or updated during the connection validation process and should be considered for storage.
|
|
79
|
+
*/
|
|
80
|
+
backendSystem?: BackendSystem & {
|
|
81
|
+
newOrUpdated?: boolean;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* The destination information for the connected system
|
|
77
85
|
*/
|
|
78
|
-
|
|
86
|
+
destination?: Destination;
|
|
79
87
|
};
|
|
80
88
|
}
|
|
81
89
|
/**
|
|
@@ -113,7 +121,11 @@ export declare enum promptNames {
|
|
|
113
121
|
/**
|
|
114
122
|
* Newly created systems can be named for storage
|
|
115
123
|
*/
|
|
116
|
-
userSystemName = "userSystemName"
|
|
124
|
+
userSystemName = "userSystemName",
|
|
125
|
+
/**
|
|
126
|
+
* System selection
|
|
127
|
+
*/
|
|
128
|
+
systemSelection = "systemSelection"
|
|
117
129
|
}
|
|
118
130
|
export type CapRuntime = 'Node.js' | 'Java';
|
|
119
131
|
export interface CapService {
|
|
@@ -175,10 +187,6 @@ export type DatasourceTypePromptOptions = {
|
|
|
175
187
|
* Include the no datasource option in the datasource type prompt
|
|
176
188
|
*/
|
|
177
189
|
includeNone?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Include the `projectSpecificDestination` option in the datasource type prompt
|
|
180
|
-
*/
|
|
181
|
-
includeProjectSpecificDest?: boolean;
|
|
182
190
|
/**
|
|
183
191
|
* Limit the offered datasource types to the specified types. Note that if `default` is also provided and not included in the choices, the default will be ignored.
|
|
184
192
|
* If `includeNone` is set to true, the `none` option will always be included.
|
|
@@ -186,6 +194,45 @@ export type DatasourceTypePromptOptions = {
|
|
|
186
194
|
*/
|
|
187
195
|
choices?: DatasourceType[];
|
|
188
196
|
};
|
|
197
|
+
export type DestinationFilters = {
|
|
198
|
+
/**
|
|
199
|
+
* 'WebIDEUsage' property is defined and includes the value 'odata_abap'. If this matches, the destination will be included regardless of other matches.
|
|
200
|
+
*/
|
|
201
|
+
odata_abap: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* 'WebIDEUsage' property is defined and includes the value 'odata_gen' and does not includes the value 'odata_abap'. If this matches, the destination will be included regardless of other matches.
|
|
204
|
+
*/
|
|
205
|
+
odata_generic: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* 'WebIDEAdditionalData' property is defined and includes the value 'full_url' and
|
|
208
|
+
* 'WebIDEUsage' property is defined and includes the value 'odata_gen' and does not includes the value 'odata_abap'. If this matches, the destination will be included regardless of other matches.
|
|
209
|
+
*/
|
|
210
|
+
full_service_url: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* 'WebIDEAdditionalData' property is defined and does not include the value 'full_url' and
|
|
213
|
+
* 'WebIDEUsage' property is defined and includes the value 'odata_gen' and does not includes the value 'odata_abap'. If this matches, the destination will be included regardless of other matches.
|
|
214
|
+
*/
|
|
215
|
+
partial_service_url: boolean;
|
|
216
|
+
};
|
|
217
|
+
export type SystemSelectionPromptOptions = {
|
|
218
|
+
/**
|
|
219
|
+
* Set the specific filter option(s) to true to include only the destinatons that have matching configuration attributes.
|
|
220
|
+
* If no filter is set, all destinations will be included. If multiple filters are set, the destination will be included if it matches any of the filters.
|
|
221
|
+
* i.e. if both `abap_cloud` and `abap_on_premise` are set to true, the destination will be included if it has either 'abap_cloud' or 'abap_on_premise' matching configuration.
|
|
222
|
+
*/
|
|
223
|
+
destinationFilters?: Partial<DestinationFilters>;
|
|
224
|
+
/**
|
|
225
|
+
* Determines if the system selection prompt should use auto complete prompt for system names.
|
|
226
|
+
* Note that the auto-complete module must be registered with the inquirer instance to use this feature.
|
|
227
|
+
*/
|
|
228
|
+
useAutoComplete?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Include the Cloud Foundry Abap environments service in the system selection prompt, note this option is only supported on Business Application Studio.
|
|
231
|
+
* Even if this option is set to true, the choice will only be included if the prompts are executed in the Business Application Studio.
|
|
232
|
+
* Note that there is no implementation for this option in this module and handling of the prompt optin and subsequent prompting must be implemented by the consumer.
|
|
233
|
+
*/
|
|
234
|
+
includeCloudFoundryAbapEnvChoice?: boolean;
|
|
235
|
+
};
|
|
189
236
|
export type MetadataPromptOptions = {
|
|
190
237
|
/**
|
|
191
238
|
* Used to validate the metadata file contains the required odata version edmx
|
|
@@ -220,7 +267,7 @@ export type OdataServiceUrlPasswordOptions = Pick<CommonPromptOptions, 'addition
|
|
|
220
267
|
/**
|
|
221
268
|
* Provide the correct type checking for prompt options
|
|
222
269
|
*/
|
|
223
|
-
type odataServiceInquirerPromptOptions = Record<promptNames.datasourceType, DatasourceTypePromptOptions> & Record<promptNames.metadataFilePath, MetadataPromptOptions> & Record<promptNames.capProject, CapProjectPromptOptions> & Record<promptNames.capService, CapServicePromptOptions> & Record<promptNames.serviceUrl, OdataServiceUrlPromptOptions> & Record<promptNames.serviceUrlPassword, OdataServiceUrlPasswordOptions> & Record<promptNames.serviceSelection, ServiceSelectionPromptOptions> & Record<promptNames.userSystemName, SystemNamePromptOptions>;
|
|
270
|
+
type odataServiceInquirerPromptOptions = Record<promptNames.datasourceType, DatasourceTypePromptOptions> & Record<promptNames.metadataFilePath, MetadataPromptOptions> & Record<promptNames.capProject, CapProjectPromptOptions> & Record<promptNames.capService, CapServicePromptOptions> & Record<promptNames.serviceUrl, OdataServiceUrlPromptOptions> & Record<promptNames.serviceUrlPassword, OdataServiceUrlPasswordOptions> & Record<promptNames.serviceSelection, ServiceSelectionPromptOptions> & Record<promptNames.userSystemName, SystemNamePromptOptions> & Record<promptNames.systemSelection, SystemSelectionPromptOptions>;
|
|
224
271
|
export type OdataServiceQuestion = YUIQuestion<OdataServiceAnswers>;
|
|
225
272
|
export type OdataServicePromptOptions = Partial<odataServiceInquirerPromptOptions>;
|
|
226
273
|
/**
|