@xeno-js/core 1.2.5 → 1.2.7
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/dist/index.cjs +281 -209
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -1
- package/dist/index.d.ts +52 -1
- package/dist/index.js +165 -93
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1950,6 +1950,57 @@ declare class SupabaseServerAuthFactory<TRegistry extends XenoRegistry = XenoReg
|
|
|
1950
1950
|
private _getCookieSsr;
|
|
1951
1951
|
}
|
|
1952
1952
|
|
|
1953
|
+
/**
|
|
1954
|
+
* @description Base HTTP adapter.
|
|
1955
|
+
* @author Xeno
|
|
1956
|
+
* @version 1.2.1
|
|
1957
|
+
* @since 2025-09-30
|
|
1958
|
+
* @link https://github.com/xeno-js/xeno-js
|
|
1959
|
+
*/
|
|
1960
|
+
declare abstract class BaseHttpAdapter<TReq = ExtendedRequest, TRes = Response> implements IHttpAdapter<TReq, TRes> {
|
|
1961
|
+
abstract adapt(req: TReq, res: TRes): XenoWebTransport;
|
|
1962
|
+
/**
|
|
1963
|
+
* @description Parse the URL from the request.
|
|
1964
|
+
* @param rawUrl The raw URL.
|
|
1965
|
+
* @param headers The headers.
|
|
1966
|
+
* @param queryParams The query parameters.
|
|
1967
|
+
* @returns The parsed URL.
|
|
1968
|
+
*/
|
|
1969
|
+
protected parseUrl(rawUrl: string | undefined, headers: Dictionary<Optional<string | string[]>>, queryParams: Optional<Dictionary>): URL;
|
|
1970
|
+
/**
|
|
1971
|
+
* @description Parses the headers.
|
|
1972
|
+
* @param rawHeaders The raw headers.
|
|
1973
|
+
* @returns The parsed headers.
|
|
1974
|
+
*/
|
|
1975
|
+
protected parseHeaders(rawHeaders: Dictionary<Optional<string | string[]>>): Headers;
|
|
1976
|
+
/**
|
|
1977
|
+
* @description Parses the body.
|
|
1978
|
+
* @param method The method.
|
|
1979
|
+
* @param rawBody The raw body.
|
|
1980
|
+
* @returns The parsed body.
|
|
1981
|
+
*/
|
|
1982
|
+
protected parseBody(method: Optional<string>, rawBody: unknown): Optional<RequestInit['body']>;
|
|
1983
|
+
/**
|
|
1984
|
+
* @description Handles the header change.
|
|
1985
|
+
* @param res The response.
|
|
1986
|
+
* @param name The name.
|
|
1987
|
+
* @param value The value.
|
|
1988
|
+
* @param action The action.
|
|
1989
|
+
* @param action The action.
|
|
1990
|
+
* @returns void
|
|
1991
|
+
*/
|
|
1992
|
+
protected abstract handleHeaderChange(_res: TRes, _name: string, _value: string, _action: 'set' | 'append' | 'delete'): void;
|
|
1993
|
+
/**
|
|
1994
|
+
* @description Creates the XenoWebTransport.
|
|
1995
|
+
* @param url The url.
|
|
1996
|
+
* @param method The method.
|
|
1997
|
+
* @param headers The headers.
|
|
1998
|
+
* @param body The body.
|
|
1999
|
+
* @returns The XenoWebTransport.
|
|
2000
|
+
*/
|
|
2001
|
+
protected createXenoWebTransport(url: URL, method: string | undefined, headers: Headers, body?: Optional<unknown>, res?: Optional<TRes>): XenoWebTransport;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1953
2004
|
/**
|
|
1954
2005
|
* An abstract generic read-only DAO that provides basic read operations for entities of type T, using a Data Transfer Object (DTO) of type TDto for data access. This class relies on an IReadDataSource to perform database operations and an IMapper to convert between entities and DTOs.
|
|
1955
2006
|
* @template T - The type of the entity that the DAO will manage.
|
|
@@ -2093,4 +2144,4 @@ declare abstract class BaseController<TRequest, TResponse> implements IControlle
|
|
|
2093
2144
|
protected getContext(): Optional<RequestContext>;
|
|
2094
2145
|
}
|
|
2095
2146
|
|
|
2096
|
-
export { AppBuilder, type ApplicationRegistry, type AuthSsrConfig, BaseAuthorizationStrategy, BaseController, BaseHandler, BasePostgresSqlDataSource, BaseSqliteSqlDataSource, ContainerUtils, type CookieHandlerOptions, type DbContext, type DbTransaction, type ExecutionContext, type HttpAdapterConfig, type HttpConfig, type HttpCoreConfig, type IAllowMethod, type IAllowOrigin, type IAtomicCache, type ICryptoService, type ICsrfTokenService, type IHttpAdapter, type IIPResolver, type IModule, type IRateLimitKeyBuilder, type IRequestContext, type IServiceContainer, type IServiceProvider, type IServiceScope, type IServiceScopeAccessor, type ISsrCookie, type ISsrCookieHandler, type ISsrCookieToSet, type Lifetime, type LoggerConfig, type MiddlewareConfig, type PinoLoggerConfig, type PipelineConfig, ReadDao, Repository, type ResilienceConfig, type SchemaConfig, type SentryLoggerConfig, type ServiceDescriptor, Specification, SupabaseServerAuthFactory, type XenoRegistry, type XenoWebTransport };
|
|
2147
|
+
export { AppBuilder, type ApplicationRegistry, type AuthSsrConfig, BaseAuthorizationStrategy, BaseController, BaseHandler, BaseHttpAdapter, BasePostgresSqlDataSource, BaseSqliteSqlDataSource, ContainerUtils, type CookieHandlerOptions, type DbContext, type DbTransaction, type ExecutionContext, type HttpAdapterConfig, type HttpConfig, type HttpCoreConfig, type IAllowMethod, type IAllowOrigin, type IAtomicCache, type ICryptoService, type ICsrfTokenService, type IHttpAdapter, type IIPResolver, type IModule, type IRateLimitKeyBuilder, type IRequestContext, type IServiceContainer, type IServiceProvider, type IServiceScope, type IServiceScopeAccessor, type ISsrCookie, type ISsrCookieHandler, type ISsrCookieToSet, type Lifetime, type LoggerConfig, type MiddlewareConfig, type PinoLoggerConfig, type PipelineConfig, ReadDao, Repository, type ResilienceConfig, type SchemaConfig, type SentryLoggerConfig, type ServiceDescriptor, Specification, SupabaseServerAuthFactory, type XenoRegistry, type XenoWebTransport };
|
package/dist/index.d.ts
CHANGED
|
@@ -1950,6 +1950,57 @@ declare class SupabaseServerAuthFactory<TRegistry extends XenoRegistry = XenoReg
|
|
|
1950
1950
|
private _getCookieSsr;
|
|
1951
1951
|
}
|
|
1952
1952
|
|
|
1953
|
+
/**
|
|
1954
|
+
* @description Base HTTP adapter.
|
|
1955
|
+
* @author Xeno
|
|
1956
|
+
* @version 1.2.1
|
|
1957
|
+
* @since 2025-09-30
|
|
1958
|
+
* @link https://github.com/xeno-js/xeno-js
|
|
1959
|
+
*/
|
|
1960
|
+
declare abstract class BaseHttpAdapter<TReq = ExtendedRequest, TRes = Response> implements IHttpAdapter<TReq, TRes> {
|
|
1961
|
+
abstract adapt(req: TReq, res: TRes): XenoWebTransport;
|
|
1962
|
+
/**
|
|
1963
|
+
* @description Parse the URL from the request.
|
|
1964
|
+
* @param rawUrl The raw URL.
|
|
1965
|
+
* @param headers The headers.
|
|
1966
|
+
* @param queryParams The query parameters.
|
|
1967
|
+
* @returns The parsed URL.
|
|
1968
|
+
*/
|
|
1969
|
+
protected parseUrl(rawUrl: string | undefined, headers: Dictionary<Optional<string | string[]>>, queryParams: Optional<Dictionary>): URL;
|
|
1970
|
+
/**
|
|
1971
|
+
* @description Parses the headers.
|
|
1972
|
+
* @param rawHeaders The raw headers.
|
|
1973
|
+
* @returns The parsed headers.
|
|
1974
|
+
*/
|
|
1975
|
+
protected parseHeaders(rawHeaders: Dictionary<Optional<string | string[]>>): Headers;
|
|
1976
|
+
/**
|
|
1977
|
+
* @description Parses the body.
|
|
1978
|
+
* @param method The method.
|
|
1979
|
+
* @param rawBody The raw body.
|
|
1980
|
+
* @returns The parsed body.
|
|
1981
|
+
*/
|
|
1982
|
+
protected parseBody(method: Optional<string>, rawBody: unknown): Optional<RequestInit['body']>;
|
|
1983
|
+
/**
|
|
1984
|
+
* @description Handles the header change.
|
|
1985
|
+
* @param res The response.
|
|
1986
|
+
* @param name The name.
|
|
1987
|
+
* @param value The value.
|
|
1988
|
+
* @param action The action.
|
|
1989
|
+
* @param action The action.
|
|
1990
|
+
* @returns void
|
|
1991
|
+
*/
|
|
1992
|
+
protected abstract handleHeaderChange(_res: TRes, _name: string, _value: string, _action: 'set' | 'append' | 'delete'): void;
|
|
1993
|
+
/**
|
|
1994
|
+
* @description Creates the XenoWebTransport.
|
|
1995
|
+
* @param url The url.
|
|
1996
|
+
* @param method The method.
|
|
1997
|
+
* @param headers The headers.
|
|
1998
|
+
* @param body The body.
|
|
1999
|
+
* @returns The XenoWebTransport.
|
|
2000
|
+
*/
|
|
2001
|
+
protected createXenoWebTransport(url: URL, method: string | undefined, headers: Headers, body?: Optional<unknown>, res?: Optional<TRes>): XenoWebTransport;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1953
2004
|
/**
|
|
1954
2005
|
* An abstract generic read-only DAO that provides basic read operations for entities of type T, using a Data Transfer Object (DTO) of type TDto for data access. This class relies on an IReadDataSource to perform database operations and an IMapper to convert between entities and DTOs.
|
|
1955
2006
|
* @template T - The type of the entity that the DAO will manage.
|
|
@@ -2093,4 +2144,4 @@ declare abstract class BaseController<TRequest, TResponse> implements IControlle
|
|
|
2093
2144
|
protected getContext(): Optional<RequestContext>;
|
|
2094
2145
|
}
|
|
2095
2146
|
|
|
2096
|
-
export { AppBuilder, type ApplicationRegistry, type AuthSsrConfig, BaseAuthorizationStrategy, BaseController, BaseHandler, BasePostgresSqlDataSource, BaseSqliteSqlDataSource, ContainerUtils, type CookieHandlerOptions, type DbContext, type DbTransaction, type ExecutionContext, type HttpAdapterConfig, type HttpConfig, type HttpCoreConfig, type IAllowMethod, type IAllowOrigin, type IAtomicCache, type ICryptoService, type ICsrfTokenService, type IHttpAdapter, type IIPResolver, type IModule, type IRateLimitKeyBuilder, type IRequestContext, type IServiceContainer, type IServiceProvider, type IServiceScope, type IServiceScopeAccessor, type ISsrCookie, type ISsrCookieHandler, type ISsrCookieToSet, type Lifetime, type LoggerConfig, type MiddlewareConfig, type PinoLoggerConfig, type PipelineConfig, ReadDao, Repository, type ResilienceConfig, type SchemaConfig, type SentryLoggerConfig, type ServiceDescriptor, Specification, SupabaseServerAuthFactory, type XenoRegistry, type XenoWebTransport };
|
|
2147
|
+
export { AppBuilder, type ApplicationRegistry, type AuthSsrConfig, BaseAuthorizationStrategy, BaseController, BaseHandler, BaseHttpAdapter, BasePostgresSqlDataSource, BaseSqliteSqlDataSource, ContainerUtils, type CookieHandlerOptions, type DbContext, type DbTransaction, type ExecutionContext, type HttpAdapterConfig, type HttpConfig, type HttpCoreConfig, type IAllowMethod, type IAllowOrigin, type IAtomicCache, type ICryptoService, type ICsrfTokenService, type IHttpAdapter, type IIPResolver, type IModule, type IRateLimitKeyBuilder, type IRequestContext, type IServiceContainer, type IServiceProvider, type IServiceScope, type IServiceScopeAccessor, type ISsrCookie, type ISsrCookieHandler, type ISsrCookieToSet, type Lifetime, type LoggerConfig, type MiddlewareConfig, type PinoLoggerConfig, type PipelineConfig, ReadDao, Repository, type ResilienceConfig, type SchemaConfig, type SentryLoggerConfig, type ServiceDescriptor, Specification, SupabaseServerAuthFactory, type XenoRegistry, type XenoWebTransport };
|