dev-approuter 0.1.1 → 0.1.2

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.1.2](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.1.1...dev-approuter@0.1.2) (2023-08-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **dev-approuter:** make CAP projects work without reference in xs-dev.json ([#809](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/809)) ([d52a432](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/d52a432609630da3ac215cdcc1a501d7be37655d))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.1.1](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.1.0...dev-approuter@0.1.1) (2023-08-25)
7
18
 
8
19
 
@@ -109,10 +109,8 @@ class DevApprouter {
109
109
  console.log(`CAP server started at: http://localhost:${process.env.CAP_PORT || 4004}`);
110
110
  });
111
111
 
112
- // configure CAP route if referenced as "dependency" in xs-dev.json/xs-app.json
113
- if (config.dependencyRoutes && config.dependencyRoutes[moduleId]) {
114
- config.dependencyRoutes[moduleId] = configureCAPRoute(moduleId, servicesPaths, config.dependencyRoutes[moduleId]);
115
- }
112
+ config.routes.unshift(configureCAPRoute(moduleId, servicesPaths, config.dependencyRoutes[moduleId]));
113
+ config.dependencyRoutes[moduleId] = configureCAPRoute(moduleId, servicesPaths, config.dependencyRoutes[moduleId]);
116
114
 
117
115
  // add destination for newly configured route
118
116
  addDestination(moduleId, process.env.CAP_PORT || 4004);
package/lib/helpers.js CHANGED
@@ -95,6 +95,10 @@ const addDestination = (moduleId, port, mountPath) => {
95
95
  * @returns {Object} the configured route.
96
96
  */
97
97
  const configureCAPRoute = (moduleId, servicesPaths, route) => {
98
+ if (!route) {
99
+ route = {};
100
+ route.authenticationType = "none";
101
+ }
98
102
  route.source = servicesPaths
99
103
  .map((path) => {
100
104
  return `${path}(.*)`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-approuter",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A dev time wrapper for the SAP Application Router that can serve UI5 and CAP modules added as dependencies.",
5
5
  "author": "Nico Schoenteich <nicolai.schoenteich@sap.com> (https://github.com/nicoschoenteich)",
6
6
  "license": "Apache-2.0",
@@ -17,5 +17,5 @@
17
17
  "path": "^0.12.7",
18
18
  "ui5-middleware-cap": "^3.1.0"
19
19
  },
20
- "gitHead": "9eb0e2bbeccf023e381dadd4ac2b899556294407"
20
+ "gitHead": "3e8e6d7625a544cb6d1a329cc66a8d796e1c969f"
21
21
  }