@ui5/server 3.0.0 → 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 CHANGED
@@ -2,7 +2,13 @@
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.0...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.0.1...HEAD).
6
+
7
+ <a name="v3.0.1"></a>
8
+ ## [v3.0.1] - 2023-02-16
9
+ ### Bug Fixes
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
+
6
12
 
7
13
  <a name="v3.0.0"></a>
8
14
  ## [v3.0.0] - 2023-02-09
@@ -290,6 +296,7 @@ Only Node.js v10 or higher is supported.
290
296
 
291
297
  <a name="v0.0.1"></a>
292
298
  ## v0.0.1 - 2018-06-06
299
+ [v3.0.1]: https://github.com/SAP/ui5-server/compare/v3.0.0...v3.0.1
293
300
  [v3.0.0]: https://github.com/SAP/ui5-server/compare/v2.4.0...v3.0.0
294
301
  [v2.4.1]: https://github.com/SAP/ui5-server/compare/v2.4.0...v2.4.1
295
302
  [v2.4.0]: https://github.com/SAP/ui5-server/compare/v2.3.1...v2.4.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", "getReader", "getRootPath", "getSourcePath",
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.0",
3
+ "version": "3.0.1",
4
4
  "description": "UI5 Tooling - Server",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -114,7 +114,7 @@
114
114
  "url": "git@github.com:SAP/ui5-server.git"
115
115
  },
116
116
  "dependencies": {
117
- "@ui5/builder": "^3.0.0",
117
+ "@ui5/builder": "^3.0.1",
118
118
  "@ui5/fs": "^3.0.0",
119
119
  "@ui5/logger": "^3.0.0",
120
120
  "body-parser": "^1.20.1",
@@ -136,18 +136,18 @@
136
136
  },
137
137
  "devDependencies": {
138
138
  "@istanbuljs/esm-loader-hook": "^0.2.0",
139
- "@ui5/project": "^3.0.0-rc.9",
139
+ "@ui5/project": "^3.0.0",
140
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.33.0",
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": "^39.8.0",
148
+ "eslint-plugin-jsdoc": "^40.0.0",
149
149
  "esmock": "^2.1.0",
150
- "jsdoc": "^4.0.0",
150
+ "jsdoc": "^4.0.1",
151
151
  "nyc": "^15.1.0",
152
152
  "open-cli": "^7.1.0",
153
153
  "rimraf": "^4.1.2",