@sap-ux/abap-deploy-config-inquirer 2.0.19 → 2.0.21
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/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,17 @@ import { getPackagePrompts, getTransportRequestPrompts } from './prompts/index.j
|
|
|
3
3
|
import { getPackageAnswer, getTransportAnswer, reconcileAnswers } from './utils.js';
|
|
4
4
|
import type { InquirerAdapter } from '@sap-ux/inquirer-common';
|
|
5
5
|
import { promptNames, PackageInputChoices, TargetSystemType, TransportChoices, type AbapDeployConfigAnswers, type AbapDeployConfigAnswersInternal, type AbapDeployConfigPromptOptions, type AbapDeployConfigQuestion } from './types.js';
|
|
6
|
+
import type { PromptModule } from 'inquirer';
|
|
6
7
|
/**
|
|
7
8
|
* Get the inquirer prompts for abap deploy config.
|
|
8
9
|
*
|
|
9
10
|
* @param promptOptions - options that can control some of the prompt behavior. See {@link AbapDeployConfigPromptOptions} for details
|
|
10
11
|
* @param logger - a logger compatible with the {@link Logger} interface
|
|
11
12
|
* @param isYUI - if true, the prompt is being called from the Yeoman UI extension host
|
|
13
|
+
* @param promptModule - optional inquirer prompt module instance used to register plugins
|
|
12
14
|
* @returns the prompts used to provide input for abap deploy config generation and a reference to the answers object which will be populated with the user's responses once `inquirer.prompt` returns
|
|
13
15
|
*/
|
|
14
|
-
declare function getPrompts(promptOptions?: AbapDeployConfigPromptOptions, logger?: Logger, isYUI?: boolean): Promise<{
|
|
16
|
+
declare function getPrompts(promptOptions?: AbapDeployConfigPromptOptions, logger?: Logger, isYUI?: boolean, promptModule?: PromptModule): Promise<{
|
|
15
17
|
prompts: AbapDeployConfigQuestion[];
|
|
16
18
|
answers: Partial<AbapDeployConfigAnswersInternal>;
|
|
17
19
|
}>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAgC,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACH,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAChC,MAAM,YAAY,CAAC;AAGpB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAgC,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACH,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAChC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAiB7C;;;;;;;;GAQG;AACH,iBAAe,UAAU,CACrB,aAAa,CAAC,EAAE,6BAA6B,EAC7C,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,UAAQ,EACb,YAAY,CAAC,EAAE,YAAY,GAC5B,OAAO,CAAC;IACP,OAAO,EAAE,wBAAwB,EAAE,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC,+BAA+B,CAAC,CAAC;CACrD,CAAC,CAeD;AAED;;;;;;;;GAQG;AACH,iBAAe,MAAM,CACjB,OAAO,EAAE,eAAe,EACxB,aAAa,CAAC,EAAE,6BAA6B,EAC7C,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,UAAQ,GACd,OAAO,CAAC,uBAAuB,CAAC,CAKlC;AAED,OAAO,EACH,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EACrC,CAAC;AACF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,22 +6,37 @@ import { getPackageAnswer, getTransportAnswer, reconcileAnswers } from './utils.
|
|
|
6
6
|
import LoggerHelper from './logger-helper.js';
|
|
7
7
|
import { promptNames, PackageInputChoices, TargetSystemType, TransportChoices } from './types.js';
|
|
8
8
|
import { AbapServiceProviderManager } from './service-provider-utils/abap-service-provider.js';
|
|
9
|
+
import autocomplete from 'inquirer-autocomplete-prompt';
|
|
10
|
+
/**
|
|
11
|
+
* Registers the autocomplete plugin with the prompt module if any question uses the autocomplete type.
|
|
12
|
+
*
|
|
13
|
+
* @param questions - the list of inquirer questions to inspect
|
|
14
|
+
* @param promptModule - optional inquirer prompt module instance
|
|
15
|
+
*/
|
|
16
|
+
function registerAutocompletePlugin(questions, promptModule) {
|
|
17
|
+
if (promptModule && questions.some((q) => q.type === 'autocomplete')) {
|
|
18
|
+
promptModule.registerPrompt('autocomplete', autocomplete);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
9
21
|
/**
|
|
10
22
|
* Get the inquirer prompts for abap deploy config.
|
|
11
23
|
*
|
|
12
24
|
* @param promptOptions - options that can control some of the prompt behavior. See {@link AbapDeployConfigPromptOptions} for details
|
|
13
25
|
* @param logger - a logger compatible with the {@link Logger} interface
|
|
14
26
|
* @param isYUI - if true, the prompt is being called from the Yeoman UI extension host
|
|
27
|
+
* @param promptModule - optional inquirer prompt module instance used to register plugins
|
|
15
28
|
* @returns the prompts used to provide input for abap deploy config generation and a reference to the answers object which will be populated with the user's responses once `inquirer.prompt` returns
|
|
16
29
|
*/
|
|
17
|
-
async function getPrompts(promptOptions, logger, isYUI = false) {
|
|
30
|
+
async function getPrompts(promptOptions, logger, isYUI = false, promptModule) {
|
|
18
31
|
await initI18n();
|
|
19
32
|
LoggerHelper.logger = logger ?? new ToolsLogger({ logPrefix: '@sap-ux/abap-deploy-config-inquirer' });
|
|
20
33
|
PromptState.isYUI = isYUI;
|
|
21
34
|
PromptState.resetAbapDeployConfig();
|
|
22
35
|
AbapServiceProviderManager.resetIsDefaultProviderAbapCloud();
|
|
36
|
+
const prompts = await getAbapDeployConfigQuestions(promptOptions);
|
|
37
|
+
registerAutocompletePlugin(prompts, promptModule);
|
|
23
38
|
return {
|
|
24
|
-
prompts
|
|
39
|
+
prompts,
|
|
25
40
|
// Return reference to derived answers object that will be populated with user responses (after prompting is complete)
|
|
26
41
|
answers: PromptState.abapDeployConfig
|
|
27
42
|
};
|
|
@@ -36,7 +51,7 @@ async function getPrompts(promptOptions, logger, isYUI = false) {
|
|
|
36
51
|
* @returns the prompt answers
|
|
37
52
|
*/
|
|
38
53
|
async function prompt(adapter, promptOptions, logger, isYUI = false) {
|
|
39
|
-
const abapDeployConfigPrompts = (await getPrompts(promptOptions, logger, isYUI)).prompts;
|
|
54
|
+
const abapDeployConfigPrompts = (await getPrompts(promptOptions, logger, isYUI, adapter?.promptModule)).prompts;
|
|
40
55
|
const answers = await adapter.prompt(abapDeployConfigPrompts);
|
|
41
56
|
return reconcileAnswers(answers, PromptState.abapDeployConfig);
|
|
42
57
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EACH,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAKnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EACH,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAKnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA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AAC;IAE/F,OAAO,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;AACnE,CAAC;AAED,OAAO,EACH,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAMnB,CAAC;AACF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
8
8
|
"directory": "packages/abap-deploy-config-inquirer"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.0.
|
|
10
|
+
"version": "2.0.21",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"files": [
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"i18next": "25.10.10",
|
|
22
22
|
"@sap-devx/yeoman-ui-types": "1.25.0",
|
|
23
23
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
24
|
-
"@sap-ux/axios-extension": "2.0.
|
|
25
|
-
"@sap-ux/btp-utils": "2.0.
|
|
26
|
-
"@sap-ux/fiori-generator-shared": "1.0.
|
|
24
|
+
"@sap-ux/axios-extension": "2.0.5",
|
|
25
|
+
"@sap-ux/btp-utils": "2.0.4",
|
|
26
|
+
"@sap-ux/fiori-generator-shared": "1.0.17",
|
|
27
27
|
"@sap-ux/guided-answers-helper": "1.0.1",
|
|
28
|
-
"@sap-ux/inquirer-common": "1.0.
|
|
29
|
-
"@sap-ux/nodejs-utils": "1.0.
|
|
30
|
-
"@sap-ux/logger": "1.0.
|
|
31
|
-
"@sap-ux/store": "2.0.
|
|
32
|
-
"@sap-ux/system-access": "1.0.
|
|
33
|
-
"@sap-ux/ui5-config": "1.0.
|
|
28
|
+
"@sap-ux/inquirer-common": "1.0.18",
|
|
29
|
+
"@sap-ux/nodejs-utils": "1.0.5",
|
|
30
|
+
"@sap-ux/logger": "1.0.2",
|
|
31
|
+
"@sap-ux/store": "2.0.3",
|
|
32
|
+
"@sap-ux/system-access": "1.0.5",
|
|
33
|
+
"@sap-ux/ui5-config": "1.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@jest/globals": "30.
|
|
37
|
-
"axios": "1.
|
|
36
|
+
"@jest/globals": "30.4.1",
|
|
37
|
+
"axios": "1.18.0",
|
|
38
38
|
"@types/inquirer": "8.2.6",
|
|
39
39
|
"@types/inquirer-autocomplete-prompt": "2.0.2"
|
|
40
40
|
},
|