@xeno-js/core 1.2.9 → 1.2.11
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/README.md +445 -456
- package/dist/index.cjs +7 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -56,10 +56,8 @@ var init_container_utils = __esm({
|
|
|
56
56
|
},
|
|
57
57
|
/**
|
|
58
58
|
* Executes a service action within the context of a scoped service.
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
61
|
-
* @param headers * The headers to include in the request.
|
|
62
|
-
* @param transport * The transport object containing the request and response objects.
|
|
59
|
+
* @param res * The response DTO to be returned.
|
|
60
|
+
* @param req * The request DTO to be passed to the action.
|
|
63
61
|
* @param container * The container to resolve the service from.
|
|
64
62
|
* @param action * The action to execute within the scoped service.
|
|
65
63
|
*
|
|
@@ -101,7 +99,7 @@ var init_base_handler = __esm({
|
|
|
101
99
|
_identityFactory;
|
|
102
100
|
async handle(request, signal) {
|
|
103
101
|
import_shared2.AppError.throwIfAborted(signal, this.constructor.name);
|
|
104
|
-
return await this.executeAsync(request);
|
|
102
|
+
return await this.executeAsync(request, signal);
|
|
105
103
|
}
|
|
106
104
|
/**
|
|
107
105
|
* Gets the current context.
|
|
@@ -1020,10 +1018,10 @@ var init_gate_keeper = __esm({
|
|
|
1020
1018
|
const guest = import_shared28.GUEST;
|
|
1021
1019
|
if (!import_shared28.Guards.isNullOrEmpty(token)) {
|
|
1022
1020
|
const authResult = await this._authService.authenticate(token);
|
|
1023
|
-
if (authResult.isOk())
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
if (!authResult.isOk()) return import_shared27.Result.fail(authResult.getErrorOrThrow());
|
|
1022
|
+
const claims = authResult.getValueOrThrow();
|
|
1023
|
+
if (import_shared28.Guards.isDefined(claims)) return import_shared27.Result.ok(this._mapper.map(claims));
|
|
1024
|
+
return import_shared27.Result.ok(guest);
|
|
1027
1025
|
}
|
|
1028
1026
|
const userResult = await this._authService.getUser();
|
|
1029
1027
|
if (userResult.isOk()) {
|