@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.d.cts
CHANGED
|
@@ -1511,10 +1511,8 @@ declare const ContainerUtils: Readonly<{
|
|
|
1511
1511
|
resolveServiceScoped<K extends keyof T, T extends ApplicationRegistry>(token: K, container: IServiceContainer<T>): T[K];
|
|
1512
1512
|
/**
|
|
1513
1513
|
* Executes a service action within the context of a scoped service.
|
|
1514
|
-
* @param
|
|
1515
|
-
* @param
|
|
1516
|
-
* @param headers * The headers to include in the request.
|
|
1517
|
-
* @param transport * The transport object containing the request and response objects.
|
|
1514
|
+
* @param res * The response DTO to be returned.
|
|
1515
|
+
* @param req * The request DTO to be passed to the action.
|
|
1518
1516
|
* @param container * The container to resolve the service from.
|
|
1519
1517
|
* @param action * The action to execute within the scoped service.
|
|
1520
1518
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1511,10 +1511,8 @@ declare const ContainerUtils: Readonly<{
|
|
|
1511
1511
|
resolveServiceScoped<K extends keyof T, T extends ApplicationRegistry>(token: K, container: IServiceContainer<T>): T[K];
|
|
1512
1512
|
/**
|
|
1513
1513
|
* Executes a service action within the context of a scoped service.
|
|
1514
|
-
* @param
|
|
1515
|
-
* @param
|
|
1516
|
-
* @param headers * The headers to include in the request.
|
|
1517
|
-
* @param transport * The transport object containing the request and response objects.
|
|
1514
|
+
* @param res * The response DTO to be returned.
|
|
1515
|
+
* @param req * The request DTO to be passed to the action.
|
|
1518
1516
|
* @param container * The container to resolve the service from.
|
|
1519
1517
|
* @param action * The action to execute within the scoped service.
|
|
1520
1518
|
*
|
package/dist/index.js
CHANGED
|
@@ -44,10 +44,8 @@ var init_container_utils = __esm({
|
|
|
44
44
|
},
|
|
45
45
|
/**
|
|
46
46
|
* Executes a service action within the context of a scoped service.
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param headers * The headers to include in the request.
|
|
50
|
-
* @param transport * The transport object containing the request and response objects.
|
|
47
|
+
* @param res * The response DTO to be returned.
|
|
48
|
+
* @param req * The request DTO to be passed to the action.
|
|
51
49
|
* @param container * The container to resolve the service from.
|
|
52
50
|
* @param action * The action to execute within the scoped service.
|
|
53
51
|
*
|
|
@@ -91,7 +89,7 @@ var init_base_handler = __esm({
|
|
|
91
89
|
_identityFactory;
|
|
92
90
|
async handle(request, signal) {
|
|
93
91
|
AppError.throwIfAborted(signal, this.constructor.name);
|
|
94
|
-
return await this.executeAsync(request);
|
|
92
|
+
return await this.executeAsync(request, signal);
|
|
95
93
|
}
|
|
96
94
|
/**
|
|
97
95
|
* Gets the current context.
|
|
@@ -1016,10 +1014,10 @@ var init_gate_keeper = __esm({
|
|
|
1016
1014
|
const guest = GUEST;
|
|
1017
1015
|
if (!Guards12.isNullOrEmpty(token)) {
|
|
1018
1016
|
const authResult = await this._authService.authenticate(token);
|
|
1019
|
-
if (authResult.isOk())
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1017
|
+
if (!authResult.isOk()) return Result14.fail(authResult.getErrorOrThrow());
|
|
1018
|
+
const claims = authResult.getValueOrThrow();
|
|
1019
|
+
if (Guards12.isDefined(claims)) return Result14.ok(this._mapper.map(claims));
|
|
1020
|
+
return Result14.ok(guest);
|
|
1023
1021
|
}
|
|
1024
1022
|
const userResult = await this._authService.getUser();
|
|
1025
1023
|
if (userResult.isOk()) {
|