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

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.
@@ -323,8 +323,11 @@ export default class extends Generator {
323
323
  await runPostAppGenHook({
324
324
  path: this.projectPath,
325
325
  vscodeInstance: this.vscode,
326
- postGenCommand: this.options.data?.postGenCommand,
327
- deployConfig: this.deployConfig
326
+ postGenCommand: this.options.data?.postGenCommand ?? '',
327
+ deployConfig: this.deployConfig,
328
+ ...(this.downloadType === AppDownloadType.AbapRepository && {
329
+ migrationTelemetryEvent: EventName.ABAP_REPO_DOWNLOAD_MIGRATION_COMPLETED
330
+ })
328
331
  });
329
332
  }
330
333
  }
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * Event names for telemetry for the generator when downloading an app from repository
3
3
  */
4
- export declare enum EventName {
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"
9
- }
4
+ export declare const EventName: {
5
+ readonly ABAP_REPO_DOWNLOAD_SUCCESS: "ABAP_REPO_DOWNLOAD_SUCCESS";
6
+ readonly ABAP_REPO_DOWNLOAD_FAIL: "ABAP_REPO_DOWNLOAD_FAIL";
7
+ readonly ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS: "ADT_QUICK_DEPLOY_DOWNLOAD_SUCCESS";
8
+ readonly ADT_QUICK_DEPLOY_DOWNLOAD_FAIL: "ADT_QUICK_DEPLOY_DOWNLOAD_FAIL";
9
+ readonly ABAP_REPO_DOWNLOAD_MIGRATION_COMPLETED: "ABAP_REPO_DOWNLOAD_MIGRATION_COMPLETED";
10
+ };
11
+ export type EventName = (typeof EventName)[keyof typeof EventName];
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Event names for telemetry for the generator when downloading an app from repository
3
3
  */
4
- export var EventName;
5
- (function (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";
10
- })(EventName || (EventName = {}));
4
+ export const EventName = {
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',
9
+ ABAP_REPO_DOWNLOAD_MIGRATION_COMPLETED: 'ABAP_REPO_DOWNLOAD_MIGRATION_COMPLETED'
10
+ };
11
11
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,6 @@
1
1
  import type { VSCodeInstance } from '@sap-ux/fiori-generator-shared';
2
2
  import type { AbapDeployConfig } from '@sap-ux/ui5-config';
3
+ import type { EventName } from '../telemetryEvents/index.js';
3
4
  /**
4
5
  * Context object for the App generation process.
5
6
  * Contains the path of the project and the post-generation commands.
@@ -9,6 +10,7 @@ export interface RepoAppGenContext {
9
10
  postGenCommand: string;
10
11
  vscodeInstance?: VSCodeInstance;
11
12
  deployConfig?: AbapDeployConfig;
13
+ migrationTelemetryEvent?: EventName;
12
14
  }
13
15
  /**
14
16
  * Executes the post-generation command for the app.
@@ -19,7 +19,8 @@ export async function runPostAppGenHook(context) {
19
19
  // Execute the post-generation command
20
20
  await context.vscodeInstance?.commands?.executeCommand?.(context.postGenCommand, {
21
21
  fsPath: context.path,
22
- deployConfig: context.deployConfig
22
+ deployConfig: context.deployConfig,
23
+ ...(context.migrationTelemetryEvent && { migrationTelemetryEvent: context.migrationTelemetryEvent })
23
24
  });
24
25
  }
25
26
  catch (e) {
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.2.0",
4
+ "version": "1.2.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -29,8 +29,8 @@
29
29
  "@sap-ux/fiori-generator-shared": "1.2.0",
30
30
  "@sap-ux/inquirer-common": "1.0.23",
31
31
  "@sap-ux/project-access": "2.1.6",
32
- "@sap-ux/odata-service-inquirer": "3.1.0",
33
- "@sap-ux/fiori-elements-writer": "3.0.60",
32
+ "@sap-ux/odata-service-inquirer": "3.2.0",
33
+ "@sap-ux/fiori-elements-writer": "3.1.1",
34
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",