@sap-ux/fiori-app-sub-generator 0.0.21 → 0.0.23

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.
@@ -116,7 +116,7 @@ class FioriAppGenerator extends yeoman_generator_1.default {
116
116
  showCollabDraftWarning: generatorOptions.showCollabDraftWarning,
117
117
  workspaceFolders: generatorOptions.workspaceFolders
118
118
  };
119
- let serviceAnswers = await (0, prompting_1.promptOdataServiceAnswers)(options, FioriAppGenerator.logger, this.env.adapter);
119
+ let serviceAnswers = await (0, prompting_1.promptOdataServiceAnswers)(options, FioriAppGenerator.logger, this.env.adapter, cachedService?.connectedSystem);
120
120
  /** Back button issue temp fix */
121
121
  // Persist derived state to facilitate backwards navigation
122
122
  if ((0, fiori_generator_shared_1.getHostEnvironment)() !== fiori_generator_shared_1.hostEnvironment.cli) {
@@ -1,5 +1,5 @@
1
1
  import type { Logger } from '@sap-ux/logger';
2
- import { type CapService, OdataVersion } from '@sap-ux/odata-service-inquirer';
2
+ import { type CapService, type ConnectedSystem, OdataVersion } from '@sap-ux/odata-service-inquirer';
3
3
  import type { UI5ApplicationAnswers, UI5ApplicationPromptOptions } from '@sap-ux/ui5-application-inquirer';
4
4
  import type { Question } from 'inquirer';
5
5
  import type { Adapter } from 'yeoman-environment';
@@ -47,9 +47,10 @@ export declare function promptUI5ApplicationAnswers({ service, projectName, targ
47
47
  * @param options
48
48
  * @param logger
49
49
  * @param adapter
50
+ * @param connectedSystem
50
51
  * @returns {Promise<Service>}
51
52
  */
52
- export declare function promptOdataServiceAnswers(options: OdataServiceInquirerOptions, logger: Logger, adapter: Adapter): Promise<Service>;
53
+ export declare function promptOdataServiceAnswers(options: OdataServiceInquirerOptions, logger: Logger, adapter: Adapter, connectedSystem?: ConnectedSystem): Promise<Service>;
53
54
  /**
54
55
  * Creates the `UIApplicationPromptOptions`.
55
56
  * Note that setting 'default', the default prompt value or function, or 'hide', whether the prompt should be shown,
@@ -107,9 +107,10 @@ async function promptUI5ApplicationAnswers({ service, projectName, targetFolder,
107
107
  * @param options
108
108
  * @param logger
109
109
  * @param adapter
110
+ * @param connectedSystem
110
111
  * @returns {Promise<Service>}
111
112
  */
112
- async function promptOdataServiceAnswers(options, logger, adapter) {
113
+ async function promptOdataServiceAnswers(options, logger, adapter, connectedSystem) {
113
114
  let inquirerAdapter;
114
115
  // type `any` will be replaced when we can import ESM modules
115
116
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -121,7 +122,7 @@ async function promptOdataServiceAnswers(options, logger, adapter) {
121
122
  inquirerAdapter = adapter;
122
123
  }
123
124
  const promptOptions = createOdataServicePromptOptions(options);
124
- const answers = await (0, odata_service_inquirer_1.prompt)(inquirerAdapter, promptOptions, logger, (0, feature_toggle_1.isFeatureEnabled)(types_1.Features.enableGAIntegration), telemetry_1.ClientFactory.getTelemetryClient(), (0, fiori_generator_shared_1.getHostEnvironment)() !== fiori_generator_shared_1.hostEnvironment.cli);
125
+ const answers = await (0, odata_service_inquirer_1.prompt)(inquirerAdapter, promptOptions, logger, (0, feature_toggle_1.isFeatureEnabled)(types_1.Features.enableGAIntegration), telemetry_1.ClientFactory.getTelemetryClient(), (0, fiori_generator_shared_1.getHostEnvironment)() !== fiori_generator_shared_1.hostEnvironment.cli, connectedSystem);
125
126
  const service = {
126
127
  host: answers.origin,
127
128
  client: answers.sapClient,
@@ -33,7 +33,8 @@ export interface Credentials {
33
33
  password?: string;
34
34
  }
35
35
  /**
36
- * To be replaced with `@sap-ux/odata-service-inquirer`'s `OdataService` type once all data source flows are migrated ro open-ux-tools
36
+ * Fiori sub app generators internal representation of a service.
37
+ * May be possible to replace this type with `@sap-ux/odata-service-inquirer` `service` type in future.
37
38
  *
38
39
  */
39
40
  export interface Service {
@@ -1,7 +1,7 @@
1
1
  import type { Annotations } from '@sap-ux/axios-extension';
2
2
  import type { CapRuntime, CapService } from '@sap-ux/cap-config-writer';
3
3
  import type { Logger } from '@sap-ux/logger';
4
- import { DatasourceType, OdataVersion } from '@sap-ux/odata-service-inquirer';
4
+ import { DatasourceType, OdataVersion, type ConnectedSystem } from '@sap-ux/odata-service-inquirer';
5
5
  import type { CdsAnnotationsInfo, EdmxAnnotationsInfo } from '@sap-ux/odata-service-writer';
6
6
  import type { CapProjectType, CdsUi5PluginInfo, CdsVersionInfo } from '@sap-ux/project-access';
7
7
  import type { Editor } from 'mem-fs-editor';
@@ -89,7 +89,7 @@ export declare function getCdsAnnotations(capService: CapService, projectName: s
89
89
  * @param connectedSystem - The connected system object.
90
90
  * @returns {boolean} `true` if the connected system is hosted on BTP, otherwise `false`.
91
91
  */
92
- export declare function isBTPHosted(connectedSystem?: Service['connectedSystem']): boolean;
92
+ export declare function isBTPHosted(connectedSystem?: ConnectedSystem): boolean;
93
93
  /**
94
94
  * Retrieves the data source label.
95
95
  *
@@ -1,11 +1,12 @@
1
- import { ApiHubType, type TelemetryBusinessHubType, type Service, type TelemetrySapSystemType } from '../types';
1
+ import { ApiHubType, type TelemetryBusinessHubType, type TelemetrySapSystemType } from '../types';
2
+ import type { ConnectedSystem } from '@sap-ux/odata-service-inquirer';
2
3
  /**
3
4
  * Get the SAP system type as reported in telemetry events.
4
5
  *
5
6
  * @param connectedSystem
6
7
  * @returns
7
8
  */
8
- export declare function getTelemetrySapSystemType(connectedSystem: Service['connectedSystem']): TelemetrySapSystemType | undefined;
9
+ export declare function getTelemetrySapSystemType(connectedSystem: ConnectedSystem): TelemetrySapSystemType | undefined;
9
10
  /**
10
11
  * Get the business hub type as reported in telemetry events.
11
12
  *
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.0.21",
4
+ "version": "0.0.23",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -29,23 +29,23 @@
29
29
  "mem-fs-editor": "9.4.0",
30
30
  "uuid": "11.0.5",
31
31
  "yeoman-generator": "5.10.0",
32
- "@sap-ux/annotation-generator": "0.3.27",
32
+ "@sap-ux/annotation-generator": "0.3.28",
33
33
  "@sap-ux/axios-extension": "1.20.0",
34
- "@sap-ux/feature-toggle": "0.2.3",
35
- "@sap-ux/cap-config-writer": "0.9.28",
36
34
  "@sap-ux/btp-utils": "1.0.3",
37
- "@sap-ux/fiori-elements-writer": "2.3.2",
35
+ "@sap-ux/cap-config-writer": "0.9.28",
36
+ "@sap-ux/feature-toggle": "0.2.3",
37
+ "@sap-ux/fiori-elements-writer": "2.3.3",
38
+ "@sap-ux/fiori-freestyle-writer": "2.3.2",
38
39
  "@sap-ux/fiori-generator-shared": "0.11.2",
39
40
  "@sap-ux/fiori-tools-settings": "0.1.0",
40
41
  "@sap-ux/launch-config": "0.9.3",
42
+ "@sap-ux/odata-service-inquirer": "2.3.4",
41
43
  "@sap-ux/odata-service-writer": "0.26.16",
42
44
  "@sap-ux/project-access": "1.29.21",
43
45
  "@sap-ux/store": "1.0.0",
44
46
  "@sap-ux/telemetry": "0.5.77",
45
- "@sap-ux/odata-service-inquirer": "2.3.3",
46
47
  "@sap-ux/ui5-application-inquirer": "0.12.1",
47
- "@sap-ux/ui5-info": "0.9.1",
48
- "@sap-ux/fiori-freestyle-writer": "2.3.2"
48
+ "@sap-ux/ui5-info": "0.9.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@sap-devx/yeoman-ui-types": "1.16.9",
@@ -62,7 +62,7 @@
62
62
  "mock-spawn": "0.2.6",
63
63
  "rimraf": "5.0.5",
64
64
  "yeoman-test": "6.3.0",
65
- "@sap-ux/flp-config-sub-generator": "0.1.61",
65
+ "@sap-ux/flp-config-sub-generator": "0.1.62",
66
66
  "@sap-ux/inquirer-common": "0.6.39",
67
67
  "@sap-ux/jest-file-matchers": "0.2.1",
68
68
  "@sap-ux/logger": "0.6.0"