@sap/ux-ui5-tooling 1.14.2 → 1.14.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@ All notable changes to this project are documented in this file.
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/) and the changelog is formatted based on [Keep a Changelog](http://keepachangelog.com/).
5
5
 
6
+ ## [1.14.3] - 2024-07-24
7
+ ### Added
8
+ - Added more flexibility to the `fiori-tools-preview` middleware to support all possible configuration options provided by the open source `@sap-ux/preview-middleware`
9
+
10
+ ### Fixed
11
+ - Fixed an issue with preview of adaptation projects not working
12
+
6
13
  ## [1.14.1] - 2024-06-26
7
14
  ### Fixed
8
15
  - Fixed an issue where run configurations were loading the SAPUI5 version from the default location, even though a different source location was specified
package/README.md CHANGED
@@ -394,13 +394,50 @@ server:
394
394
  ```
395
395
 
396
396
  ### [**4. Preview**](#4-preview)
397
- The `fiori-tools-preview` middleware enables the developer variant creation for SAP Fiori applications.
397
+ The preview middleware provides the capability to preview an application in a local Fiori launchpad. It hosts a local Fiori launchpad based on your configuration and offers an API to modify flex changes in your project. The middleware is a wrapper for the open source middleware `@sap-ux/preview-middleware` (https://www.npmjs.com/package/@sap-ux/preview-middleware) with a handful of default settings that are useful for the Fiori application development.
398
398
 
399
- ### Example configuration
400
- Executing `npx fiori run --open preview.html` in your project with the configuration below in the `ui5.yaml` opens a new browser tab with the application switched to UI adaptation mode for variant creation. The file `preview.html` is created dynamically at runtime by the `fiori-tools-preview` middleware.
399
+ #### [Configuration Options](#configuration-options-2)
401
400
 
401
+ The full list of configuration options is described at https://www.npmjs.com/package/@sap-ux/preview-middleware.
402
+
403
+ The following properties are the most important:
404
+
405
+ - `flp:`
406
+ - `path:` optional mount point of the local Fiori launchpad default is `/test/flp.html`
407
+ - `theme:` optional flag for setting the UI5 Theme
408
+ - `libs:` boolean: optional flag to add a generic script that fetches the paths of the libraries used, which are not available in UI5. To disable it, set it to `false`. If the flag is not set, the project will be checked for a `load-reuse-libs` script and if it is available, the libraries will also be fetched.
409
+ - `adp:`
410
+ - `target:` required configuration for adaptation projects defining the connected backend
411
+ - `debug:` boolean: enables debug output
412
+
413
+
414
+ #### [Minimal configuration](#minimal-configuration)
415
+ With no configuration provided, the local Fiori launchpad will be available at `/test/flp.html` and the log level is info. Additionally, an editor in UI adaptation mode for variant creation will be hosted at `/preview.html`.
416
+
417
+ ```yaml
418
+ customMiddleware:
419
+ - name: fiori-tools-preview
420
+ afterMiddleware: fiori-tools-appreload
402
421
  ```
403
- server:
422
+
423
+ #### [Configuring path and theme](#configuring-path-and-theme)
424
+ With the following configuration, the local Fiori launchpad will be available at `/test/flpSandbox.html`, the used theme will be SAP Horizon and the log level is debug. Additionally, an editor in UI adaptation mode for variant creation will be hosted at `/preview.html`.
425
+
426
+ ```yaml
427
+ customMiddleware:
428
+ - name: fiori-tools-preview
429
+ afterMiddleware: fiori-tools-appreload
430
+ configuration:
431
+ flp:
432
+ path: /test/flpSandbox.html
433
+ theme: sap_horizon
434
+ debug: true
435
+ ```
436
+
437
+ #### [Deprecated configuration](#deprecated-configuration)
438
+ The initial version of the middleware allowed setting the theme and required to set an application component. The component is not required anymore and the theme property has move to `flp-theme`, however, for backward compatibility, the following configuration is deprecated but still supported.
439
+
440
+ ```yaml
404
441
  customMiddleware:
405
442
  - name: fiori-tools-preview
406
443
  afterMiddleware: fiori-tools-appreload
@@ -408,11 +445,21 @@ server:
408
445
  component: myapp
409
446
  ui5Theme: sap_fiori_3
410
447
  ```
448
+ This configuration is internally converted to following.
449
+
450
+ ```yaml
451
+ customMiddleware:
452
+ - name: fiori-tools-preview
453
+ afterMiddleware: fiori-tools-appreload
454
+ configuration:
455
+ flp:
456
+ path: /test/flpSandbox.html
457
+ intent:
458
+ object: preview
459
+ action: app
460
+ theme: sap_fiori_3
461
+ ```
411
462
 
412
- ### Configuration options
413
- - **`component`** - application component of the SAP Fiori application (value is prefilled when the application is generated with https://www.npmjs.com/package/@sap/generator-fiori).
414
- - **`ui5Theme`** - SAP Fiori theme of the application (value is prefilled when the application is generated with https://www.npmjs.com/package/@sap/generator-fiori).
415
- - **`libs`** - boolean: optional flag to add a generic script that fetches the paths of the libraries used, which are not available in UI5. To disable it, set it to `false`. If the flag is not set, the project will be checked for a `load-reuse-libs` script and if it is available, the libraries will also be fetched.
416
463
 
417
464
  ## [**Tasks**](#tasks)
418
465