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

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.
@@ -14,6 +14,7 @@ export default class extends Generator {
14
14
  options: RepoAppDownloadOptions;
15
15
  private projectPath;
16
16
  private extractedProjectPath;
17
+ private debugOptions;
17
18
  setPromptsCallback: (fn: object) => void;
18
19
  /**
19
20
  * Constructor for Downloading App.
@@ -46,6 +46,7 @@ class default_1 extends yeoman_generator_1.default {
46
46
  options;
47
47
  projectPath;
48
48
  extractedProjectPath;
49
+ debugOptions;
49
50
  setPromptsCallback;
50
51
  /**
51
52
  * Constructor for Downloading App.
@@ -189,6 +190,7 @@ class default_1 extends yeoman_generator_1.default {
189
190
  isAppStudio: (0, btp_utils_1.isAppStudio)(),
190
191
  odataVersion: config.service.version === odata_service_inquirer_1.OdataVersion.v2 ? '2.0' : '4.0'
191
192
  };
193
+ this.debugOptions = debugOptions;
192
194
  const fioriOptions = {
193
195
  name: config.app.id,
194
196
  projectRoot: this.projectPath,
@@ -253,11 +255,16 @@ class default_1 extends yeoman_generator_1.default {
253
255
  * the app generation process.
254
256
  */
255
257
  if (this.vscode) {
256
- const updateWorkspaceFolders = {
257
- uri: this.vscode?.Uri?.file((0, path_1.join)(this.projectPath)),
258
- projectName: (0, path_1.basename)(this.projectPath),
259
- vscode: this.vscode
260
- };
258
+ const rootFolder = this.projectPath;
259
+ // Create workspace folder URI
260
+ const { workspaceFolderUri } = (0, launch_config_1.handleWorkspaceConfig)(rootFolder, this.debugOptions);
261
+ const updateWorkspaceFolders = workspaceFolderUri
262
+ ? {
263
+ uri: workspaceFolderUri,
264
+ projectName: (0, path_1.basename)(rootFolder),
265
+ vscode: this.debugOptions.vscode
266
+ }
267
+ : undefined;
261
268
  (0, launch_config_1.updateWorkspaceFoldersIfNeeded)(updateWorkspaceFolders);
262
269
  }
263
270
  if (this.options.data?.postGenCommand) {
@@ -56,12 +56,13 @@ async function getPrompts(appRootPath, quickDeployedAppConfig) {
56
56
  const systemQuestions = await (0, odata_service_inquirer_1.getSystemSelectionQuestions)({
57
57
  serviceSelection: { hide: true },
58
58
  systemSelection: { defaultChoice: quickDeployedAppConfig?.serviceProviderInfo?.name }
59
- }, false);
59
+ }, true);
60
60
  let appList = [];
61
61
  const appSelectionPrompt = [
62
62
  {
63
63
  when: async (answers) => {
64
- if (answers[types_1.PromptNames.systemSelection]) {
64
+ if (answers[types_1.PromptNames.systemSelection] &&
65
+ systemQuestions.answers.connectedSystem?.serviceProvider) {
65
66
  appList = await (0, prompt_helpers_1.fetchAppListForSelectedSystem)(systemQuestions.answers.connectedSystem?.serviceProvider, quickDeployedAppConfig?.appId);
66
67
  }
67
68
  return !!systemQuestions.answers.connectedSystem?.serviceProvider;
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.5",
4
+ "version": "0.2.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -24,22 +24,22 @@
24
24
  "i18next": "23.5.1",
25
25
  "inquirer": "8.2.6",
26
26
  "yeoman-generator": "5.10.0",
27
+ "@sap-ux/fiori-generator-shared": "0.10.2",
27
28
  "@sap-ux/feature-toggle": "0.2.3",
28
29
  "@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
+ "@sap-ux/fiori-elements-writer": "2.1.40",
31
32
  "@sap-ux/odata-service-inquirer": "2.2.36",
32
33
  "@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
- "@sap-ux/launch-config": "0.8.1",
36
35
  "@sap-ux/fiori-tools-settings": "0.1.0",
37
- "@sap-ux/btp-utils": "1.0.3",
38
- "@sap-ux/ui5-info": "0.9.1",
39
36
  "@sap-ux/abap-deploy-config-writer": "0.0.103",
37
+ "@sap-ux/launch-config": "0.9.0",
38
+ "@sap-ux/btp-utils": "1.0.3",
40
39
  "@sap-ux/axios-extension": "1.20.0",
40
+ "@sap-ux/store": "1.0.0",
41
41
  "@sap-ux/guided-answers-helper": "0.2.2",
42
- "@sap-ux/store": "1.0.0"
42
+ "@sap-ux/ui5-info": "0.9.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@jest/types": "29.6.3",