@sap-ux/ui5-application-inquirer 0.12.0 → 0.12.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.
@@ -36,7 +36,7 @@ function getQuestions(ui5Versions, promptOptions, capCdsInfo, isYUI = false) {
36
36
  [types_1.promptNames.enableTypeScript]: (0, prompts1_1.getEnableTypeScriptPrompt)(capCdsInfo),
37
37
  [types_1.promptNames.addDeployConfig]: (0, prompts1_1.getAddDeployConfigPrompt)(targetDir, promptOptions?.addDeployConfig, isCapProject),
38
38
  [types_1.promptNames.addFlpConfig]: (0, prompts1_1.getAddFlpConfigPrompt)(promptOptions?.addFlpConfig),
39
- [types_1.promptNames.enableVirtualEndpoints]: (0, prompts1_1.getEnableVirtualEndpoints)(),
39
+ [types_1.promptNames.enableVirtualEndpoints]: (0, prompts1_1.getEnableVirtualEndpoints)(isCapProject, capCdsInfo),
40
40
  [types_1.promptNames.showAdvanced]: (0, prompts2_1.getShowAdvancedPrompt)(),
41
41
  [types_1.promptNames.ui5Theme]: (0, prompts2_1.getUI5ThemePrompt)(),
42
42
  [types_1.promptNames.enableEslint]: (0, prompts2_1.getEnableEsLintPrompt)(),
@@ -74,7 +74,9 @@ export declare function getAddFlpConfigPrompt(addFlpConfigOptions?: UI5Applicati
74
74
  /**
75
75
  * Get the `enableVirtualEndpoints` prompt.
76
76
  *
77
+ * @param isCapProject is this a CAP project - additional checks performed if true
78
+ * @param capCdsInfo CDS UI5 plugin information
77
79
  * @returns the `enableVirtualEndpoints` prompt
78
80
  */
79
- export declare function getEnableVirtualEndpoints(): UI5ApplicationQuestion;
81
+ export declare function getEnableVirtualEndpoints(isCapProject: boolean, capCdsInfo?: CdsUi5PluginInfo): UI5ApplicationQuestion;
80
82
  //# sourceMappingURL=prompts1.d.ts.map
@@ -259,10 +259,18 @@ function getAddFlpConfigPrompt(addFlpConfigOptions) {
259
259
  /**
260
260
  * Get the `enableVirtualEndpoints` prompt.
261
261
  *
262
+ * @param isCapProject is this a CAP project - additional checks performed if true
263
+ * @param capCdsInfo CDS UI5 plugin information
262
264
  * @returns the `enableVirtualEndpoints` prompt
263
265
  */
264
- function getEnableVirtualEndpoints() {
266
+ function getEnableVirtualEndpoints(isCapProject, capCdsInfo) {
265
267
  return {
268
+ when: (answers) => {
269
+ if (isCapProject) {
270
+ return capCdsInfo?.isCdsUi5PluginEnabled || !!answers.enableTypeScript;
271
+ }
272
+ return true;
273
+ },
266
274
  type: 'confirm',
267
275
  name: types_1.promptNames.enableVirtualEndpoints,
268
276
  guiOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/ui5-application-inquirer",
3
3
  "description": "Prompts module that can prompt users for inputs required for UI5 application writing",
4
- "version": "0.12.0",
4
+ "version": "0.12.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",