@sap-ux/fiori-app-sub-generator 1.3.97 → 1.4.2

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.
@@ -1,10 +1,10 @@
1
1
  import { OdataVersion } from '@sap-ux/fiori-elements-writer';
2
- import { getCapFolderPathsSync } from '@sap-ux/fiori-generator-shared';
2
+ import { ApiHubType, getCapFolderPathsSync } from '@sap-ux/fiori-generator-shared';
3
3
  import { DatasourceType } from '@sap-ux/odata-service-inquirer';
4
4
  import { promptNames } from '@sap-ux/ui5-application-inquirer';
5
5
  import { getDefaultUI5Theme, supportedUi5VersionFallbacks } from '@sap-ux/ui5-info';
6
6
  import { join } from 'node:path';
7
- import { ApiHubType, FloorplanFE, FloorplanFF, capTypeConversion, defaultPromptValues } from '../types/index.js';
7
+ import { FloorplanFE, FloorplanFF, capTypeConversion, defaultPromptValues } from '../types/index.js';
8
8
  import { getODataVersion, t } from '../utils/index.js';
9
9
  const APP_CONFIG_CURRENT_VERSION = '0.2';
10
10
  /**
@@ -1,12 +1,11 @@
1
1
  import type { AppWizard } from '@sap-devx/yeoman-ui-types';
2
2
  import type { CapService } from '@sap-ux/cap-config-writer';
3
3
  import type { OdataVersion } from '@sap-ux/fiori-elements-writer';
4
- import type { ILogWrapper } from '@sap-ux/fiori-generator-shared';
4
+ import type { ApiHubConfig, ILogWrapper } from '@sap-ux/fiori-generator-shared';
5
5
  import type { Logger } from '@sap-ux/logger';
6
6
  import type { DatasourceType } from '@sap-ux/odata-service-inquirer';
7
7
  import { type BackendSystem } from '@sap-ux/store';
8
8
  import type { Editor } from 'mem-fs-editor';
9
- import type { ApiHubConfig } from '../types/index.js';
10
9
  /**
11
10
  * FioriBaseGeneratror end phase related functionality.
12
11
  *
@@ -1,9 +1,8 @@
1
1
  import { MessageType } from '@sap-devx/yeoman-ui-types';
2
2
  import { isAppStudio } from '@sap-ux/btp-utils';
3
- import { getHostEnvironment, hostEnvironment, sendTelemetry, TelemetryHelper } from '@sap-ux/fiori-generator-shared';
3
+ import { ApiHubType, getHostEnvironment, hostEnvironment, sendTelemetry, TelemetryHelper } from '@sap-ux/fiori-generator-shared';
4
4
  import { ApiHubSettings, getService } from '@sap-ux/store';
5
5
  import { join } from 'node:path';
6
- import { ApiHubType } from '../types/index.js';
7
6
  import { buildSapClientParam, generateLaunchConfig, runHooks, t } from '../utils/index.js';
8
7
  /**
9
8
  * Save API Hub key to the store.
@@ -1,6 +1,6 @@
1
- import type { AppGenInfo } from '@sap-ux/fiori-generator-shared';
1
+ import type { AppGenInfo, ApiHubConfig } from '@sap-ux/fiori-generator-shared';
2
2
  import type { Editor } from 'mem-fs-editor';
3
- import type { ApiHubConfig, State } from '../types/index.js';
3
+ import type { State } from '../types/index.js';
4
4
  /**
5
5
  * Writes app related information files - README.md & .appGenInfo.json.
6
6
  * The files are based on the project, service, and additional properties.
@@ -2,13 +2,6 @@ import type { DatasourceType, OdataServicePromptOptions, OdataVersion } from '@s
2
2
  import type { UI5ApplicationPromptOptions } from '@sap-ux/ui5-application-inquirer';
3
3
  import type { FLPConfigPromptOptions } from '@sap-ux/flp-config-sub-generator';
4
4
  import type { DeployConfigSubGenPromptOptions } from '@sap-ux/deploy-config-sub-generator';
5
- /**
6
- * package.json script entries (commands and tasks)
7
- */
8
- export type Script = {
9
- name: string;
10
- command: string;
11
- };
12
5
  /**
13
6
  * workspace folder
14
7
  */
