npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ui5-antares-pro-proxy

v1.0.1

Published

Custom proxy middleware to test UI5 Antares Pro library locally in SAPUI5 applications.

Readme

UI5 Antares Pro Proxy

UI5 Antares Pro Proxy is a custom proxy middleware designed for local testing of the UI5 Antares Pro library within SAPUI5 applications. It resolves conflicts with the standard fiori-tools-proxy when serving local custom libraries and ensures that both standard UI5 resources and UI5 Antares Pro resources are correctly loaded during development.


🎯 Purpose

SAPUI5 applications running locally using ui5 serve (from @ui5/cli) or fiori run (from @sap/ux-ui5-tooling) typically use the fiori-tools-proxy middleware, which handles:

  • Proxying UI5 resources (/resources, /test-resources) from the UI5 CDN
  • Redirecting backend requests (e.g., /sap) to target systems

However, since UI5 Antares Pro is a custom library loaded under the /resources path but not available on the UI5 CDN, the fiori-tools-proxy mistakenly tries to load it from the CDN, resulting in 404 Not Found errors.

The ui5-antares-pro-proxy middleware is introduced to fix this by taking over the responsibility of proxying UI5 resources, while still letting fiori-tools-proxy handle backend requests.


📦 Installation

  1. Add the middleware as a development dependency:

    npm install --save-dev ui5-antares-pro-proxy
  2. Locate the YAML configuration file (typically ui5.yaml or ui5-local.yaml) used with ui5 serve or fiori run.

    ⚠️ This file defines the middleware behavior for your local development server. The changes described here should be made in this file.

  3. Remove the ui5 configuration block from the fiori-tools-proxy middleware (to prevent it from handling UI5 requests):

    Before:

    specVersion: "4.0"
    metadata:
      name: your.app.name
    type: application
    server:
      customMiddleware:   
        - name: fiori-tools-proxy
          afterMiddleware: compression
          configuration:
            ignoreCertError: true
            ui5:                             # ❌ REMOVE THIS BLOCK
              path:
                - /resources
                - /test-resources
              url: https://ui5.sap.com
            backend:
              - path: /sap
                url: https://your.backend.url
                client: '200'

    After:

    specVersion: "4.0"
    metadata:
      name: your.app.name
    type: application
    server:
      customMiddleware:   
        - name: fiori-tools-proxy
          afterMiddleware: compression
          configuration:
            ignoreCertError: true
            backend:
              - path: /sap
                url: https://your.backend.url
                client: '200'
  4. Add the ui5-antares-pro-proxy middleware to the configuration file before fiori-tools-proxy:

⚠️ Configuration block is optional. If not specified, the ui5-antares-pro-proxy will load UI5 resources from the https://ui5.sap.com address with the version determined from consumer's manifest.json file ("sap.ui5"."dependencies"."minUI5Version").

specVersion: "4.0"
metadata:
  name: your.app.name
type: application
server:
  customMiddleware:
    - name: ui5-antares-pro-proxy
      afterMiddleware: compression
      configuration:                     # Optional: Configure UI5 CDN
        ui5:
          path:
            - /resources
            - /test-resources
          url: https://ui5.sap.com       # Optional: override with a different CDN
          version: 1.136.3               # Optional: explicitly define UI5 version

    - name: fiori-tools-proxy
      afterMiddleware: compression
      configuration:
        ignoreCertError: true
        backend:
          - path: /sap
            url: https://your.backend.url
            client: '200'

    - name: fiori-tools-appreload
      afterMiddleware: compression
      configuration:
        port: 35729
        path: webapp
        delay: 300

    - name: fiori-tools-preview
      afterMiddleware: fiori-tools-appreload
      configuration:
        flp:
          theme: sap_horizon

⚙️ UI5 Resource Configuration

By default, the middleware reads the minUI5Version from your manifest.json to determine the UI5 version:

{
  "sap.ui5": {
    "dependencies": {
      "minUI5Version": "1.120.0"
    }
  }
}

If needed, you can override both the url and version in the ui5.yaml:

configuration:
  ui5:
    path:
      - /resources
      - /test-resources
    url: https://other-ui5-cdn.example.com
    version: 1.136.3

You can define multiple paths to ensure that both application resources and test resources are proxied properly.

⚠️ UI5 Resource Caching Notice

UI5 resources may be cached by the browser. If recent changes do not appear as expected, this is likely due to the browser's caching mechanism for static UI5 resources.

To ensure you're seeing the latest updates, please try one of the following:

  • Open the application in Incognito / Private mode
  • Clear your browser cache and reload the page

This is a common behavior with UI5's resource loading and not related to the proxy itself.


✅ Middleware Responsibility Summary

This setup ensures full compatibility during local development with both the standard SAPUI5 libraries and the UI5 Antares Pro library, while preserving backend proxy behavior.


🔗 Related Resources