geert-janklaps / cds-launchpad-plugin

Launchpad Plugin for demo / development / testing SAP CAP-based projects
MIT License
12 stars 13 forks source link

Add check that sap.app.i18n.bundleUrl is not undefined #48

Open gregorwolf opened 1 week ago

gregorwolf commented 1 week ago

With #9 we've added Support for the manifest.json config sap.app.i18n.bundleUrl. But in cap-sflight the i18n configuration is done with bundleName. I've tried adding cds-launchpad-plugin with the commit https://github.com/gregorwolf/cap-sflight/commit/53e04145e2d04a9e5946565d75a097f2cbb69846 but get the following error when I access the Launchpad:

[cds] - ❗️Uncaught Error: ENOENT: no such file or directory, open '/Users/gwolf/Documents/Projects/cap/cap-sflight/app/travel_processor/webapp/undefined'
    at Object.openSync (node:fs:582:18)
    at Object.readFileSync (node:fs:461:35)
    at /Users/gwolf/Documents/Projects/cap/cap-sflight/node_modules/cds-launchpad-plugin/dist/index.js:199:57

The error occurs as bundleUrl is used without checking to be undefined.

I haven't found bundleName in the documentation Supported Locales and Fallback Chain. In Descriptor for Applications, Components, and Libraries (manifest.json) I find it only in the context of models. So I think the use in cap-sflight is incorrect.

But if you agree I will add a check that sap.app.i18n.bundleUrl is not undefined.