@ui5/server 3.0.0-rc.3 → 3.0.1
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 +30 -83
- package/lib/middleware/MiddlewareUtil.js +16 -3
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,26 +2,30 @@
|
|
|
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/v3.0.
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.0.1...HEAD).
|
|
6
6
|
|
|
7
|
-
<a name="v3.0.
|
|
8
|
-
## [v3.0.
|
|
7
|
+
<a name="v3.0.1"></a>
|
|
8
|
+
## [v3.0.1] - 2023-02-16
|
|
9
9
|
### Bug Fixes
|
|
10
|
-
- **
|
|
10
|
+
- **MiddlewareUtil:** Provide framework configuration getters to custom tasks ([#579](https://github.com/SAP/ui5-server/issues/579)) [`58bf4f5`](https://github.com/SAP/ui5-server/commit/58bf4f5953aed3a1fc6f4f4353e37fe6c3b7094f)
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
<a name="v3.0.0
|
|
14
|
-
## [v3.0.0
|
|
15
|
-
|
|
16
|
-
<a name="v3.0.0-rc.1"></a>
|
|
17
|
-
## [v3.0.0-rc.1] - 2023-01-23
|
|
18
|
-
|
|
19
|
-
<a name="v3.0.0-rc.0"></a>
|
|
20
|
-
## [v3.0.0-rc.0] - 2022-12-23
|
|
13
|
+
<a name="v3.0.0"></a>
|
|
14
|
+
## [v3.0.0] - 2023-02-09
|
|
21
15
|
### Breaking Changes
|
|
16
|
+
- Transform to ES Modules ([#501](https://github.com/SAP/ui5-server/issues/501)) [`05e3013`](https://github.com/SAP/ui5-server/commit/05e3013605e28e9ab5a785aa57616473d40e5710)
|
|
22
17
|
- Remove "/proxy" endpoint ([#550](https://github.com/SAP/ui5-server/issues/550)) [`4bdf839`](https://github.com/SAP/ui5-server/commit/4bdf839e96f67ddbc4cb2a18216921d54df4006e)
|
|
18
|
+
- Require Project Graph ([#479](https://github.com/SAP/ui5-server/issues/479)) [`d62f85a`](https://github.com/SAP/ui5-server/commit/d62f85a193115a587dbf58225e8130318a475023)
|
|
19
|
+
- Require Node.js >= 16.18.0 / npm >= 8 [`63d216a`](https://github.com/SAP/ui5-server/commit/63d216a3ba34e8e50acc6621d43a78c3a0804d67)
|
|
23
20
|
|
|
24
21
|
### BREAKING CHANGE
|
|
22
|
+
This package has been transformed to ES Modules. Therefore it no longer provides a CommonJS export.
|
|
23
|
+
If your project uses CommonJS, it needs to be converted to ESM or use a dynamic import.
|
|
24
|
+
|
|
25
|
+
For more information see also:
|
|
26
|
+
|
|
27
|
+
- https://sap.github.io/ui5-tooling/updates/migrate-v3/
|
|
28
|
+
- https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
25
29
|
|
|
26
30
|
This removes the "/proxy" endpoint and the corresponding
|
|
27
31
|
"connectUi5Proxy" middleware from the standard ui5-server.
|
|
@@ -34,68 +38,22 @@ in the form of custom middleware extensions from the UI5-community.
|
|
|
34
38
|
The UI5 Team might provide a dedicated custom middleware extension,
|
|
35
39
|
with similar functionality, in the future.
|
|
36
40
|
|
|
41
|
+
- Server now requires a Project Graph instance instead.
|
|
42
|
+
- Standard middleware now rely on Project instances being available on Resources (see https://github.com/SAP/ui5-fs/pull/381)
|
|
43
|
+
- MiddlewareRepository#addMiddleware has been removed. Custom middleware need to be added to the project graph instead
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Dependency Updates
|
|
41
|
-
- Bump connect-openui5 from 0.10.2 to 0.10.3 [`90871f8`](https://github.com/SAP/ui5-server/commit/90871f89815501860616ffbdf8927824412ec909)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<a name="v3.0.0-beta.3"></a>
|
|
45
|
-
## [v3.0.0-beta.3] - 2022-11-30
|
|
45
|
+
Support for older Node.js and npm releases has been dropped.
|
|
46
|
+
Only Node.js v16.18.0 and npm v8 or higher are supported.
|
|
46
47
|
|
|
47
|
-
<a name="v3.0.0-beta.2"></a>
|
|
48
|
-
## [v3.0.0-beta.2] - 2022-11-29
|
|
49
48
|
### Features
|
|
50
49
|
- **MiddlewareUtil:** Add getProject/getDependencies/resourceFactory API to interface ([#547](https://github.com/SAP/ui5-server/issues/547)) [`ab28f78`](https://github.com/SAP/ui5-server/commit/ab28f789ba929ef1319b6e562267e9717cc9937b)
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
<a name="
|
|
54
|
-
## [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## [v3.0.0-alpha.4] - 2022-10-24
|
|
58
|
-
### Breaking Changes
|
|
59
|
-
- Transform to native ESM ([#501](https://github.com/SAP/ui5-server/issues/501)) [`05e3013`](https://github.com/SAP/ui5-server/commit/05e3013605e28e9ab5a785aa57616473d40e5710)
|
|
60
|
-
|
|
61
|
-
### BREAKING CHANGE
|
|
62
|
-
|
|
63
|
-
This package has been transformed to native ESM. Therefore it no longer provides a CommonJS export.
|
|
64
|
-
If your project uses CommonJS, it needs to be converted to ESM or use a dynamic import.
|
|
65
|
-
|
|
66
|
-
For more information see also:
|
|
67
|
-
- https://sap.github.io/ui5-tooling/updates/migrate-v3/
|
|
68
|
-
- https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<a name="v3.0.0-alpha.3"></a>
|
|
72
|
-
## [v3.0.0-alpha.3] - 2022-07-27
|
|
73
|
-
|
|
74
|
-
<a name="v3.0.0-alpha.2"></a>
|
|
75
|
-
## [v3.0.0-alpha.2] - 2022-06-14
|
|
76
|
-
### Breaking Changes
|
|
77
|
-
- Require Project Graph ([#479](https://github.com/SAP/ui5-server/issues/479)) [`d62f85a`](https://github.com/SAP/ui5-server/commit/d62f85a193115a587dbf58225e8130318a475023)
|
|
78
|
-
|
|
79
|
-
### BREAKING CHANGE
|
|
80
|
-
|
|
81
|
-
* Server now requires a Project Graph instance instead.
|
|
82
|
-
* Standard middleware now rely on Project instances being available on Resources (see https://github.com/SAP/ui5-fs/pull/381)
|
|
83
|
-
* MiddlewareRepository#addMiddleware has been removed. Custom middleware need to be added to the project graph instead
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<a name="v3.0.0-alpha.1"></a>
|
|
87
|
-
## [v3.0.0-alpha.1] - 2022-01-25
|
|
88
|
-
### Breaking Changes
|
|
89
|
-
- Require Node.js >= 16.13.2 / npm >= 8 [`63d216a`](https://github.com/SAP/ui5-server/commit/63d216a3ba34e8e50acc6621d43a78c3a0804d67)
|
|
90
|
-
|
|
91
|
-
### BREAKING CHANGE
|
|
92
|
-
|
|
93
|
-
Support for older Node.js and npm releases has been dropped.
|
|
94
|
-
Only Node.js v16.13.2 and npm v8 or higher are supported.
|
|
95
|
-
|
|
52
|
+
<a name="v2.4.1"></a>
|
|
53
|
+
## [v2.4.1] - 2022-11-30
|
|
54
|
+
### Dependency Updates
|
|
55
|
+
- Bump connect-openui5 from 0.10.2 to 0.10.3 [`20b6fc8`](https://github.com/SAP/ui5-server/commit/20b6fc8fbad69265bae3e8f7efd320f6297ac4c4)
|
|
96
56
|
|
|
97
|
-
<a name="v3.0.0-alpha.0"></a>
|
|
98
|
-
## [v3.0.0-alpha.0] - 2021-12-14
|
|
99
57
|
|
|
100
58
|
<a name="v2.4.0"></a>
|
|
101
59
|
## [v2.4.0] - 2021-10-19
|
|
@@ -131,7 +89,7 @@ Only Node.js v16.13.2 and npm v8 or higher are supported.
|
|
|
131
89
|
## [v2.2.6] - 2020-10-22
|
|
132
90
|
### Bug Fixes
|
|
133
91
|
- Improve parallel theme request handling [`88bc0d6`](https://github.com/SAP/ui5-server/commit/88bc0d6d4e5ca8bb191029335451713579360e1c)
|
|
134
|
-
- **nonReadRequests middleware:** Use
|
|
92
|
+
- **nonReadRequests middleware:** Use response API [`2d2325f`](https://github.com/SAP/ui5-server/commit/2d2325f638820d25738ddbd56afe0d104e37f2e0)
|
|
135
93
|
|
|
136
94
|
|
|
137
95
|
<a name="v2.2.5"></a>
|
|
@@ -180,7 +138,7 @@ Only Node.js v16.13.2 and npm v8 or higher are supported.
|
|
|
180
138
|
<a name="v2.0.2"></a>
|
|
181
139
|
## [v2.0.2] - 2020-04-30
|
|
182
140
|
### Bug Fixes
|
|
183
|
-
- **CSP Middleware:** Use
|
|
141
|
+
- **CSP Middleware:** Use res.getHeader/setHeader methods ([#312](https://github.com/SAP/ui5-server/issues/312)) [`c53525c`](https://github.com/SAP/ui5-server/commit/c53525ca4bb5825d241d0f137ce3912d681e6548)
|
|
184
142
|
|
|
185
143
|
|
|
186
144
|
<a name="v2.0.1"></a>
|
|
@@ -338,20 +296,9 @@ Only Node.js v10 or higher is supported.
|
|
|
338
296
|
|
|
339
297
|
<a name="v0.0.1"></a>
|
|
340
298
|
## v0.0.1 - 2018-06-06
|
|
341
|
-
|
|
342
|
-
[v3.0.0
|
|
343
|
-
[
|
|
344
|
-
[v3.0.0-rc.1]: https://github.com/SAP/ui5-server/compare/v3.0.0-rc.0...v3.0.0-rc.1
|
|
345
|
-
[v3.0.0-rc.0]: https://github.com/SAP/ui5-server/compare/v3.0.0-beta.4...v3.0.0-rc.0
|
|
346
|
-
[v3.0.0-beta.4]: https://github.com/SAP/ui5-server/compare/v3.0.0-beta.3...v3.0.0-beta.4
|
|
347
|
-
[v3.0.0-beta.3]: https://github.com/SAP/ui5-server/compare/v3.0.0-beta.2...v3.0.0-beta.3
|
|
348
|
-
[v3.0.0-beta.2]: https://github.com/SAP/ui5-server/compare/v3.0.0-beta.1...v3.0.0-beta.2
|
|
349
|
-
[v3.0.0-beta.1]: https://github.com/SAP/ui5-server/compare/v3.0.0-alpha.4...v3.0.0-beta.1
|
|
350
|
-
[v3.0.0-alpha.4]: https://github.com/SAP/ui5-server/compare/v3.0.0-alpha.3...v3.0.0-alpha.4
|
|
351
|
-
[v3.0.0-alpha.3]: https://github.com/SAP/ui5-server/compare/v3.0.0-alpha.2...v3.0.0-alpha.3
|
|
352
|
-
[v3.0.0-alpha.2]: https://github.com/SAP/ui5-server/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
|
|
353
|
-
[v3.0.0-alpha.1]: https://github.com/SAP/ui5-server/compare/v3.0.0-alpha.0...v3.0.0-alpha.1
|
|
354
|
-
[v3.0.0-alpha.0]: https://github.com/SAP/ui5-server/compare/v2.4.0...v3.0.0-alpha.0
|
|
299
|
+
[v3.0.1]: https://github.com/SAP/ui5-server/compare/v3.0.0...v3.0.1
|
|
300
|
+
[v3.0.0]: https://github.com/SAP/ui5-server/compare/v2.4.0...v3.0.0
|
|
301
|
+
[v2.4.1]: https://github.com/SAP/ui5-server/compare/v2.4.0...v2.4.1
|
|
355
302
|
[v2.4.0]: https://github.com/SAP/ui5-server/compare/v2.3.1...v2.4.0
|
|
356
303
|
[v2.3.1]: https://github.com/SAP/ui5-server/compare/v2.3.0...v2.3.1
|
|
357
304
|
[v2.3.0]: https://github.com/SAP/ui5-server/compare/v2.2.10...v2.3.0
|
|
@@ -107,11 +107,14 @@ class MiddlewareUtil {
|
|
|
107
107
|
* @property {Function} getVersion Get the project version
|
|
108
108
|
* @property {Function} getNamespace Get the project namespace
|
|
109
109
|
* @property {Function} getRootReader Get the project rootReader
|
|
110
|
-
* @property {Function} getReader Get the project reader
|
|
110
|
+
* @property {Function} getReader Get the project reader, defaulting to "runtime" style instead of "buildtime"
|
|
111
111
|
* @property {Function} getRootPath Get the local File System path of the project's root directory
|
|
112
112
|
* @property {Function} getSourcePath Get the local File System path of the project's source directory
|
|
113
113
|
* @property {Function} getCustomConfiguration Get the project Custom Configuration
|
|
114
114
|
* @property {Function} isFrameworkProject Check whether the project is a UI5-Framework project
|
|
115
|
+
* @property {Function} getFrameworkName Get the project's framework name configuration
|
|
116
|
+
* @property {Function} getFrameworkVersion Get the project's framework version configuration
|
|
117
|
+
* @property {Function} getFrameworkDependencies Get the project's framework dependencies configuration
|
|
115
118
|
*/
|
|
116
119
|
|
|
117
120
|
/**
|
|
@@ -227,9 +230,19 @@ class MiddlewareUtil {
|
|
|
227
230
|
const baseProjectInterface = {};
|
|
228
231
|
bindFunctions(project, baseProjectInterface, [
|
|
229
232
|
"getType", "getName", "getVersion", "getNamespace",
|
|
230
|
-
"getRootReader", "
|
|
231
|
-
"getCustomConfiguration", "isFrameworkProject"
|
|
233
|
+
"getRootReader", "getRootPath", "getSourcePath",
|
|
234
|
+
"getCustomConfiguration", "isFrameworkProject", "getFrameworkName",
|
|
235
|
+
"getFrameworkVersion", "getFrameworkDependencies"
|
|
232
236
|
]);
|
|
237
|
+
// Project#getReader defaults to style "buildtime". However ui5-server uses
|
|
238
|
+
// style "runtime". The main difference is that for some project types (like applications)
|
|
239
|
+
// the /resources/<namespace> path prefix is omitted for "runtime". Also, no builder resource-
|
|
240
|
+
// exclude configuration is applied.
|
|
241
|
+
// Therefore default to style "runtime" here so that custom middleware will commonly work with
|
|
242
|
+
// the same paths as ui5-server and no unexpected builder-excludes.
|
|
243
|
+
baseProjectInterface.getReader = function(options = {style: "runtime"}) {
|
|
244
|
+
return project.getReader(options);
|
|
245
|
+
};
|
|
233
246
|
return baseProjectInterface;
|
|
234
247
|
};
|
|
235
248
|
// getDependencies function, returning an array of project names
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/server",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "UI5 Tooling - Server",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SAP SE",
|
|
@@ -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 && git add CHANGELOG.md",
|
|
46
|
+
"version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md v3.0.0.. && git add CHANGELOG.md",
|
|
47
47
|
"postversion": "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'"
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"url": "git@github.com:SAP/ui5-server.git"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@ui5/builder": "^3.0.
|
|
118
|
-
"@ui5/fs": "^3.0.0
|
|
119
|
-
"@ui5/logger": "^3.0.
|
|
117
|
+
"@ui5/builder": "^3.0.1",
|
|
118
|
+
"@ui5/fs": "^3.0.0",
|
|
119
|
+
"@ui5/logger": "^3.0.0",
|
|
120
120
|
"body-parser": "^1.20.1",
|
|
121
121
|
"compression": "^1.7.4",
|
|
122
122
|
"cors": "^2.8.5",
|
|
@@ -136,18 +136,18 @@
|
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@istanbuljs/esm-loader-hook": "^0.2.0",
|
|
139
|
-
"@ui5/project": "^3.0.0
|
|
140
|
-
"ava": "^5.
|
|
139
|
+
"@ui5/project": "^3.0.0",
|
|
140
|
+
"ava": "^5.2.0",
|
|
141
141
|
"chokidar-cli": "^3.0.0",
|
|
142
142
|
"cross-env": "^7.0.3",
|
|
143
143
|
"depcheck": "^1.4.3",
|
|
144
144
|
"docdash": "^2.0.1",
|
|
145
|
-
"eslint": "^8.
|
|
145
|
+
"eslint": "^8.34.0",
|
|
146
146
|
"eslint-config-google": "^0.14.0",
|
|
147
147
|
"eslint-plugin-ava": "^14.0.0",
|
|
148
|
-
"eslint-plugin-jsdoc": "^
|
|
148
|
+
"eslint-plugin-jsdoc": "^40.0.0",
|
|
149
149
|
"esmock": "^2.1.0",
|
|
150
|
-
"jsdoc": "^
|
|
150
|
+
"jsdoc": "^4.0.1",
|
|
151
151
|
"nyc": "^15.1.0",
|
|
152
152
|
"open-cli": "^7.1.0",
|
|
153
153
|
"rimraf": "^4.1.2",
|