@sap-ux/cf-deploy-config-sub-generator 1.0.17 → 1.0.18

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.
@@ -191,7 +191,8 @@ export default class extends DeploymentGenerator {
191
191
  cfDestination: this.destinationName,
192
192
  isCap: this.isCap,
193
193
  addOverwrite: showOverwriteQuestion(this.deployConfigExists, this.launchDeployConfigAsSubGenerator, this.launchStandaloneFromYui, this.options.overwrite),
194
- apiHubConfig: this.apiHubConfig
194
+ apiHubConfig: this.apiHubConfig,
195
+ promptModule: this.env?.adapter?.promptModule
195
196
  });
196
197
  }
197
198
  /**
@@ -1,6 +1,6 @@
1
1
  import { type CfDeployConfigQuestions, type CfDeployConfigPromptOptions } from '@sap-ux/cf-deploy-config-inquirer';
2
2
  import type { ApiHubConfig } from '@sap-ux/cf-deploy-config-writer';
3
- import type { Question } from 'inquirer';
3
+ import type { Question, PromptModule } from 'inquirer';
4
4
  /**
5
5
  * Fetches the Cloud Foundry deployment configuration questions.
6
6
  *
@@ -12,9 +12,10 @@ import type { Question } from 'inquirer';
12
12
  * @param options.addOverwrite - whether to add the overwrite prompt.
13
13
  * @param options.apiHubConfig - the API Hub configuration.
14
14
  * @param options.promptOptions - additional prompt options.
15
+ * @param options.promptModule - the inquirer prompt module instance used to register plugins.
15
16
  * @returns the cf deploy config questions.
16
17
  */
17
- export declare function getCFQuestions({ projectRoot, isAbapDirectServiceBinding, cfDestination, isCap, addOverwrite, apiHubConfig, promptOptions }: {
18
+ export declare function getCFQuestions({ projectRoot, isAbapDirectServiceBinding, cfDestination, isCap, addOverwrite, apiHubConfig, promptOptions, promptModule }: {
18
19
  projectRoot: string;
19
20
  isAbapDirectServiceBinding: boolean;
20
21
  cfDestination: string;
@@ -22,6 +23,7 @@ export declare function getCFQuestions({ projectRoot, isAbapDirectServiceBinding
22
23
  addOverwrite: boolean;
23
24
  apiHubConfig?: ApiHubConfig;
24
25
  promptOptions?: CfDeployConfigPromptOptions;
26
+ promptModule?: PromptModule;
25
27
  }): Promise<CfDeployConfigQuestions[]>;
26
28
  /**
27
29
  * Generate CF Approuter questions for CAP project with an existing HTML5 app and missing MTA configuration.
@@ -17,9 +17,10 @@ import { withCondition } from '@sap-ux/inquirer-common';
17
17
  * @param options.addOverwrite - whether to add the overwrite prompt.
18
18
  * @param options.apiHubConfig - the API Hub configuration.
19
19
  * @param options.promptOptions - additional prompt options.
20
+ * @param options.promptModule - the inquirer prompt module instance used to register plugins.
20
21
  * @returns the cf deploy config questions.
21
22
  */
22
- export async function getCFQuestions({ projectRoot, isAbapDirectServiceBinding, cfDestination, isCap, addOverwrite, apiHubConfig, promptOptions }) {
23
+ export async function getCFQuestions({ projectRoot, isAbapDirectServiceBinding, cfDestination, isCap, addOverwrite, apiHubConfig, promptOptions, promptModule }) {
23
24
  const isBAS = isAppStudio();
24
25
  const mtaYamlExists = !!(await getMtaPath(projectRoot));
25
26
  const cfChoices = await getCFChoices({
@@ -45,7 +46,8 @@ export async function getCFQuestions({ projectRoot, isAbapDirectServiceBinding,
45
46
  DeploymentGenerator.logger?.debug(t('cfGen.debug.promptOptions', {
46
47
  options: JSON.stringify({ ...options, isCap, addOverwrite, cfDestination, isAbapDirectServiceBinding })
47
48
  }));
48
- return getPrompts(options, DeploymentGenerator.logger);
49
+ const logger = DeploymentGenerator.logger;
50
+ return getPrompts(options, logger, promptModule);
49
51
  }
50
52
  /**
51
53
  * Retrieve the CF Approuter questions, certain prompts are restricted to support CAP project.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/cf-deploy-config-sub-generator",
3
3
  "description": "Generators for configuring Cloud Foundry deployment configuration",
4
- "version": "1.0.17",
4
+ "version": "1.0.18",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -26,7 +26,7 @@
26
26
  "yeoman-generator": "5.10.0",
27
27
  "@sap-ux/btp-utils": "2.0.3",
28
28
  "@sap-ux/cf-deploy-config-writer": "1.0.12",
29
- "@sap-ux/cf-deploy-config-inquirer": "1.0.15",
29
+ "@sap-ux/cf-deploy-config-inquirer": "1.0.16",
30
30
  "@sap-ux/deploy-config-generator-shared": "1.0.13",
31
31
  "@sap-ux/feature-toggle": "1.0.3",
32
32
  "@sap-ux/fiori-generator-shared": "1.0.13",