@@ -28,10 +28,6 @@ export declare const UI5_VERSION_PROPS: {
28
28
  export declare const SAP_CLIENT_KEY = "sap-client";
29
29
  export declare const API_HUB_API_KEY = "API_HUB_API_KEY";
30
30
  export declare const API_HUB_TYPE = "API_HUB_TYPE";
31
- export declare const enum ApiHubType {
32
- apiHub = "API_HUB",
33
- apiHubEnterprise = "API_HUB_ENTERPRISE"
34
- }
35
31
  export declare const STEP_FLOORPLAN = "FLOORPLAN";
36
32
  export declare const STEP_DATASOURCE_AND_SERVICE = "DATASOURCE_AND_SERVICE";
37
33
  export declare const STEP_ENTITY = "ENTITY";
@@ -29,11 +29,6 @@ export const UI5_VERSION_PROPS = {
29
29
  export const SAP_CLIENT_KEY = 'sap-client';
30
30
  export const API_HUB_API_KEY = 'API_HUB_API_KEY';
31
31
  export const API_HUB_TYPE = 'API_HUB_TYPE';
32
- export var ApiHubType;
33
- (function (ApiHubType) {
34
- ApiHubType["apiHub"] = "API_HUB";
35
- ApiHubType["apiHubEnterprise"] = "API_HUB_ENTERPRISE";
36
- })(ApiHubType || (ApiHubType = {}));
37
32
  export const STEP_FLOORPLAN = 'FLOORPLAN';
38
33
  export const STEP_DATASOURCE_AND_SERVICE = 'DATASOURCE_AND_SERVICE';
39
34
  export const STEP_ENTITY = 'ENTITY';
@@ -1,52 +1,23 @@
1
1
  import type { AuthenticationType } from '@sap-ux/store';
2
- import type { Annotations, ExternalService } from '@sap-ux/axios-extension';
2
+ import type { ExternalService } from '@sap-ux/axios-extension';
3
3
  import type { CapServiceCdsInfo } from '@sap-ux/cap-config-writer';
4
- import type { CdsUi5PluginInfo, UI5FlexLayer } from '@sap-ux/project-access';
4
+ import type { CdsUi5PluginInfo } from '@sap-ux/project-access';
5
5
  import type { TableSelectionMode } from '@sap-ux/fiori-elements-writer';
6
6
  import type { CapService, DatasourceType, EntityRelatedAnswers, OdataServiceAnswers, OdataVersion } from '@sap-ux/odata-service-inquirer';
7
- import type { ApiHubType, SapSystemSourceType } from '../types/constants.js';
8
- import type { Script } from './common.js';
9
- import type { AppGenInfo, Floorplan } from '@sap-ux/fiori-generator-shared';
10
- export interface Project {
11
- targetFolder: string;
12
- addDeployConfig?: boolean;
13
- addFlpConfig?: boolean;
14
- name: string;
15
- namespace?: string;
16
- title: string;
17
- description: string;
7
+ import type { SapSystemSourceType } from '../types/constants.js';
8
+ import type { AppGenInfo, BaseProject, BaseService, Floorplan } from '@sap-ux/fiori-generator-shared';
9
+ export interface Project extends BaseProject {
18
10
  enableVirtualEndpoints?: boolean;
19
- ui5Theme: string;
20
- ui5Version: string;
21
- ui5FrameworkUrl?: string;
22
- localUI5Version: string;
23
- sapux?: boolean;
24
- skipAnnotations?: boolean;
25
- enableEslint?: boolean;
26
- enableTypeScript?: boolean;
27
- formEntry?: boolean;
28
- flpAppId?: string;
29
- minSupportedUI5Version?: string;
30
- manifestMinUI5Version?: string;
31
11
  addCdsUi5Plugin?: boolean;
32
12
  }
33
- export interface Credentials {
34
- username: string;
35
- password?: string;
36
- }
37
13
  /**
38
14
  * Fiori sub app generators internal representation of a service.
39
15
  * May be possible to replace this type with `@sap-ux/odata-service-inquirer` `service` type in future.
40
16
  *
41
17
  */
42
- export interface Service {
43
- host?: string;
44
- client?: string;
18
+ export interface Service extends BaseService {
45
19
  destinationName?: string;
46
- servicePath?: string;
47
20
  serviceId?: string;
48
- edmx?: string;
49
- annotations?: Annotations[];
50
21
  version?: OdataVersion;
51
22
  /**
52
23
  * While the required type `CapServiceCdsInfo` mandates `cdsUi5PluginInfo` when writing to cap config, this information is not intially available.
@@ -57,7 +28,6 @@ export interface Service {
57
28
  };
58
29
  source: DatasourceType;
59
30
  sapSystemSource?: SapSystemSourceType;
60
- localEdmxFilePath?: string;
61
31
  /**
62
32
  * Connected system information, used for preview settings and deploy configurations
63
33
  */
@@ -66,11 +36,6 @@ export interface Service {
66
36
  * Only used by adaptors to specify the authentication type, use `connectedSystem.destination.Authentication` instead
67
37
  */
68
38
  destinationAuthType?: string;
69
- apiHubConfig?: ApiHubConfig;
70
- ignoreCertError?: boolean;
71
- /**
72
- * Value list references for the service when the user opts to download value helps.
73
- */
74
39
  /**
75
40
  * Downloaded external service metadata including value helps with their metadata content.
76
41
  * Populated when user opts to download value help metadata during generation.
@@ -84,38 +49,9 @@ export interface Service {
84
49
  authenticationType?: AuthenticationType;
85
50
  };
86
51
  }
87
- /**
88
- * Defines the api hub service properties or enterprise and non-enterprise versions
89
- */
90
- export interface ApiHubConfig {
91
- apiHubKey: string;
92
- apiHubType: ApiHubType;
93
- }
94
52
  export interface CapServiceCdsInfoInternal extends CapService {
95
53
  capCdsInfo?: CdsUi5PluginInfo;
96
54
  }
97
- /** package.json interface */
98
- export interface PackageJson {
99
- name: string;
100
- description: string;
101
- startCommand: string;
102
- startLocalCommand: string;
103
- startNoFlpCommand: string;
104
- startVariantsCommand: string;
105
- addMockCommand?: boolean;
106
- sapClientParam?: string;
107
- flpAppId?: string;
108
- devDependencies: {
109
- [key: string]: string;
110
- };
111
- ui5Dependencies: string[];
112
- sapux?: boolean;
113
- startFile?: string;
114
- localStartFile?: string;
115
- runTasks?: Script[];
116
- enableEslint: boolean;
117
- sapuxLayer?: UI5FlexLayer;
118
- }
119
55
  export interface State {
120
56
  project: Project;
121
57
  service: Service;
@@ -6,7 +6,7 @@ import type { CdsAnnotationsInfo, EdmxAnnotationsInfo } from '@sap-ux/odata-serv
6
6
  import type { CapProjectType, CdsUi5PluginInfo, CdsVersionInfo } from '@sap-ux/project-access';
7
7
  import type { Editor } from 'mem-fs-editor';
8
8
  import type { GenerateLaunchConfigOptions, Service } from '../types/index.js';
9
- import { ApiHubType } from '../types/index.js';
9
+ import { ApiHubType } from '@sap-ux/fiori-generator-shared';
10
10
  import { type Floorplan } from '../types/external.js';
11
11
  /**
12
12
  * Parse the specified edmx string for validitiy and return the ODataVersion of the specified edmx string.
@@ -10,7 +10,8 @@ import { DatasourceType, OdataVersion } from '@sap-ux/odata-service-inquirer';
10
10
  import { isCapJavaProject, toReferenceUri } from '@sap-ux/project-access';
11
11
  import { basename, join } from 'node:path';
12
12
  import { v4 as uuidV4 } from 'uuid';
13
- import { ApiHubType, SapSystemSourceType, FloorplanFE } from '../types/index.js';
13
+ import { ApiHubType } from '@sap-ux/fiori-generator-shared';
14
+ import { SapSystemSourceType, FloorplanFE } from '../types/index.js';
14
15
  import { minSupportedUi5Version, minSupportedUi5VersionV4 } from '../types/constants.js';
15
16
  import { FloorplanAttributes, FloorplanFF } from '../types/external.js';
16
17
  import { t } from './i18n.js';
@@ -1,4 +1,5 @@
1
- import { ApiHubType, type TelemetryBusinessHubType, type TelemetrySapSystemType } from '../types/index.js';
1
+ import { ApiHubType } from '@sap-ux/fiori-generator-shared';
2
+ import type { TelemetryBusinessHubType, TelemetrySapSystemType } from '../types/index.js';
2
3
  import type { ConnectedSystem } from '@sap-ux/odata-service-inquirer';
3
4
  /**
4
5
  * Get the SAP system type as reported in telemetry events.
@@ -1,5 +1,5 @@
1
1
  import { isOnPremiseDestination } from '@sap-ux/btp-utils';
2
- import { ApiHubType } from '../types/index.js';
2
+ import { ApiHubType } from '@sap-ux/fiori-generator-shared';
3
3
  import { isAbapCloud } from './common.js';
4
4
  /**
5
5
  * Get the SAP system type as reported in telemetry events.
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": "1.3.97",
4
+ "version": "1.4.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -33,21 +33,21 @@
33
33
  "@sap-ux/annotation-generator": "1.0.36",
34
34
  "@sap-ux/axios-extension": "2.1.6",
35
35
  "@sap-ux/btp-utils": "2.0.8",
36
- "@sap-ux/cap-config-writer": "1.0.49",
36
+ "@sap-ux/cap-config-writer": "1.0.50",
37
37
  "@sap-ux/fe-fpm-writer": "1.4.0",
38
38
  "@sap-ux/feature-toggle": "1.0.5",
39
- "@sap-ux/fiori-elements-writer": "3.1.95",
40
- "@sap-ux/fiori-freestyle-writer": "3.0.137",
41
- "@sap-ux/fiori-generator-shared": "1.2.27",
39
+ "@sap-ux/fiori-elements-writer": "3.1.98",
40
+ "@sap-ux/fiori-freestyle-writer": "3.0.140",
41
+ "@sap-ux/fiori-generator-shared": "1.3.0",
42
42
  "@sap-ux/fiori-tools-settings": "1.1.1",
43
43
  "@sap-ux/launch-config": "1.0.28",
44
- "@sap-ux/odata-service-inquirer": "3.2.31",
44
+ "@sap-ux/odata-service-inquirer": "3.2.32",
45
45
  "@sap-ux/odata-service-writer": "1.0.29",
46
46
  "@sap-ux/project-access": "2.3.4",
47
47
  "@sap-ux/project-input-validator": "1.0.27",
48
48
  "@sap-ux/store": "2.0.8",
49
49
  "@sap-ux/telemetry": "2.0.15",
50
- "@sap-ux/ui5-application-inquirer": "1.0.54",
50
+ "@sap-ux/ui5-application-inquirer": "1.0.55",
51
51
  "@sap-ux/ui5-info": "1.0.7"
52
52
  },
53
53
  "devDependencies": {
@@ -66,9 +66,9 @@
66
66
  "mock-spawn": "0.2.6",
67
67
  "rimraf": "6.1.3",
68
68
  "yeoman-test": "6.3.0",
69
- "@sap-ux/deploy-config-sub-generator": "1.0.90",
70
- "@sap-ux/flp-config-sub-generator": "1.0.81",
71
- "@sap-ux/inquirer-common": "1.0.53",
69
+ "@sap-ux/deploy-config-sub-generator": "1.0.91",
70
+ "@sap-ux/flp-config-sub-generator": "1.0.82",
71
+ "@sap-ux/inquirer-common": "1.0.54",
72
72
  "@sap-ux/jest-file-matchers": "1.0.4",
73
73
  "@sap-ux/logger": "1.0.3"
74
74
  },