@sap-ux/repo-app-import-sub-generator 1.1.39 → 1.1.41
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.
package/generators/app/index.js
CHANGED
|
@@ -6,8 +6,7 @@ import { extractedFilePath, generatorName, defaultAnswers, qfaJsonFileName, down
|
|
|
6
6
|
import { t } from '../utils/i18n.js';
|
|
7
7
|
import { extractZip } from '../utils/download-utils.js';
|
|
8
8
|
import { EventName } from '../telemetryEvents/index.js';
|
|
9
|
-
import { getDefaultTargetFolder, generateAppGenInfo, sendTelemetry, TelemetryHelper, isCli, setYeomanEnvConflicterForce } from '@sap-ux/fiori-generator-shared';
|
|
10
|
-
import { getFloorplanLabel } from '@sap-ux/fiori-app-sub-generator';
|
|
9
|
+
import { getDefaultTargetFolder, generateAppGenInfo, sendTelemetry, TelemetryHelper, isCli, setYeomanEnvConflicterForce, getFloorplanLabel } from '@sap-ux/fiori-generator-shared';
|
|
11
10
|
import { AppDownloadType, PromptNames } from './types.js';
|
|
12
11
|
import { getPrompts } from '../prompts/prompts.js';
|
|
13
12
|
import { generate } from '@sap-ux/fiori-elements-writer';
|
|
@@ -111,11 +110,26 @@ export default class extends Generator {
|
|
|
111
110
|
* Writes the configuration files for the project, including deployment config, and README.
|
|
112
111
|
*/
|
|
113
112
|
async writing() {
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
try {
|
|
114
|
+
if (this.downloadType === AppDownloadType.AbapRepository) {
|
|
115
|
+
await this._generateAbapRepositoryApp();
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
await this._generateAdtQuickDeployApp();
|
|
119
|
+
}
|
|
116
120
|
}
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
catch (error) {
|
|
122
|
+
RepoAppDownloadLogger.logger?.error(t('error.writingPhase', { error: error instanceof Error ? error.message : String(error) }));
|
|
123
|
+
const failEvent = this.downloadType === AppDownloadType.AbapRepository
|
|
124
|
+
? EventName.ABAP_REPO_DOWNLOAD_FAIL
|
|
125
|
+
: EventName.ADT_QUICK_DEPLOY_DOWNLOAD_FAIL;
|
|
126
|
+
await sendTelemetry(failEvent, TelemetryHelper.createTelemetryData({
|
|
127
|
+
appType: generatorName,
|
|
128
|
+
...this.options.telemetryData
|
|
129
|
+
}) ?? {}).catch(() => {
|
|
130
|
+
// telemetry errors are non-fatal
|
|
131
|
+
});
|
|
132
|
+
throw error;
|
|
119
133
|
}
|
|
120
134
|
}
|
|
121
135
|
/**
|
|
@@ -319,8 +333,11 @@ export default class extends Generator {
|
|
|
319
333
|
try {
|
|
320
334
|
this.appWizard.showInformation(downloadTypeConfig[this.downloadType].generatorSuccessMsg, MessageType.notification);
|
|
321
335
|
await this._handlePostAppGeneration();
|
|
322
|
-
|
|
323
|
-
|
|
336
|
+
const successEvent = this.downloadType === AppDownloadType.AbapRepository
|
|
337
|
+
? EventName.ABAP_REPO_DOWNLOAD_SUCCESS
|
|
338
|
+
: EventName.ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS;
|
|
339
|
+
await sendTelemetry(successEvent, TelemetryHelper.createTelemetryData({
|
|
340
|
+
appType: generatorName,
|
|
324
341
|
...this.options.telemetryData
|
|
325
342
|
}) ?? {}).catch((error) => {
|
|
326
343
|
RepoAppDownloadLogger.logger?.error(t('error.telemetry', { error: error.message }));
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Event names for telemetry for the generator when downloading an app from repository
|
|
3
3
|
*/
|
|
4
4
|
export declare enum EventName {
|
|
5
|
-
|
|
5
|
+
ABAP_REPO_DOWNLOAD_SUCCESS = "ABAP_REPO_DOWNLOAD_SUCCESS",
|
|
6
|
+
ABAP_REPO_DOWNLOAD_FAIL = "ABAP_REPO_DOWNLOAD_FAIL",
|
|
7
|
+
ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS = "ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS",
|
|
8
|
+
ADT_QUICK_DEPLOY_DOWNLOAD_FAIL = "ADT_QUICK_DEPLOY_DOWNLOAD_FAIL"
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export var EventName;
|
|
5
5
|
(function (EventName) {
|
|
6
|
-
EventName["
|
|
6
|
+
EventName["ABAP_REPO_DOWNLOAD_SUCCESS"] = "ABAP_REPO_DOWNLOAD_SUCCESS";
|
|
7
|
+
EventName["ABAP_REPO_DOWNLOAD_FAIL"] = "ABAP_REPO_DOWNLOAD_FAIL";
|
|
8
|
+
EventName["ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS"] = "ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS";
|
|
9
|
+
EventName["ADT_QUICK_DEPLOY_DOWNLOAD_FAIL"] = "ADT_QUICK_DEPLOY_DOWNLOAD_FAIL";
|
|
7
10
|
})(EventName || (EventName = {}));
|
|
8
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"metadataFetchError": "An error occurred when fetching metadata: {{- error}}. For more information, view the logs.",
|
|
8
8
|
"appConfigGenError": "An error occurred when generating the application configuration: {{- error}}. For more information, view the logs.",
|
|
9
9
|
"endPhase": "An error occurred in the end phase: {{- error}}. For more information, view the logs.",
|
|
10
|
+
"writingPhase": "An error occurred in the writing phase: {{- error}}. For more information, view the logs.",
|
|
10
11
|
"errorProcessingJsonFile": "An error occurred when processing the JSON file: {{- error}}. Check the file is valid.",
|
|
11
12
|
"noAppsDeployed": "No applications deployed to this system can be downloaded.",
|
|
12
13
|
"validationErrors": {
|
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.
|
|
4
|
+
"version": "1.1.41",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -26,13 +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.0
|
|
30
|
-
"@sap-ux/inquirer-common": "1.0.
|
|
29
|
+
"@sap-ux/fiori-generator-shared": "1.1.0",
|
|
30
|
+
"@sap-ux/inquirer-common": "1.0.22",
|
|
31
31
|
"@sap-ux/project-access": "2.1.6",
|
|
32
|
-
"@sap-ux/odata-service-inquirer": "3.0.
|
|
33
|
-
"@sap-ux/fiori-elements-writer": "3.0.
|
|
34
|
-
"@sap-ux/fiori-freestyle-writer": "3.0.
|
|
35
|
-
"@sap-ux/fiori-app-sub-generator": "1.1.7",
|
|
32
|
+
"@sap-ux/odata-service-inquirer": "3.0.24",
|
|
33
|
+
"@sap-ux/fiori-elements-writer": "3.0.57",
|
|
34
|
+
"@sap-ux/fiori-freestyle-writer": "3.0.51",
|
|
36
35
|
"@sap-ux/logger": "1.0.3",
|
|
37
36
|
"@sap-ux/project-input-validator": "1.0.10",
|
|
38
37
|
"@sap-ux/launch-config": "1.0.12",
|