@sap-ux/repo-app-import-sub-generator 1.1.44 → 1.2.0

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.
@@ -216,7 +216,9 @@ export default class extends Generator {
216
216
  generatorName: generatorName,
217
217
  generatorVersion: this.rootGeneratorVersion(),
218
218
  ui5Version: config.ui5?.version ?? '',
219
- template: getFloorplanLabel(config.template.type, config.service.version),
219
+ template: config.template.type
220
+ ? getFloorplanLabel(config.template.type, config.service.version)
221
+ : 'unknown',
220
222
  serviceUrl: config.service.url,
221
223
  launchText: t('readMe.launchText')
222
224
  };
@@ -1,6 +1,6 @@
1
1
  import type Generator from 'yeoman-generator';
2
2
  import type { AppWizard } from '@sap-devx/yeoman-ui-types';
3
- import type { VSCodeInstance, TelemetryData, LogWrapper } from '@sap-ux/fiori-generator-shared';
3
+ import type { VSCodeInstance, TelemetryData, LogWrapper, Floorplan } from '@sap-ux/fiori-generator-shared';
4
4
  import type { AppIndex, AbapServiceProvider } from '@sap-ux/axios-extension';
5
5
  import type { OdataServiceAnswers, OdataVersion } from '@sap-ux/odata-service-inquirer';
6
6
  import type { YUIQuestion } from '@sap-ux/inquirer-common';
@@ -23,7 +23,7 @@ export interface AbapRepoAppConfig {
23
23
  version: string;
24
24
  };
25
25
  template: {
26
- type: string;
26
+ type: Floorplan | undefined;
27
27
  };
28
28
  }
29
29
  /**
@@ -80,7 +80,9 @@ export async function getPrompts(appRootPath, quickDeployedAppConfig, appWizard,
80
80
  serviceSelection: { hide: true, useAutoComplete: isCli },
81
81
  systemSelection: {
82
82
  defaultChoice: quickDeployedAppConfig?.serviceProviderInfo?.name,
83
- hideNewSystem: true
83
+ hideNewSystem: true,
84
+ destinationFilters: { odata_abap: true },
85
+ backendSystemFilter: { connectionType: ['abap_catalog'] }
84
86
  }
85
87
  }, !isCli);
86
88
  let appList = [];
@@ -1,6 +1,7 @@
1
1
  import type { Editor } from 'mem-fs-editor';
2
2
  import type { QfaJsonConfig, AbapRepoAppConfig } from '../app/types.js';
3
3
  import { type Manifest } from '@sap-ux/project-access';
4
+ import type { Floorplan } from '@sap-ux/fiori-generator-shared';
4
5
  /**
5
6
  *
6
7
  * @param filePath - Path to the JSON file
@@ -34,12 +35,12 @@ export declare function cleanupArtifacts(extractedProjectPath: string, fs: Edito
34
35
  */
35
36
  export declare function addPackageJsonIfNotFound(projectPath: string, appConfig: AbapRepoAppConfig, fs: Editor): void;
36
37
  /**
37
- * Derives the template type string from a manifest's sourceTemplate id.
38
+ * Derives the template type from a manifest's sourceTemplate id.
38
39
  * Returns the suffix after `@sap/generator-fiori:` (e.g. `lrop`, `fpm`),
39
- * or `'unknown'` if the id is absent or is not a fiori generated app.
40
+ * or `undefined` if the id is absent or not a recognised fiori template.
40
41
  *
41
42
  * @param {Manifest} manifest - The parsed manifest object.
42
- * @returns {string} The template type string.
43
+ * @returns {Floorplan | undefined} The template type, or `undefined` if unrecognised.
43
44
  */
44
- export declare function getTemplateTypeFromManifest(manifest: Manifest): string;
45
+ export declare function getTemplateTypeFromManifest(manifest: Manifest): Floorplan | undefined;
45
46
  //# sourceMappingURL=file-helpers.d.ts.map
@@ -99,25 +99,24 @@ export function addPackageJsonIfNotFound(projectPath, appConfig, fs) {
99
99
  }
100
100
  }
101
101
  /**
102
- * Derives the template type string from a manifest's sourceTemplate id.
102
+ * Derives the template type from a manifest's sourceTemplate id.
103
103
  * Returns the suffix after `@sap/generator-fiori:` (e.g. `lrop`, `fpm`),
104
- * or `'unknown'` if the id is absent or is not a fiori generated app.
104
+ * or `undefined` if the id is absent or not a recognised fiori template.
105
105
  *
106
106
  * @param {Manifest} manifest - The parsed manifest object.
107
- * @returns {string} The template type string.
107
+ * @returns {Floorplan | undefined} The template type, or `undefined` if unrecognised.
108
108
  */
109
109
  export function getTemplateTypeFromManifest(manifest) {
110
110
  const sourceTemplateId = manifest?.['sap.app']?.sourceTemplate?.id ?? '';
111
111
  const fioriGeneratorPrefix = '@sap/generator-fiori:';
112
- // set of all known @sap/generator-fiori template suffixes for validating sourceTemplate.id in manifest.json.
113
112
  const knownTemplates = new Set([
114
113
  ...Object.values(FioriElementsTemplateType),
115
114
  ...Object.values(FioriFreestyleTemplateType)
116
115
  ]);
117
116
  if (!sourceTemplateId.startsWith(fioriGeneratorPrefix)) {
118
- return 'unknown';
117
+ return undefined;
119
118
  }
120
119
  const suffix = sourceTemplateId.slice(fioriGeneratorPrefix.length);
121
- return knownTemplates.has(suffix) ? suffix : 'unknown';
120
+ return knownTemplates.has(suffix) ? suffix : undefined;
122
121
  }
123
122
  //# sourceMappingURL=file-helpers.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/repo-app-import-sub-generator",
3
3
  "description": "Generator to download LROP Fiori applications deployed from an ABAP repository.",
4
- "version": "1.1.44",
4
+ "version": "1.2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -26,12 +26,12 @@
26
26
  "inquirer": "8.2.7",
27
27
  "yeoman-generator": "5.10.0",
28
28
  "@sap-ux/feature-toggle": "1.0.5",
29
- "@sap-ux/fiori-generator-shared": "1.1.0",
30
- "@sap-ux/inquirer-common": "1.0.22",
29
+ "@sap-ux/fiori-generator-shared": "1.2.0",
30
+ "@sap-ux/inquirer-common": "1.0.23",
31
31
  "@sap-ux/project-access": "2.1.6",
32
- "@sap-ux/odata-service-inquirer": "3.0.25",
33
- "@sap-ux/fiori-elements-writer": "3.0.59",
34
- "@sap-ux/fiori-freestyle-writer": "3.0.52",
32
+ "@sap-ux/odata-service-inquirer": "3.1.0",
33
+ "@sap-ux/fiori-elements-writer": "3.0.60",
34
+ "@sap-ux/fiori-freestyle-writer": "3.0.53",
35
35
  "@sap-ux/logger": "1.0.3",
36
36
  "@sap-ux/project-input-validator": "1.0.10",
37
37
  "@sap-ux/launch-config": "1.0.12",