Skip to content

Conversation

@heimwege
Copy link
Contributor

@heimwege heimwege commented Dec 15, 2025

UI5 cli v5 will come with a new UI5 project type component for manifest type application.
This type has resource roots src (instead of webapp; will be served at /resources/my/app/id) and test (instead of webapp/test; will be served at /test-resources/my/app/id). Doing so it will be possible to serve more than one app with one server instance

Details see https://ui5.github.io/cli/v5/updates/migrate-v5

todo

  • Do we need to have a more specific path for open/ux/preview/client/* for project type component?
    Multiple apps can run in parallel so one central route might cause conflicts
    Maybe we need to use the same mechanism as in fix(preview-middleware): support rta and cpe for CAP node w/o mockserver #3842 to hand over the sandboxPathPrefix to the preview-middleware-client.
    or is the UI5 resourceroots mapping enough, e.g. {"open.ux.preview.client":"/resources/com/sap/cap/fe/ts/sample/preview/client"}
  • integration tests

Follow-up

  • Update @sap/ux-ui5-tooling fiori-tools-preview and fiori-tools-proxy middleware after consumption of this change

Test setup

use node 22.22.0

adjust ui5 yaml file

  • specVersion: '5.0'
  • type: component
    resources:
      configuration:
        paths:
          src: src    # default; path mapping can be done here; will be served at /resources
          test: test  # default; path mapping can be done here; will be served at /test-resources

adjust package.json

  • use devDependency "@ui5/cli": "^5.0.0-alpha.2"
  • run scripts use -o /test-resources/app/id/from/manifest/flp.html

Tests

Two apps with UI5 project type 'component' and one app with UI5 project type 'application' served in parallel by one ui5 cli server instance, e.g.

  • my/first/app/flp.html (ui5 project type component app 1)
  • my/second/app/flp.html (ui5 project type component app 2)
  • test/flp.html (ui5 project type application app)

Apps can have path mappings defined in the ui5 yaml file

Endpoints that need to be tested:

  • flp with local UI5 sources (from npmjs)
    • default path
    • custom flp.path
    • custom flp.init
    • enhancedHomePage: true
    • additional flp.apps
  • flp with proxied UI5 sources
    • default flp.path
    • custom flp.path
    • custom flp.init
    • enhancedHomePage: true
    • additional flp.apps
  • editors.rta
    • w/o developer mode (aka variants management)
    • with developer mode (aka cpe/adp)
  • editors.cardGenerator
    • default path
    • custom editors.cardGenerator.path
  • test with local UI5 sources (from npmjs)
    • default paths
    • custom path for at least one framework
    • custom init for at least one framework
    • custom pattern for at least one framework
  • test with and w/o cds-plugin-ui5
  • test with virtual endpoints and with existing files (flp sandbox and test glue code)
  • test with and w/o @sap-ux/ui5-middleware-fe-mockserver
  • eject virtual HTML files (npx --yes @sap-ux/create@latest add html)

@heimwege heimwege added the project-access Tickets related to @sap-ux/project-access label Dec 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2025

⚠️ No Changeset found

Latest commit: 7d99e49

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@heimwege heimwege added the ui5-config @sap-ux/ui5-config label Dec 15, 2025
@heimwege heimwege changed the title feat(project-access): add path-mappings for ui5 project type 'component' WIP feat(project-access): add path-mappings for ui5 project type 'component' Dec 16, 2025
@sap-email-compliance
Copy link

SAP employees are expected to use their SAP-email address for commits related to their work. Our compliance check has detected usage of an email other than a SAP one by a SAP employee. Please update your pull request accordingly.

If you thing this is wrong or need any assistance, please contact [email protected].

@heimwege heimwege added preview-middleware @sap-ux/preview-middleware adp-tooling app-config-writer @sap-ux/app-config-writer labels Jan 20, 2026
…-access/path-mappings-for-type-component

# Conflicts:
#	packages/preview-middleware/src/base/config.ts
#	packages/preview-middleware/templates/flp/cdm.ejs
#	packages/preview-middleware/templates/flp/sandbox.ejs
#	packages/preview-middleware/templates/flp/sandbox2.ejs
#	packages/preview-middleware/test/unit/base/__snapshots__/config.test.ts.snap
#	packages/preview-middleware/test/unit/base/__snapshots__/flp.test.ts.snap
@heimwege heimwege added the ui5-proxy-middleware @sap-ux/ui5-proxy-middleware label Jan 27, 2026
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adp-tooling app-config-writer @sap-ux/app-config-writer preview-middleware @sap-ux/preview-middleware project-access Tickets related to @sap-ux/project-access ui5-config @sap-ux/ui5-config ui5-proxy-middleware @sap-ux/ui5-proxy-middleware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants