@sap-ux/repo-app-import-sub-generator 0.1.3 → 0.1.5

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.
@@ -13,6 +13,7 @@ const prompt_state_1 = require("../prompts/prompt-state");
13
13
  const logger_1 = __importDefault(require("../utils/logger"));
14
14
  const project_access_1 = require("@sap-ux/project-access");
15
15
  const path_1 = require("path");
16
+ const ui5_info_1 = require("@sap-ux/ui5-info");
16
17
  /**
17
18
  * Generates the deployment configuration for an ABAP application.
18
19
  *
@@ -74,6 +75,9 @@ async function getAppConfig(app, extractedProjectPath, qfaJson, fs) {
74
75
  : odata_service_inquirer_1.OdataVersion.v2;
75
76
  // Fetch metadata for the service
76
77
  const metadata = await fetchServiceMetadata(serviceProvider, manifest?.['sap.app']?.dataSources?.mainService.uri ?? '');
78
+ // Fetch latest UI5 versions from npm
79
+ const ui5Versions = await (0, ui5_info_1.getUI5Versions)({ onlyNpmVersion: true });
80
+ const localVersion = ui5Versions[0]?.version;
77
81
  const appConfig = {
78
82
  app: {
79
83
  id: app.appId,
@@ -109,6 +113,9 @@ async function getAppConfig(app, extractedProjectPath, qfaJson, fs) {
109
113
  appOptions: {
110
114
  addAnnotations: odataVersion === odata_service_inquirer_1.OdataVersion.v4,
111
115
  addTests: true
116
+ },
117
+ ui5: {
118
+ localVersion
112
119
  }
113
120
  };
114
121
  return appConfig;
@@ -1,62 +1,65 @@
1
1
  {
2
2
  "error": {
3
- "telemetry": "Failed to send telemetry data after downloading app from UI5 ABAP Repository. {{- error}}",
4
- "qfaJsonNotFound": "{{- jsonFileName }} not found in the downloaded app",
5
- "replaceWebappFilesError": "Error replacing files in the downloaded app: {{- error}}",
6
- "requiredFieldsMissing": "Required fields are missing for app: {{- app }}. Check if the app is deployed correctly",
7
- "applicationListFetchError": "Error fetching application list: {{- error}}",
8
- "metadataFetchError": "Error fetching metadata: {{- error}}",
9
- "appConfigGenError": "Error generating application configuration: {{- error}}",
10
- "endPhase": "Error in end phase: {{- error}}",
11
- "errorProcessingJsonFile": "Error processing JSON file: {{- error}}",
3
+ "telemetry": "Failed to send telemetry data after downloading the application from the SAPUI5 ABAP Repository. {{- error}}",
4
+ "qfaJsonNotFound": "{{- jsonFileName }} not found in the downloaded application. Check the file exists.",
5
+ "replaceWebappFilesError": "An error occurred when replacing files in the downloaded application: {{- error}}. For more information, view the logs.",
6
+ "requiredFieldsMissing": "Required fields are missing for the {{- app }} application. Check if the application is deployed correctly.",
7
+ "applicationListFetchError": "An error occurred when fetching the application list: {{- error}}. Check if your application is available in the system.",
8
+ "metadataFetchError": "An error occurred when fetching metadata: {{- error}}. For more information, view the logs.",
9
+ "appConfigGenError": "An error occurred when generating the application configuration: {{- error}}. For more information, view the logs.",
10
+ "endPhase": "An error occurred in the end phase: {{- error}}. For more information, view the logs.",
11
+ "errorProcessingJsonFile": "An error occurred when processing the JSON file: {{- error}}. Check the file is valid.",
12
12
  "noAppsDeployed": "No applications deployed to this system can be downloaded.",
13
13
  "validationErrors": {
14
- "invalidMetadataPackage": "Invalid or missing package in metadata",
15
- "invalidServiceName": "Invalid or missing serviceName in serviceBindingDetails",
16
- "invalidServiceVersion": "Invalid or missing serviceVersion in serviceBindingDetails",
17
- "invalidMainEntityName": "Invalid or missing mainEntityName in serviceBindingDetails",
18
- "invalidModuleName": "Invalid or missing moduleName in serviceBindingDetails",
19
- "invalidRepositoryName": "Invalid or missing repositoryName in serviceBindingDetails"
14
+ "invalidMetadataPackage": "Invalid or missing package in the metadata. Check the metadata.",
15
+ "invalidServiceName": "Invalid or missing `serviceName` in `serviceBindingDetails`. Check the `serviceName`.",
16
+ "invalidServiceVersion": "Invalid or missing `serviceVersion` in `serviceBindingDetails`. Check the `serviceVersion`.",
17
+ "invalidMainEntityName": "Invalid or missing `mainEntityName` in `serviceBindingDetails`. Check the `mainEntityName`.",
18
+ "invalidModuleName": "Invalid or missing `moduleName` in serviceBindingDetails. Check the `moduleName`.",
19
+ "invalidRepositoryName": "Invalid or missing `repositoryName` in `serviceBindingDetails`. Check the `repositoryName`."
20
20
  },
21
21
  "installationErrors": {
22
- "npmInstall": "Error in install phase: {{- error}}",
23
- "skippedInstallation": "Option `--skipInstall` was specified. Installation of dependencies will be skipped."
22
+ "npmInstall": "An error occurred in the install phase: {{- error}}. For more information, view the logs.",
23
+ "skippedInstallation": "`--skipInstall` option was specified. Installation of dependencies will be skipped."
24
24
  },
25
25
  "appDownloadErrors": {
26
- "downloadedFileNotBufferError": "Error: The downloaded file is not a Buffer.",
27
- "appDownloadFailure": "Error downloading app: {{- error}}",
28
- "zipExtractionError": "Error extracting zip: {{- error}}"
26
+ "downloadedFileNotBufferError": "Error: The downloaded file is not a buffer. Check the file.",
27
+ "appDownloadFailure": "An error occurred when downloading the application: {{- error}}. For more information, view the logs.",
28
+ "zipExtractionError": "An error occurred when extracting the zip file: {{- error}}. For more information, view the logs."
29
29
  },
30
30
  "eventHookErrors": {
31
- "vscodeInstanceMissing": "Error: Missing VSCode instance in event hook",
32
- "postGenCommandMissing": "Error: Missing postGenCommand in event hook",
33
- "commandExecutionFailed": "Error executing postGenCommand in event hook: {{- error}}"
31
+ "vscodeInstanceMissing": "Error: Missing VS Code instance in event hook.",
32
+ "postGenCommandMissing": "Error: Missing `postGenCommand` in event hook.",
33
+ "commandExecutionFailed": "Error executing `postGenCommand` in event hook: {{- error}}"
34
34
  },
35
35
  "readManifestErrors": {
36
- "manifestFileNotFound": "Error: Manifest file not found in the downloaded app",
37
- "readManifestFailed": "Error: Failed to read manifest file",
38
- "sapAppNotDefined": "Error: sap.app not defined in the manifest file",
39
- "sourceTemplateNotSupported": "Error: Source template not supported",
40
- "invalidManifestStructureError": "Invalid manifest structure: 'sap.ui5' or 'sap.app' are missing."
36
+ "manifestFileNotFound": "Error: `manifest.json` file not found in the downloaded application. Check the file exists.",
37
+ "readManifestFailed": "Error: Failed to read the `manifest.json` file. Check the file is valid.",
38
+ "sapAppNotDefined": "Error: `sap.app` not defined in the `manifest.json` file. Check `sap.app` is defined.",
39
+ "sourceTemplateNotSupported": "Error: Source template not supported. Use a supported template.",
40
+ "invalidManifestStructureError": "Invalid `manifest.json file` structure: `sap.ui5` or `sap.app` are missing. Check they exist."
41
+ },
42
+ "quickDeployedAppDownloadErrors": {
43
+ "noAppsFound": "No application with id {{ appId }} found in the system. Please check if the application is deployed correctly or select another app"
41
44
  }
42
45
  },
43
46
  "warn": {
44
- "extractedFileNotFound": "Extracted file not found - {{- extractedFilePath}}"
47
+ "extractedFileNotFound": "Extracted file not found - {{- extractedFilePath}}. For more information, view the logs."
45
48
  },
46
49
  "prompts": {
47
50
  "appSelection": {
48
- "message": "App",
49
- "hint": "Select the app to download",
50
- "breadcrumb": "App"
51
+ "message": "Application",
52
+ "hint": "Select the application to download.",
53
+ "breadcrumb": "Application"
51
54
  },
52
55
  "targetPath": {
53
- "message": "Project folder path",
56
+ "message": "Project Folder Path",
54
57
  "breadcrumb": "Project Path"
55
58
  }
56
59
  },
57
60
  "readMe": {
58
- "appDescription": "This application was converted from a SAP Fiori app that was deployed from ADT using the ADT Quick Fiori Application generator",
59
- "launchText": "In order to launch the generated app, simply run the following from the generated app root folder:\n\n```\n npm start\n```"
61
+ "appDescription": "This application was converted from an SAP Fiori application that was deployed from ADT using the ADT Quick Fiori Application generator.",
62
+ "launchText": "To launch the generated application, run the following command from the generated app root folder:\n\n```\n npm start\n```"
60
63
  },
61
64
  "info": {
62
65
  "repoAppDownloadCompleteMsg": "The selected application has been downloaded and updated to support SAP Fiori tools."
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": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,21 +25,21 @@
25
25
  "inquirer": "8.2.6",
26
26
  "yeoman-generator": "5.10.0",
27
27
  "@sap-ux/feature-toggle": "0.2.3",
28
- "@sap-ux/fiori-generator-shared": "0.10.2",
29
28
  "@sap-ux/inquirer-common": "0.6.36",
29
+ "@sap-ux/fiori-generator-shared": "0.10.2",
30
30
  "@sap-ux/project-access": "1.29.18",
31
31
  "@sap-ux/odata-service-inquirer": "2.2.36",
32
- "@sap-ux/fiori-elements-writer": "2.1.40",
33
32
  "@sap-ux/logger": "0.6.0",
33
+ "@sap-ux/fiori-elements-writer": "2.1.40",
34
34
  "@sap-ux/project-input-validator": "0.5.1",
35
35
  "@sap-ux/launch-config": "0.8.1",
36
36
  "@sap-ux/fiori-tools-settings": "0.1.0",
37
- "@sap-ux/abap-deploy-config-writer": "0.0.103",
38
37
  "@sap-ux/btp-utils": "1.0.3",
39
38
  "@sap-ux/ui5-info": "0.9.1",
39
+ "@sap-ux/abap-deploy-config-writer": "0.0.103",
40
40
  "@sap-ux/axios-extension": "1.20.0",
41
- "@sap-ux/store": "1.0.0",
42
- "@sap-ux/guided-answers-helper": "0.2.2"
41
+ "@sap-ux/guided-answers-helper": "0.2.2",
42
+ "@sap-ux/store": "1.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@jest/types": "29.6.3",