@sap-ux/fiori-app-sub-generator 0.3.0 → 0.4.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.
@@ -194,8 +194,9 @@ class FioriAppGenerator extends yeoman_generator_1.default {
194
194
  (0, subgenHelpers_1.addDeployGen)({
195
195
  service: this.state.service,
196
196
  projectName: this.state.project.name,
197
+ promptSettings: generatorOptions.promptSettings,
197
198
  targetFolder: this.state.project.targetFolder,
198
- applicationType: 'FF' // Telemetry data
199
+ applicationType: this.state.floorplan === types_1.FloorplanFF.FF_SIMPLE ? 'FF' : 'FE' // Telemetry data
199
200
  }, this.composeWith.bind(this), FioriAppGenerator.logger, this.appWizard);
200
201
  }
201
202
  if (this.state.project?.addFlpConfig) {
@@ -282,8 +282,9 @@ function createOdataServicePromptOptions(options) {
282
282
  },
283
283
  [odata_service_inquirer_1.promptNames.serviceSelection]: {
284
284
  useAutoComplete: (0, fiori_generator_shared_1.getHostEnvironment)() === fiori_generator_shared_1.hostEnvironment.cli,
285
- requiredOdataVersion: options.requiredOdataVersion,
286
- showCollaborativeDraftWarning: options.showCollabDraftWarning && isYUI
285
+ requiredOdataVersion: options.requiredOdataVersion ?? options.promptOptions?.serviceSelection?.requiredOdataVersion,
286
+ showCollaborativeDraftWarning: options.showCollabDraftWarning && isYUI,
287
+ serviceFilter: options.promptOptions?.serviceSelection?.serviceFilter
287
288
  },
288
289
  [odata_service_inquirer_1.promptNames.systemSelection]: {
289
290
  destinationFilters: {
@@ -1,22 +1,24 @@
1
1
  import type { AppWizard } from '@sap-devx/yeoman-ui-types';
2
2
  import type { ILogWrapper } from '@sap-ux/fiori-generator-shared';
3
3
  import type Generator from 'yeoman-generator';
4
- import { type Service } from '../types';
4
+ import { type FioriAppGeneratorPromptSettings, type Service } from '../types';
5
5
  /**
6
6
  * Add the '@sap/fiori:fiori-deployment' generator as a subgenerator.
7
7
  *
8
- * @param root0
9
- * @param root0.service
10
- * @param root0.projectName
11
- * @param root0.targetFolder
12
- * @param root0.applicationType
13
- * @param composeWith
14
- * @param logger
15
- * @param appWizard
8
+ * @param deployGenOpts
9
+ * @param deployGenOpts.service - service object
10
+ * @param deployGenOpts.projectName - project name
11
+ * @param deployGenOpts.promptSettings - prompt settings for the deployment generator
12
+ * @param deployGenOpts.targetFolder - target folder for the deployment configuration
13
+ * @param deployGenOpts.applicationType - application type, used for telemetry (FF | FE)
14
+ * @param composeWith - the composeWith function from the Yeoman generator
15
+ * @param logger - logger instance
16
+ * @param appWizard - instance of the AppWizard
16
17
  */
17
- export declare function addDeployGen({ service, projectName, targetFolder, applicationType }: {
18
+ export declare function addDeployGen({ service, projectName, promptSettings, targetFolder, applicationType }: {
18
19
  service: Partial<Service>;
19
20
  projectName: string;
21
+ promptSettings?: FioriAppGeneratorPromptSettings;
20
22
  targetFolder: string;
21
23
  applicationType: string;
22
24
  }, composeWith: Generator['composeWith'], logger: ILogWrapper, appWizard?: AppWizard): void;
@@ -8,16 +8,17 @@ const utils_1 = require("../utils");
8
8
  /**
9
9
  * Add the '@sap/fiori:fiori-deployment' generator as a subgenerator.
10
10
  *
11
- * @param root0
12
- * @param root0.service
13
- * @param root0.projectName
14
- * @param root0.targetFolder
15
- * @param root0.applicationType
16
- * @param composeWith
17
- * @param logger
18
- * @param appWizard
11
+ * @param deployGenOpts
12
+ * @param deployGenOpts.service - service object
13
+ * @param deployGenOpts.projectName - project name
14
+ * @param deployGenOpts.promptSettings - prompt settings for the deployment generator
15
+ * @param deployGenOpts.targetFolder - target folder for the deployment configuration
16
+ * @param deployGenOpts.applicationType - application type, used for telemetry (FF | FE)
17
+ * @param composeWith - the composeWith function from the Yeoman generator
18
+ * @param logger - logger instance
19
+ * @param appWizard - instance of the AppWizard
19
20
  */
20
- function addDeployGen({ service, projectName, targetFolder, applicationType }, composeWith, logger, appWizard) {
21
+ function addDeployGen({ service, projectName, promptSettings, targetFolder, applicationType }, composeWith, logger, appWizard) {
21
22
  composeWith('@sap/fiori:deploy-config', {
22
23
  launchDeployConfigAsSubGenerator: true,
23
24
  appGenServiceHost: service.host,
@@ -30,7 +31,8 @@ function addDeployGen({ service, projectName, targetFolder, applicationType }, c
30
31
  projectPath: targetFolder,
31
32
  appWizard: appWizard,
32
33
  telemetryData: { appType: applicationType },
33
- logWrapper: logger
34
+ logWrapper: logger,
35
+ subGenPromptOptions: promptSettings?.['@sap-ux/deploy-config-sub-generator']
34
36
  });
35
37
  }
36
38
  /**
@@ -1,5 +1,7 @@
1
1
  import type { DatasourceType, OdataServicePromptOptions, OdataVersion, promptNames } from '@sap-ux/odata-service-inquirer';
2
2
  import type { UI5ApplicationPromptOptions } from '@sap-ux/ui5-application-inquirer';
3
+ import type { AbapDeployConfigPromptOptions } from '@sap-ux/abap-deploy-config-inquirer';
4
+ import type { CfDeployConfigPromptOptions } from '@sap-ux/cf-deploy-config-inquirer';
3
5
  /**
4
6
  * package.json script entries (commands and tasks)
5
7
  */
@@ -14,7 +16,9 @@ export type WorkspaceFolder = {
14
16
  folderName: string;
15
17
  path: string;
16
18
  };
17
- export type FioriAppGeneratorPromptSettings = UI5ApplicationPromptOptions & Pick<OdataServicePromptOptions, promptNames.systemSelection>;
19
+ export type FioriAppGeneratorPromptSettings = UI5ApplicationPromptOptions & Pick<OdataServicePromptOptions, promptNames.systemSelection | promptNames.serviceSelection> & {
20
+ '@sap-ux/deploy-config-sub-generator'?: AbapDeployConfigPromptOptions | CfDeployConfigPromptOptions;
21
+ };
18
22
  /**
19
23
  * Custom environment type until yeoman-environment provides one
20
24
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fiori-app-sub-generator",
3
3
  "description": "A yeoman (sub) generator that can generate Fiori applications. Not for standalone use.",
4
- "version": "0.3.0",
4
+ "version": "0.4.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -35,17 +35,17 @@
35
35
  "@sap-ux/cap-config-writer": "0.10.2",
36
36
  "@sap-ux/feature-toggle": "0.3.0",
37
37
  "@sap-ux/fiori-elements-writer": "2.4.7",
38
- "@sap-ux/fiori-freestyle-writer": "2.4.4",
39
38
  "@sap-ux/fiori-generator-shared": "0.12.2",
40
39
  "@sap-ux/fiori-tools-settings": "0.2.0",
40
+ "@sap-ux/fiori-freestyle-writer": "2.4.4",
41
41
  "@sap-ux/launch-config": "0.10.1",
42
42
  "@sap-ux/odata-service-inquirer": "2.4.7",
43
43
  "@sap-ux/odata-service-writer": "0.27.3",
44
44
  "@sap-ux/project-access": "1.30.1",
45
45
  "@sap-ux/store": "1.1.0",
46
- "@sap-ux/telemetry": "0.6.2",
47
46
  "@sap-ux/ui5-application-inquirer": "0.14.3",
48
- "@sap-ux/ui5-info": "0.11.0"
47
+ "@sap-ux/ui5-info": "0.11.0",
48
+ "@sap-ux/telemetry": "0.6.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@sap-devx/yeoman-ui-types": "1.16.9",
@@ -62,6 +62,8 @@
62
62
  "mock-spawn": "0.2.6",
63
63
  "rimraf": "5.0.5",
64
64
  "yeoman-test": "6.3.0",
65
+ "@sap-ux/cf-deploy-config-inquirer": "0.3.3",
66
+ "@sap-ux/abap-deploy-config-inquirer": "1.4.5",
65
67
  "@sap-ux/flp-config-sub-generator": "0.2.9",
66
68
  "@sap-ux/inquirer-common": "0.7.3",
67
69
  "@sap-ux/jest-file-matchers": "0.2.2",