diff --git a/README.md b/README.md index 31ffd47..0d6b32a 100644 --- a/README.md +++ b/README.md @@ -255,6 +255,13 @@ npm install @abap2ui5/node-runtime express node --input-type=module -e 'import { serve } from "@abap2ui5/node-runtime"; await serve({ port: 3000 });' ``` +Either way, `ui5 serve` serves only the libraries `framework.libraries` +in the example's `ui5.yaml` names: the ones the ABAP views of the embedded +apps use, and `sap.ui.codeeditor` for abap2UI5's developer tools +(Ctrl+F12). A library missing there fails in the browser console with a +script load error; an app deployed to a system has every library of that +system. + The Fiori elements apps and the card need abap2UI5 1.146.0 or later. The READMEs of [`freestyle/`](https://github.com/abap2UI5/samples-embed-control/blob/standard/freestyle/README.md), diff --git a/card/ui5-local.yaml b/card/ui5-local.yaml index 7452bdf..1d91421 100644 --- a/card/ui5-local.yaml +++ b/card/ui5-local.yaml @@ -12,12 +12,15 @@ framework: # Zone the host brings its own SAPUI5. The embedded abap2UI5 apps load # whatever library their ABAP view names - the hello world app uses # sap.ui.layout (SimpleForm). List every library your ABAP apps use. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.f - name: sap.ui.integration - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon builder: resources: diff --git a/card/ui5.yaml b/card/ui5.yaml index 62a95e0..adafeb1 100644 --- a/card/ui5.yaml +++ b/card/ui5.yaml @@ -9,12 +9,15 @@ framework: # Zone the host brings its own SAPUI5. The embedded abap2UI5 apps load # whatever library their ABAP view names - the hello world app uses # sap.ui.layout (SimpleForm). List every library your ABAP apps use. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.f - name: sap.ui.integration - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon builder: resources: diff --git a/fiori-elements-v2/ui5-local.yaml b/fiori-elements-v2/ui5-local.yaml index bb74430..df13529 100644 --- a/fiori-elements-v2/ui5-local.yaml +++ b/fiori-elements-v2/ui5-local.yaml @@ -13,11 +13,14 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones the Fiori elements app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.suite.ui.generic.template - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when diff --git a/fiori-elements-v2/ui5.yaml b/fiori-elements-v2/ui5.yaml index 50daa6a..f413c2b 100644 --- a/fiori-elements-v2/ui5.yaml +++ b/fiori-elements-v2/ui5.yaml @@ -10,11 +10,14 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones the Fiori elements app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.suite.ui.generic.template - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when diff --git a/fiori-elements/ui5-local.yaml b/fiori-elements/ui5-local.yaml index 60f406a..c964567 100644 --- a/fiori-elements/ui5-local.yaml +++ b/fiori-elements/ui5-local.yaml @@ -12,11 +12,14 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones the Fiori elements app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.fe.templates - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when diff --git a/fiori-elements/ui5.yaml b/fiori-elements/ui5.yaml index 26c39f5..73f64cb 100644 --- a/fiori-elements/ui5.yaml +++ b/fiori-elements/ui5.yaml @@ -9,11 +9,14 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones the Fiori elements app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.fe.templates - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when diff --git a/freestyle/README.md b/freestyle/README.md index dfcec1b..360051e 100644 --- a/freestyle/README.md +++ b/freestyle/README.md @@ -55,6 +55,11 @@ abap2UI5's CSRF check compares the browser's `Origin` with it - nothing else is needed. An installation that switched `check_trust_forwarded_host` off in its user exit answers 403 through the proxy. +`ui5 serve` serves only the libraries `framework.libraries` in `ui5.yaml` +names: the ones the ABAP views of the embedded apps use, and +`sap.ui.codeeditor` for abap2UI5's developer tools (Ctrl+F12). A library +missing there fails in the browser console with a script load error. + `npm run build` writes the app to deploy into `dist/`, the control in `dist/thirdparty/z2ui5/embed/`. diff --git a/freestyle/ui5-1.71.yaml b/freestyle/ui5-1.71.yaml index 9b01f0a..bbc54e1 100644 --- a/freestyle/ui5-1.71.yaml +++ b/freestyle/ui5-1.71.yaml @@ -13,6 +13,7 @@ framework: - name: sap.m - name: sap.ui.core - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_fiori_3 server: customMiddleware: diff --git a/freestyle/ui5-local.yaml b/freestyle/ui5-local.yaml index 65b370b..bac4d7e 100644 --- a/freestyle/ui5-local.yaml +++ b/freestyle/ui5-local.yaml @@ -11,10 +11,13 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones this host app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when diff --git a/freestyle/ui5.yaml b/freestyle/ui5.yaml index a093b3a..23d87bb 100644 --- a/freestyle/ui5.yaml +++ b/freestyle/ui5.yaml @@ -8,10 +8,13 @@ framework: # The embedded abap2UI5 apps load whatever library their ABAP view names - # the hello world app uses sap.ui.layout (SimpleForm). List every library # your ABAP apps use, not only the ones this host app uses itself. + # abap2UI5's developer tools (Ctrl+F12 in an embedded app) need + # sap.ui.codeeditor - without it `ui5 serve` answers them with a 404. libraries: - name: sap.m - name: sap.ui.core - name: sap.ui.layout + - name: sap.ui.codeeditor - name: themelib_sap_horizon # The control comes from npm like any dependency; `ui5 serve` serves it # anyway, `ui5 build` copies it into dist/thirdparty/z2ui5/embed/ only when