From d58a1101083dd6252459e7235f44f489a4a05823 Mon Sep 17 00:00:00 2001 From: D048415 Date: Wed, 12 Nov 2025 16:09:26 +0100 Subject: [PATCH 1/6] enhance readme content --- .../src/scripts/load-readme-from-npm.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts b/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts index c579cc27160..a166d4873be 100644 --- a/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts +++ b/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts @@ -31,6 +31,16 @@ async function getPackageReadme(packageName: string, logger: ToolsLogger): Promi } } +/** + * Enhance README content by adding a separator before each chapter (#) and subchapter (##). + * + * @param content - The original README content. + * @returns The enhanced README content. + */ +function enhanceReadmeContent(content: string): string { + return content.replace(/^(?!(?:-){32,}\n)(#{1,2} [^\n]*)/gm, '\n--------------------------------\n$1'); +} + /** * Fetch the README for a package from npmjs.org and saves it to a local file. * @@ -44,7 +54,7 @@ async function fetchAndSaveReadme(packageName: string, logger: ToolsLogger): Pro if (readmeContent) { try { const outputPath = join('data_local', outputFileName); - await writeFile(outputPath, readmeContent, 'utf-8'); + await writeFile(outputPath, enhanceReadmeContent(readmeContent), 'utf-8'); logger.info(`Successfully saved README to './data_local'`); } catch (error) { logger.error(`Error writing README file for ${outputFileName}: ${error}`); From c783391ab8e5564f340b5aca3a24884a964898cb Mon Sep 17 00:00:00 2001 From: D048415 Date: Wed, 12 Nov 2025 16:10:23 +0100 Subject: [PATCH 2/6] add cset --- .changeset/eight-tigers-push.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eight-tigers-push.md diff --git a/.changeset/eight-tigers-push.md b/.changeset/eight-tigers-push.md new file mode 100644 index 00000000000..c0102654e7b --- /dev/null +++ b/.changeset/eight-tigers-push.md @@ -0,0 +1,5 @@ +--- +'@sap-ux/fiori-docs-embeddings': patch +--- + +feat: enhance downloaded readme content for better chunking From d95027d38e616fcecf8b00e8df6b39d3edc4d1a4 Mon Sep 17 00:00:00 2001 From: D048415 Date: Wed, 12 Nov 2025 16:37:07 +0100 Subject: [PATCH 3/6] adjust unit test --- .../fiori-docs-embeddings/test/load-readme-from-npm.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori-docs-embeddings/test/load-readme-from-npm.test.ts b/packages/fiori-docs-embeddings/test/load-readme-from-npm.test.ts index 6f14a173b10..a7e7a2bd373 100644 --- a/packages/fiori-docs-embeddings/test/load-readme-from-npm.test.ts +++ b/packages/fiori-docs-embeddings/test/load-readme-from-npm.test.ts @@ -44,7 +44,7 @@ describe('download readme from npmjs', () => { const expectedFileName = `${testPackageName.split('/').pop()}-README.md`; expect(mockedWriteFile).toHaveBeenCalledWith( expect.stringContaining(expectedFileName), - testReadmeContent, + `\n--------------------------------\n${testReadmeContent}`, 'utf-8' ); }); From f7044364ee372cd62ba7c9895428525dea0963cd Mon Sep 17 00:00:00 2001 From: D048415 Date: Wed, 12 Nov 2025 16:53:41 +0100 Subject: [PATCH 4/6] fix sonar issue --- .../fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts b/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts index a166d4873be..88f2b6340bb 100644 --- a/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts +++ b/packages/fiori-docs-embeddings/src/scripts/load-readme-from-npm.ts @@ -38,7 +38,7 @@ async function getPackageReadme(packageName: string, logger: ToolsLogger): Promi * @returns The enhanced README content. */ function enhanceReadmeContent(content: string): string { - return content.replace(/^(?!(?:-){32,}\n)(#{1,2} [^\n]*)/gm, '\n--------------------------------\n$1'); + return content.replaceAll(/^(?!(?:-){32,}\n)(#{1,2} [^\n]*)/gm, '\n--------------------------------\n$1'); } /** From 920572d37afd5a1546b2987c9be01593bb74afcc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Nov 2025 12:28:34 +0000 Subject: [PATCH 5/6] Linting auto fix commit --- .../data_local/ux-ui5-tooling-README.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md b/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md index 4333911c1c7..1de818a76fa 100644 --- a/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md +++ b/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md @@ -1,3 +1,5 @@ + +-------------------------------- # @sap/ux-ui5-tooling The SAP Fiori Tools - UI5 Tooling contains a selection of custom [middlewares](https://sap.github.io/ui5-tooling/pages/extensibility/CustomServerMiddleware/) that can be used with the command `ui5 serve` as well as custom [tasks](https://sap.github.io/ui5-tooling/pages/extensibility/CustomTasks/) that can be used with the command `ui5 build`. @@ -7,6 +9,8 @@ Furthermore, the module expose the cli `fiori` offering e.g. the [`fiori run`](# - For more information about migration to the latest `@ui5/cli`, see [here](https://sap.github.io/ui5-tooling/stable/). - Starting with version `1.17.6`, the minimum required Node.js version is 20.19.2 or higher! + +-------------------------------- ## [**Middlewares**](#middlewares) SAP Fiori tools use the capabilities of custom middlewares to start and preview SAP Fiori elements or SAPUI5 freestyle applications, e.g. to enable auto refresh, to switch the version of SAPUI5 sources or to serve static resources. Starting with version `1.3.0` the behaviour of the preview of the SAP Fiori applications has changed. Now the persistent iAppState is ignored in order to have the source code changes always apply when application is refreshed. If you want to enable the iAppState then you need to add the URL parameter `fiori-tools-iapp-state=true` to the browser URL, e.g. `http://localhost:8080/test/flpSandbox.html?fiori-tools-iapp-state=true#masterDetail-display`. @@ -518,6 +522,8 @@ sap.ui.require(['sap/base/i18n/Formatting'], function(Formatting) { init: /test/myCustomInit ``` + +-------------------------------- ## [**Tasks**](#tasks) SAP Fiori Tools use the capabilities of custom tasks to deploy the SAP Fiori projects to ABAP servers. @@ -532,6 +538,8 @@ The deployment to ABAP task allows deploying SAP Fiori applications to SAP syste * Service `/UI5/ABAP_REPOSITORY_SRV` needs to be enabled and accessible from your development environment ([how to check this](https://ui5.sap.com/#/topic/a883327a82ef4cc792f3c1e7b7a48de8)) * For operations on a SAPUI5 ABAP repository, you need the `S_DEVELOP` authorization. + +-------------------------------- ## Example Configuration Executing the command `npm run deploy` from the root of your project, using the `ui5-deploy.yaml` configuration below, will deploy all files of your `dist` folder except files found in the `test` folder. The `username` and `password` for authentication will be read from the environment variables `XYZ_USER` and `XYZ_PASSWORD`, continue reading to see more examples of how to configure credentials. @@ -575,6 +583,8 @@ XYZ_USER=[MY_USER_NAME] XYZ_PASSWORD=[MY_PASSWORD] ``` + +-------------------------------- ## Command to deploy After completing the changes in the configuration files, execute the command `npm run deploy`. @@ -605,6 +615,8 @@ builder: Based on the sample configurations above, after deploying the app, you can access the app using URL: + +-------------------------------- ## Documentation on the Configuration options In addition to defining parameters in the main yaml file, every parameter can also be defined as environment variable that is referenced in yaml. Using the `dotenv` module, the task also supports project specific environment variables defined in a `.env` file in the root of your project. To reference an environment variable the pattern `env:VAR_NAME` must be used. @@ -698,6 +710,8 @@ The app object describes the backend object that is created/updated as result of - `boolean` (default: `false`) - If set to `true`, the task will log additional information about the deployment process. This is useful for debugging purposes. + +-------------------------------- ## [CLI Commands](#commands) ### [fiori run](#fiori-run---starts-a-local-web-server-for-running-a-fe-application) - starts a local web server for running a FE application #### Options @@ -793,6 +807,8 @@ Deploys an application to an ABAP frontend server. * `--ignore-cert-error, -ic` - Deprecated. Use `ignoreCertErrors` (plural) instead. * `--ignore-cert-errors, -ics` - Disabled by default. If set to `true`, the task will not validate the SSL certificate of the target system. This is useful for development purposes but must not be used in production environments. + +-------------------------------- ## [FAQ](#faq) **My backend system contains the SAP_UI component version 7.53 or newer, but the SAPUI5 repository service cannot be reached.** @@ -807,6 +823,8 @@ This could have multiple reasons, please check the console for more information Most probably the `OpenSSL` package is not installed on your OS. Please install it and make sure that it is available in your `PATH` environment variable. + +-------------------------------- ## [Support](#support) Join the [SAP Fiori Tools Community](https://pages.community.sap.com/topics/fiori-tools). Ask Questions, Read the Latest Blogs, Explore Content. @@ -814,10 +832,14 @@ Please assign tag: _SAP Fiori tools_. To log an issue with SAP Fiori Tools, please see [Contact SAP Support](https://help.sap.com/viewer/1bb01966b27a429ebf62fa2e45354fea/Latest/en-US). + +-------------------------------- ## [Documentation](#documentation) - Visit **SAP Help Portal** for [SAP Fiori Tools](https://help.sap.com/viewer/product/SAP_FIORI_tools/Latest/en-US) documentation. + +-------------------------------- ## [License](#license)
From efaf3402eec0e9b23c21781c3779e44918f89fa0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Nov 2025 13:23:28 +0000 Subject: [PATCH 6/6] Linting auto fix commit --- .../data_local/ux-ui5-tooling-README.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md b/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md index 938a4a6c901..1f955cd4811 100644 --- a/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md +++ b/packages/fiori-docs-embeddings/data_local/ux-ui5-tooling-README.md @@ -1,3 +1,5 @@ + +-------------------------------- # @sap/ux-ui5-tooling The SAP Fiori Tools - UI5 Tooling contains a selection of custom [middlewares](https://sap.github.io/ui5-tooling/pages/extensibility/CustomServerMiddleware/) that can be used with the command `ui5 serve` as well as custom [tasks](https://sap.github.io/ui5-tooling/pages/extensibility/CustomTasks/) that can be used with the command `ui5 build`. @@ -7,10 +9,14 @@ Furthermore, the module expose the cli `fiori` offering e.g. the [`fiori run`](# - For more information about migration to the latest `@ui5/cli`, see [here](https://sap.github.io/ui5-tooling/stable/). - Starting with version `1.17.6`, the minimum required Node.js version is 20.19.2 or higher! + +-------------------------------- # [**Middlewares**](#middlewares) SAP Fiori tools use the capabilities of custom middlewares to start and preview SAP Fiori elements or SAPUI5 freestyle applications, e.g. to enable auto refresh, to switch the version of SAPUI5 sources or to serve static resources. Starting with version `1.3.0` the behaviour of the preview of the SAP Fiori applications has changed. Now the persistent iAppState is ignored in order to have the source code changes always apply when application is refreshed. If you want to enable the iAppState then you need to add the URL parameter `fiori-tools-iapp-state=true` to the browser URL, e.g. `http://localhost:8080/test/flpSandbox.html?fiori-tools-iapp-state=true#masterDetail-display`. + +-------------------------------- ## [**1. Application Reload**](#1-application-reload) The application reload middleware allows developers to preview SAP Fiori applications while developing/configuring them. Whenever a file relevant for the SAP Fiori application is changed, the reload middleware will refresh the application preview. @@ -50,6 +56,8 @@ Port to be used to communicate file system changes - `` (default: `false`) Set this parameter to get more log information. + +-------------------------------- ## [**2. Proxy**](#2-proxy) The proxy middleware provides you with the capabilities to connect to different back-end systems or to switch the SAPUI5 version of the application. The proxy is based on the [@sap-ux/ui5-proxy-middleware](https://www.npmjs.com/package/@sap-ux/ui5-proxy-middleware) for proxying the UI5 sources (starting with version `1.6.0`) and the [@sap-ux/backend-proxy-middleware](https://www.npmjs.com/package/@sap-ux/backend-proxy-middleware) for connecting to different back-end systems (starting with version `1.6.7`). Both `@sap-ux/ui5-proxy-middleware` and `@sap-ux/backend-proxy-middleware` are based on the [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware). @@ -322,6 +330,8 @@ server: pathReplace: /sap/public/ui5/resources ``` + +-------------------------------- ## [**3. Serve Static**](#3-serve-static) The serve static middleware provides the capability to serve any static resources locally from your machine. E.g. you can serve SAPUI5 locally or any other resources. @@ -427,6 +437,8 @@ server: src: "Path/To/SAPUI5-SDK" ``` + +-------------------------------- ## [**4. Preview**](#4-preview) 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. @@ -518,10 +530,14 @@ sap.ui.require(['sap/base/i18n/Formatting'], function(Formatting) { init: /test/myCustomInit ``` + +-------------------------------- # [**Tasks**](#tasks) SAP Fiori Tools use the capabilities of custom tasks to deploy the SAP Fiori projects to ABAP servers. + +-------------------------------- ## [Deployment to ABAP](#deployment-to-abap) The deployment to ABAP task allows deploying SAP Fiori applications to SAP systems using the [SAPUI5 Repository OData service](https://ui5.sap.com/#/topic/a883327a82ef4cc792f3c1e7b7a48de8.html). @@ -698,10 +714,14 @@ The app object describes the backend object that is created/updated as result of - `boolean` (default: `false`) - If set to `true`, the task will log additional information about the deployment process. This is useful for debugging purposes. + +-------------------------------- # [CLI Commands](#commands) The cli `fiori` offering provides the [`fiori run`](#run) command which is a wrapper of the `ui5 serve` command and provides some additional parameters as well as `fiori add deploy-config` and `fiori add flp-config` to extend an existing project and `fiori deploy` to perform the deployment of the application to an ABAP frontend server. + +-------------------------------- ## [fiori run](#fiori-run---starts-a-local-web-server-for-running-a-fe-application) ### Options @@ -716,6 +736,8 @@ The cli `fiori` offering provides the [`fiori run`](#run) command which is a wra * `--ui5Uri` - UI5 uri to load the UI5 resources from (default: uri from `ui5.yaml`). * `--proxy` - specify proxy configuration, e.g. `https://myproxy:8443` (default: uses host machine proxy configuration, if any). + +-------------------------------- ## [fiori add deploy-config](#fiori-add-deploy-config---adds-a-deployment-configuration-to-the-project) The command allows adding a deployment configuration to the project. The command supports the generation of a configuration for deployment to an ABAP system or to a Cloud Foundry space. @@ -767,10 +789,14 @@ Prefix used for the ID of the MTA and the service names. It defaults to the name At the end of the generation, it's possible to optionally generate SAP Fiori launchpad configuration (default: no). + +-------------------------------- ## [fiori add flp-config](#fiori-add-flp-config---fiori-launchpad-configuration-generation) It's possible to create configuration and artifacts required to run the application in an SAP Fiori launchpad. Depending on the target, the command will update either only the application `manifest.json` with the required inbound navigation property, or will also enhance the MTA configuration to contain a standalone FLP on CF. + +-------------------------------- ## [fiori deploy](#fiori-deploy---performs-the-deployment-of-the-application-into-an-abap-system) The command performs the deployment of the application to an ABAP frontend server. @@ -798,6 +824,8 @@ The command performs the deployment of the application to an ABAP frontend serve * `--ignore-cert-error, -ic` - Deprecated. Use `ignoreCertErrors` (plural) instead. * `--ignore-cert-errors, -ics` - Disabled by default. If set to `true`, the task will not validate the SSL certificate of the target system. This is useful for development purposes but must not be used in production environments. + +-------------------------------- # [FAQ](#faq) **My backend system contains the SAP_UI component version 7.53 or newer, but the SAPUI5 repository service cannot be reached.** @@ -812,6 +840,8 @@ This could have multiple reasons, please check the console for more information Most probably the `OpenSSL` package is not installed on your OS. Please install it and make sure that it is available in your `PATH` environment variable. + +-------------------------------- # [Support](#support) Join the [SAP Fiori Tools Community](https://pages.community.sap.com/topics/fiori-tools). Ask Questions, Read the Latest Blogs, Explore Content. @@ -819,10 +849,14 @@ Please assign tag: _SAP Fiori tools_. To log an issue with SAP Fiori Tools, please see [Contact SAP Support](https://help.sap.com/viewer/1bb01966b27a429ebf62fa2e45354fea/Latest/en-US). + +-------------------------------- # [Documentation](#documentation) - Visit **SAP Help Portal** for [SAP Fiori Tools](https://help.sap.com/viewer/product/SAP_FIORI_tools/Latest/en-US) documentation. + +-------------------------------- # [License](#license)