@sap-ux/fiori-app-sub-generator 0.5.9 → 0.5.11

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.
@@ -22,6 +22,7 @@ import type { ApiHubConfig } from '../types';
22
22
  * @param state.project.targetFolder
23
23
  * @param state.project.name
24
24
  * @param state.project.flpAppId
25
+ * @param state.project.enableVirtualEndpoints
25
26
  * @param fs - the file system editor
26
27
  * @param logger - the logger
27
28
  * @param vscode - the vscode instance
@@ -46,6 +47,7 @@ export declare function runPostGenerationTasks({ service, project }: {
46
47
  targetFolder: string;
47
48
  name: string;
48
49
  flpAppId?: string;
50
+ enableVirtualEndpoints?: boolean;
49
51
  };
50
52
  }, fs: Editor, logger: Logger & ILogWrapper, vscode?: unknown, appWizard?: AppWizard, followUpCommand?: {
51
53
  cmdName: string;
@@ -58,6 +58,7 @@ async function runPostGenHooks(projectPath, logger, vscode, followUpCommand) {
58
58
  * @param state.project.targetFolder
59
59
  * @param state.project.name
60
60
  * @param state.project.flpAppId
61
+ * @param state.project.enableVirtualEndpoints
61
62
  * @param fs - the file system editor
62
63
  * @param logger - the logger
63
64
  * @param vscode - the vscode instance
@@ -76,7 +77,8 @@ async function runPostGenerationTasks({ service, project }, fs, logger, vscode,
76
77
  flpAppId: project.flpAppId,
77
78
  sapClientParam: service.sapClient ? (0, utils_1.buildSapClientParam)(service.sapClient) : undefined,
78
79
  odataVersion: service.odataVersion,
79
- datasourceType: service.datasourceType
80
+ datasourceType: service.datasourceType,
81
+ enableVirtualEndpoints: project.enableVirtualEndpoints
80
82
  }, fs, vscode, logger);
81
83
  }
82
84
  // Persist backend system connection information
@@ -306,7 +306,8 @@ class FioriAppGenerator extends yeoman_generator_1.default {
306
306
  project: {
307
307
  targetFolder: this.state.project.targetFolder,
308
308
  name: this.state.project.name,
309
- flpAppId: this.state.project.flpAppId
309
+ flpAppId: this.state.project.flpAppId,
310
+ enableVirtualEndpoints: this.state.project.enableVirtualEndpoints
310
311
  }
311
312
  }, this.fs, FioriAppGenerator.logger, this.vscode, this.appWizard, this.options.followUpCommand);
312
313
  const generationTime02 = performance.now();
@@ -46,5 +46,7 @@ export interface GenerateLaunchConfigOptions {
46
46
  flpAppId?: string;
47
47
  /** Optional OData service version (e.g. v2 or v4). */
48
48
  odataVersion?: OdataVersion;
49
+ /** Optional flag to enable virtual endpoints for the project. */
50
+ enableVirtualEndpoints?: boolean;
49
51
  }
50
52
  //# sourceMappingURL=common.d.ts.map
@@ -216,8 +216,8 @@ async function generateLaunchConfig(options, fs, vscode, log, writeToAppOnly = f
216
216
  vscode: vscode,
217
217
  addStartCmd,
218
218
  sapClientParam: options.sapClientParam,
219
- flpAppId: options.flpAppId ?? '',
220
- flpSandboxAvailable: true,
219
+ flpAppId: options?.enableVirtualEndpoints ? 'app-preview' : options.flpAppId ?? '',
220
+ flpSandboxAvailable: !options?.enableVirtualEndpoints,
221
221
  isAppStudio: (0, btp_utils_1.isAppStudio)(),
222
222
  writeToAppOnly
223
223
  };
@@ -227,6 +227,7 @@ async function generateLaunchConfig(options, fs, vscode, log, writeToAppOnly = f
227
227
  const fioriOptions = {
228
228
  name: (0, path_1.basename)(options.projectName),
229
229
  projectRoot: projectPath,
230
+ startFile: options?.enableVirtualEndpoints ? 'test/flp.html' : undefined,
230
231
  debugOptions
231
232
  };
232
233
  await (0, launch_config_1.createLaunchConfig)(projectPath, fioriOptions, fs, log);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fiori-app-sub-generator",
3
3
  "description": "A yeoman (sub) generator that can generate Fiori applications. Not for standalone use.",
4
- "version": "0.5.9",
4
+ "version": "0.5.11",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -38,13 +38,13 @@
38
38
  "@sap-ux/fiori-freestyle-writer": "2.4.15",
39
39
  "@sap-ux/fiori-generator-shared": "0.12.10",
40
40
  "@sap-ux/fiori-tools-settings": "0.2.0",
41
- "@sap-ux/launch-config": "0.10.5",
42
- "@sap-ux/odata-service-inquirer": "2.5.5",
41
+ "@sap-ux/launch-config": "0.10.6",
42
+ "@sap-ux/odata-service-inquirer": "2.5.6",
43
43
  "@sap-ux/odata-service-writer": "0.27.6",
44
44
  "@sap-ux/project-access": "1.30.3",
45
45
  "@sap-ux/store": "1.1.0",
46
46
  "@sap-ux/telemetry": "0.6.4",
47
- "@sap-ux/ui5-application-inquirer": "0.14.16",
47
+ "@sap-ux/ui5-application-inquirer": "0.14.17",
48
48
  "@sap-ux/ui5-info": "0.12.0"
49
49
  },
50
50
  "devDependencies": {
@@ -64,7 +64,7 @@
64
64
  "yeoman-test": "6.3.0",
65
65
  "@sap-ux/abap-deploy-config-inquirer": "1.4.25",
66
66
  "@sap-ux/cf-deploy-config-inquirer": "0.3.17",
67
- "@sap-ux/flp-config-sub-generator": "0.2.35",
67
+ "@sap-ux/flp-config-sub-generator": "0.2.36",
68
68
  "@sap-ux/inquirer-common": "0.7.15",
69
69
  "@sap-ux/jest-file-matchers": "0.2.2",
70
70
  "@sap-ux/logger": "0.7.0"