@ui5/server 3.2.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -6
- package/jsdoc.json +1 -1
- package/lib/middleware/serveResources.js +15 -2
- package/lib/sslUtil.js +4 -4
- package/package.json +20 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,29 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v4.0.0...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v4.0.0"></a>
|
|
8
|
+
## [v4.0.0] - 2024-07-23
|
|
9
|
+
### Breaking Changes
|
|
10
|
+
- Drop node v21 support [`2af0d4f`](https://github.com/SAP/ui5-server/commit/2af0d4fd94c720899bc5978d27ca176c7b2feecb)
|
|
11
|
+
- Replace console.log with process.stderr ([#643](https://github.com/SAP/ui5-server/issues/643)) [`d42c79f`](https://github.com/SAP/ui5-server/commit/d42c79f0a6e6fa5e685f736dd0ae79b353767051)
|
|
12
|
+
- Require Node.js 20.11.x/>=21.2.0 and npm >=10 [`39cc1a2`](https://github.com/SAP/ui5-server/commit/39cc1a2dea8e081888ae1f5f2c47a74bb7efe693)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
- **manifest.json:** Auto-fill supportedLocales [`a39c8de`](https://github.com/SAP/ui5-server/commit/a39c8debaabe259800ed8f861071b00817c10350)
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGE
|
|
18
|
+
|
|
19
|
+
Messages will now be written to stderr instead of stdout.
|
|
20
|
+
|
|
21
|
+
JIRA: CPOUI5FOUNDATION-802
|
|
22
|
+
Related to: https://github.com/SAP/ui5-tooling/issues/701
|
|
23
|
+
Sibling of: https://github.com/SAP/ui5-tooling/pull/930,
|
|
24
|
+
https://github.com/SAP/ui5-cli/pull/686
|
|
25
|
+
|
|
26
|
+
Support for older Node.js and npm releases has been dropped.
|
|
27
|
+
Only Node.js 20.11.x and >=21.2.0 as well as npm v10 or higher are supported.
|
|
6
28
|
|
|
7
29
|
<a name="v3.2.1"></a>
|
|
8
30
|
## [v3.2.1] - 2024-05-15
|
|
@@ -341,6 +363,7 @@ Only Node.js v10 or higher is supported.
|
|
|
341
363
|
|
|
342
364
|
<a name="v0.0.1"></a>
|
|
343
365
|
## v0.0.1 - 2018-06-06
|
|
366
|
+
[v4.0.0]: https://github.com/SAP/ui5-server/compare/v3.1.5...v4.0.0
|
|
344
367
|
[v3.2.1]: https://github.com/SAP/ui5-server/compare/v3.2.0...v3.2.1
|
|
345
368
|
[v3.2.0]: https://github.com/SAP/ui5-server/compare/v3.1.5...v3.2.0
|
|
346
369
|
[v3.1.5]: https://github.com/SAP/ui5-server/compare/v3.1.4...v3.1.5
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Contributing to the UI5 Tooling
|
|
2
2
|
|
|
3
|
-
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/
|
|
3
|
+
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md) repository.
|
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
# ui5-server
|
|
4
4
|
> Modules for running a UI5 development server
|
|
5
5
|
> Part of the [UI5 Tooling](https://github.com/SAP/ui5-tooling)
|
|
6
6
|
|
|
7
7
|
[](https://api.reuse.software/info/github.com/SAP/ui5-server)
|
|
8
|
-
[](https://dev.azure.com/sap/opensource/_build/latest?definitionId=34&branchName=main)
|
|
9
9
|
[](https://www.npmjs.com/package/@ui5/server)
|
|
10
10
|
[](https://coveralls.io/github/SAP/ui5-server)
|
|
11
11
|
|
|
12
12
|
## Documentation
|
|
13
|
-
UI5 Server documentation can be found here: [sap.github.io/ui5-tooling](https://sap.github.io/ui5-tooling/
|
|
13
|
+
UI5 Server documentation can be found here: [sap.github.io/ui5-tooling](https://sap.github.io/ui5-tooling/v4/pages/Server/)
|
|
14
14
|
|
|
15
|
-
The UI5 Server API Reference can be found here: [`@ui5/server`](https://sap.github.io/ui5-tooling/
|
|
15
|
+
The UI5 Server API Reference can be found here: [`@ui5/server`](https://sap.github.io/ui5-tooling/v4/api/module-@ui5_server.html)
|
|
16
16
|
|
|
17
17
|
## Contributing
|
|
18
|
-
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/
|
|
18
|
+
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md).
|
|
19
19
|
|
|
20
20
|
## Support
|
|
21
|
-
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/
|
|
21
|
+
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md#report-an-issue) on how to report an issue.
|
|
22
22
|
|
|
23
23
|
Please report issues in the main [UI5 Tooling](https://github.com/SAP/ui5-tooling) repository.
|
|
24
24
|
|
package/jsdoc.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"openGraph": {
|
|
28
28
|
"title": "UI5 Tooling - API Reference",
|
|
29
29
|
"type": "website",
|
|
30
|
-
"image": "https://sap.github.io/ui5-tooling/
|
|
30
|
+
"image": "https://sap.github.io/ui5-tooling/v4/images/UI5_logo_wide.png",
|
|
31
31
|
"site_name": "UI5 Tooling - API Reference",
|
|
32
32
|
"url": "https://sap.github.io/ui5-tooling/"
|
|
33
33
|
},
|
|
@@ -3,10 +3,11 @@ const log = getLogger("server:middleware:serveResources");
|
|
|
3
3
|
import replaceStream from "replacestream";
|
|
4
4
|
import etag from "etag";
|
|
5
5
|
import fresh from "fresh";
|
|
6
|
+
import fsInterface from "@ui5/fs/fsInterface";
|
|
6
7
|
|
|
7
8
|
const rProperties = /\.properties$/i;
|
|
8
9
|
const rReplaceVersion = /\.(library|js|json)$/i;
|
|
9
|
-
const rManifest = /\/manifest
|
|
10
|
+
const rManifest = /\/manifest\.json$/i;
|
|
10
11
|
const rResourcesPrefix = /^\/resources\//i;
|
|
11
12
|
|
|
12
13
|
function isFresh(req, res) {
|
|
@@ -15,7 +16,6 @@ function isFresh(req, res) {
|
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
/**
|
|
20
20
|
* Creates and returns the middleware to serve application resources.
|
|
21
21
|
*
|
|
@@ -49,6 +49,19 @@ function createMiddleware({resources, middlewareUtil}) {
|
|
|
49
49
|
next();
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
+
} else if (rManifest.test(resource.getPath()) && resource.getProject()?.getNamespace()) {
|
|
53
|
+
// Special handling for manifest.json file by adding additional content to the served manifest.json
|
|
54
|
+
// NOTE: This should only be done for manifest.json files that exist in the sources.
|
|
55
|
+
// Files created by generateLibraryManifest (see above) should not be handled in here.
|
|
56
|
+
// Only manifest.json files in library / application projects should be handled.
|
|
57
|
+
// resource.getProject.getNamespace() returns null for all other kind of projects.
|
|
58
|
+
const {default: manifestEnhancer} = await import("@ui5/builder/processors/manifestEnhancer");
|
|
59
|
+
await manifestEnhancer({
|
|
60
|
+
resources: [resource],
|
|
61
|
+
// Ensure that only files within the manifest's project are accessible
|
|
62
|
+
// Using the "runtime" style to match the style used by the UI5 server
|
|
63
|
+
fs: fsInterface(resource.getProject().getReader({style: "runtime"}))
|
|
64
|
+
});
|
|
52
65
|
}
|
|
53
66
|
|
|
54
67
|
const resourcePath = resource.getPath();
|
package/lib/sslUtil.js
CHANGED
|
@@ -70,13 +70,13 @@ async function createAndInstallCertificate(keyPath, certPath) {
|
|
|
70
70
|
// the created certificate into the system)
|
|
71
71
|
// TODO: Prompt and logging should happen in CLI module rather than server
|
|
72
72
|
if (process.platform === "win32") {
|
|
73
|
-
|
|
74
|
-
console.log("Please press allow in the opened dialog to confirm importing the newly created " +
|
|
73
|
+
process.stderr.write("Please press allow in the opened dialog to confirm importing the newly created " +
|
|
75
74
|
"SSL certificate into the operating system and browsers.");
|
|
75
|
+
process.stderr.write("\n");
|
|
76
76
|
} else {
|
|
77
|
-
|
|
78
|
-
console.log("Please enter your root password to allow importing the newly created " +
|
|
77
|
+
process.stderr.write("Please enter your root password to allow importing the newly created " +
|
|
79
78
|
"SSL certificate into the operating system and browsers.");
|
|
79
|
+
process.stderr.write("\n");
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
const {key, cert} = await devCert("UI5Tooling");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "UI5 Tooling - Server",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SAP SE",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": "^
|
|
28
|
+
"node": "^20.11.0 || >=22.0.0",
|
|
29
29
|
"npm": ">= 8"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"jsdoc-generate": "jsdoc -c ./jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
|
|
44
44
|
"jsdoc-watch": "npm run jsdoc && chokidar \"./lib/**/*.js\" -c \"npm run jsdoc-generate\"",
|
|
45
45
|
"preversion": "npm test",
|
|
46
|
-
"version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md
|
|
46
|
+
"version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md v4.0.0.. && git add CHANGELOG.md",
|
|
47
47
|
"prepublishOnly": "git push --follow-tags",
|
|
48
48
|
"release-note": "git-chglog --sort semver -c .chglog/release-config.yml v$npm_package_version",
|
|
49
49
|
"depcheck": "depcheck --ignores @ui5/server,docdash,compression,cors,@istanbuljs/esm-loader-hook --parsers='**/*.js:es6,**/*.cjs:es6'"
|
|
@@ -60,9 +60,11 @@
|
|
|
60
60
|
"files": [
|
|
61
61
|
"test/lib/**/*.js"
|
|
62
62
|
],
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
63
|
+
"watchMode": {
|
|
64
|
+
"ignoreChanges": [
|
|
65
|
+
"test/tmp/**"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
66
68
|
"workerThreads": false,
|
|
67
69
|
"nodeArguments": [
|
|
68
70
|
"--loader=esmock",
|
|
@@ -115,9 +117,9 @@
|
|
|
115
117
|
"url": "git@github.com:SAP/ui5-server.git"
|
|
116
118
|
},
|
|
117
119
|
"dependencies": {
|
|
118
|
-
"@ui5/builder": "^
|
|
119
|
-
"@ui5/fs": "^
|
|
120
|
-
"@ui5/logger": "^
|
|
120
|
+
"@ui5/builder": "^4.0.0",
|
|
121
|
+
"@ui5/fs": "^4.0.0",
|
|
122
|
+
"@ui5/logger": "^4.0.1",
|
|
121
123
|
"body-parser": "^1.20.2",
|
|
122
124
|
"compression": "^1.7.4",
|
|
123
125
|
"cors": "^2.8.5",
|
|
@@ -137,8 +139,8 @@
|
|
|
137
139
|
},
|
|
138
140
|
"devDependencies": {
|
|
139
141
|
"@istanbuljs/esm-loader-hook": "^0.2.0",
|
|
140
|
-
"@ui5/project": "^
|
|
141
|
-
"ava": "^
|
|
142
|
+
"@ui5/project": "^4.0.0",
|
|
143
|
+
"ava": "^6.1.3",
|
|
142
144
|
"chokidar-cli": "^3.0.0",
|
|
143
145
|
"cross-env": "^7.0.3",
|
|
144
146
|
"depcheck": "^1.4.7",
|
|
@@ -146,14 +148,14 @@
|
|
|
146
148
|
"eslint": "^8.57.0",
|
|
147
149
|
"eslint-config-google": "^0.14.0",
|
|
148
150
|
"eslint-plugin-ava": "^14.0.0",
|
|
149
|
-
"eslint-plugin-jsdoc": "^
|
|
150
|
-
"esmock": "^2.6.
|
|
151
|
+
"eslint-plugin-jsdoc": "^48.8.3",
|
|
152
|
+
"esmock": "^2.6.7",
|
|
151
153
|
"jsdoc": "^4.0.3",
|
|
152
|
-
"nyc": "^
|
|
153
|
-
"open-cli": "^
|
|
154
|
-
"rimraf": "^
|
|
155
|
-
"sinon": "^
|
|
156
|
-
"supertest": "^
|
|
154
|
+
"nyc": "^17.0.0",
|
|
155
|
+
"open-cli": "^8.0.0",
|
|
156
|
+
"rimraf": "^6.0.1",
|
|
157
|
+
"sinon": "^18.0.0",
|
|
158
|
+
"supertest": "^7.0.0",
|
|
157
159
|
"tap-xunit": "^2.4.1"
|
|
158
160
|
}
|
|
159
161
|
}
|