dev-approuter 0.3.4 → 0.4.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 +11 -0
- package/README.md +3 -0
- package/lib/devApprouter.js +8 -1
- package/package.json +2 -2
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.4.0](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.3.4...dev-approuter@0.4.0) (2024-12-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **dev-approuter:** add custom /my-jwt route for debugging auth(n,z) ([#1134](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/1134)) ([3e7b72b](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/3e7b72b35403d964ad9977f6b77670d67e87b961)), closes [#1133](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/1133)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.3.4](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.3.3...dev-approuter@0.3.4) (2024-12-04)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package dev-approuter
|
package/README.md
CHANGED
|
@@ -55,6 +55,9 @@ The `dev-approuter` is a wrapper for the SAP Application Router, meaning your cu
|
|
|
55
55
|
...
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
|
+
...or by passing a port as environment variable: `PORT=5001 npm run dev`
|
|
59
|
+
|
|
60
|
+
4. Upon start, the `dev-approuter` exposes a custom endpoint `http://localhost:$port/my-jwt`. It echos the current JWT of the current (authenticated and authorized) user (or `none`) - this helps debugging auth(n,z) issues at dev time.
|
|
58
61
|
|
|
59
62
|
## Adding and serving apps
|
|
60
63
|
|
package/lib/devApprouter.js
CHANGED
|
@@ -159,7 +159,14 @@ class DevApprouter {
|
|
|
159
159
|
|
|
160
160
|
// create and start the SAP Approuter
|
|
161
161
|
// https://help.sap.com/docs/btp/sap-business-technology-platform/extension-api-of-application-router
|
|
162
|
-
approuter()
|
|
162
|
+
const _approuter = approuter();
|
|
163
|
+
// helper: if used in a hybrid setup w/ xsuaa,
|
|
164
|
+
// this endpoint helps to debug auth(n,z) issues
|
|
165
|
+
// DANGER, WILL SMITH: you must not use this in production envs!
|
|
166
|
+
_approuter.beforeRequestHandler.use("/my-jwt", (req, res) => {
|
|
167
|
+
res.end(req.session?.user?.token?.accessToken || "none")
|
|
168
|
+
})
|
|
169
|
+
_approuter.start({
|
|
163
170
|
port: arPort,
|
|
164
171
|
xsappConfig: applyDependencyConfig(config),
|
|
165
172
|
extensions: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dev-approuter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A dev time wrapper for the SAP Application Router that can serve UI5 and CDS modules added as dependencies.",
|
|
5
5
|
"author": "Nico Schoenteich <nicolai.schoenteich@sap.com> (https://github.com/nicoschoenteich)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"optional": true
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "d7bfddd86f2608c59882f226903dc9c142988567"
|
|
29
29
|
}
|