Closed ghost closed 9 months ago
I found a solution:
// only for cds serve the cds-plugin-ui5 is active
if (cds.cli?.command === "serve") {
When using cds serve or watch the cds.cli.command is serve - only then the plugin becomes active!
Fix is included in cds-plugin-ui5 version 0.8.1
Hi @petermuessig,
I did check out this changes,
But now the plugin will not start at all in my wdi5 test (we start the server via cds.test(__dirname + "/../cap", "--in-memory", "--port", "4004");
.
Here are some example what the cds.env looks on the current change
// only for cds serve the cds-plugin-ui5 is active
if (cds.cli?.command === "serve") {
cli: cds mock s4_payint
cli cds serve
startet via: cds.test(__dirname + "/../cap", "--in-memory", "--port", "4004");
I guess:
process.env.CDS_PLUGIN_UI5_ACTIVE = "true"
should beat the decisionregards Norbert
Hi @nlaenger ,
I think we'll add a fallback strategy - if the cds.cli.command
isn't defined, we check the cds.options.service
for defining all
- this should do the necessary trick for now...
Describe the bug When using the mock function from cds: https://cap.cloud.sap/docs/guides/using-services#mock-remote-service-as-odata-service-node-js
The cds-plugin-ui5 also loads.
I would have assumed that the mock function should only provide the "backend ODATA service". I don't know if there is a "flag" or setting to ident that only the mocking is requested.
To Reproduce Steps to reproduce the behavior:
Expected behavior When mocking a single service only "backend" function should be loaded