alepha 0.9.1 → 0.9.3
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/batch.d.ts +4 -4
- package/bucket.d.ts +3 -3
- package/cache/redis.d.ts +4 -4
- package/cache.d.ts +3 -3
- package/command.d.ts +27 -13
- package/core.d.ts +104 -100
- package/datetime.d.ts +5 -5
- package/lock/redis.d.ts +1 -1
- package/lock.d.ts +8 -8
- package/package.json +54 -47
- package/postgres.d.ts +135 -98
- package/queue/redis.d.ts +1 -1
- package/queue.d.ts +12 -12
- package/react/auth.d.ts +342 -118
- package/{testing.cjs → react/form.cjs} +1 -1
- package/react/form.d.ts +126 -0
- package/react/form.js +1 -0
- package/react/head.d.ts +46 -8
- package/react/i18n.cjs +8 -0
- package/react/i18n.d.ts +112 -0
- package/react/i18n.js +1 -0
- package/react.d.ts +261 -164
- package/redis.d.ts +7 -7
- package/scheduler.d.ts +9 -9
- package/security.d.ts +131 -111
- package/server/cache.d.ts +10 -8
- package/server/compress.d.ts +1 -1
- package/server/cookies.d.ts +44 -15
- package/server/cors.d.ts +4 -4
- package/server/health.d.ts +1 -1
- package/server/helmet.d.ts +1 -1
- package/server/links.d.ts +11 -10
- package/server/metrics.d.ts +5 -5
- package/server/multipart.d.ts +1 -1
- package/server/proxy.d.ts +4 -4
- package/server/security.d.ts +8 -10
- package/server/static.d.ts +3 -3
- package/server/swagger.d.ts +3 -3
- package/server.d.ts +47 -39
- package/topic/redis.d.ts +4 -4
- package/topic.d.ts +5 -5
- package/vite.d.ts +55 -24
- package/testing.d.ts +0 -1
- package/testing.js +0 -1
package/server/links.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as _alepha_core2 from "alepha";
|
|
1
2
|
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import * as _alepha_core0$1 from "alepha";
|
|
3
3
|
import * as _alepha_core0 from "alepha";
|
|
4
4
|
import { Alepha, Descriptor, KIND, Logger } from "alepha";
|
|
5
5
|
import * as _alepha_server0 from "alepha/server";
|
|
@@ -19,6 +19,7 @@ declare class LinkProvider {
|
|
|
19
19
|
pushLink(link: HttpClientLink): void;
|
|
20
20
|
getLinks(force?: boolean): Promise<HttpClientLink[]>;
|
|
21
21
|
client<T extends object>(scope?: ClientScope): HttpVirtualClient<T>;
|
|
22
|
+
protected createVirtualAction<T extends RequestConfigSchema>(name: string, scope?: ClientScope): VirtualAction<T>;
|
|
22
23
|
/**
|
|
23
24
|
* Resolve a link by its name and call it.
|
|
24
25
|
* - If link is local, it will call the local handler.
|
|
@@ -41,11 +42,11 @@ interface ClientScope {
|
|
|
41
42
|
group?: string;
|
|
42
43
|
service?: string;
|
|
43
44
|
}
|
|
44
|
-
type HttpVirtualClient<T> = { [K in keyof T as T[K] extends ActionDescriptor<RequestConfigSchema> ? K : never]: T[K] extends ActionDescriptor<infer Schema> ?
|
|
45
|
-
|
|
45
|
+
type HttpVirtualClient<T> = { [K in keyof T as T[K] extends ActionDescriptor<RequestConfigSchema> ? K : never]: T[K] extends ActionDescriptor<infer Schema> ? VirtualAction<Schema> : never };
|
|
46
|
+
interface VirtualAction<T extends RequestConfigSchema> extends Pick<ActionDescriptor<T>, "name" | "run" | "fetch"> {
|
|
47
|
+
(config?: ClientRequestEntry<T>, opts?: ClientRequestOptions): Promise<ClientRequestResponse<T>>;
|
|
46
48
|
can: () => boolean;
|
|
47
|
-
|
|
48
|
-
} : never };
|
|
49
|
+
}
|
|
49
50
|
//# sourceMappingURL=LinkProvider.d.ts.map
|
|
50
51
|
//#endregion
|
|
51
52
|
//#region src/descriptors/$client.d.ts
|
|
@@ -133,8 +134,8 @@ declare class RemoteDescriptorProvider {
|
|
|
133
134
|
protected readonly remotes: Array<ServerRemote>;
|
|
134
135
|
protected readonly log: Logger;
|
|
135
136
|
getRemotes(): ServerRemote[];
|
|
136
|
-
readonly configure:
|
|
137
|
-
readonly start:
|
|
137
|
+
readonly configure: _alepha_core2.HookDescriptor<"configure">;
|
|
138
|
+
readonly start: _alepha_core2.HookDescriptor<"start">;
|
|
138
139
|
registerRemote(value: RemoteDescriptor): Promise<void>;
|
|
139
140
|
protected readonly fetchLinks: _alepha_retry0.RetryDescriptorFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
|
|
140
141
|
}
|
|
@@ -165,7 +166,7 @@ declare class ServerLinksProvider {
|
|
|
165
166
|
protected readonly alepha: Alepha;
|
|
166
167
|
protected readonly client: LinkProvider;
|
|
167
168
|
protected readonly remoteProvider: RemoteDescriptorProvider;
|
|
168
|
-
readonly onRoute:
|
|
169
|
+
readonly onRoute: _alepha_core1.HookDescriptor<"configure">;
|
|
169
170
|
readonly links: _alepha_server0.RouteDescriptor<{
|
|
170
171
|
response: _sinclair_typebox0.TObject<{
|
|
171
172
|
prefix: _sinclair_typebox0.TOptional<_sinclair_typebox0.TString>;
|
|
@@ -194,9 +195,9 @@ interface GetLinksOptions {
|
|
|
194
195
|
//# sourceMappingURL=ServerLinksProvider.d.ts.map
|
|
195
196
|
//#endregion
|
|
196
197
|
//#region src/index.d.ts
|
|
197
|
-
declare const AlephaServerLinks: _alepha_core0.
|
|
198
|
+
declare const AlephaServerLinks: _alepha_core0.Service<_alepha_core0.Module>;
|
|
198
199
|
//# sourceMappingURL=index.d.ts.map
|
|
199
200
|
|
|
200
201
|
//#endregion
|
|
201
|
-
export { $client, $remote, AlephaServerLinks, ClientScope, FetchLinksOptions, GetLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote };
|
|
202
|
+
export { $client, $remote, AlephaServerLinks, ClientScope, FetchLinksOptions, GetLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction };
|
|
202
203
|
//# sourceMappingURL=index.d.ts.map
|
package/server/metrics.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha } from "alepha";
|
|
4
4
|
import * as _alepha_server0 from "alepha/server";
|
|
@@ -11,9 +11,9 @@ declare class ServerMetricsProvider {
|
|
|
11
11
|
protected httpRequestDuration?: Histogram<string>;
|
|
12
12
|
readonly options: ServerMetricsProviderOptions;
|
|
13
13
|
readonly metrics: _alepha_server0.RouteDescriptor<_alepha_server0.RequestConfigSchema>;
|
|
14
|
-
protected readonly onStart:
|
|
15
|
-
protected readonly onRequest:
|
|
16
|
-
protected readonly onResponse:
|
|
14
|
+
protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
|
|
15
|
+
protected readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
16
|
+
protected readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
17
17
|
}
|
|
18
18
|
interface ServerMetricsProviderOptions {
|
|
19
19
|
prefix?: string;
|
|
@@ -31,7 +31,7 @@ interface ServerMetricsProviderOptions {
|
|
|
31
31
|
* @see {@link ServerMetricsProvider}
|
|
32
32
|
* @module alepha.server.metrics
|
|
33
33
|
*/
|
|
34
|
-
declare const AlephaServerMetrics: _alepha_core0.
|
|
34
|
+
declare const AlephaServerMetrics: _alepha_core0.Service<_alepha_core0.Module>;
|
|
35
35
|
//# sourceMappingURL=index.d.ts.map
|
|
36
36
|
|
|
37
37
|
//#endregion
|
package/server/multipart.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ interface HybridFile extends FileLike {
|
|
|
36
36
|
* @see {@link ServerMultipartProvider}
|
|
37
37
|
* @module alepha.server.multipart
|
|
38
38
|
*/
|
|
39
|
-
declare const AlephaServerMultipart: _alepha_core0.
|
|
39
|
+
declare const AlephaServerMultipart: _alepha_core0.Service<_alepha_core0.Module>;
|
|
40
40
|
//# sourceMappingURL=index.d.ts.map
|
|
41
41
|
|
|
42
42
|
//#endregion
|
package/server/proxy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha, Async, Descriptor, KIND } from "alepha";
|
|
4
4
|
import { ServerHandler, ServerRequest, ServerRouterProvider } from "alepha/server";
|
|
@@ -21,10 +21,10 @@ declare class ProxyDescriptor extends Descriptor<ProxyDescriptorOptions> {}
|
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/providers/ServerProxyProvider.d.ts
|
|
23
23
|
declare class ServerProxyProvider {
|
|
24
|
-
protected readonly log:
|
|
24
|
+
protected readonly log: _alepha_core1.Logger;
|
|
25
25
|
protected readonly routerProvider: ServerRouterProvider;
|
|
26
26
|
protected readonly alepha: Alepha;
|
|
27
|
-
protected readonly configure:
|
|
27
|
+
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
28
28
|
createProxy(options: ProxyDescriptorOptions): void;
|
|
29
29
|
createProxyHandler(target: string, options: Omit<ProxyDescriptorOptions, "path">): ServerHandler;
|
|
30
30
|
private getRawRequestBody;
|
|
@@ -38,7 +38,7 @@ declare class ServerProxyProvider {
|
|
|
38
38
|
* @see {@link $proxy}
|
|
39
39
|
* @module alepha.server.proxy
|
|
40
40
|
*/
|
|
41
|
-
declare const AlephaServerProxy: _alepha_core0.
|
|
41
|
+
declare const AlephaServerProxy: _alepha_core0.Service<_alepha_core0.Module>;
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
|
43
43
|
|
|
44
44
|
//#endregion
|
package/server/security.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha } from "alepha";
|
|
4
4
|
import { JwtProvider, Permission, SecurityProvider, UserAccountToken } from "alepha/security";
|
|
@@ -6,13 +6,13 @@ import { FetchOptions } from "alepha/server";
|
|
|
6
6
|
|
|
7
7
|
//#region src/providers/ServerSecurityProvider.d.ts
|
|
8
8
|
declare class ServerSecurityProvider {
|
|
9
|
-
protected readonly log:
|
|
9
|
+
protected readonly log: _alepha_core1.Logger;
|
|
10
10
|
protected readonly securityProvider: SecurityProvider;
|
|
11
11
|
protected readonly jwtProvider: JwtProvider;
|
|
12
12
|
protected readonly alepha: Alepha;
|
|
13
|
-
protected readonly onConfigure:
|
|
14
|
-
protected readonly onActionRequest:
|
|
15
|
-
protected readonly onRequest:
|
|
13
|
+
protected readonly onConfigure: _alepha_core1.HookDescriptor<"configure">;
|
|
14
|
+
protected readonly onActionRequest: _alepha_core1.HookDescriptor<"action:onRequest">;
|
|
15
|
+
protected readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
16
16
|
/**
|
|
17
17
|
* Get the user account token for a local action call.
|
|
18
18
|
* There are three possible sources for the user:
|
|
@@ -28,7 +28,7 @@ declare class ServerSecurityProvider {
|
|
|
28
28
|
user?: UserAccountToken | "system" | "context";
|
|
29
29
|
}, permission?: Permission): UserAccountToken;
|
|
30
30
|
protected createTestUser(): UserAccountToken;
|
|
31
|
-
protected readonly onClientRequest:
|
|
31
|
+
protected readonly onClientRequest: _alepha_core1.HookDescriptor<"client:onRequest">;
|
|
32
32
|
}
|
|
33
33
|
type ServerRouteSecure = boolean | {
|
|
34
34
|
permissions?: string[];
|
|
@@ -62,9 +62,7 @@ declare module "alepha/server" {
|
|
|
62
62
|
* If true, the route will be protected by the security provider.
|
|
63
63
|
* All actions are secure by default, but you can disable it for specific actions.
|
|
64
64
|
*/
|
|
65
|
-
secure?: boolean
|
|
66
|
-
optional?: boolean;
|
|
67
|
-
};
|
|
65
|
+
secure?: boolean;
|
|
68
66
|
}
|
|
69
67
|
interface ClientRequestOptions extends FetchOptions {
|
|
70
68
|
/**
|
|
@@ -85,7 +83,7 @@ declare module "alepha/server" {
|
|
|
85
83
|
* @see {@link ServerSecurityProvider}
|
|
86
84
|
* @module alepha.server.security
|
|
87
85
|
*/
|
|
88
|
-
declare const AlephaServerSecurity: _alepha_core0.
|
|
86
|
+
declare const AlephaServerSecurity: _alepha_core0.Service<_alepha_core0.Module>;
|
|
89
87
|
//# sourceMappingURL=index.d.ts.map
|
|
90
88
|
//#endregion
|
|
91
89
|
export { AlephaServerSecurity, ServerRouteSecure, ServerSecurityProvider };
|
package/server/static.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha, Descriptor, KIND, Logger } from "alepha";
|
|
4
4
|
import { ServerHandler, ServerRouterProvider } from "alepha/server";
|
|
@@ -92,7 +92,7 @@ declare class ServerStaticProvider {
|
|
|
92
92
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
93
93
|
protected readonly log: Logger;
|
|
94
94
|
protected readonly directories: ServeDirectory[];
|
|
95
|
-
protected readonly configure:
|
|
95
|
+
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
96
96
|
createStaticServer(options: ServeDescriptorOptions): Promise<void>;
|
|
97
97
|
createFileHandler(filepath: string, options: ServeDescriptorOptions): Promise<ServerHandler>;
|
|
98
98
|
protected getCacheFileTypes(): string[];
|
|
@@ -115,7 +115,7 @@ interface ServeDirectory {
|
|
|
115
115
|
* @see {@link ServerStaticProvider}
|
|
116
116
|
* @module alepha.server.static
|
|
117
117
|
*/
|
|
118
|
-
declare const AlephaServerStatic: _alepha_core0.
|
|
118
|
+
declare const AlephaServerStatic: _alepha_core0.Service<_alepha_core0.Module>;
|
|
119
119
|
//# sourceMappingURL=index.d.ts.map
|
|
120
120
|
|
|
121
121
|
//#endregion
|
package/server/swagger.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha, Descriptor, KIND, TObject } from "alepha";
|
|
4
4
|
import { ActionDescriptor, RequestConfigSchema, ServerRouterProvider } from "alepha/server";
|
|
@@ -90,7 +90,7 @@ declare class ServerSwaggerProvider {
|
|
|
90
90
|
protected readonly serverRouterProvider: ServerRouterProvider;
|
|
91
91
|
protected readonly alepha: Alepha;
|
|
92
92
|
json?: OpenAPIV3.Document;
|
|
93
|
-
protected readonly configure:
|
|
93
|
+
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
94
94
|
createSwagger(options: SwaggerDescriptorOptions): Promise<OpenAPIV3.Document | undefined>;
|
|
95
95
|
protected configureOpenApi(actions: ActionDescriptor<RequestConfigSchema>[], doc: SwaggerDescriptorOptions): OpenAPIV3.Document;
|
|
96
96
|
isBodyMultipart(schema: TObject): boolean;
|
|
@@ -126,7 +126,7 @@ declare module "alepha/server" {
|
|
|
126
126
|
* @see {@link ServerSwaggerProvider}
|
|
127
127
|
* @module alepha.server.swagger
|
|
128
128
|
*/
|
|
129
|
-
declare const AlephaServerSwagger: _alepha_core0.
|
|
129
|
+
declare const AlephaServerSwagger: _alepha_core0.Service<_alepha_core0.Module>;
|
|
130
130
|
//# sourceMappingURL=index.d.ts.map
|
|
131
131
|
|
|
132
132
|
//#endregion
|
package/server.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as _alepha_core5 from "alepha";
|
|
2
|
+
import * as _alepha_core4 from "alepha";
|
|
3
|
+
import * as _alepha_core11 from "alepha";
|
|
4
|
+
import * as _alepha_core6 from "alepha";
|
|
5
|
+
import * as _alepha_core10 from "alepha";
|
|
1
6
|
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import * as _alepha_core0$1 from "alepha";
|
|
3
|
-
import * as _alepha_core2 from "alepha";
|
|
4
|
-
import * as _alepha_core9 from "alepha";
|
|
5
|
-
import * as _alepha_core13 from "alepha";
|
|
6
|
-
import * as _alepha_core14 from "alepha";
|
|
7
7
|
import * as _alepha_core0 from "alepha";
|
|
8
|
-
import { Alepha, Async, Descriptor, FileLike, KIND, Static, StreamLike, TObject, TSchema } from "alepha";
|
|
8
|
+
import { Alepha, AlephaError, Async, Descriptor, FileLike, KIND, Static, StreamLike, TObject, TSchema } from "alepha";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
import { ReadableStream } from "node:stream/web";
|
|
11
11
|
import { Route, RouterProvider } from "alepha/router";
|
|
@@ -13,8 +13,8 @@ import * as _alepha_cache0 from "alepha/cache";
|
|
|
13
13
|
import { IncomingMessage, ServerResponse as ServerResponse$1 } from "node:http";
|
|
14
14
|
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
15
15
|
import * as _sinclair_typebox0 from "@sinclair/typebox";
|
|
16
|
-
import * as _sinclair_typebox33 from "@sinclair/typebox";
|
|
17
16
|
import * as _sinclair_typebox25 from "@sinclair/typebox";
|
|
17
|
+
import * as _sinclair_typebox35 from "@sinclair/typebox";
|
|
18
18
|
import * as http0 from "http";
|
|
19
19
|
|
|
20
20
|
//#region src/constants/routeMethods.d.ts
|
|
@@ -141,7 +141,7 @@ declare class ServerRouterProvider extends RouterProvider<ServerRouteMatcher> {
|
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/services/HttpClient.d.ts
|
|
143
143
|
declare class HttpClient {
|
|
144
|
-
protected readonly log:
|
|
144
|
+
protected readonly log: _alepha_core5.Logger;
|
|
145
145
|
protected readonly alepha: Alepha;
|
|
146
146
|
readonly cache: _alepha_cache0.CacheDescriptorFn<HttpClientCache, any[]>;
|
|
147
147
|
protected readonly pendingRequests: HttpClientPendingRequests;
|
|
@@ -300,7 +300,7 @@ interface ActionDescriptorOptions<TConfig extends RequestConfigSchema> extends O
|
|
|
300
300
|
handler: ServerActionHandler<TConfig>;
|
|
301
301
|
}
|
|
302
302
|
declare class ActionDescriptor<TConfig extends RequestConfigSchema> extends Descriptor<ActionDescriptorOptions<TConfig>> {
|
|
303
|
-
protected readonly log:
|
|
303
|
+
protected readonly log: _alepha_core4.Logger;
|
|
304
304
|
protected readonly env: {
|
|
305
305
|
SERVER_API_PREFIX: string;
|
|
306
306
|
};
|
|
@@ -369,7 +369,10 @@ interface ServerActionRequest<TConfig extends RequestConfigSchema> extends Serve
|
|
|
369
369
|
//# sourceMappingURL=$action.d.ts.map
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/errors/HttpError.d.ts
|
|
372
|
-
declare
|
|
372
|
+
declare const isHttpError: (error: unknown, status?: number) => error is HttpErrorLike;
|
|
373
|
+
declare class HttpError extends AlephaError {
|
|
374
|
+
name: string;
|
|
375
|
+
static is: (error: unknown, status?: number) => error is HttpErrorLike;
|
|
373
376
|
static toJSON(error: HttpError): {
|
|
374
377
|
status: number;
|
|
375
378
|
error: string | undefined;
|
|
@@ -401,7 +404,6 @@ declare class HttpError extends Error {
|
|
|
401
404
|
}, cause?: unknown);
|
|
402
405
|
}
|
|
403
406
|
declare const errorNameByStatus: Record<number, string>;
|
|
404
|
-
declare const isHttpError: (error: unknown) => error is HttpErrorLike;
|
|
405
407
|
interface HttpErrorLike extends Error {
|
|
406
408
|
status: number;
|
|
407
409
|
}
|
|
@@ -494,31 +496,31 @@ type ApiLink = Static<typeof apiLinkSchema>;
|
|
|
494
496
|
//# sourceMappingURL=apiLinksResponseSchema.d.ts.map
|
|
495
497
|
//#endregion
|
|
496
498
|
//#region src/schemas/errorSchema.d.ts
|
|
497
|
-
declare const errorSchema:
|
|
498
|
-
error:
|
|
499
|
-
status:
|
|
500
|
-
message:
|
|
501
|
-
details:
|
|
502
|
-
cause:
|
|
503
|
-
name:
|
|
504
|
-
message:
|
|
499
|
+
declare const errorSchema: _sinclair_typebox25.TObject<{
|
|
500
|
+
error: _sinclair_typebox25.TString;
|
|
501
|
+
status: _sinclair_typebox25.TNumber;
|
|
502
|
+
message: _sinclair_typebox25.TString;
|
|
503
|
+
details: _sinclair_typebox25.TOptional<_sinclair_typebox25.TString>;
|
|
504
|
+
cause: _sinclair_typebox25.TOptional<_sinclair_typebox25.TObject<{
|
|
505
|
+
name: _sinclair_typebox25.TString;
|
|
506
|
+
message: _sinclair_typebox25.TString;
|
|
505
507
|
}>>;
|
|
506
508
|
}>;
|
|
507
509
|
//# sourceMappingURL=errorSchema.d.ts.map
|
|
508
510
|
//#endregion
|
|
509
511
|
//#region src/schemas/okSchema.d.ts
|
|
510
|
-
declare const okSchema:
|
|
511
|
-
ok:
|
|
512
|
-
id:
|
|
513
|
-
count:
|
|
512
|
+
declare const okSchema: _sinclair_typebox35.TObject<{
|
|
513
|
+
ok: _sinclair_typebox35.TBoolean;
|
|
514
|
+
id: _sinclair_typebox35.TOptional<_sinclair_typebox35.TUnion<[_sinclair_typebox35.TString, _sinclair_typebox35.TInteger]>>;
|
|
515
|
+
count: _sinclair_typebox35.TOptional<_sinclair_typebox35.TNumber>;
|
|
514
516
|
}>;
|
|
515
517
|
type Ok = Static<typeof okSchema>;
|
|
516
518
|
//# sourceMappingURL=okSchema.d.ts.map
|
|
517
519
|
//#endregion
|
|
518
520
|
//#region src/providers/NodeHttpServerProvider.d.ts
|
|
519
|
-
declare const envSchema:
|
|
520
|
-
SERVER_PORT:
|
|
521
|
-
SERVER_HOST:
|
|
521
|
+
declare const envSchema: _alepha_core11.TObject<{
|
|
522
|
+
SERVER_PORT: _alepha_core11.TNumber;
|
|
523
|
+
SERVER_HOST: _alepha_core11.TString;
|
|
522
524
|
}>;
|
|
523
525
|
declare module "alepha" {
|
|
524
526
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -526,31 +528,31 @@ declare module "alepha" {
|
|
|
526
528
|
declare class NodeHttpServerProvider extends ServerProvider {
|
|
527
529
|
protected readonly alepha: Alepha;
|
|
528
530
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
529
|
-
protected readonly log:
|
|
531
|
+
protected readonly log: _alepha_core11.Logger;
|
|
530
532
|
protected readonly env: {
|
|
531
533
|
SERVER_PORT: number;
|
|
532
534
|
SERVER_HOST: string;
|
|
533
535
|
};
|
|
534
536
|
protected readonly router: ServerRouterProvider;
|
|
535
537
|
protected readonly server: http0.Server<typeof IncomingMessage, typeof ServerResponse$1>;
|
|
536
|
-
protected readonly onNodeRequest:
|
|
538
|
+
protected readonly onNodeRequest: _alepha_core11.HookDescriptor<"node:request">;
|
|
537
539
|
handle(req: IncomingMessage, res: ServerResponse$1): Promise<void>;
|
|
538
540
|
createRouterRequest(req: IncomingMessage, res: ServerResponse$1, params?: Record<string, string>): ServerRawRequest;
|
|
539
541
|
getProtocol(req: IncomingMessage): "http" | "https";
|
|
540
542
|
get hostname(): string;
|
|
541
|
-
readonly start:
|
|
542
|
-
protected readonly stop:
|
|
543
|
+
readonly start: _alepha_core11.HookDescriptor<"start">;
|
|
544
|
+
protected readonly stop: _alepha_core11.HookDescriptor<"stop">;
|
|
543
545
|
protected listen(): Promise<void>;
|
|
544
546
|
protected close(): Promise<void>;
|
|
545
547
|
}
|
|
546
548
|
//#endregion
|
|
547
549
|
//#region src/providers/ServerLoggerProvider.d.ts
|
|
548
550
|
declare class ServerLoggerProvider {
|
|
549
|
-
protected readonly log:
|
|
551
|
+
protected readonly log: _alepha_core6.Logger;
|
|
550
552
|
protected readonly alepha: Alepha;
|
|
551
|
-
readonly onRequest:
|
|
552
|
-
readonly onError:
|
|
553
|
-
readonly onResponse:
|
|
553
|
+
readonly onRequest: _alepha_core6.HookDescriptor<"server:onRequest">;
|
|
554
|
+
readonly onError: _alepha_core6.HookDescriptor<"server:onError">;
|
|
555
|
+
readonly onResponse: _alepha_core6.HookDescriptor<"server:onResponse">;
|
|
554
556
|
}
|
|
555
557
|
//# sourceMappingURL=ServerLoggerProvider.d.ts.map
|
|
556
558
|
//#endregion
|
|
@@ -564,17 +566,17 @@ declare class ServerLoggerProvider {
|
|
|
564
566
|
*/
|
|
565
567
|
declare class ServerNotReadyProvider {
|
|
566
568
|
protected readonly alepha: Alepha;
|
|
567
|
-
readonly onRequest:
|
|
569
|
+
readonly onRequest: _alepha_core10.HookDescriptor<"server:onRequest">;
|
|
568
570
|
}
|
|
569
571
|
//# sourceMappingURL=ServerNotReadyProvider.d.ts.map
|
|
570
572
|
//#endregion
|
|
571
573
|
//#region src/providers/ServerTimingProvider.d.ts
|
|
572
574
|
type TimingMap = Record<string, [number, number]>;
|
|
573
575
|
declare class ServerTimingProvider {
|
|
574
|
-
protected readonly log:
|
|
576
|
+
protected readonly log: _alepha_core1.Logger;
|
|
575
577
|
protected readonly alepha: Alepha;
|
|
576
|
-
readonly onRequest:
|
|
577
|
-
readonly onResponse:
|
|
578
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
579
|
+
readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
578
580
|
protected get handlerName(): string;
|
|
579
581
|
beginTiming(name: string): void;
|
|
580
582
|
endTiming(name: string): void;
|
|
@@ -589,6 +591,12 @@ declare module "alepha" {
|
|
|
589
591
|
request: ServerRequest;
|
|
590
592
|
options: ClientRequestOptions;
|
|
591
593
|
};
|
|
594
|
+
"action:onResponse": {
|
|
595
|
+
action: ActionDescriptor<RequestConfigSchema>;
|
|
596
|
+
request: ServerRequest;
|
|
597
|
+
options: ClientRequestOptions;
|
|
598
|
+
response: any;
|
|
599
|
+
};
|
|
592
600
|
"server:onRequest": {
|
|
593
601
|
route: ServerRoute;
|
|
594
602
|
request: ServerRequest;
|
|
@@ -640,7 +648,7 @@ declare module "alepha" {
|
|
|
640
648
|
* @see {@link $action}
|
|
641
649
|
* @module alepha.server
|
|
642
650
|
*/
|
|
643
|
-
declare const AlephaServer: _alepha_core0.
|
|
651
|
+
declare const AlephaServer: _alepha_core0.Service<_alepha_core0.Module>;
|
|
644
652
|
//# sourceMappingURL=index.d.ts.map
|
|
645
653
|
|
|
646
654
|
//#endregion
|
package/topic/redis.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import * as _alepha_core0 from "alepha";
|
|
3
3
|
import { Alepha } from "alepha";
|
|
4
4
|
import { SubscribeCallback, TopicProvider, UnSubscribeFn } from "alepha/topic";
|
|
@@ -12,8 +12,8 @@ declare class RedisTopicProvider extends TopicProvider {
|
|
|
12
12
|
protected readonly alepha: Alepha;
|
|
13
13
|
protected readonly redisProvider: RedisProvider;
|
|
14
14
|
protected readonly redisSubscriberProvider: RedisSubscriberProvider;
|
|
15
|
-
protected readonly log:
|
|
16
|
-
protected readonly start:
|
|
15
|
+
protected readonly log: _alepha_core1.Logger;
|
|
16
|
+
protected readonly start: _alepha_core1.HookDescriptor<"start">;
|
|
17
17
|
prefix(queue: string): string;
|
|
18
18
|
/**
|
|
19
19
|
* Publish a message to a topic.
|
|
@@ -37,7 +37,7 @@ declare class RedisTopicProvider extends TopicProvider {
|
|
|
37
37
|
* @see {@link RedisTopicProvider}
|
|
38
38
|
* @module alepha.topic.redis
|
|
39
39
|
*/
|
|
40
|
-
declare const AlephaTopicRedis: _alepha_core0.
|
|
40
|
+
declare const AlephaTopicRedis: _alepha_core0.Service<_alepha_core0.Module>;
|
|
41
41
|
//# sourceMappingURL=index.d.ts.map
|
|
42
42
|
|
|
43
43
|
//#endregion
|
package/topic.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
1
2
|
import * as _alepha_core2 from "alepha";
|
|
2
|
-
import * as _alepha_core0$1 from "alepha";
|
|
3
3
|
import * as _alepha_core0 from "alepha";
|
|
4
4
|
import { Alepha, Descriptor, KIND, Service, Static, TSchema } from "alepha";
|
|
5
5
|
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
@@ -76,7 +76,7 @@ interface TopicDescriptorOptions<T extends TopicMessageSchema> {
|
|
|
76
76
|
handler?: TopicHandler<T>;
|
|
77
77
|
}
|
|
78
78
|
declare class TopicDescriptor<T extends TopicMessageSchema> extends Descriptor<TopicDescriptorOptions<T>> {
|
|
79
|
-
protected readonly log:
|
|
79
|
+
protected readonly log: _alepha_core1.Logger;
|
|
80
80
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
81
81
|
readonly provider: TopicProvider;
|
|
82
82
|
get name(): string;
|
|
@@ -127,9 +127,9 @@ declare class TopicTimeoutError extends Error {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region src/providers/MemoryTopicProvider.d.ts
|
|
129
129
|
declare class MemoryTopicProvider extends TopicProvider {
|
|
130
|
-
protected readonly log:
|
|
130
|
+
protected readonly log: _alepha_core2.Logger;
|
|
131
131
|
protected readonly subscriptions: Record<string, SubscribeCallback[]>;
|
|
132
|
-
protected readonly start:
|
|
132
|
+
protected readonly start: _alepha_core2.HookDescriptor<"start">;
|
|
133
133
|
/**
|
|
134
134
|
* Publish a message to a topic.
|
|
135
135
|
*
|
|
@@ -163,7 +163,7 @@ declare class MemoryTopicProvider extends TopicProvider {
|
|
|
163
163
|
* @see {@link $subscriber}
|
|
164
164
|
* @module alepha.topic
|
|
165
165
|
*/
|
|
166
|
-
declare const AlephaTopic: _alepha_core0.
|
|
166
|
+
declare const AlephaTopic: _alepha_core0.Service<_alepha_core0.Module>;
|
|
167
167
|
//# sourceMappingURL=index.d.ts.map
|
|
168
168
|
|
|
169
169
|
//#endregion
|
package/vite.d.ts
CHANGED
|
@@ -51,6 +51,54 @@ interface BuildClientOptions {
|
|
|
51
51
|
config?: UserConfig;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
+
//#region src/viteAlephaBuildDocker.d.ts
|
|
55
|
+
interface ViteAlephaBuildDockerOptions {
|
|
56
|
+
/**
|
|
57
|
+
* The directory where the build output will be placed.
|
|
58
|
+
*
|
|
59
|
+
* @default "dist"
|
|
60
|
+
*/
|
|
61
|
+
distDir?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Image name to use in the Dockerfile.
|
|
64
|
+
* If not provided, it will default to `node:24-alpine`.
|
|
65
|
+
*/
|
|
66
|
+
image?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Command to run in the Docker container.
|
|
69
|
+
* If not provided, it will default to `node`.
|
|
70
|
+
*/
|
|
71
|
+
command?: string;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/viteAlephaBuildVercel.d.ts
|
|
75
|
+
interface ViteAlephaBuildVercelOptions {
|
|
76
|
+
/**
|
|
77
|
+
* The directory where the build output will be placed.
|
|
78
|
+
*
|
|
79
|
+
* @default "dist"
|
|
80
|
+
*/
|
|
81
|
+
distDir?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The name of the client directory.
|
|
84
|
+
*
|
|
85
|
+
* @default "public"
|
|
86
|
+
*/
|
|
87
|
+
clientDir?: string;
|
|
88
|
+
config?: VercelConfig;
|
|
89
|
+
}
|
|
90
|
+
interface VercelConfig {
|
|
91
|
+
projectName?: string;
|
|
92
|
+
orgId?: string;
|
|
93
|
+
projectId?: string;
|
|
94
|
+
}
|
|
95
|
+
declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Promise<{
|
|
96
|
+
name: string;
|
|
97
|
+
apply: string;
|
|
98
|
+
writeBundle(): void;
|
|
99
|
+
}>;
|
|
100
|
+
//# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
|
|
101
|
+
//#endregion
|
|
54
102
|
//#region src/viteAlephaBuild.d.ts
|
|
55
103
|
interface ViteAlephaBuildOptions {
|
|
56
104
|
/**
|
|
@@ -70,7 +118,12 @@ interface ViteAlephaBuildOptions {
|
|
|
70
118
|
*
|
|
71
119
|
* @default false
|
|
72
120
|
*/
|
|
73
|
-
vercel?: boolean;
|
|
121
|
+
vercel?: boolean | VercelConfig;
|
|
122
|
+
/**
|
|
123
|
+
* If true, the build will be optimized for Docker deployment.
|
|
124
|
+
* Additionally, it will generate a Dockerfile in the dist directory.
|
|
125
|
+
*/
|
|
126
|
+
docker?: boolean | ViteAlephaBuildDockerOptions;
|
|
74
127
|
}
|
|
75
128
|
declare function viteAlephaBuild(options?: ViteAlephaBuildOptions): Promise<Plugin>;
|
|
76
129
|
//# sourceMappingURL=viteAlephaBuild.d.ts.map
|
|
@@ -100,28 +153,6 @@ type ViteAlephaOptions = ViteAlephaDevOptions & ViteAlephaBuildOptions;
|
|
|
100
153
|
declare function viteAlepha(options?: ViteAlephaOptions): (Plugin | Promise<Plugin>)[];
|
|
101
154
|
//# sourceMappingURL=viteAlepha.d.ts.map
|
|
102
155
|
//#endregion
|
|
103
|
-
//#region src/viteAlephaBuildVercel.d.ts
|
|
104
|
-
interface ViteAlephaBuildVercelOptions {
|
|
105
|
-
/**
|
|
106
|
-
* The directory where the build output will be placed.
|
|
107
|
-
*
|
|
108
|
-
* @default "dist"
|
|
109
|
-
*/
|
|
110
|
-
distDir?: string;
|
|
111
|
-
/**
|
|
112
|
-
* The name of the client directory.
|
|
113
|
-
*
|
|
114
|
-
* @default "public"
|
|
115
|
-
*/
|
|
116
|
-
clientDir?: string;
|
|
117
|
-
}
|
|
118
|
-
declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Promise<{
|
|
119
|
-
name: string;
|
|
120
|
-
apply: string;
|
|
121
|
-
writeBundle(): void;
|
|
122
|
-
}>;
|
|
123
|
-
//# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
|
|
124
|
-
//#endregion
|
|
125
156
|
//#region src/index.d.ts
|
|
126
157
|
declare global {
|
|
127
158
|
var __alepha: Alepha;
|
|
@@ -129,5 +160,5 @@ declare global {
|
|
|
129
160
|
//# sourceMappingURL=index.d.ts.map
|
|
130
161
|
|
|
131
162
|
//#endregion
|
|
132
|
-
export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
|
|
163
|
+
export { VercelConfig, ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
|
|
133
164
|
//# sourceMappingURL=index.d.ts.map
|
package/testing.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@faker-js/faker";
|
package/testing.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@alepha/testing'
|