Giter VIP home page Giter VIP logo

Comments (10)

mvoros avatar mvoros commented on September 24, 2024 1

Yeah, fair point. Temporary using CDN is fine in this case. Thanks for the consideration.

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

Oh yes, this really is a valid use case to also include SDK download support.
We could add a config option in the package.json. Example:

"sapui5-runtime": {
  "version": "1.72.0",
  "component": "SDK"
}

Default would be:

"sapui5-runtime": {
  "version": "latest",
  "component": "Runtime"
}

What do you think?

from sapui5-runtime.

mvoros avatar mvoros commented on September 24, 2024

Yeah, we would be really happy with this solution. Currently, we have to redirect /test-resource/ requests to CDN. It would better to serve them from local folder.

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

Cool, shouldn’t be to hard to implement. I think only the endpoint is a different one. Everything else should be the same.

I’ll try to implement this this or next week. Of course you can also provide a PR. 👍

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

So after thinking about this for a bit, I came to the conclusion that it is actually not that easy, as always 😂

The problem is, that currently I return the path to the resources folder. If we also want to support serving test resources we would introduce a breaking change as we would need to expose the resource folder as well as the test-resource folder. Secondly, the package is named sapui5-runtime which already indicates that this package is only useful to install the runtime and not the whole SDK. Therefore I thought about creating a new package called sapui5-sdk which would do the exact same as sapui5-runtime but instead of only the runtime, we download the SDK.

I could refactor the core functionality into a separate module that is used by both packages. I think this is the way to go.

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

I just created two new packages:

And updated sapui5-runtime to version 1.5.3 which is now using sapui5-downloader-core internally.

I also moved all three packages into a mono repo: https://github.com/bastilimbach/sapui5-downloader

@mvoros you can now use the package sapui5-sdk to also serve the test-resources. Over the course of next week, I'll create the missing README files and archive this repo.

I hope this helps you 😊

from sapui5-runtime.

mvoros avatar mvoros commented on September 24, 2024

Thank you very much for a quick resolution. I see that you want to go a NPM way, package for everything ;-).

Anyway, while I have your attention, a support for multiple versions would be really nice. Sometimes we have to switch between UI5 versions and re-downloading files gets too slow and SDK archives are quite big.

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

Both sapui5-runtime and sapui5-sdk support specific versions by adding the configuration into package.json. It is described in the README.

These packages should be installed per UI5 app and not shared between different projects. I’m not entirely sure what your requirement is. Do you want to use the package centrally for multiple UI5 Apps on your machine?

from sapui5-runtime.

mvoros avatar mvoros commented on September 24, 2024

Something like downloaded version is stored to a version specific folder. A path is returned to a folder based on the config. If I define a new version, it gets downloaded to a new folder. The old version is still present so switching back to it will not require download again. Some control of re-downloading would be required.

E.g. we have the apps that are set up to UI5 version provided by target system. If I get a bug report and I assume it's a UI5 issue, I would like to switch to newer or older version to investigate further.

from sapui5-runtime.

bastilimbach avatar bastilimbach commented on September 24, 2024

Ah ok I get it now. For this specific use-case I would recommend to temporarily use the CDN for sapui5: https://sapui5.hana.ondemand.com/

I could build some sort of caching for old versions but I think then the node_modules folder will become even larger as the SDK is quite big. It would also mean that we would cache each patch version. E.g: 1.65.2 & 1.65.3 etc.

from sapui5-runtime.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.