Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New builder setting to fix data source URI in manifest.json #625

Open
budenko opened this issue Jun 4, 2022 · 6 comments
Open

New builder setting to fix data source URI in manifest.json #625

budenko opened this issue Jun 4, 2022 · 6 comments
Labels
enhancement New feature or request module/ui5-builder Related to the UI5 Builder module

Comments

@budenko
Copy link

budenko commented Jun 4, 2022

Is your feature request related to a problem? Please describe.

Data source URI in manifest.json should not start with a slash in order to UI5 application work properly in a FLP.

Describe the solution you'd like

It would be nice to have a builder task or setting that checks manifest.json and strips off leading slash from a data source URI during a building of an application to ensure that URI is correct automatically.

Describe alternatives you've considered

There is a such feature in @sap/grunt-sapui5-bestpractice-build module that is not supported any more and should be replaced with @ui5/builder.

Additional context

Example of a data source section of manifest.json

  "dataSources": {
    "Document-RestSource": {
      "uri": "fnd/document-ms/",
      "type": "JSON"
    }
  }
@budenko budenko added the enhancement New feature or request label Jun 4, 2022
@flovogt flovogt added the module/ui5-builder Related to the UI5 Builder module label Mar 17, 2023
@sebastianesch
Copy link

It would be great to have this feature directly in ui5-tooling. At the moment the Fiori Application Generator uses a custom task using "webide-extension-task-updateManifestJson" to update the manifest.json when deploying to Cloud Foundry.

https://www.npmjs.com/package/@sap/ui5-builder-webide-extension is quite old and has a dependency to @ui5/fs@1.1.2 and @ui5/cli@1.14.0.

@Regloom
Copy link

Regloom commented Apr 4, 2024

Absolutely agree with previous post, current 'deploy-config' script generates quite an outdated and huge list of dependencies.

@flovogt
Copy link
Member

flovogt commented Apr 4, 2024

As far as I remember, SAP Build Work Zone, standard edition a.k.a "Central Launchpad on CF" does not support absolute URLs at all. So the url should be relative in the source manifest.json.

I wonder why you not adjust the source manifest.json to make it relative right from the beginning?

@nicoschoenteich
Copy link

Hi everyone,
I was looking for a solution to this problem while working on the generator-ui5-project, which also uses the open-ux-tools for project generation (just like the Fiori Tools Application Generator) and therefore contains absolute paths in the manifest. As @flovogt said, SAP Build Work Zone only supports relative paths. Is there a current best practice as far as tooling goes to change the paths upon build? If not, I would fall back to creating a simple custom script that does that in case the target platform is SAP Build Work Zone. Any other suggestions from your side?
Looking forward to your input!
Best, Nico

@flovogt
Copy link
Member

flovogt commented Jul 23, 2024

Hi @nicoschoenteich,
thanks for pointing this out. Currently, there is no URL correction available in UI5 Tooling. In the past this was fixed by https://www.npmjs.com/package/@sap/ui5-builder-webide-extension which fixed the URLs in the manifest. But nowadays (CF deployment), this custom task is no longer needed, so we also do not recommend that any longer.

So as long as we have no auto correction available, feel free to go with the custom solution :-)

@nicoschoenteich
Copy link

Hi @flovogt, I implemented it as part of the ui5-task-zipper (ui5-community/ui5-ecosystem-showcase#1046), which is a good option when zipping and deploying to the HTML5 Apps Repo, to later consume in SAP Build Work Zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-builder Related to the UI5 Builder module
Projects
None yet
Development

No branches or pull requests

5 participants