Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/documentation/docs/pages/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ server:

:::

By default, UI5 CLI will serve applications using Port `8080`. When running in HTTP/2 or HTTPS mode, Port `8443` will be used.
By default, UI5 CLI will serve applications using Port `8080`. When running in HTTPS mode, Port `8443` will be used.

If the default port is already in use, the next highest free port will be used.

Expand Down
6 changes: 3 additions & 3 deletions internal/documentation/docs/pages/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ By placing this file in the root directory of the `my.app` application project,

The structure of the dependency definition file follows that of the [`@ui5/project/graph/providers/DependencyTree~TreeNode`](../api/@ui5_project_graph_providers_DependencyTree.html#~TreeNode) type.

## HTTP/2 Development Webserver
The UI5 CLI contains a web server to serve the project via HTTP/2 protocol.
## HTTPS Development Webserver
The UI5 CLI contains a web server to serve the project via HTTPS protocol.

```sh
ui5 serve --h2
ui5 serve --https
```

This requires an SSL certificate. You are guided through the automatic generation process. Also see the [UI5 Server documentation](./Server.md#ssl-certificates)
Expand Down
2 changes: 1 addition & 1 deletion internal/documentation/docs/pages/Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ A project graph can be served only once. Do not call both `serveMiddleware` and
:::

## SSL Certificates
When starting the UI5 Server in HTTPS- or HTTP/2 mode, for example by using UI5 CLI parameter `--h2`, you will be prompted for the automatic generation of a local SSL certificate if necessary.
When starting the UI5 Server in HTTPS mode, for example by using UI5 CLI parameter `--https`, you will be prompted for the automatic generation of a local SSL certificate if necessary.

Follow the given instructions and enter your password to install the generated certificate as trusted. You can find the generated certificate and corresponding private key under `.ui5/server` in your user's home directory.

Expand Down
2 changes: 1 addition & 1 deletion internal/documentation/docs/pages/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ UI5 CLI stores several kinds of data under your user's home directory in `~/.ui5
| ---- | ---- | ---- |
| `~/.ui5/framework/` | Downloaded UI5 framework dependencies (one copy per version) | Yes — re-downloaded on next invocation |
| `~/.ui5/buildCache/` | Build cache used by `ui5 build` and `ui5 serve` (see [Build Cache Control](./Builder.md#build-cache-control)) | Yes — rebuilt on next `ui5 build` / `ui5 serve` |
| `~/.ui5/server/` | Locally generated SSL certificate and private key for HTTPS / HTTP/2 mode | Yes — regenerated on next HTTPS server start; the new certificate must be re-trusted |
| `~/.ui5/server/` | Locally generated SSL certificate and private key for HTTPS mode | Yes — regenerated on next HTTPS server start; the new certificate must be re-trusted |

#### Resolution

Expand Down
14 changes: 14 additions & 0 deletions internal/documentation/docs/updates/migrate-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,20 @@ The SAP Theme Designer can create custom themes based on CSS variables instead o

With UI5 CLI v5, the `--experimental-css-variables` option has therefore been removed for the `ui5 build` command. For custom theme creation with CSS variables, please check out the **SAP Theme Designer**.

## Removal of HTTP/2 Support

The development server no longer supports the HTTP/2 protocol. The underlying `spdy` package is unmaintained and does not work with Node.js v24 and higher. You rarely need HTTP/2 for local development because browsers handle HTTP/1.1 well.

The `--h2` option for the `ui5 serve` command has therefore been removed. Use the new `--https` option to serve your project over HTTPS using the built-in Node.js HTTPS server:

```sh
ui5 serve --https
```

Like the previous `--h2` option, `--https` requires an SSL certificate and guides you through the automatic generation process on first use. See the [UI5 Server documentation](../pages/Server.md#ssl-certificates) for details.

If you need HTTP/2 for local development, manually set up a reverse proxy, for example, [nginx](https://nginx.org/), in front of the UI5 Server to handle the HTTP/2 connection with the browser.

## `sap-ui-version.json`

When you run `ui5 build`, the standard task [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) now runs by default. This task generates an `sap-ui-version.json` file in the `resources/` directory. The task runs for all build types (default, jsdoc, and self-contained) in projects of type `application`. For other project types (such as `library`), the behavior remains unchanged: [`generateVersionInfo`](../api/module-@ui5_builder_tasks_generateVersionInfo) does not run.
Expand Down
139 changes: 3 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions packages/cli/lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serve.builder = function(cli) {
applyBuildOptions(cli);
return cli
.option("port", {
describe: "Port to bind on (default for HTTP: 8080, HTTP/2: 8443)",
describe: "Port to bind on (default for HTTP: 8080, HTTPS: 8443)",
alias: "p",
type: "number"
})
Expand All @@ -30,8 +30,8 @@ serve.builder = function(cli) {
alias: "o",
type: "string"
})
.option("h2", {
describe: "Shortcut for enabling the HTTP/2 protocol for the web server",
.option("https", {
describe: "Enable the HTTPS protocol for the web server",
default: false,
type: "boolean"
})
Expand Down Expand Up @@ -127,7 +127,7 @@ serve.builder = function(cli) {
})
.coerce(["framework-version", "open", "port", "key", "cert"], dedupeArray)
.example("ui5 serve", "Start a web server for the current project")
.example("ui5 serve --h2", "Enable the HTTP/2 protocol for the web server (requires SSL certificate)")
.example("ui5 serve --https", "Enable the HTTPS protocol for the web server (requires SSL certificate)")
.example("ui5 serve --config /path/to/ui5.yaml", "Use the project configuration from a custom path")
.example("ui5 serve --dependency-definition /path/to/projectDependencies.yaml",
"Use a static dependency definition file")
Expand Down Expand Up @@ -183,7 +183,7 @@ serve.handler = async function(argv) {

if (!port && graph.getRoot().getServerSettings()) {
const serverSettings = graph.getRoot().getServerSettings();
if (argv.h2) {
if (argv.https) {
port = serverSettings.httpsPort;
} else {
port = serverSettings.httpPort;
Expand All @@ -192,7 +192,7 @@ serve.handler = async function(argv) {

if (!port) {
changePortIfInUse = true; // only change if port isn't explicitly set
if (argv.h2) {
if (argv.https) {
port = 8443;
} else {
port = 8080;
Expand All @@ -212,12 +212,12 @@ serve.handler = async function(argv) {
const serverConfig = {
port,
changePortIfInUse,
h2: argv.h2,
https: argv.https,
simpleIndex: !!argv.simpleIndex,
liveReload: !!liveReload,
acceptRemoteConnections: !!argv.acceptRemoteConnections,
cert: argv.h2 ? argv.cert : undefined,
key: argv.h2 ? argv.key : undefined,
cert: argv.https ? argv.cert : undefined,
key: argv.https ? argv.key : undefined,
sendSAPTargetCSP: !!argv.sapCspPolicies,
serveCSPReports: !!argv.serveCspReports,
cache: argv.cache,
Expand All @@ -230,7 +230,7 @@ serve.handler = async function(argv) {
dependencyDefinitionPath: argv.dependencyDefinition,
};

if (serverConfig.h2) {
if (serverConfig.https) {
const {getSslCertificate} = await import("@ui5/server/internal/sslUtil");
const {key, cert} = await getSslCertificate(serverConfig.key, serverConfig.cert);
serverConfig.key = key;
Expand All @@ -244,12 +244,12 @@ serve.handler = async function(argv) {
const projectWatcher = await import("@ui5/project/internal/graph/ProjectDefinitionWatcher");
// Pass buildGraph as the graphFactory so the server can re-resolve the graph and re-create
// the serving stack when its definition watcher observes a project-definition change.
const {h2, port: actualPort} = await serverServe(graph, serverConfig, function(err) {
const {https, port: actualPort} = await serverServe(graph, serverConfig, function(err) {
reject(err);
}, buildGraph, projectWatcher);

if (argv.open !== undefined) {
const protocol = h2 ? "https" : "http";
const protocol = https ? "https" : "http";
let browserUrl = protocol + "://localhost:" + actualPort;
if (typeof argv.open === "string") {
let relPath = argv.open || "/";
Expand Down
Loading
Loading