@xeno-js/core 1.2.10 → 1.2.12
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 +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2019,8 +2019,8 @@ declare abstract class BaseHttpAdapter<TReq = ExtendedRequest, TRes = Response>
|
|
|
2019
2019
|
* @link https://github.com/xeno-js/xeno-js
|
|
2020
2020
|
*/
|
|
2021
2021
|
declare abstract class ReadDao<T, TDto> implements IReadDao<T> {
|
|
2022
|
-
|
|
2023
|
-
|
|
2022
|
+
protected readonly _dataSource: IReadDataSource<TDto>;
|
|
2023
|
+
protected readonly _mapper: IMapper<T, TDto>;
|
|
2024
2024
|
/**
|
|
2025
2025
|
* Constructs a new ReadDao instance.
|
|
2026
2026
|
* @param _dataSource An instance of IReadDataSource used to execute SQL queries and commands for data access.
|
|
@@ -2049,8 +2049,8 @@ declare abstract class ReadDao<T, TDto> implements IReadDao<T> {
|
|
|
2049
2049
|
* @link https://github.com/xeno-js/xeno-js
|
|
2050
2050
|
*/
|
|
2051
2051
|
declare abstract class Repository<T, TDto> implements IRepository<T> {
|
|
2052
|
-
|
|
2053
|
-
|
|
2052
|
+
protected readonly _dataSource: IWriteDataSource<TDto>;
|
|
2053
|
+
protected readonly _mapper: IMapper<T, TDto>;
|
|
2054
2054
|
/**
|
|
2055
2055
|
* Constructs a new Repository instance.
|
|
2056
2056
|
* @param _dataSource An instance of IWriteDataSource used to execute SQL queries and commands for data access.
|
package/dist/index.d.ts
CHANGED
|
@@ -2019,8 +2019,8 @@ declare abstract class BaseHttpAdapter<TReq = ExtendedRequest, TRes = Response>
|
|
|
2019
2019
|
* @link https://github.com/xeno-js/xeno-js
|
|
2020
2020
|
*/
|
|
2021
2021
|
declare abstract class ReadDao<T, TDto> implements IReadDao<T> {
|
|
2022
|
-
|
|
2023
|
-
|
|
2022
|
+
protected readonly _dataSource: IReadDataSource<TDto>;
|
|
2023
|
+
protected readonly _mapper: IMapper<T, TDto>;
|
|
2024
2024
|
/**
|
|
2025
2025
|
* Constructs a new ReadDao instance.
|
|
2026
2026
|
* @param _dataSource An instance of IReadDataSource used to execute SQL queries and commands for data access.
|
|
@@ -2049,8 +2049,8 @@ declare abstract class ReadDao<T, TDto> implements IReadDao<T> {
|
|
|
2049
2049
|
* @link https://github.com/xeno-js/xeno-js
|
|
2050
2050
|
*/
|
|
2051
2051
|
declare abstract class Repository<T, TDto> implements IRepository<T> {
|
|
2052
|
-
|
|
2053
|
-
|
|
2052
|
+
protected readonly _dataSource: IWriteDataSource<TDto>;
|
|
2053
|
+
protected readonly _mapper: IMapper<T, TDto>;
|
|
2054
2054
|
/**
|
|
2055
2055
|
* Constructs a new Repository instance.
|
|
2056
2056
|
* @param _dataSource An instance of IWriteDataSource used to execute SQL queries and commands for data access.
|
package/dist/index.js
CHANGED
|
@@ -1014,10 +1014,10 @@ var init_gate_keeper = __esm({
|
|
|
1014
1014
|
const guest = GUEST;
|
|
1015
1015
|
if (!Guards12.isNullOrEmpty(token)) {
|
|
1016
1016
|
const authResult = await this._authService.authenticate(token);
|
|
1017
|
-
if (authResult.isOk())
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
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);
|
|
1021
1021
|
}
|
|
1022
1022
|
const userResult = await this._authService.getUser();
|
|
1023
1023
|
if (userResult.isOk()) {
|